sd                245 arch/arm/vfp/vfp.h #define vfp_single_normaliseround(sd,vsd,fpscr,except,func) __vfp_single_normaliseround(sd,vsd,fpscr,except)
sd                246 arch/arm/vfp/vfp.h u32 __vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exceptions);
sd                248 arch/arm/vfp/vfp.h u32 vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exceptions, const char *func);
sd                439 arch/arm/vfp/vfpdouble.c static u32 vfp_double_fcvts(int sd, int unused, int dm, u32 fpscr)
sd                475 arch/arm/vfp/vfpdouble.c 	return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fcvts");
sd                478 arch/arm/vfp/vfpdouble.c 	vfp_put_float(vfp_single_pack(&vsd), sd);
sd                506 arch/arm/vfp/vfpdouble.c static u32 vfp_double_ftoui(int sd, int unused, int dm, u32 fpscr)
sd                573 arch/arm/vfp/vfpdouble.c 	pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
sd                575 arch/arm/vfp/vfpdouble.c 	vfp_put_float(d, sd);
sd                580 arch/arm/vfp/vfpdouble.c static u32 vfp_double_ftouiz(int sd, int unused, int dm, u32 fpscr)
sd                582 arch/arm/vfp/vfpdouble.c 	return vfp_double_ftoui(sd, unused, dm, FPSCR_ROUND_TOZERO);
sd                585 arch/arm/vfp/vfpdouble.c static u32 vfp_double_ftosi(int sd, int unused, int dm, u32 fpscr)
sd                648 arch/arm/vfp/vfpdouble.c 	pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
sd                650 arch/arm/vfp/vfpdouble.c 	vfp_put_float((s32)d, sd);
sd                 69 arch/arm/vfp/vfpsingle.c #define vfp_single_normaliseround(sd,vsd,fpscr,except,func) __vfp_single_normaliseround(sd,vsd,fpscr,except)
sd                 70 arch/arm/vfp/vfpsingle.c u32 __vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exceptions)
sd                 72 arch/arm/vfp/vfpsingle.c u32 vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exceptions, const char *func)
sd                202 arch/arm/vfp/vfpsingle.c 			 sd, d, exceptions);
sd                204 arch/arm/vfp/vfpsingle.c 		vfp_put_float(d, sd);
sd                259 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fabs(int sd, int unused, s32 m, u32 fpscr)
sd                261 arch/arm/vfp/vfpsingle.c 	vfp_put_float(vfp_single_packed_abs(m), sd);
sd                265 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fcpy(int sd, int unused, s32 m, u32 fpscr)
sd                267 arch/arm/vfp/vfpsingle.c 	vfp_put_float(m, sd);
sd                271 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fneg(int sd, int unused, s32 m, u32 fpscr)
sd                273 arch/arm/vfp/vfpsingle.c 	vfp_put_float(vfp_single_packed_negate(m), sd);
sd                316 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fsqrt(int sd, int unused, s32 m, u32 fpscr)
sd                337 arch/arm/vfp/vfpsingle.c 		vfp_put_float(vfp_single_pack(vsp), sd);
sd                394 arch/arm/vfp/vfpsingle.c 	return vfp_single_normaliseround(sd, &vsd, fpscr, 0, "fsqrt");
sd                403 arch/arm/vfp/vfpsingle.c static u32 vfp_compare(int sd, int signal_on_qnan, s32 m, u32 fpscr)
sd                408 arch/arm/vfp/vfpsingle.c 	d = vfp_get_float(sd);
sd                462 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fcmp(int sd, int unused, s32 m, u32 fpscr)
sd                464 arch/arm/vfp/vfpsingle.c 	return vfp_compare(sd, 0, m, fpscr);
sd                467 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fcmpe(int sd, int unused, s32 m, u32 fpscr)
sd                469 arch/arm/vfp/vfpsingle.c 	return vfp_compare(sd, 1, m, fpscr);
sd                472 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fcmpz(int sd, int unused, s32 m, u32 fpscr)
sd                474 arch/arm/vfp/vfpsingle.c 	return vfp_compare(sd, 0, 0, fpscr);
sd                477 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fcmpez(int sd, int unused, s32 m, u32 fpscr)
sd                479 arch/arm/vfp/vfpsingle.c 	return vfp_compare(sd, 1, 0, fpscr);
sd                525 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fuito(int sd, int unused, s32 m, u32 fpscr)
sd                533 arch/arm/vfp/vfpsingle.c 	return vfp_single_normaliseround(sd, &vs, fpscr, 0, "fuito");
sd                536 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fsito(int sd, int unused, s32 m, u32 fpscr)
sd                544 arch/arm/vfp/vfpsingle.c 	return vfp_single_normaliseround(sd, &vs, fpscr, 0, "fsito");
sd                547 arch/arm/vfp/vfpsingle.c static u32 vfp_single_ftoui(int sd, int unused, s32 m, u32 fpscr)
sd                615 arch/arm/vfp/vfpsingle.c 	pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
sd                617 arch/arm/vfp/vfpsingle.c 	vfp_put_float(d, sd);
sd                622 arch/arm/vfp/vfpsingle.c static u32 vfp_single_ftouiz(int sd, int unused, s32 m, u32 fpscr)
sd                624 arch/arm/vfp/vfpsingle.c 	return vfp_single_ftoui(sd, unused, m, FPSCR_ROUND_TOZERO);
sd                627 arch/arm/vfp/vfpsingle.c static u32 vfp_single_ftosi(int sd, int unused, s32 m, u32 fpscr)
sd                694 arch/arm/vfp/vfpsingle.c 	pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
sd                696 arch/arm/vfp/vfpsingle.c 	vfp_put_float((s32)d, sd);
sd                701 arch/arm/vfp/vfpsingle.c static u32 vfp_single_ftosiz(int sd, int unused, s32 m, u32 fpscr)
sd                703 arch/arm/vfp/vfpsingle.c 	return vfp_single_ftosi(sd, unused, m, FPSCR_ROUND_TOZERO);
sd                895 arch/arm/vfp/vfpsingle.c vfp_single_multiply_accumulate(int sd, int sn, s32 m, u32 fpscr, u32 negate, char *func)
sd                915 arch/arm/vfp/vfpsingle.c 	v = vfp_get_float(sd);
sd                916 arch/arm/vfp/vfpsingle.c 	pr_debug("VFP: s%u = %08x\n", sd, v);
sd                925 arch/arm/vfp/vfpsingle.c 	return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, func);
sd                935 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fmac(int sd, int sn, s32 m, u32 fpscr)
sd                937 arch/arm/vfp/vfpsingle.c 	return vfp_single_multiply_accumulate(sd, sn, m, fpscr, 0, "fmac");
sd                943 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fnmac(int sd, int sn, s32 m, u32 fpscr)
sd                945 arch/arm/vfp/vfpsingle.c 	return vfp_single_multiply_accumulate(sd, sn, m, fpscr, NEG_MULTIPLY, "fnmac");
sd                951 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fmsc(int sd, int sn, s32 m, u32 fpscr)
sd                953 arch/arm/vfp/vfpsingle.c 	return vfp_single_multiply_accumulate(sd, sn, m, fpscr, NEG_SUBTRACT, "fmsc");
sd                959 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fnmsc(int sd, int sn, s32 m, u32 fpscr)
sd                961 arch/arm/vfp/vfpsingle.c 	return vfp_single_multiply_accumulate(sd, sn, m, fpscr, NEG_SUBTRACT | NEG_MULTIPLY, "fnmsc");
sd                967 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fmul(int sd, int sn, s32 m, u32 fpscr)
sd                984 arch/arm/vfp/vfpsingle.c 	return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fmul");
sd                990 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fnmul(int sd, int sn, s32 m, u32 fpscr)
sd               1008 arch/arm/vfp/vfpsingle.c 	return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fnmul");
sd               1014 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fadd(int sd, int sn, s32 m, u32 fpscr)
sd               1035 arch/arm/vfp/vfpsingle.c 	return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fadd");
sd               1041 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fsub(int sd, int sn, s32 m, u32 fpscr)
sd               1046 arch/arm/vfp/vfpsingle.c 	return vfp_single_fadd(sd, sn, vfp_single_packed_negate(m), fpscr);
sd               1052 arch/arm/vfp/vfpsingle.c static u32 vfp_single_fdiv(int sd, int sn, s32 m, u32 fpscr)
sd               1128 arch/arm/vfp/vfpsingle.c 	return vfp_single_normaliseround(sd, &vsd, fpscr, 0, "fdiv");
sd               1133 arch/arm/vfp/vfpsingle.c 	vfp_put_float(vfp_single_pack(&vsd), sd);
sd               1153 arch/arm/vfp/vfpsingle.c 	vfp_put_float(vfp_single_pack(&vfp_single_default_qnan), sd);
sd                128 arch/mips/include/asm/asm-eva.h #define kernel_sd(reg, addr)		sd reg, addr
sd                142 arch/mips/include/asm/asm.h #define REG_S		sd
sd                176 arch/mips/include/asm/asm.h #define INT_S		sd
sd                219 arch/mips/include/asm/asm.h #define LONG_S		sd
sd                270 arch/mips/include/asm/asm.h #define PTR_S		sd
sd                 77 arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h 	sd	$0, -32768(v0)
sd                322 arch/mips/include/asm/octeon/cvmx-pciercx-defs.h 		__BITFIELD_FIELD(uint32_t sd:1,
sd               1417 arch/mips/kernel/ptrace.c 		struct seccomp_data sd;
sd               1420 arch/mips/kernel/ptrace.c 		sd.nr = syscall;
sd               1421 arch/mips/kernel/ptrace.c 		sd.arch = syscall_get_arch(current);
sd               1424 arch/mips/kernel/ptrace.c 			sd.args[i] = args[i];
sd               1425 arch/mips/kernel/ptrace.c 		sd.instruction_pointer = KSTK_EIP(current);
sd               1427 arch/mips/kernel/ptrace.c 		ret = __secure_computing(&sd);
sd                315 arch/mips/net/ebpf_jit.c 		emit_instr_long(ctx, sd, sw,
sd                320 arch/mips/net/ebpf_jit.c 		emit_instr_long(ctx, sd, sw,
sd                325 arch/mips/net/ebpf_jit.c 		emit_instr_long(ctx, sd, sw,
sd                330 arch/mips/net/ebpf_jit.c 		emit_instr_long(ctx, sd, sw,
sd                335 arch/mips/net/ebpf_jit.c 		emit_instr_long(ctx, sd, sw,
sd                340 arch/mips/net/ebpf_jit.c 		emit_instr_long(ctx, sd, sw,
sd               1384 arch/mips/net/ebpf_jit.c 			emit_instr(ctx, sd, MIPS_R_AT, mem_off, dst);
sd               1499 arch/mips/net/ebpf_jit.c 				emit_instr(ctx, sd, src, mem_off, dst);
sd                183 arch/powerpc/kernel/eeh_sysfs.c 	if (!pdev->dev.kobj.sd) {
sd                 24 arch/riscv/include/asm/asm.h #define REG_S		__REG_SEL(sd, sw)
sd                 38 arch/s390/include/asm/nmi.h 		u64 sd :  1; /* 00 system damage */
sd                351 arch/s390/kernel/nmi.c 	if (mci.sd) {
sd                447 arch/s390/pci/pci_clp.c 	struct clp_state_data *sd = data;
sd                449 arch/s390/pci/pci_clp.c 	if (entry->fid != sd->fid)
sd                452 arch/s390/pci/pci_clp.c 	sd->state = entry->config_state;
sd                458 arch/s390/pci/pci_clp.c 	struct clp_state_data sd = {fid, ZPCI_FN_STATE_RESERVED};
sd                465 arch/s390/pci/pci_clp.c 	rc = clp_list_pci(rrb, &sd, __clp_get_state);
sd                467 arch/s390/pci/pci_clp.c 		*state = sd.state;
sd                345 arch/sparc/kernel/of_device_32.c 	struct dev_archdata *sd;
sd                351 arch/sparc/kernel/of_device_32.c 	sd = &op->dev.archdata;
sd                352 arch/sparc/kernel/of_device_32.c 	sd->op = op;
sd                641 arch/sparc/kernel/of_device_64.c 	struct dev_archdata *sd;
sd                647 arch/sparc/kernel/of_device_64.c 	sd = &op->dev.archdata;
sd                648 arch/sparc/kernel/of_device_64.c 	sd->op = op;
sd                251 arch/sparc/kernel/pci.c static void pci_init_dev_archdata(struct dev_archdata *sd, void *iommu,
sd                256 arch/sparc/kernel/pci.c 	sd->iommu = iommu;
sd                257 arch/sparc/kernel/pci.c 	sd->stc = stc;
sd                258 arch/sparc/kernel/pci.c 	sd->host_controller = host_controller;
sd                259 arch/sparc/kernel/pci.c 	sd->op = op;
sd                260 arch/sparc/kernel/pci.c 	sd->numa_node = numa_node;
sd                267 arch/sparc/kernel/pci.c 	struct dev_archdata *sd;
sd                277 arch/sparc/kernel/pci.c 	sd = &dev->dev.archdata;
sd                278 arch/sparc/kernel/pci.c 	pci_init_dev_archdata(sd, pbm->iommu, &pbm->stc, pbm, op,
sd                280 arch/sparc/kernel/pci.c 	sd = &op->dev.archdata;
sd                281 arch/sparc/kernel/pci.c 	sd->iommu = pbm->iommu;
sd                282 arch/sparc/kernel/pci.c 	sd->stc = &pbm->stc;
sd                283 arch/sparc/kernel/pci.c 	sd->numa_node = pbm->numa_node;
sd                344 arch/sparc/kernel/pci.c 		dev->irq = sd->op->archdata.irqs[0];
sd                352 arch/sparc/kernel/pci.c 	pci_parse_of_addrs(sd->op, node, dev);
sd                 93 arch/x86/entry/common.c 		struct seccomp_data sd;
sd                 95 arch/x86/entry/common.c 		sd.arch = arch;
sd                 96 arch/x86/entry/common.c 		sd.nr = regs->orig_ax;
sd                 97 arch/x86/entry/common.c 		sd.instruction_pointer = regs->ip;
sd                100 arch/x86/entry/common.c 			sd.args[0] = regs->di;
sd                101 arch/x86/entry/common.c 			sd.args[1] = regs->si;
sd                102 arch/x86/entry/common.c 			sd.args[2] = regs->dx;
sd                103 arch/x86/entry/common.c 			sd.args[3] = regs->r10;
sd                104 arch/x86/entry/common.c 			sd.args[4] = regs->r8;
sd                105 arch/x86/entry/common.c 			sd.args[5] = regs->r9;
sd                109 arch/x86/entry/common.c 			sd.args[0] = regs->bx;
sd                110 arch/x86/entry/common.c 			sd.args[1] = regs->cx;
sd                111 arch/x86/entry/common.c 			sd.args[2] = regs->dx;
sd                112 arch/x86/entry/common.c 			sd.args[3] = regs->si;
sd                113 arch/x86/entry/common.c 			sd.args[4] = regs->di;
sd                114 arch/x86/entry/common.c 			sd.args[5] = regs->bp;
sd                117 arch/x86/entry/common.c 		ret = __secure_computing(&sd);
sd                 43 arch/x86/include/asm/pci.h 	struct pci_sysdata *sd = bus->sysdata;
sd                 45 arch/x86/include/asm/pci.h 	return sd->domain;
sd                 57 arch/x86/include/asm/pci.h 	struct pci_sysdata *sd = bus->sysdata;
sd                 59 arch/x86/include/asm/pci.h 	return sd->fwnode;
sd                 68 arch/x86/include/asm/pci.h 	struct pci_sysdata *sd = bus->sysdata;
sd                 70 arch/x86/include/asm/pci.h 	return sd->vmd_domain;
sd                134 arch/x86/include/asm/pci.h 	const struct pci_sysdata *sd = bus->sysdata;
sd                136 arch/x86/include/asm/pci.h 	return sd->node;
sd                 10 arch/x86/include/asm/pci_64.h 	struct pci_sysdata *sd = bus->sysdata;
sd                 11 arch/x86/include/asm/pci_64.h 	return sd->iommu;
sd                 16 arch/x86/include/asm/pci_64.h 	struct pci_sysdata *sd = bus->sysdata;
sd                 17 arch/x86/include/asm/pci_64.h 	sd->iommu = val;
sd                141 arch/x86/kernel/kexec-bzimage64.c 	struct setup_data *sd = (void *)params + efi_setup_data_offset;
sd                142 arch/x86/kernel/kexec-bzimage64.c 	struct efi_setup_data *esd = (void *)sd + sizeof(struct setup_data);
sd                149 arch/x86/kernel/kexec-bzimage64.c 	sd->type = SETUP_EFI;
sd                150 arch/x86/kernel/kexec-bzimage64.c 	sd->len = sizeof(struct efi_setup_data);
sd                154 arch/x86/kernel/kexec-bzimage64.c 	sd->next = params->hdr.setup_data;
sd                912 arch/x86/kvm/svm.c 	struct svm_cpu_data *sd;
sd                925 arch/x86/kvm/svm.c 	sd = per_cpu(svm_data, me);
sd                926 arch/x86/kvm/svm.c 	if (!sd) {
sd                931 arch/x86/kvm/svm.c 	sd->asid_generation = 1;
sd                932 arch/x86/kvm/svm.c 	sd->max_asid = cpuid_ebx(SVM_CPUID_FUNC) - 1;
sd                933 arch/x86/kvm/svm.c 	sd->next_asid = sd->max_asid + 1;
sd                934 arch/x86/kvm/svm.c 	sd->min_asid = max_sev_asid + 1;
sd                937 arch/x86/kvm/svm.c 	sd->tss_desc = (struct kvm_ldttss_desc *)(gdt + GDT_ENTRY_TSS);
sd                941 arch/x86/kvm/svm.c 	wrmsrl(MSR_VM_HSAVE_PA, page_to_pfn(sd->save_area) << PAGE_SHIFT);
sd                987 arch/x86/kvm/svm.c 	struct svm_cpu_data *sd = per_cpu(svm_data, raw_smp_processor_id());
sd                989 arch/x86/kvm/svm.c 	if (!sd)
sd                993 arch/x86/kvm/svm.c 	kfree(sd->sev_vmcbs);
sd                994 arch/x86/kvm/svm.c 	__free_page(sd->save_area);
sd                995 arch/x86/kvm/svm.c 	kfree(sd);
sd               1000 arch/x86/kvm/svm.c 	struct svm_cpu_data *sd;
sd               1002 arch/x86/kvm/svm.c 	sd = kzalloc(sizeof(struct svm_cpu_data), GFP_KERNEL);
sd               1003 arch/x86/kvm/svm.c 	if (!sd)
sd               1005 arch/x86/kvm/svm.c 	sd->cpu = cpu;
sd               1006 arch/x86/kvm/svm.c 	sd->save_area = alloc_page(GFP_KERNEL);
sd               1007 arch/x86/kvm/svm.c 	if (!sd->save_area)
sd               1011 arch/x86/kvm/svm.c 		sd->sev_vmcbs = kmalloc_array(max_sev_asid + 1,
sd               1014 arch/x86/kvm/svm.c 		if (!sd->sev_vmcbs)
sd               1018 arch/x86/kvm/svm.c 	per_cpu(svm_data, cpu) = sd;
sd               1023 arch/x86/kvm/svm.c 	__free_page(sd->save_area);
sd               1025 arch/x86/kvm/svm.c 	kfree(sd);
sd               1776 arch/x86/kvm/svm.c 	struct svm_cpu_data *sd;
sd               1783 arch/x86/kvm/svm.c 		sd = per_cpu(svm_data, cpu);
sd               1784 arch/x86/kvm/svm.c 		sd->sev_vmcbs[pos] = NULL;
sd               2315 arch/x86/kvm/svm.c 	struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
sd               2344 arch/x86/kvm/svm.c 	if (sd->current_vmcb != svm->vmcb) {
sd               2345 arch/x86/kvm/svm.c 		sd->current_vmcb = svm->vmcb;
sd               2697 arch/x86/kvm/svm.c static void new_asid(struct vcpu_svm *svm, struct svm_cpu_data *sd)
sd               2699 arch/x86/kvm/svm.c 	if (sd->next_asid > sd->max_asid) {
sd               2700 arch/x86/kvm/svm.c 		++sd->asid_generation;
sd               2701 arch/x86/kvm/svm.c 		sd->next_asid = sd->min_asid;
sd               2705 arch/x86/kvm/svm.c 	svm->asid_generation = sd->asid_generation;
sd               2706 arch/x86/kvm/svm.c 	svm->vmcb->control.asid = sd->next_asid++;
sd               5053 arch/x86/kvm/svm.c 	struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
sd               5054 arch/x86/kvm/svm.c 	sd->tss_desc->type = 9; /* available 32/64-bit TSS */
sd               5060 arch/x86/kvm/svm.c 	struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
sd               5072 arch/x86/kvm/svm.c 	if (sd->sev_vmcbs[asid] == svm->vmcb &&
sd               5077 arch/x86/kvm/svm.c 	sd->sev_vmcbs[asid] = svm->vmcb;
sd               5086 arch/x86/kvm/svm.c 	struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
sd               5092 arch/x86/kvm/svm.c 	if (svm->asid_generation != sd->asid_generation)
sd               5093 arch/x86/kvm/svm.c 		new_asid(svm, sd);
sd                 14 arch/x86/pci/acpi.c 	struct pci_sysdata sd;
sd                200 arch/x86/pci/acpi.c 	seg = info->sd.domain;
sd                229 arch/x86/pci/acpi.c 		pci_mmconfig_delete(info->sd.domain,
sd                349 arch/x86/pci/acpi.c 		struct pci_sysdata sd = {
sd                355 arch/x86/pci/acpi.c 		memcpy(bus->sysdata, &sd, sizeof(sd));
sd                365 arch/x86/pci/acpi.c 			info->sd.domain = domain;
sd                366 arch/x86/pci/acpi.c 			info->sd.node = node;
sd                367 arch/x86/pci/acpi.c 			info->sd.companion = root->device;
sd                369 arch/x86/pci/acpi.c 						   &info->common, &info->sd);
sd                394 arch/x86/pci/acpi.c 		struct pci_sysdata *sd = bridge->bus->sysdata;
sd                395 arch/x86/pci/acpi.c 		ACPI_COMPANION_SET(&bridge->dev, sd->companion);
sd                460 arch/x86/pci/common.c 	struct pci_sysdata *sd;
sd                463 arch/x86/pci/common.c 	sd = kzalloc(sizeof(*sd), GFP_KERNEL);
sd                464 arch/x86/pci/common.c 	if (!sd) {
sd                468 arch/x86/pci/common.c 	sd->node = x86_pci_root_bus_node(busnum);
sd                471 arch/x86/pci/common.c 	bus = pci_scan_root_bus(NULL, busnum, &pci_root_ops, sd, &resources);
sd                474 arch/x86/pci/common.c 		kfree(sd);
sd                825 block/bfq-iosched.c 		struct bfq_sched_data *sd = entity->my_sched_data;
sd                827 block/bfq-iosched.c 		if (sd->next_in_service || sd->in_service_entity) {
sd                 44 block/bfq-wf2q.c static struct bfq_entity *bfq_lookup_next_entity(struct bfq_sched_data *sd,
sd                 74 block/bfq-wf2q.c static bool bfq_update_next_in_service(struct bfq_sched_data *sd,
sd                 78 block/bfq-wf2q.c 	struct bfq_entity *next_in_service = sd->next_in_service;
sd                 93 block/bfq-wf2q.c 	if (new_entity && new_entity != sd->next_in_service) {
sd                111 block/bfq-wf2q.c 				sd->service_tree + new_entity_class_idx;
sd                128 block/bfq-wf2q.c 		next_in_service = bfq_lookup_next_entity(sd, expiration);
sd                134 block/bfq-wf2q.c 		parent_sched_may_change = !sd->next_in_service ||
sd                138 block/bfq-wf2q.c 	sd->next_in_service = next_in_service;
sd                481 block/bfq-wf2q.c 	struct bfq_sched_data *sd = NULL;
sd                496 block/bfq-wf2q.c 	sd = entity->sched_data;
sd                497 block/bfq-wf2q.c 	bfqg = container_of(sd, struct bfq_group, sched_data);
sd                585 block/bfq-wf2q.c 	struct bfq_sched_data *sd = NULL;
sd                597 block/bfq-wf2q.c 	sd = entity->sched_data;
sd                598 block/bfq-wf2q.c 	bfqg = container_of(sd, struct bfq_group, sched_data);
sd                741 block/bfq-wf2q.c 		struct bfq_sched_data *sd;
sd                749 block/bfq-wf2q.c 			sd = entity->my_sched_data;
sd                750 block/bfq-wf2q.c 			bfqg = container_of(sd, struct bfq_group, sched_data);
sd               1049 block/bfq-wf2q.c 	struct bfq_sched_data *sd = entity->sched_data;
sd               1052 block/bfq-wf2q.c 	if (entity == sd->in_service_entity) {
sd               1114 block/bfq-wf2q.c 					  struct bfq_sched_data *sd,
sd               1119 block/bfq-wf2q.c 	if (sd->in_service_entity == entity || entity->tree == &st->active)
sd               1151 block/bfq-wf2q.c 	struct bfq_sched_data *sd;
sd               1154 block/bfq-wf2q.c 		sd = entity->sched_data;
sd               1155 block/bfq-wf2q.c 		__bfq_activate_requeue_entity(entity, sd, non_blocking_wait_rq);
sd               1157 block/bfq-wf2q.c 		if (!bfq_update_next_in_service(sd, entity, expiration) &&
sd               1175 block/bfq-wf2q.c 	struct bfq_sched_data *sd = entity->sched_data;
sd               1189 block/bfq-wf2q.c 	is_in_service = entity == sd->in_service_entity;
sd               1194 block/bfq-wf2q.c 		sd->in_service_entity = NULL;
sd               1227 block/bfq-wf2q.c 	struct bfq_sched_data *sd;
sd               1231 block/bfq-wf2q.c 		sd = entity->sched_data;
sd               1244 block/bfq-wf2q.c 		if (sd->next_in_service == entity)
sd               1250 block/bfq-wf2q.c 			bfq_update_next_in_service(sd, NULL, expiration);
sd               1252 block/bfq-wf2q.c 		if (sd->next_in_service || sd->in_service_entity) {
sd               1308 block/bfq-wf2q.c 		sd = entity->sched_data;
sd               1309 block/bfq-wf2q.c 		if (!bfq_update_next_in_service(sd, entity, expiration) &&
sd               1450 block/bfq-wf2q.c static struct bfq_entity *bfq_lookup_next_entity(struct bfq_sched_data *sd,
sd               1453 block/bfq-wf2q.c 	struct bfq_service_tree *st = sd->service_tree;
sd               1465 block/bfq-wf2q.c 	if (time_is_before_jiffies(sd->bfq_class_idle_last_service +
sd               1470 block/bfq-wf2q.c 		sd->bfq_class_idle_last_service = jiffies;
sd               1494 block/bfq-wf2q.c 						  sd->in_service_entity &&
sd               1509 block/bfq-wf2q.c 	struct bfq_sched_data *sd = &bfqd->root_group->sched_data;
sd               1511 block/bfq-wf2q.c 	return sd->next_in_service != sd->in_service_entity;
sd               1520 block/bfq-wf2q.c 	struct bfq_sched_data *sd;
sd               1531 block/bfq-wf2q.c 	sd = &bfqd->root_group->sched_data;
sd               1532 block/bfq-wf2q.c 	for (; sd ; sd = entity->my_sched_data) {
sd               1558 block/bfq-wf2q.c 		entity = sd->next_in_service;
sd               1559 block/bfq-wf2q.c 		sd->in_service_entity = entity;
sd               1600 block/bfq-wf2q.c 		struct bfq_sched_data *sd = entity->sched_data;
sd               1602 block/bfq-wf2q.c 		if (!bfq_update_next_in_service(sd, NULL, false))
sd                398 block/bsg.c    	if (q->kobj.sd)
sd                445 block/bsg.c    	if (q->kobj.sd) {
sd                487 crypto/twofish_common.c    ctx->s[3][i] = mds[3][q1[(b) ^ sd] ^ sh]
sd                495 crypto/twofish_common.c    ctx->s[3][i] = mds[3][q1[q1[(a) ^ sd] ^ sh] ^ sl];
sd                503 crypto/twofish_common.c    ctx->s[3][i] = mds[3][q1[q1[q0[(b) ^ sd] ^ sh] ^ sl] ^ sp];
sd                579 crypto/twofish_common.c 	u8 sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0, sg = 0, sh = 0;
sd                596 crypto/twofish_common.c 	CALC_S (sa, sb, sc, sd, 0, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */
sd                597 crypto/twofish_common.c 	CALC_S (sa, sb, sc, sd, 1, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */
sd                598 crypto/twofish_common.c 	CALC_S (sa, sb, sc, sd, 2, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */
sd                599 crypto/twofish_common.c 	CALC_S (sa, sb, sc, sd, 3, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */
sd                600 crypto/twofish_common.c 	CALC_S (sa, sb, sc, sd, 4, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */
sd                601 crypto/twofish_common.c 	CALC_S (sa, sb, sc, sd, 5, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */
sd                602 crypto/twofish_common.c 	CALC_S (sa, sb, sc, sd, 6, 0xED, 0x37, 0x4F, 0xE0); /* DB 68 3D 9E */
sd                603 crypto/twofish_common.c 	CALC_S (sa, sb, sc, sd, 7, 0xE0, 0xD0, 0x8C, 0x17); /* 9E E5 19 03 */
sd               2122 drivers/acpi/nfit/core.c 		nfit_kernfs = sysfs_get_dirent(nvdimm_kobj(nvdimm)->sd, "nfit");
sd               3351 drivers/acpi/nfit/core.c 	nfit = sysfs_get_dirent(bus_dev->kobj.sd, "nfit");
sd                 56 drivers/base/devcoredump.c 	if (devcd->failing_dev->kobj.sd)
sd                139 drivers/base/power/domain_governor.c 		struct generic_pm_domain *sd = link->slave;
sd                140 drivers/base/power/domain_governor.c 		s64 sd_max_off_ns = sd->max_off_time_ns;
sd                694 drivers/char/mem.c 			struct splice_desc *sd)
sd                696 drivers/char/mem.c 	return sd->len;
sd                865 drivers/char/virtio_console.c 			struct splice_desc *sd)
sd                867 drivers/char/virtio_console.c 	struct sg_list *sgl = sd->u.data;
sd                879 drivers/char/virtio_console.c 		len = min(buf->len, sd->len);
sd                889 drivers/char/virtio_console.c 		offset = sd->pos & ~PAGE_MASK;
sd                891 drivers/char/virtio_console.c 		len = sd->len;
sd                916 drivers/char/virtio_console.c 	struct splice_desc sd = {
sd                957 drivers/char/virtio_console.c 	ret = __splice_from_pipe(pipe, &sd, pipe_to_sg);
sd                274 drivers/clk/ti/dpll3xxx.c 	unsigned long clkinp, sd; /* watch out for overflow */
sd                285 drivers/clk/ti/dpll3xxx.c 	sd = (clkinp * m) / (250 * n);
sd                286 drivers/clk/ti/dpll3xxx.c 	mod2 = sd % 10;
sd                287 drivers/clk/ti/dpll3xxx.c 	sd /= 10;
sd                290 drivers/clk/ti/dpll3xxx.c 		sd++;
sd                291 drivers/clk/ti/dpll3xxx.c 	*sd_div = sd;
sd                837 drivers/cpufreq/powernv-cpufreq.c 	kn = kernfs_find_and_get(policy->kobj.sd, throttle_attr_grp.name);
sd                143 drivers/cpufreq/sa1110-cpufreq.c sdram_calculate_timing(struct sdram_info *sd, u_int cpu_khz,
sd                162 drivers/cpufreq/sa1110-cpufreq.c 	sd->mdcnfg = MDCNFG & 0x007f007f;
sd                171 drivers/cpufreq/sa1110-cpufreq.c 	sd->mdcnfg |= trp << 8;
sd                172 drivers/cpufreq/sa1110-cpufreq.c 	sd->mdcnfg |= trp << 24;
sd                173 drivers/cpufreq/sa1110-cpufreq.c 	sd->mdcnfg |= sdram->cas_latency << 12;
sd                174 drivers/cpufreq/sa1110-cpufreq.c 	sd->mdcnfg |= sdram->cas_latency << 28;
sd                175 drivers/cpufreq/sa1110-cpufreq.c 	sd->mdcnfg |= twr << 14;
sd                176 drivers/cpufreq/sa1110-cpufreq.c 	sd->mdcnfg |= twr << 30;
sd                178 drivers/cpufreq/sa1110-cpufreq.c 	sd->mdrefr = MDREFR & 0xffbffff0;
sd                179 drivers/cpufreq/sa1110-cpufreq.c 	sd->mdrefr |= 7;
sd                182 drivers/cpufreq/sa1110-cpufreq.c 		sd->mdrefr |= MDREFR_K1DB2;
sd                185 drivers/cpufreq/sa1110-cpufreq.c 	set_mdcas(sd->mdcas, sd_khz >= 62000,
sd                190 drivers/cpufreq/sa1110-cpufreq.c 		sd->mdcnfg, sd->mdrefr, sd->mdcas[0], sd->mdcas[1],
sd                191 drivers/cpufreq/sa1110-cpufreq.c 		sd->mdcas[2]);
sd                232 drivers/cpufreq/sa1110-cpufreq.c 	struct sdram_info sd;
sd                236 drivers/cpufreq/sa1110-cpufreq.c 	sdram_calculate_timing(&sd, sa11x0_freq_table[ppcr].frequency, sdram);
sd                245 drivers/cpufreq/sa1110-cpufreq.c 		sd.mdrefr |= MDREFR_K1DB2;
sd                246 drivers/cpufreq/sa1110-cpufreq.c 		sd.mdcas[0] = 0xaaaaaa7f;
sd                248 drivers/cpufreq/sa1110-cpufreq.c 		sd.mdrefr &= ~MDREFR_K1DB2;
sd                249 drivers/cpufreq/sa1110-cpufreq.c 		sd.mdcas[0] = 0xaaaaaa9f;
sd                251 drivers/cpufreq/sa1110-cpufreq.c 	sd.mdcas[1] = 0xaaaaaaaa;
sd                252 drivers/cpufreq/sa1110-cpufreq.c 	sd.mdcas[2] = 0xaaaaaaaa;
sd                291 drivers/cpufreq/sa1110-cpufreq.c 		: "r" (&MDCNFG), "r" (&PPCR), "0" (sd.mdcnfg),
sd                292 drivers/cpufreq/sa1110-cpufreq.c 		  "r" (sd.mdrefr), "r" (sd.mdcas[0]),
sd                293 drivers/cpufreq/sa1110-cpufreq.c 		  "r" (sd.mdcas[1]), "r" (sd.mdcas[2]), "r" (ppcr));
sd                884 drivers/crypto/amcc/crypto4xx_core.c 		struct ce_sd *sd = NULL;
sd                890 drivers/crypto/amcc/crypto4xx_core.c 		sd = crypto4xx_get_sdp(dev, &sd_dma, sd_idx);
sd                893 drivers/crypto/amcc/crypto4xx_core.c 		sd->ctl.done = 0;
sd                894 drivers/crypto/amcc/crypto4xx_core.c 		sd->ctl.rdy = 1;
sd                902 drivers/crypto/amcc/crypto4xx_core.c 			sd = crypto4xx_get_sdp(dev, &sd_dma, sd_idx);
sd                904 drivers/crypto/amcc/crypto4xx_core.c 			sd->ctl.done = 0;
sd                905 drivers/crypto/amcc/crypto4xx_core.c 			sd->ctl.rdy = 1;
sd                107 drivers/devfreq/governor_userspace.c 	if (devfreq->dev.kobj.sd)
sd                869 drivers/extcon/extcon.c 	struct extcon_dev *sd;
sd                875 drivers/extcon/extcon.c 	list_for_each_entry(sd, &extcon_dev_list, entry) {
sd                876 drivers/extcon/extcon.c 		if (!strcmp(sd->name, extcon_name))
sd                879 drivers/extcon/extcon.c 	sd = NULL;
sd                882 drivers/extcon/extcon.c 	return sd;
sd                 48 drivers/gpio/gpio-sodaville.c 	struct sdv_gpio_chip_data *sd = gc->private;
sd                 53 drivers/gpio/gpio-sodaville.c 		type_reg = sd->gpio_pub_base + GPIT1R0;
sd                 55 drivers/gpio/gpio-sodaville.c 		type_reg = sd->gpio_pub_base + GPIT1R1;
sd                 78 drivers/gpio/gpio-sodaville.c 	struct sdv_gpio_chip_data *sd = data;
sd                 79 drivers/gpio/gpio-sodaville.c 	unsigned long irq_stat = readl(sd->gpio_pub_base + GPSTR);
sd                 82 drivers/gpio/gpio-sodaville.c 	irq_stat &= readl(sd->gpio_pub_base + GPIO_INT);
sd                 87 drivers/gpio/gpio-sodaville.c 		generic_handle_irq(irq_find_mapping(sd->id, irq_bit));
sd                125 drivers/gpio/gpio-sodaville.c static int sdv_register_irqsupport(struct sdv_gpio_chip_data *sd,
sd                131 drivers/gpio/gpio-sodaville.c 	sd->irq_base = devm_irq_alloc_descs(&pdev->dev, -1, 0,
sd                133 drivers/gpio/gpio-sodaville.c 	if (sd->irq_base < 0)
sd                134 drivers/gpio/gpio-sodaville.c 		return sd->irq_base;
sd                137 drivers/gpio/gpio-sodaville.c 	writel(0, sd->gpio_pub_base + GPIO_INT);
sd                138 drivers/gpio/gpio-sodaville.c 	writel((1 << 11) - 1, sd->gpio_pub_base + GPSTR);
sd                142 drivers/gpio/gpio-sodaville.c 			       "sdv_gpio", sd);
sd                151 drivers/gpio/gpio-sodaville.c 	sd->gc = devm_irq_alloc_generic_chip(&pdev->dev, "sdv-gpio", 1,
sd                152 drivers/gpio/gpio-sodaville.c 					     sd->irq_base,
sd                153 drivers/gpio/gpio-sodaville.c 					     sd->gpio_pub_base,
sd                155 drivers/gpio/gpio-sodaville.c 	if (!sd->gc)
sd                158 drivers/gpio/gpio-sodaville.c 	sd->gc->private = sd;
sd                159 drivers/gpio/gpio-sodaville.c 	ct = sd->gc->chip_types;
sd                168 drivers/gpio/gpio-sodaville.c 	irq_setup_generic_chip(sd->gc, IRQ_MSK(SDV_NUM_PUB_GPIOS),
sd                172 drivers/gpio/gpio-sodaville.c 	sd->id = irq_domain_add_legacy(pdev->dev.of_node, SDV_NUM_PUB_GPIOS,
sd                173 drivers/gpio/gpio-sodaville.c 				sd->irq_base, 0, &irq_domain_sdv_ops, sd);
sd                174 drivers/gpio/gpio-sodaville.c 	if (!sd->id)
sd                183 drivers/gpio/gpio-sodaville.c 	struct sdv_gpio_chip_data *sd;
sd                187 drivers/gpio/gpio-sodaville.c 	sd = devm_kzalloc(&pdev->dev, sizeof(*sd), GFP_KERNEL);
sd                188 drivers/gpio/gpio-sodaville.c 	if (!sd)
sd                203 drivers/gpio/gpio-sodaville.c 	sd->gpio_pub_base = pcim_iomap_table(pdev)[GPIO_BAR];
sd                207 drivers/gpio/gpio-sodaville.c 		writel(mux_val, sd->gpio_pub_base + GPMUXCTL);
sd                209 drivers/gpio/gpio-sodaville.c 	ret = bgpio_init(&sd->chip, &pdev->dev, 4,
sd                210 drivers/gpio/gpio-sodaville.c 			sd->gpio_pub_base + GPINR, sd->gpio_pub_base + GPOUTR,
sd                211 drivers/gpio/gpio-sodaville.c 			NULL, sd->gpio_pub_base + GPOER, NULL, 0);
sd                215 drivers/gpio/gpio-sodaville.c 	sd->chip.ngpio = SDV_NUM_PUB_GPIOS;
sd                217 drivers/gpio/gpio-sodaville.c 	ret = devm_gpiochip_add_data(&pdev->dev, &sd->chip, sd);
sd                223 drivers/gpio/gpio-sodaville.c 	ret = sdv_register_irqsupport(sd, pdev);
sd                227 drivers/gpio/gpio-sodaville.c 	pci_set_drvdata(pdev, sd);
sd                175 drivers/gpio/gpiolib-sysfs.c 	data->value_kn = sysfs_get_dirent(dev->kobj.sd, "value");
sd                 36 drivers/gpu/drm/amd/amdgpu/amdgpu_display.h #define amdgpu_display_add_connector(adev, ci, sd, ct, ib, coi, h, r) (adev)->mode_info.funcs->add_connector((adev), (ci), (sd), (ct), (ib), (coi), (h), (r))
sd               1752 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		struct scaler_data *sd = &prev_odm_pipe->plane_res.scl_data;
sd               1756 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		sd->h_active /= 2;
sd               1759 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		if (sd->recout.x + 16 >= sd->h_active)
sd               1761 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		new_width = sd->h_active - sd->recout.x;
sd               1762 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		sd->viewport.width -= dc_fixpt_floor(dc_fixpt_mul_int(
sd               1763 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 				sd->ratios.horz, sd->recout.width - new_width));
sd               1764 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		sd->viewport_c.width -= dc_fixpt_floor(dc_fixpt_mul_int(
sd               1765 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 				sd->ratios.horz_c, sd->recout.width - new_width));
sd               1766 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		sd->recout.width = new_width;
sd               1769 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		sd = &next_odm_pipe->plane_res.scl_data;
sd               1771 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		sd->h_active /= 2;
sd               1775 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		new_width = sd->recout.width + sd->recout.x - sd->h_active;
sd               1776 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		sd->viewport.width -= dc_fixpt_floor(dc_fixpt_mul_int(
sd               1777 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 				sd->ratios.horz, sd->recout.width - new_width));
sd               1778 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		sd->viewport_c.width -= dc_fixpt_floor(dc_fixpt_mul_int(
sd               1779 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 				sd->ratios.horz_c, sd->recout.width - new_width));
sd               1780 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		sd->recout.width = new_width;
sd               1781 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		sd->viewport.x += dc_fixpt_floor(dc_fixpt_mul_int(
sd               1782 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 				sd->ratios.horz, sd->h_active - sd->recout.x));
sd               1783 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		sd->viewport_c.x += dc_fixpt_floor(dc_fixpt_mul_int(
sd               1784 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 				sd->ratios.horz_c, sd->h_active - sd->recout.x));
sd               1785 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c 		sd->recout.x = 0;
sd                140 drivers/gpu/drm/omapdrm/dss/dss.h 	u16 sd;
sd                272 drivers/gpu/drm/omapdrm/dss/pll.c 	unsigned int n, m, mf, m2, sd;
sd                304 drivers/gpu/drm/omapdrm/dss/pll.c 	sd = DIV_ROUND_UP(fint * m, 250000000);
sd                307 drivers/gpu/drm/omapdrm/dss/pll.c 		n, m, mf, m2, sd);
sd                314 drivers/gpu/drm/omapdrm/dss/pll.c 	cinfo->sd = sd;
sd                545 drivers/gpu/drm/omapdrm/dss/pll.c 	l = FLD_MOD(l, cinfo->sd, 17, 10);	/* PLL_REGSD */
sd               1581 drivers/gpu/drm/radeon/radeon.h 	unsigned sd;
sd               1140 drivers/gpu/drm/radeon/radeon_pm.c 		enable |= rdev->pm.dpm.sd > 0;
sd               1151 drivers/gpu/drm/radeon/radeon_pm.c 			if ((rdev->pm.dpm.sd == 1) && (rdev->pm.dpm.hd == 0))
sd               1153 drivers/gpu/drm/radeon/radeon_pm.c 			else if ((rdev->pm.dpm.sd == 2) && (rdev->pm.dpm.hd == 0))
sd               1155 drivers/gpu/drm/radeon/radeon_pm.c 			else if ((rdev->pm.dpm.sd == 0) && (rdev->pm.dpm.hd == 1))
sd               1157 drivers/gpu/drm/radeon/radeon_pm.c 			else if ((rdev->pm.dpm.sd == 0) && (rdev->pm.dpm.hd == 2))
sd                852 drivers/gpu/drm/radeon/radeon_uvd.c 				     unsigned *sd, unsigned *hd)
sd                856 drivers/gpu/drm/radeon/radeon_uvd.c 	*sd = 0;
sd                866 drivers/gpu/drm/radeon/radeon_uvd.c 			++(*sd);
sd                877 drivers/gpu/drm/radeon/radeon_uvd.c 			radeon_uvd_count_handles(rdev, &rdev->pm.dpm.sd,
sd                897 drivers/gpu/drm/radeon/radeon_uvd.c 		unsigned hd = 0, sd = 0;
sd                898 drivers/gpu/drm/radeon/radeon_uvd.c 		radeon_uvd_count_handles(rdev, &sd, &hd);
sd                899 drivers/gpu/drm/radeon/radeon_uvd.c 		if ((rdev->pm.dpm.sd != sd) ||
sd                901 drivers/gpu/drm/radeon/radeon_uvd.c 			rdev->pm.dpm.sd = sd;
sd                362 drivers/gpu/host1x/bus.c 	struct host1x_subdev *subdev, *sd;
sd                368 drivers/gpu/host1x/bus.c 	list_for_each_entry_safe(subdev, sd, &device->active, list) {
sd                389 drivers/gpu/host1x/bus.c 	list_for_each_entry_safe(subdev, sd, &device->subdevs, list)
sd                602 drivers/hid/hid-sensor-hub.c 	struct sensor_hub_data *sd;
sd                610 drivers/hid/hid-sensor-hub.c 	sd = devm_kzalloc(&hdev->dev, sizeof(*sd), GFP_KERNEL);
sd                611 drivers/hid/hid-sensor-hub.c 	if (!sd) {
sd                616 drivers/hid/hid-sensor-hub.c 	hid_set_drvdata(hdev, sd);
sd                617 drivers/hid/hid-sensor-hub.c 	sd->quirks = id->driver_data;
sd                619 drivers/hid/hid-sensor-hub.c 	spin_lock_init(&sd->lock);
sd                620 drivers/hid/hid-sensor-hub.c 	spin_lock_init(&sd->dyn_callback_lock);
sd                621 drivers/hid/hid-sensor-hub.c 	mutex_init(&sd->mutex);
sd                634 drivers/hid/hid-sensor-hub.c 	INIT_LIST_HEAD(&sd->dyn_callback_list);
sd                635 drivers/hid/hid-sensor-hub.c 	sd->hid_sensor_client_cnt = 0;
sd                643 drivers/hid/hid-sensor-hub.c 	sd->hid_sensor_hub_client_devs = devm_kcalloc(&hdev->dev,
sd                647 drivers/hid/hid-sensor-hub.c 	if (sd->hid_sensor_hub_client_devs == NULL) {
sd                690 drivers/hid/hid-sensor-hub.c 			sd->hid_sensor_hub_client_devs[
sd                691 drivers/hid/hid-sensor-hub.c 				sd->hid_sensor_client_cnt].name = name;
sd                692 drivers/hid/hid-sensor-hub.c 			sd->hid_sensor_hub_client_devs[
sd                693 drivers/hid/hid-sensor-hub.c 				sd->hid_sensor_client_cnt].platform_data =
sd                695 drivers/hid/hid-sensor-hub.c 			sd->hid_sensor_hub_client_devs[
sd                696 drivers/hid/hid-sensor-hub.c 				sd->hid_sensor_client_cnt].pdata_size =
sd                700 drivers/hid/hid-sensor-hub.c 			sd->hid_sensor_client_cnt++;
sd                714 drivers/hid/hid-sensor-hub.c 			sd->hid_sensor_hub_client_devs,
sd                715 drivers/hid/hid-sensor-hub.c 			sd->hid_sensor_client_cnt);
sd                125 drivers/iio/adc/ad7124.c 	struct ad_sigma_delta sd;
sd                188 drivers/iio/adc/ad7124.c 	ret = ad_sd_read_reg(&st->sd, addr, bytes, &readval);
sd                195 drivers/iio/adc/ad7124.c 	return ad_sd_write_reg(&st->sd, addr, bytes, readval);
sd                198 drivers/iio/adc/ad7124.c static int ad7124_set_mode(struct ad_sigma_delta *sd,
sd                201 drivers/iio/adc/ad7124.c 	struct ad7124_state *st = container_of(sd, struct ad7124_state, sd);
sd                206 drivers/iio/adc/ad7124.c 	return ad_sd_write_reg(&st->sd, AD7124_ADC_CONTROL, 2, st->adc_control);
sd                209 drivers/iio/adc/ad7124.c static int ad7124_set_channel(struct ad_sigma_delta *sd, unsigned int channel)
sd                211 drivers/iio/adc/ad7124.c 	struct ad7124_state *st = container_of(sd, struct ad7124_state, sd);
sd                217 drivers/iio/adc/ad7124.c 	return ad_sd_write_reg(&st->sd, AD7124_CHANNEL(channel), 2, val);
sd                296 drivers/iio/adc/ad7124.c 		ret = ad_sd_write_reg(&st->sd,
sd                385 drivers/iio/adc/ad7124.c 	ret = ad_sd_reset(&st->sd, 64);
sd                391 drivers/iio/adc/ad7124.c 		ret = ad_sd_read_reg(&st->sd, AD7124_STATUS, 1, &readval);
sd                402 drivers/iio/adc/ad7124.c 	dev_err(&st->sd.spi->dev, "Soft reset failed\n");
sd                417 drivers/iio/adc/ad7124.c 			dev_err(&st->sd.spi->dev,
sd                431 drivers/iio/adc/ad7124.c 		return ad_sd_write_reg(&st->sd, AD7124_ADC_CONTROL,
sd                434 drivers/iio/adc/ad7124.c 		dev_err(&st->sd.spi->dev, "Invalid reference %d\n", refsel);
sd                533 drivers/iio/adc/ad7124.c 	ret = ad_sd_write_reg(&st->sd, AD7124_ADC_CONTROL, 2, st->adc_control);
sd                539 drivers/iio/adc/ad7124.c 		ret = ad_sd_write_reg(&st->sd, AD7124_CHANNEL(i), 2, val);
sd                553 drivers/iio/adc/ad7124.c 		ret = ad_sd_write_reg(&st->sd, AD7124_CONFIG(i), 2, val);
sd                583 drivers/iio/adc/ad7124.c 	ad_sd_init(&st->sd, indio_dev, spi, &ad7124_sigma_delta_info);
sd                 69 drivers/iio/adc/ad7780.c 	struct ad_sigma_delta sd;
sd                 79 drivers/iio/adc/ad7780.c static struct ad7780_state *ad_sigma_delta_to_ad7780(struct ad_sigma_delta *sd)
sd                 81 drivers/iio/adc/ad7780.c 	return container_of(sd, struct ad7780_state, sd);
sd                296 drivers/iio/adc/ad7780.c 	ad_sd_init(&st->sd, indio_dev, spi, &ad7780_sigma_delta_info);
sd                147 drivers/iio/adc/ad7791.c 	struct ad_sigma_delta sd;
sd                166 drivers/iio/adc/ad7791.c static struct ad7791_state *ad_sigma_delta_to_ad7791(struct ad_sigma_delta *sd)
sd                168 drivers/iio/adc/ad7791.c 	return container_of(sd, struct ad7791_state, sd);
sd                171 drivers/iio/adc/ad7791.c static int ad7791_set_channel(struct ad_sigma_delta *sd, unsigned int channel)
sd                173 drivers/iio/adc/ad7791.c 	ad_sd_set_comm(sd, channel);
sd                178 drivers/iio/adc/ad7791.c static int ad7791_set_mode(struct ad_sigma_delta *sd,
sd                181 drivers/iio/adc/ad7791.c 	struct ad7791_state *st = ad_sigma_delta_to_ad7791(sd);
sd                199 drivers/iio/adc/ad7791.c 	return ad_sd_write_reg(sd, AD7791_REG_MODE, sizeof(st->mode), st->mode);
sd                288 drivers/iio/adc/ad7791.c 		ad_sd_write_reg(&st->sd, AD7791_REG_FILTER,
sd                344 drivers/iio/adc/ad7791.c 	return ad_sd_write_reg(&st->sd, AD7791_REG_MODE, sizeof(st->mode),
sd                375 drivers/iio/adc/ad7791.c 	ad_sd_init(&st->sd, indio_dev, spi, &ad7791_sigma_delta_info);
sd                161 drivers/iio/adc/ad7793.c 	struct ad_sigma_delta		sd;
sd                177 drivers/iio/adc/ad7793.c static struct ad7793_state *ad_sigma_delta_to_ad7793(struct ad_sigma_delta *sd)
sd                179 drivers/iio/adc/ad7793.c 	return container_of(sd, struct ad7793_state, sd);
sd                182 drivers/iio/adc/ad7793.c static int ad7793_set_channel(struct ad_sigma_delta *sd, unsigned int channel)
sd                184 drivers/iio/adc/ad7793.c 	struct ad7793_state *st = ad_sigma_delta_to_ad7793(sd);
sd                189 drivers/iio/adc/ad7793.c 	return ad_sd_write_reg(&st->sd, AD7793_REG_CONF, 2, st->conf);
sd                192 drivers/iio/adc/ad7793.c static int ad7793_set_mode(struct ad_sigma_delta *sd,
sd                195 drivers/iio/adc/ad7793.c 	struct ad7793_state *st = ad_sigma_delta_to_ad7793(sd);
sd                200 drivers/iio/adc/ad7793.c 	return ad_sd_write_reg(&st->sd, AD7793_REG_MODE, 2, st->mode);
sd                222 drivers/iio/adc/ad7793.c 	return ad_sd_calibrate_all(&st->sd, ad7793_calib_arr,
sd                268 drivers/iio/adc/ad7793.c 	ret = ad_sd_reset(&st->sd, 32);
sd                274 drivers/iio/adc/ad7793.c 	ret = ad_sd_read_reg(&st->sd, AD7793_REG_ID, 1, &id);
sd                281 drivers/iio/adc/ad7793.c 		dev_err(&st->sd.spi->dev, "device ID query failed\n");
sd                307 drivers/iio/adc/ad7793.c 	ret = ad7793_set_mode(&st->sd, AD_SD_MODE_IDLE);
sd                311 drivers/iio/adc/ad7793.c 	ret = ad7793_set_channel(&st->sd, 0);
sd                316 drivers/iio/adc/ad7793.c 		ret = ad_sd_write_reg(&st->sd, AD7793_REG_IO, 1,
sd                340 drivers/iio/adc/ad7793.c 	dev_err(&st->sd.spi->dev, "setup failed\n");
sd                491 drivers/iio/adc/ad7793.c 				ad_sd_write_reg(&st->sd, AD7793_REG_CONF,
sd                514 drivers/iio/adc/ad7793.c 		ad_sd_write_reg(&st->sd, AD7793_REG_MODE, sizeof(st->mode),
sd                727 drivers/iio/adc/ad7793.c 	ad_sd_init(&st->sd, indio_dev, spi, &ad7793_sigma_delta_info);
sd                269 drivers/iio/common/ssp_sensors/ssp_spi.c 	int idx, sd;
sd                276 drivers/iio/common/ssp_sensors/ssp_spi.c 			sd = dataframe[idx++];
sd                277 drivers/iio/common/ssp_sensors/ssp_spi.c 			if (sd < 0 || sd >= SSP_SENSOR_MAX) {
sd                279 drivers/iio/common/ssp_sensors/ssp_spi.c 					"Mcu data frame1 error %d\n", sd);
sd                283 drivers/iio/common/ssp_sensors/ssp_spi.c 			if (indio_devs[sd]) {
sd                284 drivers/iio/common/ssp_sensors/ssp_spi.c 				spd = iio_priv(indio_devs[sd]);
sd                286 drivers/iio/common/ssp_sensors/ssp_spi.c 					spd->process_data(indio_devs[sd],
sd                293 drivers/iio/common/ssp_sensors/ssp_spi.c 			idx += ssp_offset_map[sd];
sd                296 drivers/iio/common/ssp_sensors/ssp_spi.c 			sd = ssp_print_mcu_debug(dataframe, &idx, len);
sd                297 drivers/iio/common/ssp_sensors/ssp_spi.c 			if (sd) {
sd                299 drivers/iio/common/ssp_sensors/ssp_spi.c 					"Mcu data frame3 error %d\n", sd);
sd                300 drivers/iio/common/ssp_sensors/ssp_spi.c 				return sd;
sd                137 drivers/infiniband/hw/i40iw/i40iw_ctrl.c 				u32 *sd)
sd                173 drivers/infiniband/hw/i40iw/i40iw_ctrl.c 		*sd = (u32)((size >> 21) + 1); /* add 1 for remainder */
sd                175 drivers/infiniband/hw/i40iw/i40iw_ctrl.c 		*sd = (u32)(size >> 21);
sd               3879 drivers/infiniband/hw/i40iw/i40iw_ctrl.c 	u64 sd;
sd               3888 drivers/infiniband/hw/i40iw/i40iw_ctrl.c 		sd = (size >> 21) + 1; /* add 1 for remainder */
sd               3890 drivers/infiniband/hw/i40iw/i40iw_ctrl.c 		sd = size >> 21;
sd               3896 drivers/infiniband/hw/i40iw/i40iw_ctrl.c 			sd += (size >> 21) + 1; /* add 1 for remainder */
sd               3898 drivers/infiniband/hw/i40iw/i40iw_ctrl.c 			sd += size >> 21;
sd               3901 drivers/infiniband/hw/i40iw/i40iw_ctrl.c 	return sd;
sd               1151 drivers/infiniband/hw/i40iw/i40iw_type.h 	enum i40iw_status_code (*parse_fpm_commit_buf)(u64 *, struct i40iw_hmc_obj_info *, u32 *sd);
sd                131 drivers/leds/led-class.c 		sysfs_get_dirent(dev->kobj.sd, "brightness_hw_changed");
sd               1843 drivers/md/md-bitmap.c 	if (mddev->kobj.sd)
sd               1844 drivers/md/md-bitmap.c 		bm = sysfs_get_dirent(mddev->kobj.sd, "bitmap");
sd                743 drivers/md/md.c 		if (mddev->kobj.sd) {
sd               2348 drivers/md/md.c 	rdev->sysfs_state = sysfs_get_dirent_safe(rdev->kobj.sd, "state");
sd               3933 drivers/md/md.c 		mddev->sysfs_action = sysfs_get_dirent(mddev->kobj.sd, "sync_action");
sd               5528 drivers/md/md.c 	if (mddev->kobj.sd &&
sd               5534 drivers/md/md.c 	if (!error && mddev->kobj.sd) {
sd               5536 drivers/md/md.c 		mddev->sysfs_state = sysfs_get_dirent_safe(mddev->kobj.sd, "array_state");
sd               5810 drivers/md/md.c 		if (mddev->kobj.sd &&
sd               5814 drivers/md/md.c 		mddev->sysfs_action = sysfs_get_dirent_safe(mddev->kobj.sd, "sync_action");
sd               8871 drivers/md/md.c 	if (removed && mddev->kobj.sd)
sd                606 drivers/md/md.h static inline struct kernfs_node *sysfs_get_dirent_safe(struct kernfs_node *sd, char *name)
sd                608 drivers/md/md.h 	if (sd)
sd                609 drivers/md/md.h 		return sysfs_get_dirent(sd, name);
sd                610 drivers/md/md.h 	return sd;
sd                612 drivers/md/md.h static inline void sysfs_notify_dirent_safe(struct kernfs_node *sd)
sd                614 drivers/md/md.h 	if (sd)
sd                615 drivers/md/md.h 		sysfs_notify_dirent(sd);
sd                628 drivers/md/md.h 	    mddev->kobj.sd) {
sd                640 drivers/md/md.h 	    mddev->kobj.sd) {
sd               7418 drivers/md/raid5.c 	else if (mddev->kobj.sd &&
sd                167 drivers/media/dvb-frontends/au8522_decoder.c static inline struct au8522_state *to_state(struct v4l2_subdev *sd)
sd                169 drivers/media/dvb-frontends/au8522_decoder.c 	return container_of(sd, struct au8522_state, sd);
sd                472 drivers/media/dvb-frontends/au8522_decoder.c static int au8522_g_register(struct v4l2_subdev *sd,
sd                475 drivers/media/dvb-frontends/au8522_decoder.c 	struct au8522_state *state = to_state(sd);
sd                481 drivers/media/dvb-frontends/au8522_decoder.c static int au8522_s_register(struct v4l2_subdev *sd,
sd                484 drivers/media/dvb-frontends/au8522_decoder.c 	struct au8522_state *state = to_state(sd);
sd                530 drivers/media/dvb-frontends/au8522_decoder.c static int au8522_s_stream(struct v4l2_subdev *sd, int enable)
sd                532 drivers/media/dvb-frontends/au8522_decoder.c 	struct au8522_state *state = to_state(sd);
sd                560 drivers/media/dvb-frontends/au8522_decoder.c static int au8522_s_video_routing(struct v4l2_subdev *sd,
sd                563 drivers/media/dvb-frontends/au8522_decoder.c 	struct au8522_state *state = to_state(sd);
sd                582 drivers/media/dvb-frontends/au8522_decoder.c static int au8522_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd                584 drivers/media/dvb-frontends/au8522_decoder.c 	struct au8522_state *state = to_state(sd);
sd                597 drivers/media/dvb-frontends/au8522_decoder.c static int au8522_s_audio_routing(struct v4l2_subdev *sd,
sd                600 drivers/media/dvb-frontends/au8522_decoder.c 	struct au8522_state *state = to_state(sd);
sd                610 drivers/media/dvb-frontends/au8522_decoder.c static int au8522_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
sd                613 drivers/media/dvb-frontends/au8522_decoder.c 	struct au8522_state *state = to_state(sd);
sd                677 drivers/media/dvb-frontends/au8522_decoder.c 	struct v4l2_subdev *sd;
sd                708 drivers/media/dvb-frontends/au8522_decoder.c 	sd = &state->sd;
sd                709 drivers/media/dvb-frontends/au8522_decoder.c 	v4l2_i2c_subdev_init(sd, client, &au8522_ops);
sd                718 drivers/media/dvb-frontends/au8522_decoder.c 	sd->entity.function = MEDIA_ENT_F_ATV_DECODER;
sd                720 drivers/media/dvb-frontends/au8522_decoder.c 	ret = media_entity_pads_init(&sd->entity, ARRAY_SIZE(state->pads),
sd                739 drivers/media/dvb-frontends/au8522_decoder.c 	sd->ctrl_handler = hdl;
sd                763 drivers/media/dvb-frontends/au8522_decoder.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                764 drivers/media/dvb-frontends/au8522_decoder.c 	v4l2_device_unregister_subdev(sd);
sd                765 drivers/media/dvb-frontends/au8522_decoder.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                766 drivers/media/dvb-frontends/au8522_decoder.c 	au8522_release_state(to_state(sd));
sd                 60 drivers/media/dvb-frontends/au8522_priv.h 	struct v4l2_subdev sd;
sd                 31 drivers/media/dvb-frontends/rtl2832_sdr.c #define V4L2_SUBDEV_HAS_OP(sd, o, f) \
sd                 32 drivers/media/dvb-frontends/rtl2832_sdr.c 	((sd) && (sd)->ops && (sd)->ops->o && (sd)->ops->o->f)
sd                 38 drivers/media/i2c/ad5820.c #define to_ad5820_device(sd)	container_of(sd, struct ad5820_device, subdev)
sd                238 drivers/media/i2c/ad5820.c static int ad5820_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                240 drivers/media/i2c/ad5820.c 	return ad5820_set_power(sd, 1);
sd                243 drivers/media/i2c/ad5820.c static int ad5820_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                245 drivers/media/i2c/ad5820.c 	return ad5820_set_power(sd, 0);
sd                 69 drivers/media/i2c/ad9389b.c 	struct v4l2_subdev sd;
sd                 92 drivers/media/i2c/ad9389b.c static void ad9389b_check_monitor_present_status(struct v4l2_subdev *sd);
sd                 93 drivers/media/i2c/ad9389b.c static bool ad9389b_check_edid_status(struct v4l2_subdev *sd);
sd                 94 drivers/media/i2c/ad9389b.c static void ad9389b_setup(struct v4l2_subdev *sd);
sd                 95 drivers/media/i2c/ad9389b.c static int ad9389b_s_i2s_clock_freq(struct v4l2_subdev *sd, u32 freq);
sd                 96 drivers/media/i2c/ad9389b.c static int ad9389b_s_clock_freq(struct v4l2_subdev *sd, u32 freq);
sd                 98 drivers/media/i2c/ad9389b.c static inline struct ad9389b_state *get_ad9389b_state(struct v4l2_subdev *sd)
sd                100 drivers/media/i2c/ad9389b.c 	return container_of(sd, struct ad9389b_state, sd);
sd                105 drivers/media/i2c/ad9389b.c 	return &container_of(ctrl->handler, struct ad9389b_state, hdl)->sd;
sd                110 drivers/media/i2c/ad9389b.c static int ad9389b_rd(struct v4l2_subdev *sd, u8 reg)
sd                112 drivers/media/i2c/ad9389b.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                117 drivers/media/i2c/ad9389b.c static int ad9389b_wr(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                119 drivers/media/i2c/ad9389b.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                128 drivers/media/i2c/ad9389b.c 	v4l2_err(sd, "%s: failed reg 0x%x, val 0x%x\n", __func__, reg, val);
sd                134 drivers/media/i2c/ad9389b.c static inline void ad9389b_wr_and_or(struct v4l2_subdev *sd, u8 reg,
sd                137 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, reg, (ad9389b_rd(sd, reg) & clr_mask) | val_mask);
sd                140 drivers/media/i2c/ad9389b.c static void ad9389b_edid_rd(struct v4l2_subdev *sd, u16 len, u8 *buf)
sd                142 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd                145 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd                151 drivers/media/i2c/ad9389b.c static inline bool ad9389b_have_hotplug(struct v4l2_subdev *sd)
sd                153 drivers/media/i2c/ad9389b.c 	return ad9389b_rd(sd, 0x42) & MASK_AD9389B_HPD_DETECT;
sd                156 drivers/media/i2c/ad9389b.c static inline bool ad9389b_have_rx_sense(struct v4l2_subdev *sd)
sd                158 drivers/media/i2c/ad9389b.c 	return ad9389b_rd(sd, 0x42) & MASK_AD9389B_MSEN_DETECT;
sd                161 drivers/media/i2c/ad9389b.c static void ad9389b_csc_conversion_mode(struct v4l2_subdev *sd, u8 mode)
sd                163 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x17, 0xe7, (mode & 0x3)<<3);
sd                164 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x18, 0x9f, (mode & 0x3)<<5);
sd                167 drivers/media/i2c/ad9389b.c static void ad9389b_csc_coeff(struct v4l2_subdev *sd,
sd                173 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x18, 0xe0, A1>>8);
sd                174 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x19, A1);
sd                175 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x1A, 0xe0, A2>>8);
sd                176 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x1B, A2);
sd                177 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x1c, 0xe0, A3>>8);
sd                178 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x1d, A3);
sd                179 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x1e, 0xe0, A4>>8);
sd                180 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x1f, A4);
sd                183 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x20, 0xe0, B1>>8);
sd                184 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x21, B1);
sd                185 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x22, 0xe0, B2>>8);
sd                186 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x23, B2);
sd                187 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x24, 0xe0, B3>>8);
sd                188 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x25, B3);
sd                189 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x26, 0xe0, B4>>8);
sd                190 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x27, B4);
sd                193 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x28, 0xe0, C1>>8);
sd                194 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x29, C1);
sd                195 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x2A, 0xe0, C2>>8);
sd                196 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x2B, C2);
sd                197 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x2C, 0xe0, C3>>8);
sd                198 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x2D, C3);
sd                199 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x2E, 0xe0, C4>>8);
sd                200 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x2F, C4);
sd                203 drivers/media/i2c/ad9389b.c static void ad9389b_csc_rgb_full2limit(struct v4l2_subdev *sd, bool enable)
sd                208 drivers/media/i2c/ad9389b.c 		ad9389b_csc_conversion_mode(sd, csc_mode);
sd                209 drivers/media/i2c/ad9389b.c 		ad9389b_csc_coeff(sd,
sd                214 drivers/media/i2c/ad9389b.c 		ad9389b_wr_and_or(sd, 0x3b, 0xfe, 0x1);
sd                216 drivers/media/i2c/ad9389b.c 		ad9389b_wr_and_or(sd, 0xcd, 0xf9, 0x02);
sd                219 drivers/media/i2c/ad9389b.c 		ad9389b_wr_and_or(sd, 0x3b, 0xfe, 0x0);
sd                221 drivers/media/i2c/ad9389b.c 		ad9389b_wr_and_or(sd, 0xcd, 0xf9, 0x04);
sd                225 drivers/media/i2c/ad9389b.c static void ad9389b_set_IT_content_AVI_InfoFrame(struct v4l2_subdev *sd)
sd                227 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd                231 drivers/media/i2c/ad9389b.c 		ad9389b_wr_and_or(sd, 0xcd, 0xbf, 0x00);
sd                234 drivers/media/i2c/ad9389b.c 		ad9389b_wr_and_or(sd, 0xcd, 0xbf, 0x40);
sd                238 drivers/media/i2c/ad9389b.c static int ad9389b_set_rgb_quantization_mode(struct v4l2_subdev *sd, struct v4l2_ctrl *ctrl)
sd                240 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd                247 drivers/media/i2c/ad9389b.c 			ad9389b_csc_rgb_full2limit(sd, true);
sd                250 drivers/media/i2c/ad9389b.c 			ad9389b_csc_rgb_full2limit(sd, false);
sd                255 drivers/media/i2c/ad9389b.c 		ad9389b_csc_rgb_full2limit(sd, true);
sd                259 drivers/media/i2c/ad9389b.c 		ad9389b_csc_rgb_full2limit(sd, false);
sd                267 drivers/media/i2c/ad9389b.c static void ad9389b_set_manual_pll_gear(struct v4l2_subdev *sd, u32 pixelclock)
sd                295 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x98, 0x0f, gear);
sd                302 drivers/media/i2c/ad9389b.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                303 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd                305 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd,
sd                310 drivers/media/i2c/ad9389b.c 		ad9389b_wr_and_or(sd, 0xaf, 0xfd,
sd                315 drivers/media/i2c/ad9389b.c 		return ad9389b_set_rgb_quantization_mode(sd, ctrl);
sd                326 drivers/media/i2c/ad9389b.c static int ad9389b_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
sd                328 drivers/media/i2c/ad9389b.c 	reg->val = ad9389b_rd(sd, reg->reg & 0xff);
sd                333 drivers/media/i2c/ad9389b.c static int ad9389b_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
sd                335 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, reg->reg & 0xff, reg->val & 0xff);
sd                340 drivers/media/i2c/ad9389b.c static int ad9389b_log_status(struct v4l2_subdev *sd)
sd                342 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd                369 drivers/media/i2c/ad9389b.c 	v4l2_info(sd, "chip revision %d\n", state->chip_revision);
sd                370 drivers/media/i2c/ad9389b.c 	v4l2_info(sd, "power %s\n", state->power_on ? "on" : "off");
sd                371 drivers/media/i2c/ad9389b.c 	v4l2_info(sd, "%s hotplug, %s Rx Sense, %s EDID (%d block(s))\n",
sd                372 drivers/media/i2c/ad9389b.c 		  (ad9389b_rd(sd, 0x42) & MASK_AD9389B_HPD_DETECT) ?
sd                374 drivers/media/i2c/ad9389b.c 		  (ad9389b_rd(sd, 0x42) & MASK_AD9389B_MSEN_DETECT) ?
sd                377 drivers/media/i2c/ad9389b.c 	v4l2_info(sd, "%s output %s\n",
sd                378 drivers/media/i2c/ad9389b.c 		  (ad9389b_rd(sd, 0xaf) & 0x02) ?
sd                380 drivers/media/i2c/ad9389b.c 		  (ad9389b_rd(sd, 0xa1) & 0x3c) ?
sd                382 drivers/media/i2c/ad9389b.c 	v4l2_info(sd, "ad9389b: %s\n", (ad9389b_rd(sd, 0xb8) & 0x40) ?
sd                384 drivers/media/i2c/ad9389b.c 	v4l2_info(sd, "state: %s, error: %s, detect count: %u, msk/irq: %02x/%02x\n",
sd                385 drivers/media/i2c/ad9389b.c 		  states[ad9389b_rd(sd, 0xc8) & 0xf],
sd                386 drivers/media/i2c/ad9389b.c 		  errors[ad9389b_rd(sd, 0xc8) >> 4],
sd                388 drivers/media/i2c/ad9389b.c 		  ad9389b_rd(sd, 0x94), ad9389b_rd(sd, 0x96));
sd                389 drivers/media/i2c/ad9389b.c 	manual_gear = ad9389b_rd(sd, 0x98) & 0x80;
sd                390 drivers/media/i2c/ad9389b.c 	v4l2_info(sd, "ad9389b: RGB quantization: %s range\n",
sd                391 drivers/media/i2c/ad9389b.c 		  ad9389b_rd(sd, 0x3b) & 0x01 ? "limited" : "full");
sd                392 drivers/media/i2c/ad9389b.c 	v4l2_info(sd, "ad9389b: %s gear %d\n",
sd                394 drivers/media/i2c/ad9389b.c 		  manual_gear ? ((ad9389b_rd(sd, 0x98) & 0x70) >> 4) :
sd                395 drivers/media/i2c/ad9389b.c 		  ((ad9389b_rd(sd, 0x9e) & 0x0e) >> 1));
sd                396 drivers/media/i2c/ad9389b.c 	if (ad9389b_rd(sd, 0xaf) & 0x02) {
sd                398 drivers/media/i2c/ad9389b.c 		u8 manual_cts = ad9389b_rd(sd, 0x0a) & 0x80;
sd                399 drivers/media/i2c/ad9389b.c 		u32 N = (ad9389b_rd(sd, 0x01) & 0xf) << 16 |
sd                400 drivers/media/i2c/ad9389b.c 			ad9389b_rd(sd, 0x02) << 8 |
sd                401 drivers/media/i2c/ad9389b.c 			ad9389b_rd(sd, 0x03);
sd                402 drivers/media/i2c/ad9389b.c 		u8 vic_detect = ad9389b_rd(sd, 0x3e) >> 2;
sd                403 drivers/media/i2c/ad9389b.c 		u8 vic_sent = ad9389b_rd(sd, 0x3d) & 0x3f;
sd                407 drivers/media/i2c/ad9389b.c 			CTS = (ad9389b_rd(sd, 0x07) & 0xf) << 16 |
sd                408 drivers/media/i2c/ad9389b.c 			      ad9389b_rd(sd, 0x08) << 8 |
sd                409 drivers/media/i2c/ad9389b.c 			      ad9389b_rd(sd, 0x09);
sd                411 drivers/media/i2c/ad9389b.c 			CTS = (ad9389b_rd(sd, 0x04) & 0xf) << 16 |
sd                412 drivers/media/i2c/ad9389b.c 			      ad9389b_rd(sd, 0x05) << 8 |
sd                413 drivers/media/i2c/ad9389b.c 			      ad9389b_rd(sd, 0x06);
sd                414 drivers/media/i2c/ad9389b.c 		N = (ad9389b_rd(sd, 0x01) & 0xf) << 16 |
sd                415 drivers/media/i2c/ad9389b.c 		    ad9389b_rd(sd, 0x02) << 8 |
sd                416 drivers/media/i2c/ad9389b.c 		    ad9389b_rd(sd, 0x03);
sd                418 drivers/media/i2c/ad9389b.c 		v4l2_info(sd, "ad9389b: CTS %s mode: N %d, CTS %d\n",
sd                421 drivers/media/i2c/ad9389b.c 		v4l2_info(sd, "ad9389b: VIC: detected %d, sent %d\n",
sd                425 drivers/media/i2c/ad9389b.c 		v4l2_print_dv_timings(sd->name, "timings: ",
sd                428 drivers/media/i2c/ad9389b.c 		v4l2_info(sd, "no timings set\n");
sd                433 drivers/media/i2c/ad9389b.c static int ad9389b_s_power(struct v4l2_subdev *sd, int on)
sd                435 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd                440 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s: power %s\n", __func__, on ? "on" : "off");
sd                446 drivers/media/i2c/ad9389b.c 		ad9389b_wr_and_or(sd, 0x41, 0xbf, 0x40);
sd                454 drivers/media/i2c/ad9389b.c 		ad9389b_wr_and_or(sd, 0x41, 0xbf, 0x0);
sd                455 drivers/media/i2c/ad9389b.c 		if ((ad9389b_rd(sd, 0x41) & 0x40) == 0)
sd                457 drivers/media/i2c/ad9389b.c 		ad9389b_wr_and_or(sd, 0x41, 0xbf, 0x40);
sd                461 drivers/media/i2c/ad9389b.c 		v4l2_dbg(1, debug, sd, "failed to powerup the ad9389b\n");
sd                462 drivers/media/i2c/ad9389b.c 		ad9389b_s_power(sd, 0);
sd                466 drivers/media/i2c/ad9389b.c 		v4l2_dbg(1, debug, sd,
sd                470 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0xba, 0xef, 0x10);
sd                473 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x98, 0xf0, 0x07);
sd                474 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x9c, 0x38);
sd                475 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x9d, 0xfc, 0x01);
sd                479 drivers/media/i2c/ad9389b.c 		ad9389b_wr(sd, 0xa2, pdata->diff_data_drive_strength);
sd                481 drivers/media/i2c/ad9389b.c 		ad9389b_wr(sd, 0xa2, 0x87);
sd                484 drivers/media/i2c/ad9389b.c 		ad9389b_wr(sd, 0xa3, pdata->diff_clk_drive_strength);
sd                486 drivers/media/i2c/ad9389b.c 		ad9389b_wr(sd, 0xa3, 0x87);
sd                488 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x0a, 0x01);
sd                489 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0xbb, 0xff);
sd                492 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0xc9, 0xf);
sd                497 drivers/media/i2c/ad9389b.c static void ad9389b_set_isr(struct v4l2_subdev *sd, bool enable)
sd                507 drivers/media/i2c/ad9389b.c 	else if (ad9389b_have_hotplug(sd))
sd                519 drivers/media/i2c/ad9389b.c 		ad9389b_wr(sd, 0x94, irqs);
sd                520 drivers/media/i2c/ad9389b.c 		irqs_rd = ad9389b_rd(sd, 0x94);
sd                524 drivers/media/i2c/ad9389b.c 		v4l2_err(sd, "Could not set interrupts: hw failure?\n");
sd                528 drivers/media/i2c/ad9389b.c static int ad9389b_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
sd                533 drivers/media/i2c/ad9389b.c 	ad9389b_set_isr(sd, false);
sd                534 drivers/media/i2c/ad9389b.c 	irq_status = ad9389b_rd(sd, 0x96);
sd                536 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x96, irq_status);
sd                538 drivers/media/i2c/ad9389b.c 	ad9389b_set_isr(sd, true);
sd                540 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s: irq_status 0x%x\n", __func__, irq_status);
sd                543 drivers/media/i2c/ad9389b.c 		ad9389b_check_monitor_present_status(sd);
sd                545 drivers/media/i2c/ad9389b.c 		ad9389b_check_edid_status(sd);
sd                564 drivers/media/i2c/ad9389b.c static int ad9389b_s_stream(struct v4l2_subdev *sd, int enable)
sd                566 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s: %sable\n", __func__, (enable ? "en" : "dis"));
sd                568 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0xa1, ~0x3c, (enable ? 0 : 0x3c));
sd                570 drivers/media/i2c/ad9389b.c 		ad9389b_check_monitor_present_status(sd);
sd                572 drivers/media/i2c/ad9389b.c 		ad9389b_s_power(sd, 0);
sd                588 drivers/media/i2c/ad9389b.c static int ad9389b_s_dv_timings(struct v4l2_subdev *sd,
sd                591 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd                593 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd                609 drivers/media/i2c/ad9389b.c 	ad9389b_set_rgb_quantization_mode(sd, state->rgb_quantization_range_ctrl);
sd                613 drivers/media/i2c/ad9389b.c 		ad9389b_set_manual_pll_gear(sd, (u32)timings->bt.pixelclock);
sd                616 drivers/media/i2c/ad9389b.c 	ad9389b_set_IT_content_AVI_InfoFrame(sd);
sd                621 drivers/media/i2c/ad9389b.c static int ad9389b_g_dv_timings(struct v4l2_subdev *sd,
sd                624 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd                626 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd                636 drivers/media/i2c/ad9389b.c static int ad9389b_enum_dv_timings(struct v4l2_subdev *sd,
sd                646 drivers/media/i2c/ad9389b.c static int ad9389b_dv_timings_cap(struct v4l2_subdev *sd,
sd                664 drivers/media/i2c/ad9389b.c static int ad9389b_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
sd                666 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd                673 drivers/media/i2c/ad9389b.c 		v4l2_dbg(1, debug, sd, "EDID segment 0 not found\n");
sd                693 drivers/media/i2c/ad9389b.c static int ad9389b_s_audio_stream(struct v4l2_subdev *sd, int enable)
sd                695 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s: %sable\n", __func__, (enable ? "en" : "dis"));
sd                698 drivers/media/i2c/ad9389b.c 		ad9389b_wr_and_or(sd, 0x45, 0x3f, 0x80);
sd                700 drivers/media/i2c/ad9389b.c 		ad9389b_wr_and_or(sd, 0x45, 0x3f, 0x40);
sd                705 drivers/media/i2c/ad9389b.c static int ad9389b_s_clock_freq(struct v4l2_subdev *sd, u32 freq)
sd                722 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x01, (N >> 16) & 0xf);
sd                723 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x02, (N >> 8) & 0xff);
sd                724 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x03, N & 0xff);
sd                729 drivers/media/i2c/ad9389b.c static int ad9389b_s_i2s_clock_freq(struct v4l2_subdev *sd, u32 freq)
sd                746 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x15, 0xf, i2s_sf);
sd                751 drivers/media/i2c/ad9389b.c static int ad9389b_s_routing(struct v4l2_subdev *sd, u32 input, u32 output, u32 config)
sd                757 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x50, 0x1f, 0x20);
sd                759 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x51, 0x00);
sd                763 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x14, 0xf0, 0x02);
sd                785 drivers/media/i2c/ad9389b.c static void ad9389b_dbg_dump_edid(int lvl, int debug, struct v4l2_subdev *sd,
sd                793 drivers/media/i2c/ad9389b.c 	v4l2_dbg(lvl, debug, sd, "edid segment %d\n", segment);
sd                799 drivers/media/i2c/ad9389b.c 			v4l2_dbg(lvl, debug, sd, "\n");
sd                805 drivers/media/i2c/ad9389b.c 		v4l2_dbg(lvl, debug, sd, "%s\n", b);
sd                814 drivers/media/i2c/ad9389b.c 	struct v4l2_subdev *sd = &state->sd;
sd                817 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd                819 drivers/media/i2c/ad9389b.c 	if (ad9389b_check_edid_status(sd)) {
sd                824 drivers/media/i2c/ad9389b.c 	if (ad9389b_have_hotplug(sd)) {
sd                830 drivers/media/i2c/ad9389b.c 			v4l2_dbg(1, debug, sd, "%s: edid read failed\n", __func__);
sd                831 drivers/media/i2c/ad9389b.c 			ad9389b_s_power(sd, false);
sd                832 drivers/media/i2c/ad9389b.c 			ad9389b_s_power(sd, true);
sd                840 drivers/media/i2c/ad9389b.c 	ed.segment = ad9389b_rd(sd, 0xc4);
sd                841 drivers/media/i2c/ad9389b.c 	v4l2_subdev_notify(sd, AD9389B_EDID_DETECT, (void *)&ed);
sd                842 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s: no edid found\n", __func__);
sd                845 drivers/media/i2c/ad9389b.c static void ad9389b_audio_setup(struct v4l2_subdev *sd)
sd                847 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s\n", __func__);
sd                849 drivers/media/i2c/ad9389b.c 	ad9389b_s_i2s_clock_freq(sd, 48000);
sd                850 drivers/media/i2c/ad9389b.c 	ad9389b_s_clock_freq(sd, 48000);
sd                851 drivers/media/i2c/ad9389b.c 	ad9389b_s_routing(sd, 0, 0, 0);
sd                857 drivers/media/i2c/ad9389b.c static void ad9389b_setup(struct v4l2_subdev *sd)
sd                859 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd                861 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s\n", __func__);
sd                864 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x15, 0xf1, 0x0);
sd                866 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x16, 0x3f, 0x0);
sd                869 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x17, 0xf9, 0x06);
sd                871 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x45, 0xc7, 0x08);
sd                873 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0x46, 0x3f, 0x80);
sd                875 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x3c, 0x0);
sd                877 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x47, 0x80);
sd                879 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0xaf, 0xef, 0x0);
sd                881 drivers/media/i2c/ad9389b.c 	ad9389b_wr_and_or(sd, 0xba, 0x1f, 0x60);
sd                883 drivers/media/i2c/ad9389b.c 	ad9389b_audio_setup(sd);
sd                887 drivers/media/i2c/ad9389b.c 	ad9389b_set_IT_content_AVI_InfoFrame(sd);
sd                890 drivers/media/i2c/ad9389b.c static void ad9389b_notify_monitor_detect(struct v4l2_subdev *sd)
sd                893 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd                896 drivers/media/i2c/ad9389b.c 	v4l2_subdev_notify(sd, AD9389B_MONITOR_DETECT, (void *)&mdt);
sd                899 drivers/media/i2c/ad9389b.c static void ad9389b_update_monitor_present_status(struct v4l2_subdev *sd)
sd                901 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd                903 drivers/media/i2c/ad9389b.c 	u8 status = ad9389b_rd(sd, 0x42);
sd                905 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s: status: 0x%x%s%s\n",
sd                912 drivers/media/i2c/ad9389b.c 		v4l2_dbg(1, debug, sd, "%s: hotplug detected\n", __func__);
sd                914 drivers/media/i2c/ad9389b.c 		if (!ad9389b_s_power(sd, true)) {
sd                915 drivers/media/i2c/ad9389b.c 			v4l2_dbg(1, debug, sd,
sd                919 drivers/media/i2c/ad9389b.c 		ad9389b_setup(sd);
sd                920 drivers/media/i2c/ad9389b.c 		ad9389b_notify_monitor_detect(sd);
sd                924 drivers/media/i2c/ad9389b.c 		v4l2_dbg(1, debug, sd, "%s: hotplug not detected\n", __func__);
sd                926 drivers/media/i2c/ad9389b.c 		ad9389b_notify_monitor_detect(sd);
sd                927 drivers/media/i2c/ad9389b.c 		ad9389b_s_power(sd, false);
sd                932 drivers/media/i2c/ad9389b.c 	v4l2_ctrl_s_ctrl(state->hotplug_ctrl, ad9389b_have_hotplug(sd) ? 0x1 : 0x0);
sd                933 drivers/media/i2c/ad9389b.c 	v4l2_ctrl_s_ctrl(state->rx_sense_ctrl, ad9389b_have_rx_sense(sd) ? 0x1 : 0x0);
sd                941 drivers/media/i2c/ad9389b.c static void ad9389b_check_monitor_present_status(struct v4l2_subdev *sd)
sd                943 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd                946 drivers/media/i2c/ad9389b.c 	ad9389b_update_monitor_present_status(sd);
sd                952 drivers/media/i2c/ad9389b.c 	while (state->power_on && (ad9389b_rd(sd, 0x41) & 0x40)) {
sd                954 drivers/media/i2c/ad9389b.c 			v4l2_err(sd, "retried %d times, give up\n", retry);
sd                957 drivers/media/i2c/ad9389b.c 		v4l2_dbg(1, debug, sd, "%s: reset and re-check status (%d)\n", __func__, retry);
sd                958 drivers/media/i2c/ad9389b.c 		ad9389b_notify_monitor_detect(sd);
sd                961 drivers/media/i2c/ad9389b.c 		ad9389b_s_power(sd, false);
sd                962 drivers/media/i2c/ad9389b.c 		ad9389b_update_monitor_present_status(sd);
sd                976 drivers/media/i2c/ad9389b.c static bool edid_verify_crc(struct v4l2_subdev *sd, u32 segment)
sd                978 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd                990 drivers/media/i2c/ad9389b.c static bool edid_verify_header(struct v4l2_subdev *sd, u32 segment)
sd                995 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd               1009 drivers/media/i2c/ad9389b.c static bool ad9389b_check_edid_status(struct v4l2_subdev *sd)
sd               1011 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd               1014 drivers/media/i2c/ad9389b.c 	u8 edidRdy = ad9389b_rd(sd, 0xc5);
sd               1016 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s: edid ready (retries: %d)\n",
sd               1022 drivers/media/i2c/ad9389b.c 	segment = ad9389b_rd(sd, 0xc4);
sd               1024 drivers/media/i2c/ad9389b.c 		v4l2_err(sd, "edid segment number too big\n");
sd               1027 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s: got segment %d\n", __func__, segment);
sd               1028 drivers/media/i2c/ad9389b.c 	ad9389b_edid_rd(sd, 256, &state->edid.data[segment * 256]);
sd               1029 drivers/media/i2c/ad9389b.c 	ad9389b_dbg_dump_edid(2, debug, sd, segment,
sd               1033 drivers/media/i2c/ad9389b.c 		v4l2_dbg(1, debug, sd, "%s: %d blocks in total\n",
sd               1036 drivers/media/i2c/ad9389b.c 	if (!edid_verify_crc(sd, segment) ||
sd               1037 drivers/media/i2c/ad9389b.c 	    !edid_verify_header(sd, segment)) {
sd               1039 drivers/media/i2c/ad9389b.c 		v4l2_err(sd, "%s: edid crc or header error\n", __func__);
sd               1040 drivers/media/i2c/ad9389b.c 		ad9389b_s_power(sd, false);
sd               1041 drivers/media/i2c/ad9389b.c 		ad9389b_s_power(sd, true);
sd               1048 drivers/media/i2c/ad9389b.c 		v4l2_dbg(1, debug, sd, "%s: request segment %d\n",
sd               1050 drivers/media/i2c/ad9389b.c 		ad9389b_wr(sd, 0xc9, 0xf);
sd               1051 drivers/media/i2c/ad9389b.c 		ad9389b_wr(sd, 0xc4, state->edid.segments);
sd               1060 drivers/media/i2c/ad9389b.c 	v4l2_subdev_notify(sd, AD9389B_EDID_DETECT, (void *)&ed);
sd               1068 drivers/media/i2c/ad9389b.c static void ad9389b_init_setup(struct v4l2_subdev *sd)
sd               1070 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd               1073 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s\n", __func__);
sd               1076 drivers/media/i2c/ad9389b.c 	ad9389b_wr(sd, 0x96, 0xff);
sd               1080 drivers/media/i2c/ad9389b.c 	ad9389b_set_isr(sd, false);
sd               1089 drivers/media/i2c/ad9389b.c 	struct v4l2_subdev *sd;
sd               1110 drivers/media/i2c/ad9389b.c 	sd = &state->sd;
sd               1111 drivers/media/i2c/ad9389b.c 	v4l2_i2c_subdev_init(sd, client, &ad9389b_ops);
sd               1112 drivers/media/i2c/ad9389b.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1130 drivers/media/i2c/ad9389b.c 	sd->ctrl_handler = hdl;
sd               1137 drivers/media/i2c/ad9389b.c 	sd->entity.function = MEDIA_ENT_F_DV_ENCODER;
sd               1138 drivers/media/i2c/ad9389b.c 	err = media_entity_pads_init(&sd->entity, 1, &state->pad);
sd               1142 drivers/media/i2c/ad9389b.c 	state->chip_revision = ad9389b_rd(sd, 0x0);
sd               1144 drivers/media/i2c/ad9389b.c 		v4l2_err(sd, "chip_revision %d != 2\n", state->chip_revision);
sd               1148 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "reg 0x41 0x%x, chip version (reg 0x00) 0x%x\n",
sd               1149 drivers/media/i2c/ad9389b.c 		 ad9389b_rd(sd, 0x41), state->chip_revision);
sd               1153 drivers/media/i2c/ad9389b.c 		v4l2_err(sd, "failed to register edid i2c client\n");
sd               1161 drivers/media/i2c/ad9389b.c 	ad9389b_init_setup(sd);
sd               1162 drivers/media/i2c/ad9389b.c 	ad9389b_set_isr(sd, true);
sd               1164 drivers/media/i2c/ad9389b.c 	v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
sd               1169 drivers/media/i2c/ad9389b.c 	media_entity_cleanup(&sd->entity);
sd               1179 drivers/media/i2c/ad9389b.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1180 drivers/media/i2c/ad9389b.c 	struct ad9389b_state *state = get_ad9389b_state(sd);
sd               1184 drivers/media/i2c/ad9389b.c 	v4l2_dbg(1, debug, sd, "%s removed @ 0x%x (%s)\n", client->name,
sd               1187 drivers/media/i2c/ad9389b.c 	ad9389b_s_stream(sd, false);
sd               1188 drivers/media/i2c/ad9389b.c 	ad9389b_s_audio_stream(sd, false);
sd               1189 drivers/media/i2c/ad9389b.c 	ad9389b_init_setup(sd);
sd               1192 drivers/media/i2c/ad9389b.c 	v4l2_device_unregister_subdev(sd);
sd               1193 drivers/media/i2c/ad9389b.c 	media_entity_cleanup(&sd->entity);
sd               1194 drivers/media/i2c/ad9389b.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                352 drivers/media/i2c/adp1653.c static int adp1653_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                354 drivers/media/i2c/adp1653.c 	return adp1653_set_power(sd, 1);
sd                357 drivers/media/i2c/adp1653.c static int adp1653_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                359 drivers/media/i2c/adp1653.c 	return adp1653_set_power(sd, 0);
sd                 39 drivers/media/i2c/adv7170.c 	struct v4l2_subdev sd;
sd                 46 drivers/media/i2c/adv7170.c static inline struct adv7170 *to_adv7170(struct v4l2_subdev *sd)
sd                 48 drivers/media/i2c/adv7170.c 	return container_of(sd, struct adv7170, sd);
sd                 60 drivers/media/i2c/adv7170.c static inline int adv7170_write(struct v4l2_subdev *sd, u8 reg, u8 value)
sd                 62 drivers/media/i2c/adv7170.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 63 drivers/media/i2c/adv7170.c 	struct adv7170 *encoder = to_adv7170(sd);
sd                 69 drivers/media/i2c/adv7170.c static inline int adv7170_read(struct v4l2_subdev *sd, u8 reg)
sd                 71 drivers/media/i2c/adv7170.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 76 drivers/media/i2c/adv7170.c static int adv7170_write_block(struct v4l2_subdev *sd,
sd                 79 drivers/media/i2c/adv7170.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 80 drivers/media/i2c/adv7170.c 	struct adv7170 *encoder = to_adv7170(sd);
sd                108 drivers/media/i2c/adv7170.c 			ret = adv7170_write(sd, reg, *data++);
sd                184 drivers/media/i2c/adv7170.c static int adv7170_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
sd                186 drivers/media/i2c/adv7170.c 	struct adv7170 *encoder = to_adv7170(sd);
sd                188 drivers/media/i2c/adv7170.c 	v4l2_dbg(1, debug, sd, "set norm %llx\n", (unsigned long long)std);
sd                191 drivers/media/i2c/adv7170.c 		adv7170_write_block(sd, init_NTSC, sizeof(init_NTSC));
sd                193 drivers/media/i2c/adv7170.c 			adv7170_write(sd, 0x02, 0x0e);	/* Enable genlock */
sd                194 drivers/media/i2c/adv7170.c 		adv7170_write(sd, 0x07, TR0MODE | TR0RST);
sd                195 drivers/media/i2c/adv7170.c 		adv7170_write(sd, 0x07, TR0MODE);
sd                197 drivers/media/i2c/adv7170.c 		adv7170_write_block(sd, init_PAL, sizeof(init_PAL));
sd                199 drivers/media/i2c/adv7170.c 			adv7170_write(sd, 0x02, 0x0e);	/* Enable genlock */
sd                200 drivers/media/i2c/adv7170.c 		adv7170_write(sd, 0x07, TR0MODE | TR0RST);
sd                201 drivers/media/i2c/adv7170.c 		adv7170_write(sd, 0x07, TR0MODE);
sd                203 drivers/media/i2c/adv7170.c 		v4l2_dbg(1, debug, sd, "illegal norm: %llx\n",
sd                207 drivers/media/i2c/adv7170.c 	v4l2_dbg(1, debug, sd, "switched to %llx\n", (unsigned long long)std);
sd                212 drivers/media/i2c/adv7170.c static int adv7170_s_routing(struct v4l2_subdev *sd,
sd                215 drivers/media/i2c/adv7170.c 	struct adv7170 *encoder = to_adv7170(sd);
sd                221 drivers/media/i2c/adv7170.c 	v4l2_dbg(1, debug, sd, "set input from %s\n",
sd                226 drivers/media/i2c/adv7170.c 		adv7170_write(sd, 0x01, 0x20);
sd                227 drivers/media/i2c/adv7170.c 		adv7170_write(sd, 0x08, TR1CAPT);	/* TR1 */
sd                228 drivers/media/i2c/adv7170.c 		adv7170_write(sd, 0x02, 0x0e);	/* Enable genlock */
sd                229 drivers/media/i2c/adv7170.c 		adv7170_write(sd, 0x07, TR0MODE | TR0RST);
sd                230 drivers/media/i2c/adv7170.c 		adv7170_write(sd, 0x07, TR0MODE);
sd                235 drivers/media/i2c/adv7170.c 		adv7170_write(sd, 0x01, 0x00);
sd                236 drivers/media/i2c/adv7170.c 		adv7170_write(sd, 0x08, TR1PLAY);	/* TR1 */
sd                237 drivers/media/i2c/adv7170.c 		adv7170_write(sd, 0x02, 0x08);
sd                238 drivers/media/i2c/adv7170.c 		adv7170_write(sd, 0x07, TR0MODE | TR0RST);
sd                239 drivers/media/i2c/adv7170.c 		adv7170_write(sd, 0x07, TR0MODE);
sd                244 drivers/media/i2c/adv7170.c 		v4l2_dbg(1, debug, sd, "illegal input: %d\n", input);
sd                247 drivers/media/i2c/adv7170.c 	v4l2_dbg(1, debug, sd, "switched to %s\n", inputs[input]);
sd                252 drivers/media/i2c/adv7170.c static int adv7170_enum_mbus_code(struct v4l2_subdev *sd,
sd                263 drivers/media/i2c/adv7170.c static int adv7170_get_fmt(struct v4l2_subdev *sd,
sd                268 drivers/media/i2c/adv7170.c 	u8 val = adv7170_read(sd, 0x7);
sd                286 drivers/media/i2c/adv7170.c static int adv7170_set_fmt(struct v4l2_subdev *sd,
sd                291 drivers/media/i2c/adv7170.c 	u8 val = adv7170_read(sd, 0x7);
sd                306 drivers/media/i2c/adv7170.c 		v4l2_dbg(1, debug, sd,
sd                312 drivers/media/i2c/adv7170.c 		return adv7170_write(sd, 0x7, val);
sd                341 drivers/media/i2c/adv7170.c 	struct v4l2_subdev *sd;
sd                354 drivers/media/i2c/adv7170.c 	sd = &encoder->sd;
sd                355 drivers/media/i2c/adv7170.c 	v4l2_i2c_subdev_init(sd, client, &adv7170_ops);
sd                359 drivers/media/i2c/adv7170.c 	i = adv7170_write_block(sd, init_NTSC, sizeof(init_NTSC));
sd                361 drivers/media/i2c/adv7170.c 		i = adv7170_write(sd, 0x07, TR0MODE | TR0RST);
sd                362 drivers/media/i2c/adv7170.c 		i = adv7170_write(sd, 0x07, TR0MODE);
sd                363 drivers/media/i2c/adv7170.c 		i = adv7170_read(sd, 0x12);
sd                364 drivers/media/i2c/adv7170.c 		v4l2_dbg(1, debug, sd, "revision %d\n", i & 1);
sd                367 drivers/media/i2c/adv7170.c 		v4l2_dbg(1, debug, sd, "init error 0x%x\n", i);
sd                373 drivers/media/i2c/adv7170.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                375 drivers/media/i2c/adv7170.c 	v4l2_device_unregister_subdev(sd);
sd                 38 drivers/media/i2c/adv7175.c 	struct v4l2_subdev sd;
sd                 43 drivers/media/i2c/adv7175.c static inline struct adv7175 *to_adv7175(struct v4l2_subdev *sd)
sd                 45 drivers/media/i2c/adv7175.c 	return container_of(sd, struct adv7175, sd);
sd                 57 drivers/media/i2c/adv7175.c static inline int adv7175_write(struct v4l2_subdev *sd, u8 reg, u8 value)
sd                 59 drivers/media/i2c/adv7175.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 64 drivers/media/i2c/adv7175.c static inline int adv7175_read(struct v4l2_subdev *sd, u8 reg)
sd                 66 drivers/media/i2c/adv7175.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 71 drivers/media/i2c/adv7175.c static int adv7175_write_block(struct v4l2_subdev *sd,
sd                 74 drivers/media/i2c/adv7175.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                102 drivers/media/i2c/adv7175.c 			ret = adv7175_write(sd, reg, *data++);
sd                112 drivers/media/i2c/adv7175.c static void set_subcarrier_freq(struct v4l2_subdev *sd, int pass_through)
sd                117 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x02, 0x00);
sd                119 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x02, 0x55);
sd                121 drivers/media/i2c/adv7175.c 	adv7175_write(sd, 0x03, 0x55);
sd                122 drivers/media/i2c/adv7175.c 	adv7175_write(sd, 0x04, 0x55);
sd                123 drivers/media/i2c/adv7175.c 	adv7175_write(sd, 0x05, 0x25);
sd                183 drivers/media/i2c/adv7175.c static int adv7175_init(struct v4l2_subdev *sd, u32 val)
sd                186 drivers/media/i2c/adv7175.c 	adv7175_write_block(sd, init_common, sizeof(init_common));
sd                187 drivers/media/i2c/adv7175.c 	adv7175_write(sd, 0x07, TR0MODE | TR0RST);
sd                188 drivers/media/i2c/adv7175.c 	adv7175_write(sd, 0x07, TR0MODE);
sd                192 drivers/media/i2c/adv7175.c static int adv7175_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
sd                194 drivers/media/i2c/adv7175.c 	struct adv7175 *encoder = to_adv7175(sd);
sd                197 drivers/media/i2c/adv7175.c 		adv7175_write_block(sd, init_ntsc, sizeof(init_ntsc));
sd                199 drivers/media/i2c/adv7175.c 			adv7175_write(sd, 0x0d, 0x4f);	/* Enable genlock */
sd                200 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x07, TR0MODE | TR0RST);
sd                201 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x07, TR0MODE);
sd                203 drivers/media/i2c/adv7175.c 		adv7175_write_block(sd, init_pal, sizeof(init_pal));
sd                205 drivers/media/i2c/adv7175.c 			adv7175_write(sd, 0x0d, 0x4f);	/* Enable genlock */
sd                206 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x07, TR0MODE | TR0RST);
sd                207 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x07, TR0MODE);
sd                215 drivers/media/i2c/adv7175.c 		adv7175_write_block(sd, init_pal, sizeof(init_pal));
sd                217 drivers/media/i2c/adv7175.c 			adv7175_write(sd, 0x0d, 0x49);	/* Disable genlock */
sd                218 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x07, TR0MODE | TR0RST);
sd                219 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x07, TR0MODE);
sd                221 drivers/media/i2c/adv7175.c 		v4l2_dbg(1, debug, sd, "illegal norm: %llx\n",
sd                225 drivers/media/i2c/adv7175.c 	v4l2_dbg(1, debug, sd, "switched to %llx\n", (unsigned long long)std);
sd                230 drivers/media/i2c/adv7175.c static int adv7175_s_routing(struct v4l2_subdev *sd,
sd                233 drivers/media/i2c/adv7175.c 	struct adv7175 *encoder = to_adv7175(sd);
sd                241 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x01, 0x00);
sd                244 drivers/media/i2c/adv7175.c 			set_subcarrier_freq(sd, 1);
sd                246 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x0c, TR1CAPT);	/* TR1 */
sd                248 drivers/media/i2c/adv7175.c 			adv7175_write(sd, 0x0d, 0x49);	/* Disable genlock */
sd                250 drivers/media/i2c/adv7175.c 			adv7175_write(sd, 0x0d, 0x4f);	/* Enable genlock */
sd                251 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x07, TR0MODE | TR0RST);
sd                252 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x07, TR0MODE);
sd                257 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x01, 0x00);
sd                260 drivers/media/i2c/adv7175.c 			set_subcarrier_freq(sd, 0);
sd                262 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x0c, TR1PLAY);	/* TR1 */
sd                263 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x0d, 0x49);
sd                264 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x07, TR0MODE | TR0RST);
sd                265 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x07, TR0MODE);
sd                270 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x01, 0x80);
sd                273 drivers/media/i2c/adv7175.c 			set_subcarrier_freq(sd, 0);
sd                275 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x0d, 0x49);
sd                276 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x07, TR0MODE | TR0RST);
sd                277 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x07, TR0MODE);
sd                282 drivers/media/i2c/adv7175.c 		v4l2_dbg(1, debug, sd, "illegal input: %d\n", input);
sd                285 drivers/media/i2c/adv7175.c 	v4l2_dbg(1, debug, sd, "switched to %s\n", inputs[input]);
sd                290 drivers/media/i2c/adv7175.c static int adv7175_enum_mbus_code(struct v4l2_subdev *sd,
sd                301 drivers/media/i2c/adv7175.c static int adv7175_get_fmt(struct v4l2_subdev *sd,
sd                306 drivers/media/i2c/adv7175.c 	u8 val = adv7175_read(sd, 0x7);
sd                324 drivers/media/i2c/adv7175.c static int adv7175_set_fmt(struct v4l2_subdev *sd,
sd                329 drivers/media/i2c/adv7175.c 	u8 val = adv7175_read(sd, 0x7);
sd                345 drivers/media/i2c/adv7175.c 		v4l2_dbg(1, debug, sd,
sd                351 drivers/media/i2c/adv7175.c 		ret = adv7175_write(sd, 0x7, val);
sd                356 drivers/media/i2c/adv7175.c static int adv7175_s_power(struct v4l2_subdev *sd, int on)
sd                359 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x01, 0x00);
sd                361 drivers/media/i2c/adv7175.c 		adv7175_write(sd, 0x01, 0x78);
sd                397 drivers/media/i2c/adv7175.c 	struct v4l2_subdev *sd;
sd                409 drivers/media/i2c/adv7175.c 	sd = &encoder->sd;
sd                410 drivers/media/i2c/adv7175.c 	v4l2_i2c_subdev_init(sd, client, &adv7175_ops);
sd                414 drivers/media/i2c/adv7175.c 	i = adv7175_write_block(sd, init_common, sizeof(init_common));
sd                416 drivers/media/i2c/adv7175.c 		i = adv7175_write(sd, 0x07, TR0MODE | TR0RST);
sd                417 drivers/media/i2c/adv7175.c 		i = adv7175_write(sd, 0x07, TR0MODE);
sd                418 drivers/media/i2c/adv7175.c 		i = adv7175_read(sd, 0x12);
sd                419 drivers/media/i2c/adv7175.c 		v4l2_dbg(1, debug, sd, "revision %d\n", i & 1);
sd                422 drivers/media/i2c/adv7175.c 		v4l2_dbg(1, debug, sd, "init error 0x%x\n", i);
sd                428 drivers/media/i2c/adv7175.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                430 drivers/media/i2c/adv7175.c 	v4l2_device_unregister_subdev(sd);
sd                203 drivers/media/i2c/adv7180.c 	struct v4l2_subdev	sd;
sd                222 drivers/media/i2c/adv7180.c 					    ctrl_hdl)->sd)
sd                343 drivers/media/i2c/adv7180.c static inline struct adv7180_state *to_state(struct v4l2_subdev *sd)
sd                345 drivers/media/i2c/adv7180.c 	return container_of(sd, struct adv7180_state, sd);
sd                348 drivers/media/i2c/adv7180.c static int adv7180_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
sd                350 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd                379 drivers/media/i2c/adv7180.c static int adv7180_s_routing(struct v4l2_subdev *sd, u32 input,
sd                382 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd                402 drivers/media/i2c/adv7180.c static int adv7180_g_input_status(struct v4l2_subdev *sd, u32 *status)
sd                404 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd                428 drivers/media/i2c/adv7180.c static int adv7180_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd                430 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd                449 drivers/media/i2c/adv7180.c static int adv7180_g_std(struct v4l2_subdev *sd, v4l2_std_id *norm)
sd                451 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd                458 drivers/media/i2c/adv7180.c static int adv7180_g_frame_interval(struct v4l2_subdev *sd,
sd                461 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd                519 drivers/media/i2c/adv7180.c static int adv7180_s_power(struct v4l2_subdev *sd, int on)
sd                521 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd                538 drivers/media/i2c/adv7180.c 	struct v4l2_subdev *sd = to_adv7180_sd(ctrl);
sd                539 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd                619 drivers/media/i2c/adv7180.c 	state->sd.ctrl_handler = &state->ctrl_hdl;
sd                635 drivers/media/i2c/adv7180.c static int adv7180_enum_mbus_code(struct v4l2_subdev *sd,
sd                647 drivers/media/i2c/adv7180.c static int adv7180_mbus_fmt(struct v4l2_subdev *sd,
sd                650 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd                701 drivers/media/i2c/adv7180.c static int adv7180_get_pad_format(struct v4l2_subdev *sd,
sd                705 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd                708 drivers/media/i2c/adv7180.c 		format->format = *v4l2_subdev_get_try_format(sd, cfg, 0);
sd                710 drivers/media/i2c/adv7180.c 		adv7180_mbus_fmt(sd, &format->format);
sd                717 drivers/media/i2c/adv7180.c static int adv7180_set_pad_format(struct v4l2_subdev *sd,
sd                721 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd                735 drivers/media/i2c/adv7180.c 	ret = adv7180_mbus_fmt(sd,  &format->format);
sd                745 drivers/media/i2c/adv7180.c 		framefmt = v4l2_subdev_get_try_format(sd, cfg, 0);
sd                752 drivers/media/i2c/adv7180.c static int adv7180_g_mbus_config(struct v4l2_subdev *sd,
sd                755 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd                775 drivers/media/i2c/adv7180.c static int adv7180_get_skip_frames(struct v4l2_subdev *sd, u32 *frames)
sd                782 drivers/media/i2c/adv7180.c static int adv7180_g_pixelaspect(struct v4l2_subdev *sd, struct v4l2_fract *aspect)
sd                784 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd                797 drivers/media/i2c/adv7180.c static int adv7180_g_tvnorms(struct v4l2_subdev *sd, v4l2_std_id *norm)
sd                803 drivers/media/i2c/adv7180.c static int adv7180_s_stream(struct v4l2_subdev *sd, int enable)
sd                805 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd                823 drivers/media/i2c/adv7180.c static int adv7180_subscribe_event(struct v4l2_subdev *sd,
sd                829 drivers/media/i2c/adv7180.c 		return v4l2_src_change_event_subdev_subscribe(sd, fh, sub);
sd                831 drivers/media/i2c/adv7180.c 		return v4l2_ctrl_subdev_subscribe_event(sd, fh, sub);
sd                889 drivers/media/i2c/adv7180.c 		v4l2_subdev_notify_event(&state->sd, &src_ch);
sd               1305 drivers/media/i2c/adv7180.c 	struct v4l2_subdev *sd;
sd               1355 drivers/media/i2c/adv7180.c 	sd = &state->sd;
sd               1356 drivers/media/i2c/adv7180.c 	v4l2_i2c_subdev_init(sd, client, &adv7180_ops);
sd               1357 drivers/media/i2c/adv7180.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
sd               1364 drivers/media/i2c/adv7180.c 	sd->entity.function = MEDIA_ENT_F_ATV_DECODER;
sd               1365 drivers/media/i2c/adv7180.c 	ret = media_entity_pads_init(&sd->entity, 1, &state->pad);
sd               1381 drivers/media/i2c/adv7180.c 	ret = v4l2_async_register_subdev(sd);
sd               1391 drivers/media/i2c/adv7180.c 	media_entity_cleanup(&sd->entity);
sd               1404 drivers/media/i2c/adv7180.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1405 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd               1407 drivers/media/i2c/adv7180.c 	v4l2_async_unregister_subdev(sd);
sd               1412 drivers/media/i2c/adv7180.c 	media_entity_cleanup(&sd->entity);
sd               1445 drivers/media/i2c/adv7180.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1446 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd               1454 drivers/media/i2c/adv7180.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1455 drivers/media/i2c/adv7180.c 	struct adv7180_state *state = to_state(sd);
sd                 25 drivers/media/i2c/adv7183.c 	struct v4l2_subdev sd;
sd                 63 drivers/media/i2c/adv7183.c static inline struct adv7183 *to_adv7183(struct v4l2_subdev *sd)
sd                 65 drivers/media/i2c/adv7183.c 	return container_of(sd, struct adv7183, sd);
sd                 69 drivers/media/i2c/adv7183.c 	return &container_of(ctrl->handler, struct adv7183, hdl)->sd;
sd                 72 drivers/media/i2c/adv7183.c static inline int adv7183_read(struct v4l2_subdev *sd, unsigned char reg)
sd                 74 drivers/media/i2c/adv7183.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 79 drivers/media/i2c/adv7183.c static inline int adv7183_write(struct v4l2_subdev *sd, unsigned char reg,
sd                 82 drivers/media/i2c/adv7183.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 87 drivers/media/i2c/adv7183.c static int adv7183_writeregs(struct v4l2_subdev *sd,
sd                 94 drivers/media/i2c/adv7183.c 		v4l2_err(sd, "invalid regs array\n");
sd                103 drivers/media/i2c/adv7183.c 		adv7183_write(sd, reg, data);
sd                108 drivers/media/i2c/adv7183.c static int adv7183_log_status(struct v4l2_subdev *sd)
sd                110 drivers/media/i2c/adv7183.c 	struct adv7183 *decoder = to_adv7183(sd);
sd                112 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Input control = 0x%02x\n",
sd                113 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_IN_CTRL));
sd                114 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Video selection = 0x%02x\n",
sd                115 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_VD_SEL));
sd                116 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Output control = 0x%02x\n",
sd                117 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_OUT_CTRL));
sd                118 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Extended output control = 0x%02x\n",
sd                119 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_EXT_OUT_CTRL));
sd                120 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Autodetect enable = 0x%02x\n",
sd                121 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_AUTO_DET_EN));
sd                122 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Contrast = 0x%02x\n",
sd                123 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_CONTRAST));
sd                124 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Brightness = 0x%02x\n",
sd                125 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_BRIGHTNESS));
sd                126 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Hue = 0x%02x\n",
sd                127 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_HUE));
sd                128 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Default value Y = 0x%02x\n",
sd                129 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_DEF_Y));
sd                130 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Default value C = 0x%02x\n",
sd                131 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_DEF_C));
sd                132 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: ADI control = 0x%02x\n",
sd                133 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_ADI_CTRL));
sd                134 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Power Management = 0x%02x\n",
sd                135 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_POW_MANAGE));
sd                136 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Status 1 2 and 3 = 0x%02x 0x%02x 0x%02x\n",
sd                137 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_STATUS_1),
sd                138 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_STATUS_2),
sd                139 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_STATUS_3));
sd                140 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Ident = 0x%02x\n",
sd                141 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_IDENT));
sd                142 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Analog clamp control = 0x%02x\n",
sd                143 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_ANAL_CLAMP_CTRL));
sd                144 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Digital clamp control 1 = 0x%02x\n",
sd                145 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_DIGI_CLAMP_CTRL_1));
sd                146 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Shaping filter control 1 and 2 = 0x%02x 0x%02x\n",
sd                147 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_SHAP_FILT_CTRL),
sd                148 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_SHAP_FILT_CTRL_2));
sd                149 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Comb filter control = 0x%02x\n",
sd                150 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_COMB_FILT_CTRL));
sd                151 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: ADI control 2 = 0x%02x\n",
sd                152 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_ADI_CTRL_2));
sd                153 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Pixel delay control = 0x%02x\n",
sd                154 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_PIX_DELAY_CTRL));
sd                155 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Misc gain control = 0x%02x\n",
sd                156 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_MISC_GAIN_CTRL));
sd                157 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: AGC mode control = 0x%02x\n",
sd                158 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_AGC_MODE_CTRL));
sd                159 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Chroma gain control 1 and 2 = 0x%02x 0x%02x\n",
sd                160 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_CHRO_GAIN_CTRL_1),
sd                161 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_CHRO_GAIN_CTRL_2));
sd                162 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Luma gain control 1 and 2 = 0x%02x 0x%02x\n",
sd                163 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_LUMA_GAIN_CTRL_1),
sd                164 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_LUMA_GAIN_CTRL_2));
sd                165 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Vsync field control 1 2 and 3 = 0x%02x 0x%02x 0x%02x\n",
sd                166 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_VS_FIELD_CTRL_1),
sd                167 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_VS_FIELD_CTRL_2),
sd                168 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_VS_FIELD_CTRL_3));
sd                169 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Hsync position control 1 2 and 3 = 0x%02x 0x%02x 0x%02x\n",
sd                170 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_HS_POS_CTRL_1),
sd                171 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_HS_POS_CTRL_2),
sd                172 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_HS_POS_CTRL_3));
sd                173 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Polarity = 0x%02x\n",
sd                174 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_POLARITY));
sd                175 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: ADC control = 0x%02x\n",
sd                176 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_ADC_CTRL));
sd                177 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: SD offset Cb and Cr = 0x%02x 0x%02x\n",
sd                178 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_SD_OFFSET_CB),
sd                179 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_SD_OFFSET_CR));
sd                180 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: SD saturation Cb and Cr = 0x%02x 0x%02x\n",
sd                181 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_SD_SATURATION_CB),
sd                182 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_SD_SATURATION_CR));
sd                183 drivers/media/i2c/adv7183.c 	v4l2_info(sd, "adv7183: Drive strength = 0x%02x\n",
sd                184 drivers/media/i2c/adv7183.c 			adv7183_read(sd, ADV7183_DRIVE_STR));
sd                185 drivers/media/i2c/adv7183.c 	v4l2_ctrl_handler_log_status(&decoder->hdl, sd->name);
sd                189 drivers/media/i2c/adv7183.c static int adv7183_g_std(struct v4l2_subdev *sd, v4l2_std_id *std)
sd                191 drivers/media/i2c/adv7183.c 	struct adv7183 *decoder = to_adv7183(sd);
sd                197 drivers/media/i2c/adv7183.c static int adv7183_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd                199 drivers/media/i2c/adv7183.c 	struct adv7183 *decoder = to_adv7183(sd);
sd                202 drivers/media/i2c/adv7183.c 	reg = adv7183_read(sd, ADV7183_IN_CTRL) & 0xF;
sd                221 drivers/media/i2c/adv7183.c 	adv7183_write(sd, ADV7183_IN_CTRL, reg);
sd                228 drivers/media/i2c/adv7183.c static int adv7183_reset(struct v4l2_subdev *sd, u32 val)
sd                232 drivers/media/i2c/adv7183.c 	reg = adv7183_read(sd, ADV7183_POW_MANAGE) | 0x80;
sd                233 drivers/media/i2c/adv7183.c 	adv7183_write(sd, ADV7183_POW_MANAGE, reg);
sd                239 drivers/media/i2c/adv7183.c static int adv7183_s_routing(struct v4l2_subdev *sd,
sd                242 drivers/media/i2c/adv7183.c 	struct adv7183 *decoder = to_adv7183(sd);
sd                250 drivers/media/i2c/adv7183.c 		reg = adv7183_read(sd, ADV7183_IN_CTRL) & 0xF0;
sd                300 drivers/media/i2c/adv7183.c 		adv7183_write(sd, ADV7183_IN_CTRL, reg);
sd                305 drivers/media/i2c/adv7183.c 		reg = adv7183_read(sd, ADV7183_OUT_CTRL) & 0xC0;
sd                314 drivers/media/i2c/adv7183.c 		adv7183_write(sd, ADV7183_OUT_CTRL, reg);
sd                322 drivers/media/i2c/adv7183.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                329 drivers/media/i2c/adv7183.c 		adv7183_write(sd, ADV7183_BRIGHTNESS, val);
sd                332 drivers/media/i2c/adv7183.c 		adv7183_write(sd, ADV7183_CONTRAST, val);
sd                335 drivers/media/i2c/adv7183.c 		adv7183_write(sd, ADV7183_SD_SATURATION_CB, val >> 8);
sd                336 drivers/media/i2c/adv7183.c 		adv7183_write(sd, ADV7183_SD_SATURATION_CR, (val & 0xFF));
sd                339 drivers/media/i2c/adv7183.c 		adv7183_write(sd, ADV7183_SD_OFFSET_CB, val >> 8);
sd                340 drivers/media/i2c/adv7183.c 		adv7183_write(sd, ADV7183_SD_OFFSET_CR, (val & 0xFF));
sd                349 drivers/media/i2c/adv7183.c static int adv7183_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
sd                351 drivers/media/i2c/adv7183.c 	struct adv7183 *decoder = to_adv7183(sd);
sd                355 drivers/media/i2c/adv7183.c 	reg = adv7183_read(sd, ADV7183_IN_CTRL) & 0xF;
sd                356 drivers/media/i2c/adv7183.c 	adv7183_write(sd, ADV7183_IN_CTRL, reg);
sd                362 drivers/media/i2c/adv7183.c 	reg = adv7183_read(sd, ADV7183_STATUS_1);
sd                394 drivers/media/i2c/adv7183.c 	adv7183_s_std(sd, decoder->std);
sd                398 drivers/media/i2c/adv7183.c static int adv7183_g_input_status(struct v4l2_subdev *sd, u32 *status)
sd                403 drivers/media/i2c/adv7183.c 	reg = adv7183_read(sd, ADV7183_STATUS_1);
sd                411 drivers/media/i2c/adv7183.c static int adv7183_enum_mbus_code(struct v4l2_subdev *sd,
sd                422 drivers/media/i2c/adv7183.c static int adv7183_set_fmt(struct v4l2_subdev *sd,
sd                426 drivers/media/i2c/adv7183.c 	struct adv7183 *decoder = to_adv7183(sd);
sd                450 drivers/media/i2c/adv7183.c static int adv7183_get_fmt(struct v4l2_subdev *sd,
sd                454 drivers/media/i2c/adv7183.c 	struct adv7183 *decoder = to_adv7183(sd);
sd                463 drivers/media/i2c/adv7183.c static int adv7183_s_stream(struct v4l2_subdev *sd, int enable)
sd                465 drivers/media/i2c/adv7183.c 	struct adv7183 *decoder = to_adv7183(sd);
sd                476 drivers/media/i2c/adv7183.c static int adv7183_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
sd                478 drivers/media/i2c/adv7183.c 	reg->val = adv7183_read(sd, reg->reg & 0xff);
sd                483 drivers/media/i2c/adv7183.c static int adv7183_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
sd                485 drivers/media/i2c/adv7183.c 	adv7183_write(sd, reg->reg & 0xff, reg->val & 0xff);
sd                528 drivers/media/i2c/adv7183.c 	struct v4l2_subdev *sd;
sd                567 drivers/media/i2c/adv7183.c 	sd = &decoder->sd;
sd                568 drivers/media/i2c/adv7183.c 	v4l2_i2c_subdev_init(sd, client, &adv7183_ops);
sd                581 drivers/media/i2c/adv7183.c 	sd->ctrl_handler = hdl;
sd                601 drivers/media/i2c/adv7183.c 	adv7183_writeregs(sd, adv7183_init_regs, ARRAY_SIZE(adv7183_init_regs));
sd                602 drivers/media/i2c/adv7183.c 	adv7183_s_std(sd, decoder->std);
sd                605 drivers/media/i2c/adv7183.c 	adv7183_set_fmt(sd, NULL, &fmt);
sd                619 drivers/media/i2c/adv7183.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                621 drivers/media/i2c/adv7183.c 	v4l2_device_unregister_subdev(sd);
sd                622 drivers/media/i2c/adv7183.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                 46 drivers/media/i2c/adv7343.c 	struct v4l2_subdev sd;
sd                 59 drivers/media/i2c/adv7343.c static inline struct adv7343_state *to_state(struct v4l2_subdev *sd)
sd                 61 drivers/media/i2c/adv7343.c 	return container_of(sd, struct adv7343_state, sd);
sd                 66 drivers/media/i2c/adv7343.c 	return &container_of(ctrl->handler, struct adv7343_state, hdl)->sd;
sd                 69 drivers/media/i2c/adv7343.c static inline int adv7343_write(struct v4l2_subdev *sd, u8 reg, u8 value)
sd                 71 drivers/media/i2c/adv7343.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                132 drivers/media/i2c/adv7343.c static int adv7343_setstd(struct v4l2_subdev *sd, v4l2_std_id std)
sd                134 drivers/media/i2c/adv7343.c 	struct adv7343_state *state = to_state(sd);
sd                151 drivers/media/i2c/adv7343.c 		v4l2_dbg(1, debug, sd,
sd                160 drivers/media/i2c/adv7343.c 	err = adv7343_write(sd, ADV7343_SD_MODE_REG1, val);
sd                169 drivers/media/i2c/adv7343.c 	err = adv7343_write(sd, ADV7343_MODE_SELECT_REG, val);
sd                179 drivers/media/i2c/adv7343.c 		err = adv7343_write(sd, reg, *fsc_ptr);
sd                192 drivers/media/i2c/adv7343.c 	err = adv7343_write(sd, ADV7343_SD_MODE_REG1, val);
sd                200 drivers/media/i2c/adv7343.c 		v4l2_err(sd, "Error setting std, write failed\n");
sd                205 drivers/media/i2c/adv7343.c static int adv7343_setoutput(struct v4l2_subdev *sd, u32 output_type)
sd                207 drivers/media/i2c/adv7343.c 	struct adv7343_state *state = to_state(sd);
sd                212 drivers/media/i2c/adv7343.c 		v4l2_dbg(1, debug, sd,
sd                239 drivers/media/i2c/adv7343.c 	err = adv7343_write(sd, ADV7343_POWER_MODE_REG, val);
sd                247 drivers/media/i2c/adv7343.c 	err = adv7343_write(sd, ADV7343_MODE_REG0, val);
sd                266 drivers/media/i2c/adv7343.c 	err = adv7343_write(sd, ADV7343_SD_MODE_REG2, val);
sd                275 drivers/media/i2c/adv7343.c 	err = adv7343_write(sd, ADV7343_HD_MODE_REG6, val);
sd                283 drivers/media/i2c/adv7343.c 		v4l2_err(sd, "Error setting output, write failed\n");
sd                288 drivers/media/i2c/adv7343.c static int adv7343_log_status(struct v4l2_subdev *sd)
sd                290 drivers/media/i2c/adv7343.c 	struct adv7343_state *state = to_state(sd);
sd                292 drivers/media/i2c/adv7343.c 	v4l2_info(sd, "Standard: %llx\n", (unsigned long long)state->std);
sd                293 drivers/media/i2c/adv7343.c 	v4l2_info(sd, "Output: %s\n", (state->output == 0) ? "Composite" :
sd                300 drivers/media/i2c/adv7343.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                304 drivers/media/i2c/adv7343.c 		return adv7343_write(sd, ADV7343_SD_BRIGHTNESS_WSS,
sd                308 drivers/media/i2c/adv7343.c 		return adv7343_write(sd, ADV7343_SD_HUE_REG, ctrl->val);
sd                311 drivers/media/i2c/adv7343.c 		return adv7343_write(sd, ADV7343_DAC2_OUTPUT_LEVEL, ctrl->val);
sd                324 drivers/media/i2c/adv7343.c static int adv7343_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
sd                326 drivers/media/i2c/adv7343.c 	struct adv7343_state *state = to_state(sd);
sd                332 drivers/media/i2c/adv7343.c 	err = adv7343_setstd(sd, std);
sd                339 drivers/media/i2c/adv7343.c static int adv7343_s_routing(struct v4l2_subdev *sd,
sd                342 drivers/media/i2c/adv7343.c 	struct adv7343_state *state = to_state(sd);
sd                348 drivers/media/i2c/adv7343.c 	err = adv7343_setoutput(sd, output);
sd                365 drivers/media/i2c/adv7343.c static int adv7343_initialize(struct v4l2_subdev *sd)
sd                367 drivers/media/i2c/adv7343.c 	struct adv7343_state *state = to_state(sd);
sd                373 drivers/media/i2c/adv7343.c 		err = adv7343_write(sd, adv7343_init_reg_val[i],
sd                376 drivers/media/i2c/adv7343.c 			v4l2_err(sd, "Error initializing\n");
sd                382 drivers/media/i2c/adv7343.c 	err = adv7343_setoutput(sd, state->output);
sd                384 drivers/media/i2c/adv7343.c 		v4l2_err(sd, "Error setting output during init\n");
sd                388 drivers/media/i2c/adv7343.c 	err = adv7343_setstd(sd, state->std);
sd                390 drivers/media/i2c/adv7343.c 		v4l2_err(sd, "Error setting std during init\n");
sd                460 drivers/media/i2c/adv7343.c 	v4l2_i2c_subdev_init(&state->sd, client, &adv7343_ops);
sd                475 drivers/media/i2c/adv7343.c 	state->sd.ctrl_handler = &state->hdl;
sd                482 drivers/media/i2c/adv7343.c 	err = adv7343_initialize(&state->sd);
sd                486 drivers/media/i2c/adv7343.c 	err = v4l2_async_register_subdev(&state->sd);
sd                497 drivers/media/i2c/adv7343.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                498 drivers/media/i2c/adv7343.c 	struct adv7343_state *state = to_state(sd);
sd                500 drivers/media/i2c/adv7343.c 	v4l2_async_unregister_subdev(&state->sd);
sd                 48 drivers/media/i2c/adv7393.c 	struct v4l2_subdev sd;
sd                 60 drivers/media/i2c/adv7393.c static inline struct adv7393_state *to_state(struct v4l2_subdev *sd)
sd                 62 drivers/media/i2c/adv7393.c 	return container_of(sd, struct adv7393_state, sd);
sd                 67 drivers/media/i2c/adv7393.c 	return &container_of(ctrl->handler, struct adv7393_state, hdl)->sd;
sd                 70 drivers/media/i2c/adv7393.c static inline int adv7393_write(struct v4l2_subdev *sd, u8 reg, u8 value)
sd                 72 drivers/media/i2c/adv7393.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                135 drivers/media/i2c/adv7393.c static int adv7393_setstd(struct v4l2_subdev *sd, v4l2_std_id std)
sd                137 drivers/media/i2c/adv7393.c 	struct adv7393_state *state = to_state(sd);
sd                153 drivers/media/i2c/adv7393.c 		v4l2_dbg(1, debug, sd,
sd                164 drivers/media/i2c/adv7393.c 	err = adv7393_write(sd, ADV7393_SD_MODE_REG1, val);
sd                173 drivers/media/i2c/adv7393.c 	err = adv7393_write(sd, ADV7393_MODE_SELECT_REG, val);
sd                182 drivers/media/i2c/adv7393.c 		err = adv7393_write(sd, reg, val);
sd                196 drivers/media/i2c/adv7393.c 	err = adv7393_write(sd, ADV7393_SD_MODE_REG2, val);
sd                204 drivers/media/i2c/adv7393.c 		v4l2_err(sd, "Error setting std, write failed\n");
sd                209 drivers/media/i2c/adv7393.c static int adv7393_setoutput(struct v4l2_subdev *sd, u32 output_type)
sd                211 drivers/media/i2c/adv7393.c 	struct adv7393_state *state = to_state(sd);
sd                216 drivers/media/i2c/adv7393.c 		v4l2_dbg(1, debug, sd,
sd                232 drivers/media/i2c/adv7393.c 	err = adv7393_write(sd, ADV7393_POWER_MODE_REG, val);
sd                240 drivers/media/i2c/adv7393.c 	err = adv7393_write(sd, ADV7393_MODE_REG0, val);
sd                252 drivers/media/i2c/adv7393.c 	err = adv7393_write(sd, ADV7393_SD_MODE_REG2, val);
sd                260 drivers/media/i2c/adv7393.c 	err = adv7393_write(sd, ADV7393_HD_MODE_REG6, val);
sd                268 drivers/media/i2c/adv7393.c 		v4l2_err(sd, "Error setting output, write failed\n");
sd                273 drivers/media/i2c/adv7393.c static int adv7393_log_status(struct v4l2_subdev *sd)
sd                275 drivers/media/i2c/adv7393.c 	struct adv7393_state *state = to_state(sd);
sd                277 drivers/media/i2c/adv7393.c 	v4l2_info(sd, "Standard: %llx\n", (unsigned long long)state->std);
sd                278 drivers/media/i2c/adv7393.c 	v4l2_info(sd, "Output: %s\n", (state->output == 0) ? "Composite" :
sd                285 drivers/media/i2c/adv7393.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                289 drivers/media/i2c/adv7393.c 		return adv7393_write(sd, ADV7393_SD_BRIGHTNESS_WSS,
sd                293 drivers/media/i2c/adv7393.c 		return adv7393_write(sd, ADV7393_SD_HUE_ADJUST,
sd                297 drivers/media/i2c/adv7393.c 		return adv7393_write(sd, ADV7393_DAC123_OUTPUT_LEVEL,
sd                311 drivers/media/i2c/adv7393.c static int adv7393_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
sd                313 drivers/media/i2c/adv7393.c 	struct adv7393_state *state = to_state(sd);
sd                319 drivers/media/i2c/adv7393.c 	err = adv7393_setstd(sd, std);
sd                326 drivers/media/i2c/adv7393.c static int adv7393_s_routing(struct v4l2_subdev *sd,
sd                329 drivers/media/i2c/adv7393.c 	struct adv7393_state *state = to_state(sd);
sd                335 drivers/media/i2c/adv7393.c 	err = adv7393_setoutput(sd, output);
sd                352 drivers/media/i2c/adv7393.c static int adv7393_initialize(struct v4l2_subdev *sd)
sd                354 drivers/media/i2c/adv7393.c 	struct adv7393_state *state = to_state(sd);
sd                360 drivers/media/i2c/adv7393.c 		err = adv7393_write(sd, adv7393_init_reg_val[i],
sd                363 drivers/media/i2c/adv7393.c 			v4l2_err(sd, "Error initializing\n");
sd                369 drivers/media/i2c/adv7393.c 	err = adv7393_setoutput(sd, state->output);
sd                371 drivers/media/i2c/adv7393.c 		v4l2_err(sd, "Error setting output during init\n");
sd                375 drivers/media/i2c/adv7393.c 	err = adv7393_setstd(sd, state->std);
sd                377 drivers/media/i2c/adv7393.c 		v4l2_err(sd, "Error setting std during init\n");
sd                410 drivers/media/i2c/adv7393.c 	v4l2_i2c_subdev_init(&state->sd, client, &adv7393_ops);
sd                425 drivers/media/i2c/adv7393.c 	state->sd.ctrl_handler = &state->hdl;
sd                434 drivers/media/i2c/adv7393.c 	err = adv7393_initialize(&state->sd);
sd                442 drivers/media/i2c/adv7393.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                443 drivers/media/i2c/adv7393.c 	struct adv7393_state *state = to_state(sd);
sd                445 drivers/media/i2c/adv7393.c 	v4l2_device_unregister_subdev(sd);
sd                164 drivers/media/i2c/adv748x/adv748x-afe.c static int adv748x_afe_g_pixelaspect(struct v4l2_subdev *sd,
sd                167 drivers/media/i2c/adv748x/adv748x-afe.c 	struct adv748x_afe *afe = adv748x_sd_to_afe(sd);
sd                184 drivers/media/i2c/adv748x/adv748x-afe.c static int adv748x_afe_g_std(struct v4l2_subdev *sd, v4l2_std_id *norm)
sd                186 drivers/media/i2c/adv748x/adv748x-afe.c 	struct adv748x_afe *afe = adv748x_sd_to_afe(sd);
sd                193 drivers/media/i2c/adv748x/adv748x-afe.c static int adv748x_afe_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd                195 drivers/media/i2c/adv748x/adv748x-afe.c 	struct adv748x_afe *afe = adv748x_sd_to_afe(sd);
sd                212 drivers/media/i2c/adv748x/adv748x-afe.c static int adv748x_afe_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
sd                214 drivers/media/i2c/adv748x/adv748x-afe.c 	struct adv748x_afe *afe = adv748x_sd_to_afe(sd);
sd                248 drivers/media/i2c/adv748x/adv748x-afe.c static int adv748x_afe_g_tvnorms(struct v4l2_subdev *sd, v4l2_std_id *norm)
sd                255 drivers/media/i2c/adv748x/adv748x-afe.c static int adv748x_afe_g_input_status(struct v4l2_subdev *sd, u32 *status)
sd                257 drivers/media/i2c/adv748x/adv748x-afe.c 	struct adv748x_afe *afe = adv748x_sd_to_afe(sd);
sd                270 drivers/media/i2c/adv748x/adv748x-afe.c static int adv748x_afe_s_stream(struct v4l2_subdev *sd, int enable)
sd                272 drivers/media/i2c/adv748x/adv748x-afe.c 	struct adv748x_afe *afe = adv748x_sd_to_afe(sd);
sd                333 drivers/media/i2c/adv748x/adv748x-afe.c static int adv748x_afe_enum_mbus_code(struct v4l2_subdev *sd,
sd                345 drivers/media/i2c/adv748x/adv748x-afe.c static int adv748x_afe_get_format(struct v4l2_subdev *sd,
sd                349 drivers/media/i2c/adv748x/adv748x-afe.c 	struct adv748x_afe *afe = adv748x_sd_to_afe(sd);
sd                357 drivers/media/i2c/adv748x/adv748x-afe.c 		mbusformat = v4l2_subdev_get_try_format(sd, cfg, sdformat->pad);
sd                367 drivers/media/i2c/adv748x/adv748x-afe.c static int adv748x_afe_set_format(struct v4l2_subdev *sd,
sd                378 drivers/media/i2c/adv748x/adv748x-afe.c 		return adv748x_afe_get_format(sd, cfg, sdformat);
sd                380 drivers/media/i2c/adv748x/adv748x-afe.c 	mbusformat = v4l2_subdev_get_try_format(sd, cfg, sdformat->pad);
sd                492 drivers/media/i2c/adv748x/adv748x-afe.c 	afe->sd.ctrl_handler = &afe->ctrl_hdl;
sd                511 drivers/media/i2c/adv748x/adv748x-afe.c 	adv748x_subdev_init(&afe->sd, state, &adv748x_afe_ops,
sd                533 drivers/media/i2c/adv748x/adv748x-afe.c 	ret = media_entity_pads_init(&afe->sd.entity, ADV748X_AFE_NR_PADS,
sd                545 drivers/media/i2c/adv748x/adv748x-afe.c 	media_entity_cleanup(&afe->sd.entity);
sd                552 drivers/media/i2c/adv748x/adv748x-afe.c 	v4l2_device_unregister_subdev(&afe->sd);
sd                553 drivers/media/i2c/adv748x/adv748x-afe.c 	media_entity_cleanup(&afe->sd.entity);
sd                250 drivers/media/i2c/adv748x/adv748x-core.c 	if (tx->src == &state->hdmi.sd) {
sd                336 drivers/media/i2c/adv748x/adv748x-core.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd                337 drivers/media/i2c/adv748x/adv748x-core.c 	struct adv748x_state *state = v4l2_get_subdevdata(sd);
sd                338 drivers/media/i2c/adv748x/adv748x-core.c 	struct adv748x_csi2 *tx = adv748x_sd_to_csi2(sd);
sd                350 drivers/media/i2c/adv748x/adv748x-core.c 	if (rsd == &state->afe.sd)
sd                549 drivers/media/i2c/adv748x/adv748x-core.c void adv748x_subdev_init(struct v4l2_subdev *sd, struct adv748x_state *state,
sd                553 drivers/media/i2c/adv748x/adv748x-core.c 	v4l2_subdev_init(sd, ops);
sd                554 drivers/media/i2c/adv748x/adv748x-core.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                557 drivers/media/i2c/adv748x/adv748x-core.c 	sd->owner = state->dev->driver->owner;
sd                558 drivers/media/i2c/adv748x/adv748x-core.c 	sd->dev = state->dev;
sd                560 drivers/media/i2c/adv748x/adv748x-core.c 	v4l2_set_subdevdata(sd, state);
sd                563 drivers/media/i2c/adv748x/adv748x-core.c 	snprintf(sd->name, sizeof(sd->name), "%s %d-%04x %s",
sd                568 drivers/media/i2c/adv748x/adv748x-core.c 	sd->entity.function = function;
sd                569 drivers/media/i2c/adv748x/adv748x-core.c 	sd->entity.ops = is_tx(adv748x_sd_to_csi2(sd)) ?
sd                 50 drivers/media/i2c/adv748x/adv748x-csi2.c 				    &tx->sd.entity, ADV748X_CSI2_SINK,
sd                 69 drivers/media/i2c/adv748x/adv748x-csi2.c static int adv748x_csi2_registered(struct v4l2_subdev *sd)
sd                 71 drivers/media/i2c/adv748x/adv748x-csi2.c 	struct adv748x_csi2 *tx = adv748x_sd_to_csi2(sd);
sd                 76 drivers/media/i2c/adv748x/adv748x-csi2.c 			sd->name);
sd                 85 drivers/media/i2c/adv748x/adv748x-csi2.c 		ret = adv748x_csi2_register_link(tx, sd->v4l2_dev,
sd                 86 drivers/media/i2c/adv748x/adv748x-csi2.c 						 &state->afe.sd,
sd                101 drivers/media/i2c/adv748x/adv748x-csi2.c 	ret = adv748x_csi2_register_link(tx, sd->v4l2_dev, &state->hdmi.sd,
sd                120 drivers/media/i2c/adv748x/adv748x-csi2.c static int adv748x_csi2_s_stream(struct v4l2_subdev *sd, int enable)
sd                122 drivers/media/i2c/adv748x/adv748x-csi2.c 	struct adv748x_csi2 *tx = adv748x_sd_to_csi2(sd);
sd                144 drivers/media/i2c/adv748x/adv748x-csi2.c adv748x_csi2_get_pad_format(struct v4l2_subdev *sd,
sd                148 drivers/media/i2c/adv748x/adv748x-csi2.c 	struct adv748x_csi2 *tx = adv748x_sd_to_csi2(sd);
sd                151 drivers/media/i2c/adv748x/adv748x-csi2.c 		return v4l2_subdev_get_try_format(sd, cfg, pad);
sd                156 drivers/media/i2c/adv748x/adv748x-csi2.c static int adv748x_csi2_get_format(struct v4l2_subdev *sd,
sd                160 drivers/media/i2c/adv748x/adv748x-csi2.c 	struct adv748x_csi2 *tx = adv748x_sd_to_csi2(sd);
sd                164 drivers/media/i2c/adv748x/adv748x-csi2.c 	mbusformat = adv748x_csi2_get_pad_format(sd, cfg, sdformat->pad,
sd                178 drivers/media/i2c/adv748x/adv748x-csi2.c static int adv748x_csi2_set_format(struct v4l2_subdev *sd,
sd                182 drivers/media/i2c/adv748x/adv748x-csi2.c 	struct adv748x_csi2 *tx = adv748x_sd_to_csi2(sd);
sd                187 drivers/media/i2c/adv748x/adv748x-csi2.c 	mbusformat = adv748x_csi2_get_pad_format(sd, cfg, sdformat->pad,
sd                197 drivers/media/i2c/adv748x/adv748x-csi2.c 		sink_fmt = adv748x_csi2_get_pad_format(sd, cfg,
sd                235 drivers/media/i2c/adv748x/adv748x-csi2.c int adv748x_csi2_set_pixelrate(struct v4l2_subdev *sd, s64 rate)
sd                237 drivers/media/i2c/adv748x/adv748x-csi2.c 	struct adv748x_csi2 *tx = adv748x_sd_to_csi2(sd);
sd                269 drivers/media/i2c/adv748x/adv748x-csi2.c 	tx->sd.ctrl_handler = &tx->ctrl_hdl;
sd                288 drivers/media/i2c/adv748x/adv748x-csi2.c 	adv748x_subdev_init(&tx->sd, state, &adv748x_csi2_ops,
sd                293 drivers/media/i2c/adv748x/adv748x-csi2.c 	tx->sd.fwnode = of_fwnode_handle(state->endpoints[tx->port]);
sd                296 drivers/media/i2c/adv748x/adv748x-csi2.c 	tx->sd.internal_ops = &adv748x_csi2_internal_ops;
sd                301 drivers/media/i2c/adv748x/adv748x-csi2.c 	ret = media_entity_pads_init(&tx->sd.entity, ADV748X_CSI2_NR_PADS,
sd                310 drivers/media/i2c/adv748x/adv748x-csi2.c 	ret = v4l2_async_register_subdev(&tx->sd);
sd                319 drivers/media/i2c/adv748x/adv748x-csi2.c 	media_entity_cleanup(&tx->sd.entity);
sd                329 drivers/media/i2c/adv748x/adv748x-csi2.c 	v4l2_async_unregister_subdev(&tx->sd);
sd                330 drivers/media/i2c/adv748x/adv748x-csi2.c 	media_entity_cleanup(&tx->sd.entity);
sd                217 drivers/media/i2c/adv748x/adv748x-hdmi.c static int adv748x_hdmi_s_dv_timings(struct v4l2_subdev *sd,
sd                220 drivers/media/i2c/adv748x/adv748x-hdmi.c 	struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
sd                257 drivers/media/i2c/adv748x/adv748x-hdmi.c static int adv748x_hdmi_g_dv_timings(struct v4l2_subdev *sd,
sd                260 drivers/media/i2c/adv748x/adv748x-hdmi.c 	struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
sd                272 drivers/media/i2c/adv748x/adv748x-hdmi.c static int adv748x_hdmi_query_dv_timings(struct v4l2_subdev *sd,
sd                275 drivers/media/i2c/adv748x/adv748x-hdmi.c 	struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
sd                339 drivers/media/i2c/adv748x/adv748x-hdmi.c static int adv748x_hdmi_g_input_status(struct v4l2_subdev *sd, u32 *status)
sd                341 drivers/media/i2c/adv748x/adv748x-hdmi.c 	struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
sd                353 drivers/media/i2c/adv748x/adv748x-hdmi.c static int adv748x_hdmi_s_stream(struct v4l2_subdev *sd, int enable)
sd                355 drivers/media/i2c/adv748x/adv748x-hdmi.c 	struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
sd                375 drivers/media/i2c/adv748x/adv748x-hdmi.c static int adv748x_hdmi_g_pixelaspect(struct v4l2_subdev *sd,
sd                406 drivers/media/i2c/adv748x/adv748x-hdmi.c 	adv748x_hdmi_query_dv_timings(&hdmi->sd, &timings);
sd                411 drivers/media/i2c/adv748x/adv748x-hdmi.c static int adv748x_hdmi_enum_mbus_code(struct v4l2_subdev *sd,
sd                423 drivers/media/i2c/adv748x/adv748x-hdmi.c static int adv748x_hdmi_get_format(struct v4l2_subdev *sd,
sd                427 drivers/media/i2c/adv748x/adv748x-hdmi.c 	struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
sd                434 drivers/media/i2c/adv748x/adv748x-hdmi.c 		mbusformat = v4l2_subdev_get_try_format(sd, cfg, sdformat->pad);
sd                444 drivers/media/i2c/adv748x/adv748x-hdmi.c static int adv748x_hdmi_set_format(struct v4l2_subdev *sd,
sd                454 drivers/media/i2c/adv748x/adv748x-hdmi.c 		return adv748x_hdmi_get_format(sd, cfg, sdformat);
sd                456 drivers/media/i2c/adv748x/adv748x-hdmi.c 	mbusformat = v4l2_subdev_get_try_format(sd, cfg, sdformat->pad);
sd                462 drivers/media/i2c/adv748x/adv748x-hdmi.c static int adv748x_hdmi_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
sd                464 drivers/media/i2c/adv748x/adv748x-hdmi.c 	struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
sd                512 drivers/media/i2c/adv748x/adv748x-hdmi.c static int adv748x_hdmi_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
sd                514 drivers/media/i2c/adv748x/adv748x-hdmi.c 	struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
sd                555 drivers/media/i2c/adv748x/adv748x-hdmi.c 		v4l2_err(sd, "error %d writing edid pad %d\n", err, edid->pad);
sd                582 drivers/media/i2c/adv748x/adv748x-hdmi.c static int adv748x_hdmi_enum_dv_timings(struct v4l2_subdev *sd,
sd                589 drivers/media/i2c/adv748x/adv748x-hdmi.c static int adv748x_hdmi_dv_timings_cap(struct v4l2_subdev *sd,
sd                711 drivers/media/i2c/adv748x/adv748x-hdmi.c 	hdmi->sd.ctrl_handler = &hdmi->ctrl_hdl;
sd                733 drivers/media/i2c/adv748x/adv748x-hdmi.c 	adv748x_subdev_init(&hdmi->sd, state, &adv748x_ops_hdmi,
sd                739 drivers/media/i2c/adv748x/adv748x-hdmi.c 	ret = media_entity_pads_init(&hdmi->sd.entity,
sd                751 drivers/media/i2c/adv748x/adv748x-hdmi.c 	media_entity_cleanup(&hdmi->sd.entity);
sd                758 drivers/media/i2c/adv748x/adv748x-hdmi.c 	v4l2_device_unregister_subdev(&hdmi->sd);
sd                759 drivers/media/i2c/adv748x/adv748x-hdmi.c 	media_entity_cleanup(&hdmi->sd.entity);
sd                 87 drivers/media/i2c/adv748x/adv748x.h 	struct v4l2_subdev sd;
sd                 91 drivers/media/i2c/adv748x/adv748x.h #define adv748x_sd_to_csi2(sd) container_of(sd, struct adv748x_csi2, sd)
sd                118 drivers/media/i2c/adv748x/adv748x.h 	struct v4l2_subdev sd;
sd                135 drivers/media/i2c/adv748x/adv748x.h #define adv748x_sd_to_hdmi(sd) container_of(sd, struct adv748x_hdmi, sd)
sd                153 drivers/media/i2c/adv748x/adv748x.h 	struct v4l2_subdev sd;
sd                165 drivers/media/i2c/adv748x/adv748x.h #define adv748x_sd_to_afe(sd) container_of(sd, struct adv748x_afe, sd)
sd                426 drivers/media/i2c/adv748x/adv748x.h void adv748x_subdev_init(struct v4l2_subdev *sd, struct adv748x_state *state,
sd                440 drivers/media/i2c/adv748x/adv748x.h int adv748x_csi2_set_pixelrate(struct v4l2_subdev *sd, s64 rate);
sd                 84 drivers/media/i2c/adv7511-v4l2.c 	struct v4l2_subdev sd;
sd                127 drivers/media/i2c/adv7511-v4l2.c static void adv7511_check_monitor_present_status(struct v4l2_subdev *sd);
sd                128 drivers/media/i2c/adv7511-v4l2.c static bool adv7511_check_edid_status(struct v4l2_subdev *sd);
sd                129 drivers/media/i2c/adv7511-v4l2.c static void adv7511_setup(struct v4l2_subdev *sd);
sd                130 drivers/media/i2c/adv7511-v4l2.c static int adv7511_s_i2s_clock_freq(struct v4l2_subdev *sd, u32 freq);
sd                131 drivers/media/i2c/adv7511-v4l2.c static int adv7511_s_clock_freq(struct v4l2_subdev *sd, u32 freq);
sd                146 drivers/media/i2c/adv7511-v4l2.c static inline struct adv7511_state *get_adv7511_state(struct v4l2_subdev *sd)
sd                148 drivers/media/i2c/adv7511-v4l2.c 	return container_of(sd, struct adv7511_state, sd);
sd                153 drivers/media/i2c/adv7511-v4l2.c 	return &container_of(ctrl->handler, struct adv7511_state, hdl)->sd;
sd                188 drivers/media/i2c/adv7511-v4l2.c static int adv7511_rd(struct v4l2_subdev *sd, u8 reg)
sd                190 drivers/media/i2c/adv7511-v4l2.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                195 drivers/media/i2c/adv7511-v4l2.c static int adv7511_wr(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                197 drivers/media/i2c/adv7511-v4l2.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                206 drivers/media/i2c/adv7511-v4l2.c 	v4l2_err(sd, "%s: i2c write error\n", __func__);
sd                212 drivers/media/i2c/adv7511-v4l2.c static inline void adv7511_wr_and_or(struct v4l2_subdev *sd, u8 reg, u8 clr_mask, u8 val_mask)
sd                214 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, reg, (adv7511_rd(sd, reg) & clr_mask) | val_mask);
sd                234 drivers/media/i2c/adv7511-v4l2.c static void adv7511_edid_rd(struct v4l2_subdev *sd, uint16_t len, uint8_t *buf)
sd                236 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd                240 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd                246 drivers/media/i2c/adv7511-v4l2.c 		v4l2_err(sd, "%s: i2c read error\n", __func__);
sd                249 drivers/media/i2c/adv7511-v4l2.c static inline int adv7511_cec_read(struct v4l2_subdev *sd, u8 reg)
sd                251 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd                256 drivers/media/i2c/adv7511-v4l2.c static int adv7511_cec_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                258 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd                267 drivers/media/i2c/adv7511-v4l2.c 	v4l2_err(sd, "%s: I2C Write Problem\n", __func__);
sd                271 drivers/media/i2c/adv7511-v4l2.c static inline int adv7511_cec_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask,
sd                274 drivers/media/i2c/adv7511-v4l2.c 	return adv7511_cec_write(sd, reg, (adv7511_cec_read(sd, reg) & mask) | val);
sd                277 drivers/media/i2c/adv7511-v4l2.c static int adv7511_pktmem_rd(struct v4l2_subdev *sd, u8 reg)
sd                279 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd                284 drivers/media/i2c/adv7511-v4l2.c static int adv7511_pktmem_wr(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                286 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd                295 drivers/media/i2c/adv7511-v4l2.c 	v4l2_err(sd, "%s: i2c write error\n", __func__);
sd                301 drivers/media/i2c/adv7511-v4l2.c static inline void adv7511_pktmem_wr_and_or(struct v4l2_subdev *sd, u8 reg, u8 clr_mask, u8 val_mask)
sd                303 drivers/media/i2c/adv7511-v4l2.c 	adv7511_pktmem_wr(sd, reg, (adv7511_pktmem_rd(sd, reg) & clr_mask) | val_mask);
sd                306 drivers/media/i2c/adv7511-v4l2.c static inline bool adv7511_have_hotplug(struct v4l2_subdev *sd)
sd                308 drivers/media/i2c/adv7511-v4l2.c 	return adv7511_rd(sd, 0x42) & MASK_ADV7511_HPD_DETECT;
sd                311 drivers/media/i2c/adv7511-v4l2.c static inline bool adv7511_have_rx_sense(struct v4l2_subdev *sd)
sd                313 drivers/media/i2c/adv7511-v4l2.c 	return adv7511_rd(sd, 0x42) & MASK_ADV7511_MSEN_DETECT;
sd                316 drivers/media/i2c/adv7511-v4l2.c static void adv7511_csc_conversion_mode(struct v4l2_subdev *sd, u8 mode)
sd                318 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x18, 0x9f, (mode & 0x3)<<5);
sd                321 drivers/media/i2c/adv7511-v4l2.c static void adv7511_csc_coeff(struct v4l2_subdev *sd,
sd                327 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x18, 0xe0, A1>>8);
sd                328 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x19, A1);
sd                329 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x1A, 0xe0, A2>>8);
sd                330 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x1B, A2);
sd                331 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x1c, 0xe0, A3>>8);
sd                332 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x1d, A3);
sd                333 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x1e, 0xe0, A4>>8);
sd                334 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x1f, A4);
sd                337 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x20, 0xe0, B1>>8);
sd                338 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x21, B1);
sd                339 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x22, 0xe0, B2>>8);
sd                340 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x23, B2);
sd                341 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x24, 0xe0, B3>>8);
sd                342 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x25, B3);
sd                343 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x26, 0xe0, B4>>8);
sd                344 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x27, B4);
sd                347 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x28, 0xe0, C1>>8);
sd                348 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x29, C1);
sd                349 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x2A, 0xe0, C2>>8);
sd                350 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x2B, C2);
sd                351 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x2C, 0xe0, C3>>8);
sd                352 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x2D, C3);
sd                353 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x2E, 0xe0, C4>>8);
sd                354 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x2F, C4);
sd                357 drivers/media/i2c/adv7511-v4l2.c static void adv7511_csc_rgb_full2limit(struct v4l2_subdev *sd, bool enable)
sd                361 drivers/media/i2c/adv7511-v4l2.c 		adv7511_csc_conversion_mode(sd, csc_mode);
sd                362 drivers/media/i2c/adv7511-v4l2.c 		adv7511_csc_coeff(sd,
sd                367 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x18, 0x7f, 0x80);
sd                369 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x57, 0xf3, 0x04);
sd                372 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x18, 0x7f, 0x0);
sd                374 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x57, 0xf3, 0x08);
sd                378 drivers/media/i2c/adv7511-v4l2.c static void adv7511_set_rgb_quantization_mode(struct v4l2_subdev *sd, struct v4l2_ctrl *ctrl)
sd                380 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd                385 drivers/media/i2c/adv7511-v4l2.c 		adv7511_csc_rgb_full2limit(sd, false);
sd                394 drivers/media/i2c/adv7511-v4l2.c 			adv7511_csc_rgb_full2limit(sd, true);
sd                397 drivers/media/i2c/adv7511-v4l2.c 			adv7511_csc_rgb_full2limit(sd, false);
sd                402 drivers/media/i2c/adv7511-v4l2.c 		adv7511_csc_rgb_full2limit(sd, true);
sd                406 drivers/media/i2c/adv7511-v4l2.c 		adv7511_csc_rgb_full2limit(sd, false);
sd                415 drivers/media/i2c/adv7511-v4l2.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                416 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd                418 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s: ctrl id: %d, ctrl->val %d\n", __func__, ctrl->id, ctrl->val);
sd                422 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0xaf, 0xfd, ctrl->val == V4L2_DV_TX_MODE_HDMI ? 0x02 : 0x00);
sd                426 drivers/media/i2c/adv7511-v4l2.c 		adv7511_set_rgb_quantization_mode(sd, ctrl);
sd                435 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x57, 0x7f, itc << 7);
sd                436 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x59, 0xcf, cn << 4);
sd                450 drivers/media/i2c/adv7511-v4l2.c static void adv7511_inv_register(struct v4l2_subdev *sd)
sd                452 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd                454 drivers/media/i2c/adv7511-v4l2.c 	v4l2_info(sd, "0x000-0x0ff: Main Map\n");
sd                456 drivers/media/i2c/adv7511-v4l2.c 		v4l2_info(sd, "0x100-0x1ff: CEC Map\n");
sd                459 drivers/media/i2c/adv7511-v4l2.c static int adv7511_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
sd                461 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd                466 drivers/media/i2c/adv7511-v4l2.c 		reg->val = adv7511_rd(sd, reg->reg & 0xff);
sd                470 drivers/media/i2c/adv7511-v4l2.c 			reg->val = adv7511_cec_read(sd, reg->reg & 0xff);
sd                475 drivers/media/i2c/adv7511-v4l2.c 		v4l2_info(sd, "Register %03llx not supported\n", reg->reg);
sd                476 drivers/media/i2c/adv7511-v4l2.c 		adv7511_inv_register(sd);
sd                482 drivers/media/i2c/adv7511-v4l2.c static int adv7511_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
sd                484 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd                488 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr(sd, reg->reg & 0xff, reg->val & 0xff);
sd                492 drivers/media/i2c/adv7511-v4l2.c 			adv7511_cec_write(sd, reg->reg & 0xff, reg->val & 0xff);
sd                497 drivers/media/i2c/adv7511-v4l2.c 		v4l2_info(sd, "Register %03llx not supported\n", reg->reg);
sd                498 drivers/media/i2c/adv7511-v4l2.c 		adv7511_inv_register(sd);
sd                525 drivers/media/i2c/adv7511-v4l2.c static void log_infoframe(struct v4l2_subdev *sd, const struct adv7511_cfg_read_infoframe *cri)
sd                527 drivers/media/i2c/adv7511-v4l2.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                534 drivers/media/i2c/adv7511-v4l2.c 	if (!(adv7511_rd(sd, cri->present_reg) & cri->present_mask)) {
sd                535 drivers/media/i2c/adv7511-v4l2.c 		v4l2_info(sd, "%s infoframe not transmitted\n", cri->desc);
sd                544 drivers/media/i2c/adv7511-v4l2.c 		v4l2_err(sd, "%s: invalid %s infoframe length %d\n", __func__, cri->desc, len);
sd                550 drivers/media/i2c/adv7511-v4l2.c 			buffer[i + 4] = adv7511_pktmem_rd(sd, cri->payload_addr + i - 0x100);
sd                553 drivers/media/i2c/adv7511-v4l2.c 			buffer[i + 4] = adv7511_rd(sd, cri->payload_addr + i);
sd                559 drivers/media/i2c/adv7511-v4l2.c 		v4l2_err(sd, "%s: unpack of %s infoframe failed\n", __func__, cri->desc);
sd                566 drivers/media/i2c/adv7511-v4l2.c static void adv7511_log_infoframes(struct v4l2_subdev *sd)
sd                576 drivers/media/i2c/adv7511-v4l2.c 		log_infoframe(sd, &cri[i]);
sd                579 drivers/media/i2c/adv7511-v4l2.c static int adv7511_log_status(struct v4l2_subdev *sd)
sd                581 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd                607 drivers/media/i2c/adv7511-v4l2.c 	v4l2_info(sd, "power %s\n", state->power_on ? "on" : "off");
sd                608 drivers/media/i2c/adv7511-v4l2.c 	v4l2_info(sd, "%s hotplug, %s Rx Sense, %s EDID (%d block(s))\n",
sd                609 drivers/media/i2c/adv7511-v4l2.c 		  (adv7511_rd(sd, 0x42) & MASK_ADV7511_HPD_DETECT) ? "detected" : "no",
sd                610 drivers/media/i2c/adv7511-v4l2.c 		  (adv7511_rd(sd, 0x42) & MASK_ADV7511_MSEN_DETECT) ? "detected" : "no",
sd                613 drivers/media/i2c/adv7511-v4l2.c 	v4l2_info(sd, "%s output %s\n",
sd                614 drivers/media/i2c/adv7511-v4l2.c 		  (adv7511_rd(sd, 0xaf) & 0x02) ?
sd                616 drivers/media/i2c/adv7511-v4l2.c 		  (adv7511_rd(sd, 0xa1) & 0x3c) ?
sd                618 drivers/media/i2c/adv7511-v4l2.c 	v4l2_info(sd, "state: %s, error: %s, detect count: %u, msk/irq: %02x/%02x\n",
sd                619 drivers/media/i2c/adv7511-v4l2.c 			  states[adv7511_rd(sd, 0xc8) & 0xf],
sd                620 drivers/media/i2c/adv7511-v4l2.c 			  errors[adv7511_rd(sd, 0xc8) >> 4], state->edid_detect_counter,
sd                621 drivers/media/i2c/adv7511-v4l2.c 			  adv7511_rd(sd, 0x94), adv7511_rd(sd, 0x96));
sd                622 drivers/media/i2c/adv7511-v4l2.c 	v4l2_info(sd, "RGB quantization: %s range\n", adv7511_rd(sd, 0x18) & 0x80 ? "limited" : "full");
sd                623 drivers/media/i2c/adv7511-v4l2.c 	if (adv7511_rd(sd, 0xaf) & 0x02) {
sd                625 drivers/media/i2c/adv7511-v4l2.c 		u8 manual_cts = adv7511_rd(sd, 0x0a) & 0x80;
sd                626 drivers/media/i2c/adv7511-v4l2.c 		u32 N = (adv7511_rd(sd, 0x01) & 0xf) << 16 |
sd                627 drivers/media/i2c/adv7511-v4l2.c 			adv7511_rd(sd, 0x02) << 8 |
sd                628 drivers/media/i2c/adv7511-v4l2.c 			adv7511_rd(sd, 0x03);
sd                629 drivers/media/i2c/adv7511-v4l2.c 		u8 vic_detect = adv7511_rd(sd, 0x3e) >> 2;
sd                630 drivers/media/i2c/adv7511-v4l2.c 		u8 vic_sent = adv7511_rd(sd, 0x3d) & 0x3f;
sd                634 drivers/media/i2c/adv7511-v4l2.c 			CTS = (adv7511_rd(sd, 0x07) & 0xf) << 16 |
sd                635 drivers/media/i2c/adv7511-v4l2.c 			      adv7511_rd(sd, 0x08) << 8 |
sd                636 drivers/media/i2c/adv7511-v4l2.c 			      adv7511_rd(sd, 0x09);
sd                638 drivers/media/i2c/adv7511-v4l2.c 			CTS = (adv7511_rd(sd, 0x04) & 0xf) << 16 |
sd                639 drivers/media/i2c/adv7511-v4l2.c 			      adv7511_rd(sd, 0x05) << 8 |
sd                640 drivers/media/i2c/adv7511-v4l2.c 			      adv7511_rd(sd, 0x06);
sd                641 drivers/media/i2c/adv7511-v4l2.c 		v4l2_info(sd, "CTS %s mode: N %d, CTS %d\n",
sd                643 drivers/media/i2c/adv7511-v4l2.c 		v4l2_info(sd, "VIC: detected %d, sent %d\n",
sd                645 drivers/media/i2c/adv7511-v4l2.c 		adv7511_log_infoframes(sd);
sd                648 drivers/media/i2c/adv7511-v4l2.c 		v4l2_print_dv_timings(sd->name, "timings: ",
sd                651 drivers/media/i2c/adv7511-v4l2.c 		v4l2_info(sd, "no timings set\n");
sd                652 drivers/media/i2c/adv7511-v4l2.c 	v4l2_info(sd, "i2c edid addr: 0x%x\n", state->i2c_edid_addr);
sd                657 drivers/media/i2c/adv7511-v4l2.c 	v4l2_info(sd, "i2c cec addr: 0x%x\n", state->i2c_cec_addr);
sd                659 drivers/media/i2c/adv7511-v4l2.c 	v4l2_info(sd, "CEC: %s\n", state->cec_enabled_adap ?
sd                666 drivers/media/i2c/adv7511-v4l2.c 				v4l2_info(sd, "CEC Logical Address: 0x%x\n",
sd                670 drivers/media/i2c/adv7511-v4l2.c 	v4l2_info(sd, "i2c pktmem addr: 0x%x\n", state->i2c_pktmem_addr);
sd                675 drivers/media/i2c/adv7511-v4l2.c static int adv7511_s_power(struct v4l2_subdev *sd, int on)
sd                677 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd                681 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s: power %s\n", __func__, on ? "on" : "off");
sd                687 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x41, 0xbf, 0x40);
sd                695 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x41, 0xbf, 0x0);
sd                696 drivers/media/i2c/adv7511-v4l2.c 		if ((adv7511_rd(sd, 0x41) & 0x40) == 0)
sd                698 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x41, 0xbf, 0x40);
sd                702 drivers/media/i2c/adv7511-v4l2.c 		v4l2_dbg(1, debug, sd, "%s: failed to powerup the adv7511!\n", __func__);
sd                703 drivers/media/i2c/adv7511-v4l2.c 		adv7511_s_power(sd, 0);
sd                707 drivers/media/i2c/adv7511-v4l2.c 		v4l2_dbg(1, debug, sd, "%s: needed %d retries to powerup the adv7511\n", __func__, i);
sd                710 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x98, 0x03);
sd                711 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x9a, 0xfe, 0x70);
sd                712 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x9c, 0x30);
sd                713 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x9d, 0xfc, 0x01);
sd                714 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0xa2, 0xa4);
sd                715 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0xa3, 0xa4);
sd                716 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0xe0, 0xd0);
sd                717 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0xf9, 0x00);
sd                719 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x43, state->i2c_edid_addr);
sd                720 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x45, state->i2c_pktmem_addr);
sd                723 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0xc9, 0xf);
sd                731 drivers/media/i2c/adv7511-v4l2.c 	struct v4l2_subdev *sd = &state->sd;
sd                738 drivers/media/i2c/adv7511-v4l2.c 		adv7511_cec_write_and_or(sd, 0x4e, 0xfc, 0x01);
sd                740 drivers/media/i2c/adv7511-v4l2.c 		adv7511_cec_write(sd, 0x4a, 0x00);
sd                741 drivers/media/i2c/adv7511-v4l2.c 		adv7511_cec_write(sd, 0x4a, 0x07);
sd                742 drivers/media/i2c/adv7511-v4l2.c 		adv7511_cec_write_and_or(sd, 0x11, 0xfe, 0); /* initially disable tx */
sd                749 drivers/media/i2c/adv7511-v4l2.c 			adv7511_wr_and_or(sd, 0x95, 0xc0, 0x39);
sd                752 drivers/media/i2c/adv7511-v4l2.c 			adv7511_wr_and_or(sd, 0x95, 0xc0, 0x00);
sd                754 drivers/media/i2c/adv7511-v4l2.c 		adv7511_cec_write_and_or(sd, 0x4b, 0x8f, 0x00);
sd                756 drivers/media/i2c/adv7511-v4l2.c 		adv7511_cec_write_and_or(sd, 0x4e, 0xfc, 0x00);
sd                766 drivers/media/i2c/adv7511-v4l2.c 	struct v4l2_subdev *sd = &state->sd;
sd                773 drivers/media/i2c/adv7511-v4l2.c 		adv7511_cec_write_and_or(sd, 0x4b, 0x8f, 0);
sd                797 drivers/media/i2c/adv7511-v4l2.c 		adv7511_cec_write_and_or(sd, 0x4b, 0xef, 0x10);
sd                799 drivers/media/i2c/adv7511-v4l2.c 		adv7511_cec_write_and_or(sd, 0x4c, 0xf0, addr);
sd                803 drivers/media/i2c/adv7511-v4l2.c 		adv7511_cec_write_and_or(sd, 0x4b, 0xdf, 0x20);
sd                805 drivers/media/i2c/adv7511-v4l2.c 		adv7511_cec_write_and_or(sd, 0x4c, 0x0f, addr << 4);
sd                809 drivers/media/i2c/adv7511-v4l2.c 		adv7511_cec_write_and_or(sd, 0x4b, 0xbf, 0x40);
sd                811 drivers/media/i2c/adv7511-v4l2.c 		adv7511_cec_write_and_or(sd, 0x4d, 0xf0, addr);
sd                821 drivers/media/i2c/adv7511-v4l2.c 	struct v4l2_subdev *sd = &state->sd;
sd                825 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s: len %d\n", __func__, len);
sd                828 drivers/media/i2c/adv7511-v4l2.c 		v4l2_err(sd, "%s: len exceeded 16 (%d)\n", __func__, len);
sd                837 drivers/media/i2c/adv7511-v4l2.c 	adv7511_cec_write_and_or(sd, 0x12, ~0x70, max(1, attempts - 1) << 4);
sd                840 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x97, 0x38);
sd                844 drivers/media/i2c/adv7511-v4l2.c 		adv7511_cec_write(sd, i, msg->msg[i]);
sd                847 drivers/media/i2c/adv7511-v4l2.c 	adv7511_cec_write(sd, 0x10, len);
sd                849 drivers/media/i2c/adv7511-v4l2.c 	adv7511_cec_write(sd, 0x11, 0x01);
sd                853 drivers/media/i2c/adv7511-v4l2.c static void adv_cec_tx_raw_status(struct v4l2_subdev *sd, u8 tx_raw_status)
sd                855 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd                857 drivers/media/i2c/adv7511-v4l2.c 	if ((adv7511_cec_read(sd, 0x11) & 0x01) == 0) {
sd                858 drivers/media/i2c/adv7511-v4l2.c 		v4l2_dbg(1, debug, sd, "%s: tx raw: tx disabled\n", __func__);
sd                863 drivers/media/i2c/adv7511-v4l2.c 		v4l2_dbg(1, debug, sd,
sd                874 drivers/media/i2c/adv7511-v4l2.c 		v4l2_dbg(1, debug, sd, "%s: tx raw: retry failed\n", __func__);
sd                880 drivers/media/i2c/adv7511-v4l2.c 		nack_cnt = adv7511_cec_read(sd, 0x14) & 0xf;
sd                883 drivers/media/i2c/adv7511-v4l2.c 		low_drive_cnt = adv7511_cec_read(sd, 0x14) >> 4;
sd                891 drivers/media/i2c/adv7511-v4l2.c 		v4l2_dbg(1, debug, sd, "%s: tx raw: ready ok\n", __func__);
sd                905 drivers/media/i2c/adv7511-v4l2.c static void adv7511_set_isr(struct v4l2_subdev *sd, bool enable)
sd                907 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd                912 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(2, debug, sd, "%s: %s\n", __func__, enable ? "enable" : "disable");
sd                922 drivers/media/i2c/adv7511-v4l2.c 	else if (adv7511_have_hotplug(sd))
sd                934 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr(sd, 0x94, irqs);
sd                935 drivers/media/i2c/adv7511-v4l2.c 		irqs_rd = adv7511_rd(sd, 0x94);
sd                939 drivers/media/i2c/adv7511-v4l2.c 		v4l2_err(sd, "Could not set interrupts: hw failure?\n");
sd                941 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x95, 0xc0,
sd                946 drivers/media/i2c/adv7511-v4l2.c static int adv7511_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
sd                952 drivers/media/i2c/adv7511-v4l2.c 	adv7511_set_isr(sd, false);
sd                953 drivers/media/i2c/adv7511-v4l2.c 	irq_status = adv7511_rd(sd, 0x96);
sd                954 drivers/media/i2c/adv7511-v4l2.c 	cec_irq = adv7511_rd(sd, 0x97);
sd                956 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x96, irq_status);
sd                957 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x97, cec_irq);
sd                959 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s: irq 0x%x, cec-irq 0x%x\n", __func__,
sd                963 drivers/media/i2c/adv7511-v4l2.c 		adv7511_check_monitor_present_status(sd);
sd                965 drivers/media/i2c/adv7511-v4l2.c 		adv7511_check_edid_status(sd);
sd                969 drivers/media/i2c/adv7511-v4l2.c 		adv_cec_tx_raw_status(sd, cec_irq);
sd                972 drivers/media/i2c/adv7511-v4l2.c 		struct adv7511_state *state = get_adv7511_state(sd);
sd                975 drivers/media/i2c/adv7511-v4l2.c 		msg.len = adv7511_cec_read(sd, 0x25) & 0x1f;
sd                977 drivers/media/i2c/adv7511-v4l2.c 		v4l2_dbg(1, debug, sd, "%s: cec msg len %d\n", __func__,
sd                987 drivers/media/i2c/adv7511-v4l2.c 				msg.msg[i] = adv7511_cec_read(sd, i + 0x15);
sd                989 drivers/media/i2c/adv7511-v4l2.c 			adv7511_cec_write(sd, 0x4a, 0); /* toggle to re-enable rx 1 */
sd                990 drivers/media/i2c/adv7511-v4l2.c 			adv7511_cec_write(sd, 0x4a, 1);
sd                997 drivers/media/i2c/adv7511-v4l2.c 	adv7511_set_isr(sd, true);
sd               1017 drivers/media/i2c/adv7511-v4l2.c static int adv7511_s_stream(struct v4l2_subdev *sd, int enable)
sd               1019 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1021 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s: %sable\n", __func__, (enable ? "en" : "dis"));
sd               1022 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0xa1, ~0x3c, (enable ? 0 : 0x3c));
sd               1024 drivers/media/i2c/adv7511-v4l2.c 		adv7511_check_monitor_present_status(sd);
sd               1026 drivers/media/i2c/adv7511-v4l2.c 		adv7511_s_power(sd, 0);
sd               1032 drivers/media/i2c/adv7511-v4l2.c static int adv7511_s_dv_timings(struct v4l2_subdev *sd,
sd               1035 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1039 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd               1053 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x17, 0x9f,
sd               1060 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0xfb, 0xf9, 1 << 1);
sd               1063 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0xfb, 0xf9, 2 << 1);
sd               1066 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0xfb, 0xf9, 3 << 1);
sd               1069 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0xfb, 0xf9, 0);
sd               1074 drivers/media/i2c/adv7511-v4l2.c 	adv7511_set_rgb_quantization_mode(sd, state->rgb_quantization_range_ctrl);
sd               1079 drivers/media/i2c/adv7511-v4l2.c static int adv7511_g_dv_timings(struct v4l2_subdev *sd,
sd               1082 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1084 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd               1094 drivers/media/i2c/adv7511-v4l2.c static int adv7511_enum_dv_timings(struct v4l2_subdev *sd,
sd               1103 drivers/media/i2c/adv7511-v4l2.c static int adv7511_dv_timings_cap(struct v4l2_subdev *sd,
sd               1120 drivers/media/i2c/adv7511-v4l2.c static int adv7511_s_audio_stream(struct v4l2_subdev *sd, int enable)
sd               1122 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s: %sable\n", __func__, (enable ? "en" : "dis"));
sd               1125 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x4b, 0x3f, 0x80);
sd               1127 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x4b, 0x3f, 0x40);
sd               1132 drivers/media/i2c/adv7511-v4l2.c static int adv7511_s_clock_freq(struct v4l2_subdev *sd, u32 freq)
sd               1149 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x01, (N >> 16) & 0xf);
sd               1150 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x02, (N >> 8) & 0xff);
sd               1151 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x03, N & 0xff);
sd               1156 drivers/media/i2c/adv7511-v4l2.c static int adv7511_s_i2s_clock_freq(struct v4l2_subdev *sd, u32 freq)
sd               1173 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x15, 0xf, i2s_sf);
sd               1178 drivers/media/i2c/adv7511-v4l2.c static int adv7511_s_routing(struct v4l2_subdev *sd, u32 input, u32 output, u32 config)
sd               1181 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x73, 0xf8, 0x1);
sd               1183 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x76, 0x00);
sd               1186 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x14, 0xf0, 0x02);
sd               1200 drivers/media/i2c/adv7511-v4l2.c static int adv7511_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
sd               1202 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1229 drivers/media/i2c/adv7511-v4l2.c static int adv7511_enum_mbus_code(struct v4l2_subdev *sd,
sd               1260 drivers/media/i2c/adv7511-v4l2.c static int adv7511_get_fmt(struct v4l2_subdev *sd,
sd               1264 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1275 drivers/media/i2c/adv7511-v4l2.c 		fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
sd               1292 drivers/media/i2c/adv7511-v4l2.c static int adv7511_set_fmt(struct v4l2_subdev *sd,
sd               1296 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1330 drivers/media/i2c/adv7511-v4l2.c 		fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
sd               1341 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x15, 0xf0, 0x01);
sd               1342 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x16, 0x03, 0xb8);
sd               1346 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x15, 0xf0, 0x01);
sd               1347 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x16, 0x03, 0xbc);
sd               1352 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x15, 0xf0, 0x00);
sd               1353 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr_and_or(sd, 0x16, 0x03, 0x00);
sd               1424 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x4a, 0xbf, 0);
sd               1425 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x55, 0x9f, y << 5);
sd               1426 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x56, 0x3f, c << 6);
sd               1427 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x57, 0x83, (ec << 4) | (q << 2) | (itc << 7));
sd               1428 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x59, 0x0f, (yq << 6) | (cn << 4));
sd               1429 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x4a, 0xff, 1);
sd               1430 drivers/media/i2c/adv7511-v4l2.c 	adv7511_set_rgb_quantization_mode(sd, state->rgb_quantization_range_ctrl);
sd               1454 drivers/media/i2c/adv7511-v4l2.c static void adv7511_dbg_dump_edid(int lvl, int debug, struct v4l2_subdev *sd, int segment, u8 *buf)
sd               1458 drivers/media/i2c/adv7511-v4l2.c 		v4l2_dbg(lvl, debug, sd, "edid segment %d\n", segment);
sd               1463 drivers/media/i2c/adv7511-v4l2.c 				v4l2_dbg(lvl, debug, sd, "\n");
sd               1469 drivers/media/i2c/adv7511-v4l2.c 			v4l2_dbg(lvl, debug, sd, "%s\n", b);
sd               1474 drivers/media/i2c/adv7511-v4l2.c static void adv7511_notify_no_edid(struct v4l2_subdev *sd)
sd               1476 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1481 drivers/media/i2c/adv7511-v4l2.c 	ed.segment = adv7511_rd(sd, 0xc4);
sd               1484 drivers/media/i2c/adv7511-v4l2.c 	v4l2_subdev_notify(sd, ADV7511_EDID_DETECT, (void *)&ed);
sd               1492 drivers/media/i2c/adv7511-v4l2.c 	struct v4l2_subdev *sd = &state->sd;
sd               1494 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd               1496 drivers/media/i2c/adv7511-v4l2.c 	if (adv7511_check_edid_status(sd)) {
sd               1501 drivers/media/i2c/adv7511-v4l2.c 	if (adv7511_have_hotplug(sd)) {
sd               1507 drivers/media/i2c/adv7511-v4l2.c 			v4l2_dbg(1, debug, sd, "%s: edid read failed\n", __func__);
sd               1509 drivers/media/i2c/adv7511-v4l2.c 			adv7511_s_power(sd, false);
sd               1510 drivers/media/i2c/adv7511-v4l2.c 			adv7511_s_power(sd, true);
sd               1517 drivers/media/i2c/adv7511-v4l2.c 	adv7511_notify_no_edid(sd);
sd               1518 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s: no edid found\n", __func__);
sd               1521 drivers/media/i2c/adv7511-v4l2.c static void adv7511_audio_setup(struct v4l2_subdev *sd)
sd               1523 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s\n", __func__);
sd               1525 drivers/media/i2c/adv7511-v4l2.c 	adv7511_s_i2s_clock_freq(sd, 48000);
sd               1526 drivers/media/i2c/adv7511-v4l2.c 	adv7511_s_clock_freq(sd, 48000);
sd               1527 drivers/media/i2c/adv7511-v4l2.c 	adv7511_s_routing(sd, 0, 0, 0);
sd               1531 drivers/media/i2c/adv7511-v4l2.c static void adv7511_setup(struct v4l2_subdev *sd)
sd               1533 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1534 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s\n", __func__);
sd               1537 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x15, 0xf0, 0x0);
sd               1539 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x16, 0x7f, 0x0);
sd               1541 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x17, 0xf9, 0x06);
sd               1543 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x3b, 0x9f, 0x0);
sd               1545 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x18, 0x7f, 0x0);
sd               1548 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x55, 0x9c, 0x12);
sd               1550 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0x44, 0xe7, 0x10);
sd               1552 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x56, 0xa8);
sd               1554 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0xaf, 0xed, 0x0);
sd               1557 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0xba, 0x1f, 0x60);
sd               1559 drivers/media/i2c/adv7511-v4l2.c 	adv7511_audio_setup(sd);
sd               1564 drivers/media/i2c/adv7511-v4l2.c static void adv7511_notify_monitor_detect(struct v4l2_subdev *sd)
sd               1567 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1570 drivers/media/i2c/adv7511-v4l2.c 	v4l2_subdev_notify(sd, ADV7511_MONITOR_DETECT, (void *)&mdt);
sd               1573 drivers/media/i2c/adv7511-v4l2.c static void adv7511_check_monitor_present_status(struct v4l2_subdev *sd)
sd               1575 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1577 drivers/media/i2c/adv7511-v4l2.c 	u8 status = adv7511_rd(sd, 0x42);
sd               1579 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s: status: 0x%x%s%s\n",
sd               1586 drivers/media/i2c/adv7511-v4l2.c 	v4l2_ctrl_s_ctrl(state->hotplug_ctrl, adv7511_have_hotplug(sd) ? 0x1 : 0x0);
sd               1587 drivers/media/i2c/adv7511-v4l2.c 	v4l2_ctrl_s_ctrl(state->rx_sense_ctrl, adv7511_have_rx_sense(sd) ? 0x1 : 0x0);
sd               1590 drivers/media/i2c/adv7511-v4l2.c 		v4l2_dbg(1, debug, sd, "%s: hotplug and (rx-sense or edid)\n", __func__);
sd               1592 drivers/media/i2c/adv7511-v4l2.c 			v4l2_dbg(1, debug, sd, "%s: monitor detected\n", __func__);
sd               1594 drivers/media/i2c/adv7511-v4l2.c 			adv7511_set_isr(sd, true);
sd               1595 drivers/media/i2c/adv7511-v4l2.c 			if (!adv7511_s_power(sd, true)) {
sd               1596 drivers/media/i2c/adv7511-v4l2.c 				v4l2_dbg(1, debug, sd, "%s: monitor detected, powerup failed\n", __func__);
sd               1599 drivers/media/i2c/adv7511-v4l2.c 			adv7511_setup(sd);
sd               1600 drivers/media/i2c/adv7511-v4l2.c 			adv7511_notify_monitor_detect(sd);
sd               1605 drivers/media/i2c/adv7511-v4l2.c 		v4l2_dbg(1, debug, sd, "%s: hotplug detected\n", __func__);
sd               1609 drivers/media/i2c/adv7511-v4l2.c 		v4l2_dbg(1, debug, sd, "%s: hotplug not detected\n", __func__);
sd               1611 drivers/media/i2c/adv7511-v4l2.c 			v4l2_dbg(1, debug, sd, "%s: monitor not detected\n", __func__);
sd               1613 drivers/media/i2c/adv7511-v4l2.c 			adv7511_notify_monitor_detect(sd);
sd               1615 drivers/media/i2c/adv7511-v4l2.c 		adv7511_s_power(sd, false);
sd               1617 drivers/media/i2c/adv7511-v4l2.c 		adv7511_notify_no_edid(sd);
sd               1631 drivers/media/i2c/adv7511-v4l2.c static bool edid_verify_crc(struct v4l2_subdev *sd, u32 segment)
sd               1633 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1644 drivers/media/i2c/adv7511-v4l2.c static bool edid_verify_header(struct v4l2_subdev *sd, u32 segment)
sd               1649 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1657 drivers/media/i2c/adv7511-v4l2.c static bool adv7511_check_edid_status(struct v4l2_subdev *sd)
sd               1659 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1660 drivers/media/i2c/adv7511-v4l2.c 	u8 edidRdy = adv7511_rd(sd, 0xc5);
sd               1662 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s: edid ready (retries: %d)\n",
sd               1669 drivers/media/i2c/adv7511-v4l2.c 		int segment = adv7511_rd(sd, 0xc4);
sd               1673 drivers/media/i2c/adv7511-v4l2.c 			v4l2_err(sd, "edid segment number too big\n");
sd               1676 drivers/media/i2c/adv7511-v4l2.c 		v4l2_dbg(1, debug, sd, "%s: got segment %d\n", __func__, segment);
sd               1677 drivers/media/i2c/adv7511-v4l2.c 		adv7511_edid_rd(sd, 256, &state->edid.data[segment * 256]);
sd               1678 drivers/media/i2c/adv7511-v4l2.c 		adv7511_dbg_dump_edid(2, debug, sd, segment, &state->edid.data[segment * 256]);
sd               1681 drivers/media/i2c/adv7511-v4l2.c 			v4l2_dbg(1, debug, sd, "%s: %d blocks in total\n", __func__, state->edid.blocks);
sd               1683 drivers/media/i2c/adv7511-v4l2.c 		if (!edid_verify_crc(sd, segment) ||
sd               1684 drivers/media/i2c/adv7511-v4l2.c 		    !edid_verify_header(sd, segment)) {
sd               1686 drivers/media/i2c/adv7511-v4l2.c 			v4l2_err(sd, "%s: edid crc or header error\n", __func__);
sd               1688 drivers/media/i2c/adv7511-v4l2.c 			adv7511_s_power(sd, false);
sd               1689 drivers/media/i2c/adv7511-v4l2.c 			adv7511_s_power(sd, true);
sd               1697 drivers/media/i2c/adv7511-v4l2.c 			v4l2_dbg(1, debug, sd, "%s: request segment %d\n", __func__, state->edid.segments);
sd               1698 drivers/media/i2c/adv7511-v4l2.c 			adv7511_wr(sd, 0xc9, 0xf);
sd               1699 drivers/media/i2c/adv7511-v4l2.c 			adv7511_wr(sd, 0xc4, state->edid.segments);
sd               1705 drivers/media/i2c/adv7511-v4l2.c 		v4l2_dbg(1, debug, sd, "%s: edid complete with %d segment(s)\n", __func__, state->edid.segments);
sd               1717 drivers/media/i2c/adv7511-v4l2.c 		v4l2_subdev_notify(sd, ADV7511_EDID_DETECT, (void *)&ed);
sd               1724 drivers/media/i2c/adv7511-v4l2.c static int adv7511_registered(struct v4l2_subdev *sd)
sd               1726 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1727 drivers/media/i2c/adv7511-v4l2.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1736 drivers/media/i2c/adv7511-v4l2.c static void adv7511_unregistered(struct v4l2_subdev *sd)
sd               1738 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1750 drivers/media/i2c/adv7511-v4l2.c static void adv7511_init_setup(struct v4l2_subdev *sd)
sd               1752 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1757 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s\n", __func__);
sd               1760 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x96, 0xff);
sd               1761 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0x97, 0xff);
sd               1767 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr_and_or(sd, 0xd6, 0x3f, 0xc0);
sd               1770 drivers/media/i2c/adv7511-v4l2.c 	adv7511_set_isr(sd, false);
sd               1771 drivers/media/i2c/adv7511-v4l2.c 	adv7511_s_stream(sd, false);
sd               1772 drivers/media/i2c/adv7511-v4l2.c 	adv7511_s_audio_stream(sd, false);
sd               1777 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s: cec_clk %d\n", __func__, cec_clk);
sd               1780 drivers/media/i2c/adv7511-v4l2.c 	adv7511_cec_write(sd, 0x50, 0x01);
sd               1781 drivers/media/i2c/adv7511-v4l2.c 	adv7511_cec_write(sd, 0x50, 0x00);
sd               1784 drivers/media/i2c/adv7511-v4l2.c 	adv7511_cec_write(sd, 0x4a, 0x00);
sd               1785 drivers/media/i2c/adv7511-v4l2.c 	adv7511_cec_write(sd, 0x4a, 0x07);
sd               1788 drivers/media/i2c/adv7511-v4l2.c 		v4l2_err(sd, "%s: cec_clk %d, not multiple of 750 Khz\n",
sd               1792 drivers/media/i2c/adv7511-v4l2.c 	adv7511_cec_write(sd, 0x4e, ratio << 2);
sd               1800 drivers/media/i2c/adv7511-v4l2.c 	struct v4l2_subdev *sd;
sd               1821 drivers/media/i2c/adv7511-v4l2.c 	sd = &state->sd;
sd               1823 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "detecting adv7511 client on address 0x%x\n",
sd               1826 drivers/media/i2c/adv7511-v4l2.c 	v4l2_i2c_subdev_init(sd, client, &adv7511_ops);
sd               1827 drivers/media/i2c/adv7511-v4l2.c 	sd->internal_ops = &adv7511_int_ops;
sd               1849 drivers/media/i2c/adv7511-v4l2.c 	sd->ctrl_handler = hdl;
sd               1855 drivers/media/i2c/adv7511-v4l2.c 	sd->entity.function = MEDIA_ENT_F_DV_ENCODER;
sd               1856 drivers/media/i2c/adv7511-v4l2.c 	err = media_entity_pads_init(&sd->entity, 1, &state->pad);
sd               1865 drivers/media/i2c/adv7511-v4l2.c 	state->chip_revision = adv7511_rd(sd, 0x0);
sd               1866 drivers/media/i2c/adv7511-v4l2.c 	chip_id[0] = adv7511_rd(sd, 0xf5);
sd               1867 drivers/media/i2c/adv7511-v4l2.c 	chip_id[1] = adv7511_rd(sd, 0xf6);
sd               1869 drivers/media/i2c/adv7511-v4l2.c 		v4l2_err(sd, "chip_id != 0x7511, read 0x%02x%02x\n", chip_id[0],
sd               1878 drivers/media/i2c/adv7511-v4l2.c 		v4l2_err(sd, "failed to register edid i2c client\n");
sd               1883 drivers/media/i2c/adv7511-v4l2.c 	adv7511_wr(sd, 0xe1, state->i2c_cec_addr);
sd               1886 drivers/media/i2c/adv7511-v4l2.c 		v4l2_err(sd, "%s: cec_clk %u outside range, disabling cec\n",
sd               1895 drivers/media/i2c/adv7511-v4l2.c 			v4l2_err(sd, "failed to register cec i2c client\n");
sd               1899 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr(sd, 0xe2, 0x00); /* power up cec section */
sd               1901 drivers/media/i2c/adv7511-v4l2.c 		adv7511_wr(sd, 0xe2, 0x01); /* power down cec section */
sd               1906 drivers/media/i2c/adv7511-v4l2.c 		v4l2_err(sd, "failed to register pktmem i2c client\n");
sd               1911 drivers/media/i2c/adv7511-v4l2.c 	state->work_queue = create_singlethread_workqueue(sd->name);
sd               1913 drivers/media/i2c/adv7511-v4l2.c 		v4l2_err(sd, "could not create workqueue\n");
sd               1920 drivers/media/i2c/adv7511-v4l2.c 	adv7511_init_setup(sd);
sd               1933 drivers/media/i2c/adv7511-v4l2.c 	adv7511_set_isr(sd, true);
sd               1934 drivers/media/i2c/adv7511-v4l2.c 	adv7511_check_monitor_present_status(sd);
sd               1936 drivers/media/i2c/adv7511-v4l2.c 	v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
sd               1947 drivers/media/i2c/adv7511-v4l2.c 	media_entity_cleanup(&sd->entity);
sd               1957 drivers/media/i2c/adv7511-v4l2.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1958 drivers/media/i2c/adv7511-v4l2.c 	struct adv7511_state *state = get_adv7511_state(sd);
sd               1962 drivers/media/i2c/adv7511-v4l2.c 	v4l2_dbg(1, debug, sd, "%s removed @ 0x%x (%s)\n", client->name,
sd               1965 drivers/media/i2c/adv7511-v4l2.c 	adv7511_set_isr(sd, false);
sd               1966 drivers/media/i2c/adv7511-v4l2.c 	adv7511_init_setup(sd);
sd               1972 drivers/media/i2c/adv7511-v4l2.c 	v4l2_device_unregister_subdev(sd);
sd               1973 drivers/media/i2c/adv7511-v4l2.c 	media_entity_cleanup(&sd->entity);
sd               1974 drivers/media/i2c/adv7511-v4l2.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                126 drivers/media/i2c/adv7604.c 	void (*set_termination)(struct v4l2_subdev *sd, bool enable);
sd                127 drivers/media/i2c/adv7604.c 	void (*setup_irqs)(struct v4l2_subdev *sd);
sd                128 drivers/media/i2c/adv7604.c 	unsigned int (*read_hdmi_pixelclock)(struct v4l2_subdev *sd);
sd                129 drivers/media/i2c/adv7604.c 	unsigned int (*read_cable_det)(struct v4l2_subdev *sd);
sd                167 drivers/media/i2c/adv7604.c 	struct v4l2_subdev sd;
sd                320 drivers/media/i2c/adv7604.c static inline struct adv76xx_state *to_state(struct v4l2_subdev *sd)
sd                322 drivers/media/i2c/adv7604.c 	return container_of(sd, struct adv76xx_state, sd);
sd                374 drivers/media/i2c/adv7604.c static inline int io_read(struct v4l2_subdev *sd, u8 reg)
sd                376 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                381 drivers/media/i2c/adv7604.c static inline int io_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                383 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                388 drivers/media/i2c/adv7604.c static inline int io_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask,
sd                391 drivers/media/i2c/adv7604.c 	return io_write(sd, reg, (io_read(sd, reg) & ~mask) | val);
sd                394 drivers/media/i2c/adv7604.c static inline int avlink_read(struct v4l2_subdev *sd, u8 reg)
sd                396 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                401 drivers/media/i2c/adv7604.c static inline int avlink_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                403 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                408 drivers/media/i2c/adv7604.c static inline int cec_read(struct v4l2_subdev *sd, u8 reg)
sd                410 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                415 drivers/media/i2c/adv7604.c static inline int cec_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                417 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                422 drivers/media/i2c/adv7604.c static inline int cec_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask,
sd                425 drivers/media/i2c/adv7604.c 	return cec_write(sd, reg, (cec_read(sd, reg) & ~mask) | val);
sd                428 drivers/media/i2c/adv7604.c static inline int infoframe_read(struct v4l2_subdev *sd, u8 reg)
sd                430 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                435 drivers/media/i2c/adv7604.c static inline int infoframe_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                437 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                442 drivers/media/i2c/adv7604.c static inline int afe_read(struct v4l2_subdev *sd, u8 reg)
sd                444 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                449 drivers/media/i2c/adv7604.c static inline int afe_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                451 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                456 drivers/media/i2c/adv7604.c static inline int rep_read(struct v4l2_subdev *sd, u8 reg)
sd                458 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                463 drivers/media/i2c/adv7604.c static inline int rep_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                465 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                470 drivers/media/i2c/adv7604.c static inline int rep_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
sd                472 drivers/media/i2c/adv7604.c 	return rep_write(sd, reg, (rep_read(sd, reg) & ~mask) | val);
sd                475 drivers/media/i2c/adv7604.c static inline int edid_read(struct v4l2_subdev *sd, u8 reg)
sd                477 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                482 drivers/media/i2c/adv7604.c static inline int edid_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                484 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                489 drivers/media/i2c/adv7604.c static inline int edid_write_block(struct v4l2_subdev *sd,
sd                492 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                497 drivers/media/i2c/adv7604.c 	v4l2_dbg(2, debug, sd, "%s: write EDID block (%d byte)\n",
sd                520 drivers/media/i2c/adv7604.c 	v4l2_subdev_notify(&state->sd, ADV76XX_HOTPLUG, &hpd);
sd                528 drivers/media/i2c/adv7604.c 	struct v4l2_subdev *sd = &state->sd;
sd                530 drivers/media/i2c/adv7604.c 	v4l2_dbg(2, debug, sd, "%s: enable hotplug\n", __func__);
sd                535 drivers/media/i2c/adv7604.c static inline int hdmi_read(struct v4l2_subdev *sd, u8 reg)
sd                537 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                542 drivers/media/i2c/adv7604.c static u16 hdmi_read16(struct v4l2_subdev *sd, u8 reg, u16 mask)
sd                544 drivers/media/i2c/adv7604.c 	return ((hdmi_read(sd, reg) << 8) | hdmi_read(sd, reg + 1)) & mask;
sd                547 drivers/media/i2c/adv7604.c static inline int hdmi_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                549 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                554 drivers/media/i2c/adv7604.c static inline int hdmi_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
sd                556 drivers/media/i2c/adv7604.c 	return hdmi_write(sd, reg, (hdmi_read(sd, reg) & ~mask) | val);
sd                559 drivers/media/i2c/adv7604.c static inline int test_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                561 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                566 drivers/media/i2c/adv7604.c static inline int cp_read(struct v4l2_subdev *sd, u8 reg)
sd                568 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                573 drivers/media/i2c/adv7604.c static u16 cp_read16(struct v4l2_subdev *sd, u8 reg, u16 mask)
sd                575 drivers/media/i2c/adv7604.c 	return ((cp_read(sd, reg) << 8) | cp_read(sd, reg + 1)) & mask;
sd                578 drivers/media/i2c/adv7604.c static inline int cp_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                580 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                585 drivers/media/i2c/adv7604.c static inline int cp_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
sd                587 drivers/media/i2c/adv7604.c 	return cp_write(sd, reg, (cp_read(sd, reg) & ~mask) | val);
sd                590 drivers/media/i2c/adv7604.c static inline int vdp_read(struct v4l2_subdev *sd, u8 reg)
sd                592 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                597 drivers/media/i2c/adv7604.c static inline int vdp_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                599 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                608 drivers/media/i2c/adv7604.c static int adv76xx_read_reg(struct v4l2_subdev *sd, unsigned int reg)
sd                610 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                625 drivers/media/i2c/adv7604.c static int adv76xx_write_reg(struct v4l2_subdev *sd, unsigned int reg, u8 val)
sd                627 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                638 drivers/media/i2c/adv7604.c static void adv76xx_write_reg_seq(struct v4l2_subdev *sd,
sd                644 drivers/media/i2c/adv7604.c 		adv76xx_write_reg(sd, reg_seq[i].reg, reg_seq[i].val);
sd                753 drivers/media/i2c/adv7604.c static inline bool is_analog_input(struct v4l2_subdev *sd)
sd                755 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                761 drivers/media/i2c/adv7604.c static inline bool is_digital_input(struct v4l2_subdev *sd)
sd                763 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                798 drivers/media/i2c/adv7604.c adv76xx_get_dv_timings_cap(struct v4l2_subdev *sd, int pad)
sd                801 drivers/media/i2c/adv7604.c 		struct adv76xx_state *state = to_state(sd);
sd                824 drivers/media/i2c/adv7604.c static void adv76xx_inv_register(struct v4l2_subdev *sd)
sd                826 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "0x000-0x0ff: IO Map\n");
sd                827 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "0x100-0x1ff: AVLink Map\n");
sd                828 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "0x200-0x2ff: CEC Map\n");
sd                829 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "0x300-0x3ff: InfoFrame Map\n");
sd                830 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "0x400-0x4ff: ESDP Map\n");
sd                831 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "0x500-0x5ff: DPP Map\n");
sd                832 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "0x600-0x6ff: AFE Map\n");
sd                833 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "0x700-0x7ff: Repeater Map\n");
sd                834 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "0x800-0x8ff: EDID Map\n");
sd                835 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "0x900-0x9ff: HDMI Map\n");
sd                836 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "0xa00-0xaff: Test Map\n");
sd                837 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "0xb00-0xbff: CP Map\n");
sd                838 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "0xc00-0xcff: VDP Map\n");
sd                841 drivers/media/i2c/adv7604.c static int adv76xx_g_register(struct v4l2_subdev *sd,
sd                846 drivers/media/i2c/adv7604.c 	ret = adv76xx_read_reg(sd, reg->reg);
sd                848 drivers/media/i2c/adv7604.c 		v4l2_info(sd, "Register %03llx not supported\n", reg->reg);
sd                849 drivers/media/i2c/adv7604.c 		adv76xx_inv_register(sd);
sd                859 drivers/media/i2c/adv7604.c static int adv76xx_s_register(struct v4l2_subdev *sd,
sd                864 drivers/media/i2c/adv7604.c 	ret = adv76xx_write_reg(sd, reg->reg, reg->val);
sd                866 drivers/media/i2c/adv7604.c 		v4l2_info(sd, "Register %03llx not supported\n", reg->reg);
sd                867 drivers/media/i2c/adv7604.c 		adv76xx_inv_register(sd);
sd                875 drivers/media/i2c/adv7604.c static unsigned int adv7604_read_cable_det(struct v4l2_subdev *sd)
sd                877 drivers/media/i2c/adv7604.c 	u8 value = io_read(sd, 0x6f);
sd                885 drivers/media/i2c/adv7604.c static unsigned int adv7611_read_cable_det(struct v4l2_subdev *sd)
sd                887 drivers/media/i2c/adv7604.c 	u8 value = io_read(sd, 0x6f);
sd                892 drivers/media/i2c/adv7604.c static unsigned int adv7612_read_cable_det(struct v4l2_subdev *sd)
sd                897 drivers/media/i2c/adv7604.c 	u8 value = io_read(sd, 0x6f);
sd                902 drivers/media/i2c/adv7604.c static int adv76xx_s_detect_tx_5v_ctrl(struct v4l2_subdev *sd)
sd                904 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                906 drivers/media/i2c/adv7604.c 	u16 cable_det = info->read_cable_det(sd);
sd                911 drivers/media/i2c/adv7604.c static int find_and_set_predefined_video_timings(struct v4l2_subdev *sd,
sd                920 drivers/media/i2c/adv7604.c 				is_digital_input(sd) ? 250000 : 1000000, false))
sd                922 drivers/media/i2c/adv7604.c 		io_write(sd, 0x00, predef_vid_timings[i].vid_std); /* video std */
sd                923 drivers/media/i2c/adv7604.c 		io_write(sd, 0x01, (predef_vid_timings[i].v_freq << 4) +
sd                931 drivers/media/i2c/adv7604.c static int configure_predefined_video_timings(struct v4l2_subdev *sd,
sd                934 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                937 drivers/media/i2c/adv7604.c 	v4l2_dbg(1, debug, sd, "%s", __func__);
sd                941 drivers/media/i2c/adv7604.c 		io_write(sd, 0x16, 0x43);
sd                942 drivers/media/i2c/adv7604.c 		io_write(sd, 0x17, 0x5a);
sd                945 drivers/media/i2c/adv7604.c 	cp_write_clr_set(sd, 0x81, 0x10, 0x00);
sd                946 drivers/media/i2c/adv7604.c 	cp_write(sd, 0x8f, 0x00);
sd                947 drivers/media/i2c/adv7604.c 	cp_write(sd, 0x90, 0x00);
sd                948 drivers/media/i2c/adv7604.c 	cp_write(sd, 0xa2, 0x00);
sd                949 drivers/media/i2c/adv7604.c 	cp_write(sd, 0xa3, 0x00);
sd                950 drivers/media/i2c/adv7604.c 	cp_write(sd, 0xa4, 0x00);
sd                951 drivers/media/i2c/adv7604.c 	cp_write(sd, 0xa5, 0x00);
sd                952 drivers/media/i2c/adv7604.c 	cp_write(sd, 0xa6, 0x00);
sd                953 drivers/media/i2c/adv7604.c 	cp_write(sd, 0xa7, 0x00);
sd                954 drivers/media/i2c/adv7604.c 	cp_write(sd, 0xab, 0x00);
sd                955 drivers/media/i2c/adv7604.c 	cp_write(sd, 0xac, 0x00);
sd                957 drivers/media/i2c/adv7604.c 	if (is_analog_input(sd)) {
sd                958 drivers/media/i2c/adv7604.c 		err = find_and_set_predefined_video_timings(sd,
sd                961 drivers/media/i2c/adv7604.c 			err = find_and_set_predefined_video_timings(sd,
sd                963 drivers/media/i2c/adv7604.c 	} else if (is_digital_input(sd)) {
sd                964 drivers/media/i2c/adv7604.c 		err = find_and_set_predefined_video_timings(sd,
sd                967 drivers/media/i2c/adv7604.c 			err = find_and_set_predefined_video_timings(sd,
sd                970 drivers/media/i2c/adv7604.c 		v4l2_dbg(2, debug, sd, "%s: Unknown port %d selected\n",
sd                979 drivers/media/i2c/adv7604.c static void configure_custom_video_timings(struct v4l2_subdev *sd,
sd                982 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd                996 drivers/media/i2c/adv7604.c 	v4l2_dbg(2, debug, sd, "%s\n", __func__);
sd                998 drivers/media/i2c/adv7604.c 	if (is_analog_input(sd)) {
sd               1000 drivers/media/i2c/adv7604.c 		io_write(sd, 0x00, 0x07); /* video std */
sd               1001 drivers/media/i2c/adv7604.c 		io_write(sd, 0x01, 0x02); /* prim mode */
sd               1003 drivers/media/i2c/adv7604.c 		cp_write_clr_set(sd, 0x81, 0x10, 0x10);
sd               1010 drivers/media/i2c/adv7604.c 			v4l2_err(sd, "writing to reg 0x16 and 0x17 failed\n");
sd               1013 drivers/media/i2c/adv7604.c 		cp_write(sd, 0xa2, (cp_start_sav >> 4) & 0xff);
sd               1014 drivers/media/i2c/adv7604.c 		cp_write(sd, 0xa3, ((cp_start_sav & 0x0f) << 4) |
sd               1016 drivers/media/i2c/adv7604.c 		cp_write(sd, 0xa4, cp_start_eav & 0xff);
sd               1019 drivers/media/i2c/adv7604.c 		cp_write(sd, 0xa5, (cp_start_vbi >> 4) & 0xff);
sd               1020 drivers/media/i2c/adv7604.c 		cp_write(sd, 0xa6, ((cp_start_vbi & 0xf) << 4) |
sd               1022 drivers/media/i2c/adv7604.c 		cp_write(sd, 0xa7, cp_end_vbi & 0xff);
sd               1023 drivers/media/i2c/adv7604.c 	} else if (is_digital_input(sd)) {
sd               1026 drivers/media/i2c/adv7604.c 		io_write(sd, 0x00, 0x02); /* video std */
sd               1027 drivers/media/i2c/adv7604.c 		io_write(sd, 0x01, 0x06); /* prim mode */
sd               1029 drivers/media/i2c/adv7604.c 		v4l2_dbg(2, debug, sd, "%s: Unknown port %d selected\n",
sd               1033 drivers/media/i2c/adv7604.c 	cp_write(sd, 0x8f, (ch1_fr_ll >> 8) & 0x7);
sd               1034 drivers/media/i2c/adv7604.c 	cp_write(sd, 0x90, ch1_fr_ll & 0xff);
sd               1035 drivers/media/i2c/adv7604.c 	cp_write(sd, 0xab, (height >> 4) & 0xff);
sd               1036 drivers/media/i2c/adv7604.c 	cp_write(sd, 0xac, (height & 0x0f) << 4);
sd               1039 drivers/media/i2c/adv7604.c static void adv76xx_set_offset(struct v4l2_subdev *sd, bool auto_offset, u16 offset_a, u16 offset_b, u16 offset_c)
sd               1041 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1050 drivers/media/i2c/adv7604.c 	v4l2_dbg(2, debug, sd, "%s: %s offset: a = 0x%x, b = 0x%x, c = 0x%x\n",
sd               1054 drivers/media/i2c/adv7604.c 	offset_buf[0] = (cp_read(sd, 0x77) & 0xc0) | ((offset_a & 0x3f0) >> 4);
sd               1062 drivers/media/i2c/adv7604.c 		v4l2_err(sd, "%s: i2c error writing to CP reg 0x77, 0x78, 0x79, 0x7a\n", __func__);
sd               1065 drivers/media/i2c/adv7604.c static void adv76xx_set_gain(struct v4l2_subdev *sd, bool auto_gain, u16 gain_a, u16 gain_b, u16 gain_c)
sd               1067 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1080 drivers/media/i2c/adv7604.c 	v4l2_dbg(2, debug, sd, "%s: %s gain: a = 0x%x, b = 0x%x, c = 0x%x\n",
sd               1092 drivers/media/i2c/adv7604.c 		v4l2_err(sd, "%s: i2c error writing to CP reg 0x73, 0x74, 0x75, 0x76\n", __func__);
sd               1095 drivers/media/i2c/adv7604.c static void set_rgb_quantization_range(struct v4l2_subdev *sd)
sd               1097 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1098 drivers/media/i2c/adv7604.c 	bool rgb_output = io_read(sd, 0x02) & 0x02;
sd               1099 drivers/media/i2c/adv7604.c 	bool hdmi_signal = hdmi_read(sd, 0x05) & 0x80;
sd               1102 drivers/media/i2c/adv7604.c 	if (hdmi_signal && (io_read(sd, 0x60) & 1))
sd               1103 drivers/media/i2c/adv7604.c 		y = infoframe_read(sd, 0x01) >> 5;
sd               1105 drivers/media/i2c/adv7604.c 	v4l2_dbg(2, debug, sd, "%s: RGB quantization range: %d, RGB out: %d, HDMI: %d\n",
sd               1109 drivers/media/i2c/adv7604.c 	adv76xx_set_gain(sd, true, 0x0, 0x0, 0x0);
sd               1110 drivers/media/i2c/adv7604.c 	adv76xx_set_offset(sd, true, 0x0, 0x0, 0x0);
sd               1111 drivers/media/i2c/adv7604.c 	io_write_clr_set(sd, 0x02, 0x04, rgb_output ? 0 : 4);
sd               1118 drivers/media/i2c/adv7604.c 			io_write_clr_set(sd, 0x02, 0xf0, 0x10);
sd               1125 drivers/media/i2c/adv7604.c 			io_write_clr_set(sd, 0x02, 0xf0, 0xf0);
sd               1132 drivers/media/i2c/adv7604.c 			io_write_clr_set(sd, 0x02, 0xf0, 0xf0);
sd               1141 drivers/media/i2c/adv7604.c 			io_write_clr_set(sd, 0x02, 0xf0, 0x00);
sd               1144 drivers/media/i2c/adv7604.c 			io_write_clr_set(sd, 0x02, 0xf0, 0x10);
sd               1146 drivers/media/i2c/adv7604.c 			if (is_digital_input(sd) && rgb_output) {
sd               1147 drivers/media/i2c/adv7604.c 				adv76xx_set_offset(sd, false, 0x40, 0x40, 0x40);
sd               1149 drivers/media/i2c/adv7604.c 				adv76xx_set_gain(sd, false, 0xe0, 0xe0, 0xe0);
sd               1150 drivers/media/i2c/adv7604.c 				adv76xx_set_offset(sd, false, 0x70, 0x70, 0x70);
sd               1157 drivers/media/i2c/adv7604.c 			io_write_clr_set(sd, 0x02, 0xf0, 0x20);
sd               1165 drivers/media/i2c/adv7604.c 		io_write_clr_set(sd, 0x02, 0xf0, 0x00);
sd               1171 drivers/media/i2c/adv7604.c 			io_write_clr_set(sd, 0x02, 0xf0, 0x60);
sd               1179 drivers/media/i2c/adv7604.c 		io_write_clr_set(sd, 0x02, 0xf0, 0x10);
sd               1181 drivers/media/i2c/adv7604.c 		if (is_analog_input(sd) || hdmi_signal)
sd               1186 drivers/media/i2c/adv7604.c 			adv76xx_set_offset(sd, false, 0x40, 0x40, 0x40);
sd               1188 drivers/media/i2c/adv7604.c 			adv76xx_set_gain(sd, false, 0xe0, 0xe0, 0xe0);
sd               1189 drivers/media/i2c/adv7604.c 			adv76xx_set_offset(sd, false, 0x70, 0x70, 0x70);
sd               1197 drivers/media/i2c/adv7604.c 	struct v4l2_subdev *sd =
sd               1198 drivers/media/i2c/adv7604.c 		&container_of(ctrl->handler, struct adv76xx_state, hdl)->sd;
sd               1200 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1204 drivers/media/i2c/adv7604.c 		cp_write(sd, 0x3c, ctrl->val);
sd               1207 drivers/media/i2c/adv7604.c 		cp_write(sd, 0x3a, ctrl->val);
sd               1210 drivers/media/i2c/adv7604.c 		cp_write(sd, 0x3b, ctrl->val);
sd               1213 drivers/media/i2c/adv7604.c 		cp_write(sd, 0x3d, ctrl->val);
sd               1217 drivers/media/i2c/adv7604.c 		set_rgb_quantization_range(sd);
sd               1226 drivers/media/i2c/adv7604.c 		afe_write(sd, 0xc8, ctrl->val);
sd               1231 drivers/media/i2c/adv7604.c 		cp_write_clr_set(sd, 0xbf, 0x04, ctrl->val << 2);
sd               1234 drivers/media/i2c/adv7604.c 		cp_write(sd, 0xc0, (ctrl->val & 0xff0000) >> 16);
sd               1235 drivers/media/i2c/adv7604.c 		cp_write(sd, 0xc1, (ctrl->val & 0x00ff00) >> 8);
sd               1236 drivers/media/i2c/adv7604.c 		cp_write(sd, 0xc2, (u8)(ctrl->val & 0x0000ff));
sd               1244 drivers/media/i2c/adv7604.c 	struct v4l2_subdev *sd =
sd               1245 drivers/media/i2c/adv7604.c 		&container_of(ctrl->handler, struct adv76xx_state, hdl)->sd;
sd               1249 drivers/media/i2c/adv7604.c 		if ((io_read(sd, 0x60) & 1) && (infoframe_read(sd, 0x03) & 0x80))
sd               1250 drivers/media/i2c/adv7604.c 			ctrl->val = (infoframe_read(sd, 0x05) >> 4) & 3;
sd               1258 drivers/media/i2c/adv7604.c static inline bool no_power(struct v4l2_subdev *sd)
sd               1261 drivers/media/i2c/adv7604.c 	return io_read(sd, 0x0c) & 0x24;
sd               1264 drivers/media/i2c/adv7604.c static inline bool no_signal_tmds(struct v4l2_subdev *sd)
sd               1266 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1268 drivers/media/i2c/adv7604.c 	return !(io_read(sd, 0x6a) & (0x10 >> state->selected_input));
sd               1271 drivers/media/i2c/adv7604.c static inline bool no_lock_tmds(struct v4l2_subdev *sd)
sd               1273 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1276 drivers/media/i2c/adv7604.c 	return (io_read(sd, 0x6a) & info->tdms_lock_mask) != info->tdms_lock_mask;
sd               1279 drivers/media/i2c/adv7604.c static inline bool is_hdmi(struct v4l2_subdev *sd)
sd               1281 drivers/media/i2c/adv7604.c 	return hdmi_read(sd, 0x05) & 0x80;
sd               1284 drivers/media/i2c/adv7604.c static inline bool no_lock_sspd(struct v4l2_subdev *sd)
sd               1286 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1296 drivers/media/i2c/adv7604.c 	return ((cp_read(sd, 0xb5) & 0xd0) != 0xd0);
sd               1299 drivers/media/i2c/adv7604.c static inline bool no_lock_stdi(struct v4l2_subdev *sd)
sd               1302 drivers/media/i2c/adv7604.c 	return !(cp_read(sd, 0xb1) & 0x80);
sd               1305 drivers/media/i2c/adv7604.c static inline bool no_signal(struct v4l2_subdev *sd)
sd               1309 drivers/media/i2c/adv7604.c 	ret = no_power(sd);
sd               1311 drivers/media/i2c/adv7604.c 	ret |= no_lock_stdi(sd);
sd               1312 drivers/media/i2c/adv7604.c 	ret |= no_lock_sspd(sd);
sd               1314 drivers/media/i2c/adv7604.c 	if (is_digital_input(sd)) {
sd               1315 drivers/media/i2c/adv7604.c 		ret |= no_lock_tmds(sd);
sd               1316 drivers/media/i2c/adv7604.c 		ret |= no_signal_tmds(sd);
sd               1322 drivers/media/i2c/adv7604.c static inline bool no_lock_cp(struct v4l2_subdev *sd)
sd               1324 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1331 drivers/media/i2c/adv7604.c 	return io_read(sd, 0x12) & 0x01;
sd               1334 drivers/media/i2c/adv7604.c static inline bool in_free_run(struct v4l2_subdev *sd)
sd               1336 drivers/media/i2c/adv7604.c 	return cp_read(sd, 0xff) & 0x10;
sd               1339 drivers/media/i2c/adv7604.c static int adv76xx_g_input_status(struct v4l2_subdev *sd, u32 *status)
sd               1342 drivers/media/i2c/adv7604.c 	*status |= no_power(sd) ? V4L2_IN_ST_NO_POWER : 0;
sd               1343 drivers/media/i2c/adv7604.c 	*status |= no_signal(sd) ? V4L2_IN_ST_NO_SIGNAL : 0;
sd               1344 drivers/media/i2c/adv7604.c 	if (!in_free_run(sd) && no_lock_cp(sd))
sd               1345 drivers/media/i2c/adv7604.c 		*status |= is_digital_input(sd) ?
sd               1348 drivers/media/i2c/adv7604.c 	v4l2_dbg(1, debug, sd, "%s: status = 0x%x\n", __func__, *status);
sd               1361 drivers/media/i2c/adv7604.c static int stdi2dv_timings(struct v4l2_subdev *sd,
sd               1365 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1374 drivers/media/i2c/adv7604.c 					   adv76xx_get_dv_timings_cap(sd, -1),
sd               1402 drivers/media/i2c/adv7604.c 	v4l2_dbg(2, debug, sd,
sd               1410 drivers/media/i2c/adv7604.c static int read_stdi(struct v4l2_subdev *sd, struct stdi_readback *stdi)
sd               1412 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1416 drivers/media/i2c/adv7604.c 	if (no_lock_stdi(sd) || no_lock_sspd(sd)) {
sd               1417 drivers/media/i2c/adv7604.c 		v4l2_dbg(2, debug, sd, "%s: STDI and/or SSPD not locked\n", __func__);
sd               1422 drivers/media/i2c/adv7604.c 	stdi->bl = cp_read16(sd, 0xb1, 0x3fff);
sd               1423 drivers/media/i2c/adv7604.c 	stdi->lcf = cp_read16(sd, info->lcf_reg, 0x7ff);
sd               1424 drivers/media/i2c/adv7604.c 	stdi->lcvs = cp_read(sd, 0xb3) >> 3;
sd               1425 drivers/media/i2c/adv7604.c 	stdi->interlaced = io_read(sd, 0x12) & 0x10;
sd               1429 drivers/media/i2c/adv7604.c 		polarity = cp_read(sd, 0xb5);
sd               1440 drivers/media/i2c/adv7604.c 		polarity = hdmi_read(sd, 0x05);
sd               1445 drivers/media/i2c/adv7604.c 	if (no_lock_stdi(sd) || no_lock_sspd(sd)) {
sd               1446 drivers/media/i2c/adv7604.c 		v4l2_dbg(2, debug, sd,
sd               1452 drivers/media/i2c/adv7604.c 		v4l2_dbg(2, debug, sd, "%s: invalid signal\n", __func__);
sd               1457 drivers/media/i2c/adv7604.c 	v4l2_dbg(2, debug, sd,
sd               1466 drivers/media/i2c/adv7604.c static int adv76xx_enum_dv_timings(struct v4l2_subdev *sd,
sd               1469 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1475 drivers/media/i2c/adv7604.c 		adv76xx_get_dv_timings_cap(sd, timings->pad),
sd               1479 drivers/media/i2c/adv7604.c static int adv76xx_dv_timings_cap(struct v4l2_subdev *sd,
sd               1482 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1488 drivers/media/i2c/adv7604.c 	*cap = *adv76xx_get_dv_timings_cap(sd, pad);
sd               1496 drivers/media/i2c/adv7604.c static void adv76xx_fill_optional_dv_timings_fields(struct v4l2_subdev *sd,
sd               1499 drivers/media/i2c/adv7604.c 	v4l2_find_dv_timings_cap(timings, adv76xx_get_dv_timings_cap(sd, -1),
sd               1500 drivers/media/i2c/adv7604.c 				 is_digital_input(sd) ? 250000 : 1000000,
sd               1504 drivers/media/i2c/adv7604.c static unsigned int adv7604_read_hdmi_pixelclock(struct v4l2_subdev *sd)
sd               1509 drivers/media/i2c/adv7604.c 	a = hdmi_read(sd, 0x06);
sd               1510 drivers/media/i2c/adv7604.c 	b = hdmi_read(sd, 0x3b);
sd               1515 drivers/media/i2c/adv7604.c 	if (is_hdmi(sd)) {
sd               1517 drivers/media/i2c/adv7604.c 		unsigned bits_per_channel = ((hdmi_read(sd, 0x0b) & 0x60) >> 4) + 8;
sd               1525 drivers/media/i2c/adv7604.c static unsigned int adv7611_read_hdmi_pixelclock(struct v4l2_subdev *sd)
sd               1529 drivers/media/i2c/adv7604.c 	a = hdmi_read(sd, 0x51);
sd               1530 drivers/media/i2c/adv7604.c 	b = hdmi_read(sd, 0x52);
sd               1536 drivers/media/i2c/adv7604.c static int adv76xx_query_dv_timings(struct v4l2_subdev *sd,
sd               1539 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1549 drivers/media/i2c/adv7604.c 	if (no_signal(sd)) {
sd               1551 drivers/media/i2c/adv7604.c 		v4l2_dbg(1, debug, sd, "%s: no valid signal\n", __func__);
sd               1556 drivers/media/i2c/adv7604.c 	if (read_stdi(sd, &stdi)) {
sd               1557 drivers/media/i2c/adv7604.c 		v4l2_dbg(1, debug, sd, "%s: STDI/SSPD not locked\n", __func__);
sd               1563 drivers/media/i2c/adv7604.c 	if (is_digital_input(sd)) {
sd               1564 drivers/media/i2c/adv7604.c 		bool hdmi_signal = hdmi_read(sd, 0x05) & 0x80;
sd               1568 drivers/media/i2c/adv7604.c 		w = hdmi_read16(sd, 0x07, info->linewidth_mask);
sd               1569 drivers/media/i2c/adv7604.c 		h = hdmi_read16(sd, 0x09, info->field0_height_mask);
sd               1571 drivers/media/i2c/adv7604.c 		if (hdmi_signal && (io_read(sd, 0x60) & 1))
sd               1572 drivers/media/i2c/adv7604.c 			vic = infoframe_read(sd, 0x04);
sd               1582 drivers/media/i2c/adv7604.c 		bt->pixelclock = info->read_hdmi_pixelclock(sd);
sd               1583 drivers/media/i2c/adv7604.c 		bt->hfrontporch = hdmi_read16(sd, 0x20, info->hfrontporch_mask);
sd               1584 drivers/media/i2c/adv7604.c 		bt->hsync = hdmi_read16(sd, 0x22, info->hsync_mask);
sd               1585 drivers/media/i2c/adv7604.c 		bt->hbackporch = hdmi_read16(sd, 0x24, info->hbackporch_mask);
sd               1586 drivers/media/i2c/adv7604.c 		bt->vfrontporch = hdmi_read16(sd, 0x2a,
sd               1588 drivers/media/i2c/adv7604.c 		bt->vsync = hdmi_read16(sd, 0x2e, info->field0_vsync_mask) / 2;
sd               1589 drivers/media/i2c/adv7604.c 		bt->vbackporch = hdmi_read16(sd, 0x32,
sd               1591 drivers/media/i2c/adv7604.c 		bt->polarities = ((hdmi_read(sd, 0x05) & 0x10) ? V4L2_DV_VSYNC_POS_POL : 0) |
sd               1592 drivers/media/i2c/adv7604.c 			((hdmi_read(sd, 0x05) & 0x20) ? V4L2_DV_HSYNC_POS_POL : 0);
sd               1594 drivers/media/i2c/adv7604.c 			bt->height += hdmi_read16(sd, 0x0b,
sd               1596 drivers/media/i2c/adv7604.c 			bt->il_vfrontporch = hdmi_read16(sd, 0x2c,
sd               1598 drivers/media/i2c/adv7604.c 			bt->il_vsync = hdmi_read16(sd, 0x30,
sd               1600 drivers/media/i2c/adv7604.c 			bt->il_vbackporch = hdmi_read16(sd, 0x34,
sd               1603 drivers/media/i2c/adv7604.c 		adv76xx_fill_optional_dv_timings_fields(sd, timings);
sd               1609 drivers/media/i2c/adv7604.c 		if (!stdi2dv_timings(sd, &stdi, timings))
sd               1612 drivers/media/i2c/adv7604.c 		v4l2_dbg(1, debug, sd, "%s: lcvs + 1 = %d\n", __func__, stdi.lcvs);
sd               1613 drivers/media/i2c/adv7604.c 		if (!stdi2dv_timings(sd, &stdi, timings))
sd               1616 drivers/media/i2c/adv7604.c 		v4l2_dbg(1, debug, sd, "%s: lcvs - 1 = %d\n", __func__, stdi.lcvs);
sd               1617 drivers/media/i2c/adv7604.c 		if (stdi2dv_timings(sd, &stdi, timings)) {
sd               1628 drivers/media/i2c/adv7604.c 				v4l2_dbg(1, debug, sd, "%s: restart STDI\n", __func__);
sd               1631 drivers/media/i2c/adv7604.c 				cp_write_clr_set(sd, 0x86, 0x06, 0x00);
sd               1633 drivers/media/i2c/adv7604.c 				cp_write_clr_set(sd, 0x86, 0x06, 0x04);
sd               1635 drivers/media/i2c/adv7604.c 				cp_write_clr_set(sd, 0x86, 0x06, 0x02);
sd               1639 drivers/media/i2c/adv7604.c 			v4l2_dbg(1, debug, sd, "%s: format not supported\n", __func__);
sd               1646 drivers/media/i2c/adv7604.c 	if (no_signal(sd)) {
sd               1647 drivers/media/i2c/adv7604.c 		v4l2_dbg(1, debug, sd, "%s: signal lost during readout\n", __func__);
sd               1652 drivers/media/i2c/adv7604.c 	if ((is_analog_input(sd) && bt->pixelclock > 170000000) ||
sd               1653 drivers/media/i2c/adv7604.c 			(is_digital_input(sd) && bt->pixelclock > 225000000)) {
sd               1654 drivers/media/i2c/adv7604.c 		v4l2_dbg(1, debug, sd, "%s: pixelclock out of range %d\n",
sd               1660 drivers/media/i2c/adv7604.c 		v4l2_print_dv_timings(sd->name, "adv76xx_query_dv_timings: ",
sd               1666 drivers/media/i2c/adv7604.c static int adv76xx_s_dv_timings(struct v4l2_subdev *sd,
sd               1669 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1677 drivers/media/i2c/adv7604.c 		v4l2_dbg(1, debug, sd, "%s: no change\n", __func__);
sd               1683 drivers/media/i2c/adv7604.c 	if (!v4l2_valid_dv_timings(timings, adv76xx_get_dv_timings_cap(sd, -1),
sd               1687 drivers/media/i2c/adv7604.c 	adv76xx_fill_optional_dv_timings_fields(sd, timings);
sd               1691 drivers/media/i2c/adv7604.c 	cp_write_clr_set(sd, 0x91, 0x40, bt->interlaced ? 0x40 : 0x00);
sd               1694 drivers/media/i2c/adv7604.c 	err = configure_predefined_video_timings(sd, timings);
sd               1698 drivers/media/i2c/adv7604.c 		configure_custom_video_timings(sd, bt);
sd               1701 drivers/media/i2c/adv7604.c 	set_rgb_quantization_range(sd);
sd               1704 drivers/media/i2c/adv7604.c 		v4l2_print_dv_timings(sd->name, "adv76xx_s_dv_timings: ",
sd               1709 drivers/media/i2c/adv7604.c static int adv76xx_g_dv_timings(struct v4l2_subdev *sd,
sd               1712 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1718 drivers/media/i2c/adv7604.c static void adv7604_set_termination(struct v4l2_subdev *sd, bool enable)
sd               1720 drivers/media/i2c/adv7604.c 	hdmi_write(sd, 0x01, enable ? 0x00 : 0x78);
sd               1723 drivers/media/i2c/adv7604.c static void adv7611_set_termination(struct v4l2_subdev *sd, bool enable)
sd               1725 drivers/media/i2c/adv7604.c 	hdmi_write(sd, 0x83, enable ? 0xfe : 0xff);
sd               1728 drivers/media/i2c/adv7604.c static void enable_input(struct v4l2_subdev *sd)
sd               1730 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1732 drivers/media/i2c/adv7604.c 	if (is_analog_input(sd)) {
sd               1733 drivers/media/i2c/adv7604.c 		io_write(sd, 0x15, 0xb0);   /* Disable Tristate of Pins (no audio) */
sd               1734 drivers/media/i2c/adv7604.c 	} else if (is_digital_input(sd)) {
sd               1735 drivers/media/i2c/adv7604.c 		hdmi_write_clr_set(sd, 0x00, 0x03, state->selected_input);
sd               1736 drivers/media/i2c/adv7604.c 		state->info->set_termination(sd, true);
sd               1737 drivers/media/i2c/adv7604.c 		io_write(sd, 0x15, 0xa0);   /* Disable Tristate of Pins */
sd               1738 drivers/media/i2c/adv7604.c 		hdmi_write_clr_set(sd, 0x1a, 0x10, 0x00); /* Unmute audio */
sd               1740 drivers/media/i2c/adv7604.c 		v4l2_dbg(2, debug, sd, "%s: Unknown port %d selected\n",
sd               1745 drivers/media/i2c/adv7604.c static void disable_input(struct v4l2_subdev *sd)
sd               1747 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1749 drivers/media/i2c/adv7604.c 	hdmi_write_clr_set(sd, 0x1a, 0x10, 0x10); /* Mute audio */
sd               1751 drivers/media/i2c/adv7604.c 	io_write(sd, 0x15, 0xbe);   /* Tristate all outputs from video core */
sd               1752 drivers/media/i2c/adv7604.c 	state->info->set_termination(sd, false);
sd               1755 drivers/media/i2c/adv7604.c static void select_input(struct v4l2_subdev *sd)
sd               1757 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1760 drivers/media/i2c/adv7604.c 	if (is_analog_input(sd)) {
sd               1761 drivers/media/i2c/adv7604.c 		adv76xx_write_reg_seq(sd, info->recommended_settings[0]);
sd               1763 drivers/media/i2c/adv7604.c 		afe_write(sd, 0x00, 0x08); /* power up ADC */
sd               1764 drivers/media/i2c/adv7604.c 		afe_write(sd, 0x01, 0x06); /* power up Analog Front End */
sd               1765 drivers/media/i2c/adv7604.c 		afe_write(sd, 0xc8, 0x00); /* phase control */
sd               1766 drivers/media/i2c/adv7604.c 	} else if (is_digital_input(sd)) {
sd               1767 drivers/media/i2c/adv7604.c 		hdmi_write(sd, 0x00, state->selected_input & 0x03);
sd               1769 drivers/media/i2c/adv7604.c 		adv76xx_write_reg_seq(sd, info->recommended_settings[1]);
sd               1772 drivers/media/i2c/adv7604.c 			afe_write(sd, 0x00, 0xff); /* power down ADC */
sd               1773 drivers/media/i2c/adv7604.c 			afe_write(sd, 0x01, 0xfe); /* power down Analog Front End */
sd               1774 drivers/media/i2c/adv7604.c 			afe_write(sd, 0xc8, 0x40); /* phase control */
sd               1777 drivers/media/i2c/adv7604.c 		cp_write(sd, 0x3e, 0x00); /* CP core pre-gain control */
sd               1778 drivers/media/i2c/adv7604.c 		cp_write(sd, 0xc3, 0x39); /* CP coast control. Graphics mode */
sd               1779 drivers/media/i2c/adv7604.c 		cp_write(sd, 0x40, 0x80); /* CP core pre-gain control. Graphics mode */
sd               1781 drivers/media/i2c/adv7604.c 		v4l2_dbg(2, debug, sd, "%s: Unknown port %d selected\n",
sd               1786 drivers/media/i2c/adv7604.c static int adv76xx_s_routing(struct v4l2_subdev *sd,
sd               1789 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1791 drivers/media/i2c/adv7604.c 	v4l2_dbg(2, debug, sd, "%s: input %d, selected input %d",
sd               1802 drivers/media/i2c/adv7604.c 	disable_input(sd);
sd               1803 drivers/media/i2c/adv7604.c 	select_input(sd);
sd               1804 drivers/media/i2c/adv7604.c 	enable_input(sd);
sd               1806 drivers/media/i2c/adv7604.c 	v4l2_subdev_notify_event(sd, &adv76xx_ev_fmt);
sd               1811 drivers/media/i2c/adv7604.c static int adv76xx_enum_mbus_code(struct v4l2_subdev *sd,
sd               1815 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1879 drivers/media/i2c/adv7604.c 	struct v4l2_subdev *sd = &state->sd;
sd               1881 drivers/media/i2c/adv7604.c 	io_write_clr_set(sd, 0x02, 0x02,
sd               1883 drivers/media/i2c/adv7604.c 	io_write(sd, 0x03, state->format->op_format_sel |
sd               1885 drivers/media/i2c/adv7604.c 	io_write_clr_set(sd, 0x04, 0xe0, adv76xx_op_ch_sel(state));
sd               1886 drivers/media/i2c/adv7604.c 	io_write_clr_set(sd, 0x05, 0x01,
sd               1888 drivers/media/i2c/adv7604.c 	set_rgb_quantization_range(sd);
sd               1891 drivers/media/i2c/adv7604.c static int adv76xx_get_format(struct v4l2_subdev *sd,
sd               1895 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1905 drivers/media/i2c/adv7604.c 		fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
sd               1914 drivers/media/i2c/adv7604.c static int adv76xx_get_selection(struct v4l2_subdev *sd,
sd               1918 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1934 drivers/media/i2c/adv7604.c static int adv76xx_set_format(struct v4l2_subdev *sd,
sd               1938 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1954 drivers/media/i2c/adv7604.c 		fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
sd               1965 drivers/media/i2c/adv7604.c static void adv76xx_cec_tx_raw_status(struct v4l2_subdev *sd, u8 tx_raw_status)
sd               1967 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               1969 drivers/media/i2c/adv7604.c 	if ((cec_read(sd, 0x11) & 0x01) == 0) {
sd               1970 drivers/media/i2c/adv7604.c 		v4l2_dbg(1, debug, sd, "%s: tx raw: tx disabled\n", __func__);
sd               1975 drivers/media/i2c/adv7604.c 		v4l2_dbg(1, debug, sd, "%s: tx raw: arbitration lost\n",
sd               1986 drivers/media/i2c/adv7604.c 		v4l2_dbg(1, debug, sd, "%s: tx raw: retry failed\n", __func__);
sd               1992 drivers/media/i2c/adv7604.c 		nack_cnt = cec_read(sd, 0x14) & 0xf;
sd               1995 drivers/media/i2c/adv7604.c 		low_drive_cnt = cec_read(sd, 0x14) >> 4;
sd               2003 drivers/media/i2c/adv7604.c 		v4l2_dbg(1, debug, sd, "%s: tx raw: ready ok\n", __func__);
sd               2009 drivers/media/i2c/adv7604.c static void adv76xx_cec_isr(struct v4l2_subdev *sd, bool *handled)
sd               2011 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               2016 drivers/media/i2c/adv7604.c 	cec_irq = io_read(sd, info->cec_irq_status) & 0x0f;
sd               2020 drivers/media/i2c/adv7604.c 	v4l2_dbg(1, debug, sd, "%s: cec: irq 0x%x\n", __func__, cec_irq);
sd               2021 drivers/media/i2c/adv7604.c 	adv76xx_cec_tx_raw_status(sd, cec_irq);
sd               2025 drivers/media/i2c/adv7604.c 		msg.len = cec_read(sd, 0x25) & 0x1f;
sd               2033 drivers/media/i2c/adv7604.c 				msg.msg[i] = cec_read(sd, i + 0x15);
sd               2034 drivers/media/i2c/adv7604.c 			cec_write(sd, info->cec_rx_enable,
sd               2048 drivers/media/i2c/adv7604.c 	io_write(sd, info->cec_irq_status + 1, cec_irq);
sd               2058 drivers/media/i2c/adv7604.c 	struct v4l2_subdev *sd = &state->sd;
sd               2061 drivers/media/i2c/adv7604.c 		cec_write_clr_set(sd, 0x2a, 0x01, 0x01); /* power up cec */
sd               2062 drivers/media/i2c/adv7604.c 		cec_write(sd, 0x2c, 0x01);	/* cec soft reset */
sd               2063 drivers/media/i2c/adv7604.c 		cec_write_clr_set(sd, 0x11, 0x01, 0); /* initially disable tx */
sd               2069 drivers/media/i2c/adv7604.c 		io_write_clr_set(sd, info->cec_irq_status + 3, 0x0f, 0x0f);
sd               2070 drivers/media/i2c/adv7604.c 		cec_write(sd, info->cec_rx_enable, info->cec_rx_enable_mask);
sd               2073 drivers/media/i2c/adv7604.c 		io_write_clr_set(sd, info->cec_irq_status + 3, 0x0f, 0x00);
sd               2075 drivers/media/i2c/adv7604.c 		cec_write_clr_set(sd, 0x27, 0x70, 0x00);
sd               2077 drivers/media/i2c/adv7604.c 		cec_write_clr_set(sd, 0x2a, 0x01, 0x00);
sd               2081 drivers/media/i2c/adv7604.c 	adv76xx_s_detect_tx_5v_ctrl(sd);
sd               2088 drivers/media/i2c/adv7604.c 	struct v4l2_subdev *sd = &state->sd;
sd               2095 drivers/media/i2c/adv7604.c 		cec_write_clr_set(sd, 0x27, 0x70, 0);
sd               2119 drivers/media/i2c/adv7604.c 		cec_write_clr_set(sd, 0x27, 0x10, 0x10);
sd               2121 drivers/media/i2c/adv7604.c 		cec_write_clr_set(sd, 0x28, 0x0f, addr);
sd               2125 drivers/media/i2c/adv7604.c 		cec_write_clr_set(sd, 0x27, 0x20, 0x20);
sd               2127 drivers/media/i2c/adv7604.c 		cec_write_clr_set(sd, 0x28, 0xf0, addr << 4);
sd               2131 drivers/media/i2c/adv7604.c 		cec_write_clr_set(sd, 0x27, 0x40, 0x40);
sd               2133 drivers/media/i2c/adv7604.c 		cec_write_clr_set(sd, 0x29, 0x0f, addr);
sd               2143 drivers/media/i2c/adv7604.c 	struct v4l2_subdev *sd = &state->sd;
sd               2152 drivers/media/i2c/adv7604.c 	cec_write_clr_set(sd, 0x12, 0x70, max(1, attempts - 1) << 4);
sd               2155 drivers/media/i2c/adv7604.c 		v4l2_err(sd, "%s: len exceeded 16 (%d)\n", __func__, len);
sd               2161 drivers/media/i2c/adv7604.c 		cec_write(sd, i, msg->msg[i]);
sd               2164 drivers/media/i2c/adv7604.c 	cec_write(sd, 0x10, len);
sd               2166 drivers/media/i2c/adv7604.c 	cec_write(sd, 0x11, 0x01);
sd               2177 drivers/media/i2c/adv7604.c static int adv76xx_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
sd               2179 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               2181 drivers/media/i2c/adv7604.c 	const u8 irq_reg_0x43 = io_read(sd, 0x43);
sd               2182 drivers/media/i2c/adv7604.c 	const u8 irq_reg_0x6b = io_read(sd, 0x6b);
sd               2183 drivers/media/i2c/adv7604.c 	const u8 irq_reg_0x70 = io_read(sd, 0x70);
sd               2189 drivers/media/i2c/adv7604.c 		io_write(sd, 0x44, irq_reg_0x43);
sd               2191 drivers/media/i2c/adv7604.c 		io_write(sd, 0x71, irq_reg_0x70);
sd               2193 drivers/media/i2c/adv7604.c 		io_write(sd, 0x6c, irq_reg_0x6b);
sd               2195 drivers/media/i2c/adv7604.c 	v4l2_dbg(2, debug, sd, "%s: ", __func__);
sd               2199 drivers/media/i2c/adv7604.c 	fmt_change_digital = is_digital_input(sd)
sd               2204 drivers/media/i2c/adv7604.c 		v4l2_dbg(1, debug, sd,
sd               2208 drivers/media/i2c/adv7604.c 		v4l2_subdev_notify_event(sd, &adv76xx_ev_fmt);
sd               2215 drivers/media/i2c/adv7604.c 		v4l2_dbg(1, debug, sd, "%s: irq %s mode\n", __func__,
sd               2216 drivers/media/i2c/adv7604.c 			(io_read(sd, 0x6a) & 0x01) ? "HDMI" : "DVI");
sd               2217 drivers/media/i2c/adv7604.c 		set_rgb_quantization_range(sd);
sd               2224 drivers/media/i2c/adv7604.c 	adv76xx_cec_isr(sd, handled);
sd               2230 drivers/media/i2c/adv7604.c 		v4l2_dbg(1, debug, sd, "%s: tx_5v: 0x%x\n", __func__, tx_5v);
sd               2231 drivers/media/i2c/adv7604.c 		adv76xx_s_detect_tx_5v_ctrl(sd);
sd               2243 drivers/media/i2c/adv7604.c 	adv76xx_isr(&state->sd, 0, &handled);
sd               2248 drivers/media/i2c/adv7604.c static int adv76xx_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
sd               2250 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               2286 drivers/media/i2c/adv7604.c static int adv76xx_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
sd               2288 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               2305 drivers/media/i2c/adv7604.c 		rep_write_clr_set(sd, info->edid_enable_reg, 0x0f, state->edid.present);
sd               2316 drivers/media/i2c/adv7604.c 		v4l2_dbg(2, debug, sd, "%s: clear EDID pad %d, edid.present = 0x%x\n",
sd               2329 drivers/media/i2c/adv7604.c 	v4l2_dbg(2, debug, sd, "%s: write EDID pad %d, edid.present = 0x%x\n",
sd               2335 drivers/media/i2c/adv7604.c 	rep_write_clr_set(sd, info->edid_enable_reg, 0x0f, 0x00);
sd               2350 drivers/media/i2c/adv7604.c 		rep_write(sd, 0x70, edid->edid[spa_loc]);
sd               2351 drivers/media/i2c/adv7604.c 		rep_write(sd, 0x71, edid->edid[spa_loc + 1]);
sd               2354 drivers/media/i2c/adv7604.c 		rep_write(sd, 0x72, edid->edid[spa_loc]);
sd               2355 drivers/media/i2c/adv7604.c 		rep_write(sd, 0x73, edid->edid[spa_loc + 1]);
sd               2358 drivers/media/i2c/adv7604.c 		rep_write(sd, 0x74, edid->edid[spa_loc]);
sd               2359 drivers/media/i2c/adv7604.c 		rep_write(sd, 0x75, edid->edid[spa_loc + 1]);
sd               2366 drivers/media/i2c/adv7604.c 		rep_write(sd, 0x76, spa_loc & 0xff);
sd               2367 drivers/media/i2c/adv7604.c 		rep_write_clr_set(sd, 0x77, 0x40, (spa_loc & 0x100) >> 2);
sd               2370 drivers/media/i2c/adv7604.c 		rep_write(sd, 0x70, spa_loc & 0xff);
sd               2371 drivers/media/i2c/adv7604.c 		rep_write_clr_set(sd, 0x71, 0x01, (spa_loc & 0x100) >> 8);
sd               2383 drivers/media/i2c/adv7604.c 	err = edid_write_block(sd, 128 * edid->blocks, state->edid.edid);
sd               2385 drivers/media/i2c/adv7604.c 		v4l2_err(sd, "error %d writing edid pad %d\n", err, edid->pad);
sd               2391 drivers/media/i2c/adv7604.c 	rep_write_clr_set(sd, info->edid_enable_reg, 0x0f, state->edid.present);
sd               2394 drivers/media/i2c/adv7604.c 		if (rep_read(sd, info->edid_status_reg) & state->edid.present)
sd               2399 drivers/media/i2c/adv7604.c 		v4l2_err(sd, "error enabling edid (0x%x)\n", state->edid.present);
sd               2418 drivers/media/i2c/adv7604.c static int adv76xx_read_infoframe(struct v4l2_subdev *sd, int index,
sd               2425 drivers/media/i2c/adv7604.c 	if (!(io_read(sd, 0x60) & adv76xx_cri[index].present_mask)) {
sd               2426 drivers/media/i2c/adv7604.c 		v4l2_info(sd, "%s infoframe not received\n",
sd               2432 drivers/media/i2c/adv7604.c 		buffer[i] = infoframe_read(sd,
sd               2438 drivers/media/i2c/adv7604.c 		v4l2_err(sd, "%s: invalid %s infoframe length %d\n", __func__,
sd               2444 drivers/media/i2c/adv7604.c 		buffer[i + 3] = infoframe_read(sd,
sd               2448 drivers/media/i2c/adv7604.c 		v4l2_err(sd, "%s: unpack of %s infoframe failed\n", __func__,
sd               2455 drivers/media/i2c/adv7604.c static void adv76xx_log_infoframes(struct v4l2_subdev *sd)
sd               2459 drivers/media/i2c/adv7604.c 	if (!is_hdmi(sd)) {
sd               2460 drivers/media/i2c/adv7604.c 		v4l2_info(sd, "receive DVI-D signal, no infoframes\n");
sd               2466 drivers/media/i2c/adv7604.c 		struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2468 drivers/media/i2c/adv7604.c 		if (adv76xx_read_infoframe(sd, i, &frame))
sd               2474 drivers/media/i2c/adv7604.c static int adv76xx_log_status(struct v4l2_subdev *sd)
sd               2476 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               2480 drivers/media/i2c/adv7604.c 	u8 reg_io_0x02 = io_read(sd, 0x02);
sd               2518 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "-----Chip status-----\n");
sd               2519 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "Chip power: %s\n", no_power(sd) ? "off" : "on");
sd               2520 drivers/media/i2c/adv7604.c 	edid_enabled = rep_read(sd, info->edid_status_reg);
sd               2521 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "EDID enabled port A: %s, B: %s, C: %s, D: %s\n",
sd               2526 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "CEC: %s\n", state->cec_enabled_adap ?
sd               2535 drivers/media/i2c/adv7604.c 				v4l2_info(sd, "CEC Logical Address: 0x%x\n",
sd               2540 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "-----Signal status-----\n");
sd               2541 drivers/media/i2c/adv7604.c 	cable_det = info->read_cable_det(sd);
sd               2542 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "Cable detected (+5V power) port A: %s, B: %s, C: %s, D: %s\n",
sd               2547 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "TMDS signal detected: %s\n",
sd               2548 drivers/media/i2c/adv7604.c 			no_signal_tmds(sd) ? "false" : "true");
sd               2549 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "TMDS signal locked: %s\n",
sd               2550 drivers/media/i2c/adv7604.c 			no_lock_tmds(sd) ? "false" : "true");
sd               2551 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "SSPD locked: %s\n", no_lock_sspd(sd) ? "false" : "true");
sd               2552 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "STDI locked: %s\n", no_lock_stdi(sd) ? "false" : "true");
sd               2553 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "CP locked: %s\n", no_lock_cp(sd) ? "false" : "true");
sd               2554 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "CP free run: %s\n",
sd               2555 drivers/media/i2c/adv7604.c 			(in_free_run(sd)) ? "on" : "off");
sd               2556 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "Prim-mode = 0x%x, video std = 0x%x, v_freq = 0x%x\n",
sd               2557 drivers/media/i2c/adv7604.c 			io_read(sd, 0x01) & 0x0f, io_read(sd, 0x00) & 0x3f,
sd               2558 drivers/media/i2c/adv7604.c 			(io_read(sd, 0x01) & 0x70) >> 4);
sd               2560 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "-----Video Timings-----\n");
sd               2561 drivers/media/i2c/adv7604.c 	if (read_stdi(sd, &stdi))
sd               2562 drivers/media/i2c/adv7604.c 		v4l2_info(sd, "STDI: not locked\n");
sd               2564 drivers/media/i2c/adv7604.c 		v4l2_info(sd, "STDI: lcf (frame height - 1) = %d, bl = %d, lcvs (vsync) = %d, %s, %chsync, %cvsync\n",
sd               2568 drivers/media/i2c/adv7604.c 	if (adv76xx_query_dv_timings(sd, &timings))
sd               2569 drivers/media/i2c/adv7604.c 		v4l2_info(sd, "No video detected\n");
sd               2571 drivers/media/i2c/adv7604.c 		v4l2_print_dv_timings(sd->name, "Detected format: ",
sd               2573 drivers/media/i2c/adv7604.c 	v4l2_print_dv_timings(sd->name, "Configured format: ",
sd               2576 drivers/media/i2c/adv7604.c 	if (no_signal(sd))
sd               2579 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "-----Color space-----\n");
sd               2580 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "RGB quantization range ctrl: %s\n",
sd               2582 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "Input color space: %s\n",
sd               2584 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "Output color space: %s %s, alt-gamma %s\n",
sd               2589 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "Color space conversion: %s\n",
sd               2590 drivers/media/i2c/adv7604.c 			csc_coeff_sel_rb[cp_read(sd, info->cp_csc) >> 4]);
sd               2592 drivers/media/i2c/adv7604.c 	if (!is_digital_input(sd))
sd               2595 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "-----%s status-----\n", is_hdmi(sd) ? "HDMI" : "DVI-D");
sd               2596 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "Digital video port selected: %c\n",
sd               2597 drivers/media/i2c/adv7604.c 			(hdmi_read(sd, 0x00) & 0x03) + 'A');
sd               2598 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "HDCP encrypted content: %s\n",
sd               2599 drivers/media/i2c/adv7604.c 			(hdmi_read(sd, 0x05) & 0x40) ? "true" : "false");
sd               2600 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "HDCP keys read: %s%s\n",
sd               2601 drivers/media/i2c/adv7604.c 			(hdmi_read(sd, 0x04) & 0x20) ? "yes" : "no",
sd               2602 drivers/media/i2c/adv7604.c 			(hdmi_read(sd, 0x04) & 0x10) ? "ERROR" : "");
sd               2603 drivers/media/i2c/adv7604.c 	if (is_hdmi(sd)) {
sd               2604 drivers/media/i2c/adv7604.c 		bool audio_pll_locked = hdmi_read(sd, 0x04) & 0x01;
sd               2605 drivers/media/i2c/adv7604.c 		bool audio_sample_packet_detect = hdmi_read(sd, 0x18) & 0x01;
sd               2606 drivers/media/i2c/adv7604.c 		bool audio_mute = io_read(sd, 0x65) & 0x40;
sd               2608 drivers/media/i2c/adv7604.c 		v4l2_info(sd, "Audio: pll %s, samples %s, %s\n",
sd               2613 drivers/media/i2c/adv7604.c 			v4l2_info(sd, "Audio format: %s\n",
sd               2614 drivers/media/i2c/adv7604.c 					(hdmi_read(sd, 0x07) & 0x20) ? "multi-channel" : "stereo");
sd               2616 drivers/media/i2c/adv7604.c 		v4l2_info(sd, "Audio CTS: %u\n", (hdmi_read(sd, 0x5b) << 12) +
sd               2617 drivers/media/i2c/adv7604.c 				(hdmi_read(sd, 0x5c) << 8) +
sd               2618 drivers/media/i2c/adv7604.c 				(hdmi_read(sd, 0x5d) & 0xf0));
sd               2619 drivers/media/i2c/adv7604.c 		v4l2_info(sd, "Audio N: %u\n", ((hdmi_read(sd, 0x5d) & 0x0f) << 16) +
sd               2620 drivers/media/i2c/adv7604.c 				(hdmi_read(sd, 0x5e) << 8) +
sd               2621 drivers/media/i2c/adv7604.c 				hdmi_read(sd, 0x5f));
sd               2622 drivers/media/i2c/adv7604.c 		v4l2_info(sd, "AV Mute: %s\n", (hdmi_read(sd, 0x04) & 0x40) ? "on" : "off");
sd               2624 drivers/media/i2c/adv7604.c 		v4l2_info(sd, "Deep color mode: %s\n", deep_color_mode_txt[(hdmi_read(sd, 0x0b) & 0x60) >> 5]);
sd               2625 drivers/media/i2c/adv7604.c 		v4l2_info(sd, "HDMI colorspace: %s\n", hdmi_color_space_txt[hdmi_read(sd, 0x53) & 0xf]);
sd               2627 drivers/media/i2c/adv7604.c 		adv76xx_log_infoframes(sd);
sd               2633 drivers/media/i2c/adv7604.c static int adv76xx_subscribe_event(struct v4l2_subdev *sd,
sd               2639 drivers/media/i2c/adv7604.c 		return v4l2_src_change_event_subdev_subscribe(sd, fh, sub);
sd               2641 drivers/media/i2c/adv7604.c 		return v4l2_ctrl_subdev_subscribe_event(sd, fh, sub);
sd               2647 drivers/media/i2c/adv7604.c static int adv76xx_registered(struct v4l2_subdev *sd)
sd               2649 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               2650 drivers/media/i2c/adv7604.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2659 drivers/media/i2c/adv7604.c static void adv76xx_unregistered(struct v4l2_subdev *sd)
sd               2661 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               2772 drivers/media/i2c/adv7604.c static int adv76xx_core_init(struct v4l2_subdev *sd)
sd               2774 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               2778 drivers/media/i2c/adv7604.c 	hdmi_write(sd, 0x48,
sd               2782 drivers/media/i2c/adv7604.c 	disable_input(sd);
sd               2787 drivers/media/i2c/adv7604.c 		select_input(sd);
sd               2788 drivers/media/i2c/adv7604.c 		enable_input(sd);
sd               2792 drivers/media/i2c/adv7604.c 	io_write(sd, 0x0c, 0x42);   /* Power up part and power down VDP */
sd               2793 drivers/media/i2c/adv7604.c 	io_write(sd, 0x0b, 0x44);   /* Power down ESDP block */
sd               2794 drivers/media/i2c/adv7604.c 	cp_write(sd, 0xcf, 0x01);   /* Power down macrovision */
sd               2797 drivers/media/i2c/adv7604.c 	io_write_clr_set(sd, 0x02, 0x0f, pdata->alt_gamma << 3);
sd               2798 drivers/media/i2c/adv7604.c 	io_write_clr_set(sd, 0x05, 0x0e, pdata->blank_data << 3 |
sd               2803 drivers/media/i2c/adv7604.c 	cp_write(sd, 0x69, 0x30);   /* Enable CP CSC */
sd               2806 drivers/media/i2c/adv7604.c 	io_write(sd, 0x06, 0xa0 | pdata->inv_vs_pol << 2 |
sd               2810 drivers/media/i2c/adv7604.c 	io_write(sd, 0x14, 0x40 | pdata->dr_str_data << 4 |
sd               2814 drivers/media/i2c/adv7604.c 	cp_write(sd, 0xba, (pdata->hdmi_free_run_mode << 1) | 0x01); /* HDMI free run */
sd               2815 drivers/media/i2c/adv7604.c 	cp_write(sd, 0xf3, 0xdc); /* Low threshold to enter/exit free run mode */
sd               2816 drivers/media/i2c/adv7604.c 	cp_write(sd, 0xf9, 0x23); /*  STDI ch. 1 - LCVS change threshold -
sd               2818 drivers/media/i2c/adv7604.c 	cp_write(sd, 0x45, 0x23); /*  STDI ch. 2 - LCVS change threshold -
sd               2820 drivers/media/i2c/adv7604.c 	cp_write(sd, 0xc9, 0x2d); /* use prim_mode and vid_std as free run resolution
sd               2824 drivers/media/i2c/adv7604.c 	hdmi_write_clr_set(sd, 0x15, 0x03, 0x03); /* Mute on FIFO over-/underflow [REF_01, c. 1.2.18] */
sd               2825 drivers/media/i2c/adv7604.c 	hdmi_write_clr_set(sd, 0x1a, 0x0e, 0x08); /* Wait 1 s before unmute */
sd               2826 drivers/media/i2c/adv7604.c 	hdmi_write_clr_set(sd, 0x68, 0x06, 0x06); /* FIFO reset on over-/underflow [REF_01, c. 1.2.19] */
sd               2829 drivers/media/i2c/adv7604.c 	afe_write(sd, 0xb5, 0x01);  /* Setting MCLK to 256Fs */
sd               2832 drivers/media/i2c/adv7604.c 		afe_write(sd, 0x02, pdata->ain_sel); /* Select analog input muxing mode */
sd               2833 drivers/media/i2c/adv7604.c 		io_write_clr_set(sd, 0x30, 1 << 4, pdata->output_bus_lsb_to_msb << 4);
sd               2837 drivers/media/i2c/adv7604.c 	io_write(sd, 0x40, 0xc0 | pdata->int1_config); /* Configure INT1 */
sd               2838 drivers/media/i2c/adv7604.c 	io_write(sd, 0x46, 0x98); /* Enable SSPD, STDI and CP unlocked interrupts */
sd               2839 drivers/media/i2c/adv7604.c 	io_write(sd, 0x6e, info->fmt_change_digital_mask); /* Enable V_LOCKED and DE_REGEN_LCK interrupts */
sd               2840 drivers/media/i2c/adv7604.c 	io_write(sd, 0x73, info->cable_det_mask); /* Enable cable detection (+5v) interrupts */
sd               2841 drivers/media/i2c/adv7604.c 	info->setup_irqs(sd);
sd               2843 drivers/media/i2c/adv7604.c 	return v4l2_ctrl_handler_setup(sd->ctrl_handler);
sd               2846 drivers/media/i2c/adv7604.c static void adv7604_setup_irqs(struct v4l2_subdev *sd)
sd               2848 drivers/media/i2c/adv7604.c 	io_write(sd, 0x41, 0xd7); /* STDI irq for any change, disable INT2 */
sd               2851 drivers/media/i2c/adv7604.c static void adv7611_setup_irqs(struct v4l2_subdev *sd)
sd               2853 drivers/media/i2c/adv7604.c 	io_write(sd, 0x41, 0xd0); /* STDI irq for any change, disable INT2 */
sd               2856 drivers/media/i2c/adv7604.c static void adv7612_setup_irqs(struct v4l2_subdev *sd)
sd               2858 drivers/media/i2c/adv7604.c 	io_write(sd, 0x41, 0xd0); /* disable INT2 */
sd               2869 drivers/media/i2c/adv7604.c static struct i2c_client *adv76xx_dummy_client(struct v4l2_subdev *sd,
sd               2872 drivers/media/i2c/adv7604.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2873 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               2887 drivers/media/i2c/adv7604.c 		io_write(sd, io_reg, new_client->addr << 1);
sd               3347 drivers/media/i2c/adv7604.c 	struct v4l2_subdev *sd;
sd               3410 drivers/media/i2c/adv7604.c 	sd = &state->sd;
sd               3411 drivers/media/i2c/adv7604.c 	v4l2_i2c_subdev_init(sd, client, &adv76xx_ops);
sd               3412 drivers/media/i2c/adv7604.c 	snprintf(sd->name, sizeof(sd->name), "%s %d-%04x",
sd               3415 drivers/media/i2c/adv7604.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
sd               3416 drivers/media/i2c/adv7604.c 	sd->internal_ops = &adv76xx_int_ops;
sd               3422 drivers/media/i2c/adv7604.c 		v4l2_err(sd, "Error configuring IO regmap region\n");
sd               3435 drivers/media/i2c/adv7604.c 			v4l2_err(sd, "Error %d reading IO Regmap\n", err);
sd               3439 drivers/media/i2c/adv7604.c 			v4l2_err(sd, "not an adv7604 on address 0x%x\n",
sd               3450 drivers/media/i2c/adv7604.c 			v4l2_err(sd, "Error %d reading IO Regmap\n", err);
sd               3458 drivers/media/i2c/adv7604.c 			v4l2_err(sd, "Error %d reading IO Regmap\n", err);
sd               3464 drivers/media/i2c/adv7604.c 			v4l2_err(sd, "not an adv761x on address 0x%x\n",
sd               3506 drivers/media/i2c/adv7604.c 	sd->ctrl_handler = hdl;
sd               3511 drivers/media/i2c/adv7604.c 	if (adv76xx_s_detect_tx_5v_ctrl(sd)) {
sd               3522 drivers/media/i2c/adv7604.c 		dummy_client = adv76xx_dummy_client(sd, i);
sd               3525 drivers/media/i2c/adv7604.c 			v4l2_err(sd, "failed to create i2c client %u\n", i);
sd               3540 drivers/media/i2c/adv7604.c 	sd->entity.function = MEDIA_ENT_F_DV_DECODER;
sd               3542 drivers/media/i2c/adv7604.c 	err = media_entity_pads_init(&sd->entity, state->source_pad + 1,
sd               3552 drivers/media/i2c/adv7604.c 	err = adv76xx_core_init(sd);
sd               3575 drivers/media/i2c/adv7604.c 	v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
sd               3578 drivers/media/i2c/adv7604.c 	err = v4l2_async_register_subdev(sd);
sd               3585 drivers/media/i2c/adv7604.c 	media_entity_cleanup(&sd->entity);
sd               3599 drivers/media/i2c/adv7604.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               3600 drivers/media/i2c/adv7604.c 	struct adv76xx_state *state = to_state(sd);
sd               3603 drivers/media/i2c/adv7604.c 	io_write(sd, 0x40, 0);
sd               3604 drivers/media/i2c/adv7604.c 	io_write(sd, 0x41, 0);
sd               3605 drivers/media/i2c/adv7604.c 	io_write(sd, 0x46, 0);
sd               3606 drivers/media/i2c/adv7604.c 	io_write(sd, 0x6e, 0);
sd               3607 drivers/media/i2c/adv7604.c 	io_write(sd, 0x73, 0);
sd               3610 drivers/media/i2c/adv7604.c 	v4l2_async_unregister_subdev(sd);
sd               3611 drivers/media/i2c/adv7604.c 	media_entity_cleanup(&sd->entity);
sd               3612 drivers/media/i2c/adv7604.c 	adv76xx_unregister_clients(to_state(sd));
sd               3613 drivers/media/i2c/adv7604.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                 90 drivers/media/i2c/adv7842.c 	struct v4l2_subdev sd;
sd                247 drivers/media/i2c/adv7842.c static inline struct adv7842_state *to_state(struct v4l2_subdev *sd)
sd                249 drivers/media/i2c/adv7842.c 	return container_of(sd, struct adv7842_state, sd);
sd                254 drivers/media/i2c/adv7842.c 	return &container_of(ctrl->handler, struct adv7842_state, hdl)->sd;
sd                362 drivers/media/i2c/adv7842.c static inline int io_read(struct v4l2_subdev *sd, u8 reg)
sd                364 drivers/media/i2c/adv7842.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                369 drivers/media/i2c/adv7842.c static inline int io_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                371 drivers/media/i2c/adv7842.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                376 drivers/media/i2c/adv7842.c static inline int io_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
sd                378 drivers/media/i2c/adv7842.c 	return io_write(sd, reg, (io_read(sd, reg) & mask) | val);
sd                381 drivers/media/i2c/adv7842.c static inline int io_write_clr_set(struct v4l2_subdev *sd,
sd                384 drivers/media/i2c/adv7842.c 	return io_write(sd, reg, (io_read(sd, reg) & ~mask) | val);
sd                387 drivers/media/i2c/adv7842.c static inline int avlink_read(struct v4l2_subdev *sd, u8 reg)
sd                389 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                394 drivers/media/i2c/adv7842.c static inline int avlink_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                396 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                401 drivers/media/i2c/adv7842.c static inline int cec_read(struct v4l2_subdev *sd, u8 reg)
sd                403 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                408 drivers/media/i2c/adv7842.c static inline int cec_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                410 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                415 drivers/media/i2c/adv7842.c static inline int cec_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
sd                417 drivers/media/i2c/adv7842.c 	return cec_write(sd, reg, (cec_read(sd, reg) & ~mask) | val);
sd                420 drivers/media/i2c/adv7842.c static inline int infoframe_read(struct v4l2_subdev *sd, u8 reg)
sd                422 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                427 drivers/media/i2c/adv7842.c static inline int infoframe_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                429 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                434 drivers/media/i2c/adv7842.c static inline int sdp_io_read(struct v4l2_subdev *sd, u8 reg)
sd                436 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                441 drivers/media/i2c/adv7842.c static inline int sdp_io_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                443 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                448 drivers/media/i2c/adv7842.c static inline int sdp_io_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
sd                450 drivers/media/i2c/adv7842.c 	return sdp_io_write(sd, reg, (sdp_io_read(sd, reg) & mask) | val);
sd                453 drivers/media/i2c/adv7842.c static inline int sdp_read(struct v4l2_subdev *sd, u8 reg)
sd                455 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                460 drivers/media/i2c/adv7842.c static inline int sdp_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                462 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                467 drivers/media/i2c/adv7842.c static inline int sdp_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
sd                469 drivers/media/i2c/adv7842.c 	return sdp_write(sd, reg, (sdp_read(sd, reg) & mask) | val);
sd                472 drivers/media/i2c/adv7842.c static inline int afe_read(struct v4l2_subdev *sd, u8 reg)
sd                474 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                479 drivers/media/i2c/adv7842.c static inline int afe_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                481 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                486 drivers/media/i2c/adv7842.c static inline int afe_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
sd                488 drivers/media/i2c/adv7842.c 	return afe_write(sd, reg, (afe_read(sd, reg) & mask) | val);
sd                491 drivers/media/i2c/adv7842.c static inline int rep_read(struct v4l2_subdev *sd, u8 reg)
sd                493 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                498 drivers/media/i2c/adv7842.c static inline int rep_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                500 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                505 drivers/media/i2c/adv7842.c static inline int rep_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
sd                507 drivers/media/i2c/adv7842.c 	return rep_write(sd, reg, (rep_read(sd, reg) & mask) | val);
sd                510 drivers/media/i2c/adv7842.c static inline int edid_read(struct v4l2_subdev *sd, u8 reg)
sd                512 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                517 drivers/media/i2c/adv7842.c static inline int edid_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                519 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                524 drivers/media/i2c/adv7842.c static inline int hdmi_read(struct v4l2_subdev *sd, u8 reg)
sd                526 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                531 drivers/media/i2c/adv7842.c static inline int hdmi_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                533 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                538 drivers/media/i2c/adv7842.c static inline int hdmi_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
sd                540 drivers/media/i2c/adv7842.c 	return hdmi_write(sd, reg, (hdmi_read(sd, reg) & mask) | val);
sd                543 drivers/media/i2c/adv7842.c static inline int cp_read(struct v4l2_subdev *sd, u8 reg)
sd                545 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                550 drivers/media/i2c/adv7842.c static inline int cp_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                552 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                557 drivers/media/i2c/adv7842.c static inline int cp_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
sd                559 drivers/media/i2c/adv7842.c 	return cp_write(sd, reg, (cp_read(sd, reg) & mask) | val);
sd                562 drivers/media/i2c/adv7842.c static inline int vdp_read(struct v4l2_subdev *sd, u8 reg)
sd                564 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                569 drivers/media/i2c/adv7842.c static inline int vdp_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                571 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                576 drivers/media/i2c/adv7842.c static void main_reset(struct v4l2_subdev *sd)
sd                578 drivers/media/i2c/adv7842.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                580 drivers/media/i2c/adv7842.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd                647 drivers/media/i2c/adv7842.c static inline bool is_analog_input(struct v4l2_subdev *sd)
sd                649 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                655 drivers/media/i2c/adv7842.c static inline bool is_digital_input(struct v4l2_subdev *sd)
sd                657 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                685 drivers/media/i2c/adv7842.c adv7842_get_dv_timings_cap(struct v4l2_subdev *sd)
sd                687 drivers/media/i2c/adv7842.c 	return is_digital_input(sd) ? &adv7842_timings_cap_digital :
sd                693 drivers/media/i2c/adv7842.c static u16 adv7842_read_cable_det(struct v4l2_subdev *sd)
sd                695 drivers/media/i2c/adv7842.c 	u8 reg = io_read(sd, 0x6f);
sd                710 drivers/media/i2c/adv7842.c 	struct v4l2_subdev *sd = &state->sd;
sd                714 drivers/media/i2c/adv7842.c 	v4l2_dbg(2, debug, sd, "%s: enable hotplug on ports: 0x%x\n",
sd                721 drivers/media/i2c/adv7842.c 	io_write_and_or(sd, 0x20, 0xcf, mask);
sd                724 drivers/media/i2c/adv7842.c static int edid_write_vga_segment(struct v4l2_subdev *sd)
sd                726 drivers/media/i2c/adv7842.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                727 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                732 drivers/media/i2c/adv7842.c 	v4l2_dbg(2, debug, sd, "%s: write EDID on VGA port\n", __func__);
sd                735 drivers/media/i2c/adv7842.c 	io_write_and_or(sd, 0x20, 0xcf, 0x00);
sd                738 drivers/media/i2c/adv7842.c 	rep_write_and_or(sd, 0x7f, 0x7f, 0x00);
sd                741 drivers/media/i2c/adv7842.c 	rep_write_and_or(sd, 0x77, 0xef, 0x10);
sd                752 drivers/media/i2c/adv7842.c 	rep_write_and_or(sd, 0x7f, 0x7f, 0x80);
sd                755 drivers/media/i2c/adv7842.c 		if (rep_read(sd, 0x79) & 0x20)
sd                770 drivers/media/i2c/adv7842.c static int edid_write_hdmi_segment(struct v4l2_subdev *sd, u8 port)
sd                772 drivers/media/i2c/adv7842.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                773 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                780 drivers/media/i2c/adv7842.c 	v4l2_dbg(2, debug, sd, "%s: write EDID on port %c\n",
sd                784 drivers/media/i2c/adv7842.c 	io_write_and_or(sd, 0x20, 0xcf, 0x00);
sd                787 drivers/media/i2c/adv7842.c 	rep_write_and_or(sd, 0x77, 0xf3, 0x00);
sd                807 drivers/media/i2c/adv7842.c 	rep_write_and_or(sd, 0x77, 0xef, 0x00);
sd                816 drivers/media/i2c/adv7842.c 		rep_write(sd, 0x72, edid[spa_loc]);
sd                817 drivers/media/i2c/adv7842.c 		rep_write(sd, 0x73, edid[spa_loc + 1]);
sd                819 drivers/media/i2c/adv7842.c 		rep_write(sd, 0x74, edid[spa_loc]);
sd                820 drivers/media/i2c/adv7842.c 		rep_write(sd, 0x75, edid[spa_loc + 1]);
sd                822 drivers/media/i2c/adv7842.c 	rep_write(sd, 0x76, spa_loc & 0xff);
sd                823 drivers/media/i2c/adv7842.c 	rep_write_and_or(sd, 0x77, 0xbf, (spa_loc >> 2) & 0x40);
sd                828 drivers/media/i2c/adv7842.c 	rep_write_and_or(sd, 0x77, 0xf3, state->hdmi_edid.present);
sd                831 drivers/media/i2c/adv7842.c 		if (rep_read(sd, 0x7d) & state->hdmi_edid.present)
sd                851 drivers/media/i2c/adv7842.c static void adv7842_inv_register(struct v4l2_subdev *sd)
sd                853 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "0x000-0x0ff: IO Map\n");
sd                854 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "0x100-0x1ff: AVLink Map\n");
sd                855 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "0x200-0x2ff: CEC Map\n");
sd                856 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "0x300-0x3ff: InfoFrame Map\n");
sd                857 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "0x400-0x4ff: SDP_IO Map\n");
sd                858 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "0x500-0x5ff: SDP Map\n");
sd                859 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "0x600-0x6ff: AFE Map\n");
sd                860 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "0x700-0x7ff: Repeater Map\n");
sd                861 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "0x800-0x8ff: EDID Map\n");
sd                862 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "0x900-0x9ff: HDMI Map\n");
sd                863 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "0xa00-0xaff: CP Map\n");
sd                864 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "0xb00-0xbff: VDP Map\n");
sd                867 drivers/media/i2c/adv7842.c static int adv7842_g_register(struct v4l2_subdev *sd,
sd                873 drivers/media/i2c/adv7842.c 		reg->val = io_read(sd, reg->reg & 0xff);
sd                876 drivers/media/i2c/adv7842.c 		reg->val = avlink_read(sd, reg->reg & 0xff);
sd                879 drivers/media/i2c/adv7842.c 		reg->val = cec_read(sd, reg->reg & 0xff);
sd                882 drivers/media/i2c/adv7842.c 		reg->val = infoframe_read(sd, reg->reg & 0xff);
sd                885 drivers/media/i2c/adv7842.c 		reg->val = sdp_io_read(sd, reg->reg & 0xff);
sd                888 drivers/media/i2c/adv7842.c 		reg->val = sdp_read(sd, reg->reg & 0xff);
sd                891 drivers/media/i2c/adv7842.c 		reg->val = afe_read(sd, reg->reg & 0xff);
sd                894 drivers/media/i2c/adv7842.c 		reg->val = rep_read(sd, reg->reg & 0xff);
sd                897 drivers/media/i2c/adv7842.c 		reg->val = edid_read(sd, reg->reg & 0xff);
sd                900 drivers/media/i2c/adv7842.c 		reg->val = hdmi_read(sd, reg->reg & 0xff);
sd                903 drivers/media/i2c/adv7842.c 		reg->val = cp_read(sd, reg->reg & 0xff);
sd                906 drivers/media/i2c/adv7842.c 		reg->val = vdp_read(sd, reg->reg & 0xff);
sd                909 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "Register %03llx not supported\n", reg->reg);
sd                910 drivers/media/i2c/adv7842.c 		adv7842_inv_register(sd);
sd                916 drivers/media/i2c/adv7842.c static int adv7842_s_register(struct v4l2_subdev *sd,
sd                923 drivers/media/i2c/adv7842.c 		io_write(sd, reg->reg & 0xff, val);
sd                926 drivers/media/i2c/adv7842.c 		avlink_write(sd, reg->reg & 0xff, val);
sd                929 drivers/media/i2c/adv7842.c 		cec_write(sd, reg->reg & 0xff, val);
sd                932 drivers/media/i2c/adv7842.c 		infoframe_write(sd, reg->reg & 0xff, val);
sd                935 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, reg->reg & 0xff, val);
sd                938 drivers/media/i2c/adv7842.c 		sdp_write(sd, reg->reg & 0xff, val);
sd                941 drivers/media/i2c/adv7842.c 		afe_write(sd, reg->reg & 0xff, val);
sd                944 drivers/media/i2c/adv7842.c 		rep_write(sd, reg->reg & 0xff, val);
sd                947 drivers/media/i2c/adv7842.c 		edid_write(sd, reg->reg & 0xff, val);
sd                950 drivers/media/i2c/adv7842.c 		hdmi_write(sd, reg->reg & 0xff, val);
sd                953 drivers/media/i2c/adv7842.c 		cp_write(sd, reg->reg & 0xff, val);
sd                956 drivers/media/i2c/adv7842.c 		vdp_write(sd, reg->reg & 0xff, val);
sd                959 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "Register %03llx not supported\n", reg->reg);
sd                960 drivers/media/i2c/adv7842.c 		adv7842_inv_register(sd);
sd                967 drivers/media/i2c/adv7842.c static int adv7842_s_detect_tx_5v_ctrl(struct v4l2_subdev *sd)
sd                969 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd                970 drivers/media/i2c/adv7842.c 	u16 cable_det = adv7842_read_cable_det(sd);
sd                972 drivers/media/i2c/adv7842.c 	v4l2_dbg(1, debug, sd, "%s: 0x%x\n", __func__, cable_det);
sd                977 drivers/media/i2c/adv7842.c static int find_and_set_predefined_video_timings(struct v4l2_subdev *sd,
sd                986 drivers/media/i2c/adv7842.c 				  is_digital_input(sd) ? 250000 : 1000000, false))
sd                989 drivers/media/i2c/adv7842.c 		io_write(sd, 0x00, predef_vid_timings[i].vid_std);
sd                991 drivers/media/i2c/adv7842.c 		io_write(sd, 0x01, (predef_vid_timings[i].v_freq << 4) + prim_mode);
sd                998 drivers/media/i2c/adv7842.c static int configure_predefined_video_timings(struct v4l2_subdev *sd,
sd               1001 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               1004 drivers/media/i2c/adv7842.c 	v4l2_dbg(1, debug, sd, "%s\n", __func__);
sd               1007 drivers/media/i2c/adv7842.c 	io_write(sd, 0x16, 0x43);
sd               1008 drivers/media/i2c/adv7842.c 	io_write(sd, 0x17, 0x5a);
sd               1010 drivers/media/i2c/adv7842.c 	cp_write_and_or(sd, 0x81, 0xef, 0x00);
sd               1011 drivers/media/i2c/adv7842.c 	cp_write(sd, 0x26, 0x00);
sd               1012 drivers/media/i2c/adv7842.c 	cp_write(sd, 0x27, 0x00);
sd               1013 drivers/media/i2c/adv7842.c 	cp_write(sd, 0x28, 0x00);
sd               1014 drivers/media/i2c/adv7842.c 	cp_write(sd, 0x29, 0x00);
sd               1015 drivers/media/i2c/adv7842.c 	cp_write(sd, 0x8f, 0x40);
sd               1016 drivers/media/i2c/adv7842.c 	cp_write(sd, 0x90, 0x00);
sd               1017 drivers/media/i2c/adv7842.c 	cp_write(sd, 0xa5, 0x00);
sd               1018 drivers/media/i2c/adv7842.c 	cp_write(sd, 0xa6, 0x00);
sd               1019 drivers/media/i2c/adv7842.c 	cp_write(sd, 0xa7, 0x00);
sd               1020 drivers/media/i2c/adv7842.c 	cp_write(sd, 0xab, 0x00);
sd               1021 drivers/media/i2c/adv7842.c 	cp_write(sd, 0xac, 0x00);
sd               1026 drivers/media/i2c/adv7842.c 		err = find_and_set_predefined_video_timings(sd,
sd               1029 drivers/media/i2c/adv7842.c 			err = find_and_set_predefined_video_timings(sd,
sd               1033 drivers/media/i2c/adv7842.c 		err = find_and_set_predefined_video_timings(sd,
sd               1036 drivers/media/i2c/adv7842.c 			err = find_and_set_predefined_video_timings(sd,
sd               1040 drivers/media/i2c/adv7842.c 		v4l2_dbg(2, debug, sd, "%s: Unknown mode %d\n",
sd               1050 drivers/media/i2c/adv7842.c static void configure_custom_video_timings(struct v4l2_subdev *sd,
sd               1053 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               1054 drivers/media/i2c/adv7842.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1068 drivers/media/i2c/adv7842.c 	v4l2_dbg(2, debug, sd, "%s\n", __func__);
sd               1074 drivers/media/i2c/adv7842.c 		io_write(sd, 0x00, 0x07); /* video std */
sd               1075 drivers/media/i2c/adv7842.c 		io_write(sd, 0x01, 0x02); /* prim mode */
sd               1077 drivers/media/i2c/adv7842.c 		cp_write_and_or(sd, 0x81, 0xef, 0x10);
sd               1083 drivers/media/i2c/adv7842.c 			v4l2_err(sd, "writing to reg 0x16 and 0x17 failed\n");
sd               1088 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x26, (cp_start_sav >> 8) & 0xf);
sd               1089 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x27, (cp_start_sav & 0xff));
sd               1090 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x28, (cp_start_eav >> 8) & 0xf);
sd               1091 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x29, (cp_start_eav & 0xff));
sd               1094 drivers/media/i2c/adv7842.c 		cp_write(sd, 0xa5, (cp_start_vbi >> 4) & 0xff);
sd               1095 drivers/media/i2c/adv7842.c 		cp_write(sd, 0xa6, ((cp_start_vbi & 0xf) << 4) |
sd               1097 drivers/media/i2c/adv7842.c 		cp_write(sd, 0xa7, cp_end_vbi & 0xff);
sd               1102 drivers/media/i2c/adv7842.c 		io_write(sd, 0x00, 0x02); /* video std */
sd               1103 drivers/media/i2c/adv7842.c 		io_write(sd, 0x01, 0x06); /* prim mode */
sd               1106 drivers/media/i2c/adv7842.c 		v4l2_dbg(2, debug, sd, "%s: Unknown mode %d\n",
sd               1111 drivers/media/i2c/adv7842.c 	cp_write(sd, 0x8f, (ch1_fr_ll >> 8) & 0x7);
sd               1112 drivers/media/i2c/adv7842.c 	cp_write(sd, 0x90, ch1_fr_ll & 0xff);
sd               1113 drivers/media/i2c/adv7842.c 	cp_write(sd, 0xab, (height >> 4) & 0xff);
sd               1114 drivers/media/i2c/adv7842.c 	cp_write(sd, 0xac, (height & 0x0f) << 4);
sd               1117 drivers/media/i2c/adv7842.c static void adv7842_set_offset(struct v4l2_subdev *sd, bool auto_offset, u16 offset_a, u16 offset_b, u16 offset_c)
sd               1119 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               1128 drivers/media/i2c/adv7842.c 	v4l2_dbg(2, debug, sd, "%s: %s offset: a = 0x%x, b = 0x%x, c = 0x%x\n",
sd               1132 drivers/media/i2c/adv7842.c 	offset_buf[0]= (cp_read(sd, 0x77) & 0xc0) | ((offset_a & 0x3f0) >> 4);
sd               1139 drivers/media/i2c/adv7842.c 		v4l2_err(sd, "%s: i2c error writing to CP reg 0x77, 0x78, 0x79, 0x7a\n", __func__);
sd               1142 drivers/media/i2c/adv7842.c static void adv7842_set_gain(struct v4l2_subdev *sd, bool auto_gain, u16 gain_a, u16 gain_b, u16 gain_c)
sd               1144 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               1157 drivers/media/i2c/adv7842.c 	v4l2_dbg(2, debug, sd, "%s: %s gain: a = 0x%x, b = 0x%x, c = 0x%x\n",
sd               1168 drivers/media/i2c/adv7842.c 		v4l2_err(sd, "%s: i2c error writing to CP reg 0x73, 0x74, 0x75, 0x76\n", __func__);
sd               1171 drivers/media/i2c/adv7842.c static void set_rgb_quantization_range(struct v4l2_subdev *sd)
sd               1173 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               1174 drivers/media/i2c/adv7842.c 	bool rgb_output = io_read(sd, 0x02) & 0x02;
sd               1175 drivers/media/i2c/adv7842.c 	bool hdmi_signal = hdmi_read(sd, 0x05) & 0x80;
sd               1178 drivers/media/i2c/adv7842.c 	if (hdmi_signal && (io_read(sd, 0x60) & 1))
sd               1179 drivers/media/i2c/adv7842.c 		y = infoframe_read(sd, 0x01) >> 5;
sd               1181 drivers/media/i2c/adv7842.c 	v4l2_dbg(2, debug, sd, "%s: RGB quantization range: %d, RGB out: %d, HDMI: %d\n",
sd               1185 drivers/media/i2c/adv7842.c 	adv7842_set_gain(sd, true, 0x0, 0x0, 0x0);
sd               1186 drivers/media/i2c/adv7842.c 	adv7842_set_offset(sd, true, 0x0, 0x0, 0x0);
sd               1187 drivers/media/i2c/adv7842.c 	io_write_clr_set(sd, 0x02, 0x04, rgb_output ? 0 : 4);
sd               1194 drivers/media/i2c/adv7842.c 			io_write_and_or(sd, 0x02, 0x0f, 0x10);
sd               1201 drivers/media/i2c/adv7842.c 			io_write_and_or(sd, 0x02, 0x0f, 0xf0);
sd               1208 drivers/media/i2c/adv7842.c 			io_write_and_or(sd, 0x02, 0x0f, 0xf0);
sd               1217 drivers/media/i2c/adv7842.c 			io_write_and_or(sd, 0x02, 0x0f, 0x00);
sd               1220 drivers/media/i2c/adv7842.c 			io_write_and_or(sd, 0x02, 0x0f, 0x10);
sd               1222 drivers/media/i2c/adv7842.c 			if (is_digital_input(sd) && rgb_output) {
sd               1223 drivers/media/i2c/adv7842.c 				adv7842_set_offset(sd, false, 0x40, 0x40, 0x40);
sd               1225 drivers/media/i2c/adv7842.c 				adv7842_set_gain(sd, false, 0xe0, 0xe0, 0xe0);
sd               1226 drivers/media/i2c/adv7842.c 				adv7842_set_offset(sd, false, 0x70, 0x70, 0x70);
sd               1233 drivers/media/i2c/adv7842.c 			io_write_and_or(sd, 0x02, 0x0f, 0x20);
sd               1241 drivers/media/i2c/adv7842.c 		io_write_and_or(sd, 0x02, 0x0f, 0x00);
sd               1247 drivers/media/i2c/adv7842.c 			io_write_and_or(sd, 0x02, 0x0f, 0x60);
sd               1255 drivers/media/i2c/adv7842.c 		io_write_and_or(sd, 0x02, 0x0f, 0x10);
sd               1257 drivers/media/i2c/adv7842.c 		if (is_analog_input(sd) || hdmi_signal)
sd               1262 drivers/media/i2c/adv7842.c 			adv7842_set_offset(sd, false, 0x40, 0x40, 0x40);
sd               1264 drivers/media/i2c/adv7842.c 			adv7842_set_gain(sd, false, 0xe0, 0xe0, 0xe0);
sd               1265 drivers/media/i2c/adv7842.c 			adv7842_set_offset(sd, false, 0x70, 0x70, 0x70);
sd               1273 drivers/media/i2c/adv7842.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd               1274 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               1283 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x3c, ctrl->val);
sd               1284 drivers/media/i2c/adv7842.c 		sdp_write(sd, 0x14, ctrl->val);
sd               1288 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x3a, ctrl->val);
sd               1289 drivers/media/i2c/adv7842.c 		sdp_write(sd, 0x13, ctrl->val);
sd               1293 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x3b, ctrl->val);
sd               1294 drivers/media/i2c/adv7842.c 		sdp_write(sd, 0x15, ctrl->val);
sd               1298 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x3d, ctrl->val);
sd               1299 drivers/media/i2c/adv7842.c 		sdp_write(sd, 0x16, ctrl->val);
sd               1304 drivers/media/i2c/adv7842.c 		afe_write(sd, 0xc8, ctrl->val);
sd               1307 drivers/media/i2c/adv7842.c 		cp_write_and_or(sd, 0xbf, ~0x04, (ctrl->val << 2));
sd               1308 drivers/media/i2c/adv7842.c 		sdp_write_and_or(sd, 0xdd, ~0x04, (ctrl->val << 2));
sd               1328 drivers/media/i2c/adv7842.c 		v4l2_dbg(1, debug, sd, "R %x, G %x, B %x\n", R, G, B);
sd               1329 drivers/media/i2c/adv7842.c 		v4l2_dbg(1, debug, sd, "Y %x, U %x, V %x\n", Y, U, V);
sd               1332 drivers/media/i2c/adv7842.c 		cp_write(sd, 0xc1, R);
sd               1333 drivers/media/i2c/adv7842.c 		cp_write(sd, 0xc0, G);
sd               1334 drivers/media/i2c/adv7842.c 		cp_write(sd, 0xc2, B);
sd               1336 drivers/media/i2c/adv7842.c 		sdp_write(sd, 0xde, Y);
sd               1337 drivers/media/i2c/adv7842.c 		sdp_write(sd, 0xdf, (V & 0xf0) | ((U >> 4) & 0x0f));
sd               1342 drivers/media/i2c/adv7842.c 		set_rgb_quantization_range(sd);
sd               1350 drivers/media/i2c/adv7842.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd               1354 drivers/media/i2c/adv7842.c 		if ((io_read(sd, 0x60) & 1) && (infoframe_read(sd, 0x03) & 0x80))
sd               1355 drivers/media/i2c/adv7842.c 			ctrl->val = (infoframe_read(sd, 0x05) >> 4) & 3;
sd               1361 drivers/media/i2c/adv7842.c static inline bool no_power(struct v4l2_subdev *sd)
sd               1363 drivers/media/i2c/adv7842.c 	return io_read(sd, 0x0c) & 0x24;
sd               1366 drivers/media/i2c/adv7842.c static inline bool no_cp_signal(struct v4l2_subdev *sd)
sd               1368 drivers/media/i2c/adv7842.c 	return ((cp_read(sd, 0xb5) & 0xd0) != 0xd0) || !(cp_read(sd, 0xb1) & 0x80);
sd               1371 drivers/media/i2c/adv7842.c static inline bool is_hdmi(struct v4l2_subdev *sd)
sd               1373 drivers/media/i2c/adv7842.c 	return hdmi_read(sd, 0x05) & 0x80;
sd               1376 drivers/media/i2c/adv7842.c static int adv7842_g_input_status(struct v4l2_subdev *sd, u32 *status)
sd               1378 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               1382 drivers/media/i2c/adv7842.c 	if (io_read(sd, 0x0c) & 0x24)
sd               1387 drivers/media/i2c/adv7842.c 		if (!(sdp_read(sd, 0x5A) & 0x01))
sd               1390 drivers/media/i2c/adv7842.c 		v4l2_dbg(1, debug, sd, "%s: SDP status = 0x%x\n",
sd               1395 drivers/media/i2c/adv7842.c 	if ((cp_read(sd, 0xb5) & 0xd0) != 0xd0 ||
sd               1396 drivers/media/i2c/adv7842.c 			!(cp_read(sd, 0xb1) & 0x80))
sd               1400 drivers/media/i2c/adv7842.c 	if (is_digital_input(sd) && ((io_read(sd, 0x74) & 0x03) != 0x03))
sd               1403 drivers/media/i2c/adv7842.c 	v4l2_dbg(1, debug, sd, "%s: CP status = 0x%x\n",
sd               1415 drivers/media/i2c/adv7842.c static int stdi2dv_timings(struct v4l2_subdev *sd,
sd               1419 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               1428 drivers/media/i2c/adv7842.c 					   adv7842_get_dv_timings_cap(sd),
sd               1456 drivers/media/i2c/adv7842.c 	v4l2_dbg(2, debug, sd,
sd               1463 drivers/media/i2c/adv7842.c static int read_stdi(struct v4l2_subdev *sd, struct stdi_readback *stdi)
sd               1467 drivers/media/i2c/adv7842.c 	adv7842_g_input_status(sd, &status);
sd               1469 drivers/media/i2c/adv7842.c 		v4l2_dbg(2, debug, sd, "%s: no signal\n", __func__);
sd               1473 drivers/media/i2c/adv7842.c 	stdi->bl = ((cp_read(sd, 0xb1) & 0x3f) << 8) | cp_read(sd, 0xb2);
sd               1474 drivers/media/i2c/adv7842.c 	stdi->lcf = ((cp_read(sd, 0xb3) & 0x7) << 8) | cp_read(sd, 0xb4);
sd               1475 drivers/media/i2c/adv7842.c 	stdi->lcvs = cp_read(sd, 0xb3) >> 3;
sd               1477 drivers/media/i2c/adv7842.c 	if ((cp_read(sd, 0xb5) & 0x80) && ((cp_read(sd, 0xb5) & 0x03) == 0x01)) {
sd               1478 drivers/media/i2c/adv7842.c 		stdi->hs_pol = ((cp_read(sd, 0xb5) & 0x10) ?
sd               1479 drivers/media/i2c/adv7842.c 			((cp_read(sd, 0xb5) & 0x08) ? '+' : '-') : 'x');
sd               1480 drivers/media/i2c/adv7842.c 		stdi->vs_pol = ((cp_read(sd, 0xb5) & 0x40) ?
sd               1481 drivers/media/i2c/adv7842.c 			((cp_read(sd, 0xb5) & 0x20) ? '+' : '-') : 'x');
sd               1486 drivers/media/i2c/adv7842.c 	stdi->interlaced = (cp_read(sd, 0xb1) & 0x40) ? true : false;
sd               1489 drivers/media/i2c/adv7842.c 		v4l2_dbg(2, debug, sd, "%s: invalid signal\n", __func__);
sd               1493 drivers/media/i2c/adv7842.c 	v4l2_dbg(2, debug, sd,
sd               1502 drivers/media/i2c/adv7842.c static int adv7842_enum_dv_timings(struct v4l2_subdev *sd,
sd               1509 drivers/media/i2c/adv7842.c 		adv7842_get_dv_timings_cap(sd), adv7842_check_dv_timings, NULL);
sd               1512 drivers/media/i2c/adv7842.c static int adv7842_dv_timings_cap(struct v4l2_subdev *sd,
sd               1518 drivers/media/i2c/adv7842.c 	*cap = *adv7842_get_dv_timings_cap(sd);
sd               1524 drivers/media/i2c/adv7842.c static void adv7842_fill_optional_dv_timings_fields(struct v4l2_subdev *sd,
sd               1527 drivers/media/i2c/adv7842.c 	v4l2_find_dv_timings_cap(timings, adv7842_get_dv_timings_cap(sd),
sd               1528 drivers/media/i2c/adv7842.c 			is_digital_input(sd) ? 250000 : 1000000,
sd               1533 drivers/media/i2c/adv7842.c static int adv7842_query_dv_timings(struct v4l2_subdev *sd,
sd               1536 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               1540 drivers/media/i2c/adv7842.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd               1549 drivers/media/i2c/adv7842.c 	if (read_stdi(sd, &stdi)) {
sd               1551 drivers/media/i2c/adv7842.c 		v4l2_dbg(1, debug, sd, "%s: no valid signal\n", __func__);
sd               1559 drivers/media/i2c/adv7842.c 	if (is_digital_input(sd)) {
sd               1564 drivers/media/i2c/adv7842.c 		bt->width = (hdmi_read(sd, 0x07) & 0x0f) * 256 + hdmi_read(sd, 0x08);
sd               1565 drivers/media/i2c/adv7842.c 		bt->height = (hdmi_read(sd, 0x09) & 0x0f) * 256 + hdmi_read(sd, 0x0a);
sd               1566 drivers/media/i2c/adv7842.c 		freq = ((hdmi_read(sd, 0x51) << 1) + (hdmi_read(sd, 0x52) >> 7)) * 1000000;
sd               1567 drivers/media/i2c/adv7842.c 		freq += ((hdmi_read(sd, 0x52) & 0x7f) * 7813);
sd               1568 drivers/media/i2c/adv7842.c 		if (is_hdmi(sd)) {
sd               1570 drivers/media/i2c/adv7842.c 			freq = freq * 8 / (((hdmi_read(sd, 0x0b) & 0xc0) >> 6) * 2 + 8);
sd               1573 drivers/media/i2c/adv7842.c 		bt->hfrontporch = (hdmi_read(sd, 0x20) & 0x03) * 256 +
sd               1574 drivers/media/i2c/adv7842.c 			hdmi_read(sd, 0x21);
sd               1575 drivers/media/i2c/adv7842.c 		bt->hsync = (hdmi_read(sd, 0x22) & 0x03) * 256 +
sd               1576 drivers/media/i2c/adv7842.c 			hdmi_read(sd, 0x23);
sd               1577 drivers/media/i2c/adv7842.c 		bt->hbackporch = (hdmi_read(sd, 0x24) & 0x03) * 256 +
sd               1578 drivers/media/i2c/adv7842.c 			hdmi_read(sd, 0x25);
sd               1579 drivers/media/i2c/adv7842.c 		bt->vfrontporch = ((hdmi_read(sd, 0x2a) & 0x1f) * 256 +
sd               1580 drivers/media/i2c/adv7842.c 			hdmi_read(sd, 0x2b)) / 2;
sd               1581 drivers/media/i2c/adv7842.c 		bt->vsync = ((hdmi_read(sd, 0x2e) & 0x1f) * 256 +
sd               1582 drivers/media/i2c/adv7842.c 			hdmi_read(sd, 0x2f)) / 2;
sd               1583 drivers/media/i2c/adv7842.c 		bt->vbackporch = ((hdmi_read(sd, 0x32) & 0x1f) * 256 +
sd               1584 drivers/media/i2c/adv7842.c 			hdmi_read(sd, 0x33)) / 2;
sd               1585 drivers/media/i2c/adv7842.c 		bt->polarities = ((hdmi_read(sd, 0x05) & 0x10) ? V4L2_DV_VSYNC_POS_POL : 0) |
sd               1586 drivers/media/i2c/adv7842.c 			((hdmi_read(sd, 0x05) & 0x20) ? V4L2_DV_HSYNC_POS_POL : 0);
sd               1588 drivers/media/i2c/adv7842.c 			bt->height += (hdmi_read(sd, 0x0b) & 0x0f) * 256 +
sd               1589 drivers/media/i2c/adv7842.c 					hdmi_read(sd, 0x0c);
sd               1590 drivers/media/i2c/adv7842.c 			bt->il_vfrontporch = ((hdmi_read(sd, 0x2c) & 0x1f) * 256 +
sd               1591 drivers/media/i2c/adv7842.c 					hdmi_read(sd, 0x2d)) / 2;
sd               1592 drivers/media/i2c/adv7842.c 			bt->il_vsync = ((hdmi_read(sd, 0x30) & 0x1f) * 256 +
sd               1593 drivers/media/i2c/adv7842.c 					hdmi_read(sd, 0x31)) / 2;
sd               1594 drivers/media/i2c/adv7842.c 			bt->il_vbackporch = ((hdmi_read(sd, 0x34) & 0x1f) * 256 +
sd               1595 drivers/media/i2c/adv7842.c 					hdmi_read(sd, 0x35)) / 2;
sd               1601 drivers/media/i2c/adv7842.c 		adv7842_fill_optional_dv_timings_fields(sd, timings);
sd               1615 drivers/media/i2c/adv7842.c 		if (!stdi2dv_timings(sd, &stdi, timings))
sd               1618 drivers/media/i2c/adv7842.c 		v4l2_dbg(1, debug, sd, "%s: lcvs + 1 = %d\n", __func__, stdi.lcvs);
sd               1619 drivers/media/i2c/adv7842.c 		if (!stdi2dv_timings(sd, &stdi, timings))
sd               1622 drivers/media/i2c/adv7842.c 		v4l2_dbg(1, debug, sd, "%s: lcvs - 1 = %d\n", __func__, stdi.lcvs);
sd               1623 drivers/media/i2c/adv7842.c 		if (stdi2dv_timings(sd, &stdi, timings)) {
sd               1634 drivers/media/i2c/adv7842.c 				v4l2_dbg(1, debug, sd, "%s: restart STDI\n", __func__);
sd               1637 drivers/media/i2c/adv7842.c 				cp_write_and_or(sd, 0x86, 0xf9, 0x00);
sd               1639 drivers/media/i2c/adv7842.c 				cp_write_and_or(sd, 0x86, 0xf9, 0x04);
sd               1641 drivers/media/i2c/adv7842.c 				cp_write_and_or(sd, 0x86, 0xf9, 0x02);
sd               1645 drivers/media/i2c/adv7842.c 			v4l2_dbg(1, debug, sd, "%s: format not supported\n", __func__);
sd               1653 drivers/media/i2c/adv7842.c 		v4l2_print_dv_timings(sd->name, "adv7842_query_dv_timings:",
sd               1658 drivers/media/i2c/adv7842.c static int adv7842_s_dv_timings(struct v4l2_subdev *sd,
sd               1661 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               1665 drivers/media/i2c/adv7842.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd               1671 drivers/media/i2c/adv7842.c 		v4l2_dbg(1, debug, sd, "%s: no change\n", __func__);
sd               1677 drivers/media/i2c/adv7842.c 	if (!v4l2_valid_dv_timings(timings, adv7842_get_dv_timings_cap(sd),
sd               1681 drivers/media/i2c/adv7842.c 	adv7842_fill_optional_dv_timings_fields(sd, timings);
sd               1685 drivers/media/i2c/adv7842.c 	cp_write(sd, 0x91, bt->interlaced ? 0x40 : 0x00);
sd               1688 drivers/media/i2c/adv7842.c 	err = configure_predefined_video_timings(sd, timings);
sd               1692 drivers/media/i2c/adv7842.c 		configure_custom_video_timings(sd, bt);
sd               1695 drivers/media/i2c/adv7842.c 	set_rgb_quantization_range(sd);
sd               1699 drivers/media/i2c/adv7842.c 		v4l2_print_dv_timings(sd->name, "adv7842_s_dv_timings: ",
sd               1704 drivers/media/i2c/adv7842.c static int adv7842_g_dv_timings(struct v4l2_subdev *sd,
sd               1707 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               1715 drivers/media/i2c/adv7842.c static void enable_input(struct v4l2_subdev *sd)
sd               1717 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               1719 drivers/media/i2c/adv7842.c 	set_rgb_quantization_range(sd);
sd               1724 drivers/media/i2c/adv7842.c 		io_write(sd, 0x15, 0xb0);   /* Disable Tristate of Pins (no audio) */
sd               1727 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x01, 0x00); /* Enable HDMI clock terminators */
sd               1728 drivers/media/i2c/adv7842.c 		io_write(sd, 0x15, 0xa0);   /* Disable Tristate of Pins */
sd               1729 drivers/media/i2c/adv7842.c 		hdmi_write_and_or(sd, 0x1a, 0xef, 0x00); /* Unmute audio */
sd               1732 drivers/media/i2c/adv7842.c 		v4l2_dbg(2, debug, sd, "%s: Unknown mode %d\n",
sd               1738 drivers/media/i2c/adv7842.c static void disable_input(struct v4l2_subdev *sd)
sd               1740 drivers/media/i2c/adv7842.c 	hdmi_write_and_or(sd, 0x1a, 0xef, 0x10); /* Mute audio [REF_01, c. 2.2.2] */
sd               1742 drivers/media/i2c/adv7842.c 	io_write(sd, 0x15, 0xbe);   /* Tristate all outputs from video core */
sd               1743 drivers/media/i2c/adv7842.c 	hdmi_write(sd, 0x01, 0x78); /* Disable HDMI clock terminators */
sd               1746 drivers/media/i2c/adv7842.c static void sdp_csc_coeff(struct v4l2_subdev *sd,
sd               1750 drivers/media/i2c/adv7842.c 	sdp_io_write_and_or(sd, 0xe0, 0xbf, c->manual ? 0x00 : 0x40);
sd               1756 drivers/media/i2c/adv7842.c 	sdp_io_write_and_or(sd, 0xe0, 0x7f, c->scaling == 2 ? 0x80 : 0x00);
sd               1759 drivers/media/i2c/adv7842.c 	sdp_io_write_and_or(sd, 0xe0, 0xe0, c->A1 >> 8);
sd               1760 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0xe1, c->A1);
sd               1761 drivers/media/i2c/adv7842.c 	sdp_io_write_and_or(sd, 0xe2, 0xe0, c->A2 >> 8);
sd               1762 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0xe3, c->A2);
sd               1763 drivers/media/i2c/adv7842.c 	sdp_io_write_and_or(sd, 0xe4, 0xe0, c->A3 >> 8);
sd               1764 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0xe5, c->A3);
sd               1767 drivers/media/i2c/adv7842.c 	sdp_io_write_and_or(sd, 0xe6, 0x80, c->A4 >> 8);
sd               1768 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0xe7, c->A4);
sd               1771 drivers/media/i2c/adv7842.c 	sdp_io_write_and_or(sd, 0xe8, 0xe0, c->B1 >> 8);
sd               1772 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0xe9, c->B1);
sd               1773 drivers/media/i2c/adv7842.c 	sdp_io_write_and_or(sd, 0xea, 0xe0, c->B2 >> 8);
sd               1774 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0xeb, c->B2);
sd               1775 drivers/media/i2c/adv7842.c 	sdp_io_write_and_or(sd, 0xec, 0xe0, c->B3 >> 8);
sd               1776 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0xed, c->B3);
sd               1779 drivers/media/i2c/adv7842.c 	sdp_io_write_and_or(sd, 0xee, 0x80, c->B4 >> 8);
sd               1780 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0xef, c->B4);
sd               1783 drivers/media/i2c/adv7842.c 	sdp_io_write_and_or(sd, 0xf0, 0xe0, c->C1 >> 8);
sd               1784 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0xf1, c->C1);
sd               1785 drivers/media/i2c/adv7842.c 	sdp_io_write_and_or(sd, 0xf2, 0xe0, c->C2 >> 8);
sd               1786 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0xf3, c->C2);
sd               1787 drivers/media/i2c/adv7842.c 	sdp_io_write_and_or(sd, 0xf4, 0xe0, c->C3 >> 8);
sd               1788 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0xf5, c->C3);
sd               1791 drivers/media/i2c/adv7842.c 	sdp_io_write_and_or(sd, 0xf6, 0x80, c->C4 >> 8);
sd               1792 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0xf7, c->C4);
sd               1795 drivers/media/i2c/adv7842.c static void select_input(struct v4l2_subdev *sd,
sd               1798 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               1802 drivers/media/i2c/adv7842.c 		io_write(sd, 0x00, vid_std_select); /* video std: CVBS or YC mode */
sd               1803 drivers/media/i2c/adv7842.c 		io_write(sd, 0x01, 0); /* prim mode */
sd               1805 drivers/media/i2c/adv7842.c 		cp_write_and_or(sd, 0x81, 0xef, 0x10);
sd               1807 drivers/media/i2c/adv7842.c 		afe_write(sd, 0x00, 0x00); /* power up ADC */
sd               1808 drivers/media/i2c/adv7842.c 		afe_write(sd, 0xc8, 0x00); /* phase control */
sd               1810 drivers/media/i2c/adv7842.c 		io_write(sd, 0xdd, 0x90); /* Manual 2x output clock */
sd               1814 drivers/media/i2c/adv7842.c 		afe_write_and_or(sd, 0x02, 0x7f, 0x80);
sd               1816 drivers/media/i2c/adv7842.c 			afe_write(sd, 0x03, 0xa0); /* ADC0 to AIN10 (CVBS), ADC1 N/C*/
sd               1817 drivers/media/i2c/adv7842.c 			afe_write(sd, 0x04, 0x00); /* ADC2 N/C,ADC3 N/C*/
sd               1819 drivers/media/i2c/adv7842.c 			afe_write(sd, 0x03, 0xa0); /* ADC0 to AIN10 (CVBS), ADC1 N/C*/
sd               1820 drivers/media/i2c/adv7842.c 			afe_write(sd, 0x04, 0xc0); /* ADC2 to AIN12, ADC3 N/C*/
sd               1822 drivers/media/i2c/adv7842.c 		afe_write(sd, 0x0c, 0x1f); /* ADI recommend write */
sd               1823 drivers/media/i2c/adv7842.c 		afe_write(sd, 0x12, 0x63); /* ADI recommend write */
sd               1825 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xb2, 0x60); /* Disable AV codes */
sd               1826 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xc8, 0xe3); /* Disable Ancillary data */
sd               1829 drivers/media/i2c/adv7842.c 		sdp_write(sd, 0x00, 0x3F); /* Autodetect PAL NTSC (not SECAM) */
sd               1830 drivers/media/i2c/adv7842.c 		sdp_write(sd, 0x01, 0x00); /* Pedestal Off */
sd               1832 drivers/media/i2c/adv7842.c 		sdp_write(sd, 0x03, 0xE4); /* Manual VCR Gain Luma 0x40B */
sd               1833 drivers/media/i2c/adv7842.c 		sdp_write(sd, 0x04, 0x0B); /* Manual Luma setting */
sd               1834 drivers/media/i2c/adv7842.c 		sdp_write(sd, 0x05, 0xC3); /* Manual Chroma setting 0x3FE */
sd               1835 drivers/media/i2c/adv7842.c 		sdp_write(sd, 0x06, 0xFE); /* Manual Chroma setting */
sd               1836 drivers/media/i2c/adv7842.c 		sdp_write(sd, 0x12, 0x0D); /* Frame TBC,I_P, 3D comb enabled */
sd               1837 drivers/media/i2c/adv7842.c 		sdp_write(sd, 0xA7, 0x00); /* ADI Recommended Write */
sd               1838 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xB0, 0x00); /* Disable H and v blanking */
sd               1841 drivers/media/i2c/adv7842.c 		sdp_write_and_or(sd, 0x12, 0xf6, 0x09);
sd               1848 drivers/media/i2c/adv7842.c 		afe_write_and_or(sd, 0x02, 0x7f, 0x00);
sd               1850 drivers/media/i2c/adv7842.c 		io_write(sd, 0x00, vid_std_select); /* video std */
sd               1851 drivers/media/i2c/adv7842.c 		io_write(sd, 0x01, 0x02); /* prim mode */
sd               1852 drivers/media/i2c/adv7842.c 		cp_write_and_or(sd, 0x81, 0xef, 0x10); /* enable embedded syncs
sd               1855 drivers/media/i2c/adv7842.c 		afe_write(sd, 0x00, 0x00); /* power up ADC */
sd               1856 drivers/media/i2c/adv7842.c 		afe_write(sd, 0xc8, 0x00); /* phase control */
sd               1859 drivers/media/i2c/adv7842.c 			io_write_and_or(sd, 0x02, 0x0f, 0x60);
sd               1862 drivers/media/i2c/adv7842.c 			io_write_and_or(sd, 0x02, 0x0f, 0x10);
sd               1868 drivers/media/i2c/adv7842.c 		afe_write(sd, 0x0c, 0x1f); /* ADC Range improvement */
sd               1869 drivers/media/i2c/adv7842.c 		afe_write(sd, 0x12, 0x63); /* ADC Range improvement */
sd               1872 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x73, 0x10);
sd               1873 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x74, 0x04);
sd               1874 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x75, 0x01);
sd               1875 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x76, 0x00);
sd               1877 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x3e, 0x04); /* CP core pre-gain control */
sd               1878 drivers/media/i2c/adv7842.c 		cp_write(sd, 0xc3, 0x39); /* CP coast control. Graphics mode */
sd               1879 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x40, 0x5c); /* CP core pre-gain control. Graphics mode */
sd               1884 drivers/media/i2c/adv7842.c 		afe_write_and_or(sd, 0x02, 0x7f, 0x00);
sd               1887 drivers/media/i2c/adv7842.c 			hdmi_write(sd, 0x00, 0x02); /* select port A */
sd               1889 drivers/media/i2c/adv7842.c 			hdmi_write(sd, 0x00, 0x03); /* select port B */
sd               1890 drivers/media/i2c/adv7842.c 		io_write(sd, 0x00, vid_std_select); /* video std */
sd               1891 drivers/media/i2c/adv7842.c 		io_write(sd, 0x01, 5); /* prim mode */
sd               1892 drivers/media/i2c/adv7842.c 		cp_write_and_or(sd, 0x81, 0xef, 0x00); /* disable embedded syncs
sd               1898 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0xc0, 0x00);
sd               1899 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x0d, 0x34); /* ADI recommended write */
sd               1900 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x3d, 0x10); /* ADI recommended write */
sd               1901 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x44, 0x85); /* TMDS PLL optimization */
sd               1902 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x46, 0x1f); /* ADI recommended write */
sd               1903 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x57, 0xb6); /* TMDS PLL optimization */
sd               1904 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x58, 0x03); /* TMDS PLL optimization */
sd               1905 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x60, 0x88); /* TMDS PLL optimization */
sd               1906 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x61, 0x88); /* TMDS PLL optimization */
sd               1907 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x6c, 0x18); /* Disable ISRC clearing bit,
sd               1909 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x75, 0x10); /* DDC drive strength */
sd               1910 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x85, 0x1f); /* equaliser */
sd               1911 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x87, 0x70); /* ADI recommended write */
sd               1912 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x89, 0x04); /* equaliser */
sd               1913 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x8a, 0x1e); /* equaliser */
sd               1914 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x93, 0x04); /* equaliser */
sd               1915 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x94, 0x1e); /* equaliser */
sd               1916 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x99, 0xa1); /* ADI recommended write */
sd               1917 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x9b, 0x09); /* ADI recommended write */
sd               1918 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x9d, 0x02); /* equaliser */
sd               1920 drivers/media/i2c/adv7842.c 		afe_write(sd, 0x00, 0xff); /* power down ADC */
sd               1921 drivers/media/i2c/adv7842.c 		afe_write(sd, 0xc8, 0x40); /* phase control */
sd               1924 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x73, 0x10);
sd               1925 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x74, 0x04);
sd               1926 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x75, 0x01);
sd               1927 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x76, 0x00);
sd               1932 drivers/media/i2c/adv7842.c 		afe_write(sd, 0x12, 0xfb); /* ADC noise shaping filter controls */
sd               1933 drivers/media/i2c/adv7842.c 		afe_write(sd, 0x0c, 0x0d); /* CP core gain controls */
sd               1934 drivers/media/i2c/adv7842.c 		cp_write(sd, 0x3e, 0x00); /* CP core pre-gain control */
sd               1937 drivers/media/i2c/adv7842.c 		cp_write(sd, 0xc3, 0x33); /* Component mode */
sd               1940 drivers/media/i2c/adv7842.c 		io_write_and_or(sd, 0x02, 0x0f, 0xf0);
sd               1944 drivers/media/i2c/adv7842.c 		v4l2_dbg(2, debug, sd, "%s: Unknown mode %d\n",
sd               1950 drivers/media/i2c/adv7842.c static int adv7842_s_routing(struct v4l2_subdev *sd,
sd               1953 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               1955 drivers/media/i2c/adv7842.c 	v4l2_dbg(2, debug, sd, "%s: input %d\n", __func__, input);
sd               1988 drivers/media/i2c/adv7842.c 	disable_input(sd);
sd               1989 drivers/media/i2c/adv7842.c 	select_input(sd, state->vid_std_select);
sd               1990 drivers/media/i2c/adv7842.c 	enable_input(sd);
sd               1992 drivers/media/i2c/adv7842.c 	v4l2_subdev_notify_event(sd, &adv7842_ev_fmt);
sd               1997 drivers/media/i2c/adv7842.c static int adv7842_enum_mbus_code(struct v4l2_subdev *sd,
sd               2061 drivers/media/i2c/adv7842.c 	struct v4l2_subdev *sd = &state->sd;
sd               2063 drivers/media/i2c/adv7842.c 	io_write_clr_set(sd, 0x02, 0x02,
sd               2065 drivers/media/i2c/adv7842.c 	io_write(sd, 0x03, state->format->op_format_sel |
sd               2067 drivers/media/i2c/adv7842.c 	io_write_clr_set(sd, 0x04, 0xe0, adv7842_op_ch_sel(state));
sd               2068 drivers/media/i2c/adv7842.c 	io_write_clr_set(sd, 0x05, 0x01,
sd               2070 drivers/media/i2c/adv7842.c 	set_rgb_quantization_range(sd);
sd               2073 drivers/media/i2c/adv7842.c static int adv7842_get_format(struct v4l2_subdev *sd,
sd               2077 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               2084 drivers/media/i2c/adv7842.c 		if (!(sdp_read(sd, 0x5a) & 0x01))
sd               2102 drivers/media/i2c/adv7842.c 		fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
sd               2111 drivers/media/i2c/adv7842.c static int adv7842_set_format(struct v4l2_subdev *sd,
sd               2115 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               2122 drivers/media/i2c/adv7842.c 		return adv7842_get_format(sd, cfg, format);
sd               2134 drivers/media/i2c/adv7842.c 		fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
sd               2144 drivers/media/i2c/adv7842.c static void adv7842_irq_enable(struct v4l2_subdev *sd, bool enable)
sd               2148 drivers/media/i2c/adv7842.c 		io_write(sd, 0x46, 0x9c);
sd               2150 drivers/media/i2c/adv7842.c 		io_write(sd, 0x5a, 0x10);
sd               2152 drivers/media/i2c/adv7842.c 		io_write(sd, 0x73, 0x03);
sd               2154 drivers/media/i2c/adv7842.c 		io_write(sd, 0x78, 0x03);
sd               2156 drivers/media/i2c/adv7842.c 		io_write(sd, 0xa0, 0x09);
sd               2158 drivers/media/i2c/adv7842.c 		io_write(sd, 0x69, 0x08);
sd               2160 drivers/media/i2c/adv7842.c 		io_write(sd, 0x46, 0x0);
sd               2161 drivers/media/i2c/adv7842.c 		io_write(sd, 0x5a, 0x0);
sd               2162 drivers/media/i2c/adv7842.c 		io_write(sd, 0x73, 0x0);
sd               2163 drivers/media/i2c/adv7842.c 		io_write(sd, 0x78, 0x0);
sd               2164 drivers/media/i2c/adv7842.c 		io_write(sd, 0xa0, 0x0);
sd               2165 drivers/media/i2c/adv7842.c 		io_write(sd, 0x69, 0x0);
sd               2170 drivers/media/i2c/adv7842.c static void adv7842_cec_tx_raw_status(struct v4l2_subdev *sd, u8 tx_raw_status)
sd               2172 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               2174 drivers/media/i2c/adv7842.c 	if ((cec_read(sd, 0x11) & 0x01) == 0) {
sd               2175 drivers/media/i2c/adv7842.c 		v4l2_dbg(1, debug, sd, "%s: tx raw: tx disabled\n", __func__);
sd               2180 drivers/media/i2c/adv7842.c 		v4l2_dbg(1, debug, sd, "%s: tx raw: arbitration lost\n",
sd               2191 drivers/media/i2c/adv7842.c 		v4l2_dbg(1, debug, sd, "%s: tx raw: retry failed\n", __func__);
sd               2197 drivers/media/i2c/adv7842.c 		nack_cnt = cec_read(sd, 0x14) & 0xf;
sd               2200 drivers/media/i2c/adv7842.c 		low_drive_cnt = cec_read(sd, 0x14) >> 4;
sd               2208 drivers/media/i2c/adv7842.c 		v4l2_dbg(1, debug, sd, "%s: tx raw: ready ok\n", __func__);
sd               2214 drivers/media/i2c/adv7842.c static void adv7842_cec_isr(struct v4l2_subdev *sd, bool *handled)
sd               2219 drivers/media/i2c/adv7842.c 	cec_irq = io_read(sd, 0x93) & 0x0f;
sd               2223 drivers/media/i2c/adv7842.c 	v4l2_dbg(1, debug, sd, "%s: cec: irq 0x%x\n", __func__, cec_irq);
sd               2224 drivers/media/i2c/adv7842.c 	adv7842_cec_tx_raw_status(sd, cec_irq);
sd               2226 drivers/media/i2c/adv7842.c 		struct adv7842_state *state = to_state(sd);
sd               2229 drivers/media/i2c/adv7842.c 		msg.len = cec_read(sd, 0x25) & 0x1f;
sd               2237 drivers/media/i2c/adv7842.c 				msg.msg[i] = cec_read(sd, i + 0x15);
sd               2238 drivers/media/i2c/adv7842.c 			cec_write(sd, 0x26, 0x01); /* re-enable rx */
sd               2243 drivers/media/i2c/adv7842.c 	io_write(sd, 0x94, cec_irq);
sd               2252 drivers/media/i2c/adv7842.c 	struct v4l2_subdev *sd = &state->sd;
sd               2255 drivers/media/i2c/adv7842.c 		cec_write_clr_set(sd, 0x2a, 0x01, 0x01); /* power up cec */
sd               2256 drivers/media/i2c/adv7842.c 		cec_write(sd, 0x2c, 0x01);	/* cec soft reset */
sd               2257 drivers/media/i2c/adv7842.c 		cec_write_clr_set(sd, 0x11, 0x01, 0); /* initially disable tx */
sd               2263 drivers/media/i2c/adv7842.c 		io_write_clr_set(sd, 0x96, 0x0f, 0x0f);
sd               2264 drivers/media/i2c/adv7842.c 		cec_write(sd, 0x26, 0x01);            /* enable rx */
sd               2267 drivers/media/i2c/adv7842.c 		io_write_clr_set(sd, 0x96, 0x0f, 0x00);
sd               2269 drivers/media/i2c/adv7842.c 		cec_write_clr_set(sd, 0x27, 0x70, 0x00);
sd               2271 drivers/media/i2c/adv7842.c 		cec_write_clr_set(sd, 0x2a, 0x01, 0x00);
sd               2281 drivers/media/i2c/adv7842.c 	struct v4l2_subdev *sd = &state->sd;
sd               2288 drivers/media/i2c/adv7842.c 		cec_write_clr_set(sd, 0x27, 0x70, 0);
sd               2312 drivers/media/i2c/adv7842.c 		cec_write_clr_set(sd, 0x27, 0x10, 0x10);
sd               2314 drivers/media/i2c/adv7842.c 		cec_write_clr_set(sd, 0x28, 0x0f, addr);
sd               2318 drivers/media/i2c/adv7842.c 		cec_write_clr_set(sd, 0x27, 0x20, 0x20);
sd               2320 drivers/media/i2c/adv7842.c 		cec_write_clr_set(sd, 0x28, 0xf0, addr << 4);
sd               2324 drivers/media/i2c/adv7842.c 		cec_write_clr_set(sd, 0x27, 0x40, 0x40);
sd               2326 drivers/media/i2c/adv7842.c 		cec_write_clr_set(sd, 0x29, 0x0f, addr);
sd               2336 drivers/media/i2c/adv7842.c 	struct v4l2_subdev *sd = &state->sd;
sd               2345 drivers/media/i2c/adv7842.c 	cec_write_clr_set(sd, 0x12, 0x70, max(1, attempts - 1) << 4);
sd               2348 drivers/media/i2c/adv7842.c 		v4l2_err(sd, "%s: len exceeded 16 (%d)\n", __func__, len);
sd               2354 drivers/media/i2c/adv7842.c 		cec_write(sd, i, msg->msg[i]);
sd               2357 drivers/media/i2c/adv7842.c 	cec_write(sd, 0x10, len);
sd               2359 drivers/media/i2c/adv7842.c 	cec_write(sd, 0x11, 0x01);
sd               2370 drivers/media/i2c/adv7842.c static int adv7842_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
sd               2372 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               2376 drivers/media/i2c/adv7842.c 	adv7842_irq_enable(sd, false);
sd               2379 drivers/media/i2c/adv7842.c 	irq_status[0] = io_read(sd, 0x43);
sd               2380 drivers/media/i2c/adv7842.c 	irq_status[1] = io_read(sd, 0x57);
sd               2381 drivers/media/i2c/adv7842.c 	irq_status[2] = io_read(sd, 0x70);
sd               2382 drivers/media/i2c/adv7842.c 	irq_status[3] = io_read(sd, 0x75);
sd               2383 drivers/media/i2c/adv7842.c 	irq_status[4] = io_read(sd, 0x9d);
sd               2384 drivers/media/i2c/adv7842.c 	irq_status[5] = io_read(sd, 0x66);
sd               2388 drivers/media/i2c/adv7842.c 		io_write(sd, 0x44, irq_status[0]);
sd               2390 drivers/media/i2c/adv7842.c 		io_write(sd, 0x58, irq_status[1]);
sd               2392 drivers/media/i2c/adv7842.c 		io_write(sd, 0x71, irq_status[2]);
sd               2394 drivers/media/i2c/adv7842.c 		io_write(sd, 0x76, irq_status[3]);
sd               2396 drivers/media/i2c/adv7842.c 		io_write(sd, 0x9e, irq_status[4]);
sd               2398 drivers/media/i2c/adv7842.c 		io_write(sd, 0x67, irq_status[5]);
sd               2400 drivers/media/i2c/adv7842.c 	adv7842_irq_enable(sd, true);
sd               2402 drivers/media/i2c/adv7842.c 	v4l2_dbg(1, debug, sd, "%s: irq %x, %x, %x, %x, %x, %x\n", __func__,
sd               2416 drivers/media/i2c/adv7842.c 	if (is_digital_input(sd))
sd               2423 drivers/media/i2c/adv7842.c 		v4l2_dbg(1, debug, sd,
sd               2427 drivers/media/i2c/adv7842.c 		v4l2_subdev_notify_event(sd, &adv7842_ev_fmt);
sd               2434 drivers/media/i2c/adv7842.c 		v4l2_dbg(1, debug, sd, "%s: irq %s mode\n", __func__,
sd               2435 drivers/media/i2c/adv7842.c 			 (io_read(sd, 0x65) & 0x08) ? "HDMI" : "DVI");
sd               2436 drivers/media/i2c/adv7842.c 		set_rgb_quantization_range(sd);
sd               2443 drivers/media/i2c/adv7842.c 	adv7842_cec_isr(sd, handled);
sd               2448 drivers/media/i2c/adv7842.c 		v4l2_dbg(1, debug, sd, "%s: irq tx_5v\n", __func__);
sd               2449 drivers/media/i2c/adv7842.c 		adv7842_s_detect_tx_5v_ctrl(sd);
sd               2456 drivers/media/i2c/adv7842.c static int adv7842_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
sd               2458 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               2496 drivers/media/i2c/adv7842.c static int adv7842_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *e)
sd               2498 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               2521 drivers/media/i2c/adv7842.c 		err = edid_write_vga_segment(sd);
sd               2530 drivers/media/i2c/adv7842.c 			adv7842_s_detect_tx_5v_ctrl(sd);
sd               2533 drivers/media/i2c/adv7842.c 		err = edid_write_hdmi_segment(sd, e->pad);
sd               2539 drivers/media/i2c/adv7842.c 		v4l2_err(sd, "error %d writing edid on port %d\n", err, e->pad);
sd               2550 drivers/media/i2c/adv7842.c static void log_infoframe(struct v4l2_subdev *sd, struct adv7842_cfg_read_infoframe *cri)
sd               2556 drivers/media/i2c/adv7842.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2559 drivers/media/i2c/adv7842.c 	if (!(io_read(sd, 0x60) & cri->present_mask)) {
sd               2560 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "%s infoframe not received\n", cri->desc);
sd               2565 drivers/media/i2c/adv7842.c 		buffer[i] = infoframe_read(sd, cri->head_addr + i);
sd               2570 drivers/media/i2c/adv7842.c 		v4l2_err(sd, "%s: invalid %s infoframe length %d\n", __func__, cri->desc, len);
sd               2575 drivers/media/i2c/adv7842.c 		buffer[i + 3] = infoframe_read(sd, cri->payload_addr + i);
sd               2578 drivers/media/i2c/adv7842.c 		v4l2_err(sd, "%s: unpack of %s infoframe failed\n", __func__, cri->desc);
sd               2585 drivers/media/i2c/adv7842.c static void adv7842_log_infoframes(struct v4l2_subdev *sd)
sd               2595 drivers/media/i2c/adv7842.c 	if (!(hdmi_read(sd, 0x05) & 0x80)) {
sd               2596 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "receive DVI-D signal, no infoframes\n");
sd               2601 drivers/media/i2c/adv7842.c 		log_infoframe(sd, &cri[i]);
sd               2626 drivers/media/i2c/adv7842.c static int adv7842_sdp_log_status(struct v4l2_subdev *sd)
sd               2629 drivers/media/i2c/adv7842.c 	u8 sdp_signal_detected = sdp_read(sd, 0x5A) & 0x01;
sd               2631 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "Chip powered %s\n", no_power(sd) ? "off" : "on");
sd               2632 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "Prim-mode = 0x%x, video std = 0x%x\n",
sd               2633 drivers/media/i2c/adv7842.c 		  io_read(sd, 0x01) & 0x0f, io_read(sd, 0x00) & 0x3f);
sd               2635 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "SDP: free run: %s\n",
sd               2636 drivers/media/i2c/adv7842.c 		(sdp_read(sd, 0x56) & 0x01) ? "on" : "off");
sd               2637 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "SDP: %s\n", sdp_signal_detected ?
sd               2654 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "SDP: standard %s\n",
sd               2655 drivers/media/i2c/adv7842.c 			sdp_std_txt[sdp_read(sd, 0x52) & 0x0f]);
sd               2656 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "SDP: %s\n",
sd               2657 drivers/media/i2c/adv7842.c 			(sdp_read(sd, 0x59) & 0x08) ? "50Hz" : "60Hz");
sd               2658 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "SDP: %s\n",
sd               2659 drivers/media/i2c/adv7842.c 			(sdp_read(sd, 0x57) & 0x08) ? "Interlaced" : "Progressive");
sd               2660 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "SDP: deinterlacer %s\n",
sd               2661 drivers/media/i2c/adv7842.c 			(sdp_read(sd, 0x12) & 0x08) ? "enabled" : "disabled");
sd               2662 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "SDP: csc %s mode\n",
sd               2663 drivers/media/i2c/adv7842.c 			(sdp_io_read(sd, 0xe0) & 0x40) ? "auto" : "manual");
sd               2668 drivers/media/i2c/adv7842.c static int adv7842_cp_log_status(struct v4l2_subdev *sd)
sd               2671 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               2673 drivers/media/i2c/adv7842.c 	u8 reg_io_0x02 = io_read(sd, 0x02);
sd               2674 drivers/media/i2c/adv7842.c 	u8 reg_io_0x21 = io_read(sd, 0x21);
sd               2675 drivers/media/i2c/adv7842.c 	u8 reg_rep_0x77 = rep_read(sd, 0x77);
sd               2676 drivers/media/i2c/adv7842.c 	u8 reg_rep_0x7d = rep_read(sd, 0x7d);
sd               2677 drivers/media/i2c/adv7842.c 	bool audio_pll_locked = hdmi_read(sd, 0x04) & 0x01;
sd               2678 drivers/media/i2c/adv7842.c 	bool audio_sample_packet_detect = hdmi_read(sd, 0x18) & 0x01;
sd               2679 drivers/media/i2c/adv7842.c 	bool audio_mute = io_read(sd, 0x65) & 0x40;
sd               2707 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "-----Chip status-----\n");
sd               2708 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "Chip power: %s\n", no_power(sd) ? "off" : "on");
sd               2709 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "HDMI/DVI-D port selected: %s\n",
sd               2711 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "EDID A %s, B %s\n",
sd               2716 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "HPD A %s, B %s\n",
sd               2719 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "CEC: %s\n", state->cec_enabled_adap ?
sd               2728 drivers/media/i2c/adv7842.c 				v4l2_info(sd, "CEC Logical Address: 0x%x\n",
sd               2733 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "-----Signal status-----\n");
sd               2735 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "Cable detected (+5V power): %s\n",
sd               2736 drivers/media/i2c/adv7842.c 			  io_read(sd, 0x6f) & 0x02 ? "true" : "false");
sd               2737 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "TMDS signal detected: %s\n",
sd               2738 drivers/media/i2c/adv7842.c 			  (io_read(sd, 0x6a) & 0x02) ? "true" : "false");
sd               2739 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "TMDS signal locked: %s\n",
sd               2740 drivers/media/i2c/adv7842.c 			  (io_read(sd, 0x6a) & 0x20) ? "true" : "false");
sd               2742 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "Cable detected (+5V power):%s\n",
sd               2743 drivers/media/i2c/adv7842.c 			  io_read(sd, 0x6f) & 0x01 ? "true" : "false");
sd               2744 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "TMDS signal detected: %s\n",
sd               2745 drivers/media/i2c/adv7842.c 			  (io_read(sd, 0x6a) & 0x01) ? "true" : "false");
sd               2746 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "TMDS signal locked: %s\n",
sd               2747 drivers/media/i2c/adv7842.c 			  (io_read(sd, 0x6a) & 0x10) ? "true" : "false");
sd               2749 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "CP free run: %s\n",
sd               2750 drivers/media/i2c/adv7842.c 		  (!!(cp_read(sd, 0xff) & 0x10) ? "on" : "off"));
sd               2751 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "Prim-mode = 0x%x, video std = 0x%x, v_freq = 0x%x\n",
sd               2752 drivers/media/i2c/adv7842.c 		  io_read(sd, 0x01) & 0x0f, io_read(sd, 0x00) & 0x3f,
sd               2753 drivers/media/i2c/adv7842.c 		  (io_read(sd, 0x01) & 0x70) >> 4);
sd               2755 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "-----Video Timings-----\n");
sd               2756 drivers/media/i2c/adv7842.c 	if (no_cp_signal(sd)) {
sd               2757 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "STDI: not locked\n");
sd               2759 drivers/media/i2c/adv7842.c 		u32 bl = ((cp_read(sd, 0xb1) & 0x3f) << 8) | cp_read(sd, 0xb2);
sd               2760 drivers/media/i2c/adv7842.c 		u32 lcf = ((cp_read(sd, 0xb3) & 0x7) << 8) | cp_read(sd, 0xb4);
sd               2761 drivers/media/i2c/adv7842.c 		u32 lcvs = cp_read(sd, 0xb3) >> 3;
sd               2762 drivers/media/i2c/adv7842.c 		u32 fcl = ((cp_read(sd, 0xb8) & 0x1f) << 8) | cp_read(sd, 0xb9);
sd               2763 drivers/media/i2c/adv7842.c 		char hs_pol = ((cp_read(sd, 0xb5) & 0x10) ?
sd               2764 drivers/media/i2c/adv7842.c 				((cp_read(sd, 0xb5) & 0x08) ? '+' : '-') : 'x');
sd               2765 drivers/media/i2c/adv7842.c 		char vs_pol = ((cp_read(sd, 0xb5) & 0x40) ?
sd               2766 drivers/media/i2c/adv7842.c 				((cp_read(sd, 0xb5) & 0x20) ? '+' : '-') : 'x');
sd               2767 drivers/media/i2c/adv7842.c 		v4l2_info(sd,
sd               2770 drivers/media/i2c/adv7842.c 			(cp_read(sd, 0xb1) & 0x40) ?
sd               2774 drivers/media/i2c/adv7842.c 	if (adv7842_query_dv_timings(sd, &timings))
sd               2775 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "No video detected\n");
sd               2777 drivers/media/i2c/adv7842.c 		v4l2_print_dv_timings(sd->name, "Detected format: ",
sd               2779 drivers/media/i2c/adv7842.c 	v4l2_print_dv_timings(sd->name, "Configured format: ",
sd               2782 drivers/media/i2c/adv7842.c 	if (no_cp_signal(sd))
sd               2785 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "-----Color space-----\n");
sd               2786 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "RGB quantization range ctrl: %s\n",
sd               2788 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "Input color space: %s\n",
sd               2790 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "Output color space: %s %s, alt-gamma %s\n",
sd               2795 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "Color space conversion: %s\n",
sd               2796 drivers/media/i2c/adv7842.c 		  csc_coeff_sel_rb[cp_read(sd, 0xf4) >> 4]);
sd               2798 drivers/media/i2c/adv7842.c 	if (!is_digital_input(sd))
sd               2801 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "-----%s status-----\n", is_hdmi(sd) ? "HDMI" : "DVI-D");
sd               2802 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "HDCP encrypted content: %s\n",
sd               2803 drivers/media/i2c/adv7842.c 			(hdmi_read(sd, 0x05) & 0x40) ? "true" : "false");
sd               2804 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "HDCP keys read: %s%s\n",
sd               2805 drivers/media/i2c/adv7842.c 			(hdmi_read(sd, 0x04) & 0x20) ? "yes" : "no",
sd               2806 drivers/media/i2c/adv7842.c 			(hdmi_read(sd, 0x04) & 0x10) ? "ERROR" : "");
sd               2807 drivers/media/i2c/adv7842.c 	if (!is_hdmi(sd))
sd               2810 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "Audio: pll %s, samples %s, %s\n",
sd               2815 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "Audio format: %s\n",
sd               2816 drivers/media/i2c/adv7842.c 			(hdmi_read(sd, 0x07) & 0x40) ? "multi-channel" : "stereo");
sd               2818 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "Audio CTS: %u\n", (hdmi_read(sd, 0x5b) << 12) +
sd               2819 drivers/media/i2c/adv7842.c 			(hdmi_read(sd, 0x5c) << 8) +
sd               2820 drivers/media/i2c/adv7842.c 			(hdmi_read(sd, 0x5d) & 0xf0));
sd               2821 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "Audio N: %u\n", ((hdmi_read(sd, 0x5d) & 0x0f) << 16) +
sd               2822 drivers/media/i2c/adv7842.c 			(hdmi_read(sd, 0x5e) << 8) +
sd               2823 drivers/media/i2c/adv7842.c 			hdmi_read(sd, 0x5f));
sd               2824 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "AV Mute: %s\n",
sd               2825 drivers/media/i2c/adv7842.c 			(hdmi_read(sd, 0x04) & 0x40) ? "on" : "off");
sd               2826 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "Deep color mode: %s\n",
sd               2827 drivers/media/i2c/adv7842.c 			deep_color_mode_txt[hdmi_read(sd, 0x0b) >> 6]);
sd               2829 drivers/media/i2c/adv7842.c 	adv7842_log_infoframes(sd);
sd               2834 drivers/media/i2c/adv7842.c static int adv7842_log_status(struct v4l2_subdev *sd)
sd               2836 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               2839 drivers/media/i2c/adv7842.c 		return adv7842_sdp_log_status(sd);
sd               2840 drivers/media/i2c/adv7842.c 	return adv7842_cp_log_status(sd);
sd               2843 drivers/media/i2c/adv7842.c static int adv7842_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
sd               2845 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               2847 drivers/media/i2c/adv7842.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd               2852 drivers/media/i2c/adv7842.c 	if (!(sdp_read(sd, 0x5A) & 0x01)) {
sd               2854 drivers/media/i2c/adv7842.c 		v4l2_dbg(1, debug, sd, "%s: no valid signal\n", __func__);
sd               2858 drivers/media/i2c/adv7842.c 	switch (sdp_read(sd, 0x52) & 0x0f) {
sd               2898 drivers/media/i2c/adv7842.c static void adv7842_s_sdp_io(struct v4l2_subdev *sd, struct adv7842_sdp_io_sync_adjustment *s)
sd               2901 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x94, (s->hs_beg >> 8) & 0xf);
sd               2902 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x95, s->hs_beg & 0xff);
sd               2903 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x96, (s->hs_width >> 8) & 0xf);
sd               2904 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x97, s->hs_width & 0xff);
sd               2905 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x98, (s->de_beg >> 8) & 0xf);
sd               2906 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x99, s->de_beg & 0xff);
sd               2907 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x9a, (s->de_end >> 8) & 0xf);
sd               2908 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x9b, s->de_end & 0xff);
sd               2909 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xa8, s->vs_beg_o);
sd               2910 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xa9, s->vs_beg_e);
sd               2911 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xaa, s->vs_end_o);
sd               2912 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xab, s->vs_end_e);
sd               2913 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xac, s->de_v_beg_o);
sd               2914 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xad, s->de_v_beg_e);
sd               2915 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xae, s->de_v_end_o);
sd               2916 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xaf, s->de_v_end_e);
sd               2919 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x94, 0x00);
sd               2920 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x95, 0x00);
sd               2921 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x96, 0x00);
sd               2922 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x97, 0x20);
sd               2923 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x98, 0x00);
sd               2924 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x99, 0x00);
sd               2925 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x9a, 0x00);
sd               2926 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x9b, 0x00);
sd               2927 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xa8, 0x04);
sd               2928 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xa9, 0x04);
sd               2929 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xaa, 0x04);
sd               2930 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xab, 0x04);
sd               2931 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xac, 0x04);
sd               2932 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xad, 0x04);
sd               2933 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xae, 0x04);
sd               2934 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0xaf, 0x04);
sd               2938 drivers/media/i2c/adv7842.c static int adv7842_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
sd               2940 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               2943 drivers/media/i2c/adv7842.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd               2949 drivers/media/i2c/adv7842.c 		adv7842_s_sdp_io(sd, &pdata->sdp_io_sync_625);
sd               2951 drivers/media/i2c/adv7842.c 		adv7842_s_sdp_io(sd, &pdata->sdp_io_sync_525);
sd               2953 drivers/media/i2c/adv7842.c 		adv7842_s_sdp_io(sd, NULL);
sd               2962 drivers/media/i2c/adv7842.c static int adv7842_g_std(struct v4l2_subdev *sd, v4l2_std_id *norm)
sd               2964 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               2966 drivers/media/i2c/adv7842.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd               2977 drivers/media/i2c/adv7842.c static int adv7842_core_init(struct v4l2_subdev *sd)
sd               2979 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               2981 drivers/media/i2c/adv7842.c 	hdmi_write(sd, 0x48,
sd               2985 drivers/media/i2c/adv7842.c 	disable_input(sd);
sd               2991 drivers/media/i2c/adv7842.c 	rep_write_and_or(sd, 0x77, 0xd3, 0x20);
sd               2994 drivers/media/i2c/adv7842.c 	io_write(sd, 0x0c, 0x42);   /* Power up part and power down VDP */
sd               2995 drivers/media/i2c/adv7842.c 	io_write(sd, 0x15, 0x80);   /* Power up pads */
sd               2998 drivers/media/i2c/adv7842.c 	io_write(sd, 0x02, 0xf0 | pdata->alt_gamma << 3);
sd               2999 drivers/media/i2c/adv7842.c 	io_write_and_or(sd, 0x05, 0xf0, pdata->blank_data << 3 |
sd               3005 drivers/media/i2c/adv7842.c 	hdmi_write_and_or(sd, 0x1a, 0xf1, 0x08); /* Wait 1 s before unmute */
sd               3008 drivers/media/i2c/adv7842.c 	io_write_and_or(sd, 0x14, 0xc0,
sd               3014 drivers/media/i2c/adv7842.c 	cp_write_and_or(sd, 0xba, 0xfc, pdata->hdmi_free_run_enable |
sd               3018 drivers/media/i2c/adv7842.c 	sdp_write_and_or(sd, 0xdd, 0xf0, pdata->sdp_free_run_force |
sd               3024 drivers/media/i2c/adv7842.c 	cp_write(sd, 0x69, 0x14);   /* Enable CP CSC */
sd               3025 drivers/media/i2c/adv7842.c 	io_write(sd, 0x06, 0xa6);   /* positive VS and HS and DE */
sd               3026 drivers/media/i2c/adv7842.c 	cp_write(sd, 0xf3, 0xdc); /* Low threshold to enter/exit free run mode */
sd               3027 drivers/media/i2c/adv7842.c 	afe_write(sd, 0xb5, 0x01);  /* Setting MCLK to 256Fs */
sd               3029 drivers/media/i2c/adv7842.c 	afe_write(sd, 0x02, pdata->ain_sel); /* Select analog input muxing mode */
sd               3030 drivers/media/i2c/adv7842.c 	io_write_and_or(sd, 0x30, ~(1 << 4), pdata->output_bus_lsb_to_msb << 4);
sd               3032 drivers/media/i2c/adv7842.c 	sdp_csc_coeff(sd, &pdata->sdp_csc_coeff);
sd               3036 drivers/media/i2c/adv7842.c 		sdp_write(sd, 0x12, 0x0d); /* Frame TBC,3D comb enabled */
sd               3039 drivers/media/i2c/adv7842.c 			sdp_io_write(sd, 0x6f, 0x00); /* DDR mode */
sd               3040 drivers/media/i2c/adv7842.c 			sdp_io_write(sd, 0x75, 0x0a); /* 128 MB memory size */
sd               3041 drivers/media/i2c/adv7842.c 			sdp_io_write(sd, 0x7a, 0xa5); /* Timing Adjustment */
sd               3042 drivers/media/i2c/adv7842.c 			sdp_io_write(sd, 0x7b, 0x8f); /* Timing Adjustment */
sd               3043 drivers/media/i2c/adv7842.c 			sdp_io_write(sd, 0x60, 0x01); /* SDRAM reset */
sd               3045 drivers/media/i2c/adv7842.c 			sdp_io_write(sd, 0x75, 0x0a); /* 64 MB memory size ?*/
sd               3046 drivers/media/i2c/adv7842.c 			sdp_io_write(sd, 0x74, 0x00); /* must be zero for sdr sdram */
sd               3047 drivers/media/i2c/adv7842.c 			sdp_io_write(sd, 0x79, 0x33); /* CAS latency to 3,
sd               3049 drivers/media/i2c/adv7842.c 			sdp_io_write(sd, 0x6f, 0x01); /* SDR mode */
sd               3050 drivers/media/i2c/adv7842.c 			sdp_io_write(sd, 0x7a, 0xa5); /* Timing Adjustment */
sd               3051 drivers/media/i2c/adv7842.c 			sdp_io_write(sd, 0x7b, 0x8f); /* Timing Adjustment */
sd               3052 drivers/media/i2c/adv7842.c 			sdp_io_write(sd, 0x60, 0x01); /* SDRAM reset */
sd               3059 drivers/media/i2c/adv7842.c 		sdp_io_write(sd, 0x29, 0x10); /* Tristate memory interface */
sd               3062 drivers/media/i2c/adv7842.c 	select_input(sd, pdata->vid_std_select);
sd               3064 drivers/media/i2c/adv7842.c 	enable_input(sd);
sd               3068 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x69, 0x5c);
sd               3071 drivers/media/i2c/adv7842.c 		hdmi_write(sd, 0x69, 0xa3);
sd               3073 drivers/media/i2c/adv7842.c 		io_write_and_or(sd, 0x20, 0xcf, 0x00);
sd               3077 drivers/media/i2c/adv7842.c 	io_write(sd, 0x19, 0x80 | pdata->llc_dll_phase);
sd               3078 drivers/media/i2c/adv7842.c 	io_write(sd, 0x33, 0x40);
sd               3081 drivers/media/i2c/adv7842.c 	io_write(sd, 0x40, 0xf2); /* Configure INT1 */
sd               3083 drivers/media/i2c/adv7842.c 	adv7842_irq_enable(sd, true);
sd               3085 drivers/media/i2c/adv7842.c 	return v4l2_ctrl_handler_setup(sd->ctrl_handler);
sd               3090 drivers/media/i2c/adv7842.c static int adv7842_ddr_ram_test(struct v4l2_subdev *sd)
sd               3103 drivers/media/i2c/adv7842.c 	io_write(sd, 0x00, 0x01);  /* Program SDP 4x1 */
sd               3104 drivers/media/i2c/adv7842.c 	io_write(sd, 0x01, 0x00);  /* Program SDP mode */
sd               3105 drivers/media/i2c/adv7842.c 	afe_write(sd, 0x80, 0x92); /* SDP Recommended Write */
sd               3106 drivers/media/i2c/adv7842.c 	afe_write(sd, 0x9B, 0x01); /* SDP Recommended Write ADV7844ES1 */
sd               3107 drivers/media/i2c/adv7842.c 	afe_write(sd, 0x9C, 0x60); /* SDP Recommended Write ADV7844ES1 */
sd               3108 drivers/media/i2c/adv7842.c 	afe_write(sd, 0x9E, 0x02); /* SDP Recommended Write ADV7844ES1 */
sd               3109 drivers/media/i2c/adv7842.c 	afe_write(sd, 0xA0, 0x0B); /* SDP Recommended Write ADV7844ES1 */
sd               3110 drivers/media/i2c/adv7842.c 	afe_write(sd, 0xC3, 0x02); /* Memory BIST Initialisation */
sd               3111 drivers/media/i2c/adv7842.c 	io_write(sd, 0x0C, 0x40);  /* Power up ADV7844 */
sd               3112 drivers/media/i2c/adv7842.c 	io_write(sd, 0x15, 0xBA);  /* Enable outputs */
sd               3113 drivers/media/i2c/adv7842.c 	sdp_write(sd, 0x12, 0x00); /* Disable 3D comb, Frame TBC & 3DNR */
sd               3114 drivers/media/i2c/adv7842.c 	io_write(sd, 0xFF, 0x04);  /* Reset memory controller */
sd               3118 drivers/media/i2c/adv7842.c 	sdp_write(sd, 0x12, 0x00);    /* Disable 3D Comb, Frame TBC & 3DNR */
sd               3119 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0x2A, 0x01); /* Memory BIST Initialisation */
sd               3120 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0x7c, 0x19); /* Memory BIST Initialisation */
sd               3121 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0x80, 0x87); /* Memory BIST Initialisation */
sd               3122 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0x81, 0x4a); /* Memory BIST Initialisation */
sd               3123 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0x82, 0x2c); /* Memory BIST Initialisation */
sd               3124 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0x83, 0x0e); /* Memory BIST Initialisation */
sd               3125 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0x84, 0x94); /* Memory BIST Initialisation */
sd               3126 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0x85, 0x62); /* Memory BIST Initialisation */
sd               3127 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0x7d, 0x00); /* Memory BIST Initialisation */
sd               3128 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0x7e, 0x1a); /* Memory BIST Initialisation */
sd               3132 drivers/media/i2c/adv7842.c 	sdp_io_write(sd, 0xd9, 0xd5); /* Enable BIST Test */
sd               3133 drivers/media/i2c/adv7842.c 	sdp_write(sd, 0x12, 0x05); /* Enable FRAME TBC & 3D COMB */
sd               3138 drivers/media/i2c/adv7842.c 		u8 result = sdp_io_read(sd, 0xdb);
sd               3149 drivers/media/i2c/adv7842.c 	v4l2_dbg(1, debug, sd,
sd               3158 drivers/media/i2c/adv7842.c static void adv7842_rewrite_i2c_addresses(struct v4l2_subdev *sd,
sd               3161 drivers/media/i2c/adv7842.c 	io_write(sd, 0xf1, pdata->i2c_sdp << 1);
sd               3162 drivers/media/i2c/adv7842.c 	io_write(sd, 0xf2, pdata->i2c_sdp_io << 1);
sd               3163 drivers/media/i2c/adv7842.c 	io_write(sd, 0xf3, pdata->i2c_avlink << 1);
sd               3164 drivers/media/i2c/adv7842.c 	io_write(sd, 0xf4, pdata->i2c_cec << 1);
sd               3165 drivers/media/i2c/adv7842.c 	io_write(sd, 0xf5, pdata->i2c_infoframe << 1);
sd               3167 drivers/media/i2c/adv7842.c 	io_write(sd, 0xf8, pdata->i2c_afe << 1);
sd               3168 drivers/media/i2c/adv7842.c 	io_write(sd, 0xf9, pdata->i2c_repeater << 1);
sd               3169 drivers/media/i2c/adv7842.c 	io_write(sd, 0xfa, pdata->i2c_edid << 1);
sd               3170 drivers/media/i2c/adv7842.c 	io_write(sd, 0xfb, pdata->i2c_hdmi << 1);
sd               3172 drivers/media/i2c/adv7842.c 	io_write(sd, 0xfd, pdata->i2c_cp << 1);
sd               3173 drivers/media/i2c/adv7842.c 	io_write(sd, 0xfe, pdata->i2c_vdp << 1);
sd               3176 drivers/media/i2c/adv7842.c static int adv7842_command_ram_test(struct v4l2_subdev *sd)
sd               3178 drivers/media/i2c/adv7842.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               3179 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               3188 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "no sdram or no ddr sdram\n");
sd               3192 drivers/media/i2c/adv7842.c 	main_reset(sd);
sd               3194 drivers/media/i2c/adv7842.c 	adv7842_rewrite_i2c_addresses(sd, pdata);
sd               3197 drivers/media/i2c/adv7842.c 	ret = adv7842_ddr_ram_test(sd);
sd               3199 drivers/media/i2c/adv7842.c 	main_reset(sd);
sd               3201 drivers/media/i2c/adv7842.c 	adv7842_rewrite_i2c_addresses(sd, pdata);
sd               3204 drivers/media/i2c/adv7842.c 	adv7842_core_init(sd);
sd               3206 drivers/media/i2c/adv7842.c 	disable_input(sd);
sd               3208 drivers/media/i2c/adv7842.c 	select_input(sd, state->vid_std_select);
sd               3210 drivers/media/i2c/adv7842.c 	enable_input(sd);
sd               3212 drivers/media/i2c/adv7842.c 	edid_write_vga_segment(sd);
sd               3213 drivers/media/i2c/adv7842.c 	edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_A);
sd               3214 drivers/media/i2c/adv7842.c 	edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_B);
sd               3220 drivers/media/i2c/adv7842.c 	adv7842_s_dv_timings(sd, &timings);
sd               3225 drivers/media/i2c/adv7842.c static long adv7842_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
sd               3229 drivers/media/i2c/adv7842.c 		return adv7842_command_ram_test(sd);
sd               3234 drivers/media/i2c/adv7842.c static int adv7842_subscribe_event(struct v4l2_subdev *sd,
sd               3240 drivers/media/i2c/adv7842.c 		return v4l2_src_change_event_subdev_subscribe(sd, fh, sub);
sd               3242 drivers/media/i2c/adv7842.c 		return v4l2_ctrl_subdev_subscribe_event(sd, fh, sub);
sd               3248 drivers/media/i2c/adv7842.c static int adv7842_registered(struct v4l2_subdev *sd)
sd               3250 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               3251 drivers/media/i2c/adv7842.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               3260 drivers/media/i2c/adv7842.c static void adv7842_unregistered(struct v4l2_subdev *sd)
sd               3262 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               3351 drivers/media/i2c/adv7842.c static void adv7842_unregister_clients(struct v4l2_subdev *sd)
sd               3353 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               3379 drivers/media/i2c/adv7842.c static struct i2c_client *adv7842_dummy_client(struct v4l2_subdev *sd, const char *desc,
sd               3382 drivers/media/i2c/adv7842.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               3385 drivers/media/i2c/adv7842.c 	io_write(sd, io_reg, addr << 1);
sd               3388 drivers/media/i2c/adv7842.c 		v4l2_err(sd, "no %s i2c addr configured\n", desc);
sd               3392 drivers/media/i2c/adv7842.c 	cp = i2c_new_dummy_device(client->adapter, io_read(sd, io_reg) >> 1);
sd               3394 drivers/media/i2c/adv7842.c 		v4l2_err(sd, "register %s on i2c addr 0x%x failed with %ld\n",
sd               3402 drivers/media/i2c/adv7842.c static int adv7842_register_clients(struct v4l2_subdev *sd)
sd               3404 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               3407 drivers/media/i2c/adv7842.c 	state->i2c_avlink = adv7842_dummy_client(sd, "avlink", pdata->i2c_avlink, 0xf3);
sd               3408 drivers/media/i2c/adv7842.c 	state->i2c_cec = adv7842_dummy_client(sd, "cec", pdata->i2c_cec, 0xf4);
sd               3409 drivers/media/i2c/adv7842.c 	state->i2c_infoframe = adv7842_dummy_client(sd, "infoframe", pdata->i2c_infoframe, 0xf5);
sd               3410 drivers/media/i2c/adv7842.c 	state->i2c_sdp_io = adv7842_dummy_client(sd, "sdp_io", pdata->i2c_sdp_io, 0xf2);
sd               3411 drivers/media/i2c/adv7842.c 	state->i2c_sdp = adv7842_dummy_client(sd, "sdp", pdata->i2c_sdp, 0xf1);
sd               3412 drivers/media/i2c/adv7842.c 	state->i2c_afe = adv7842_dummy_client(sd, "afe", pdata->i2c_afe, 0xf8);
sd               3413 drivers/media/i2c/adv7842.c 	state->i2c_repeater = adv7842_dummy_client(sd, "repeater", pdata->i2c_repeater, 0xf9);
sd               3414 drivers/media/i2c/adv7842.c 	state->i2c_edid = adv7842_dummy_client(sd, "edid", pdata->i2c_edid, 0xfa);
sd               3415 drivers/media/i2c/adv7842.c 	state->i2c_hdmi = adv7842_dummy_client(sd, "hdmi", pdata->i2c_hdmi, 0xfb);
sd               3416 drivers/media/i2c/adv7842.c 	state->i2c_cp = adv7842_dummy_client(sd, "cp", pdata->i2c_cp, 0xfd);
sd               3417 drivers/media/i2c/adv7842.c 	state->i2c_vdp = adv7842_dummy_client(sd, "vdp", pdata->i2c_vdp, 0xfe);
sd               3444 drivers/media/i2c/adv7842.c 	struct v4l2_subdev *sd;
sd               3469 drivers/media/i2c/adv7842.c 	sd = &state->sd;
sd               3470 drivers/media/i2c/adv7842.c 	v4l2_i2c_subdev_init(sd, client, &adv7842_ops);
sd               3471 drivers/media/i2c/adv7842.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
sd               3472 drivers/media/i2c/adv7842.c 	sd->internal_ops = &adv7842_int_ops;
sd               3482 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "got rev=0x%04x on first read attempt\n", rev);
sd               3487 drivers/media/i2c/adv7842.c 		v4l2_info(sd, "not an adv7842 on address 0x%x (rev=0x%04x)\n",
sd               3493 drivers/media/i2c/adv7842.c 		main_reset(sd);
sd               3527 drivers/media/i2c/adv7842.c 	sd->ctrl_handler = hdl;
sd               3532 drivers/media/i2c/adv7842.c 	if (adv7842_s_detect_tx_5v_ctrl(sd)) {
sd               3537 drivers/media/i2c/adv7842.c 	if (adv7842_register_clients(sd) < 0) {
sd               3539 drivers/media/i2c/adv7842.c 		v4l2_err(sd, "failed to create all i2c clients\n");
sd               3547 drivers/media/i2c/adv7842.c 	sd->entity.function = MEDIA_ENT_F_DV_DECODER;
sd               3549 drivers/media/i2c/adv7842.c 	err = media_entity_pads_init(&sd->entity, 1, &state->pad);
sd               3553 drivers/media/i2c/adv7842.c 	err = adv7842_core_init(sd);
sd               3566 drivers/media/i2c/adv7842.c 	v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
sd               3571 drivers/media/i2c/adv7842.c 	media_entity_cleanup(&sd->entity);
sd               3575 drivers/media/i2c/adv7842.c 	adv7842_unregister_clients(sd);
sd               3585 drivers/media/i2c/adv7842.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               3586 drivers/media/i2c/adv7842.c 	struct adv7842_state *state = to_state(sd);
sd               3588 drivers/media/i2c/adv7842.c 	adv7842_irq_enable(sd, false);
sd               3590 drivers/media/i2c/adv7842.c 	v4l2_device_unregister_subdev(sd);
sd               3591 drivers/media/i2c/adv7842.c 	media_entity_cleanup(&sd->entity);
sd               3592 drivers/media/i2c/adv7842.c 	adv7842_unregister_clients(sd);
sd               3593 drivers/media/i2c/adv7842.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                 35 drivers/media/i2c/ak7375.c 	struct v4l2_subdev sd;
sd                 48 drivers/media/i2c/ak7375.c 	return container_of(subdev, struct ak7375_device, sd);
sd                 54 drivers/media/i2c/ak7375.c 	struct i2c_client *client = v4l2_get_subdevdata(&ak7375->sd);
sd                 88 drivers/media/i2c/ak7375.c static int ak7375_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                 92 drivers/media/i2c/ak7375.c 	ret = pm_runtime_get_sync(sd->dev);
sd                 94 drivers/media/i2c/ak7375.c 		pm_runtime_put_noidle(sd->dev);
sd                101 drivers/media/i2c/ak7375.c static int ak7375_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                103 drivers/media/i2c/ak7375.c 	pm_runtime_put(sd->dev);
sd                117 drivers/media/i2c/ak7375.c 	v4l2_async_unregister_subdev(&ak7375_dev->sd);
sd                119 drivers/media/i2c/ak7375.c 	media_entity_cleanup(&ak7375_dev->sd.entity);
sd                133 drivers/media/i2c/ak7375.c 		dev_err(dev_vcm->sd.dev, "%s fail error: 0x%x\n",
sd                135 drivers/media/i2c/ak7375.c 	dev_vcm->sd.ctrl_handler = hdl;
sd                150 drivers/media/i2c/ak7375.c 	v4l2_i2c_subdev_init(&ak7375_dev->sd, client, &ak7375_ops);
sd                151 drivers/media/i2c/ak7375.c 	ak7375_dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                152 drivers/media/i2c/ak7375.c 	ak7375_dev->sd.internal_ops = &ak7375_int_ops;
sd                153 drivers/media/i2c/ak7375.c 	ak7375_dev->sd.entity.function = MEDIA_ENT_F_LENS;
sd                159 drivers/media/i2c/ak7375.c 	ret = media_entity_pads_init(&ak7375_dev->sd.entity, 0, NULL);
sd                163 drivers/media/i2c/ak7375.c 	ret = v4l2_async_register_subdev(&ak7375_dev->sd);
sd                175 drivers/media/i2c/ak7375.c 	media_entity_cleanup(&ak7375_dev->sd.entity);
sd                182 drivers/media/i2c/ak7375.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                183 drivers/media/i2c/ak7375.c 	struct ak7375_device *ak7375_dev = sd_to_ak7375_vcm(sd);
sd                201 drivers/media/i2c/ak7375.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                202 drivers/media/i2c/ak7375.c 	struct ak7375_device *ak7375_dev = sd_to_ak7375_vcm(sd);
sd                237 drivers/media/i2c/ak7375.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                238 drivers/media/i2c/ak7375.c 	struct ak7375_device *ak7375_dev = sd_to_ak7375_vcm(sd);
sd                 61 drivers/media/i2c/ak881x.c static int ak881x_g_register(struct v4l2_subdev *sd,
sd                 64 drivers/media/i2c/ak881x.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 78 drivers/media/i2c/ak881x.c static int ak881x_s_register(struct v4l2_subdev *sd,
sd                 81 drivers/media/i2c/ak881x.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 93 drivers/media/i2c/ak881x.c static int ak881x_fill_fmt(struct v4l2_subdev *sd,
sd                 98 drivers/media/i2c/ak881x.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                113 drivers/media/i2c/ak881x.c static int ak881x_enum_mbus_code(struct v4l2_subdev *sd,
sd                124 drivers/media/i2c/ak881x.c static int ak881x_get_selection(struct v4l2_subdev *sd,
sd                128 drivers/media/i2c/ak881x.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                146 drivers/media/i2c/ak881x.c static int ak881x_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
sd                148 drivers/media/i2c/ak881x.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                177 drivers/media/i2c/ak881x.c static int ak881x_s_stream(struct v4l2_subdev *sd, int enable)
sd                179 drivers/media/i2c/ak881x.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 41 drivers/media/i2c/bt819.c 	struct v4l2_subdev sd;
sd                 50 drivers/media/i2c/bt819.c static inline struct bt819 *to_bt819(struct v4l2_subdev *sd)
sd                 52 drivers/media/i2c/bt819.c 	return container_of(sd, struct bt819, sd);
sd                 57 drivers/media/i2c/bt819.c 	return &container_of(ctrl->handler, struct bt819, hdl)->sd;
sd                 79 drivers/media/i2c/bt819.c 	struct i2c_client *client = v4l2_get_subdevdata(&decoder->sd);
sd                 93 drivers/media/i2c/bt819.c 	struct i2c_client *client = v4l2_get_subdevdata(&decoder->sd);
sd                133 drivers/media/i2c/bt819.c 	struct i2c_client *client = v4l2_get_subdevdata(&decoder->sd);
sd                138 drivers/media/i2c/bt819.c static int bt819_init(struct v4l2_subdev *sd)
sd                174 drivers/media/i2c/bt819.c 	struct bt819 *decoder = to_bt819(sd);
sd                200 drivers/media/i2c/bt819.c static int bt819_status(struct v4l2_subdev *sd, u32 *pstatus, v4l2_std_id *pstd)
sd                202 drivers/media/i2c/bt819.c 	struct bt819 *decoder = to_bt819(sd);
sd                221 drivers/media/i2c/bt819.c 	v4l2_dbg(1, debug, sd, "get status %x\n", status);
sd                225 drivers/media/i2c/bt819.c static int bt819_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
sd                227 drivers/media/i2c/bt819.c 	return bt819_status(sd, NULL, std);
sd                230 drivers/media/i2c/bt819.c static int bt819_g_input_status(struct v4l2_subdev *sd, u32 *status)
sd                232 drivers/media/i2c/bt819.c 	return bt819_status(sd, status, NULL);
sd                235 drivers/media/i2c/bt819.c static int bt819_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd                237 drivers/media/i2c/bt819.c 	struct bt819 *decoder = to_bt819(sd);
sd                240 drivers/media/i2c/bt819.c 	v4l2_dbg(1, debug, sd, "set norm %llx\n", (unsigned long long)std);
sd                242 drivers/media/i2c/bt819.c 	if (sd->v4l2_dev == NULL || sd->v4l2_dev->notify == NULL)
sd                243 drivers/media/i2c/bt819.c 		v4l2_err(sd, "no notify found!\n");
sd                246 drivers/media/i2c/bt819.c 		v4l2_subdev_notify(sd, BT819_FIFO_RESET_LOW, NULL);
sd                255 drivers/media/i2c/bt819.c 		v4l2_subdev_notify(sd, BT819_FIFO_RESET_LOW, NULL);
sd                264 drivers/media/i2c/bt819.c 		v4l2_dbg(1, debug, sd, "unsupported norm %llx\n",
sd                280 drivers/media/i2c/bt819.c 	v4l2_subdev_notify(sd, BT819_FIFO_RESET_HIGH, NULL);
sd                284 drivers/media/i2c/bt819.c static int bt819_s_routing(struct v4l2_subdev *sd,
sd                287 drivers/media/i2c/bt819.c 	struct bt819 *decoder = to_bt819(sd);
sd                289 drivers/media/i2c/bt819.c 	v4l2_dbg(1, debug, sd, "set input %x\n", input);
sd                294 drivers/media/i2c/bt819.c 	if (sd->v4l2_dev == NULL || sd->v4l2_dev->notify == NULL)
sd                295 drivers/media/i2c/bt819.c 		v4l2_err(sd, "no notify found!\n");
sd                298 drivers/media/i2c/bt819.c 		v4l2_subdev_notify(sd, BT819_FIFO_RESET_LOW, NULL);
sd                308 drivers/media/i2c/bt819.c 		v4l2_subdev_notify(sd, BT819_FIFO_RESET_HIGH, NULL);
sd                313 drivers/media/i2c/bt819.c static int bt819_s_stream(struct v4l2_subdev *sd, int enable)
sd                315 drivers/media/i2c/bt819.c 	struct bt819 *decoder = to_bt819(sd);
sd                317 drivers/media/i2c/bt819.c 	v4l2_dbg(1, debug, sd, "enable output %x\n", enable);
sd                328 drivers/media/i2c/bt819.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                329 drivers/media/i2c/bt819.c 	struct bt819 *decoder = to_bt819(sd);
sd                388 drivers/media/i2c/bt819.c 	struct v4l2_subdev *sd;
sd                398 drivers/media/i2c/bt819.c 	sd = &decoder->sd;
sd                399 drivers/media/i2c/bt819.c 	v4l2_i2c_subdev_init(sd, client, &bt819_ops);
sd                413 drivers/media/i2c/bt819.c 		v4l2_dbg(1, debug, sd,
sd                425 drivers/media/i2c/bt819.c 	i = bt819_init(sd);
sd                427 drivers/media/i2c/bt819.c 		v4l2_dbg(1, debug, sd, "init status %d\n", i);
sd                438 drivers/media/i2c/bt819.c 	sd->ctrl_handler = &decoder->hdl;
sd                451 drivers/media/i2c/bt819.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                452 drivers/media/i2c/bt819.c 	struct bt819 *decoder = to_bt819(sd);
sd                454 drivers/media/i2c/bt819.c 	v4l2_device_unregister_subdev(sd);
sd                 42 drivers/media/i2c/bt856.c 	struct v4l2_subdev sd;
sd                 48 drivers/media/i2c/bt856.c static inline struct bt856 *to_bt856(struct v4l2_subdev *sd)
sd                 50 drivers/media/i2c/bt856.c 	return container_of(sd, struct bt856, sd);
sd                 57 drivers/media/i2c/bt856.c 	struct i2c_client *client = v4l2_get_subdevdata(&encoder->sd);
sd                 74 drivers/media/i2c/bt856.c 	v4l2_info(&encoder->sd, "register dump:\n");
sd                 82 drivers/media/i2c/bt856.c static int bt856_init(struct v4l2_subdev *sd, u32 arg)
sd                 84 drivers/media/i2c/bt856.c 	struct bt856 *encoder = to_bt856(sd);
sd                 87 drivers/media/i2c/bt856.c 	v4l2_dbg(1, debug, sd, "init\n");
sd                109 drivers/media/i2c/bt856.c static int bt856_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
sd                111 drivers/media/i2c/bt856.c 	struct bt856 *encoder = to_bt856(sd);
sd                113 drivers/media/i2c/bt856.c 	v4l2_dbg(1, debug, sd, "set norm %llx\n", (unsigned long long)std);
sd                130 drivers/media/i2c/bt856.c static int bt856_s_routing(struct v4l2_subdev *sd,
sd                133 drivers/media/i2c/bt856.c 	struct bt856 *encoder = to_bt856(sd);
sd                135 drivers/media/i2c/bt856.c 	v4l2_dbg(1, debug, sd, "set input %d\n", input);
sd                188 drivers/media/i2c/bt856.c 	struct v4l2_subdev *sd;
sd                200 drivers/media/i2c/bt856.c 	sd = &encoder->sd;
sd                201 drivers/media/i2c/bt856.c 	v4l2_i2c_subdev_init(sd, client, &bt856_ops);
sd                228 drivers/media/i2c/bt856.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                230 drivers/media/i2c/bt856.c 	v4l2_device_unregister_subdev(sd);
sd                 40 drivers/media/i2c/bt866.c 	struct v4l2_subdev sd;
sd                 44 drivers/media/i2c/bt866.c static inline struct bt866 *to_bt866(struct v4l2_subdev *sd)
sd                 46 drivers/media/i2c/bt866.c 	return container_of(sd, struct bt866, sd);
sd                 51 drivers/media/i2c/bt866.c 	struct i2c_client *client = v4l2_get_subdevdata(&encoder->sd);
sd                 78 drivers/media/i2c/bt866.c static int bt866_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
sd                 80 drivers/media/i2c/bt866.c 	v4l2_dbg(1, debug, sd, "set norm %llx\n", (unsigned long long)std);
sd                 88 drivers/media/i2c/bt866.c static int bt866_s_routing(struct v4l2_subdev *sd,
sd                118 drivers/media/i2c/bt866.c 	struct bt866 *encoder = to_bt866(sd);
sd                141 drivers/media/i2c/bt866.c 	v4l2_dbg(1, debug, sd, "set input %d\n", input);
sd                180 drivers/media/i2c/bt866.c 	struct v4l2_subdev *sd;
sd                188 drivers/media/i2c/bt866.c 	sd = &encoder->sd;
sd                189 drivers/media/i2c/bt866.c 	v4l2_i2c_subdev_init(sd, client, &bt866_ops);
sd                195 drivers/media/i2c/bt866.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                197 drivers/media/i2c/bt866.c 	v4l2_device_unregister_subdev(sd);
sd                 23 drivers/media/i2c/cs3308.c static inline int cs3308_write(struct v4l2_subdev *sd, u8 reg, u8 value)
sd                 25 drivers/media/i2c/cs3308.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 30 drivers/media/i2c/cs3308.c static inline int cs3308_read(struct v4l2_subdev *sd, u8 reg)
sd                 32 drivers/media/i2c/cs3308.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 38 drivers/media/i2c/cs3308.c static int cs3308_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
sd                 40 drivers/media/i2c/cs3308.c 	reg->val = cs3308_read(sd, reg->reg & 0xffff);
sd                 45 drivers/media/i2c/cs3308.c static int cs3308_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
sd                 47 drivers/media/i2c/cs3308.c 	cs3308_write(sd, reg->reg & 0xffff, reg->val & 0xff);
sd                 70 drivers/media/i2c/cs3308.c 	struct v4l2_subdev *sd;
sd                 83 drivers/media/i2c/cs3308.c 	sd = kzalloc(sizeof(struct v4l2_subdev), GFP_KERNEL);
sd                 84 drivers/media/i2c/cs3308.c 	if (sd == NULL)
sd                 87 drivers/media/i2c/cs3308.c 	v4l2_i2c_subdev_init(sd, client, &cs3308_ops);
sd                 90 drivers/media/i2c/cs3308.c 	cs3308_write(sd, 0x0d, 0x00); /* Power up all channels */
sd                 91 drivers/media/i2c/cs3308.c 	cs3308_write(sd, 0x0e, 0x00); /* Master Power */
sd                 92 drivers/media/i2c/cs3308.c 	cs3308_write(sd, 0x0b, 0x00); /* Device Configuration */
sd                 95 drivers/media/i2c/cs3308.c 		cs3308_write(sd, i, 0xd2);
sd                 96 drivers/media/i2c/cs3308.c 	cs3308_write(sd, 0x0a, 0x00); /* Unmute all channels */
sd                104 drivers/media/i2c/cs3308.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                106 drivers/media/i2c/cs3308.c 	v4l2_device_unregister_subdev(sd);
sd                107 drivers/media/i2c/cs3308.c 	kfree(sd);
sd                 27 drivers/media/i2c/cs5345.c 	struct v4l2_subdev sd;
sd                 31 drivers/media/i2c/cs5345.c static inline struct cs5345_state *to_state(struct v4l2_subdev *sd)
sd                 33 drivers/media/i2c/cs5345.c 	return container_of(sd, struct cs5345_state, sd);
sd                 38 drivers/media/i2c/cs5345.c 	return &container_of(ctrl->handler, struct cs5345_state, hdl)->sd;
sd                 43 drivers/media/i2c/cs5345.c static inline int cs5345_write(struct v4l2_subdev *sd, u8 reg, u8 value)
sd                 45 drivers/media/i2c/cs5345.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 50 drivers/media/i2c/cs5345.c static inline int cs5345_read(struct v4l2_subdev *sd, u8 reg)
sd                 52 drivers/media/i2c/cs5345.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 57 drivers/media/i2c/cs5345.c static int cs5345_s_routing(struct v4l2_subdev *sd,
sd                 61 drivers/media/i2c/cs5345.c 		v4l2_err(sd, "Invalid input %d.\n", input);
sd                 64 drivers/media/i2c/cs5345.c 	cs5345_write(sd, 0x09, input & 0xf);
sd                 65 drivers/media/i2c/cs5345.c 	cs5345_write(sd, 0x05, input & 0xf0);
sd                 71 drivers/media/i2c/cs5345.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                 75 drivers/media/i2c/cs5345.c 		cs5345_write(sd, 0x04, ctrl->val ? 0x80 : 0);
sd                 78 drivers/media/i2c/cs5345.c 		cs5345_write(sd, 0x07, ((u8)ctrl->val) & 0x3f);
sd                 79 drivers/media/i2c/cs5345.c 		cs5345_write(sd, 0x08, ((u8)ctrl->val) & 0x3f);
sd                 86 drivers/media/i2c/cs5345.c static int cs5345_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
sd                 89 drivers/media/i2c/cs5345.c 	reg->val = cs5345_read(sd, reg->reg & 0x1f);
sd                 93 drivers/media/i2c/cs5345.c static int cs5345_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
sd                 95 drivers/media/i2c/cs5345.c 	cs5345_write(sd, reg->reg & 0x1f, reg->val & 0xff);
sd                100 drivers/media/i2c/cs5345.c static int cs5345_log_status(struct v4l2_subdev *sd)
sd                102 drivers/media/i2c/cs5345.c 	u8 v = cs5345_read(sd, 0x09) & 7;
sd                103 drivers/media/i2c/cs5345.c 	u8 m = cs5345_read(sd, 0x04);
sd                104 drivers/media/i2c/cs5345.c 	int vol = cs5345_read(sd, 0x08) & 0x3f;
sd                106 drivers/media/i2c/cs5345.c 	v4l2_info(sd, "Input:  %d%s\n", v,
sd                110 drivers/media/i2c/cs5345.c 	v4l2_info(sd, "Volume: %d dB\n", vol);
sd                143 drivers/media/i2c/cs5345.c 	struct v4l2_subdev *sd;
sd                155 drivers/media/i2c/cs5345.c 	sd = &state->sd;
sd                156 drivers/media/i2c/cs5345.c 	v4l2_i2c_subdev_init(sd, client, &cs5345_ops);
sd                163 drivers/media/i2c/cs5345.c 	sd->ctrl_handler = &state->hdl;
sd                173 drivers/media/i2c/cs5345.c 	cs5345_write(sd, 0x02, 0x00);
sd                174 drivers/media/i2c/cs5345.c 	cs5345_write(sd, 0x04, 0x01);
sd                175 drivers/media/i2c/cs5345.c 	cs5345_write(sd, 0x09, 0x01);
sd                183 drivers/media/i2c/cs5345.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                184 drivers/media/i2c/cs5345.c 	struct cs5345_state *state = to_state(sd);
sd                186 drivers/media/i2c/cs5345.c 	v4l2_device_unregister_subdev(sd);
sd                 32 drivers/media/i2c/cs53l32a.c 	struct v4l2_subdev sd;
sd                 36 drivers/media/i2c/cs53l32a.c static inline struct cs53l32a_state *to_state(struct v4l2_subdev *sd)
sd                 38 drivers/media/i2c/cs53l32a.c 	return container_of(sd, struct cs53l32a_state, sd);
sd                 43 drivers/media/i2c/cs53l32a.c 	return &container_of(ctrl->handler, struct cs53l32a_state, hdl)->sd;
sd                 48 drivers/media/i2c/cs53l32a.c static int cs53l32a_write(struct v4l2_subdev *sd, u8 reg, u8 value)
sd                 50 drivers/media/i2c/cs53l32a.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 55 drivers/media/i2c/cs53l32a.c static int cs53l32a_read(struct v4l2_subdev *sd, u8 reg)
sd                 57 drivers/media/i2c/cs53l32a.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 62 drivers/media/i2c/cs53l32a.c static int cs53l32a_s_routing(struct v4l2_subdev *sd,
sd                 70 drivers/media/i2c/cs53l32a.c 		v4l2_err(sd, "Invalid input %d.\n", input);
sd                 73 drivers/media/i2c/cs53l32a.c 	cs53l32a_write(sd, 0x01, 0x01 + (input << 4));
sd                 79 drivers/media/i2c/cs53l32a.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                 83 drivers/media/i2c/cs53l32a.c 		cs53l32a_write(sd, 0x03, ctrl->val ? 0xf0 : 0x30);
sd                 86 drivers/media/i2c/cs53l32a.c 		cs53l32a_write(sd, 0x04, (u8)ctrl->val);
sd                 87 drivers/media/i2c/cs53l32a.c 		cs53l32a_write(sd, 0x05, (u8)ctrl->val);
sd                 93 drivers/media/i2c/cs53l32a.c static int cs53l32a_log_status(struct v4l2_subdev *sd)
sd                 95 drivers/media/i2c/cs53l32a.c 	struct cs53l32a_state *state = to_state(sd);
sd                 96 drivers/media/i2c/cs53l32a.c 	u8 v = cs53l32a_read(sd, 0x01);
sd                 98 drivers/media/i2c/cs53l32a.c 	v4l2_info(sd, "Input:  %d\n", (v >> 4) & 3);
sd                 99 drivers/media/i2c/cs53l32a.c 	v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
sd                135 drivers/media/i2c/cs53l32a.c 	struct v4l2_subdev *sd;
sd                151 drivers/media/i2c/cs53l32a.c 	sd = &state->sd;
sd                152 drivers/media/i2c/cs53l32a.c 	v4l2_i2c_subdev_init(sd, client, &cs53l32a_ops);
sd                155 drivers/media/i2c/cs53l32a.c 		u8 v = cs53l32a_read(sd, i);
sd                157 drivers/media/i2c/cs53l32a.c 		v4l2_dbg(1, debug, sd, "Read Reg %d %02x\n", i, v);
sd                165 drivers/media/i2c/cs53l32a.c 	sd->ctrl_handler = &state->hdl;
sd                175 drivers/media/i2c/cs53l32a.c 	cs53l32a_write(sd, 0x01, 0x21);
sd                176 drivers/media/i2c/cs53l32a.c 	cs53l32a_write(sd, 0x02, 0x29);
sd                177 drivers/media/i2c/cs53l32a.c 	cs53l32a_write(sd, 0x03, 0x30);
sd                178 drivers/media/i2c/cs53l32a.c 	cs53l32a_write(sd, 0x04, 0x00);
sd                179 drivers/media/i2c/cs53l32a.c 	cs53l32a_write(sd, 0x05, 0x00);
sd                180 drivers/media/i2c/cs53l32a.c 	cs53l32a_write(sd, 0x06, 0x00);
sd                181 drivers/media/i2c/cs53l32a.c 	cs53l32a_write(sd, 0x07, 0x00);
sd                186 drivers/media/i2c/cs53l32a.c 		u8 v = cs53l32a_read(sd, i);
sd                188 drivers/media/i2c/cs53l32a.c 		v4l2_dbg(1, debug, sd, "Read Reg %d %02x\n", i, v);
sd                195 drivers/media/i2c/cs53l32a.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                196 drivers/media/i2c/cs53l32a.c 	struct cs53l32a_state *state = to_state(sd);
sd                198 drivers/media/i2c/cs53l32a.c 	v4l2_device_unregister_subdev(sd);
sd                504 drivers/media/i2c/cx25840/cx25840-audio.c int cx25840_s_clock_freq(struct v4l2_subdev *sd, u32 freq)
sd                506 drivers/media/i2c/cx25840/cx25840-audio.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                507 drivers/media/i2c/cx25840/cx25840-audio.c 	struct cx25840_state *state = to_state(sd);
sd                526 drivers/media/i2c/cx25840/cx25840-audio.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                527 drivers/media/i2c/cx25840/cx25840-audio.c 	struct cx25840_state *state = to_state(sd);
sd                528 drivers/media/i2c/cx25840/cx25840-audio.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                174 drivers/media/i2c/cx25840/cx25840-core.c static int cx23885_s_io_pin_config(struct v4l2_subdev *sd, size_t n,
sd                177 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                385 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_s_io_pin_config(struct v4l2_subdev *sd, size_t n,
sd                388 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                524 drivers/media/i2c/cx25840/cx25840-core.c static int common_s_io_pin_config(struct v4l2_subdev *sd, size_t n,
sd                527 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd                530 drivers/media/i2c/cx25840/cx25840-core.c 		return cx23885_s_io_pin_config(sd, n, pincfg);
sd                532 drivers/media/i2c/cx25840/cx25840-core.c 		return cx25840_s_io_pin_config(sd, n, pincfg);
sd                778 drivers/media/i2c/cx25840/cx25840-core.c 	if (v4l2_get_subdev_hostdata(&state->sd))
sd                779 drivers/media/i2c/cx25840/cx25840-core.c 		clk_freq = *((u32 *)v4l2_get_subdev_hostdata(&state->sd));
sd               1709 drivers/media/i2c/cx25840/cx25840-core.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd               1710 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               1711 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1748 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_set_fmt(struct v4l2_subdev *sd,
sd               1753 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               1754 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2263 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_init(struct v4l2_subdev *sd, u32 val)
sd               2265 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               2294 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_reset(struct v4l2_subdev *sd, u32 val)
sd               2296 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               2297 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2327 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_load_fw(struct v4l2_subdev *sd)
sd               2329 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               2333 drivers/media/i2c/cx25840/cx25840-core.c 		cx25840_reset(sd, 0);
sd               2339 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_g_register(struct v4l2_subdev *sd,
sd               2342 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2349 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_s_register(struct v4l2_subdev *sd,
sd               2352 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2359 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_s_audio_stream(struct v4l2_subdev *sd, int enable)
sd               2361 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               2362 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2385 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_s_stream(struct v4l2_subdev *sd, int enable)
sd               2387 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               2388 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2419 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
sd               2421 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2454 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_g_input_status(struct v4l2_subdev *sd, u32 *status)
sd               2456 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2470 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_g_std(struct v4l2_subdev *sd, v4l2_std_id *std)
sd               2472 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               2479 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd               2481 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               2482 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2491 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_s_radio(struct v4l2_subdev *sd)
sd               2493 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               2499 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_s_video_routing(struct v4l2_subdev *sd,
sd               2502 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               2503 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2516 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_s_audio_routing(struct v4l2_subdev *sd,
sd               2519 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               2520 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2527 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_s_frequency(struct v4l2_subdev *sd,
sd               2530 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2536 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
sd               2538 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               2539 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2573 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
sd               2575 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               2576 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2622 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_log_status(struct v4l2_subdev *sd)
sd               2624 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               2625 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2630 drivers/media/i2c/cx25840/cx25840-core.c 	cx25840_ir_log_status(sd);
sd               2631 drivers/media/i2c/cx25840/cx25840-core.c 	v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
sd               2635 drivers/media/i2c/cx25840/cx25840-core.c static int cx23885_irq_handler(struct v4l2_subdev *sd, u32 status,
sd               2638 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               2639 drivers/media/i2c/cx25840/cx25840-core.c 	struct i2c_client *c = v4l2_get_subdevdata(sd);
sd               2659 drivers/media/i2c/cx25840/cx25840-core.c 			ret = cx25840_ir_irq_handler(sd,
sd               2704 drivers/media/i2c/cx25840/cx25840-core.c static int cx25840_irq_handler(struct v4l2_subdev *sd, u32 status,
sd               2707 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               2713 drivers/media/i2c/cx25840/cx25840-core.c 		return cx23885_irq_handler(sd, status, handled);
sd               5832 drivers/media/i2c/cx25840/cx25840-core.c 	struct v4l2_subdev *sd;
sd               5881 drivers/media/i2c/cx25840/cx25840-core.c 	sd = &state->sd;
sd               5882 drivers/media/i2c/cx25840/cx25840-core.c 	v4l2_i2c_subdev_init(sd, client, &cx25840_ops);
sd               5902 drivers/media/i2c/cx25840/cx25840-core.c 	sd->entity.function = MEDIA_ENT_F_ATV_DECODER;
sd               5904 drivers/media/i2c/cx25840/cx25840-core.c 	ret = media_entity_pads_init(&sd->entity, ARRAY_SIZE(state->pads),
sd               6008 drivers/media/i2c/cx25840/cx25840-core.c 	sd->ctrl_handler = &state->hdl;
sd               6025 drivers/media/i2c/cx25840/cx25840-core.c 	cx25840_ir_probe(sd);
sd               6031 drivers/media/i2c/cx25840/cx25840-core.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               6032 drivers/media/i2c/cx25840/cx25840-core.c 	struct cx25840_state *state = to_state(sd);
sd               6034 drivers/media/i2c/cx25840/cx25840-core.c 	cx25840_ir_remove(sd);
sd               6035 drivers/media/i2c/cx25840/cx25840-core.c 	v4l2_device_unregister_subdev(sd);
sd                 73 drivers/media/i2c/cx25840/cx25840-core.h 	struct v4l2_subdev sd;
sd                102 drivers/media/i2c/cx25840/cx25840-core.h static inline struct cx25840_state *to_state(struct v4l2_subdev *sd)
sd                104 drivers/media/i2c/cx25840/cx25840-core.h 	return container_of(sd, struct cx25840_state, sd);
sd                109 drivers/media/i2c/cx25840/cx25840-core.h 	return &container_of(ctrl->handler, struct cx25840_state, hdl)->sd;
sd                172 drivers/media/i2c/cx25840/cx25840-core.h int cx25840_s_clock_freq(struct v4l2_subdev *sd, u32 freq);
sd                178 drivers/media/i2c/cx25840/cx25840-core.h int cx25840_s_raw_fmt(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt);
sd                179 drivers/media/i2c/cx25840/cx25840-core.h int cx25840_s_sliced_fmt(struct v4l2_subdev *sd,
sd                181 drivers/media/i2c/cx25840/cx25840-core.h int cx25840_g_sliced_fmt(struct v4l2_subdev *sd,
sd                183 drivers/media/i2c/cx25840/cx25840-core.h int cx25840_decode_vbi_line(struct v4l2_subdev *sd,
sd                189 drivers/media/i2c/cx25840/cx25840-core.h int cx25840_ir_log_status(struct v4l2_subdev *sd);
sd                190 drivers/media/i2c/cx25840/cx25840-core.h int cx25840_ir_irq_handler(struct v4l2_subdev *sd, u32 status, bool *handled);
sd                191 drivers/media/i2c/cx25840/cx25840-core.h int cx25840_ir_probe(struct v4l2_subdev *sd);
sd                192 drivers/media/i2c/cx25840/cx25840-core.h int cx25840_ir_remove(struct v4l2_subdev *sd);
sd                114 drivers/media/i2c/cx25840/cx25840-ir.c static inline struct cx25840_ir_state *to_ir_state(struct v4l2_subdev *sd)
sd                116 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_state *state = to_state(sd);
sd                484 drivers/media/i2c/cx25840/cx25840-ir.c static inline void irqenable_rx(struct v4l2_subdev *sd, u32 mask)
sd                486 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_state *state = to_state(sd);
sd                495 drivers/media/i2c/cx25840/cx25840-ir.c static inline void irqenable_tx(struct v4l2_subdev *sd, u32 mask)
sd                497 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_state *state = to_state(sd);
sd                508 drivers/media/i2c/cx25840/cx25840-ir.c int cx25840_ir_irq_handler(struct v4l2_subdev *sd, u32 status, bool *handled)
sd                510 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_state *state = to_state(sd);
sd                511 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_ir_state *ir_state = to_ir_state(sd);
sd                547 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_dbg(2, ir_debug, sd, "IR IRQ Status:  %s %s %s %s %s %s\n",
sd                553 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_dbg(2, ir_debug, sd, "IR IRQ Enables: %s %s %s %s\n",
sd                572 drivers/media/i2c/cx25840/cx25840-ir.c 		irqenable_tx(sd, 0);
sd                574 drivers/media/i2c/cx25840/cx25840-ir.c 		v4l2_subdev_notify(sd, V4L2_SUBDEV_IR_TX_NOTIFY, &events);
sd                612 drivers/media/i2c/cx25840/cx25840-ir.c 		v4l2_err(sd, "IR receiver software FIFO overrun\n");
sd                621 drivers/media/i2c/cx25840/cx25840-ir.c 		v4l2_err(sd, "IR receiver hardware FIFO overrun\n");
sd                643 drivers/media/i2c/cx25840/cx25840-ir.c 		v4l2_subdev_notify(sd, V4L2_SUBDEV_IR_RX_NOTIFY, &events);
sd                648 drivers/media/i2c/cx25840/cx25840-ir.c static int cx25840_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count,
sd                651 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_ir_state *ir_state = to_ir_state(sd);
sd                698 drivers/media/i2c/cx25840/cx25840-ir.c 		v4l2_dbg(2, ir_debug, sd, "rx read: %10u ns  %s  %s\n",
sd                701 drivers/media/i2c/cx25840/cx25840-ir.c 			v4l2_dbg(2, ir_debug, sd, "rx read: end of rx\n");
sd                706 drivers/media/i2c/cx25840/cx25840-ir.c static int cx25840_ir_rx_g_parameters(struct v4l2_subdev *sd,
sd                709 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_ir_state *ir_state = to_ir_state(sd);
sd                721 drivers/media/i2c/cx25840/cx25840-ir.c static int cx25840_ir_rx_shutdown(struct v4l2_subdev *sd)
sd                723 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_ir_state *ir_state = to_ir_state(sd);
sd                733 drivers/media/i2c/cx25840/cx25840-ir.c 	irqenable_rx(sd, 0);
sd                746 drivers/media/i2c/cx25840/cx25840-ir.c static int cx25840_ir_rx_s_parameters(struct v4l2_subdev *sd,
sd                749 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_ir_state *ir_state = to_ir_state(sd);
sd                758 drivers/media/i2c/cx25840/cx25840-ir.c 		return cx25840_ir_rx_shutdown(sd);
sd                777 drivers/media/i2c/cx25840/cx25840-ir.c 	irqenable_rx(sd, 0);
sd                832 drivers/media/i2c/cx25840/cx25840-ir.c 			irqenable_rx(sd, IRQEN_RSE | IRQEN_RTE | IRQEN_ROE);
sd                841 drivers/media/i2c/cx25840/cx25840-ir.c static int cx25840_ir_tx_write(struct v4l2_subdev *sd, u8 *buf, size_t count,
sd                844 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_ir_state *ir_state = to_ir_state(sd);
sd                890 drivers/media/i2c/cx25840/cx25840-ir.c 	irqenable_tx(sd, IRQEN_TSE);
sd                896 drivers/media/i2c/cx25840/cx25840-ir.c static int cx25840_ir_tx_g_parameters(struct v4l2_subdev *sd,
sd                899 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_ir_state *ir_state = to_ir_state(sd);
sd                911 drivers/media/i2c/cx25840/cx25840-ir.c static int cx25840_ir_tx_shutdown(struct v4l2_subdev *sd)
sd                913 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_ir_state *ir_state = to_ir_state(sd);
sd                923 drivers/media/i2c/cx25840/cx25840-ir.c 	irqenable_tx(sd, 0);
sd                934 drivers/media/i2c/cx25840/cx25840-ir.c static int cx25840_ir_tx_s_parameters(struct v4l2_subdev *sd,
sd                937 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_ir_state *ir_state = to_ir_state(sd);
sd                946 drivers/media/i2c/cx25840/cx25840-ir.c 		return cx25840_ir_tx_shutdown(sd);
sd                964 drivers/media/i2c/cx25840/cx25840-ir.c 	irqenable_tx(sd, 0);
sd               1010 drivers/media/i2c/cx25840/cx25840-ir.c 			irqenable_tx(sd, IRQEN_TSE);
sd               1022 drivers/media/i2c/cx25840/cx25840-ir.c int cx25840_ir_log_status(struct v4l2_subdev *sd)
sd               1024 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_state *state = to_state(sd);
sd               1044 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "IR Receiver:\n");
sd               1045 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tEnabled:                           %s\n",
sd               1047 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tDemodulation from a carrier:       %s\n",
sd               1049 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tFIFO:                              %s\n",
sd               1068 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tPulse timers' start/stop trigger:  %s\n", s);
sd               1069 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tFIFO data on pulse timer overflow: %s\n",
sd               1071 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tFIFO interrupt watermark:          %s\n",
sd               1073 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tLoopback mode:                     %s\n",
sd               1076 drivers/media/i2c/cx25840/cx25840-ir.c 		v4l2_info(sd, "\tExpected carrier (16 clocks):      %u Hz\n",
sd               1100 drivers/media/i2c/cx25840/cx25840-ir.c 		v4l2_info(sd, "\tNext carrier edge window:	    16 clocks -%1d/+%1d, %u to %u Hz\n",
sd               1105 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tMax measurable pulse width:        %u us, %llu ns\n",
sd               1108 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tLow pass filter:                   %s\n",
sd               1111 drivers/media/i2c/cx25840/cx25840-ir.c 		v4l2_info(sd, "\tMin acceptable pulse width (LPF):  %u us, %u ns\n",
sd               1114 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tPulse width timer timed-out:       %s\n",
sd               1116 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tPulse width timer time-out intr:   %s\n",
sd               1118 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tFIFO overrun:                      %s\n",
sd               1120 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tFIFO overrun interrupt:            %s\n",
sd               1122 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tBusy:                              %s\n",
sd               1124 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tFIFO service requested:            %s\n",
sd               1126 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tFIFO service request interrupt:    %s\n",
sd               1129 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "IR Transmitter:\n");
sd               1130 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tEnabled:                           %s\n",
sd               1132 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tModulation onto a carrier:         %s\n",
sd               1134 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tFIFO:                              %s\n",
sd               1136 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tFIFO interrupt watermark:          %s\n",
sd               1138 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tCarrier polarity:                  %s\n",
sd               1142 drivers/media/i2c/cx25840/cx25840-ir.c 		v4l2_info(sd, "\tCarrier (16 clocks):               %u Hz\n",
sd               1144 drivers/media/i2c/cx25840/cx25840-ir.c 		v4l2_info(sd, "\tCarrier duty cycle:                %2u/16\n",
sd               1147 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tMax pulse width:                   %u us, %llu ns\n",
sd               1150 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tBusy:                              %s\n",
sd               1152 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tFIFO service requested:            %s\n",
sd               1154 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_info(sd, "\tFIFO service request interrupt:    %s\n",
sd               1206 drivers/media/i2c/cx25840/cx25840-ir.c int cx25840_ir_probe(struct v4l2_subdev *sd)
sd               1208 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_state *state = to_state(sd);
sd               1236 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_subdev_call(sd, ir, rx_s_parameters, &default_params);
sd               1240 drivers/media/i2c/cx25840/cx25840-ir.c 	v4l2_subdev_call(sd, ir, tx_s_parameters, &default_params);
sd               1245 drivers/media/i2c/cx25840/cx25840-ir.c int cx25840_ir_remove(struct v4l2_subdev *sd)
sd               1247 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_state *state = to_state(sd);
sd               1248 drivers/media/i2c/cx25840/cx25840-ir.c 	struct cx25840_ir_state *ir_state = to_ir_state(sd);
sd               1253 drivers/media/i2c/cx25840/cx25840-ir.c 	cx25840_ir_rx_shutdown(sd);
sd               1254 drivers/media/i2c/cx25840/cx25840-ir.c 	cx25840_ir_tx_shutdown(sd);
sd                 72 drivers/media/i2c/cx25840/cx25840-vbi.c int cx25840_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *svbi)
sd                 74 drivers/media/i2c/cx25840/cx25840-vbi.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 75 drivers/media/i2c/cx25840/cx25840-vbi.c 	struct cx25840_state *state = to_state(sd);
sd                117 drivers/media/i2c/cx25840/cx25840-vbi.c int cx25840_s_raw_fmt(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt)
sd                119 drivers/media/i2c/cx25840/cx25840-vbi.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                120 drivers/media/i2c/cx25840/cx25840-vbi.c 	struct cx25840_state *state = to_state(sd);
sd                137 drivers/media/i2c/cx25840/cx25840-vbi.c int cx25840_s_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *svbi)
sd                139 drivers/media/i2c/cx25840/cx25840-vbi.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                140 drivers/media/i2c/cx25840/cx25840-vbi.c 	struct cx25840_state *state = to_state(sd);
sd                216 drivers/media/i2c/cx25840/cx25840-vbi.c int cx25840_decode_vbi_line(struct v4l2_subdev *sd, struct v4l2_decode_vbi_line *vbi)
sd                218 drivers/media/i2c/cx25840/cx25840-vbi.c 	struct cx25840_state *state = to_state(sd);
sd                 36 drivers/media/i2c/dw9714.c 	struct v4l2_subdev sd;
sd                 47 drivers/media/i2c/dw9714.c 	return container_of(subdev, struct dw9714_device, sd);
sd                 65 drivers/media/i2c/dw9714.c 	struct i2c_client *client = v4l2_get_subdevdata(&dw9714_dev->sd);
sd                 86 drivers/media/i2c/dw9714.c static int dw9714_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                 90 drivers/media/i2c/dw9714.c 	rval = pm_runtime_get_sync(sd->dev);
sd                 92 drivers/media/i2c/dw9714.c 		pm_runtime_put_noidle(sd->dev);
sd                 99 drivers/media/i2c/dw9714.c static int dw9714_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                101 drivers/media/i2c/dw9714.c 	pm_runtime_put(sd->dev);
sd                115 drivers/media/i2c/dw9714.c 	v4l2_async_unregister_subdev(&dw9714_dev->sd);
sd                117 drivers/media/i2c/dw9714.c 	media_entity_cleanup(&dw9714_dev->sd.entity);
sd                131 drivers/media/i2c/dw9714.c 		dev_err(dev_vcm->sd.dev, "%s fail error: 0x%x\n",
sd                133 drivers/media/i2c/dw9714.c 	dev_vcm->sd.ctrl_handler = hdl;
sd                147 drivers/media/i2c/dw9714.c 	v4l2_i2c_subdev_init(&dw9714_dev->sd, client, &dw9714_ops);
sd                148 drivers/media/i2c/dw9714.c 	dw9714_dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                149 drivers/media/i2c/dw9714.c 	dw9714_dev->sd.internal_ops = &dw9714_int_ops;
sd                155 drivers/media/i2c/dw9714.c 	rval = media_entity_pads_init(&dw9714_dev->sd.entity, 0, NULL);
sd                159 drivers/media/i2c/dw9714.c 	dw9714_dev->sd.entity.function = MEDIA_ENT_F_LENS;
sd                161 drivers/media/i2c/dw9714.c 	rval = v4l2_async_register_subdev(&dw9714_dev->sd);
sd                173 drivers/media/i2c/dw9714.c 	media_entity_cleanup(&dw9714_dev->sd.entity);
sd                180 drivers/media/i2c/dw9714.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                181 drivers/media/i2c/dw9714.c 	struct dw9714_device *dw9714_dev = sd_to_dw9714_vcm(sd);
sd                197 drivers/media/i2c/dw9714.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                198 drivers/media/i2c/dw9714.c 	struct dw9714_device *dw9714_dev = sd_to_dw9714_vcm(sd);
sd                221 drivers/media/i2c/dw9714.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                222 drivers/media/i2c/dw9714.c 	struct dw9714_device *dw9714_dev = sd_to_dw9714_vcm(sd);
sd                 43 drivers/media/i2c/dw9807-vcm.c 	struct v4l2_subdev sd;
sd                 50 drivers/media/i2c/dw9807-vcm.c 	return container_of(subdev, struct dw9807_device, sd);
sd                118 drivers/media/i2c/dw9807-vcm.c 		struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd);
sd                131 drivers/media/i2c/dw9807-vcm.c static int dw9807_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                135 drivers/media/i2c/dw9807-vcm.c 	rval = pm_runtime_get_sync(sd->dev);
sd                137 drivers/media/i2c/dw9807-vcm.c 		pm_runtime_put_noidle(sd->dev);
sd                144 drivers/media/i2c/dw9807-vcm.c static int dw9807_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                146 drivers/media/i2c/dw9807-vcm.c 	pm_runtime_put(sd->dev);
sd                160 drivers/media/i2c/dw9807-vcm.c 	v4l2_async_unregister_subdev(&dw9807_dev->sd);
sd                162 drivers/media/i2c/dw9807-vcm.c 	media_entity_cleanup(&dw9807_dev->sd.entity);
sd                169 drivers/media/i2c/dw9807-vcm.c 	struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd);
sd                176 drivers/media/i2c/dw9807-vcm.c 	dev_vcm->sd.ctrl_handler = hdl;
sd                196 drivers/media/i2c/dw9807-vcm.c 	v4l2_i2c_subdev_init(&dw9807_dev->sd, client, &dw9807_ops);
sd                197 drivers/media/i2c/dw9807-vcm.c 	dw9807_dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                198 drivers/media/i2c/dw9807-vcm.c 	dw9807_dev->sd.internal_ops = &dw9807_int_ops;
sd                204 drivers/media/i2c/dw9807-vcm.c 	rval = media_entity_pads_init(&dw9807_dev->sd.entity, 0, NULL);
sd                208 drivers/media/i2c/dw9807-vcm.c 	dw9807_dev->sd.entity.function = MEDIA_ENT_F_LENS;
sd                210 drivers/media/i2c/dw9807-vcm.c 	rval = v4l2_async_register_subdev(&dw9807_dev->sd);
sd                222 drivers/media/i2c/dw9807-vcm.c 	media_entity_cleanup(&dw9807_dev->sd.entity);
sd                229 drivers/media/i2c/dw9807-vcm.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                230 drivers/media/i2c/dw9807-vcm.c 	struct dw9807_device *dw9807_dev = sd_to_dw9807_vcm(sd);
sd                247 drivers/media/i2c/dw9807-vcm.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                248 drivers/media/i2c/dw9807-vcm.c 	struct dw9807_device *dw9807_dev = sd_to_dw9807_vcm(sd);
sd                279 drivers/media/i2c/dw9807-vcm.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                280 drivers/media/i2c/dw9807-vcm.c 	struct dw9807_device *dw9807_dev = sd_to_dw9807_vcm(sd);
sd                 62 drivers/media/i2c/et8ek8/et8ek8_driver.c #define to_et8ek8_sensor(sd)	container_of(sd, struct et8ek8_sensor, subdev)
sd               1323 drivers/media/i2c/et8ek8/et8ek8_driver.c static int et8ek8_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1325 drivers/media/i2c/et8ek8/et8ek8_driver.c 	struct et8ek8_sensor *sensor = to_et8ek8_sensor(sd);
sd               1334 drivers/media/i2c/et8ek8/et8ek8_driver.c 	return et8ek8_set_power(sd, true);
sd               1337 drivers/media/i2c/et8ek8/et8ek8_driver.c static int et8ek8_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1339 drivers/media/i2c/et8ek8/et8ek8_driver.c 	return et8ek8_set_power(sd, false);
sd                 41 drivers/media/i2c/imx214.c 	struct v4l2_subdev sd;
sd                426 drivers/media/i2c/imx214.c static inline struct imx214 *to_imx214(struct v4l2_subdev *sd)
sd                428 drivers/media/i2c/imx214.c 	return container_of(sd, struct imx214, sd);
sd                434 drivers/media/i2c/imx214.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                435 drivers/media/i2c/imx214.c 	struct imx214 *imx214 = to_imx214(sd);
sd                462 drivers/media/i2c/imx214.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                463 drivers/media/i2c/imx214.c 	struct imx214 *imx214 = to_imx214(sd);
sd                475 drivers/media/i2c/imx214.c static int imx214_enum_mbus_code(struct v4l2_subdev *sd,
sd                507 drivers/media/i2c/imx214.c 	struct imx214 *imx214 = container_of(subdev, struct imx214, sd);
sd                515 drivers/media/i2c/imx214.c 	struct imx214 *imx214 = container_of(subdev, struct imx214, sd);
sd                542 drivers/media/i2c/imx214.c 		return v4l2_subdev_get_try_format(&imx214->sd, cfg, pad);
sd                550 drivers/media/i2c/imx214.c static int imx214_get_format(struct v4l2_subdev *sd,
sd                554 drivers/media/i2c/imx214.c 	struct imx214 *imx214 = to_imx214(sd);
sd                570 drivers/media/i2c/imx214.c 		return v4l2_subdev_get_try_crop(&imx214->sd, cfg, pad);
sd                578 drivers/media/i2c/imx214.c static int imx214_set_format(struct v4l2_subdev *sd,
sd                582 drivers/media/i2c/imx214.c 	struct imx214 *imx214 = to_imx214(sd);
sd                618 drivers/media/i2c/imx214.c static int imx214_get_selection(struct v4l2_subdev *sd,
sd                622 drivers/media/i2c/imx214.c 	struct imx214 *imx214 = to_imx214(sd);
sd                914 drivers/media/i2c/imx214.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                915 drivers/media/i2c/imx214.c 	struct imx214 *imx214 = to_imx214(sd);
sd                926 drivers/media/i2c/imx214.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                927 drivers/media/i2c/imx214.c 	struct imx214 *imx214 = to_imx214(sd);
sd                993 drivers/media/i2c/imx214.c 	v4l2_i2c_subdev_init(&imx214->sd, client, &imx214_subdev_ops);
sd               1039 drivers/media/i2c/imx214.c 	imx214->sd.ctrl_handler = &imx214->ctrls;
sd               1043 drivers/media/i2c/imx214.c 	imx214->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1045 drivers/media/i2c/imx214.c 	imx214->sd.dev = &client->dev;
sd               1046 drivers/media/i2c/imx214.c 	imx214->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1048 drivers/media/i2c/imx214.c 	ret = media_entity_pads_init(&imx214->sd.entity, 1, &imx214->pad);
sd               1054 drivers/media/i2c/imx214.c 	imx214_entity_init_cfg(&imx214->sd, NULL);
sd               1056 drivers/media/i2c/imx214.c 	ret = v4l2_async_register_subdev_sensor_common(&imx214->sd);
sd               1065 drivers/media/i2c/imx214.c 	media_entity_cleanup(&imx214->sd.entity);
sd               1076 drivers/media/i2c/imx214.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1077 drivers/media/i2c/imx214.c 	struct imx214 *imx214 = to_imx214(sd);
sd               1079 drivers/media/i2c/imx214.c 	v4l2_async_unregister_subdev(&imx214->sd);
sd               1080 drivers/media/i2c/imx214.c 	media_entity_cleanup(&imx214->sd.entity);
sd                591 drivers/media/i2c/imx258.c 	struct v4l2_subdev sd;
sd                617 drivers/media/i2c/imx258.c 	return container_of(_sd, struct imx258, sd);
sd                623 drivers/media/i2c/imx258.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx258->sd);
sd                656 drivers/media/i2c/imx258.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx258->sd);
sd                674 drivers/media/i2c/imx258.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx258->sd);
sd                695 drivers/media/i2c/imx258.c static int imx258_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                698 drivers/media/i2c/imx258.c 		v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd                740 drivers/media/i2c/imx258.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx258->sd);
sd                791 drivers/media/i2c/imx258.c static int imx258_enum_mbus_code(struct v4l2_subdev *sd,
sd                804 drivers/media/i2c/imx258.c static int imx258_enum_frame_size(struct v4l2_subdev *sd,
sd                836 drivers/media/i2c/imx258.c 		fmt->format = *v4l2_subdev_get_try_format(&imx258->sd, cfg,
sd                844 drivers/media/i2c/imx258.c static int imx258_get_pad_format(struct v4l2_subdev *sd,
sd                848 drivers/media/i2c/imx258.c 	struct imx258 *imx258 = to_imx258(sd);
sd                858 drivers/media/i2c/imx258.c static int imx258_set_pad_format(struct v4l2_subdev *sd,
sd                862 drivers/media/i2c/imx258.c 	struct imx258 *imx258 = to_imx258(sd);
sd                881 drivers/media/i2c/imx258.c 		framefmt = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd                915 drivers/media/i2c/imx258.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx258->sd);
sd                946 drivers/media/i2c/imx258.c 	ret =  __v4l2_ctrl_handler_setup(imx258->sd.ctrl_handler);
sd                959 drivers/media/i2c/imx258.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx258->sd);
sd                975 drivers/media/i2c/imx258.c static int imx258_set_stream(struct v4l2_subdev *sd, int enable)
sd                977 drivers/media/i2c/imx258.c 	struct imx258 *imx258 = to_imx258(sd);
sd                978 drivers/media/i2c/imx258.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1022 drivers/media/i2c/imx258.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1023 drivers/media/i2c/imx258.c 	struct imx258 *imx258 = to_imx258(sd);
sd               1034 drivers/media/i2c/imx258.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1035 drivers/media/i2c/imx258.c 	struct imx258 *imx258 = to_imx258(sd);
sd               1055 drivers/media/i2c/imx258.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx258->sd);
sd               1099 drivers/media/i2c/imx258.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx258->sd);
sd               1181 drivers/media/i2c/imx258.c 	imx258->sd.ctrl_handler = ctrl_hdlr;
sd               1194 drivers/media/i2c/imx258.c 	v4l2_ctrl_handler_free(imx258->sd.ctrl_handler);
sd               1221 drivers/media/i2c/imx258.c 	v4l2_i2c_subdev_init(&imx258->sd, client, &imx258_subdev_ops);
sd               1236 drivers/media/i2c/imx258.c 	imx258->sd.internal_ops = &imx258_internal_ops;
sd               1237 drivers/media/i2c/imx258.c 	imx258->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1238 drivers/media/i2c/imx258.c 	imx258->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1243 drivers/media/i2c/imx258.c 	ret = media_entity_pads_init(&imx258->sd.entity, 1, &imx258->pad);
sd               1247 drivers/media/i2c/imx258.c 	ret = v4l2_async_register_subdev_sensor_common(&imx258->sd);
sd               1258 drivers/media/i2c/imx258.c 	media_entity_cleanup(&imx258->sd.entity);
sd               1268 drivers/media/i2c/imx258.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1269 drivers/media/i2c/imx258.c 	struct imx258 *imx258 = to_imx258(sd);
sd               1271 drivers/media/i2c/imx258.c 	v4l2_async_unregister_subdev(sd);
sd               1272 drivers/media/i2c/imx258.c 	media_entity_cleanup(&sd->entity);
sd                508 drivers/media/i2c/imx274.c 	struct v4l2_subdev sd;
sd                549 drivers/media/i2c/imx274.c 			     struct stimx274, ctrls.handler)->sd;
sd                552 drivers/media/i2c/imx274.c static inline struct stimx274 *to_imx274(struct v4l2_subdev *sd)
sd                554 drivers/media/i2c/imx274.c 	return container_of(sd, struct stimx274, sd);
sd                780 drivers/media/i2c/imx274.c 	struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
sd                781 drivers/media/i2c/imx274.c 	struct stimx274 *imx274 = to_imx274(sd);
sd                935 drivers/media/i2c/imx274.c static int imx274_get_fmt(struct v4l2_subdev *sd,
sd                939 drivers/media/i2c/imx274.c 	struct stimx274 *imx274 = to_imx274(sd);
sd                957 drivers/media/i2c/imx274.c static int imx274_set_fmt(struct v4l2_subdev *sd,
sd                962 drivers/media/i2c/imx274.c 	struct stimx274 *imx274 = to_imx274(sd);
sd                990 drivers/media/i2c/imx274.c static int imx274_get_selection(struct v4l2_subdev *sd,
sd                994 drivers/media/i2c/imx274.c 	struct stimx274 *imx274 = to_imx274(sd);
sd               1106 drivers/media/i2c/imx274.c static int imx274_set_selection(struct v4l2_subdev *sd,
sd               1110 drivers/media/i2c/imx274.c 	struct stimx274 *imx274 = to_imx274(sd);
sd               1204 drivers/media/i2c/imx274.c static int imx274_g_frame_interval(struct v4l2_subdev *sd,
sd               1207 drivers/media/i2c/imx274.c 	struct stimx274 *imx274 = to_imx274(sd);
sd               1226 drivers/media/i2c/imx274.c static int imx274_s_frame_interval(struct v4l2_subdev *sd,
sd               1229 drivers/media/i2c/imx274.c 	struct stimx274 *imx274 = to_imx274(sd);
sd               1318 drivers/media/i2c/imx274.c static int imx274_s_stream(struct v4l2_subdev *sd, int on)
sd               1320 drivers/media/i2c/imx274.c 	struct stimx274 *imx274 = to_imx274(sd);
sd               1826 drivers/media/i2c/imx274.c 	struct v4l2_subdev *sd;
sd               1860 drivers/media/i2c/imx274.c 	sd = &imx274->sd;
sd               1861 drivers/media/i2c/imx274.c 	v4l2_i2c_subdev_init(sd, client, &imx274_subdev_ops);
sd               1862 drivers/media/i2c/imx274.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
sd               1866 drivers/media/i2c/imx274.c 	sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1867 drivers/media/i2c/imx274.c 	ret = media_entity_pads_init(&sd->entity, 1, &imx274->pad);
sd               1922 drivers/media/i2c/imx274.c 	imx274->sd.ctrl_handler = &imx274->ctrls.handler;
sd               1946 drivers/media/i2c/imx274.c 	ret = v4l2_async_register_subdev(sd);
sd               1960 drivers/media/i2c/imx274.c 	media_entity_cleanup(&sd->entity);
sd               1968 drivers/media/i2c/imx274.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1969 drivers/media/i2c/imx274.c 	struct stimx274 *imx274 = to_imx274(sd);
sd               1974 drivers/media/i2c/imx274.c 	v4l2_async_unregister_subdev(sd);
sd               1976 drivers/media/i2c/imx274.c 	media_entity_cleanup(&sd->entity);
sd                115 drivers/media/i2c/imx319.c 	struct v4l2_subdev sd;
sd               1764 drivers/media/i2c/imx319.c 	return container_of(_sd, struct imx319, sd);
sd               1789 drivers/media/i2c/imx319.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx319->sd);
sd               1823 drivers/media/i2c/imx319.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx319->sd);
sd               1841 drivers/media/i2c/imx319.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx319->sd);
sd               1859 drivers/media/i2c/imx319.c static int imx319_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1861 drivers/media/i2c/imx319.c 	struct imx319 *imx319 = to_imx319(sd);
sd               1863 drivers/media/i2c/imx319.c 		v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd               1882 drivers/media/i2c/imx319.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx319->sd);
sd               1949 drivers/media/i2c/imx319.c static int imx319_enum_mbus_code(struct v4l2_subdev *sd,
sd               1953 drivers/media/i2c/imx319.c 	struct imx319 *imx319 = to_imx319(sd);
sd               1965 drivers/media/i2c/imx319.c static int imx319_enum_frame_size(struct v4l2_subdev *sd,
sd               1969 drivers/media/i2c/imx319.c 	struct imx319 *imx319 = to_imx319(sd);
sd               2004 drivers/media/i2c/imx319.c 	struct v4l2_subdev *sd = &imx319->sd;
sd               2007 drivers/media/i2c/imx319.c 		framefmt = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               2016 drivers/media/i2c/imx319.c static int imx319_get_pad_format(struct v4l2_subdev *sd,
sd               2020 drivers/media/i2c/imx319.c 	struct imx319 *imx319 = to_imx319(sd);
sd               2031 drivers/media/i2c/imx319.c imx319_set_pad_format(struct v4l2_subdev *sd,
sd               2035 drivers/media/i2c/imx319.c 	struct imx319 *imx319 = to_imx319(sd);
sd               2058 drivers/media/i2c/imx319.c 		framefmt = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               2090 drivers/media/i2c/imx319.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx319->sd);
sd               2116 drivers/media/i2c/imx319.c 	ret =  __v4l2_ctrl_handler_setup(imx319->sd.ctrl_handler);
sd               2131 drivers/media/i2c/imx319.c static int imx319_set_stream(struct v4l2_subdev *sd, int enable)
sd               2133 drivers/media/i2c/imx319.c 	struct imx319 *imx319 = to_imx319(sd);
sd               2134 drivers/media/i2c/imx319.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2183 drivers/media/i2c/imx319.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               2184 drivers/media/i2c/imx319.c 	struct imx319 *imx319 = to_imx319(sd);
sd               2195 drivers/media/i2c/imx319.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               2196 drivers/media/i2c/imx319.c 	struct imx319 *imx319 = to_imx319(sd);
sd               2216 drivers/media/i2c/imx319.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx319->sd);
sd               2266 drivers/media/i2c/imx319.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx319->sd);
sd               2346 drivers/media/i2c/imx319.c 	imx319->sd.ctrl_handler = ctrl_hdlr;
sd               2437 drivers/media/i2c/imx319.c 	v4l2_i2c_subdev_init(&imx319->sd, client, &imx319_subdev_ops);
sd               2477 drivers/media/i2c/imx319.c 	imx319->sd.internal_ops = &imx319_internal_ops;
sd               2478 drivers/media/i2c/imx319.c 	imx319->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
sd               2480 drivers/media/i2c/imx319.c 	imx319->sd.entity.ops = &imx319_subdev_entity_ops;
sd               2481 drivers/media/i2c/imx319.c 	imx319->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               2485 drivers/media/i2c/imx319.c 	ret = media_entity_pads_init(&imx319->sd.entity, 1, &imx319->pad);
sd               2491 drivers/media/i2c/imx319.c 	ret = v4l2_async_register_subdev_sensor_common(&imx319->sd);
sd               2506 drivers/media/i2c/imx319.c 	media_entity_cleanup(&imx319->sd.entity);
sd               2509 drivers/media/i2c/imx319.c 	v4l2_ctrl_handler_free(imx319->sd.ctrl_handler);
sd               2519 drivers/media/i2c/imx319.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               2520 drivers/media/i2c/imx319.c 	struct imx319 *imx319 = to_imx319(sd);
sd               2522 drivers/media/i2c/imx319.c 	v4l2_async_unregister_subdev(sd);
sd               2523 drivers/media/i2c/imx319.c 	media_entity_cleanup(&sd->entity);
sd               2524 drivers/media/i2c/imx319.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                101 drivers/media/i2c/imx355.c 	struct v4l2_subdev sd;
sd               1064 drivers/media/i2c/imx355.c 	return container_of(_sd, struct imx355, sd);
sd               1089 drivers/media/i2c/imx355.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx355->sd);
sd               1123 drivers/media/i2c/imx355.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx355->sd);
sd               1141 drivers/media/i2c/imx355.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx355->sd);
sd               1160 drivers/media/i2c/imx355.c static int imx355_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1162 drivers/media/i2c/imx355.c 	struct imx355 *imx355 = to_imx355(sd);
sd               1164 drivers/media/i2c/imx355.c 		v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd               1183 drivers/media/i2c/imx355.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx355->sd);
sd               1250 drivers/media/i2c/imx355.c static int imx355_enum_mbus_code(struct v4l2_subdev *sd,
sd               1254 drivers/media/i2c/imx355.c 	struct imx355 *imx355 = to_imx355(sd);
sd               1266 drivers/media/i2c/imx355.c static int imx355_enum_frame_size(struct v4l2_subdev *sd,
sd               1270 drivers/media/i2c/imx355.c 	struct imx355 *imx355 = to_imx355(sd);
sd               1305 drivers/media/i2c/imx355.c 	struct v4l2_subdev *sd = &imx355->sd;
sd               1308 drivers/media/i2c/imx355.c 		framefmt = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1317 drivers/media/i2c/imx355.c static int imx355_get_pad_format(struct v4l2_subdev *sd,
sd               1321 drivers/media/i2c/imx355.c 	struct imx355 *imx355 = to_imx355(sd);
sd               1332 drivers/media/i2c/imx355.c imx355_set_pad_format(struct v4l2_subdev *sd,
sd               1336 drivers/media/i2c/imx355.c 	struct imx355 *imx355 = to_imx355(sd);
sd               1359 drivers/media/i2c/imx355.c 		framefmt = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1391 drivers/media/i2c/imx355.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx355->sd);
sd               1417 drivers/media/i2c/imx355.c 	ret =  __v4l2_ctrl_handler_setup(imx355->sd.ctrl_handler);
sd               1432 drivers/media/i2c/imx355.c static int imx355_set_stream(struct v4l2_subdev *sd, int enable)
sd               1434 drivers/media/i2c/imx355.c 	struct imx355 *imx355 = to_imx355(sd);
sd               1435 drivers/media/i2c/imx355.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1484 drivers/media/i2c/imx355.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1485 drivers/media/i2c/imx355.c 	struct imx355 *imx355 = to_imx355(sd);
sd               1496 drivers/media/i2c/imx355.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1497 drivers/media/i2c/imx355.c 	struct imx355 *imx355 = to_imx355(sd);
sd               1517 drivers/media/i2c/imx355.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx355->sd);
sd               1566 drivers/media/i2c/imx355.c 	struct i2c_client *client = v4l2_get_subdevdata(&imx355->sd);
sd               1646 drivers/media/i2c/imx355.c 	imx355->sd.ctrl_handler = ctrl_hdlr;
sd               1737 drivers/media/i2c/imx355.c 	v4l2_i2c_subdev_init(&imx355->sd, client, &imx355_subdev_ops);
sd               1777 drivers/media/i2c/imx355.c 	imx355->sd.internal_ops = &imx355_internal_ops;
sd               1778 drivers/media/i2c/imx355.c 	imx355->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
sd               1780 drivers/media/i2c/imx355.c 	imx355->sd.entity.ops = &imx355_subdev_entity_ops;
sd               1781 drivers/media/i2c/imx355.c 	imx355->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1785 drivers/media/i2c/imx355.c 	ret = media_entity_pads_init(&imx355->sd.entity, 1, &imx355->pad);
sd               1791 drivers/media/i2c/imx355.c 	ret = v4l2_async_register_subdev_sensor_common(&imx355->sd);
sd               1806 drivers/media/i2c/imx355.c 	media_entity_cleanup(&imx355->sd.entity);
sd               1809 drivers/media/i2c/imx355.c 	v4l2_ctrl_handler_free(imx355->sd.ctrl_handler);
sd               1819 drivers/media/i2c/imx355.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1820 drivers/media/i2c/imx355.c 	struct imx355 *imx355 = to_imx355(sd);
sd               1822 drivers/media/i2c/imx355.c 	v4l2_async_unregister_subdev(sd);
sd               1823 drivers/media/i2c/imx355.c 	media_entity_cleanup(&sd->entity);
sd               1824 drivers/media/i2c/imx355.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                187 drivers/media/i2c/ks0127.c 	struct v4l2_subdev sd;
sd                192 drivers/media/i2c/ks0127.c static inline struct ks0127 *to_ks0127(struct v4l2_subdev *sd)
sd                194 drivers/media/i2c/ks0127.c 	return container_of(sd, struct ks0127, sd);
sd                302 drivers/media/i2c/ks0127.c static u8 ks0127_read(struct v4l2_subdev *sd, u8 reg)
sd                304 drivers/media/i2c/ks0127.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                323 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd, "read error\n");
sd                329 drivers/media/i2c/ks0127.c static void ks0127_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                331 drivers/media/i2c/ks0127.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                332 drivers/media/i2c/ks0127.c 	struct ks0127 *ks = to_ks0127(sd);
sd                336 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd, "write error\n");
sd                343 drivers/media/i2c/ks0127.c static void ks0127_and_or(struct v4l2_subdev *sd, u8 reg, u8 and_v, u8 or_v)
sd                345 drivers/media/i2c/ks0127.c 	struct ks0127 *ks = to_ks0127(sd);
sd                349 drivers/media/i2c/ks0127.c 	ks0127_write(sd, reg, val);
sd                357 drivers/media/i2c/ks0127.c static void ks0127_init(struct v4l2_subdev *sd)
sd                362 drivers/media/i2c/ks0127.c 	v4l2_dbg(1, debug, sd, "reset\n");
sd                369 drivers/media/i2c/ks0127.c 		ks0127_write(sd, i, table[i]);
sd                372 drivers/media/i2c/ks0127.c 		ks0127_write(sd, i, table[i]);
sd                375 drivers/media/i2c/ks0127.c 		ks0127_write(sd, i, table[i]);
sd                378 drivers/media/i2c/ks0127.c 		ks0127_write(sd, i, table[i]);
sd                381 drivers/media/i2c/ks0127.c 	if ((ks0127_read(sd, KS_STAT) & 0x80) == 0) {
sd                382 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd, "ks0122s found\n");
sd                386 drivers/media/i2c/ks0127.c 	switch (ks0127_read(sd, KS_CMDE) & 0x0f) {
sd                388 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd, "ks0127 found\n");
sd                392 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd, "ks0127B Revision A found\n");
sd                396 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd, "unknown revision\n");
sd                401 drivers/media/i2c/ks0127.c static int ks0127_s_routing(struct v4l2_subdev *sd,
sd                404 drivers/media/i2c/ks0127.c 	struct ks0127 *ks = to_ks0127(sd);
sd                413 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd,
sd                416 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CMDA,   0xfc, 0x00);
sd                418 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CMDA,   ~0x40, 0x00);
sd                420 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CMDB,   0xb0, input);
sd                422 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CMDC,   0x70, 0x0a);
sd                424 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CMDD,   0x03, 0x00);
sd                426 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CTRACK, 0xcf, 0x00);
sd                428 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_LUMA,   0x00,
sd                431 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_VERTIA, 0x08, 0x81);
sd                433 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_VERTIC, 0x0f, 0x90);
sd                436 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CHROMB, 0x0f, 0x90);
sd                438 drivers/media/i2c/ks0127.c 		ks0127_write(sd, KS_UGAIN, reg_defaults[KS_UGAIN]);
sd                439 drivers/media/i2c/ks0127.c 		ks0127_write(sd, KS_VGAIN, reg_defaults[KS_VGAIN]);
sd                440 drivers/media/i2c/ks0127.c 		ks0127_write(sd, KS_UVOFFH, reg_defaults[KS_UVOFFH]);
sd                441 drivers/media/i2c/ks0127.c 		ks0127_write(sd, KS_UVOFFL, reg_defaults[KS_UVOFFL]);
sd                447 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd,
sd                450 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CMDA,   0xfc, 0x00);
sd                452 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CMDA,   ~0x40, 0x00);
sd                454 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CMDB,   0xb0, input);
sd                456 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CMDC,   0x70, 0x0a);
sd                458 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CMDD,   0x03, 0x00);
sd                460 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CTRACK, 0xcf, 0x00);
sd                461 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_LUMA, 0x00,
sd                464 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_VERTIA, 0x08,
sd                466 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_VERTIC, 0x0f,
sd                469 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CHROMB, 0x0f,
sd                472 drivers/media/i2c/ks0127.c 		ks0127_write(sd, KS_UGAIN, reg_defaults[KS_UGAIN]);
sd                473 drivers/media/i2c/ks0127.c 		ks0127_write(sd, KS_VGAIN, reg_defaults[KS_VGAIN]);
sd                474 drivers/media/i2c/ks0127.c 		ks0127_write(sd, KS_UVOFFH, reg_defaults[KS_UVOFFH]);
sd                475 drivers/media/i2c/ks0127.c 		ks0127_write(sd, KS_UVOFFL, reg_defaults[KS_UVOFFL]);
sd                479 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd, "s_routing 15: YUV656\n");
sd                482 drivers/media/i2c/ks0127.c 			ks0127_and_or(sd, KS_CMDA,   0xfc, 0x03);
sd                485 drivers/media/i2c/ks0127.c 			ks0127_and_or(sd, KS_CMDA,   0xfc, 0x02);
sd                487 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CMDA,   0xff, 0x40); /* VSE=1 */
sd                489 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CMDB,   0xb0, (input | 0x40));
sd                492 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CMDC,   0x70, 0x87);
sd                494 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CMDD,   0x03, 0x08);
sd                496 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CTRACK, 0xcf, 0x30);
sd                498 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_LUMA,   0x00, 0x71);
sd                499 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_VERTIC, 0x0f,
sd                503 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_VERTIA, 0x08, 0x81);
sd                505 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CHROMB, 0x0f,
sd                508 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CON, 0x00, 0x00);
sd                509 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_BRT, 0x00, 32);	/* spec: 34 */
sd                511 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_SAT, 0x00, 0xe8);
sd                512 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_HUE, 0x00, 0);
sd                514 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_UGAIN, 0x00, 238);
sd                515 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_VGAIN, 0x00, 0x00);
sd                518 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_UVOFFH, 0x00, 0x4f);
sd                519 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_UVOFFL, 0x00, 0x00);
sd                523 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd,
sd                530 drivers/media/i2c/ks0127.c 	ks0127_write(sd, KS_DEMOD, reg_defaults[KS_DEMOD]);
sd                534 drivers/media/i2c/ks0127.c static int ks0127_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd                536 drivers/media/i2c/ks0127.c 	struct ks0127 *ks = to_ks0127(sd);
sd                539 drivers/media/i2c/ks0127.c 	ks0127_and_or(sd, KS_DEMOD, 0xf0, 0x00);
sd                543 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd,
sd                545 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x20);
sd                547 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd,
sd                549 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x40);
sd                551 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd,
sd                553 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x20);
sd                555 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd,
sd                557 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x40);
sd                559 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd,
sd                563 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CHROMA, 0xdf, 0x20);
sd                564 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_DEMOD, 0xf0, 0x00);
sd                568 drivers/media/i2c/ks0127.c 		if (!(ks0127_read(sd, KS_DEMOD) & 0x40))
sd                570 drivers/media/i2c/ks0127.c 			ks0127_and_or(sd, KS_DEMOD, 0xf0, 0x0f);
sd                572 drivers/media/i2c/ks0127.c 		v4l2_dbg(1, debug, sd, "s_std: Unknown norm %llx\n",
sd                578 drivers/media/i2c/ks0127.c static int ks0127_s_stream(struct v4l2_subdev *sd, int enable)
sd                580 drivers/media/i2c/ks0127.c 	v4l2_dbg(1, debug, sd, "s_stream(%d)\n", enable);
sd                583 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_OFMTA, 0xcf, 0x30);
sd                585 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CDEM, 0x7f, 0x00);
sd                588 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_OFMTA, 0xcf, 0x00);
sd                590 drivers/media/i2c/ks0127.c 		ks0127_and_or(sd, KS_CDEM, 0x7f, 0x80);
sd                595 drivers/media/i2c/ks0127.c static int ks0127_status(struct v4l2_subdev *sd, u32 *pstatus, v4l2_std_id *pstd)
sd                601 drivers/media/i2c/ks0127.c 	status = ks0127_read(sd, KS_STAT);
sd                624 drivers/media/i2c/ks0127.c static int ks0127_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
sd                626 drivers/media/i2c/ks0127.c 	v4l2_dbg(1, debug, sd, "querystd\n");
sd                627 drivers/media/i2c/ks0127.c 	return ks0127_status(sd, NULL, std);
sd                630 drivers/media/i2c/ks0127.c static int ks0127_g_input_status(struct v4l2_subdev *sd, u32 *status)
sd                632 drivers/media/i2c/ks0127.c 	v4l2_dbg(1, debug, sd, "g_input_status\n");
sd                633 drivers/media/i2c/ks0127.c 	return ks0127_status(sd, status, NULL);
sd                656 drivers/media/i2c/ks0127.c 	struct v4l2_subdev *sd;
sd                665 drivers/media/i2c/ks0127.c 	sd = &ks->sd;
sd                666 drivers/media/i2c/ks0127.c 	v4l2_i2c_subdev_init(sd, client, &ks0127_ops);
sd                670 drivers/media/i2c/ks0127.c 	ks0127_write(sd, KS_CMDA, 0x2c);
sd                674 drivers/media/i2c/ks0127.c 	ks0127_init(sd);
sd                680 drivers/media/i2c/ks0127.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                682 drivers/media/i2c/ks0127.c 	v4l2_device_unregister_subdev(sd);
sd                683 drivers/media/i2c/ks0127.c 	ks0127_write(sd, KS_OFMTA, 0x20); /* tristate */
sd                684 drivers/media/i2c/ks0127.c 	ks0127_write(sd, KS_CMDA, 0x2c | 0x80); /* power down */
sd                 26 drivers/media/i2c/m52790.c 	struct v4l2_subdev sd;
sd                 31 drivers/media/i2c/m52790.c static inline struct m52790_state *to_state(struct v4l2_subdev *sd)
sd                 33 drivers/media/i2c/m52790.c 	return container_of(sd, struct m52790_state, sd);
sd                 38 drivers/media/i2c/m52790.c static int m52790_write(struct v4l2_subdev *sd)
sd                 40 drivers/media/i2c/m52790.c 	struct m52790_state *state = to_state(sd);
sd                 41 drivers/media/i2c/m52790.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 57 drivers/media/i2c/m52790.c static int m52790_s_routing(struct v4l2_subdev *sd,
sd                 60 drivers/media/i2c/m52790.c 	struct m52790_state *state = to_state(sd);
sd                 64 drivers/media/i2c/m52790.c 	m52790_write(sd);
sd                 69 drivers/media/i2c/m52790.c static int m52790_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
sd                 71 drivers/media/i2c/m52790.c 	struct m52790_state *state = to_state(sd);
sd                 80 drivers/media/i2c/m52790.c static int m52790_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
sd                 82 drivers/media/i2c/m52790.c 	struct m52790_state *state = to_state(sd);
sd                 88 drivers/media/i2c/m52790.c 	m52790_write(sd);
sd                 93 drivers/media/i2c/m52790.c static int m52790_log_status(struct v4l2_subdev *sd)
sd                 95 drivers/media/i2c/m52790.c 	struct m52790_state *state = to_state(sd);
sd                 97 drivers/media/i2c/m52790.c 	v4l2_info(sd, "Switch 1: %02x\n",
sd                 99 drivers/media/i2c/m52790.c 	v4l2_info(sd, "Switch 2: %02x\n",
sd                136 drivers/media/i2c/m52790.c 	struct v4l2_subdev *sd;
sd                149 drivers/media/i2c/m52790.c 	sd = &state->sd;
sd                150 drivers/media/i2c/m52790.c 	v4l2_i2c_subdev_init(sd, client, &m52790_ops);
sd                153 drivers/media/i2c/m52790.c 	m52790_write(sd);
sd                159 drivers/media/i2c/m52790.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                161 drivers/media/i2c/m52790.c 	v4l2_device_unregister_subdev(sd);
sd                195 drivers/media/i2c/m5mols/m5mols.h 	struct v4l2_subdev sd;
sd                272 drivers/media/i2c/m5mols/m5mols.h int m5mols_read_u8(struct v4l2_subdev *sd, u32 reg_comb, u8 *val);
sd                273 drivers/media/i2c/m5mols/m5mols.h int m5mols_read_u16(struct v4l2_subdev *sd, u32 reg_comb, u16 *val);
sd                274 drivers/media/i2c/m5mols/m5mols.h int m5mols_read_u32(struct v4l2_subdev *sd, u32 reg_comb, u32 *val);
sd                275 drivers/media/i2c/m5mols/m5mols.h int m5mols_write(struct v4l2_subdev *sd, u32 reg_comb, u32 val);
sd                277 drivers/media/i2c/m5mols/m5mols.h int m5mols_busy_wait(struct v4l2_subdev *sd, u32 reg, u32 value, u32 mask,
sd                308 drivers/media/i2c/m5mols/m5mols.h int m5mols_enable_interrupt(struct v4l2_subdev *sd, u8 reg);
sd                309 drivers/media/i2c/m5mols/m5mols.h int m5mols_wait_interrupt(struct v4l2_subdev *sd, u8 condition, u32 timeout);
sd                315 drivers/media/i2c/m5mols/m5mols.h int m5mols_init_controls(struct v4l2_subdev *sd);
sd                318 drivers/media/i2c/m5mols/m5mols.h int m5mols_update_fw(struct v4l2_subdev *sd,
sd                323 drivers/media/i2c/m5mols/m5mols.h 	return container_of(subdev, struct m5mols_info, sd);
sd                330 drivers/media/i2c/m5mols/m5mols.h 	return &info->sd;
sd                 40 drivers/media/i2c/m5mols/m5mols_capture.c static int m5mols_read_rational(struct v4l2_subdev *sd, u32 addr_num,
sd                 45 drivers/media/i2c/m5mols/m5mols_capture.c 	int ret = m5mols_read_u32(sd, addr_num, &num);
sd                 47 drivers/media/i2c/m5mols/m5mols_capture.c 		ret = m5mols_read_u32(sd, addr_den, &den);
sd                 63 drivers/media/i2c/m5mols/m5mols_capture.c 	struct v4l2_subdev *sd = &info->sd;
sd                 66 drivers/media/i2c/m5mols/m5mols_capture.c 	ret = m5mols_read_rational(sd, EXIF_INFO_EXPTIME_NU,
sd                 70 drivers/media/i2c/m5mols/m5mols_capture.c 	ret = m5mols_read_rational(sd, EXIF_INFO_TV_NU, EXIF_INFO_TV_DE,
sd                 74 drivers/media/i2c/m5mols/m5mols_capture.c 	ret = m5mols_read_rational(sd, EXIF_INFO_AV_NU, EXIF_INFO_AV_DE,
sd                 78 drivers/media/i2c/m5mols/m5mols_capture.c 	ret = m5mols_read_rational(sd, EXIF_INFO_BV_NU, EXIF_INFO_BV_DE,
sd                 82 drivers/media/i2c/m5mols/m5mols_capture.c 	ret = m5mols_read_rational(sd, EXIF_INFO_EBV_NU, EXIF_INFO_EBV_DE,
sd                 87 drivers/media/i2c/m5mols/m5mols_capture.c 	ret = m5mols_read_u16(sd, EXIF_INFO_ISO, &exif->iso_speed);
sd                 89 drivers/media/i2c/m5mols/m5mols_capture.c 		ret = m5mols_read_u16(sd, EXIF_INFO_FLASH, &exif->flash);
sd                 91 drivers/media/i2c/m5mols/m5mols_capture.c 		ret = m5mols_read_u16(sd, EXIF_INFO_SDR, &exif->sdr);
sd                 93 drivers/media/i2c/m5mols/m5mols_capture.c 		ret = m5mols_read_u16(sd, EXIF_INFO_QVAL, &exif->qval);
sd                 98 drivers/media/i2c/m5mols/m5mols_capture.c 		ret = m5mols_read_u32(sd, CAPC_IMAGE_SIZE, &info->cap.main);
sd                100 drivers/media/i2c/m5mols/m5mols_capture.c 		ret = m5mols_read_u32(sd, CAPC_THUMB_SIZE, &info->cap.thumb);
sd                110 drivers/media/i2c/m5mols/m5mols_capture.c 	struct v4l2_subdev *sd = &info->sd;
sd                122 drivers/media/i2c/m5mols/m5mols_capture.c 		ret = m5mols_write(sd, CAPP_YUVOUT_MAIN, REG_JPEG);
sd                124 drivers/media/i2c/m5mols/m5mols_capture.c 		ret = m5mols_write(sd, CAPP_MAIN_IMAGE_SIZE, info->resolution);
sd                126 drivers/media/i2c/m5mols/m5mols_capture.c 		ret = m5mols_write(sd, CAPP_JPEG_SIZE_MAX, framesize);
sd                131 drivers/media/i2c/m5mols/m5mols_capture.c 		ret = m5mols_wait_interrupt(sd, REG_INT_CAPTURE, 2000);
sd                138 drivers/media/i2c/m5mols/m5mols_capture.c 	ret = m5mols_write(sd, CAPC_SEL_FRAME, 1);
sd                140 drivers/media/i2c/m5mols/m5mols_capture.c 		ret = m5mols_write(sd, CAPC_START, REG_CAP_START_MAIN);
sd                146 drivers/media/i2c/m5mols/m5mols_capture.c 		ret = m5mols_wait_interrupt(sd, REG_INT_CAPTURE, 2000);
sd                152 drivers/media/i2c/m5mols/m5mols_capture.c 		v4l2_dbg(1, m5mols_debug, sd, "%s: size: %d, thumb.: %d B\n",
sd                155 drivers/media/i2c/m5mols/m5mols_capture.c 		v4l2_subdev_notify(sd, S5P_FIMC_TX_END_NOTIFY, &size);
sd                132 drivers/media/i2c/m5mols/m5mols_controls.c 	struct v4l2_subdev *sd = &info->sd;
sd                141 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, AE_EV_PRESET_MONITOR, mode);
sd                143 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, AE_EV_PRESET_CAPTURE, mode);
sd                145 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, AE_MODE, scenemode.metering);
sd                147 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, AE_INDEX, scenemode.ev_bias);
sd                149 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, AWB_MODE, scenemode.wb_mode);
sd                151 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, AWB_MANUAL, scenemode.wb_preset);
sd                153 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, MON_CHROMA_EN, scenemode.chroma_en);
sd                155 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, MON_CHROMA_LVL, scenemode.chroma_lvl);
sd                157 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, MON_EDGE_EN, scenemode.edge_en);
sd                159 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, MON_EDGE_LVL, scenemode.edge_lvl);
sd                161 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, AF_MODE, scenemode.af_range);
sd                163 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, FD_CTL, scenemode.fd_mode);
sd                165 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, MON_TONE_CTL, scenemode.tone);
sd                167 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, AE_ISO, scenemode.iso);
sd                171 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, CAPP_WDR_EN, scenemode.wdr);
sd                173 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, CAPP_MCC_MODE, scenemode.mcc);
sd                175 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, CAPP_LIGHT_CTRL, scenemode.light);
sd                177 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, CAPP_FLASH_CTRL, scenemode.flash);
sd                179 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, CAPC_MODE, scenemode.capt_mode);
sd                194 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(&info->sd, AE_LOCK, ae_lock ?
sd                204 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(&info->sd, AWB_LOCK, awb_lock ?
sd                214 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(&info->sd, AF_EXECUTE, REG_AF_STOP);
sd                235 drivers/media/i2c/m5mols/m5mols_controls.c 	return m5mols_write(&info->sd, AE_MODE, metering);
sd                240 drivers/media/i2c/m5mols/m5mols_controls.c 	struct v4l2_subdev *sd = &info->sd;
sd                252 drivers/media/i2c/m5mols/m5mols_controls.c 		v4l2_dbg(1, m5mols_debug, sd,
sd                257 drivers/media/i2c/m5mols/m5mols_controls.c 		return m5mols_write(sd, AE_INDEX, info->exposure_bias->val);
sd                261 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, AE_MODE, REG_AE_OFF);
sd                263 drivers/media/i2c/m5mols/m5mols_controls.c 			ret = m5mols_write(sd, AE_MAN_GAIN_MON,
sd                266 drivers/media/i2c/m5mols/m5mols_controls.c 			ret = m5mols_write(sd, AE_MAN_GAIN_CAP,
sd                269 drivers/media/i2c/m5mols/m5mols_controls.c 		v4l2_dbg(1, m5mols_debug, sd, "%s: exposure: %#x\n",
sd                290 drivers/media/i2c/m5mols/m5mols_controls.c 	struct v4l2_subdev *sd = &info->sd;
sd                298 drivers/media/i2c/m5mols/m5mols_controls.c 		v4l2_dbg(1, m5mols_debug, sd,
sd                302 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, AWB_MODE, awb ? REG_AWB_AUTO :
sd                308 drivers/media/i2c/m5mols/m5mols_controls.c 			ret = m5mols_write(sd, AWB_MANUAL, wb[i][1]);
sd                316 drivers/media/i2c/m5mols/m5mols_controls.c 	int ret = m5mols_write(&info->sd, MON_CHROMA_LVL, val);
sd                320 drivers/media/i2c/m5mols/m5mols_controls.c 	return m5mols_write(&info->sd, MON_CHROMA_EN, REG_CHROMA_ON);
sd                328 drivers/media/i2c/m5mols/m5mols_controls.c 	struct v4l2_subdev *sd = &info->sd;
sd                348 drivers/media/i2c/m5mols/m5mols_controls.c 	ret = m5mols_write(sd, PARM_EFFECT, p_effect);
sd                350 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, MON_EFFECT, m_effect);
sd                353 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, MON_CFIXR, cfix_r);
sd                355 drivers/media/i2c/m5mols/m5mols_controls.c 			ret = m5mols_write(sd, MON_CFIXB, cfix_b);
sd                358 drivers/media/i2c/m5mols/m5mols_controls.c 	v4l2_dbg(1, m5mols_debug, sd,
sd                369 drivers/media/i2c/m5mols/m5mols_controls.c 	return m5mols_write(&info->sd, AE_ISO, iso);
sd                376 drivers/media/i2c/m5mols/m5mols_controls.c 	ret = m5mols_write(&info->sd, MON_TONE_CTL, wdr ? 9 : 5);
sd                384 drivers/media/i2c/m5mols/m5mols_controls.c 	return m5mols_write(&info->sd, CAPP_WDR_EN, wdr);
sd                389 drivers/media/i2c/m5mols/m5mols_controls.c 	struct v4l2_subdev *sd = &info->sd;
sd                393 drivers/media/i2c/m5mols/m5mols_controls.c 	ret = m5mols_write(sd, AE_EV_PRESET_MONITOR, evp);
sd                397 drivers/media/i2c/m5mols/m5mols_controls.c 	return m5mols_write(sd, AE_EV_PRESET_CAPTURE, evp);
sd                402 drivers/media/i2c/m5mols/m5mols_controls.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                403 drivers/media/i2c/m5mols/m5mols_controls.c 	struct m5mols_info *info = to_m5mols(sd);
sd                407 drivers/media/i2c/m5mols/m5mols_controls.c 	v4l2_dbg(1, m5mols_debug, sd, "%s: ctrl: %s (%d)\n",
sd                415 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_read_u8(sd, AE_ISO, &status);
sd                425 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_read_u8(sd, AE_LOCK, &status);
sd                431 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_read_u8(sd, AWB_LOCK, &status);
sd                437 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_read_u8(sd, AF_EXECUTE, &status);
sd                449 drivers/media/i2c/m5mols/m5mols_controls.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                450 drivers/media/i2c/m5mols/m5mols_controls.c 	struct m5mols_info *info = to_m5mols(sd);
sd                463 drivers/media/i2c/m5mols/m5mols_controls.c 	v4l2_dbg(1, m5mols_debug, sd, "%s: %s, val: %d, priv: %p\n",
sd                478 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, MON_ZOOM, ctrl->val);
sd                510 drivers/media/i2c/m5mols/m5mols_controls.c 		ret = m5mols_write(sd, CAPP_JPEG_RATIO, ctrl->val);
sd                537 drivers/media/i2c/m5mols/m5mols_controls.c int m5mols_init_controls(struct v4l2_subdev *sd)
sd                539 drivers/media/i2c/m5mols/m5mols_controls.c 	struct m5mols_info *info = to_m5mols(sd);
sd                545 drivers/media/i2c/m5mols/m5mols_controls.c 	ret = m5mols_read_u16(sd, AE_MAX_GAIN_MON, &exposure_max);
sd                606 drivers/media/i2c/m5mols/m5mols_controls.c 		v4l2_err(sd, "Failed to initialize controls: %d\n", ret);
sd                622 drivers/media/i2c/m5mols/m5mols_controls.c 	sd->ctrl_handler = &info->handle;
sd                139 drivers/media/i2c/m5mols/m5mols_core.c static int m5mols_read(struct v4l2_subdev *sd, u32 size, u32 reg, u32 *val)
sd                141 drivers/media/i2c/m5mols/m5mols_core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                142 drivers/media/i2c/m5mols/m5mols_core.c 	struct m5mols_info *info = to_m5mols(sd);
sd                179 drivers/media/i2c/m5mols/m5mols_core.c 		v4l2_err(sd, "read failed: size:%d cat:%02x cmd:%02x. %d\n",
sd                185 drivers/media/i2c/m5mols/m5mols_core.c int m5mols_read_u8(struct v4l2_subdev *sd, u32 reg, u8 *val)
sd                191 drivers/media/i2c/m5mols/m5mols_core.c 		v4l2_err(sd, "Wrong data size\n");
sd                195 drivers/media/i2c/m5mols/m5mols_core.c 	ret = m5mols_read(sd, I2C_SIZE(reg), reg, &val_32);
sd                203 drivers/media/i2c/m5mols/m5mols_core.c int m5mols_read_u16(struct v4l2_subdev *sd, u32 reg, u16 *val)
sd                209 drivers/media/i2c/m5mols/m5mols_core.c 		v4l2_err(sd, "Wrong data size\n");
sd                213 drivers/media/i2c/m5mols/m5mols_core.c 	ret = m5mols_read(sd, I2C_SIZE(reg), reg, &val_32);
sd                221 drivers/media/i2c/m5mols/m5mols_core.c int m5mols_read_u32(struct v4l2_subdev *sd, u32 reg, u32 *val)
sd                224 drivers/media/i2c/m5mols/m5mols_core.c 		v4l2_err(sd, "Wrong data size\n");
sd                228 drivers/media/i2c/m5mols/m5mols_core.c 	return m5mols_read(sd, I2C_SIZE(reg), reg, val);
sd                239 drivers/media/i2c/m5mols/m5mols_core.c int m5mols_write(struct v4l2_subdev *sd, u32 reg, u32 val)
sd                241 drivers/media/i2c/m5mols/m5mols_core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                242 drivers/media/i2c/m5mols/m5mols_core.c 	struct m5mols_info *info = to_m5mols(sd);
sd                255 drivers/media/i2c/m5mols/m5mols_core.c 		v4l2_err(sd, "Wrong data size\n");
sd                278 drivers/media/i2c/m5mols/m5mols_core.c 		v4l2_err(sd, "write failed: cat:%02x cmd:%02x ret:%d\n",
sd                297 drivers/media/i2c/m5mols/m5mols_core.c int m5mols_busy_wait(struct v4l2_subdev *sd, u32 reg, u32 value, u32 mask,
sd                305 drivers/media/i2c/m5mols/m5mols_core.c 		int ret = m5mols_read_u8(sd, reg, &status);
sd                325 drivers/media/i2c/m5mols/m5mols_core.c int m5mols_enable_interrupt(struct v4l2_subdev *sd, u8 reg)
sd                327 drivers/media/i2c/m5mols/m5mols_core.c 	struct m5mols_info *info = to_m5mols(sd);
sd                332 drivers/media/i2c/m5mols/m5mols_core.c 	ret = m5mols_read_u8(sd, SYSTEM_INT_FACTOR, &dummy);
sd                334 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_write(sd, SYSTEM_INT_ENABLE, reg & ~mask);
sd                338 drivers/media/i2c/m5mols/m5mols_core.c int m5mols_wait_interrupt(struct v4l2_subdev *sd, u8 irq_mask, u32 timeout)
sd                340 drivers/media/i2c/m5mols/m5mols_core.c 	struct m5mols_info *info = to_m5mols(sd);
sd                348 drivers/media/i2c/m5mols/m5mols_core.c 	return m5mols_busy_wait(sd, SYSTEM_INT_FACTOR, irq_mask,
sd                360 drivers/media/i2c/m5mols/m5mols_core.c static int m5mols_reg_mode(struct v4l2_subdev *sd, u8 mode)
sd                362 drivers/media/i2c/m5mols/m5mols_core.c 	int ret = m5mols_write(sd, SYSTEM_SYSMODE, mode);
sd                365 drivers/media/i2c/m5mols/m5mols_core.c 	return m5mols_busy_wait(sd, SYSTEM_SYSMODE, mode, 0xff,
sd                380 drivers/media/i2c/m5mols/m5mols_core.c 	struct v4l2_subdev *sd = &info->sd;
sd                387 drivers/media/i2c/m5mols/m5mols_core.c 	ret = m5mols_read_u8(sd, SYSTEM_SYSMODE, &reg);
sd                393 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_reg_mode(sd, REG_MONITOR);
sd                397 drivers/media/i2c/m5mols/m5mols_core.c 			ret = m5mols_reg_mode(sd, REG_CAPTURE);
sd                402 drivers/media/i2c/m5mols/m5mols_core.c 			ret = m5mols_reg_mode(sd, REG_PARAMETER);
sd                406 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_reg_mode(sd, REG_CAPTURE);
sd                410 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_reg_mode(sd, REG_MONITOR);
sd                414 drivers/media/i2c/m5mols/m5mols_core.c 			ret = m5mols_reg_mode(sd, REG_PARAMETER);
sd                418 drivers/media/i2c/m5mols/m5mols_core.c 		v4l2_warn(sd, "Wrong mode: %d\n", mode);
sd                434 drivers/media/i2c/m5mols/m5mols_core.c static int m5mols_get_version(struct v4l2_subdev *sd)
sd                436 drivers/media/i2c/m5mols/m5mols_core.c 	struct m5mols_info *info = to_m5mols(sd);
sd                442 drivers/media/i2c/m5mols/m5mols_core.c 	ret = m5mols_read_u8(sd, SYSTEM_VER_CUSTOMER, &ver->customer);
sd                444 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_read_u8(sd, SYSTEM_VER_PROJECT, &ver->project);
sd                446 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_read_u16(sd, SYSTEM_VER_FIRMWARE, &ver->fw);
sd                448 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_read_u16(sd, SYSTEM_VER_HARDWARE, &ver->hw);
sd                450 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_read_u16(sd, SYSTEM_VER_PARAMETER, &ver->param);
sd                452 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_read_u16(sd, SYSTEM_VER_AWB, &ver->awb);
sd                454 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_read_u8(sd, AF_VERSION, &ver->af);
sd                459 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_read_u8(sd, SYSTEM_VER_STRING, &str[i]);
sd                464 drivers/media/i2c/m5mols/m5mols_core.c 	v4l2_info(sd, "Manufacturer\t[%s]\n",
sd                471 drivers/media/i2c/m5mols/m5mols_core.c 	v4l2_info(sd, "Customer/Project\t[0x%02x/0x%02x]\n",
sd                475 drivers/media/i2c/m5mols/m5mols_core.c 		v4l2_info(sd, "No support Auto Focus on this firmware\n");
sd                506 drivers/media/i2c/m5mols/m5mols_core.c static int __find_resolution(struct v4l2_subdev *sd,
sd                547 drivers/media/i2c/m5mols/m5mols_core.c 		return cfg ? v4l2_subdev_get_try_format(&info->sd, cfg, 0) : NULL;
sd                552 drivers/media/i2c/m5mols/m5mols_core.c static int m5mols_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd                555 drivers/media/i2c/m5mols/m5mols_core.c 	struct m5mols_info *info = to_m5mols(sd);
sd                571 drivers/media/i2c/m5mols/m5mols_core.c static int m5mols_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd                574 drivers/media/i2c/m5mols/m5mols_core.c 	struct m5mols_info *info = to_m5mols(sd);
sd                581 drivers/media/i2c/m5mols/m5mols_core.c 	ret = __find_resolution(sd, format, &type, &resolution);
sd                605 drivers/media/i2c/m5mols/m5mols_core.c static int m5mols_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
sd                608 drivers/media/i2c/m5mols/m5mols_core.c 	struct m5mols_info *info = to_m5mols(sd);
sd                628 drivers/media/i2c/m5mols/m5mols_core.c static int m5mols_set_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
sd                631 drivers/media/i2c/m5mols/m5mols_core.c 	struct m5mols_info *info = to_m5mols(sd);
sd                650 drivers/media/i2c/m5mols/m5mols_core.c static int m5mols_enum_mbus_code(struct v4l2_subdev *sd,
sd                704 drivers/media/i2c/m5mols/m5mols_core.c 	struct v4l2_subdev *sd = &info->sd;
sd                709 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_write(sd, PARM_MON_SIZE, info->resolution);
sd                711 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_write(sd, PARM_MON_FPS, REG_FPS_30);
sd                720 drivers/media/i2c/m5mols/m5mols_core.c static int m5mols_s_stream(struct v4l2_subdev *sd, int enable)
sd                722 drivers/media/i2c/m5mols/m5mols_core.c 	struct m5mols_info *info = to_m5mols(sd);
sd                750 drivers/media/i2c/m5mols/m5mols_core.c 	struct v4l2_subdev *sd = &info->sd;
sd                751 drivers/media/i2c/m5mols/m5mols_core.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                793 drivers/media/i2c/m5mols/m5mols_core.c int __attribute__ ((weak)) m5mols_update_fw(struct v4l2_subdev *sd,
sd                807 drivers/media/i2c/m5mols/m5mols_core.c static int m5mols_fw_start(struct v4l2_subdev *sd)
sd                809 drivers/media/i2c/m5mols/m5mols_core.c 	struct m5mols_info *info = to_m5mols(sd);
sd                814 drivers/media/i2c/m5mols/m5mols_core.c 	ret = m5mols_busy_wait(sd, FLASH_CAM_START, REG_IN_FLASH_MODE,
sd                817 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_write(sd, FLASH_CAM_START, REG_START_ARM_BOOT);
sd                819 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_wait_interrupt(sd, REG_INT_MODE, 2000);
sd                825 drivers/media/i2c/m5mols/m5mols_core.c 	ret = m5mols_get_version(sd);
sd                827 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_update_fw(sd, m5mols_sensor_power);
sd                831 drivers/media/i2c/m5mols/m5mols_core.c 	v4l2_dbg(1, m5mols_debug, sd, "Success ARM Booting\n");
sd                833 drivers/media/i2c/m5mols/m5mols_core.c 	ret = m5mols_write(sd, PARM_INTERFACE, REG_INTERFACE_MIPI);
sd                835 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_enable_interrupt(sd,
sd                846 drivers/media/i2c/m5mols/m5mols_core.c 	ret = m5mols_write(&info->sd, AF_EXECUTE, REG_AF_STOP);
sd                848 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_write(&info->sd, AF_MODE, REG_AF_POWEROFF);
sd                850 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_busy_wait(&info->sd, SYSTEM_STATUS, REG_AF_IDLE,
sd                864 drivers/media/i2c/m5mols/m5mols_core.c static int m5mols_s_power(struct v4l2_subdev *sd, int on)
sd                866 drivers/media/i2c/m5mols/m5mols_core.c 	struct m5mols_info *info = to_m5mols(sd);
sd                874 drivers/media/i2c/m5mols/m5mols_core.c 			ret = m5mols_fw_start(sd);
sd                881 drivers/media/i2c/m5mols/m5mols_core.c 				v4l2_warn(sd, "Soft landing lens failed\n");
sd                892 drivers/media/i2c/m5mols/m5mols_core.c static int m5mols_log_status(struct v4l2_subdev *sd)
sd                894 drivers/media/i2c/m5mols/m5mols_core.c 	struct m5mols_info *info = to_m5mols(sd);
sd                896 drivers/media/i2c/m5mols/m5mols_core.c 	v4l2_ctrl_handler_log_status(&info->handle, sd->name);
sd                909 drivers/media/i2c/m5mols/m5mols_core.c static int m5mols_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                911 drivers/media/i2c/m5mols/m5mols_core.c 	struct v4l2_mbus_framefmt *format = v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd                943 drivers/media/i2c/m5mols/m5mols_core.c 	struct v4l2_subdev *sd;
sd                984 drivers/media/i2c/m5mols/m5mols_core.c 	sd = &info->sd;
sd                985 drivers/media/i2c/m5mols/m5mols_core.c 	v4l2_i2c_subdev_init(sd, client, &m5mols_ops);
sd                987 drivers/media/i2c/m5mols/m5mols_core.c 	strscpy(sd->name, MODULE_NAME, sizeof(sd->name));
sd                988 drivers/media/i2c/m5mols/m5mols_core.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                990 drivers/media/i2c/m5mols/m5mols_core.c 	sd->internal_ops = &m5mols_subdev_internal_ops;
sd                992 drivers/media/i2c/m5mols/m5mols_core.c 	ret = media_entity_pads_init(&sd->entity, 1, &info->pad);
sd                995 drivers/media/i2c/m5mols/m5mols_core.c 	sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1001 drivers/media/i2c/m5mols/m5mols_core.c 			       IRQF_TRIGGER_RISING, MODULE_NAME, sd);
sd               1014 drivers/media/i2c/m5mols/m5mols_core.c 	ret = m5mols_fw_start(sd);
sd               1016 drivers/media/i2c/m5mols/m5mols_core.c 		ret = m5mols_init_controls(sd);
sd               1022 drivers/media/i2c/m5mols/m5mols_core.c 	media_entity_cleanup(&sd->entity);
sd               1028 drivers/media/i2c/m5mols/m5mols_core.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1030 drivers/media/i2c/m5mols/m5mols_core.c 	v4l2_device_unregister_subdev(sd);
sd               1031 drivers/media/i2c/m5mols/m5mols_core.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd               1032 drivers/media/i2c/m5mols/m5mols_core.c 	media_entity_cleanup(&sd->entity);
sd                264 drivers/media/i2c/max2175.c 	struct v4l2_subdev sd;		/* Sub-device */
sd                299 drivers/media/i2c/max2175.c static inline struct max2175 *max2175_from_sd(struct v4l2_subdev *sd)
sd                301 drivers/media/i2c/max2175.c 	return container_of(sd, struct max2175, sd);
sd               1094 drivers/media/i2c/max2175.c static int max2175_s_frequency(struct v4l2_subdev *sd,
sd               1097 drivers/media/i2c/max2175.c 	struct max2175 *ctx = max2175_from_sd(sd);
sd               1124 drivers/media/i2c/max2175.c static int max2175_g_frequency(struct v4l2_subdev *sd,
sd               1127 drivers/media/i2c/max2175.c 	struct max2175 *ctx = max2175_from_sd(sd);
sd               1140 drivers/media/i2c/max2175.c static int max2175_enum_freq_bands(struct v4l2_subdev *sd,
sd               1143 drivers/media/i2c/max2175.c 	struct max2175 *ctx = max2175_from_sd(sd);
sd               1153 drivers/media/i2c/max2175.c static int max2175_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
sd               1155 drivers/media/i2c/max2175.c 	struct max2175 *ctx = max2175_from_sd(sd);
sd               1169 drivers/media/i2c/max2175.c static int max2175_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
sd               1281 drivers/media/i2c/max2175.c 	struct v4l2_subdev *sd;
sd               1328 drivers/media/i2c/max2175.c 	sd = &ctx->sd;
sd               1336 drivers/media/i2c/max2175.c 	v4l2_i2c_subdev_init(sd, client, &max2175_ops);
sd               1339 drivers/media/i2c/max2175.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1376 drivers/media/i2c/max2175.c 	ctx->sd.ctrl_handler = &ctx->ctrl_hdl;
sd               1382 drivers/media/i2c/max2175.c 	ret = v4l2_async_register_subdev(sd);
sd               1400 drivers/media/i2c/max2175.c 	v4l2_async_unregister_subdev(sd);
sd               1409 drivers/media/i2c/max2175.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1410 drivers/media/i2c/max2175.c 	struct max2175 *ctx = max2175_from_sd(sd);
sd               1413 drivers/media/i2c/max2175.c 	v4l2_async_unregister_subdev(sd);
sd                 86 drivers/media/i2c/ml86v7667.c 	struct v4l2_subdev		sd;
sd                 93 drivers/media/i2c/ml86v7667.c 	return container_of(subdev, struct ml86v7667_priv, sd);
sd                 98 drivers/media/i2c/ml86v7667.c 	return &container_of(ctrl->handler, struct ml86v7667_priv, hdl)->sd;
sd                114 drivers/media/i2c/ml86v7667.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                115 drivers/media/i2c/ml86v7667.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                159 drivers/media/i2c/ml86v7667.c static int ml86v7667_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
sd                161 drivers/media/i2c/ml86v7667.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                176 drivers/media/i2c/ml86v7667.c static int ml86v7667_g_input_status(struct v4l2_subdev *sd, u32 *status)
sd                178 drivers/media/i2c/ml86v7667.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                190 drivers/media/i2c/ml86v7667.c static int ml86v7667_enum_mbus_code(struct v4l2_subdev *sd,
sd                202 drivers/media/i2c/ml86v7667.c static int ml86v7667_fill_fmt(struct v4l2_subdev *sd,
sd                206 drivers/media/i2c/ml86v7667.c 	struct ml86v7667_priv *priv = to_ml86v7667(sd);
sd                222 drivers/media/i2c/ml86v7667.c static int ml86v7667_g_mbus_config(struct v4l2_subdev *sd,
sd                232 drivers/media/i2c/ml86v7667.c static int ml86v7667_g_std(struct v4l2_subdev *sd, v4l2_std_id *std)
sd                234 drivers/media/i2c/ml86v7667.c 	struct ml86v7667_priv *priv = to_ml86v7667(sd);
sd                241 drivers/media/i2c/ml86v7667.c static int ml86v7667_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd                243 drivers/media/i2c/ml86v7667.c 	struct ml86v7667_priv *priv = to_ml86v7667(sd);
sd                244 drivers/media/i2c/ml86v7667.c 	struct i2c_client *client = v4l2_get_subdevdata(&priv->sd);
sd                260 drivers/media/i2c/ml86v7667.c static int ml86v7667_g_register(struct v4l2_subdev *sd,
sd                263 drivers/media/i2c/ml86v7667.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                276 drivers/media/i2c/ml86v7667.c static int ml86v7667_s_register(struct v4l2_subdev *sd,
sd                279 drivers/media/i2c/ml86v7667.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                318 drivers/media/i2c/ml86v7667.c 	struct i2c_client *client = v4l2_get_subdevdata(&priv->sd);
sd                373 drivers/media/i2c/ml86v7667.c 	v4l2_i2c_subdev_init(&priv->sd, client, &ml86v7667_subdev_ops);
sd                392 drivers/media/i2c/ml86v7667.c 	priv->sd.ctrl_handler = &priv->hdl;
sd                410 drivers/media/i2c/ml86v7667.c 	v4l2_device_unregister_subdev(&priv->sd);
sd                418 drivers/media/i2c/ml86v7667.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                419 drivers/media/i2c/ml86v7667.c 	struct ml86v7667_priv *priv = to_ml86v7667(sd);
sd                422 drivers/media/i2c/ml86v7667.c 	v4l2_device_unregister_subdev(&priv->sd);
sd                337 drivers/media/i2c/msp3400-driver.c 	struct i2c_client *client = v4l2_get_subdevdata(&state->sd);
sd                407 drivers/media/i2c/msp3400-driver.c static int msp_s_radio(struct v4l2_subdev *sd)
sd                409 drivers/media/i2c/msp3400-driver.c 	struct msp_state *state = to_state(sd);
sd                410 drivers/media/i2c/msp3400-driver.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                434 drivers/media/i2c/msp3400-driver.c static int msp_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *freq)
sd                436 drivers/media/i2c/msp3400-driver.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                443 drivers/media/i2c/msp3400-driver.c static int msp_querystd(struct v4l2_subdev *sd, v4l2_std_id *id)
sd                445 drivers/media/i2c/msp3400-driver.c 	struct msp_state *state = to_state(sd);
sd                446 drivers/media/i2c/msp3400-driver.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                457 drivers/media/i2c/msp3400-driver.c static int msp_s_std(struct v4l2_subdev *sd, v4l2_std_id id)
sd                459 drivers/media/i2c/msp3400-driver.c 	struct msp_state *state = to_state(sd);
sd                460 drivers/media/i2c/msp3400-driver.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                470 drivers/media/i2c/msp3400-driver.c static int msp_s_routing(struct v4l2_subdev *sd,
sd                473 drivers/media/i2c/msp3400-driver.c 	struct msp_state *state = to_state(sd);
sd                474 drivers/media/i2c/msp3400-driver.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                506 drivers/media/i2c/msp3400-driver.c static int msp_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
sd                508 drivers/media/i2c/msp3400-driver.c 	struct msp_state *state = to_state(sd);
sd                509 drivers/media/i2c/msp3400-driver.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                524 drivers/media/i2c/msp3400-driver.c static int msp_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
sd                526 drivers/media/i2c/msp3400-driver.c 	struct msp_state *state = to_state(sd);
sd                527 drivers/media/i2c/msp3400-driver.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                539 drivers/media/i2c/msp3400-driver.c static int msp_s_i2s_clock_freq(struct v4l2_subdev *sd, u32 freq)
sd                541 drivers/media/i2c/msp3400-driver.c 	struct msp_state *state = to_state(sd);
sd                542 drivers/media/i2c/msp3400-driver.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                559 drivers/media/i2c/msp3400-driver.c static int msp_log_status(struct v4l2_subdev *sd)
sd                561 drivers/media/i2c/msp3400-driver.c 	struct msp_state *state = to_state(sd);
sd                562 drivers/media/i2c/msp3400-driver.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                570 drivers/media/i2c/msp3400-driver.c 	snprintf(prefix, sizeof(prefix), "%s: Audio:    ", sd->name);
sd                669 drivers/media/i2c/msp3400-driver.c 	struct v4l2_subdev *sd;
sd                693 drivers/media/i2c/msp3400-driver.c 	sd = &state->sd;
sd                694 drivers/media/i2c/msp3400-driver.c 	v4l2_i2c_subdev_init(sd, client, &msp_ops);
sd                702 drivers/media/i2c/msp3400-driver.c 	sd->entity.function = MEDIA_ENT_F_IF_AUD_DECODER;
sd                704 drivers/media/i2c/msp3400-driver.c 	ret = media_entity_pads_init(&sd->entity, 2, state->pads);
sd                817 drivers/media/i2c/msp3400-driver.c 	sd->ctrl_handler = hdl;
sd                866 drivers/media/i2c/msp3400-driver.c 	v4l2_device_unregister_subdev(&state->sd);
sd                 62 drivers/media/i2c/msp3400-driver.h 	struct v4l2_subdev sd;
sd                119 drivers/media/i2c/msp3400-driver.h static inline struct msp_state *to_state(struct v4l2_subdev *sd)
sd                121 drivers/media/i2c/msp3400-driver.h 	return container_of(sd, struct msp_state, sd);
sd                186 drivers/media/i2c/mt9m001.c static int mt9m001_apply_selection(struct v4l2_subdev *sd)
sd                188 drivers/media/i2c/mt9m001.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                208 drivers/media/i2c/mt9m001.c static int mt9m001_s_stream(struct v4l2_subdev *sd, int enable)
sd                210 drivers/media/i2c/mt9m001.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                224 drivers/media/i2c/mt9m001.c 		ret = mt9m001_apply_selection(sd);
sd                255 drivers/media/i2c/mt9m001.c static int mt9m001_set_selection(struct v4l2_subdev *sd,
sd                259 drivers/media/i2c/mt9m001.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                296 drivers/media/i2c/mt9m001.c static int mt9m001_get_selection(struct v4l2_subdev *sd,
sd                300 drivers/media/i2c/mt9m001.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                321 drivers/media/i2c/mt9m001.c static int mt9m001_get_fmt(struct v4l2_subdev *sd,
sd                325 drivers/media/i2c/mt9m001.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                333 drivers/media/i2c/mt9m001.c 		mf = v4l2_subdev_get_try_format(sd, cfg, 0);
sd                350 drivers/media/i2c/mt9m001.c static int mt9m001_s_fmt(struct v4l2_subdev *sd,
sd                354 drivers/media/i2c/mt9m001.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                367 drivers/media/i2c/mt9m001.c 	ret = mt9m001_set_selection(sd, NULL, &sel);
sd                378 drivers/media/i2c/mt9m001.c static int mt9m001_set_fmt(struct v4l2_subdev *sd,
sd                383 drivers/media/i2c/mt9m001.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                412 drivers/media/i2c/mt9m001.c 		return mt9m001_s_fmt(sd, fmt, mf);
sd                418 drivers/media/i2c/mt9m001.c static int mt9m001_g_register(struct v4l2_subdev *sd,
sd                421 drivers/media/i2c/mt9m001.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                435 drivers/media/i2c/mt9m001.c static int mt9m001_s_register(struct v4l2_subdev *sd,
sd                438 drivers/media/i2c/mt9m001.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                507 drivers/media/i2c/mt9m001.c 	struct v4l2_subdev *sd = &mt9m001->subdev;
sd                508 drivers/media/i2c/mt9m001.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                633 drivers/media/i2c/mt9m001.c static int mt9m001_g_skip_top_lines(struct v4l2_subdev *sd, u32 *lines)
sd                635 drivers/media/i2c/mt9m001.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                658 drivers/media/i2c/mt9m001.c static int mt9m001_init_cfg(struct v4l2_subdev *sd,
sd                661 drivers/media/i2c/mt9m001.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                664 drivers/media/i2c/mt9m001.c 		v4l2_subdev_get_try_format(sd, cfg, 0);
sd                678 drivers/media/i2c/mt9m001.c static int mt9m001_enum_mbus_code(struct v4l2_subdev *sd,
sd                682 drivers/media/i2c/mt9m001.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                692 drivers/media/i2c/mt9m001.c static int mt9m001_g_mbus_config(struct v4l2_subdev *sd,
sd                154 drivers/media/i2c/mt9m032.c #define to_mt9m032(sd)	container_of(sd, struct mt9m032, subdev)
sd                545 drivers/media/i2c/mt9m032.c static int mt9m032_g_register(struct v4l2_subdev *sd,
sd                548 drivers/media/i2c/mt9m032.c 	struct mt9m032 *sensor = to_mt9m032(sd);
sd                565 drivers/media/i2c/mt9m032.c static int mt9m032_s_register(struct v4l2_subdev *sd,
sd                568 drivers/media/i2c/mt9m032.c 	struct mt9m032 *sensor = to_mt9m032(sd);
sd                451 drivers/media/i2c/mt9m111.c static int mt9m111_set_selection(struct v4l2_subdev *sd,
sd                455 drivers/media/i2c/mt9m111.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                495 drivers/media/i2c/mt9m111.c static int mt9m111_get_selection(struct v4l2_subdev *sd,
sd                499 drivers/media/i2c/mt9m111.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                520 drivers/media/i2c/mt9m111.c static int mt9m111_get_fmt(struct v4l2_subdev *sd,
sd                525 drivers/media/i2c/mt9m111.c 	struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
sd                532 drivers/media/i2c/mt9m111.c 		mf = v4l2_subdev_get_try_format(sd, cfg, format->pad);
sd                626 drivers/media/i2c/mt9m111.c static int mt9m111_set_fmt(struct v4l2_subdev *sd,
sd                631 drivers/media/i2c/mt9m111.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                632 drivers/media/i2c/mt9m111.c 	struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
sd                753 drivers/media/i2c/mt9m111.c static int mt9m111_g_register(struct v4l2_subdev *sd,
sd                756 drivers/media/i2c/mt9m111.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                772 drivers/media/i2c/mt9m111.c static int mt9m111_s_register(struct v4l2_subdev *sd,
sd                775 drivers/media/i2c/mt9m111.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1012 drivers/media/i2c/mt9m111.c static int mt9m111_s_power(struct v4l2_subdev *sd, int on)
sd               1014 drivers/media/i2c/mt9m111.c 	struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
sd               1055 drivers/media/i2c/mt9m111.c static int mt9m111_g_frame_interval(struct v4l2_subdev *sd,
sd               1058 drivers/media/i2c/mt9m111.c 	struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
sd               1065 drivers/media/i2c/mt9m111.c static int mt9m111_s_frame_interval(struct v4l2_subdev *sd,
sd               1068 drivers/media/i2c/mt9m111.c 	struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
sd               1102 drivers/media/i2c/mt9m111.c static int mt9m111_enum_mbus_code(struct v4l2_subdev *sd,
sd               1113 drivers/media/i2c/mt9m111.c static int mt9m111_s_stream(struct v4l2_subdev *sd, int enable)
sd               1115 drivers/media/i2c/mt9m111.c 	struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
sd               1121 drivers/media/i2c/mt9m111.c static int mt9m111_init_cfg(struct v4l2_subdev *sd,
sd               1126 drivers/media/i2c/mt9m111.c 		v4l2_subdev_get_try_format(sd, cfg, 0);
sd               1140 drivers/media/i2c/mt9m111.c static int mt9m111_g_mbus_config(struct v4l2_subdev *sd,
sd               1143 drivers/media/i2c/mt9m111.c 	struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
sd                146 drivers/media/i2c/mt9p031.c static struct mt9p031 *to_mt9p031(struct v4l2_subdev *sd)
sd                148 drivers/media/i2c/mt9p031.c 	return container_of(sd, struct mt9p031, subdev);
sd                135 drivers/media/i2c/mt9t001.c static inline struct mt9t001 *to_mt9t001(struct v4l2_subdev *sd)
sd                137 drivers/media/i2c/mt9t001.c 	return container_of(sd, struct mt9t001, subdev);
sd                721 drivers/media/i2c/mt9t112.c static int mt9t112_g_register(struct v4l2_subdev *sd,
sd                724 drivers/media/i2c/mt9t112.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                735 drivers/media/i2c/mt9t112.c static int mt9t112_s_register(struct v4l2_subdev *sd,
sd                738 drivers/media/i2c/mt9t112.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                774 drivers/media/i2c/mt9t112.c static int mt9t112_s_power(struct v4l2_subdev *sd, int on)
sd                776 drivers/media/i2c/mt9t112.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                794 drivers/media/i2c/mt9t112.c static int mt9t112_s_stream(struct v4l2_subdev *sd, int enable)
sd                796 drivers/media/i2c/mt9t112.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                874 drivers/media/i2c/mt9t112.c static int mt9t112_get_selection(struct v4l2_subdev *sd,
sd                878 drivers/media/i2c/mt9t112.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                899 drivers/media/i2c/mt9t112.c static int mt9t112_set_selection(struct v4l2_subdev *sd,
sd                903 drivers/media/i2c/mt9t112.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                914 drivers/media/i2c/mt9t112.c static int mt9t112_get_fmt(struct v4l2_subdev *sd,
sd                919 drivers/media/i2c/mt9t112.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                934 drivers/media/i2c/mt9t112.c static int mt9t112_s_fmt(struct v4l2_subdev *sd,
sd                937 drivers/media/i2c/mt9t112.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                955 drivers/media/i2c/mt9t112.c static int mt9t112_set_fmt(struct v4l2_subdev *sd,
sd                959 drivers/media/i2c/mt9t112.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                984 drivers/media/i2c/mt9t112.c 		return mt9t112_s_fmt(sd, mf);
sd                990 drivers/media/i2c/mt9t112.c static int mt9t112_enum_mbus_code(struct v4l2_subdev *sd,
sd                994 drivers/media/i2c/mt9t112.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 51 drivers/media/i2c/mt9v011.c 	struct v4l2_subdev sd;
sd                 65 drivers/media/i2c/mt9v011.c static inline struct mt9v011 *to_mt9v011(struct v4l2_subdev *sd)
sd                 67 drivers/media/i2c/mt9v011.c 	return container_of(sd, struct mt9v011, sd);
sd                 70 drivers/media/i2c/mt9v011.c static int mt9v011_read(struct v4l2_subdev *sd, unsigned char addr)
sd                 72 drivers/media/i2c/mt9v011.c 	struct i2c_client *c = v4l2_get_subdevdata(sd);
sd                 78 drivers/media/i2c/mt9v011.c 		v4l2_dbg(0, debug, sd,
sd                 85 drivers/media/i2c/mt9v011.c 		v4l2_dbg(0, debug, sd,
sd                 90 drivers/media/i2c/mt9v011.c 	v4l2_dbg(2, debug, sd, "mt9v011: read 0x%02x = 0x%04x\n", addr, val);
sd                 95 drivers/media/i2c/mt9v011.c static void mt9v011_write(struct v4l2_subdev *sd, unsigned char addr,
sd                 98 drivers/media/i2c/mt9v011.c 	struct i2c_client *c = v4l2_get_subdevdata(sd);
sd                106 drivers/media/i2c/mt9v011.c 	v4l2_dbg(2, debug, sd,
sd                110 drivers/media/i2c/mt9v011.c 		v4l2_dbg(0, debug, sd,
sd                175 drivers/media/i2c/mt9v011.c static void set_balance(struct v4l2_subdev *sd)
sd                177 drivers/media/i2c/mt9v011.c 	struct mt9v011 *core = to_mt9v011(sd);
sd                194 drivers/media/i2c/mt9v011.c 	mt9v011_write(sd, R2B_MT9V011_GREEN_1_GAIN, green_gain);
sd                195 drivers/media/i2c/mt9v011.c 	mt9v011_write(sd, R2E_MT9V011_GREEN_2_GAIN, green_gain);
sd                196 drivers/media/i2c/mt9v011.c 	mt9v011_write(sd, R2C_MT9V011_BLUE_GAIN, blue_gain);
sd                197 drivers/media/i2c/mt9v011.c 	mt9v011_write(sd, R2D_MT9V011_RED_GAIN, red_gain);
sd                198 drivers/media/i2c/mt9v011.c 	mt9v011_write(sd, R09_MT9V011_SHUTTER_WIDTH, exposure);
sd                201 drivers/media/i2c/mt9v011.c static void calc_fps(struct v4l2_subdev *sd, u32 *numerator, u32 *denominator)
sd                203 drivers/media/i2c/mt9v011.c 	struct mt9v011 *core = to_mt9v011(sd);
sd                209 drivers/media/i2c/mt9v011.c 	height = mt9v011_read(sd, R03_MT9V011_HEIGHT);
sd                210 drivers/media/i2c/mt9v011.c 	width = mt9v011_read(sd, R04_MT9V011_WIDTH);
sd                211 drivers/media/i2c/mt9v011.c 	hblank = mt9v011_read(sd, R05_MT9V011_HBLANK);
sd                212 drivers/media/i2c/mt9v011.c 	vblank = mt9v011_read(sd, R06_MT9V011_VBLANK);
sd                213 drivers/media/i2c/mt9v011.c 	speed = mt9v011_read(sd, R0A_MT9V011_CLK_SPEED);
sd                222 drivers/media/i2c/mt9v011.c 	v4l2_dbg(1, debug, sd, "Programmed to %u.%03u fps (%d pixel clcks)\n",
sd                231 drivers/media/i2c/mt9v011.c static u16 calc_speed(struct v4l2_subdev *sd, u32 numerator, u32 denominator)
sd                233 drivers/media/i2c/mt9v011.c 	struct mt9v011 *core = to_mt9v011(sd);
sd                242 drivers/media/i2c/mt9v011.c 	height = mt9v011_read(sd, R03_MT9V011_HEIGHT);
sd                243 drivers/media/i2c/mt9v011.c 	width = mt9v011_read(sd, R04_MT9V011_WIDTH);
sd                244 drivers/media/i2c/mt9v011.c 	hblank = mt9v011_read(sd, R05_MT9V011_HBLANK);
sd                245 drivers/media/i2c/mt9v011.c 	vblank = mt9v011_read(sd, R06_MT9V011_VBLANK);
sd                271 drivers/media/i2c/mt9v011.c static void set_res(struct v4l2_subdev *sd)
sd                273 drivers/media/i2c/mt9v011.c 	struct mt9v011 *core = to_mt9v011(sd);
sd                288 drivers/media/i2c/mt9v011.c 	mt9v011_write(sd, R02_MT9V011_COLSTART, hstart);
sd                289 drivers/media/i2c/mt9v011.c 	mt9v011_write(sd, R04_MT9V011_WIDTH, core->width);
sd                290 drivers/media/i2c/mt9v011.c 	mt9v011_write(sd, R05_MT9V011_HBLANK, 771 - core->width);
sd                293 drivers/media/i2c/mt9v011.c 	mt9v011_write(sd, R01_MT9V011_ROWSTART, vstart);
sd                294 drivers/media/i2c/mt9v011.c 	mt9v011_write(sd, R03_MT9V011_HEIGHT, core->height);
sd                295 drivers/media/i2c/mt9v011.c 	mt9v011_write(sd, R06_MT9V011_VBLANK, 508 - core->height);
sd                297 drivers/media/i2c/mt9v011.c 	calc_fps(sd, NULL, NULL);
sd                300 drivers/media/i2c/mt9v011.c static void set_read_mode(struct v4l2_subdev *sd)
sd                302 drivers/media/i2c/mt9v011.c 	struct mt9v011 *core = to_mt9v011(sd);
sd                311 drivers/media/i2c/mt9v011.c 	mt9v011_write(sd, R20_MT9V011_READ_MODE, mode);
sd                314 drivers/media/i2c/mt9v011.c static int mt9v011_reset(struct v4l2_subdev *sd, u32 val)
sd                319 drivers/media/i2c/mt9v011.c 		mt9v011_write(sd, mt9v011_init_default[i].reg,
sd                322 drivers/media/i2c/mt9v011.c 	set_balance(sd);
sd                323 drivers/media/i2c/mt9v011.c 	set_res(sd);
sd                324 drivers/media/i2c/mt9v011.c 	set_read_mode(sd);
sd                329 drivers/media/i2c/mt9v011.c static int mt9v011_enum_mbus_code(struct v4l2_subdev *sd,
sd                340 drivers/media/i2c/mt9v011.c static int mt9v011_set_fmt(struct v4l2_subdev *sd,
sd                345 drivers/media/i2c/mt9v011.c 	struct mt9v011 *core = to_mt9v011(sd);
sd                359 drivers/media/i2c/mt9v011.c 		set_res(sd);
sd                367 drivers/media/i2c/mt9v011.c static int mt9v011_g_frame_interval(struct v4l2_subdev *sd,
sd                370 drivers/media/i2c/mt9v011.c 	calc_fps(sd,
sd                377 drivers/media/i2c/mt9v011.c static int mt9v011_s_frame_interval(struct v4l2_subdev *sd,
sd                383 drivers/media/i2c/mt9v011.c 	speed = calc_speed(sd, tpf->numerator, tpf->denominator);
sd                385 drivers/media/i2c/mt9v011.c 	mt9v011_write(sd, R0A_MT9V011_CLK_SPEED, speed);
sd                386 drivers/media/i2c/mt9v011.c 	v4l2_dbg(1, debug, sd, "Setting speed to %d\n", speed);
sd                389 drivers/media/i2c/mt9v011.c 	calc_fps(sd, &tpf->numerator, &tpf->denominator);
sd                395 drivers/media/i2c/mt9v011.c static int mt9v011_g_register(struct v4l2_subdev *sd,
sd                398 drivers/media/i2c/mt9v011.c 	reg->val = mt9v011_read(sd, reg->reg & 0xff);
sd                404 drivers/media/i2c/mt9v011.c static int mt9v011_s_register(struct v4l2_subdev *sd,
sd                407 drivers/media/i2c/mt9v011.c 	mt9v011_write(sd, reg->reg & 0xff, reg->val & 0xffff);
sd                417 drivers/media/i2c/mt9v011.c 	struct v4l2_subdev *sd = &core->sd;
sd                434 drivers/media/i2c/mt9v011.c 		set_read_mode(sd);
sd                438 drivers/media/i2c/mt9v011.c 		set_read_mode(sd);
sd                444 drivers/media/i2c/mt9v011.c 	set_balance(sd);
sd                486 drivers/media/i2c/mt9v011.c 	struct v4l2_subdev *sd;
sd                500 drivers/media/i2c/mt9v011.c 	sd = &core->sd;
sd                501 drivers/media/i2c/mt9v011.c 	v4l2_i2c_subdev_init(sd, c, &mt9v011_ops);
sd                505 drivers/media/i2c/mt9v011.c 	sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd                507 drivers/media/i2c/mt9v011.c 	ret = media_entity_pads_init(&sd->entity, 1, &core->pad);
sd                513 drivers/media/i2c/mt9v011.c 	version = mt9v011_read(sd, R00_MT9V011_CHIP_VERSION);
sd                516 drivers/media/i2c/mt9v011.c 		v4l2_info(sd, "*** unknown micron chip detected (0x%04x).\n",
sd                538 drivers/media/i2c/mt9v011.c 		v4l2_err(sd, "control initialization error %d\n", ret);
sd                542 drivers/media/i2c/mt9v011.c 	core->sd.ctrl_handler = &core->ctrls;
sd                554 drivers/media/i2c/mt9v011.c 		v4l2_dbg(1, debug, sd, "xtal set to %d.%03d MHz\n",
sd                566 drivers/media/i2c/mt9v011.c 	struct v4l2_subdev *sd = i2c_get_clientdata(c);
sd                567 drivers/media/i2c/mt9v011.c 	struct mt9v011 *core = to_mt9v011(sd);
sd                569 drivers/media/i2c/mt9v011.c 	v4l2_dbg(1, debug, sd,
sd                573 drivers/media/i2c/mt9v011.c 	v4l2_device_unregister_subdev(sd);
sd                220 drivers/media/i2c/mt9v032.c static struct mt9v032 *to_mt9v032(struct v4l2_subdev *sd)
sd                222 drivers/media/i2c/mt9v032.c 	return container_of(sd, struct mt9v032, subdev);
sd                123 drivers/media/i2c/mt9v111.c 	struct v4l2_subdev sd;
sd                158 drivers/media/i2c/mt9v111.c #define sd_to_mt9v111(__sd) container_of((__sd), struct mt9v111_dev, sd)
sd                277 drivers/media/i2c/mt9v111.c 	struct v4l2_subdev *sd = i2c_get_clientdata(c);
sd                278 drivers/media/i2c/mt9v111.c 	struct mt9v111_dev *mt9v111 = sd_to_mt9v111(sd);
sd                361 drivers/media/i2c/mt9v111.c static int __mt9v111_power_on(struct v4l2_subdev *sd)
sd                363 drivers/media/i2c/mt9v111.c 	struct mt9v111_dev *mt9v111 = sd_to_mt9v111(sd);
sd                381 drivers/media/i2c/mt9v111.c static int __mt9v111_power_off(struct v4l2_subdev *sd)
sd                383 drivers/media/i2c/mt9v111.c 	struct mt9v111_dev *mt9v111 = sd_to_mt9v111(sd);
sd                646 drivers/media/i2c/mt9v111.c static int mt9v111_s_power(struct v4l2_subdev *sd, int on)
sd                648 drivers/media/i2c/mt9v111.c 	struct mt9v111_dev *mt9v111 = sd_to_mt9v111(sd);
sd                661 drivers/media/i2c/mt9v111.c 		ret = on ? __mt9v111_power_on(sd) :
sd                662 drivers/media/i2c/mt9v111.c 			   __mt9v111_power_off(sd);
sd                724 drivers/media/i2c/mt9v111.c static int mt9v111_s_frame_interval(struct v4l2_subdev *sd,
sd                727 drivers/media/i2c/mt9v111.c 	struct mt9v111_dev *mt9v111 = sd_to_mt9v111(sd);
sd                776 drivers/media/i2c/mt9v111.c static int mt9v111_g_frame_interval(struct v4l2_subdev *sd,
sd                779 drivers/media/i2c/mt9v111.c 	struct mt9v111_dev *mt9v111 = sd_to_mt9v111(sd);
sd                801 drivers/media/i2c/mt9v111.c 		return v4l2_subdev_get_try_format(&mt9v111->sd, cfg, pad);
sd                824 drivers/media/i2c/mt9v111.c static int mt9v111_enum_frame_interval(struct v4l2_subdev *sd,
sd               1080 drivers/media/i2c/mt9v111.c 	ret = __mt9v111_power_on(&mt9v111->sd);
sd               1102 drivers/media/i2c/mt9v111.c 	__mt9v111_power_off(&mt9v111->sd);
sd               1188 drivers/media/i2c/mt9v111.c 	mt9v111->sd.ctrl_handler = &mt9v111->ctrls;
sd               1203 drivers/media/i2c/mt9v111.c 	v4l2_i2c_subdev_init(&mt9v111->sd, client, &mt9v111_ops);
sd               1206 drivers/media/i2c/mt9v111.c 	mt9v111->sd.flags	|= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1207 drivers/media/i2c/mt9v111.c 	mt9v111->sd.entity.ops	= &mt9v111_subdev_entity_ops;
sd               1208 drivers/media/i2c/mt9v111.c 	mt9v111->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1211 drivers/media/i2c/mt9v111.c 	ret = media_entity_pads_init(&mt9v111->sd.entity, 1, &mt9v111->pad);
sd               1220 drivers/media/i2c/mt9v111.c 	ret = v4l2_async_register_subdev(&mt9v111->sd);
sd               1228 drivers/media/i2c/mt9v111.c 	media_entity_cleanup(&mt9v111->sd.entity);
sd               1242 drivers/media/i2c/mt9v111.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1243 drivers/media/i2c/mt9v111.c 	struct mt9v111_dev *mt9v111 = sd_to_mt9v111(sd);
sd               1245 drivers/media/i2c/mt9v111.c 	v4l2_async_unregister_subdev(sd);
sd               1248 drivers/media/i2c/mt9v111.c 	media_entity_cleanup(&sd->entity);
sd                129 drivers/media/i2c/noon010pc30.c 	struct v4l2_subdev sd;
sd                231 drivers/media/i2c/noon010pc30.c static inline struct noon010_info *to_noon010(struct v4l2_subdev *sd)
sd                233 drivers/media/i2c/noon010pc30.c 	return container_of(sd, struct noon010_info, sd);
sd                238 drivers/media/i2c/noon010pc30.c 	return &container_of(ctrl->handler, struct noon010_info, hdl)->sd;
sd                255 drivers/media/i2c/noon010pc30.c static int cam_i2c_read(struct v4l2_subdev *sd, u32 reg_addr)
sd                257 drivers/media/i2c/noon010pc30.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                258 drivers/media/i2c/noon010pc30.c 	struct noon010_info *info = to_noon010(sd);
sd                266 drivers/media/i2c/noon010pc30.c static int cam_i2c_write(struct v4l2_subdev *sd, u32 reg_addr, u32 val)
sd                268 drivers/media/i2c/noon010pc30.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                269 drivers/media/i2c/noon010pc30.c 	struct noon010_info *info = to_noon010(sd);
sd                277 drivers/media/i2c/noon010pc30.c static inline int noon010_bulk_write_reg(struct v4l2_subdev *sd,
sd                281 drivers/media/i2c/noon010pc30.c 		int ret = cam_i2c_write(sd, msg->addr, msg->val);
sd                291 drivers/media/i2c/noon010pc30.c static int noon010_power_ctrl(struct v4l2_subdev *sd, bool reset, bool sleep)
sd                293 drivers/media/i2c/noon010pc30.c 	struct noon010_info *info = to_noon010(sd);
sd                298 drivers/media/i2c/noon010pc30.c 		ret = cam_i2c_write(sd, POWER_CTRL_REG, reg | 0x02);
sd                302 drivers/media/i2c/noon010pc30.c 		ret = cam_i2c_write(sd, POWER_CTRL_REG, reg);
sd                310 drivers/media/i2c/noon010pc30.c static int noon010_enable_autowhitebalance(struct v4l2_subdev *sd, int on)
sd                314 drivers/media/i2c/noon010pc30.c 	ret = cam_i2c_write(sd, AWB_CTL_REG(1), on ? 0x2E : 0x2F);
sd                316 drivers/media/i2c/noon010pc30.c 		ret = cam_i2c_write(sd, AWB_CTL_REG(0), on ? 0xFB : 0x7B);
sd                321 drivers/media/i2c/noon010pc30.c static int noon010_set_flip(struct v4l2_subdev *sd, int hflip, int vflip)
sd                323 drivers/media/i2c/noon010pc30.c 	struct noon010_info *info = to_noon010(sd);
sd                326 drivers/media/i2c/noon010pc30.c 	reg = cam_i2c_read(sd, VDO_CTL_REG(1));
sd                336 drivers/media/i2c/noon010pc30.c 	ret = cam_i2c_write(sd, VDO_CTL_REG(1), reg | 0x80);
sd                345 drivers/media/i2c/noon010pc30.c static int noon010_set_params(struct v4l2_subdev *sd)
sd                347 drivers/media/i2c/noon010pc30.c 	struct noon010_info *info = to_noon010(sd);
sd                349 drivers/media/i2c/noon010pc30.c 	int ret = cam_i2c_write(sd, VDO_CTL_REG(0),
sd                353 drivers/media/i2c/noon010pc30.c 	return cam_i2c_write(sd, ISP_CTL_REG(0),
sd                392 drivers/media/i2c/noon010pc30.c 		v4l2_info(&info->sd, "%s: sensor is already on\n", __func__);
sd                423 drivers/media/i2c/noon010pc30.c 	v4l2_dbg(1, debug, &info->sd,  "%s: sensor is on\n", __func__);
sd                433 drivers/media/i2c/noon010pc30.c 		v4l2_info(&info->sd, "%s: sensor is already off\n", __func__);
sd                449 drivers/media/i2c/noon010pc30.c 	v4l2_dbg(1, debug, &info->sd,  "%s: sensor is off\n", __func__);
sd                456 drivers/media/i2c/noon010pc30.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                457 drivers/media/i2c/noon010pc30.c 	struct noon010_info *info = to_noon010(sd);
sd                460 drivers/media/i2c/noon010pc30.c 	v4l2_dbg(1, debug, sd, "%s: ctrl_id: %d, value: %d\n",
sd                474 drivers/media/i2c/noon010pc30.c 		ret = noon010_enable_autowhitebalance(sd, ctrl->val);
sd                477 drivers/media/i2c/noon010pc30.c 		ret = cam_i2c_write(sd, MWB_BGAIN_REG, ctrl->val);
sd                480 drivers/media/i2c/noon010pc30.c 		ret =  cam_i2c_write(sd, MWB_RGAIN_REG, ctrl->val);
sd                490 drivers/media/i2c/noon010pc30.c static int noon010_enum_mbus_code(struct v4l2_subdev *sd,
sd                501 drivers/media/i2c/noon010pc30.c static int noon010_get_fmt(struct v4l2_subdev *sd,
sd                505 drivers/media/i2c/noon010pc30.c 	struct noon010_info *info = to_noon010(sd);
sd                510 drivers/media/i2c/noon010pc30.c 			mf = v4l2_subdev_get_try_format(sd, cfg, 0);
sd                529 drivers/media/i2c/noon010pc30.c static const struct noon010_format *noon010_try_fmt(struct v4l2_subdev *sd,
sd                542 drivers/media/i2c/noon010pc30.c static int noon010_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd                545 drivers/media/i2c/noon010pc30.c 	struct noon010_info *info = to_noon010(sd);
sd                551 drivers/media/i2c/noon010pc30.c 	nf = noon010_try_fmt(sd, &fmt->format);
sd                558 drivers/media/i2c/noon010pc30.c 			mf = v4l2_subdev_get_try_format(sd, cfg, 0);
sd                576 drivers/media/i2c/noon010pc30.c static int noon010_base_config(struct v4l2_subdev *sd)
sd                578 drivers/media/i2c/noon010pc30.c 	int ret = noon010_bulk_write_reg(sd, noon010_base_regs);
sd                580 drivers/media/i2c/noon010pc30.c 		ret = noon010_set_params(sd);
sd                582 drivers/media/i2c/noon010pc30.c 		ret = noon010_set_flip(sd, 1, 0);
sd                587 drivers/media/i2c/noon010pc30.c static int noon010_s_power(struct v4l2_subdev *sd, int on)
sd                589 drivers/media/i2c/noon010pc30.c 	struct noon010_info *info = to_noon010(sd);
sd                596 drivers/media/i2c/noon010pc30.c 			ret = noon010_base_config(sd);
sd                598 drivers/media/i2c/noon010pc30.c 		noon010_power_ctrl(sd, false, true);
sd                610 drivers/media/i2c/noon010pc30.c static int noon010_s_stream(struct v4l2_subdev *sd, int on)
sd                612 drivers/media/i2c/noon010pc30.c 	struct noon010_info *info = to_noon010(sd);
sd                617 drivers/media/i2c/noon010pc30.c 		ret = noon010_power_ctrl(sd, false, !on);
sd                622 drivers/media/i2c/noon010pc30.c 		ret = noon010_set_params(sd);
sd                630 drivers/media/i2c/noon010pc30.c static int noon010_log_status(struct v4l2_subdev *sd)
sd                632 drivers/media/i2c/noon010pc30.c 	struct noon010_info *info = to_noon010(sd);
sd                634 drivers/media/i2c/noon010pc30.c 	v4l2_ctrl_handler_log_status(&info->hdl, sd->name);
sd                638 drivers/media/i2c/noon010pc30.c static int noon010_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                640 drivers/media/i2c/noon010pc30.c 	struct v4l2_mbus_framefmt *mf = v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd                701 drivers/media/i2c/noon010pc30.c 	struct v4l2_subdev *sd;
sd                717 drivers/media/i2c/noon010pc30.c 	sd = &info->sd;
sd                718 drivers/media/i2c/noon010pc30.c 	v4l2_i2c_subdev_init(sd, client, &noon010_ops);
sd                720 drivers/media/i2c/noon010pc30.c 	strscpy(sd->name, MODULE_NAME, sizeof(sd->name));
sd                722 drivers/media/i2c/noon010pc30.c 	sd->internal_ops = &noon010_subdev_internal_ops;
sd                723 drivers/media/i2c/noon010pc30.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                734 drivers/media/i2c/noon010pc30.c 	sd->ctrl_handler = &info->hdl;
sd                779 drivers/media/i2c/noon010pc30.c 	sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd                780 drivers/media/i2c/noon010pc30.c 	ret = media_entity_pads_init(&sd->entity, 1, &info->pad);
sd                790 drivers/media/i2c/noon010pc30.c 	v4l2_device_unregister_subdev(sd);
sd                796 drivers/media/i2c/noon010pc30.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                797 drivers/media/i2c/noon010pc30.c 	struct noon010_info *info = to_noon010(sd);
sd                799 drivers/media/i2c/noon010pc30.c 	v4l2_device_unregister_subdev(sd);
sd                801 drivers/media/i2c/noon010pc30.c 	media_entity_cleanup(&sd->entity);
sd               1029 drivers/media/i2c/ov13858.c 	struct v4l2_subdev sd;
sd               1050 drivers/media/i2c/ov13858.c #define to_ov13858(_sd)	container_of(_sd, struct ov13858, sd)
sd               1056 drivers/media/i2c/ov13858.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov13858->sd);
sd               1092 drivers/media/i2c/ov13858.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov13858->sd);
sd               1121 drivers/media/i2c/ov13858.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov13858->sd);
sd               1148 drivers/media/i2c/ov13858.c static int ov13858_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1150 drivers/media/i2c/ov13858.c 	struct ov13858 *ov13858 = to_ov13858(sd);
sd               1151 drivers/media/i2c/ov13858.c 	struct v4l2_mbus_framefmt *try_fmt = v4l2_subdev_get_try_format(sd,
sd               1214 drivers/media/i2c/ov13858.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov13858->sd);
sd               1276 drivers/media/i2c/ov13858.c static int ov13858_enum_mbus_code(struct v4l2_subdev *sd,
sd               1289 drivers/media/i2c/ov13858.c static int ov13858_enum_frame_size(struct v4l2_subdev *sd,
sd               1321 drivers/media/i2c/ov13858.c 	struct v4l2_subdev *sd = &ov13858->sd;
sd               1324 drivers/media/i2c/ov13858.c 		framefmt = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1333 drivers/media/i2c/ov13858.c static int ov13858_get_pad_format(struct v4l2_subdev *sd,
sd               1337 drivers/media/i2c/ov13858.c 	struct ov13858 *ov13858 = to_ov13858(sd);
sd               1348 drivers/media/i2c/ov13858.c ov13858_set_pad_format(struct v4l2_subdev *sd,
sd               1352 drivers/media/i2c/ov13858.c 	struct ov13858 *ov13858 = to_ov13858(sd);
sd               1373 drivers/media/i2c/ov13858.c 		framefmt = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1404 drivers/media/i2c/ov13858.c static int ov13858_get_skip_frames(struct v4l2_subdev *sd, u32 *frames)
sd               1414 drivers/media/i2c/ov13858.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov13858->sd);
sd               1445 drivers/media/i2c/ov13858.c 	ret =  __v4l2_ctrl_handler_setup(ov13858->sd.ctrl_handler);
sd               1461 drivers/media/i2c/ov13858.c static int ov13858_set_stream(struct v4l2_subdev *sd, int enable)
sd               1463 drivers/media/i2c/ov13858.c 	struct ov13858 *ov13858 = to_ov13858(sd);
sd               1464 drivers/media/i2c/ov13858.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1508 drivers/media/i2c/ov13858.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1509 drivers/media/i2c/ov13858.c 	struct ov13858 *ov13858 = to_ov13858(sd);
sd               1520 drivers/media/i2c/ov13858.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1521 drivers/media/i2c/ov13858.c 	struct ov13858 *ov13858 = to_ov13858(sd);
sd               1541 drivers/media/i2c/ov13858.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov13858->sd);
sd               1591 drivers/media/i2c/ov13858.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov13858->sd);
sd               1669 drivers/media/i2c/ov13858.c 	ov13858->sd.ctrl_handler = ctrl_hdlr;
sd               1682 drivers/media/i2c/ov13858.c 	v4l2_ctrl_handler_free(ov13858->sd.ctrl_handler);
sd               1702 drivers/media/i2c/ov13858.c 	v4l2_i2c_subdev_init(&ov13858->sd, client, &ov13858_subdev_ops);
sd               1719 drivers/media/i2c/ov13858.c 	ov13858->sd.internal_ops = &ov13858_internal_ops;
sd               1720 drivers/media/i2c/ov13858.c 	ov13858->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1721 drivers/media/i2c/ov13858.c 	ov13858->sd.entity.ops = &ov13858_subdev_entity_ops;
sd               1722 drivers/media/i2c/ov13858.c 	ov13858->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1726 drivers/media/i2c/ov13858.c 	ret = media_entity_pads_init(&ov13858->sd.entity, 1, &ov13858->pad);
sd               1732 drivers/media/i2c/ov13858.c 	ret = v4l2_async_register_subdev_sensor_common(&ov13858->sd);
sd               1747 drivers/media/i2c/ov13858.c 	media_entity_cleanup(&ov13858->sd.entity);
sd               1758 drivers/media/i2c/ov13858.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1759 drivers/media/i2c/ov13858.c 	struct ov13858 *ov13858 = to_ov13858(sd);
sd               1761 drivers/media/i2c/ov13858.c 	v4l2_async_unregister_subdev(sd);
sd               1762 drivers/media/i2c/ov13858.c 	media_entity_cleanup(&sd->entity);
sd                716 drivers/media/i2c/ov2640.c 	struct v4l2_subdev *sd =
sd                718 drivers/media/i2c/ov2640.c 	struct i2c_client  *client = v4l2_get_subdevdata(sd);
sd                755 drivers/media/i2c/ov2640.c static int ov2640_g_register(struct v4l2_subdev *sd,
sd                758 drivers/media/i2c/ov2640.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                774 drivers/media/i2c/ov2640.c static int ov2640_s_register(struct v4l2_subdev *sd,
sd                777 drivers/media/i2c/ov2640.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                801 drivers/media/i2c/ov2640.c static int ov2640_s_power(struct v4l2_subdev *sd, int on)
sd                803 drivers/media/i2c/ov2640.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                915 drivers/media/i2c/ov2640.c static int ov2640_get_fmt(struct v4l2_subdev *sd,
sd                920 drivers/media/i2c/ov2640.c 	struct i2c_client  *client = v4l2_get_subdevdata(sd);
sd                928 drivers/media/i2c/ov2640.c 		mf = v4l2_subdev_get_try_format(sd, cfg, 0);
sd                948 drivers/media/i2c/ov2640.c static int ov2640_set_fmt(struct v4l2_subdev *sd,
sd                953 drivers/media/i2c/ov2640.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1007 drivers/media/i2c/ov2640.c static int ov2640_init_cfg(struct v4l2_subdev *sd,
sd               1012 drivers/media/i2c/ov2640.c 		v4l2_subdev_get_try_format(sd, cfg, 0);
sd               1028 drivers/media/i2c/ov2640.c static int ov2640_enum_mbus_code(struct v4l2_subdev *sd,
sd               1039 drivers/media/i2c/ov2640.c static int ov2640_get_selection(struct v4l2_subdev *sd,
sd               1059 drivers/media/i2c/ov2640.c static int ov2640_s_stream(struct v4l2_subdev *sd, int on)
sd               1061 drivers/media/i2c/ov2640.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                222 drivers/media/i2c/ov2659.c 	struct v4l2_subdev sd;
sd                836 drivers/media/i2c/ov2659.c static inline struct ov2659 *to_ov2659(struct v4l2_subdev *sd)
sd                838 drivers/media/i2c/ov2659.c 	return container_of(sd, struct ov2659, sd);
sd                990 drivers/media/i2c/ov2659.c static int ov2659_init(struct v4l2_subdev *sd, u32 val)
sd                992 drivers/media/i2c/ov2659.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1001 drivers/media/i2c/ov2659.c static int ov2659_enum_mbus_code(struct v4l2_subdev *sd,
sd               1005 drivers/media/i2c/ov2659.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1017 drivers/media/i2c/ov2659.c static int ov2659_enum_frame_sizes(struct v4l2_subdev *sd,
sd               1021 drivers/media/i2c/ov2659.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1043 drivers/media/i2c/ov2659.c static int ov2659_get_fmt(struct v4l2_subdev *sd,
sd               1047 drivers/media/i2c/ov2659.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1048 drivers/media/i2c/ov2659.c 	struct ov2659 *ov2659 = to_ov2659(sd);
sd               1056 drivers/media/i2c/ov2659.c 		mf = v4l2_subdev_get_try_format(sd, cfg, 0);
sd               1105 drivers/media/i2c/ov2659.c static int ov2659_set_fmt(struct v4l2_subdev *sd,
sd               1109 drivers/media/i2c/ov2659.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1113 drivers/media/i2c/ov2659.c 	struct ov2659 *ov2659 = to_ov2659(sd);
sd               1136 drivers/media/i2c/ov2659.c 		mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1186 drivers/media/i2c/ov2659.c static int ov2659_s_stream(struct v4l2_subdev *sd, int on)
sd               1188 drivers/media/i2c/ov2659.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1189 drivers/media/i2c/ov2659.c 	struct ov2659 *ov2659 = to_ov2659(sd);
sd               1225 drivers/media/i2c/ov2659.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov2659->sd);
sd               1273 drivers/media/i2c/ov2659.c static int ov2659_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1275 drivers/media/i2c/ov2659.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1277 drivers/media/i2c/ov2659.c 				v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd               1316 drivers/media/i2c/ov2659.c static int ov2659_detect(struct v4l2_subdev *sd)
sd               1318 drivers/media/i2c/ov2659.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1347 drivers/media/i2c/ov2659.c 			ret = ov2659_init(sd, 0);
sd               1398 drivers/media/i2c/ov2659.c 	struct v4l2_subdev *sd;
sd               1435 drivers/media/i2c/ov2659.c 	ov2659->sd.ctrl_handler = &ov2659->ctrls;
sd               1443 drivers/media/i2c/ov2659.c 	sd = &ov2659->sd;
sd               1446 drivers/media/i2c/ov2659.c 	v4l2_i2c_subdev_init(sd, client, &ov2659_subdev_ops);
sd               1448 drivers/media/i2c/ov2659.c 	sd->internal_ops = &ov2659_subdev_internal_ops;
sd               1449 drivers/media/i2c/ov2659.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
sd               1455 drivers/media/i2c/ov2659.c 	sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1456 drivers/media/i2c/ov2659.c 	ret = media_entity_pads_init(&sd->entity, 1, &ov2659->pad);
sd               1469 drivers/media/i2c/ov2659.c 	ret = ov2659_detect(sd);
sd               1476 drivers/media/i2c/ov2659.c 	ret = v4l2_async_register_subdev(&ov2659->sd);
sd               1480 drivers/media/i2c/ov2659.c 	dev_info(&client->dev, "%s sensor driver registered !!\n", sd->name);
sd               1486 drivers/media/i2c/ov2659.c 	media_entity_cleanup(&sd->entity);
sd               1493 drivers/media/i2c/ov2659.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1494 drivers/media/i2c/ov2659.c 	struct ov2659 *ov2659 = to_ov2659(sd);
sd               1497 drivers/media/i2c/ov2659.c 	v4l2_async_unregister_subdev(sd);
sd               1498 drivers/media/i2c/ov2659.c 	media_entity_cleanup(&sd->entity);
sd                104 drivers/media/i2c/ov2680.c 	struct v4l2_subdev		sd;
sd                181 drivers/media/i2c/ov2680.c static struct ov2680_dev *to_ov2680_dev(struct v4l2_subdev *sd)
sd                183 drivers/media/i2c/ov2680.c 	return container_of(sd, struct ov2680_dev, sd);
sd                194 drivers/media/i2c/ov2680.c 			     ctrls.handler)->sd;
sd                581 drivers/media/i2c/ov2680.c static int ov2680_s_power(struct v4l2_subdev *sd, int on)
sd                583 drivers/media/i2c/ov2680.c 	struct ov2680_dev *sensor = to_ov2680_dev(sd);
sd                606 drivers/media/i2c/ov2680.c static int ov2680_s_g_frame_interval(struct v4l2_subdev *sd,
sd                609 drivers/media/i2c/ov2680.c 	struct ov2680_dev *sensor = to_ov2680_dev(sd);
sd                618 drivers/media/i2c/ov2680.c static int ov2680_s_stream(struct v4l2_subdev *sd, int enable)
sd                620 drivers/media/i2c/ov2680.c 	struct ov2680_dev *sensor = to_ov2680_dev(sd);
sd                647 drivers/media/i2c/ov2680.c static int ov2680_enum_mbus_code(struct v4l2_subdev *sd,
sd                651 drivers/media/i2c/ov2680.c 	struct ov2680_dev *sensor = to_ov2680_dev(sd);
sd                661 drivers/media/i2c/ov2680.c static int ov2680_get_fmt(struct v4l2_subdev *sd,
sd                665 drivers/media/i2c/ov2680.c 	struct ov2680_dev *sensor = to_ov2680_dev(sd);
sd                676 drivers/media/i2c/ov2680.c 		fmt = v4l2_subdev_get_try_format(&sensor->sd, cfg, format->pad);
sd                692 drivers/media/i2c/ov2680.c static int ov2680_set_fmt(struct v4l2_subdev *sd,
sd                696 drivers/media/i2c/ov2680.c 	struct ov2680_dev *sensor = to_ov2680_dev(sd);
sd                724 drivers/media/i2c/ov2680.c 		try_fmt = v4l2_subdev_get_try_format(sd, cfg, 0);
sd                745 drivers/media/i2c/ov2680.c static int ov2680_init_cfg(struct v4l2_subdev *sd,
sd                757 drivers/media/i2c/ov2680.c 	return ov2680_set_fmt(sd, cfg, &fmt);
sd                760 drivers/media/i2c/ov2680.c static int ov2680_enum_frame_size(struct v4l2_subdev *sd,
sd                777 drivers/media/i2c/ov2680.c static int ov2680_enum_frame_interval(struct v4l2_subdev *sd,
sd                798 drivers/media/i2c/ov2680.c 	struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
sd                799 drivers/media/i2c/ov2680.c 	struct ov2680_dev *sensor = to_ov2680_dev(sd);
sd                826 drivers/media/i2c/ov2680.c 	struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
sd                827 drivers/media/i2c/ov2680.c 	struct ov2680_dev *sensor = to_ov2680_dev(sd);
sd                925 drivers/media/i2c/ov2680.c 	v4l2_i2c_subdev_init(&sensor->sd, sensor->i2c_client,
sd                929 drivers/media/i2c/ov2680.c 	sensor->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                932 drivers/media/i2c/ov2680.c 	sensor->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd                934 drivers/media/i2c/ov2680.c 	ret = media_entity_pads_init(&sensor->sd.entity, 1, &sensor->pad);
sd                973 drivers/media/i2c/ov2680.c 	sensor->sd.ctrl_handler = hdl;
sd                975 drivers/media/i2c/ov2680.c 	ret = v4l2_async_register_subdev(&sensor->sd);
sd                982 drivers/media/i2c/ov2680.c 	media_entity_cleanup(&sensor->sd.entity);
sd               1101 drivers/media/i2c/ov2680.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1102 drivers/media/i2c/ov2680.c 	struct ov2680_dev *sensor = to_ov2680_dev(sd);
sd               1104 drivers/media/i2c/ov2680.c 	v4l2_async_unregister_subdev(&sensor->sd);
sd               1106 drivers/media/i2c/ov2680.c 	media_entity_cleanup(&sensor->sd.entity);
sd               1115 drivers/media/i2c/ov2680.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1116 drivers/media/i2c/ov2680.c 	struct ov2680_dev *sensor = to_ov2680_dev(sd);
sd               1127 drivers/media/i2c/ov2680.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1128 drivers/media/i2c/ov2680.c 	struct ov2680_dev *sensor = to_ov2680_dev(sd);
sd                103 drivers/media/i2c/ov2685.c #define to_ov2685(sd) container_of(sd, struct ov2685, subdev)
sd                330 drivers/media/i2c/ov2685.c static int ov2685_set_fmt(struct v4l2_subdev *sd,
sd                334 drivers/media/i2c/ov2685.c 	struct ov2685 *ov2685 = to_ov2685(sd);
sd                343 drivers/media/i2c/ov2685.c static int ov2685_get_fmt(struct v4l2_subdev *sd,
sd                347 drivers/media/i2c/ov2685.c 	struct ov2685 *ov2685 = to_ov2685(sd);
sd                355 drivers/media/i2c/ov2685.c static int ov2685_enum_mbus_code(struct v4l2_subdev *sd,
sd                367 drivers/media/i2c/ov2685.c static int ov2685_enum_frame_sizes(struct v4l2_subdev *sd,
sd                446 drivers/media/i2c/ov2685.c static int ov2685_s_stream(struct v4l2_subdev *sd, int on)
sd                448 drivers/media/i2c/ov2685.c 	struct ov2685 *ov2685 = to_ov2685(sd);
sd                490 drivers/media/i2c/ov2685.c static int ov2685_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                492 drivers/media/i2c/ov2685.c 	struct ov2685 *ov2685 = to_ov2685(sd);
sd                497 drivers/media/i2c/ov2685.c 	try_fmt = v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd                510 drivers/media/i2c/ov2685.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                511 drivers/media/i2c/ov2685.c 	struct ov2685 *ov2685 = to_ov2685(sd);
sd                519 drivers/media/i2c/ov2685.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                520 drivers/media/i2c/ov2685.c 	struct ov2685 *ov2685 = to_ov2685(sd);
sd                806 drivers/media/i2c/ov2685.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                807 drivers/media/i2c/ov2685.c 	struct ov2685 *ov2685 = to_ov2685(sd);
sd                809 drivers/media/i2c/ov2685.c 	v4l2_async_unregister_subdev(sd);
sd                811 drivers/media/i2c/ov2685.c 	media_entity_cleanup(&sd->entity);
sd                221 drivers/media/i2c/ov5640.c 	struct v4l2_subdev sd;
sd                254 drivers/media/i2c/ov5640.c static inline struct ov5640_dev *to_ov5640_dev(struct v4l2_subdev *sd)
sd                256 drivers/media/i2c/ov5640.c 	return container_of(sd, struct ov5640_dev, sd);
sd                262 drivers/media/i2c/ov5640.c 			     ctrls.handler)->sd;
sd               2073 drivers/media/i2c/ov5640.c static int ov5640_s_power(struct v4l2_subdev *sd, int on)
sd               2075 drivers/media/i2c/ov5640.c 	struct ov5640_dev *sensor = to_ov5640_dev(sd);
sd               2144 drivers/media/i2c/ov5640.c static int ov5640_get_fmt(struct v4l2_subdev *sd,
sd               2148 drivers/media/i2c/ov5640.c 	struct ov5640_dev *sensor = to_ov5640_dev(sd);
sd               2157 drivers/media/i2c/ov5640.c 		fmt = v4l2_subdev_get_try_format(&sensor->sd, cfg,
sd               2169 drivers/media/i2c/ov5640.c static int ov5640_try_fmt_internal(struct v4l2_subdev *sd,
sd               2174 drivers/media/i2c/ov5640.c 	struct ov5640_dev *sensor = to_ov5640_dev(sd);
sd               2202 drivers/media/i2c/ov5640.c static int ov5640_set_fmt(struct v4l2_subdev *sd,
sd               2206 drivers/media/i2c/ov5640.c 	struct ov5640_dev *sensor = to_ov5640_dev(sd);
sd               2222 drivers/media/i2c/ov5640.c 	ret = ov5640_try_fmt_internal(sd, mbus_fmt,
sd               2228 drivers/media/i2c/ov5640.c 		fmt = v4l2_subdev_get_try_format(sd, cfg, 0);
sd               2569 drivers/media/i2c/ov5640.c 	struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
sd               2570 drivers/media/i2c/ov5640.c 	struct ov5640_dev *sensor = to_ov5640_dev(sd);
sd               2595 drivers/media/i2c/ov5640.c 	struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
sd               2596 drivers/media/i2c/ov5640.c 	struct ov5640_dev *sensor = to_ov5640_dev(sd);
sd               2719 drivers/media/i2c/ov5640.c 	sensor->sd.ctrl_handler = hdl;
sd               2727 drivers/media/i2c/ov5640.c static int ov5640_enum_frame_size(struct v4l2_subdev *sd,
sd               2747 drivers/media/i2c/ov5640.c 	struct v4l2_subdev *sd,
sd               2751 drivers/media/i2c/ov5640.c 	struct ov5640_dev *sensor = to_ov5640_dev(sd);
sd               2772 drivers/media/i2c/ov5640.c static int ov5640_g_frame_interval(struct v4l2_subdev *sd,
sd               2775 drivers/media/i2c/ov5640.c 	struct ov5640_dev *sensor = to_ov5640_dev(sd);
sd               2784 drivers/media/i2c/ov5640.c static int ov5640_s_frame_interval(struct v4l2_subdev *sd,
sd               2787 drivers/media/i2c/ov5640.c 	struct ov5640_dev *sensor = to_ov5640_dev(sd);
sd               2830 drivers/media/i2c/ov5640.c static int ov5640_enum_mbus_code(struct v4l2_subdev *sd,
sd               2843 drivers/media/i2c/ov5640.c static int ov5640_s_stream(struct v4l2_subdev *sd, int enable)
sd               2845 drivers/media/i2c/ov5640.c 	struct ov5640_dev *sensor = to_ov5640_dev(sd);
sd               3038 drivers/media/i2c/ov5640.c 	v4l2_i2c_subdev_init(&sensor->sd, client, &ov5640_subdev_ops);
sd               3040 drivers/media/i2c/ov5640.c 	sensor->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
sd               3043 drivers/media/i2c/ov5640.c 	sensor->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               3044 drivers/media/i2c/ov5640.c 	ret = media_entity_pads_init(&sensor->sd.entity, 1, &sensor->pad);
sd               3062 drivers/media/i2c/ov5640.c 	ret = v4l2_async_register_subdev_sensor_common(&sensor->sd);
sd               3072 drivers/media/i2c/ov5640.c 	media_entity_cleanup(&sensor->sd.entity);
sd               3078 drivers/media/i2c/ov5640.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               3079 drivers/media/i2c/ov5640.c 	struct ov5640_dev *sensor = to_ov5640_dev(sd);
sd               3081 drivers/media/i2c/ov5640.c 	v4l2_async_unregister_subdev(&sensor->sd);
sd               3083 drivers/media/i2c/ov5640.c 	media_entity_cleanup(&sensor->sd.entity);
sd                 90 drivers/media/i2c/ov5645.c 	struct v4l2_subdev sd;
sd                117 drivers/media/i2c/ov5645.c static inline struct ov5645 *to_ov5645(struct v4l2_subdev *sd)
sd                119 drivers/media/i2c/ov5645.c 	return container_of(sd, struct ov5645, sd);
sd                672 drivers/media/i2c/ov5645.c static int ov5645_s_power(struct v4l2_subdev *sd, int on)
sd                674 drivers/media/i2c/ov5645.c 	struct ov5645 *ov5645 = to_ov5645(sd);
sd                839 drivers/media/i2c/ov5645.c static int ov5645_enum_mbus_code(struct v4l2_subdev *sd,
sd                877 drivers/media/i2c/ov5645.c 		return v4l2_subdev_get_try_format(&ov5645->sd, cfg, pad);
sd                885 drivers/media/i2c/ov5645.c static int ov5645_get_format(struct v4l2_subdev *sd,
sd                889 drivers/media/i2c/ov5645.c 	struct ov5645 *ov5645 = to_ov5645(sd);
sd                902 drivers/media/i2c/ov5645.c 		return v4l2_subdev_get_try_crop(&ov5645->sd, cfg, pad);
sd                910 drivers/media/i2c/ov5645.c static int ov5645_set_format(struct v4l2_subdev *sd,
sd                914 drivers/media/i2c/ov5645.c 	struct ov5645 *ov5645 = to_ov5645(sd);
sd                972 drivers/media/i2c/ov5645.c static int ov5645_get_selection(struct v4l2_subdev *sd,
sd                976 drivers/media/i2c/ov5645.c 	struct ov5645 *ov5645 = to_ov5645(sd);
sd               1168 drivers/media/i2c/ov5645.c 	ov5645->sd.ctrl_handler = &ov5645->ctrls;
sd               1177 drivers/media/i2c/ov5645.c 	v4l2_i2c_subdev_init(&ov5645->sd, client, &ov5645_subdev_ops);
sd               1178 drivers/media/i2c/ov5645.c 	ov5645->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1180 drivers/media/i2c/ov5645.c 	ov5645->sd.dev = &client->dev;
sd               1181 drivers/media/i2c/ov5645.c 	ov5645->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1183 drivers/media/i2c/ov5645.c 	ret = media_entity_pads_init(&ov5645->sd.entity, 1, &ov5645->pad);
sd               1189 drivers/media/i2c/ov5645.c 	ret = ov5645_s_power(&ov5645->sd, true);
sd               1234 drivers/media/i2c/ov5645.c 	ov5645_s_power(&ov5645->sd, false);
sd               1236 drivers/media/i2c/ov5645.c 	ret = v4l2_async_register_subdev(&ov5645->sd);
sd               1242 drivers/media/i2c/ov5645.c 	ov5645_entity_init_cfg(&ov5645->sd, NULL);
sd               1247 drivers/media/i2c/ov5645.c 	ov5645_s_power(&ov5645->sd, false);
sd               1249 drivers/media/i2c/ov5645.c 	media_entity_cleanup(&ov5645->sd.entity);
sd               1259 drivers/media/i2c/ov5645.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1260 drivers/media/i2c/ov5645.c 	struct ov5645 *ov5645 = to_ov5645(sd);
sd               1262 drivers/media/i2c/ov5645.c 	v4l2_async_unregister_subdev(&ov5645->sd);
sd               1263 drivers/media/i2c/ov5645.c 	media_entity_cleanup(&ov5645->sd.entity);
sd                 81 drivers/media/i2c/ov5647.c 	struct v4l2_subdev		sd;
sd                 91 drivers/media/i2c/ov5647.c static inline struct ov5647 *to_state(struct v4l2_subdev *sd)
sd                 93 drivers/media/i2c/ov5647.c 	return container_of(sd, struct ov5647, sd);
sd                199 drivers/media/i2c/ov5647.c static int ov5647_write(struct v4l2_subdev *sd, u16 reg, u8 val)
sd                203 drivers/media/i2c/ov5647.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                213 drivers/media/i2c/ov5647.c static int ov5647_read(struct v4l2_subdev *sd, u16 reg, u8 *val)
sd                217 drivers/media/i2c/ov5647.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                234 drivers/media/i2c/ov5647.c static int ov5647_write_array(struct v4l2_subdev *sd,
sd                240 drivers/media/i2c/ov5647.c 		ret = ov5647_write(sd, regs[i].addr, regs[i].data);
sd                248 drivers/media/i2c/ov5647.c static int ov5647_set_virtual_channel(struct v4l2_subdev *sd, int channel)
sd                253 drivers/media/i2c/ov5647.c 	ret = ov5647_read(sd, OV5647_REG_MIPI_CTRL14, &channel_id);
sd                258 drivers/media/i2c/ov5647.c 	return ov5647_write(sd, OV5647_REG_MIPI_CTRL14, channel_id | (channel << 6));
sd                261 drivers/media/i2c/ov5647.c static int ov5647_stream_on(struct v4l2_subdev *sd)
sd                265 drivers/media/i2c/ov5647.c 	ret = ov5647_write(sd, OV5647_REG_MIPI_CTRL00, MIPI_CTRL00_BUS_IDLE);
sd                269 drivers/media/i2c/ov5647.c 	ret = ov5647_write(sd, OV5647_REG_FRAME_OFF_NUMBER, 0x00);
sd                273 drivers/media/i2c/ov5647.c 	return ov5647_write(sd, OV5640_REG_PAD_OUT, 0x00);
sd                276 drivers/media/i2c/ov5647.c static int ov5647_stream_off(struct v4l2_subdev *sd)
sd                280 drivers/media/i2c/ov5647.c 	ret = ov5647_write(sd, OV5647_REG_MIPI_CTRL00, MIPI_CTRL00_CLOCK_LANE_GATE
sd                285 drivers/media/i2c/ov5647.c 	ret = ov5647_write(sd, OV5647_REG_FRAME_OFF_NUMBER, 0x0f);
sd                289 drivers/media/i2c/ov5647.c 	return ov5647_write(sd, OV5640_REG_PAD_OUT, 0x01);
sd                292 drivers/media/i2c/ov5647.c static int set_sw_standby(struct v4l2_subdev *sd, bool standby)
sd                297 drivers/media/i2c/ov5647.c 	ret = ov5647_read(sd, OV5647_SW_STANDBY, &rdval);
sd                306 drivers/media/i2c/ov5647.c 	return ov5647_write(sd, OV5647_SW_STANDBY, rdval);
sd                309 drivers/media/i2c/ov5647.c static int __sensor_init(struct v4l2_subdev *sd)
sd                313 drivers/media/i2c/ov5647.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                315 drivers/media/i2c/ov5647.c 	ret = ov5647_read(sd, OV5647_SW_STANDBY, &rdval);
sd                319 drivers/media/i2c/ov5647.c 	ret = ov5647_write_array(sd, ov5647_640x480,
sd                326 drivers/media/i2c/ov5647.c 	ret = ov5647_set_virtual_channel(sd, 0);
sd                330 drivers/media/i2c/ov5647.c 	ret = ov5647_read(sd, OV5647_SW_STANDBY, &resetval);
sd                336 drivers/media/i2c/ov5647.c 		ret = ov5647_write(sd, OV5647_SW_STANDBY, 0x01);
sd                344 drivers/media/i2c/ov5647.c 	return ov5647_stream_off(sd);
sd                347 drivers/media/i2c/ov5647.c static int ov5647_sensor_power(struct v4l2_subdev *sd, int on)
sd                350 drivers/media/i2c/ov5647.c 	struct ov5647 *ov5647 = to_state(sd);
sd                351 drivers/media/i2c/ov5647.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                364 drivers/media/i2c/ov5647.c 		ret = ov5647_write_array(sd, sensor_oe_enable_regs,
sd                373 drivers/media/i2c/ov5647.c 		ret = __sensor_init(sd);
sd                383 drivers/media/i2c/ov5647.c 		ret = ov5647_write_array(sd, sensor_oe_disable_regs,
sd                389 drivers/media/i2c/ov5647.c 		ret = set_sw_standby(sd, true);
sd                408 drivers/media/i2c/ov5647.c static int ov5647_sensor_get_register(struct v4l2_subdev *sd,
sd                414 drivers/media/i2c/ov5647.c 	ret = ov5647_read(sd, reg->reg & 0xff, &val);
sd                424 drivers/media/i2c/ov5647.c static int ov5647_sensor_set_register(struct v4l2_subdev *sd,
sd                427 drivers/media/i2c/ov5647.c 	return ov5647_write(sd, reg->reg & 0xff, reg->val & 0xff);
sd                442 drivers/media/i2c/ov5647.c static int ov5647_s_stream(struct v4l2_subdev *sd, int enable)
sd                445 drivers/media/i2c/ov5647.c 		return ov5647_stream_on(sd);
sd                447 drivers/media/i2c/ov5647.c 		return ov5647_stream_off(sd);
sd                454 drivers/media/i2c/ov5647.c static int ov5647_enum_mbus_code(struct v4l2_subdev *sd,
sd                476 drivers/media/i2c/ov5647.c static int ov5647_detect(struct v4l2_subdev *sd)
sd                480 drivers/media/i2c/ov5647.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                482 drivers/media/i2c/ov5647.c 	ret = ov5647_write(sd, OV5647_SW_RESET, 0x01);
sd                486 drivers/media/i2c/ov5647.c 	ret = ov5647_read(sd, OV5647_REG_CHIPID_H, &read);
sd                495 drivers/media/i2c/ov5647.c 	ret = ov5647_read(sd, OV5647_REG_CHIPID_L, &read);
sd                504 drivers/media/i2c/ov5647.c 	return ov5647_write(sd, OV5647_SW_RESET, 0x00);
sd                507 drivers/media/i2c/ov5647.c static int ov5647_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                510 drivers/media/i2c/ov5647.c 				v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd                512 drivers/media/i2c/ov5647.c 				v4l2_subdev_get_try_crop(sd, fh->pad, 0);
sd                555 drivers/media/i2c/ov5647.c 	struct v4l2_subdev *sd;
sd                586 drivers/media/i2c/ov5647.c 	sd = &sensor->sd;
sd                587 drivers/media/i2c/ov5647.c 	v4l2_i2c_subdev_init(sd, client, &ov5647_subdev_ops);
sd                588 drivers/media/i2c/ov5647.c 	sensor->sd.internal_ops = &ov5647_subdev_internal_ops;
sd                589 drivers/media/i2c/ov5647.c 	sensor->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                592 drivers/media/i2c/ov5647.c 	sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd                593 drivers/media/i2c/ov5647.c 	ret = media_entity_pads_init(&sd->entity, 1, &sensor->pad);
sd                597 drivers/media/i2c/ov5647.c 	ret = ov5647_detect(sd);
sd                601 drivers/media/i2c/ov5647.c 	ret = v4l2_async_register_subdev(sd);
sd                608 drivers/media/i2c/ov5647.c 	media_entity_cleanup(&sd->entity);
sd                616 drivers/media/i2c/ov5647.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                617 drivers/media/i2c/ov5647.c 	struct ov5647 *ov5647 = to_state(sd);
sd                619 drivers/media/i2c/ov5647.c 	v4l2_async_unregister_subdev(&ov5647->sd);
sd                620 drivers/media/i2c/ov5647.c 	media_entity_cleanup(&ov5647->sd.entity);
sd                621 drivers/media/i2c/ov5647.c 	v4l2_device_unregister_subdev(sd);
sd               1815 drivers/media/i2c/ov5670.c 	struct v4l2_subdev sd;
sd               1836 drivers/media/i2c/ov5670.c #define to_ov5670(_sd)	container_of(_sd, struct ov5670, sd)
sd               1842 drivers/media/i2c/ov5670.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov5670->sd);
sd               1878 drivers/media/i2c/ov5670.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov5670->sd);
sd               1909 drivers/media/i2c/ov5670.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov5670->sd);
sd               1935 drivers/media/i2c/ov5670.c static int ov5670_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1937 drivers/media/i2c/ov5670.c 	struct ov5670 *ov5670 = to_ov5670(sd);
sd               1939 drivers/media/i2c/ov5670.c 				v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd               2003 drivers/media/i2c/ov5670.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov5670->sd);
sd               2132 drivers/media/i2c/ov5670.c 	ov5670->sd.ctrl_handler = ctrl_hdlr;
sd               2142 drivers/media/i2c/ov5670.c static int ov5670_enum_mbus_code(struct v4l2_subdev *sd,
sd               2155 drivers/media/i2c/ov5670.c static int ov5670_enum_frame_size(struct v4l2_subdev *sd,
sd               2187 drivers/media/i2c/ov5670.c 		fmt->format = *v4l2_subdev_get_try_format(&ov5670->sd, cfg,
sd               2195 drivers/media/i2c/ov5670.c static int ov5670_get_pad_format(struct v4l2_subdev *sd,
sd               2199 drivers/media/i2c/ov5670.c 	struct ov5670 *ov5670 = to_ov5670(sd);
sd               2209 drivers/media/i2c/ov5670.c static int ov5670_set_pad_format(struct v4l2_subdev *sd,
sd               2213 drivers/media/i2c/ov5670.c 	struct ov5670 *ov5670 = to_ov5670(sd);
sd               2228 drivers/media/i2c/ov5670.c 		*v4l2_subdev_get_try_format(sd, cfg, fmt->pad) = fmt->format;
sd               2254 drivers/media/i2c/ov5670.c static int ov5670_get_skip_frames(struct v4l2_subdev *sd, u32 *frames)
sd               2264 drivers/media/i2c/ov5670.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov5670->sd);
sd               2295 drivers/media/i2c/ov5670.c 	ret = __v4l2_ctrl_handler_setup(ov5670->sd.ctrl_handler);
sd               2312 drivers/media/i2c/ov5670.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov5670->sd);
sd               2326 drivers/media/i2c/ov5670.c static int ov5670_set_stream(struct v4l2_subdev *sd, int enable)
sd               2328 drivers/media/i2c/ov5670.c 	struct ov5670 *ov5670 = to_ov5670(sd);
sd               2329 drivers/media/i2c/ov5670.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2365 drivers/media/i2c/ov5670.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               2366 drivers/media/i2c/ov5670.c 	struct ov5670 *ov5670 = to_ov5670(sd);
sd               2377 drivers/media/i2c/ov5670.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               2378 drivers/media/i2c/ov5670.c 	struct ov5670 *ov5670 = to_ov5670(sd);
sd               2395 drivers/media/i2c/ov5670.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov5670->sd);
sd               2461 drivers/media/i2c/ov5670.c 	v4l2_i2c_subdev_init(&ov5670->sd, client, &ov5670_subdev_ops);
sd               2481 drivers/media/i2c/ov5670.c 	ov5670->sd.internal_ops = &ov5670_internal_ops;
sd               2482 drivers/media/i2c/ov5670.c 	ov5670->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               2483 drivers/media/i2c/ov5670.c 	ov5670->sd.entity.ops = &ov5670_subdev_entity_ops;
sd               2484 drivers/media/i2c/ov5670.c 	ov5670->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               2488 drivers/media/i2c/ov5670.c 	ret = media_entity_pads_init(&ov5670->sd.entity, 1, &ov5670->pad);
sd               2495 drivers/media/i2c/ov5670.c 	ret = v4l2_async_register_subdev_sensor_common(&ov5670->sd);
sd               2514 drivers/media/i2c/ov5670.c 	media_entity_cleanup(&ov5670->sd.entity);
sd               2517 drivers/media/i2c/ov5670.c 	v4l2_ctrl_handler_free(ov5670->sd.ctrl_handler);
sd               2530 drivers/media/i2c/ov5670.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               2531 drivers/media/i2c/ov5670.c 	struct ov5670 *ov5670 = to_ov5670(sd);
sd               2533 drivers/media/i2c/ov5670.c 	v4l2_async_unregister_subdev(sd);
sd               2534 drivers/media/i2c/ov5670.c 	media_entity_cleanup(&sd->entity);
sd               2535 drivers/media/i2c/ov5670.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                 66 drivers/media/i2c/ov5675.c #define to_ov5675(_sd)			container_of(_sd, struct ov5675, sd)
sd                473 drivers/media/i2c/ov5675.c 	struct v4l2_subdev sd;
sd                514 drivers/media/i2c/ov5675.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov5675->sd);
sd                544 drivers/media/i2c/ov5675.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov5675->sd);
sd                561 drivers/media/i2c/ov5675.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov5675->sd);
sd                611 drivers/media/i2c/ov5675.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov5675->sd);
sd                728 drivers/media/i2c/ov5675.c 	ov5675->sd.ctrl_handler = ctrl_hdlr;
sd                744 drivers/media/i2c/ov5675.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov5675->sd);
sd                763 drivers/media/i2c/ov5675.c 	ret = __v4l2_ctrl_handler_setup(ov5675->sd.ctrl_handler);
sd                779 drivers/media/i2c/ov5675.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov5675->sd);
sd                786 drivers/media/i2c/ov5675.c static int ov5675_set_stream(struct v4l2_subdev *sd, int enable)
sd                788 drivers/media/i2c/ov5675.c 	struct ov5675 *ov5675 = to_ov5675(sd);
sd                789 drivers/media/i2c/ov5675.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                824 drivers/media/i2c/ov5675.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                825 drivers/media/i2c/ov5675.c 	struct ov5675 *ov5675 = to_ov5675(sd);
sd                839 drivers/media/i2c/ov5675.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                840 drivers/media/i2c/ov5675.c 	struct ov5675 *ov5675 = to_ov5675(sd);
sd                859 drivers/media/i2c/ov5675.c static int ov5675_set_format(struct v4l2_subdev *sd,
sd                863 drivers/media/i2c/ov5675.c 	struct ov5675 *ov5675 = to_ov5675(sd);
sd                875 drivers/media/i2c/ov5675.c 		*v4l2_subdev_get_try_format(sd, cfg, fmt->pad) = fmt->format;
sd                900 drivers/media/i2c/ov5675.c static int ov5675_get_format(struct v4l2_subdev *sd,
sd                904 drivers/media/i2c/ov5675.c 	struct ov5675 *ov5675 = to_ov5675(sd);
sd                908 drivers/media/i2c/ov5675.c 		fmt->format = *v4l2_subdev_get_try_format(&ov5675->sd, cfg,
sd                918 drivers/media/i2c/ov5675.c static int ov5675_enum_mbus_code(struct v4l2_subdev *sd,
sd                930 drivers/media/i2c/ov5675.c static int ov5675_enum_frame_size(struct v4l2_subdev *sd,
sd                948 drivers/media/i2c/ov5675.c static int ov5675_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                950 drivers/media/i2c/ov5675.c 	struct ov5675 *ov5675 = to_ov5675(sd);
sd                954 drivers/media/i2c/ov5675.c 				 v4l2_subdev_get_try_format(sd, fh->pad, 0));
sd                986 drivers/media/i2c/ov5675.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov5675->sd);
sd               1075 drivers/media/i2c/ov5675.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1076 drivers/media/i2c/ov5675.c 	struct ov5675 *ov5675 = to_ov5675(sd);
sd               1078 drivers/media/i2c/ov5675.c 	v4l2_async_unregister_subdev(sd);
sd               1079 drivers/media/i2c/ov5675.c 	media_entity_cleanup(&sd->entity);
sd               1080 drivers/media/i2c/ov5675.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd               1103 drivers/media/i2c/ov5675.c 	v4l2_i2c_subdev_init(&ov5675->sd, client, &ov5675_subdev_ops);
sd               1118 drivers/media/i2c/ov5675.c 	ov5675->sd.internal_ops = &ov5675_internal_ops;
sd               1119 drivers/media/i2c/ov5675.c 	ov5675->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1120 drivers/media/i2c/ov5675.c 	ov5675->sd.entity.ops = &ov5675_subdev_entity_ops;
sd               1121 drivers/media/i2c/ov5675.c 	ov5675->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1123 drivers/media/i2c/ov5675.c 	ret = media_entity_pads_init(&ov5675->sd.entity, 1, &ov5675->pad);
sd               1129 drivers/media/i2c/ov5675.c 	ret = v4l2_async_register_subdev_sensor_common(&ov5675->sd);
sd               1147 drivers/media/i2c/ov5675.c 	media_entity_cleanup(&ov5675->sd.entity);
sd               1150 drivers/media/i2c/ov5675.c 	v4l2_ctrl_handler_free(ov5675->sd.ctrl_handler);
sd                115 drivers/media/i2c/ov5695.c #define to_ov5695(sd) container_of(sd, struct ov5695, subdev)
sd                808 drivers/media/i2c/ov5695.c static int ov5695_set_fmt(struct v4l2_subdev *sd,
sd                812 drivers/media/i2c/ov5695.c 	struct ov5695 *ov5695 = to_ov5695(sd);
sd                825 drivers/media/i2c/ov5695.c 		*v4l2_subdev_get_try_format(sd, cfg, fmt->pad) = fmt->format;
sd                843 drivers/media/i2c/ov5695.c static int ov5695_get_fmt(struct v4l2_subdev *sd,
sd                847 drivers/media/i2c/ov5695.c 	struct ov5695 *ov5695 = to_ov5695(sd);
sd                853 drivers/media/i2c/ov5695.c 		fmt->format = *v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd                869 drivers/media/i2c/ov5695.c static int ov5695_enum_mbus_code(struct v4l2_subdev *sd,
sd                880 drivers/media/i2c/ov5695.c static int ov5695_enum_frame_sizes(struct v4l2_subdev *sd,
sd                937 drivers/media/i2c/ov5695.c static int ov5695_s_stream(struct v4l2_subdev *sd, int on)
sd                939 drivers/media/i2c/ov5695.c 	struct ov5695 *ov5695 = to_ov5695(sd);
sd                957 drivers/media/i2c/ov5695.c 			v4l2_err(sd, "start stream failed while write regs\n");
sd               1037 drivers/media/i2c/ov5695.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1038 drivers/media/i2c/ov5695.c 	struct ov5695 *ov5695 = to_ov5695(sd);
sd               1046 drivers/media/i2c/ov5695.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1047 drivers/media/i2c/ov5695.c 	struct ov5695 *ov5695 = to_ov5695(sd);
sd               1055 drivers/media/i2c/ov5695.c static int ov5695_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1057 drivers/media/i2c/ov5695.c 	struct ov5695 *ov5695 = to_ov5695(sd);
sd               1059 drivers/media/i2c/ov5695.c 				v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd               1278 drivers/media/i2c/ov5695.c 	struct v4l2_subdev *sd;
sd               1315 drivers/media/i2c/ov5695.c 	sd = &ov5695->subdev;
sd               1316 drivers/media/i2c/ov5695.c 	v4l2_i2c_subdev_init(sd, client, &ov5695_subdev_ops);
sd               1330 drivers/media/i2c/ov5695.c 	sd->internal_ops = &ov5695_internal_ops;
sd               1331 drivers/media/i2c/ov5695.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1335 drivers/media/i2c/ov5695.c 	sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1336 drivers/media/i2c/ov5695.c 	ret = media_entity_pads_init(&sd->entity, 1, &ov5695->pad);
sd               1341 drivers/media/i2c/ov5695.c 	ret = v4l2_async_register_subdev(sd);
sd               1355 drivers/media/i2c/ov5695.c 	media_entity_cleanup(&sd->entity);
sd               1369 drivers/media/i2c/ov5695.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1370 drivers/media/i2c/ov5695.c 	struct ov5695 *ov5695 = to_ov5695(sd);
sd               1372 drivers/media/i2c/ov5695.c 	v4l2_async_unregister_subdev(sd);
sd               1374 drivers/media/i2c/ov5695.c 	media_entity_cleanup(&sd->entity);
sd                311 drivers/media/i2c/ov6650.c static int ov6650_s_stream(struct v4l2_subdev *sd, int enable)
sd                320 drivers/media/i2c/ov6650.c 	struct v4l2_subdev *sd = &priv->subdev;
sd                321 drivers/media/i2c/ov6650.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                353 drivers/media/i2c/ov6650.c 	struct v4l2_subdev *sd = &priv->subdev;
sd                354 drivers/media/i2c/ov6650.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                403 drivers/media/i2c/ov6650.c static int ov6650_get_register(struct v4l2_subdev *sd,
sd                406 drivers/media/i2c/ov6650.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                422 drivers/media/i2c/ov6650.c static int ov6650_set_register(struct v4l2_subdev *sd,
sd                425 drivers/media/i2c/ov6650.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                434 drivers/media/i2c/ov6650.c static int ov6650_s_power(struct v4l2_subdev *sd, int on)
sd                436 drivers/media/i2c/ov6650.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                448 drivers/media/i2c/ov6650.c static int ov6650_get_selection(struct v4l2_subdev *sd,
sd                452 drivers/media/i2c/ov6650.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                473 drivers/media/i2c/ov6650.c static int ov6650_set_selection(struct v4l2_subdev *sd,
sd                477 drivers/media/i2c/ov6650.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                516 drivers/media/i2c/ov6650.c static int ov6650_get_fmt(struct v4l2_subdev *sd,
sd                521 drivers/media/i2c/ov6650.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                567 drivers/media/i2c/ov6650.c static int ov6650_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
sd                569 drivers/media/i2c/ov6650.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                665 drivers/media/i2c/ov6650.c 	ret = ov6650_set_selection(sd, NULL, &sel);
sd                681 drivers/media/i2c/ov6650.c static int ov6650_set_fmt(struct v4l2_subdev *sd,
sd                686 drivers/media/i2c/ov6650.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                727 drivers/media/i2c/ov6650.c 		int ret = ov6650_s_fmt(sd, mf);
sd                741 drivers/media/i2c/ov6650.c static int ov6650_enum_mbus_code(struct v4l2_subdev *sd,
sd                752 drivers/media/i2c/ov6650.c static int ov6650_g_frame_interval(struct v4l2_subdev *sd,
sd                755 drivers/media/i2c/ov6650.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                768 drivers/media/i2c/ov6650.c static int ov6650_s_frame_interval(struct v4l2_subdev *sd,
sd                771 drivers/media/i2c/ov6650.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                832 drivers/media/i2c/ov6650.c static int ov6650_video_probe(struct v4l2_subdev *sd)
sd                834 drivers/media/i2c/ov6650.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                846 drivers/media/i2c/ov6650.c 	ret = ov6650_s_power(sd, 1);
sd                883 drivers/media/i2c/ov6650.c 		ret = ov6650_s_fmt(sd, &mf);
sd                889 drivers/media/i2c/ov6650.c 	ov6650_s_power(sd, 0);
sd                912 drivers/media/i2c/ov6650.c static int ov6650_g_mbus_config(struct v4l2_subdev *sd,
sd                927 drivers/media/i2c/ov6650.c static int ov6650_s_mbus_config(struct v4l2_subdev *sd,
sd                930 drivers/media/i2c/ov6650.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 65 drivers/media/i2c/ov7251.c 	struct v4l2_subdev sd;
sd                 97 drivers/media/i2c/ov7251.c static inline struct ov7251 *to_ov7251(struct v4l2_subdev *sd)
sd                 99 drivers/media/i2c/ov7251.c 	return container_of(sd, struct ov7251, sd);
sd                768 drivers/media/i2c/ov7251.c static int ov7251_s_power(struct v4l2_subdev *sd, int on)
sd                770 drivers/media/i2c/ov7251.c 	struct ov7251 *ov7251 = to_ov7251(sd);
sd                900 drivers/media/i2c/ov7251.c static int ov7251_enum_mbus_code(struct v4l2_subdev *sd,
sd                959 drivers/media/i2c/ov7251.c 		return v4l2_subdev_get_try_format(&ov7251->sd, cfg, pad);
sd                967 drivers/media/i2c/ov7251.c static int ov7251_get_format(struct v4l2_subdev *sd,
sd                971 drivers/media/i2c/ov7251.c 	struct ov7251 *ov7251 = to_ov7251(sd);
sd                987 drivers/media/i2c/ov7251.c 		return v4l2_subdev_get_try_crop(&ov7251->sd, cfg, pad);
sd               1029 drivers/media/i2c/ov7251.c static int ov7251_set_format(struct v4l2_subdev *sd,
sd               1033 drivers/media/i2c/ov7251.c 	struct ov7251 *ov7251 = to_ov7251(sd);
sd               1117 drivers/media/i2c/ov7251.c static int ov7251_get_selection(struct v4l2_subdev *sd,
sd               1121 drivers/media/i2c/ov7251.c 	struct ov7251 *ov7251 = to_ov7251(sd);
sd               1368 drivers/media/i2c/ov7251.c 	ov7251->sd.ctrl_handler = &ov7251->ctrls;
sd               1377 drivers/media/i2c/ov7251.c 	v4l2_i2c_subdev_init(&ov7251->sd, client, &ov7251_subdev_ops);
sd               1378 drivers/media/i2c/ov7251.c 	ov7251->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1380 drivers/media/i2c/ov7251.c 	ov7251->sd.dev = &client->dev;
sd               1381 drivers/media/i2c/ov7251.c 	ov7251->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1383 drivers/media/i2c/ov7251.c 	ret = media_entity_pads_init(&ov7251->sd.entity, 1, &ov7251->pad);
sd               1389 drivers/media/i2c/ov7251.c 	ret = ov7251_s_power(&ov7251->sd, true);
sd               1448 drivers/media/i2c/ov7251.c 	ov7251_s_power(&ov7251->sd, false);
sd               1450 drivers/media/i2c/ov7251.c 	ret = v4l2_async_register_subdev(&ov7251->sd);
sd               1456 drivers/media/i2c/ov7251.c 	ov7251_entity_init_cfg(&ov7251->sd, NULL);
sd               1461 drivers/media/i2c/ov7251.c 	ov7251_s_power(&ov7251->sd, false);
sd               1463 drivers/media/i2c/ov7251.c 	media_entity_cleanup(&ov7251->sd.entity);
sd               1473 drivers/media/i2c/ov7251.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1474 drivers/media/i2c/ov7251.c 	struct ov7251 *ov7251 = to_ov7251(sd);
sd               1476 drivers/media/i2c/ov7251.c 	v4l2_async_unregister_subdev(&ov7251->sd);
sd               1477 drivers/media/i2c/ov7251.c 	media_entity_cleanup(&ov7251->sd.entity);
sd                 44 drivers/media/i2c/ov7640.c 	struct v4l2_subdev *sd;
sd                 49 drivers/media/i2c/ov7640.c 	sd = devm_kzalloc(&client->dev, sizeof(*sd), GFP_KERNEL);
sd                 50 drivers/media/i2c/ov7640.c 	if (sd == NULL)
sd                 52 drivers/media/i2c/ov7640.c 	v4l2_i2c_subdev_init(sd, client, &ov7640_ops);
sd                 70 drivers/media/i2c/ov7640.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                 72 drivers/media/i2c/ov7640.c 	v4l2_device_unregister_subdev(sd);
sd                220 drivers/media/i2c/ov7670.c 	struct v4l2_subdev sd;
sd                258 drivers/media/i2c/ov7670.c static inline struct ov7670_info *to_state(struct v4l2_subdev *sd)
sd                260 drivers/media/i2c/ov7670.c 	return container_of(sd, struct ov7670_info, sd);
sd                265 drivers/media/i2c/ov7670.c 	return &container_of(ctrl->handler, struct ov7670_info, hdl)->sd;
sd                478 drivers/media/i2c/ov7670.c static int ov7670_read_smbus(struct v4l2_subdev *sd, unsigned char reg,
sd                481 drivers/media/i2c/ov7670.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                493 drivers/media/i2c/ov7670.c static int ov7670_write_smbus(struct v4l2_subdev *sd, unsigned char reg,
sd                496 drivers/media/i2c/ov7670.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                507 drivers/media/i2c/ov7670.c static int ov7670_read_i2c(struct v4l2_subdev *sd, unsigned char reg,
sd                510 drivers/media/i2c/ov7670.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                540 drivers/media/i2c/ov7670.c static int ov7670_write_i2c(struct v4l2_subdev *sd, unsigned char reg,
sd                543 drivers/media/i2c/ov7670.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                560 drivers/media/i2c/ov7670.c static int ov7670_read(struct v4l2_subdev *sd, unsigned char reg,
sd                563 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd                565 drivers/media/i2c/ov7670.c 		return ov7670_read_smbus(sd, reg, value);
sd                567 drivers/media/i2c/ov7670.c 		return ov7670_read_i2c(sd, reg, value);
sd                570 drivers/media/i2c/ov7670.c static int ov7670_write(struct v4l2_subdev *sd, unsigned char reg,
sd                573 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd                575 drivers/media/i2c/ov7670.c 		return ov7670_write_smbus(sd, reg, value);
sd                577 drivers/media/i2c/ov7670.c 		return ov7670_write_i2c(sd, reg, value);
sd                580 drivers/media/i2c/ov7670.c static int ov7670_update_bits(struct v4l2_subdev *sd, unsigned char reg,
sd                586 drivers/media/i2c/ov7670.c 	ret = ov7670_read(sd, reg, &orig);
sd                590 drivers/media/i2c/ov7670.c 	return ov7670_write(sd, reg, (orig & ~mask) | (value & mask));
sd                596 drivers/media/i2c/ov7670.c static int ov7670_write_array(struct v4l2_subdev *sd, struct regval_list *vals)
sd                599 drivers/media/i2c/ov7670.c 		int ret = ov7670_write(sd, vals->reg_num, vals->value);
sd                611 drivers/media/i2c/ov7670.c static int ov7670_reset(struct v4l2_subdev *sd, u32 val)
sd                613 drivers/media/i2c/ov7670.c 	ov7670_write(sd, REG_COM7, COM7_RESET);
sd                619 drivers/media/i2c/ov7670.c static int ov7670_init(struct v4l2_subdev *sd, u32 val)
sd                621 drivers/media/i2c/ov7670.c 	return ov7670_write_array(sd, ov7670_default_regs);
sd                624 drivers/media/i2c/ov7670.c static int ov7670_detect(struct v4l2_subdev *sd)
sd                629 drivers/media/i2c/ov7670.c 	ret = ov7670_init(sd, 0);
sd                632 drivers/media/i2c/ov7670.c 	ret = ov7670_read(sd, REG_MIDH, &v);
sd                637 drivers/media/i2c/ov7670.c 	ret = ov7670_read(sd, REG_MIDL, &v);
sd                645 drivers/media/i2c/ov7670.c 	ret = ov7670_read(sd, REG_PID, &v);
sd                650 drivers/media/i2c/ov7670.c 	ret = ov7670_read(sd, REG_VER, &v);
sd                792 drivers/media/i2c/ov7670.c static void ov7675_get_framerate(struct v4l2_subdev *sd,
sd                795 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd                813 drivers/media/i2c/ov7670.c static int ov7675_apply_framerate(struct v4l2_subdev *sd)
sd                815 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd                818 drivers/media/i2c/ov7670.c 	ret = ov7670_write(sd, REG_CLKRC, info->clkrc);
sd                822 drivers/media/i2c/ov7670.c 	return ov7670_write(sd, REG_DBLV,
sd                826 drivers/media/i2c/ov7670.c static int ov7675_set_framerate(struct v4l2_subdev *sd,
sd                829 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd                863 drivers/media/i2c/ov7670.c 	ov7675_get_framerate(sd, tpf);
sd                871 drivers/media/i2c/ov7670.c 		return ov7675_apply_framerate(sd);
sd                876 drivers/media/i2c/ov7670.c static void ov7670_get_framerate_legacy(struct v4l2_subdev *sd,
sd                879 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd                887 drivers/media/i2c/ov7670.c static int ov7670_set_framerate_legacy(struct v4l2_subdev *sd,
sd                890 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd                911 drivers/media/i2c/ov7670.c 		return ov7670_write(sd, REG_CLKRC, info->clkrc);
sd                919 drivers/media/i2c/ov7670.c static int ov7670_set_hw(struct v4l2_subdev *sd, int hstart, int hstop,
sd                929 drivers/media/i2c/ov7670.c 	ret =  ov7670_write(sd, REG_HSTART, (hstart >> 3) & 0xff);
sd                930 drivers/media/i2c/ov7670.c 	ret += ov7670_write(sd, REG_HSTOP, (hstop >> 3) & 0xff);
sd                931 drivers/media/i2c/ov7670.c 	ret += ov7670_read(sd, REG_HREF, &v);
sd                934 drivers/media/i2c/ov7670.c 	ret += ov7670_write(sd, REG_HREF, v);
sd                938 drivers/media/i2c/ov7670.c 	ret += ov7670_write(sd, REG_VSTART, (vstart >> 2) & 0xff);
sd                939 drivers/media/i2c/ov7670.c 	ret += ov7670_write(sd, REG_VSTOP, (vstop >> 2) & 0xff);
sd                940 drivers/media/i2c/ov7670.c 	ret += ov7670_read(sd, REG_VREF, &v);
sd                943 drivers/media/i2c/ov7670.c 	ret += ov7670_write(sd, REG_VREF, v);
sd                948 drivers/media/i2c/ov7670.c static int ov7670_enum_mbus_code(struct v4l2_subdev *sd,
sd                959 drivers/media/i2c/ov7670.c static int ov7670_try_fmt_internal(struct v4l2_subdev *sd,
sd                966 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               1023 drivers/media/i2c/ov7670.c static int ov7670_apply_fmt(struct v4l2_subdev *sd)
sd               1025 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               1038 drivers/media/i2c/ov7670.c 	ret = ov7670_write(sd, REG_COM7, com7);
sd               1051 drivers/media/i2c/ov7670.c 	ret = ov7670_write(sd, REG_COM10, com10);
sd               1058 drivers/media/i2c/ov7670.c 	ret = ov7670_write_array(sd, info->fmt->regs + 1);
sd               1062 drivers/media/i2c/ov7670.c 	ret = ov7670_set_hw(sd, wsize->hstart, wsize->hstop, wsize->vstart,
sd               1068 drivers/media/i2c/ov7670.c 		ret = ov7670_write_array(sd, wsize->regs);
sd               1083 drivers/media/i2c/ov7670.c 	ret = ov7670_write(sd, REG_CLKRC, info->clkrc);
sd               1093 drivers/media/i2c/ov7670.c static int ov7670_set_fmt(struct v4l2_subdev *sd,
sd               1097 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               1107 drivers/media/i2c/ov7670.c 		ret = ov7670_try_fmt_internal(sd, &format->format, NULL, NULL);
sd               1111 drivers/media/i2c/ov7670.c 		mbus_fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
sd               1117 drivers/media/i2c/ov7670.c 	ret = ov7670_try_fmt_internal(sd, &format->format, &info->fmt, &info->wsize);
sd               1127 drivers/media/i2c/ov7670.c 		return ov7670_apply_fmt(sd);
sd               1132 drivers/media/i2c/ov7670.c static int ov7670_get_fmt(struct v4l2_subdev *sd,
sd               1136 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               1143 drivers/media/i2c/ov7670.c 		mbus_fmt = v4l2_subdev_get_try_format(sd, cfg, 0);
sd               1160 drivers/media/i2c/ov7670.c static int ov7670_g_frame_interval(struct v4l2_subdev *sd,
sd               1163 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               1166 drivers/media/i2c/ov7670.c 	info->devtype->get_framerate(sd, &ival->interval);
sd               1171 drivers/media/i2c/ov7670.c static int ov7670_s_frame_interval(struct v4l2_subdev *sd,
sd               1175 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               1178 drivers/media/i2c/ov7670.c 	return info->devtype->set_framerate(sd, tpf);
sd               1190 drivers/media/i2c/ov7670.c static int ov7670_enum_frame_interval(struct v4l2_subdev *sd,
sd               1194 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               1229 drivers/media/i2c/ov7670.c static int ov7670_enum_frame_size(struct v4l2_subdev *sd,
sd               1233 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               1266 drivers/media/i2c/ov7670.c static int ov7670_store_cmatrix(struct v4l2_subdev *sd,
sd               1276 drivers/media/i2c/ov7670.c 	ret = ov7670_read(sd, REG_CMATRIX_SIGN, &signbits);
sd               1295 drivers/media/i2c/ov7670.c 		ret += ov7670_write(sd, REG_CMATRIX_BASE + i, raw);
sd               1297 drivers/media/i2c/ov7670.c 	ret += ov7670_write(sd, REG_CMATRIX_SIGN, signbits);
sd               1380 drivers/media/i2c/ov7670.c static int ov7670_s_sat_hue(struct v4l2_subdev *sd, int sat, int hue)
sd               1382 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               1387 drivers/media/i2c/ov7670.c 	ret = ov7670_store_cmatrix(sd, matrix);
sd               1403 drivers/media/i2c/ov7670.c static int ov7670_s_brightness(struct v4l2_subdev *sd, int value)
sd               1408 drivers/media/i2c/ov7670.c 	ov7670_read(sd, REG_COM8, &com8);
sd               1410 drivers/media/i2c/ov7670.c 	ov7670_write(sd, REG_COM8, com8);
sd               1412 drivers/media/i2c/ov7670.c 	ret = ov7670_write(sd, REG_BRIGHT, v);
sd               1416 drivers/media/i2c/ov7670.c static int ov7670_s_contrast(struct v4l2_subdev *sd, int value)
sd               1418 drivers/media/i2c/ov7670.c 	return ov7670_write(sd, REG_CONTRAS, (unsigned char) value);
sd               1421 drivers/media/i2c/ov7670.c static int ov7670_s_hflip(struct v4l2_subdev *sd, int value)
sd               1426 drivers/media/i2c/ov7670.c 	ret = ov7670_read(sd, REG_MVFP, &v);
sd               1432 drivers/media/i2c/ov7670.c 	ret += ov7670_write(sd, REG_MVFP, v);
sd               1436 drivers/media/i2c/ov7670.c static int ov7670_s_vflip(struct v4l2_subdev *sd, int value)
sd               1441 drivers/media/i2c/ov7670.c 	ret = ov7670_read(sd, REG_MVFP, &v);
sd               1447 drivers/media/i2c/ov7670.c 	ret += ov7670_write(sd, REG_MVFP, v);
sd               1457 drivers/media/i2c/ov7670.c static int ov7670_g_gain(struct v4l2_subdev *sd, __s32 *value)
sd               1462 drivers/media/i2c/ov7670.c 	ret = ov7670_read(sd, REG_GAIN, &gain);
sd               1467 drivers/media/i2c/ov7670.c static int ov7670_s_gain(struct v4l2_subdev *sd, int value)
sd               1472 drivers/media/i2c/ov7670.c 	ret = ov7670_write(sd, REG_GAIN, value & 0xff);
sd               1475 drivers/media/i2c/ov7670.c 		ret = ov7670_read(sd, REG_COM8, &com8);
sd               1476 drivers/media/i2c/ov7670.c 		ret = ov7670_write(sd, REG_COM8, com8 & ~COM8_AGC);
sd               1484 drivers/media/i2c/ov7670.c static int ov7670_s_autogain(struct v4l2_subdev *sd, int value)
sd               1489 drivers/media/i2c/ov7670.c 	ret = ov7670_read(sd, REG_COM8, &com8);
sd               1495 drivers/media/i2c/ov7670.c 		ret = ov7670_write(sd, REG_COM8, com8);
sd               1500 drivers/media/i2c/ov7670.c static int ov7670_s_exp(struct v4l2_subdev *sd, int value)
sd               1505 drivers/media/i2c/ov7670.c 	ret = ov7670_read(sd, REG_COM1, &com1) +
sd               1506 drivers/media/i2c/ov7670.c 		ov7670_read(sd, REG_COM8, &com8) +
sd               1507 drivers/media/i2c/ov7670.c 		ov7670_read(sd, REG_AECHH, &aechh);
sd               1514 drivers/media/i2c/ov7670.c 	ret = ov7670_write(sd, REG_COM1, com1) +
sd               1515 drivers/media/i2c/ov7670.c 		ov7670_write(sd, REG_AECH, aech) +
sd               1516 drivers/media/i2c/ov7670.c 		ov7670_write(sd, REG_AECHH, aechh);
sd               1519 drivers/media/i2c/ov7670.c 		ret = ov7670_write(sd, REG_COM8, com8 & ~COM8_AEC);
sd               1526 drivers/media/i2c/ov7670.c static int ov7670_s_autoexp(struct v4l2_subdev *sd,
sd               1532 drivers/media/i2c/ov7670.c 	ret = ov7670_read(sd, REG_COM8, &com8);
sd               1538 drivers/media/i2c/ov7670.c 		ret = ov7670_write(sd, REG_COM8, com8);
sd               1550 drivers/media/i2c/ov7670.c static int ov7670_s_test_pattern(struct v4l2_subdev *sd, int value)
sd               1554 drivers/media/i2c/ov7670.c 	ret = ov7670_update_bits(sd, REG_SCALING_XSC, TEST_PATTTERN_0,
sd               1559 drivers/media/i2c/ov7670.c 	return ov7670_update_bits(sd, REG_SCALING_YSC, TEST_PATTTERN_1,
sd               1565 drivers/media/i2c/ov7670.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd               1566 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               1570 drivers/media/i2c/ov7670.c 		return ov7670_g_gain(sd, &info->gain->val);
sd               1577 drivers/media/i2c/ov7670.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd               1578 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               1582 drivers/media/i2c/ov7670.c 		return ov7670_s_brightness(sd, ctrl->val);
sd               1584 drivers/media/i2c/ov7670.c 		return ov7670_s_contrast(sd, ctrl->val);
sd               1586 drivers/media/i2c/ov7670.c 		return ov7670_s_sat_hue(sd,
sd               1589 drivers/media/i2c/ov7670.c 		return ov7670_s_vflip(sd, ctrl->val);
sd               1591 drivers/media/i2c/ov7670.c 		return ov7670_s_hflip(sd, ctrl->val);
sd               1597 drivers/media/i2c/ov7670.c 			return ov7670_s_gain(sd, info->gain->val);
sd               1599 drivers/media/i2c/ov7670.c 		return ov7670_s_autogain(sd, ctrl->val);
sd               1605 drivers/media/i2c/ov7670.c 			return ov7670_s_exp(sd, info->exposure->val);
sd               1607 drivers/media/i2c/ov7670.c 		return ov7670_s_autoexp(sd, ctrl->val);
sd               1609 drivers/media/i2c/ov7670.c 		return ov7670_s_test_pattern(sd, ctrl->val);
sd               1620 drivers/media/i2c/ov7670.c static int ov7670_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
sd               1625 drivers/media/i2c/ov7670.c 	ret = ov7670_read(sd, reg->reg & 0xff, &val);
sd               1631 drivers/media/i2c/ov7670.c static int ov7670_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
sd               1633 drivers/media/i2c/ov7670.c 	ov7670_write(sd, reg->reg & 0xff, reg->val & 0xff);
sd               1638 drivers/media/i2c/ov7670.c static void ov7670_power_on(struct v4l2_subdev *sd)
sd               1640 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               1660 drivers/media/i2c/ov7670.c static void ov7670_power_off(struct v4l2_subdev *sd)
sd               1662 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               1675 drivers/media/i2c/ov7670.c static int ov7670_s_power(struct v4l2_subdev *sd, int on)
sd               1677 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               1683 drivers/media/i2c/ov7670.c 		ov7670_power_on (sd);
sd               1684 drivers/media/i2c/ov7670.c 		ov7670_init(sd, 0);
sd               1685 drivers/media/i2c/ov7670.c 		ov7670_apply_fmt(sd);
sd               1686 drivers/media/i2c/ov7670.c 		ov7675_apply_framerate(sd);
sd               1689 drivers/media/i2c/ov7670.c 		ov7670_power_off (sd);
sd               1695 drivers/media/i2c/ov7670.c static void ov7670_get_default_format(struct v4l2_subdev *sd,
sd               1698 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               1708 drivers/media/i2c/ov7670.c static int ov7670_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1711 drivers/media/i2c/ov7670.c 				v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd               1713 drivers/media/i2c/ov7670.c 	ov7670_get_default_format(sd, format);
sd               1838 drivers/media/i2c/ov7670.c 	struct v4l2_subdev *sd;
sd               1845 drivers/media/i2c/ov7670.c 	sd = &info->sd;
sd               1846 drivers/media/i2c/ov7670.c 	v4l2_i2c_subdev_init(sd, client, &ov7670_ops);
sd               1849 drivers/media/i2c/ov7670.c 	sd->internal_ops = &ov7670_subdev_internal_ops;
sd               1850 drivers/media/i2c/ov7670.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
sd               1894 drivers/media/i2c/ov7670.c 	ov7670_power_on(sd);
sd               1905 drivers/media/i2c/ov7670.c 	ret = ov7670_detect(sd);
sd               1919 drivers/media/i2c/ov7670.c 	ov7670_get_default_format(sd, &info->format);
sd               1926 drivers/media/i2c/ov7670.c 	info->devtype->set_framerate(sd, &tpf);
sd               1954 drivers/media/i2c/ov7670.c 	sd->ctrl_handler = &info->hdl;
sd               1971 drivers/media/i2c/ov7670.c 	info->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1972 drivers/media/i2c/ov7670.c 	ret = media_entity_pads_init(&info->sd.entity, 1, &info->pad);
sd               1979 drivers/media/i2c/ov7670.c 	ret = v4l2_async_register_subdev(&info->sd);
sd               1983 drivers/media/i2c/ov7670.c 	ov7670_power_off(sd);
sd               1987 drivers/media/i2c/ov7670.c 	media_entity_cleanup(&info->sd.entity);
sd               1991 drivers/media/i2c/ov7670.c 	ov7670_power_off(sd);
sd               1997 drivers/media/i2c/ov7670.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1998 drivers/media/i2c/ov7670.c 	struct ov7670_info *info = to_state(sd);
sd               2000 drivers/media/i2c/ov7670.c 	v4l2_async_unregister_subdev(sd);
sd               2002 drivers/media/i2c/ov7670.c 	media_entity_cleanup(&info->sd.entity);
sd               2003 drivers/media/i2c/ov7670.c 	ov7670_power_off(sd);
sd                550 drivers/media/i2c/ov772x.c static struct ov772x_priv *to_ov772x(struct v4l2_subdev *sd)
sd                552 drivers/media/i2c/ov772x.c 	return container_of(sd, struct ov772x_priv, subdev);
sd                573 drivers/media/i2c/ov772x.c static int ov772x_s_stream(struct v4l2_subdev *sd, int enable)
sd                575 drivers/media/i2c/ov772x.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                576 drivers/media/i2c/ov772x.c 	struct ov772x_priv *priv = to_ov772x(sd);
sd                706 drivers/media/i2c/ov772x.c static int ov772x_g_frame_interval(struct v4l2_subdev *sd,
sd                709 drivers/media/i2c/ov772x.c 	struct ov772x_priv *priv = to_ov772x(sd);
sd                718 drivers/media/i2c/ov772x.c static int ov772x_s_frame_interval(struct v4l2_subdev *sd,
sd                721 drivers/media/i2c/ov772x.c 	struct ov772x_priv *priv = to_ov772x(sd);
sd                809 drivers/media/i2c/ov772x.c static int ov772x_g_register(struct v4l2_subdev *sd,
sd                812 drivers/media/i2c/ov772x.c 	struct ov772x_priv *priv = to_ov772x(sd);
sd                829 drivers/media/i2c/ov772x.c static int ov772x_s_register(struct v4l2_subdev *sd,
sd                832 drivers/media/i2c/ov772x.c 	struct ov772x_priv *priv = to_ov772x(sd);
sd                900 drivers/media/i2c/ov772x.c static int ov772x_s_power(struct v4l2_subdev *sd, int on)
sd                902 drivers/media/i2c/ov772x.c 	struct ov772x_priv *priv = to_ov772x(sd);
sd               1138 drivers/media/i2c/ov772x.c static int ov772x_get_selection(struct v4l2_subdev *sd,
sd               1142 drivers/media/i2c/ov772x.c 	struct ov772x_priv *priv = to_ov772x(sd);
sd               1160 drivers/media/i2c/ov772x.c static int ov772x_get_fmt(struct v4l2_subdev *sd,
sd               1165 drivers/media/i2c/ov772x.c 	struct ov772x_priv *priv = to_ov772x(sd);
sd               1179 drivers/media/i2c/ov772x.c static int ov772x_set_fmt(struct v4l2_subdev *sd,
sd               1183 drivers/media/i2c/ov772x.c 	struct ov772x_priv *priv = to_ov772x(sd);
sd               1301 drivers/media/i2c/ov772x.c static int ov772x_enum_frame_interval(struct v4l2_subdev *sd,
sd               1319 drivers/media/i2c/ov772x.c static int ov772x_enum_mbus_code(struct v4l2_subdev *sd,
sd                270 drivers/media/i2c/ov7740.c static int ov7740_get_register(struct v4l2_subdev *sd,
sd                273 drivers/media/i2c/ov7740.c 	struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
sd                285 drivers/media/i2c/ov7740.c static int ov7740_set_register(struct v4l2_subdev *sd,
sd                288 drivers/media/i2c/ov7740.c 	struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
sd                614 drivers/media/i2c/ov7740.c static int ov7740_set_stream(struct v4l2_subdev *sd, int enable)
sd                616 drivers/media/i2c/ov7740.c 	struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
sd                617 drivers/media/i2c/ov7740.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                652 drivers/media/i2c/ov7740.c static int ov7740_g_frame_interval(struct v4l2_subdev *sd,
sd                664 drivers/media/i2c/ov7740.c static int ov7740_s_frame_interval(struct v4l2_subdev *sd,
sd                711 drivers/media/i2c/ov7740.c static int ov7740_enum_mbus_code(struct v4l2_subdev *sd,
sd                723 drivers/media/i2c/ov7740.c static int ov7740_enum_frame_interval(struct v4l2_subdev *sd,
sd                742 drivers/media/i2c/ov7740.c static int ov7740_enum_frame_size(struct v4l2_subdev *sd,
sd                758 drivers/media/i2c/ov7740.c static int ov7740_try_fmt_internal(struct v4l2_subdev *sd,
sd                763 drivers/media/i2c/ov7740.c 	struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
sd                805 drivers/media/i2c/ov7740.c static int ov7740_set_fmt(struct v4l2_subdev *sd,
sd                809 drivers/media/i2c/ov7740.c 	struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
sd                824 drivers/media/i2c/ov7740.c 		ret = ov7740_try_fmt_internal(sd, &format->format, NULL, NULL);
sd                828 drivers/media/i2c/ov7740.c 		mbus_fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
sd                835 drivers/media/i2c/ov7740.c 	ret = ov7740_try_fmt_internal(sd, &format->format, &ovfmt, &fsize);
sd                850 drivers/media/i2c/ov7740.c static int ov7740_get_fmt(struct v4l2_subdev *sd,
sd                854 drivers/media/i2c/ov7740.c 	struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
sd                863 drivers/media/i2c/ov7740.c 		mbus_fmt = v4l2_subdev_get_try_format(sd, cfg, 0);
sd                891 drivers/media/i2c/ov7740.c static void ov7740_get_default_format(struct v4l2_subdev *sd,
sd                894 drivers/media/i2c/ov7740.c 	struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
sd                904 drivers/media/i2c/ov7740.c static int ov7740_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                906 drivers/media/i2c/ov7740.c 	struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
sd                908 drivers/media/i2c/ov7740.c 				v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd                911 drivers/media/i2c/ov7740.c 	ov7740_get_default_format(sd, format);
sd               1068 drivers/media/i2c/ov7740.c 	struct v4l2_subdev *sd;
sd               1102 drivers/media/i2c/ov7740.c 	sd = &ov7740->subdev;
sd               1104 drivers/media/i2c/ov7740.c 	v4l2_i2c_subdev_init(sd, client, &ov7740_subdev_ops);
sd               1107 drivers/media/i2c/ov7740.c 	sd->internal_ops = &ov7740_subdev_internal_ops;
sd               1108 drivers/media/i2c/ov7740.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
sd               1113 drivers/media/i2c/ov7740.c 	sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1114 drivers/media/i2c/ov7740.c 	ret = media_entity_pads_init(&sd->entity, 1, &ov7740->pad);
sd               1142 drivers/media/i2c/ov7740.c 	ov7740_get_default_format(sd, &ov7740->format);
sd               1144 drivers/media/i2c/ov7740.c 	ret = v4l2_async_register_subdev(sd);
sd               1167 drivers/media/i2c/ov7740.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1168 drivers/media/i2c/ov7740.c 	struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
sd               1173 drivers/media/i2c/ov7740.c 	v4l2_async_unregister_subdev(sd);
sd               1188 drivers/media/i2c/ov7740.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1189 drivers/media/i2c/ov7740.c 	struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
sd               1199 drivers/media/i2c/ov7740.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1200 drivers/media/i2c/ov7740.c 	struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
sd                 65 drivers/media/i2c/ov8856.c #define to_ov8856(_sd)			container_of(_sd, struct ov8856, sd)
sd                565 drivers/media/i2c/ov8856.c 	struct v4l2_subdev sd;
sd                606 drivers/media/i2c/ov8856.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd);
sd                636 drivers/media/i2c/ov8856.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd);
sd                653 drivers/media/i2c/ov8856.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd);
sd                703 drivers/media/i2c/ov8856.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd);
sd                818 drivers/media/i2c/ov8856.c 	ov8856->sd.ctrl_handler = ctrl_hdlr;
sd                834 drivers/media/i2c/ov8856.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd);
sd                853 drivers/media/i2c/ov8856.c 	ret = __v4l2_ctrl_handler_setup(ov8856->sd.ctrl_handler);
sd                869 drivers/media/i2c/ov8856.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd);
sd                876 drivers/media/i2c/ov8856.c static int ov8856_set_stream(struct v4l2_subdev *sd, int enable)
sd                878 drivers/media/i2c/ov8856.c 	struct ov8856 *ov8856 = to_ov8856(sd);
sd                879 drivers/media/i2c/ov8856.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                914 drivers/media/i2c/ov8856.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                915 drivers/media/i2c/ov8856.c 	struct ov8856 *ov8856 = to_ov8856(sd);
sd                929 drivers/media/i2c/ov8856.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                930 drivers/media/i2c/ov8856.c 	struct ov8856 *ov8856 = to_ov8856(sd);
sd                949 drivers/media/i2c/ov8856.c static int ov8856_set_format(struct v4l2_subdev *sd,
sd                953 drivers/media/i2c/ov8856.c 	struct ov8856 *ov8856 = to_ov8856(sd);
sd                965 drivers/media/i2c/ov8856.c 		*v4l2_subdev_get_try_format(sd, cfg, fmt->pad) = fmt->format;
sd                990 drivers/media/i2c/ov8856.c static int ov8856_get_format(struct v4l2_subdev *sd,
sd                994 drivers/media/i2c/ov8856.c 	struct ov8856 *ov8856 = to_ov8856(sd);
sd                998 drivers/media/i2c/ov8856.c 		fmt->format = *v4l2_subdev_get_try_format(&ov8856->sd, cfg,
sd               1008 drivers/media/i2c/ov8856.c static int ov8856_enum_mbus_code(struct v4l2_subdev *sd,
sd               1021 drivers/media/i2c/ov8856.c static int ov8856_enum_frame_size(struct v4l2_subdev *sd,
sd               1039 drivers/media/i2c/ov8856.c static int ov8856_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1041 drivers/media/i2c/ov8856.c 	struct ov8856 *ov8856 = to_ov8856(sd);
sd               1045 drivers/media/i2c/ov8856.c 				 v4l2_subdev_get_try_format(sd, fh->pad, 0));
sd               1077 drivers/media/i2c/ov8856.c 	struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd);
sd               1163 drivers/media/i2c/ov8856.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1164 drivers/media/i2c/ov8856.c 	struct ov8856 *ov8856 = to_ov8856(sd);
sd               1166 drivers/media/i2c/ov8856.c 	v4l2_async_unregister_subdev(sd);
sd               1167 drivers/media/i2c/ov8856.c 	media_entity_cleanup(&sd->entity);
sd               1168 drivers/media/i2c/ov8856.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd               1191 drivers/media/i2c/ov8856.c 	v4l2_i2c_subdev_init(&ov8856->sd, client, &ov8856_subdev_ops);
sd               1206 drivers/media/i2c/ov8856.c 	ov8856->sd.internal_ops = &ov8856_internal_ops;
sd               1207 drivers/media/i2c/ov8856.c 	ov8856->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1208 drivers/media/i2c/ov8856.c 	ov8856->sd.entity.ops = &ov8856_subdev_entity_ops;
sd               1209 drivers/media/i2c/ov8856.c 	ov8856->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1211 drivers/media/i2c/ov8856.c 	ret = media_entity_pads_init(&ov8856->sd.entity, 1, &ov8856->pad);
sd               1217 drivers/media/i2c/ov8856.c 	ret = v4l2_async_register_subdev_sensor_common(&ov8856->sd);
sd               1235 drivers/media/i2c/ov8856.c 	media_entity_cleanup(&ov8856->sd.entity);
sd               1238 drivers/media/i2c/ov8856.c 	v4l2_ctrl_handler_free(ov8856->sd.ctrl_handler);
sd                 39 drivers/media/i2c/ov9640.c #define to_ov9640_sensor(sd)	container_of(sd, struct ov9640_priv, subdev)
sd                266 drivers/media/i2c/ov9640.c static int ov9640_s_stream(struct v4l2_subdev *sd, int enable)
sd                295 drivers/media/i2c/ov9640.c static int ov9640_get_register(struct v4l2_subdev *sd,
sd                298 drivers/media/i2c/ov9640.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                316 drivers/media/i2c/ov9640.c static int ov9640_set_register(struct v4l2_subdev *sd,
sd                319 drivers/media/i2c/ov9640.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                328 drivers/media/i2c/ov9640.c static int ov9640_s_power(struct v4l2_subdev *sd, int on)
sd                330 drivers/media/i2c/ov9640.c 	struct ov9640_priv *priv = to_ov9640_sensor(sd);
sd                503 drivers/media/i2c/ov9640.c static int ov9640_s_fmt(struct v4l2_subdev *sd,
sd                506 drivers/media/i2c/ov9640.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                521 drivers/media/i2c/ov9640.c static int ov9640_set_fmt(struct v4l2_subdev *sd,
sd                548 drivers/media/i2c/ov9640.c 		return ov9640_s_fmt(sd, mf);
sd                555 drivers/media/i2c/ov9640.c static int ov9640_enum_mbus_code(struct v4l2_subdev *sd,
sd                567 drivers/media/i2c/ov9640.c static int ov9640_get_selection(struct v4l2_subdev *sd,
sd                589 drivers/media/i2c/ov9640.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                590 drivers/media/i2c/ov9640.c 	struct ov9640_priv *priv = to_ov9640_sensor(sd);
sd                651 drivers/media/i2c/ov9640.c static int ov9640_g_mbus_config(struct v4l2_subdev *sd,
sd                748 drivers/media/i2c/ov9640.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                749 drivers/media/i2c/ov9640.c 	struct ov9640_priv *priv = to_ov9640_sensor(sd);
sd                249 drivers/media/i2c/ov9650.c 	struct v4l2_subdev sd;
sd                417 drivers/media/i2c/ov9650.c 	return &container_of(ctrl->handler, struct ov965x, ctrls.handler)->sd;
sd                420 drivers/media/i2c/ov9650.c static inline struct ov965x *to_ov965x(struct v4l2_subdev *sd)
sd                422 drivers/media/i2c/ov9650.c 	return container_of(sd, struct ov965x, sd);
sd                436 drivers/media/i2c/ov9650.c 	v4l2_dbg(2, debug, &ov965x->sd, "%s: 0x%02x @ 0x%02x. (%d)\n",
sd                448 drivers/media/i2c/ov9650.c 	v4l2_dbg(2, debug, &ov965x->sd, "%s: 0x%02x @ 0x%02X (%d)\n",
sd                531 drivers/media/i2c/ov9650.c static int ov965x_s_power(struct v4l2_subdev *sd, int on)
sd                533 drivers/media/i2c/ov9650.c 	struct ov965x *ov965x = to_ov965x(sd);
sd                536 drivers/media/i2c/ov9650.c 	v4l2_dbg(1, debug, sd, "%s: on: %d\n", __func__, on);
sd                582 drivers/media/i2c/ov9650.c 	v4l2_dbg(1, debug, &ov965x->sd, "clkrc: %#x, fi: %lu, tr: %lu, %d\n",
sd                591 drivers/media/i2c/ov9650.c 		v4l2_err(&ov965x->sd, "Exposure ctrl range update failed\n");
sd                905 drivers/media/i2c/ov9650.c 	struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
sd                906 drivers/media/i2c/ov9650.c 	struct ov965x *ov965x = to_ov965x(sd);
sd                909 drivers/media/i2c/ov9650.c 	v4l2_dbg(1, debug, sd, "g_ctrl: %s\n", ctrl->name);
sd                919 drivers/media/i2c/ov9650.c 	struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
sd                920 drivers/media/i2c/ov9650.c 	struct ov965x *ov965x = to_ov965x(sd);
sd                923 drivers/media/i2c/ov9650.c 	v4l2_dbg(1, debug, sd, "s_ctrl: %s, value: %d. power: %d\n",
sd               1056 drivers/media/i2c/ov9650.c 	ov965x->sd.ctrl_handler = hdl;
sd               1072 drivers/media/i2c/ov9650.c static int ov965x_enum_mbus_code(struct v4l2_subdev *sd,
sd               1083 drivers/media/i2c/ov9650.c static int ov965x_enum_frame_sizes(struct v4l2_subdev *sd,
sd               1106 drivers/media/i2c/ov9650.c static int ov965x_g_frame_interval(struct v4l2_subdev *sd,
sd               1109 drivers/media/i2c/ov9650.c 	struct ov965x *ov965x = to_ov965x(sd);
sd               1147 drivers/media/i2c/ov9650.c 	v4l2_dbg(1, debug, &ov965x->sd, "Changed frame interval to %u us\n",
sd               1153 drivers/media/i2c/ov9650.c static int ov965x_s_frame_interval(struct v4l2_subdev *sd,
sd               1156 drivers/media/i2c/ov9650.c 	struct ov965x *ov965x = to_ov965x(sd);
sd               1159 drivers/media/i2c/ov9650.c 	v4l2_dbg(1, debug, sd, "Setting %d/%d frame interval\n",
sd               1169 drivers/media/i2c/ov9650.c static int ov965x_get_fmt(struct v4l2_subdev *sd,
sd               1173 drivers/media/i2c/ov9650.c 	struct ov965x *ov965x = to_ov965x(sd);
sd               1177 drivers/media/i2c/ov9650.c 		mf = v4l2_subdev_get_try_format(sd, cfg, 0);
sd               1214 drivers/media/i2c/ov9650.c static int ov965x_set_fmt(struct v4l2_subdev *sd,
sd               1220 drivers/media/i2c/ov9650.c 	struct ov965x *ov965x = to_ov965x(sd);
sd               1238 drivers/media/i2c/ov9650.c 			mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1323 drivers/media/i2c/ov9650.c static int ov965x_s_stream(struct v4l2_subdev *sd, int on)
sd               1325 drivers/media/i2c/ov9650.c 	struct ov965x *ov965x = to_ov965x(sd);
sd               1329 drivers/media/i2c/ov9650.c 	v4l2_dbg(1, debug, sd, "%s: on: %d\n", __func__, on);
sd               1364 drivers/media/i2c/ov9650.c static int ov965x_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1367 drivers/media/i2c/ov9650.c 		v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd               1426 drivers/media/i2c/ov9650.c 		v4l2_dbg(1, debug, &ov965x->sd, "set gpio %d to 1\n", gpio);
sd               1457 drivers/media/i2c/ov9650.c static int ov965x_detect_sensor(struct v4l2_subdev *sd)
sd               1459 drivers/media/i2c/ov9650.c 	struct ov965x *ov965x = to_ov965x(sd);
sd               1480 drivers/media/i2c/ov9650.c 			v4l2_info(sd, "Found OV%04X sensor\n", ov965x->id);
sd               1482 drivers/media/i2c/ov9650.c 			v4l2_err(sd, "Sensor detection failed (%04X, %d)\n",
sd               1496 drivers/media/i2c/ov9650.c 	struct v4l2_subdev *sd;
sd               1543 drivers/media/i2c/ov9650.c 	sd = &ov965x->sd;
sd               1544 drivers/media/i2c/ov9650.c 	v4l2_i2c_subdev_init(sd, client, &ov965x_subdev_ops);
sd               1545 drivers/media/i2c/ov9650.c 	strscpy(sd->name, DRIVER_NAME, sizeof(sd->name));
sd               1547 drivers/media/i2c/ov9650.c 	sd->internal_ops = &ov965x_sd_internal_ops;
sd               1548 drivers/media/i2c/ov9650.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
sd               1552 drivers/media/i2c/ov9650.c 	sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1553 drivers/media/i2c/ov9650.c 	ret = media_entity_pads_init(&sd->entity, 1, &ov965x->pad);
sd               1565 drivers/media/i2c/ov9650.c 	ret = ov965x_detect_sensor(sd);
sd               1572 drivers/media/i2c/ov9650.c 	ret = v4l2_async_register_subdev(sd);
sd               1578 drivers/media/i2c/ov9650.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd               1580 drivers/media/i2c/ov9650.c 	media_entity_cleanup(&sd->entity);
sd               1588 drivers/media/i2c/ov9650.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1589 drivers/media/i2c/ov9650.c 	struct ov965x *ov965x = to_ov965x(sd);
sd               1591 drivers/media/i2c/ov9650.c 	v4l2_async_unregister_subdev(sd);
sd               1592 drivers/media/i2c/ov9650.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd               1593 drivers/media/i2c/ov9650.c 	media_entity_cleanup(&sd->entity);
sd                490 drivers/media/i2c/rj54n1cb0c.c static int rj54n1_enum_mbus_code(struct v4l2_subdev *sd,
sd                501 drivers/media/i2c/rj54n1cb0c.c static int rj54n1_s_stream(struct v4l2_subdev *sd, int enable)
sd                503 drivers/media/i2c/rj54n1cb0c.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                540 drivers/media/i2c/rj54n1cb0c.c static int rj54n1_sensor_scale(struct v4l2_subdev *sd, s32 *in_w, s32 *in_h,
sd                543 drivers/media/i2c/rj54n1cb0c.c static int rj54n1_set_selection(struct v4l2_subdev *sd,
sd                547 drivers/media/i2c/rj54n1cb0c.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                567 drivers/media/i2c/rj54n1cb0c.c 	ret = rj54n1_sensor_scale(sd, &input_w, &input_h, &output_w, &output_h);
sd                580 drivers/media/i2c/rj54n1cb0c.c static int rj54n1_get_selection(struct v4l2_subdev *sd,
sd                584 drivers/media/i2c/rj54n1cb0c.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                605 drivers/media/i2c/rj54n1cb0c.c static int rj54n1_get_fmt(struct v4l2_subdev *sd,
sd                610 drivers/media/i2c/rj54n1cb0c.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                633 drivers/media/i2c/rj54n1cb0c.c static int rj54n1_sensor_scale(struct v4l2_subdev *sd, s32 *in_w, s32 *in_h,
sd                636 drivers/media/i2c/rj54n1cb0c.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                975 drivers/media/i2c/rj54n1cb0c.c static int rj54n1_set_fmt(struct v4l2_subdev *sd,
sd                980 drivers/media/i2c/rj54n1cb0c.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1106 drivers/media/i2c/rj54n1cb0c.c 	ret = rj54n1_sensor_scale(sd, &input_w, &input_h, &output_w, &output_h);
sd               1129 drivers/media/i2c/rj54n1cb0c.c static int rj54n1_g_register(struct v4l2_subdev *sd,
sd               1132 drivers/media/i2c/rj54n1cb0c.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1147 drivers/media/i2c/rj54n1cb0c.c static int rj54n1_s_register(struct v4l2_subdev *sd,
sd               1150 drivers/media/i2c/rj54n1cb0c.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1163 drivers/media/i2c/rj54n1cb0c.c static int rj54n1_s_power(struct v4l2_subdev *sd, int on)
sd               1165 drivers/media/i2c/rj54n1cb0c.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1192 drivers/media/i2c/rj54n1cb0c.c 	struct v4l2_subdev *sd = &rj54n1->subdev;
sd               1193 drivers/media/i2c/rj54n1cb0c.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                342 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_load_fw(struct v4l2_subdev *sd)
sd                344 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = sensor_sd_to_s5c73m3(sd);
sd                354 drivers/media/i2c/s5c73m3/s5c73m3-core.c 		v4l2_err(sd, "Firmware request failed (%s)\n", fw_name);
sd                358 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	v4l2_info(sd, "Loading firmware (%s, %zu B)\n", fw_name, fw->size);
sd                365 drivers/media/i2c/s5c73m3/s5c73m3-core.c 		v4l2_err(sd, "SPI write failed\n");
sd                413 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int __s5c73m3_s_stream(struct s5c73m3 *state, struct v4l2_subdev *sd,
sd                445 drivers/media/i2c/s5c73m3/s5c73m3-core.c 			v4l2_err(sd, "Error setting frame rate(%d)\n", ret);
sd                451 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_oif_s_stream(struct v4l2_subdev *sd, int on)
sd                453 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
sd                457 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	ret = __s5c73m3_s_stream(state, sd, on);
sd                481 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct v4l2_subdev *sd = &state->sensor_sd;
sd                514 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	v4l2_info(sd, "Sensor type: %s, FW version: %s\n",
sd                521 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct v4l2_subdev *sd = &state->sensor_sd;
sd                526 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	v4l2_warn(sd, "Updating F-ROM firmware.\n");
sd                539 drivers/media/i2c/s5c73m3/s5c73m3-core.c 			v4l2_warn(sd, "Updating F-ROM firmware failed.\n");
sd                542 drivers/media/i2c/s5c73m3/s5c73m3-core.c 			v4l2_warn(sd, "Updating F-ROM firmware finished.\n");
sd                549 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	v4l2_warn(sd, "Updating F-ROM firmware timed-out.\n");
sd                555 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct v4l2_subdev *sd = &state->sensor_sd;
sd                568 drivers/media/i2c/s5c73m3/s5c73m3-core.c 		v4l2_err(sd, "booting failed: %d\n", ret);
sd                586 drivers/media/i2c/s5c73m3/s5c73m3-core.c 		v4l2_err(sd, "SPI not ready: %d\n", ret);
sd                590 drivers/media/i2c/s5c73m3/s5c73m3-core.c 		s5c73m3_load_fw(sd);
sd                660 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct v4l2_subdev *sd = &state->sensor_sd;
sd                673 drivers/media/i2c/s5c73m3/s5c73m3-core.c 		v4l2_err(sd, "%s: booting failed: %d\n", __func__, ret);
sd                697 drivers/media/i2c/s5c73m3/s5c73m3-core.c 		v4l2_err(sd, "SPI not ready: %d\n", ret);
sd                730 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct v4l2_subdev *sd = &state->sensor_sd;
sd                742 drivers/media/i2c/s5c73m3/s5c73m3-core.c 		v4l2_err(sd, "Booting failed: %d\n", ret);
sd                756 drivers/media/i2c/s5c73m3/s5c73m3-core.c 		v4l2_err(sd, "Binary read failed: %d\n", ret);
sd                824 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct v4l2_subdev *sd = &state->sensor_sd;
sd                847 drivers/media/i2c/s5c73m3/s5c73m3-core.c 						v4l2_subdev_get_try_format(sd, cfg,
sd                874 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_oif_g_frame_interval(struct v4l2_subdev *sd,
sd                877 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
sd                923 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_oif_s_frame_interval(struct v4l2_subdev *sd,
sd                926 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
sd                932 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	v4l2_dbg(1, s5c73m3_dbg, sd, "Setting %d/%d frame interval\n",
sd                948 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_oif_enum_frame_interval(struct v4l2_subdev *sd,
sd                952 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
sd                986 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_get_fmt(struct v4l2_subdev *sd,
sd                990 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = sensor_sd_to_s5c73m3(sd);
sd                995 drivers/media/i2c/s5c73m3/s5c73m3-core.c 		fmt->format = *v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1020 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_oif_get_fmt(struct v4l2_subdev *sd,
sd               1024 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
sd               1029 drivers/media/i2c/s5c73m3/s5c73m3-core.c 		fmt->format = *v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1058 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_set_fmt(struct v4l2_subdev *sd,
sd               1063 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = sensor_sd_to_s5c73m3(sd);
sd               1072 drivers/media/i2c/s5c73m3/s5c73m3-core.c 		mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1097 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_oif_set_fmt(struct v4l2_subdev *sd,
sd               1102 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
sd               1111 drivers/media/i2c/s5c73m3/s5c73m3-core.c 		mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1114 drivers/media/i2c/s5c73m3/s5c73m3-core.c 			mf = v4l2_subdev_get_try_format(sd, cfg, OIF_SOURCE_PAD);
sd               1144 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_oif_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
sd               1147 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
sd               1162 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_oif_set_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
sd               1165 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
sd               1185 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_enum_mbus_code(struct v4l2_subdev *sd,
sd               1201 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_oif_enum_mbus_code(struct v4l2_subdev *sd,
sd               1216 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_enum_frame_size(struct v4l2_subdev *sd,
sd               1243 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_oif_enum_frame_size(struct v4l2_subdev *sd,
sd               1247 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
sd               1262 drivers/media/i2c/s5c73m3/s5c73m3-core.c 				mf = v4l2_subdev_get_try_format(sd, cfg,
sd               1302 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_oif_log_status(struct v4l2_subdev *sd)
sd               1304 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
sd               1306 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	v4l2_ctrl_handler_log_status(sd->ctrl_handler, sd->name);
sd               1308 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	v4l2_info(sd, "power: %d, apply_fmt: %d\n", state->power,
sd               1314 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1318 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	mf = v4l2_subdev_get_try_format(sd, fh->pad, S5C73M3_ISP_PAD);
sd               1322 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	mf = v4l2_subdev_get_try_format(sd, fh->pad, S5C73M3_JPEG_PAD);
sd               1329 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_oif_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1333 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	mf = v4l2_subdev_get_try_format(sd, fh->pad, OIF_ISP_PAD);
sd               1337 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	mf = v4l2_subdev_get_try_format(sd, fh->pad, OIF_JPEG_PAD);
sd               1341 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	mf = v4l2_subdev_get_try_format(sd, fh->pad, OIF_SOURCE_PAD);
sd               1434 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_oif_set_power(struct v4l2_subdev *sd, int on)
sd               1436 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
sd               1454 drivers/media/i2c/s5c73m3/s5c73m3-core.c 			v4l2_err(sd, "Soft landing lens failed\n");
sd               1459 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	v4l2_dbg(1, s5c73m3_dbg, sd, "%s: power: %d\n",
sd               1466 drivers/media/i2c/s5c73m3/s5c73m3-core.c static int s5c73m3_oif_registered(struct v4l2_subdev *sd)
sd               1468 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
sd               1471 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	ret = v4l2_device_register_subdev(sd->v4l2_dev, &state->sensor_sd);
sd               1473 drivers/media/i2c/s5c73m3/s5c73m3-core.c 		v4l2_err(sd->v4l2_dev, "Failed to register %s\n",
sd               1489 drivers/media/i2c/s5c73m3/s5c73m3-core.c static void s5c73m3_oif_unregistered(struct v4l2_subdev *sd)
sd               1491 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
sd               1656 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	struct v4l2_subdev *sd;
sd               1671 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	sd = &state->sensor_sd;
sd               1674 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	v4l2_subdev_init(sd, &s5c73m3_subdev_ops);
sd               1675 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	sd->owner = client->dev.driver->owner;
sd               1676 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	v4l2_set_subdevdata(sd, state);
sd               1677 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	strscpy(sd->name, "S5C73M3", sizeof(sd->name));
sd               1679 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	sd->internal_ops = &s5c73m3_internal_ops;
sd               1680 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1684 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1686 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	ret = media_entity_pads_init(&sd->entity, S5C73M3_NUM_PADS,
sd               1760 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	v4l2_info(sd, "%s: completed successfully\n", __func__);
sd               1766 drivers/media/i2c/s5c73m3/s5c73m3-core.c 	media_entity_cleanup(&sd->entity);
sd                 62 drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c 	struct v4l2_subdev *sd = ctrl_to_sensor_sd(ctrl);
sd                 63 drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c 	struct s5c73m3 *state = sensor_sd_to_s5c73m3(sd);
sd                108 drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c 	struct v4l2_subdev *sd = &state->sensor_sd;
sd                135 drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c 	v4l2_dbg(1, s5c73m3_dbg, sd,
sd                268 drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c 	struct v4l2_subdev *sd = &state->sensor_sd;
sd                270 drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c 	v4l2_dbg(1, s5c73m3_dbg, sd, "Image stabilization: %d\n", val);
sd                339 drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c 	struct v4l2_subdev *sd = ctrl_to_sensor_sd(ctrl);
sd                340 drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c 	struct s5c73m3 *state = sensor_sd_to_s5c73m3(sd);
sd                343 drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c 	v4l2_dbg(1, s5c73m3_dbg, sd, "set_ctrl: %s, value: %d\n",
sd                446 drivers/media/i2c/s5c73m3/s5c73m3.h static inline struct s5c73m3 *sensor_sd_to_s5c73m3(struct v4l2_subdev *sd)
sd                448 drivers/media/i2c/s5c73m3/s5c73m3.h 	return container_of(sd, struct s5c73m3, sensor_sd);
sd                451 drivers/media/i2c/s5c73m3/s5c73m3.h static inline struct s5c73m3 *oif_sd_to_s5c73m3(struct v4l2_subdev *sd)
sd                453 drivers/media/i2c/s5c73m3/s5c73m3.h 	return container_of(sd, struct s5c73m3, oif_sd);
sd                181 drivers/media/i2c/s5k4ecgx.c 	struct v4l2_subdev sd;
sd                196 drivers/media/i2c/s5k4ecgx.c static inline struct s5k4ecgx *to_s5k4ecgx(struct v4l2_subdev *sd)
sd                198 drivers/media/i2c/s5k4ecgx.c 	return container_of(sd, struct s5k4ecgx, sd);
sd                266 drivers/media/i2c/s5k4ecgx.c static int s5k4ecgx_read_fw_ver(struct v4l2_subdev *sd)
sd                268 drivers/media/i2c/s5k4ecgx.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                274 drivers/media/i2c/s5k4ecgx.c 		v4l2_err(sd, "FW version check failed!\n");
sd                282 drivers/media/i2c/s5k4ecgx.c 	v4l2_info(sd, "chip found FW ver: 0x%x, HW rev: 0x%x\n",
sd                287 drivers/media/i2c/s5k4ecgx.c static int s5k4ecgx_set_ahb_address(struct v4l2_subdev *sd)
sd                289 drivers/media/i2c/s5k4ecgx.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                324 drivers/media/i2c/s5k4ecgx.c static int s5k4ecgx_load_firmware(struct v4l2_subdev *sd)
sd                326 drivers/media/i2c/s5k4ecgx.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                333 drivers/media/i2c/s5k4ecgx.c 	err = request_firmware(&fw, S5K4ECGX_FIRMWARE, sd->v4l2_dev->dev);
sd                335 drivers/media/i2c/s5k4ecgx.c 		v4l2_err(sd, "Failed to read firmware %s\n", S5K4ECGX_FIRMWARE);
sd                340 drivers/media/i2c/s5k4ecgx.c 	v4l2_dbg(3, debug, sd, "FW: %s size %zu register sets %d\n",
sd                351 drivers/media/i2c/s5k4ecgx.c 		v4l2_err(sd, "FW: invalid crc (%#x:%#x)\n", crc, crc_file);
sd                426 drivers/media/i2c/s5k4ecgx.c 	struct i2c_client *client = v4l2_get_subdevdata(&priv->sd);
sd                440 drivers/media/i2c/s5k4ecgx.c static int s5k4ecgx_init_sensor(struct v4l2_subdev *sd)
sd                444 drivers/media/i2c/s5k4ecgx.c 	ret = s5k4ecgx_set_ahb_address(sd);
sd                450 drivers/media/i2c/s5k4ecgx.c 		ret = s5k4ecgx_load_firmware(sd);
sd                452 drivers/media/i2c/s5k4ecgx.c 		v4l2_err(sd, "Failed to write initial settings\n");
sd                527 drivers/media/i2c/s5k4ecgx.c static int s5k4ecgx_enum_mbus_code(struct v4l2_subdev *sd,
sd                538 drivers/media/i2c/s5k4ecgx.c static int s5k4ecgx_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd                541 drivers/media/i2c/s5k4ecgx.c 	struct s5k4ecgx *priv = to_s5k4ecgx(sd);
sd                546 drivers/media/i2c/s5k4ecgx.c 			mf = v4l2_subdev_get_try_format(sd, cfg, 0);
sd                565 drivers/media/i2c/s5k4ecgx.c static const struct s5k4ecgx_pixfmt *s5k4ecgx_try_fmt(struct v4l2_subdev *sd,
sd                578 drivers/media/i2c/s5k4ecgx.c static int s5k4ecgx_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd                581 drivers/media/i2c/s5k4ecgx.c 	struct s5k4ecgx *priv = to_s5k4ecgx(sd);
sd                587 drivers/media/i2c/s5k4ecgx.c 	pf = s5k4ecgx_try_fmt(sd, &fmt->format);
sd                594 drivers/media/i2c/s5k4ecgx.c 			mf = v4l2_subdev_get_try_format(sd, cfg, 0);
sd                624 drivers/media/i2c/s5k4ecgx.c 	struct v4l2_subdev *sd = &container_of(ctrl->handler, struct s5k4ecgx,
sd                625 drivers/media/i2c/s5k4ecgx.c 						handler)->sd;
sd                626 drivers/media/i2c/s5k4ecgx.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                627 drivers/media/i2c/s5k4ecgx.c 	struct s5k4ecgx *priv = to_s5k4ecgx(sd);
sd                631 drivers/media/i2c/s5k4ecgx.c 	v4l2_dbg(1, debug, sd, "ctrl: 0x%x, value: %d\n", ctrl->id, ctrl->val);
sd                656 drivers/media/i2c/s5k4ecgx.c 		v4l2_err(sd, "Failed to write s_ctrl err %d\n", err);
sd                668 drivers/media/i2c/s5k4ecgx.c static int s5k4ecgx_registered(struct v4l2_subdev *sd)
sd                671 drivers/media/i2c/s5k4ecgx.c 	struct s5k4ecgx *priv = to_s5k4ecgx(sd);
sd                676 drivers/media/i2c/s5k4ecgx.c 		ret = s5k4ecgx_read_fw_ver(sd);
sd                687 drivers/media/i2c/s5k4ecgx.c static int s5k4ecgx_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                689 drivers/media/i2c/s5k4ecgx.c 	struct v4l2_mbus_framefmt *mf = v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd                705 drivers/media/i2c/s5k4ecgx.c static int s5k4ecgx_s_power(struct v4l2_subdev *sd, int on)
sd                707 drivers/media/i2c/s5k4ecgx.c 	struct s5k4ecgx *priv = to_s5k4ecgx(sd);
sd                710 drivers/media/i2c/s5k4ecgx.c 	v4l2_dbg(1, debug, sd, "Switching %s\n", on ? "on" : "off");
sd                718 drivers/media/i2c/s5k4ecgx.c 		ret = s5k4ecgx_init_sensor(sd);
sd                730 drivers/media/i2c/s5k4ecgx.c static int s5k4ecgx_log_status(struct v4l2_subdev *sd)
sd                732 drivers/media/i2c/s5k4ecgx.c 	v4l2_ctrl_handler_log_status(sd->ctrl_handler, sd->name);
sd                744 drivers/media/i2c/s5k4ecgx.c 	struct i2c_client *client = v4l2_get_subdevdata(&priv->sd);
sd                791 drivers/media/i2c/s5k4ecgx.c 	struct i2c_client *client = v4l2_get_subdevdata(&priv->sd);
sd                810 drivers/media/i2c/s5k4ecgx.c static int s5k4ecgx_s_stream(struct v4l2_subdev *sd, int on)
sd                812 drivers/media/i2c/s5k4ecgx.c 	struct s5k4ecgx *priv = to_s5k4ecgx(sd);
sd                815 drivers/media/i2c/s5k4ecgx.c 	v4l2_dbg(1, debug, sd, "Turn streaming %s\n", on ? "on" : "off");
sd                923 drivers/media/i2c/s5k4ecgx.c 	priv->sd.ctrl_handler = hdl;
sd                932 drivers/media/i2c/s5k4ecgx.c 	struct v4l2_subdev *sd;
sd                948 drivers/media/i2c/s5k4ecgx.c 	sd = &priv->sd;
sd                950 drivers/media/i2c/s5k4ecgx.c 	v4l2_i2c_subdev_init(sd, client, &s5k4ecgx_ops);
sd                952 drivers/media/i2c/s5k4ecgx.c 	strscpy(sd->name, S5K4ECGX_DRIVER_NAME, sizeof(sd->name));
sd                954 drivers/media/i2c/s5k4ecgx.c 	sd->internal_ops = &s5k4ecgx_subdev_internal_ops;
sd                956 drivers/media/i2c/s5k4ecgx.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                959 drivers/media/i2c/s5k4ecgx.c 	sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd                960 drivers/media/i2c/s5k4ecgx.c 	ret = media_entity_pads_init(&sd->entity, 1, &priv->pad);
sd                990 drivers/media/i2c/s5k4ecgx.c 	media_entity_cleanup(&priv->sd.entity);
sd                997 drivers/media/i2c/s5k4ecgx.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                998 drivers/media/i2c/s5k4ecgx.c 	struct s5k4ecgx *priv = to_s5k4ecgx(sd);
sd               1002 drivers/media/i2c/s5k4ecgx.c 	v4l2_device_unregister_subdev(sd);
sd               1004 drivers/media/i2c/s5k4ecgx.c 	media_entity_cleanup(&sd->entity);
sd                301 drivers/media/i2c/s5k5baf.c 	struct v4l2_subdev sd;
sd                403 drivers/media/i2c/s5k5baf.c 	return &container_of(ctrl->handler, struct s5k5baf, ctrls.handler)->sd;
sd                406 drivers/media/i2c/s5k5baf.c static inline bool s5k5baf_is_cis_subdev(struct v4l2_subdev *sd)
sd                408 drivers/media/i2c/s5k5baf.c 	return sd->entity.function == MEDIA_ENT_F_CAM_SENSOR;
sd                411 drivers/media/i2c/s5k5baf.c static inline struct s5k5baf *to_s5k5baf(struct v4l2_subdev *sd)
sd                413 drivers/media/i2c/s5k5baf.c 	if (s5k5baf_is_cis_subdev(sd))
sd                414 drivers/media/i2c/s5k5baf.c 		return container_of(sd, struct s5k5baf, cis_sd);
sd                416 drivers/media/i2c/s5k5baf.c 		return container_of(sd, struct s5k5baf, sd);
sd                421 drivers/media/i2c/s5k5baf.c 	struct i2c_client *c = v4l2_get_subdevdata(&state->sd);
sd                451 drivers/media/i2c/s5k5baf.c 	struct i2c_client *c = v4l2_get_subdevdata(&state->sd);
sd                481 drivers/media/i2c/s5k5baf.c 	struct i2c_client *c = v4l2_get_subdevdata(&state->sd);
sd                553 drivers/media/i2c/s5k5baf.c 	v4l2_err(&state->sd, "timeout on register synchronize (%#x)\n", addr);
sd                603 drivers/media/i2c/s5k5baf.c 		v4l2_err(&state->sd, "error configuring PLL (%d)\n", status);
sd                811 drivers/media/i2c/s5k5baf.c 			v4l2_info(&state->sd,
sd                815 drivers/media/i2c/s5k5baf.c 			v4l2_err(&state->sd,
sd                820 drivers/media/i2c/s5k5baf.c 	v4l2_err(&state->sd, "cannot find correct frame interval\n");
sd                842 drivers/media/i2c/s5k5baf.c 		v4l2_err(&state->sd,
sd                891 drivers/media/i2c/s5k5baf.c 			v4l2_err(&state->sd,
sd                899 drivers/media/i2c/s5k5baf.c 		v4l2_err(&state->sd, "crop error: %d\n", err);
sd                968 drivers/media/i2c/s5k5baf.c 	v4l2_dbg(1, debug, &state->sd, "clock frequency: %ld\n",
sd                979 drivers/media/i2c/s5k5baf.c 	v4l2_err(&state->sd, "%s() failed (%d)\n", __func__, ret);
sd               1000 drivers/media/i2c/s5k5baf.c 		v4l2_err(&state->sd, "failed to disable regulators\n");
sd               1028 drivers/media/i2c/s5k5baf.c 	struct i2c_client *c = v4l2_get_subdevdata(&state->sd);
sd               1047 drivers/media/i2c/s5k5baf.c static int s5k5baf_set_power(struct v4l2_subdev *sd, int on)
sd               1049 drivers/media/i2c/s5k5baf.c 	struct s5k5baf *state = to_s5k5baf(sd);
sd               1100 drivers/media/i2c/s5k5baf.c static int s5k5baf_s_stream(struct v4l2_subdev *sd, int on)
sd               1102 drivers/media/i2c/s5k5baf.c 	struct s5k5baf *state = to_s5k5baf(sd);
sd               1132 drivers/media/i2c/s5k5baf.c static int s5k5baf_g_frame_interval(struct v4l2_subdev *sd,
sd               1135 drivers/media/i2c/s5k5baf.c 	struct s5k5baf *state = to_s5k5baf(sd);
sd               1165 drivers/media/i2c/s5k5baf.c 		v4l2_info(&state->sd, "frame interval changed to %d00us\n",
sd               1169 drivers/media/i2c/s5k5baf.c static int s5k5baf_s_frame_interval(struct v4l2_subdev *sd,
sd               1172 drivers/media/i2c/s5k5baf.c 	struct s5k5baf *state = to_s5k5baf(sd);
sd               1183 drivers/media/i2c/s5k5baf.c static int s5k5baf_enum_frame_interval(struct v4l2_subdev *sd,
sd               1202 drivers/media/i2c/s5k5baf.c static int s5k5baf_enum_mbus_code(struct v4l2_subdev *sd,
sd               1220 drivers/media/i2c/s5k5baf.c static int s5k5baf_enum_frame_size(struct v4l2_subdev *sd,
sd               1278 drivers/media/i2c/s5k5baf.c static int s5k5baf_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd               1281 drivers/media/i2c/s5k5baf.c 	struct s5k5baf *state = to_s5k5baf(sd);
sd               1286 drivers/media/i2c/s5k5baf.c 		mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1308 drivers/media/i2c/s5k5baf.c static int s5k5baf_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd               1312 drivers/media/i2c/s5k5baf.c 	struct s5k5baf *state = to_s5k5baf(sd);
sd               1319 drivers/media/i2c/s5k5baf.c 		*v4l2_subdev_get_try_format(sd, cfg, fmt->pad) = *mf;
sd               1370 drivers/media/i2c/s5k5baf.c static int s5k5baf_get_selection(struct v4l2_subdev *sd,
sd               1375 drivers/media/i2c/s5k5baf.c 	struct s5k5baf *state = to_s5k5baf(sd);
sd               1391 drivers/media/i2c/s5k5baf.c 			sel->r = *v4l2_subdev_get_try_compose(sd, cfg, sel->pad);
sd               1393 drivers/media/i2c/s5k5baf.c 			sel->r = *v4l2_subdev_get_try_crop(sd, cfg, sel->pad);
sd               1461 drivers/media/i2c/s5k5baf.c static int s5k5baf_set_selection(struct v4l2_subdev *sd,
sd               1466 drivers/media/i2c/s5k5baf.c 	struct s5k5baf *state = to_s5k5baf(sd);
sd               1483 drivers/media/i2c/s5k5baf.c 				v4l2_subdev_get_try_crop(sd, cfg, PAD_CIS),
sd               1484 drivers/media/i2c/s5k5baf.c 				v4l2_subdev_get_try_compose(sd, cfg, PAD_CIS),
sd               1485 drivers/media/i2c/s5k5baf.c 				v4l2_subdev_get_try_crop(sd, cfg, PAD_OUT)
sd               1550 drivers/media/i2c/s5k5baf.c 	struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
sd               1551 drivers/media/i2c/s5k5baf.c 	struct s5k5baf *state = to_s5k5baf(sd);
sd               1554 drivers/media/i2c/s5k5baf.c 	v4l2_dbg(1, debug, sd, "ctrl: %s, value: %d\n", ctrl->name, ctrl->val);
sd               1637 drivers/media/i2c/s5k5baf.c 		v4l2_err(&state->sd, "cannot init ctrl handler (%d)\n", ret);
sd               1685 drivers/media/i2c/s5k5baf.c 		v4l2_err(&state->sd, "error creating controls (%d)\n",
sd               1692 drivers/media/i2c/s5k5baf.c 	state->sd.ctrl_handler = hdl;
sd               1699 drivers/media/i2c/s5k5baf.c static int s5k5baf_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1703 drivers/media/i2c/s5k5baf.c 	mf = v4l2_subdev_get_try_format(sd, fh->pad, PAD_CIS);
sd               1706 drivers/media/i2c/s5k5baf.c 	if (s5k5baf_is_cis_subdev(sd))
sd               1709 drivers/media/i2c/s5k5baf.c 	mf = v4l2_subdev_get_try_format(sd, fh->pad, PAD_OUT);
sd               1716 drivers/media/i2c/s5k5baf.c 	*v4l2_subdev_get_try_crop(sd, fh->pad, PAD_CIS) = s5k5baf_cis_rect;
sd               1717 drivers/media/i2c/s5k5baf.c 	*v4l2_subdev_get_try_compose(sd, fh->pad, PAD_CIS) = s5k5baf_cis_rect;
sd               1718 drivers/media/i2c/s5k5baf.c 	*v4l2_subdev_get_try_crop(sd, fh->pad, PAD_OUT) = s5k5baf_cis_rect;
sd               1735 drivers/media/i2c/s5k5baf.c 	v4l2_info(&state->sd, "FW API=%#x, revision=%#x sensor_id=%#x\n",
sd               1739 drivers/media/i2c/s5k5baf.c 		v4l2_err(&state->sd, "FW API version not supported\n");
sd               1746 drivers/media/i2c/s5k5baf.c static int s5k5baf_registered(struct v4l2_subdev *sd)
sd               1748 drivers/media/i2c/s5k5baf.c 	struct s5k5baf *state = to_s5k5baf(sd);
sd               1751 drivers/media/i2c/s5k5baf.c 	ret = v4l2_device_register_subdev(sd->v4l2_dev, &state->cis_sd);
sd               1753 drivers/media/i2c/s5k5baf.c 		v4l2_err(sd, "failed to register subdev %s\n",
sd               1757 drivers/media/i2c/s5k5baf.c 					       &state->sd.entity, PAD_CIS,
sd               1763 drivers/media/i2c/s5k5baf.c static void s5k5baf_unregistered(struct v4l2_subdev *sd)
sd               1765 drivers/media/i2c/s5k5baf.c 	struct s5k5baf *state = to_s5k5baf(sd);
sd               1797 drivers/media/i2c/s5k5baf.c 	struct i2c_client *c = v4l2_get_subdevdata(&state->sd);
sd               1892 drivers/media/i2c/s5k5baf.c 	struct v4l2_subdev *sd;
sd               1895 drivers/media/i2c/s5k5baf.c 	sd = &state->cis_sd;
sd               1896 drivers/media/i2c/s5k5baf.c 	v4l2_subdev_init(sd, &s5k5baf_cis_subdev_ops);
sd               1897 drivers/media/i2c/s5k5baf.c 	sd->owner = THIS_MODULE;
sd               1898 drivers/media/i2c/s5k5baf.c 	v4l2_set_subdevdata(sd, state);
sd               1899 drivers/media/i2c/s5k5baf.c 	snprintf(sd->name, sizeof(sd->name), "S5K5BAF-CIS %d-%04x",
sd               1902 drivers/media/i2c/s5k5baf.c 	sd->internal_ops = &s5k5baf_cis_subdev_internal_ops;
sd               1903 drivers/media/i2c/s5k5baf.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1906 drivers/media/i2c/s5k5baf.c 	sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1907 drivers/media/i2c/s5k5baf.c 	ret = media_entity_pads_init(&sd->entity, NUM_CIS_PADS, &state->cis_pad);
sd               1911 drivers/media/i2c/s5k5baf.c 	sd = &state->sd;
sd               1912 drivers/media/i2c/s5k5baf.c 	v4l2_i2c_subdev_init(sd, c, &s5k5baf_subdev_ops);
sd               1913 drivers/media/i2c/s5k5baf.c 	snprintf(sd->name, sizeof(sd->name), "S5K5BAF-ISP %d-%04x",
sd               1916 drivers/media/i2c/s5k5baf.c 	sd->internal_ops = &s5k5baf_subdev_internal_ops;
sd               1917 drivers/media/i2c/s5k5baf.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1921 drivers/media/i2c/s5k5baf.c 	sd->entity.function = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN;
sd               1922 drivers/media/i2c/s5k5baf.c 	ret = media_entity_pads_init(&sd->entity, NUM_ISP_PADS, state->pads);
sd               1929 drivers/media/i2c/s5k5baf.c 	dev_err(&c->dev, "cannot init media entity %s\n", sd->name);
sd               1935 drivers/media/i2c/s5k5baf.c 	struct i2c_client *c = v4l2_get_subdevdata(&state->sd);
sd               1979 drivers/media/i2c/s5k5baf.c 	state->clock = devm_clk_get(state->sd.dev, S5K5BAF_CLK_NAME);
sd               2001 drivers/media/i2c/s5k5baf.c 	ret = v4l2_async_register_subdev(&state->sd);
sd               2008 drivers/media/i2c/s5k5baf.c 	v4l2_ctrl_handler_free(state->sd.ctrl_handler);
sd               2010 drivers/media/i2c/s5k5baf.c 	media_entity_cleanup(&state->sd.entity);
sd               2017 drivers/media/i2c/s5k5baf.c 	struct v4l2_subdev *sd = i2c_get_clientdata(c);
sd               2018 drivers/media/i2c/s5k5baf.c 	struct s5k5baf *state = to_s5k5baf(sd);
sd               2020 drivers/media/i2c/s5k5baf.c 	v4l2_async_unregister_subdev(sd);
sd               2021 drivers/media/i2c/s5k5baf.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd               2022 drivers/media/i2c/s5k5baf.c 	media_entity_cleanup(&sd->entity);
sd               2024 drivers/media/i2c/s5k5baf.c 	sd = &state->cis_sd;
sd               2025 drivers/media/i2c/s5k5baf.c 	v4l2_device_unregister_subdev(sd);
sd               2026 drivers/media/i2c/s5k5baf.c 	media_entity_cleanup(&sd->entity);
sd                 76 drivers/media/i2c/s5k6a3.c static inline struct s5k6a3 *sd_to_s5k6a3(struct v4l2_subdev *sd)
sd                 78 drivers/media/i2c/s5k6a3.c 	return container_of(sd, struct s5k6a3, subdev);
sd                101 drivers/media/i2c/s5k6a3.c static int s5k6a3_enum_mbus_code(struct v4l2_subdev *sd,
sd                135 drivers/media/i2c/s5k6a3.c static int s5k6a3_set_fmt(struct v4l2_subdev *sd,
sd                139 drivers/media/i2c/s5k6a3.c 	struct s5k6a3 *sensor = sd_to_s5k6a3(sd);
sd                153 drivers/media/i2c/s5k6a3.c static int s5k6a3_get_fmt(struct v4l2_subdev *sd,
sd                157 drivers/media/i2c/s5k6a3.c 	struct s5k6a3 *sensor = sd_to_s5k6a3(sd);
sd                174 drivers/media/i2c/s5k6a3.c static int s5k6a3_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                176 drivers/media/i2c/s5k6a3.c 	struct v4l2_mbus_framefmt *format = v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd                248 drivers/media/i2c/s5k6a3.c static int s5k6a3_s_power(struct v4l2_subdev *sd, int on)
sd                250 drivers/media/i2c/s5k6a3.c 	struct s5k6a3 *sensor = sd_to_s5k6a3(sd);
sd                282 drivers/media/i2c/s5k6a3.c 	struct v4l2_subdev *sd;
sd                324 drivers/media/i2c/s5k6a3.c 	sd = &sensor->subdev;
sd                325 drivers/media/i2c/s5k6a3.c 	v4l2_i2c_subdev_init(sd, client, &s5k6a3_subdev_ops);
sd                327 drivers/media/i2c/s5k6a3.c 	sd->internal_ops = &s5k6a3_sd_internal_ops;
sd                333 drivers/media/i2c/s5k6a3.c 	sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd                335 drivers/media/i2c/s5k6a3.c 	ret = media_entity_pads_init(&sd->entity, 1, &sensor->pad);
sd                342 drivers/media/i2c/s5k6a3.c 	ret = v4l2_async_register_subdev(sd);
sd                346 drivers/media/i2c/s5k6a3.c 		media_entity_cleanup(&sd->entity);
sd                354 drivers/media/i2c/s5k6a3.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                357 drivers/media/i2c/s5k6a3.c 	v4l2_async_unregister_subdev(sd);
sd                358 drivers/media/i2c/s5k6a3.c 	media_entity_cleanup(&sd->entity);
sd                227 drivers/media/i2c/s5k6aa.c 	struct v4l2_subdev sd;
sd                302 drivers/media/i2c/s5k6aa.c 	return &container_of(ctrl->handler, struct s5k6aa, ctrls.handler)->sd;
sd                305 drivers/media/i2c/s5k6aa.c static inline struct s5k6aa *to_s5k6aa(struct v4l2_subdev *sd)
sd                307 drivers/media/i2c/s5k6aa.c 	return container_of(sd, struct s5k6aa, sd);
sd                382 drivers/media/i2c/s5k6aa.c static int s5k6aa_write_array(struct v4l2_subdev *sd,
sd                385 drivers/media/i2c/s5k6aa.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                427 drivers/media/i2c/s5k6aa.c 	struct i2c_client *c = v4l2_get_subdevdata(&s5k6aa->sd);
sd                466 drivers/media/i2c/s5k6aa.c 	struct i2c_client *client = v4l2_get_subdevdata(&s5k6aa->sd);
sd                478 drivers/media/i2c/s5k6aa.c 	struct i2c_client *c = v4l2_get_subdevdata(&s5k6aa->sd);
sd                533 drivers/media/i2c/s5k6aa.c 	struct i2c_client *c = v4l2_get_subdevdata(&s5k6aa->sd);
sd                561 drivers/media/i2c/s5k6aa.c 	struct i2c_client *client = v4l2_get_subdevdata(&s5k6aa->sd);
sd                588 drivers/media/i2c/s5k6aa.c 	struct i2c_client *client = v4l2_get_subdevdata(&s5k6aa->sd);
sd                631 drivers/media/i2c/s5k6aa.c 	struct i2c_client *client = v4l2_get_subdevdata(&s5k6aa->sd);
sd                648 drivers/media/i2c/s5k6aa.c 	struct i2c_client *c = v4l2_get_subdevdata(&s5k6aa->sd);
sd                678 drivers/media/i2c/s5k6aa.c 	struct i2c_client *client = v4l2_get_subdevdata(&s5k6aa->sd);
sd                734 drivers/media/i2c/s5k6aa.c 	struct i2c_client *client = v4l2_get_subdevdata(&s5k6aa->sd);
sd                787 drivers/media/i2c/s5k6aa.c static int s5k6aa_initialize_isp(struct v4l2_subdev *sd)
sd                789 drivers/media/i2c/s5k6aa.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                790 drivers/media/i2c/s5k6aa.c 	struct s5k6aa *s5k6aa = to_s5k6aa(sd);
sd                804 drivers/media/i2c/s5k6aa.c 	ret = s5k6aa_write_array(sd, s5k6aa_analog_config);
sd                872 drivers/media/i2c/s5k6aa.c static int s5k6aa_set_power(struct v4l2_subdev *sd, int on)
sd                874 drivers/media/i2c/s5k6aa.c 	struct s5k6aa *s5k6aa = to_s5k6aa(sd);
sd                883 drivers/media/i2c/s5k6aa.c 				ret = s5k6aa_initialize_isp(sd);
sd                897 drivers/media/i2c/s5k6aa.c 	return v4l2_ctrl_handler_setup(sd->ctrl_handler);
sd                902 drivers/media/i2c/s5k6aa.c 	struct i2c_client *client = v4l2_get_subdevdata(&s5k6aa->sd);
sd                914 drivers/media/i2c/s5k6aa.c static int s5k6aa_s_stream(struct v4l2_subdev *sd, int on)
sd                916 drivers/media/i2c/s5k6aa.c 	struct s5k6aa *s5k6aa = to_s5k6aa(sd);
sd                934 drivers/media/i2c/s5k6aa.c static int s5k6aa_g_frame_interval(struct v4l2_subdev *sd,
sd                937 drivers/media/i2c/s5k6aa.c 	struct s5k6aa *s5k6aa = to_s5k6aa(sd);
sd                974 drivers/media/i2c/s5k6aa.c 	v4l2_dbg(1, debug, &s5k6aa->sd, "Changed frame interval to %d us\n",
sd                979 drivers/media/i2c/s5k6aa.c static int s5k6aa_s_frame_interval(struct v4l2_subdev *sd,
sd                982 drivers/media/i2c/s5k6aa.c 	struct s5k6aa *s5k6aa = to_s5k6aa(sd);
sd                985 drivers/media/i2c/s5k6aa.c 	v4l2_dbg(1, debug, sd, "Setting %d/%d frame interval\n",
sd                999 drivers/media/i2c/s5k6aa.c static int s5k6aa_enum_frame_interval(struct v4l2_subdev *sd,
sd               1003 drivers/media/i2c/s5k6aa.c 	struct s5k6aa *s5k6aa = to_s5k6aa(sd);
sd               1026 drivers/media/i2c/s5k6aa.c static int s5k6aa_enum_mbus_code(struct v4l2_subdev *sd,
sd               1037 drivers/media/i2c/s5k6aa.c static int s5k6aa_enum_frame_size(struct v4l2_subdev *sd,
sd               1067 drivers/media/i2c/s5k6aa.c 	return v4l2_subdev_get_try_crop(&s5k6aa->sd, cfg, 0);
sd               1091 drivers/media/i2c/s5k6aa.c static int s5k6aa_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd               1094 drivers/media/i2c/s5k6aa.c 	struct s5k6aa *s5k6aa = to_s5k6aa(sd);
sd               1100 drivers/media/i2c/s5k6aa.c 		mf = v4l2_subdev_get_try_format(sd, cfg, 0);
sd               1112 drivers/media/i2c/s5k6aa.c static int s5k6aa_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd               1115 drivers/media/i2c/s5k6aa.c 	struct s5k6aa *s5k6aa = to_s5k6aa(sd);
sd               1125 drivers/media/i2c/s5k6aa.c 		mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1126 drivers/media/i2c/s5k6aa.c 		crop = v4l2_subdev_get_try_crop(sd, cfg, 0);
sd               1165 drivers/media/i2c/s5k6aa.c static int s5k6aa_get_selection(struct v4l2_subdev *sd,
sd               1169 drivers/media/i2c/s5k6aa.c 	struct s5k6aa *s5k6aa = to_s5k6aa(sd);
sd               1182 drivers/media/i2c/s5k6aa.c 	v4l2_dbg(1, debug, sd, "Current crop rectangle: (%d,%d)/%dx%d\n",
sd               1188 drivers/media/i2c/s5k6aa.c static int s5k6aa_set_selection(struct v4l2_subdev *sd,
sd               1192 drivers/media/i2c/s5k6aa.c 	struct s5k6aa *s5k6aa = to_s5k6aa(sd);
sd               1207 drivers/media/i2c/s5k6aa.c 		mf = v4l2_subdev_get_try_format(sd, cfg, 0);
sd               1224 drivers/media/i2c/s5k6aa.c 	v4l2_dbg(1, debug, sd, "Set crop rectangle: (%d,%d)/%dx%d\n",
sd               1252 drivers/media/i2c/s5k6aa.c 	struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
sd               1253 drivers/media/i2c/s5k6aa.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1254 drivers/media/i2c/s5k6aa.c 	struct s5k6aa *s5k6aa = to_s5k6aa(sd);
sd               1257 drivers/media/i2c/s5k6aa.c 	v4l2_dbg(1, debug, sd, "ctrl: 0x%x, value: %d\n", ctrl->id, ctrl->val);
sd               1325 drivers/media/i2c/s5k6aa.c static int s5k6aa_log_status(struct v4l2_subdev *sd)
sd               1327 drivers/media/i2c/s5k6aa.c 	v4l2_ctrl_handler_log_status(sd->ctrl_handler, sd->name);
sd               1419 drivers/media/i2c/s5k6aa.c 	s5k6aa->sd.ctrl_handler = hdl;
sd               1426 drivers/media/i2c/s5k6aa.c static int s5k6aa_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1428 drivers/media/i2c/s5k6aa.c 	struct v4l2_mbus_framefmt *format = v4l2_subdev_get_try_format(sd, fh->pad, 0);
sd               1429 drivers/media/i2c/s5k6aa.c 	struct v4l2_rect *crop = v4l2_subdev_get_try_crop(sd, fh->pad, 0);
sd               1447 drivers/media/i2c/s5k6aa.c 	struct i2c_client *client = v4l2_get_subdevdata(&s5k6aa->sd);
sd               1457 drivers/media/i2c/s5k6aa.c 		v4l2_err(&s5k6aa->sd, "FW revision check failed!\n");
sd               1461 drivers/media/i2c/s5k6aa.c 	v4l2_info(&s5k6aa->sd, "FW API ver.: 0x%X, FW rev.: 0x%X\n",
sd               1467 drivers/media/i2c/s5k6aa.c static int s5k6aa_registered(struct v4l2_subdev *sd)
sd               1469 drivers/media/i2c/s5k6aa.c 	struct s5k6aa *s5k6aa = to_s5k6aa(sd);
sd               1507 drivers/media/i2c/s5k6aa.c 	struct i2c_client *client = v4l2_get_subdevdata(&s5k6aa->sd);
sd               1546 drivers/media/i2c/s5k6aa.c 	struct v4l2_subdev *sd;
sd               1573 drivers/media/i2c/s5k6aa.c 	sd = &s5k6aa->sd;
sd               1574 drivers/media/i2c/s5k6aa.c 	v4l2_i2c_subdev_init(sd, client, &s5k6aa_subdev_ops);
sd               1576 drivers/media/i2c/s5k6aa.c 	strscpy(sd->name, DRIVER_NAME, sizeof(sd->name));
sd               1578 drivers/media/i2c/s5k6aa.c 	sd->internal_ops = &s5k6aa_subdev_internal_ops;
sd               1579 drivers/media/i2c/s5k6aa.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1582 drivers/media/i2c/s5k6aa.c 	sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               1583 drivers/media/i2c/s5k6aa.c 	ret = media_entity_pads_init(&sd->entity, 1, &s5k6aa->pad);
sd               1615 drivers/media/i2c/s5k6aa.c 	media_entity_cleanup(&s5k6aa->sd.entity);
sd               1621 drivers/media/i2c/s5k6aa.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1623 drivers/media/i2c/s5k6aa.c 	v4l2_device_unregister_subdev(sd);
sd               1624 drivers/media/i2c/s5k6aa.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd               1625 drivers/media/i2c/s5k6aa.c 	media_entity_cleanup(&sd->entity);
sd                 56 drivers/media/i2c/saa6588.c 	struct v4l2_subdev sd;
sd                 70 drivers/media/i2c/saa6588.c static inline struct saa6588 *to_saa6588(struct v4l2_subdev *sd)
sd                 72 drivers/media/i2c/saa6588.c 	return container_of(sd, struct saa6588, sd);
sd                250 drivers/media/i2c/saa6588.c 	struct i2c_client *client = v4l2_get_subdevdata(&s->sd);
sd                328 drivers/media/i2c/saa6588.c 	struct i2c_client *client = v4l2_get_subdevdata(&s->sd);
sd                383 drivers/media/i2c/saa6588.c static long saa6588_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
sd                385 drivers/media/i2c/saa6588.c 	struct saa6588 *s = to_saa6588(sd);
sd                415 drivers/media/i2c/saa6588.c static int saa6588_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
sd                417 drivers/media/i2c/saa6588.c 	struct saa6588 *s = to_saa6588(sd);
sd                425 drivers/media/i2c/saa6588.c static int saa6588_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
sd                427 drivers/media/i2c/saa6588.c 	struct saa6588 *s = to_saa6588(sd);
sd                455 drivers/media/i2c/saa6588.c 	struct v4l2_subdev *sd;
sd                469 drivers/media/i2c/saa6588.c 	sd = &s->sd;
sd                470 drivers/media/i2c/saa6588.c 	v4l2_i2c_subdev_init(sd, client, &saa6588_ops);
sd                489 drivers/media/i2c/saa6588.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                490 drivers/media/i2c/saa6588.c 	struct saa6588 *s = to_saa6588(sd);
sd                492 drivers/media/i2c/saa6588.c 	v4l2_device_unregister_subdev(sd);
sd                 82 drivers/media/i2c/saa6752hs.c 	struct v4l2_subdev            sd;
sd                108 drivers/media/i2c/saa6752hs.c static inline struct saa6752hs_state *to_state(struct v4l2_subdev *sd)
sd                110 drivers/media/i2c/saa6752hs.c 	return container_of(sd, struct saa6752hs_state, sd);
sd                424 drivers/media/i2c/saa6752hs.c static int saa6752hs_init(struct v4l2_subdev *sd, u32 leading_null_bytes)
sd                427 drivers/media/i2c/saa6752hs.c 	struct saa6752hs_state *h = to_state(sd);
sd                428 drivers/media/i2c/saa6752hs.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                545 drivers/media/i2c/saa6752hs.c static int saa6752hs_get_fmt(struct v4l2_subdev *sd,
sd                550 drivers/media/i2c/saa6752hs.c 	struct saa6752hs_state *h = to_state(sd);
sd                565 drivers/media/i2c/saa6752hs.c static int saa6752hs_set_fmt(struct v4l2_subdev *sd,
sd                570 drivers/media/i2c/saa6752hs.c 	struct saa6752hs_state *h = to_state(sd);
sd                628 drivers/media/i2c/saa6752hs.c static int saa6752hs_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd                630 drivers/media/i2c/saa6752hs.c 	struct saa6752hs_state *h = to_state(sd);
sd                666 drivers/media/i2c/saa6752hs.c 	struct v4l2_subdev *sd;
sd                677 drivers/media/i2c/saa6752hs.c 	sd = &h->sd;
sd                678 drivers/media/i2c/saa6752hs.c 	v4l2_i2c_subdev_init(sd, client, &saa6752hs_ops);
sd                754 drivers/media/i2c/saa6752hs.c 	sd->ctrl_handler = hdl;
sd                769 drivers/media/i2c/saa6752hs.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                771 drivers/media/i2c/saa6752hs.c 	v4l2_device_unregister_subdev(sd);
sd                772 drivers/media/i2c/saa6752hs.c 	v4l2_ctrl_handler_free(&to_state(sd)->hdl);
sd                 42 drivers/media/i2c/saa7110.c 	struct v4l2_subdev sd;
sd                 53 drivers/media/i2c/saa7110.c static inline struct saa7110 *to_saa7110(struct v4l2_subdev *sd)
sd                 55 drivers/media/i2c/saa7110.c 	return container_of(sd, struct saa7110, sd);
sd                 60 drivers/media/i2c/saa7110.c 	return &container_of(ctrl->handler, struct saa7110, hdl)->sd;
sd                 67 drivers/media/i2c/saa7110.c static int saa7110_write(struct v4l2_subdev *sd, u8 reg, u8 value)
sd                 69 drivers/media/i2c/saa7110.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 70 drivers/media/i2c/saa7110.c 	struct saa7110 *decoder = to_saa7110(sd);
sd                 76 drivers/media/i2c/saa7110.c static int saa7110_write_block(struct v4l2_subdev *sd, const u8 *data, unsigned int len)
sd                 78 drivers/media/i2c/saa7110.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 79 drivers/media/i2c/saa7110.c 	struct saa7110 *decoder = to_saa7110(sd);
sd                 96 drivers/media/i2c/saa7110.c 			ret = saa7110_write(sd, reg++, *data++);
sd                105 drivers/media/i2c/saa7110.c static inline int saa7110_read(struct v4l2_subdev *sd)
sd                107 drivers/media/i2c/saa7110.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                120 drivers/media/i2c/saa7110.c static int saa7110_selmux(struct v4l2_subdev *sd, int chan)
sd                151 drivers/media/i2c/saa7110.c 	struct saa7110 *decoder = to_saa7110(sd);
sd                154 drivers/media/i2c/saa7110.c 	saa7110_write(sd, 0x06, ptr[0]);	/* Luminance control    */
sd                155 drivers/media/i2c/saa7110.c 	saa7110_write(sd, 0x20, ptr[1]);	/* Analog Control #1    */
sd                156 drivers/media/i2c/saa7110.c 	saa7110_write(sd, 0x21, ptr[2]);	/* Analog Control #2    */
sd                157 drivers/media/i2c/saa7110.c 	saa7110_write(sd, 0x22, ptr[3]);	/* Mixer Control #1     */
sd                158 drivers/media/i2c/saa7110.c 	saa7110_write(sd, 0x2C, ptr[4]);	/* Mixer Control #2     */
sd                159 drivers/media/i2c/saa7110.c 	saa7110_write(sd, 0x30, ptr[5]);	/* ADCs gain control    */
sd                160 drivers/media/i2c/saa7110.c 	saa7110_write(sd, 0x31, ptr[6]);	/* Mixer Control #3     */
sd                161 drivers/media/i2c/saa7110.c 	saa7110_write(sd, 0x21, ptr[7]);	/* Analog Control #2    */
sd                177 drivers/media/i2c/saa7110.c static v4l2_std_id determine_norm(struct v4l2_subdev *sd)
sd                180 drivers/media/i2c/saa7110.c 	struct saa7110 *decoder = to_saa7110(sd);
sd                184 drivers/media/i2c/saa7110.c 	saa7110_write_block(sd, initseq, sizeof(initseq));
sd                185 drivers/media/i2c/saa7110.c 	saa7110_selmux(sd, decoder->input);
sd                189 drivers/media/i2c/saa7110.c 	status = saa7110_read(sd);
sd                191 drivers/media/i2c/saa7110.c 		v4l2_dbg(1, debug, sd, "status=0x%02x (no signal)\n", status);
sd                195 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x06, 0x83);
sd                197 drivers/media/i2c/saa7110.c 			v4l2_dbg(1, debug, sd, "status=0x%02x (NTSC/no color)\n", status);
sd                201 drivers/media/i2c/saa7110.c 		v4l2_dbg(1, debug, sd, "status=0x%02x (PAL/no color)\n", status);
sd                207 drivers/media/i2c/saa7110.c 		v4l2_dbg(1, debug, sd, "status=0x%02x (NTSC)\n", status);
sd                208 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x0D, 0x86);
sd                209 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x0F, 0x50);
sd                210 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x11, 0x2C);
sd                216 drivers/media/i2c/saa7110.c 	saa7110_write(sd, 0x0D, 0x86);
sd                217 drivers/media/i2c/saa7110.c 	saa7110_write(sd, 0x0F, 0x10);
sd                218 drivers/media/i2c/saa7110.c 	saa7110_write(sd, 0x11, 0x59);
sd                225 drivers/media/i2c/saa7110.c 	status = saa7110_read(sd);
sd                227 drivers/media/i2c/saa7110.c 		v4l2_dbg(1, debug, sd, "status=0x%02x (SECAM)\n", status);
sd                228 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x0D, 0x87);
sd                231 drivers/media/i2c/saa7110.c 	v4l2_dbg(1, debug, sd, "status=0x%02x (PAL)\n", status);
sd                235 drivers/media/i2c/saa7110.c static int saa7110_g_input_status(struct v4l2_subdev *sd, u32 *pstatus)
sd                237 drivers/media/i2c/saa7110.c 	struct saa7110 *decoder = to_saa7110(sd);
sd                239 drivers/media/i2c/saa7110.c 	int status = saa7110_read(sd);
sd                241 drivers/media/i2c/saa7110.c 	v4l2_dbg(1, debug, sd, "status=0x%02x norm=%llx\n",
sd                252 drivers/media/i2c/saa7110.c static int saa7110_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
sd                254 drivers/media/i2c/saa7110.c 	*std &= determine_norm(sd);
sd                258 drivers/media/i2c/saa7110.c static int saa7110_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd                260 drivers/media/i2c/saa7110.c 	struct saa7110 *decoder = to_saa7110(sd);
sd                266 drivers/media/i2c/saa7110.c 			saa7110_write(sd, 0x0D, 0x86);
sd                267 drivers/media/i2c/saa7110.c 			saa7110_write(sd, 0x0F, 0x50);
sd                268 drivers/media/i2c/saa7110.c 			saa7110_write(sd, 0x11, 0x2C);
sd                270 drivers/media/i2c/saa7110.c 			v4l2_dbg(1, debug, sd, "switched to NTSC\n");
sd                272 drivers/media/i2c/saa7110.c 			saa7110_write(sd, 0x0D, 0x86);
sd                273 drivers/media/i2c/saa7110.c 			saa7110_write(sd, 0x0F, 0x10);
sd                274 drivers/media/i2c/saa7110.c 			saa7110_write(sd, 0x11, 0x59);
sd                276 drivers/media/i2c/saa7110.c 			v4l2_dbg(1, debug, sd, "switched to PAL\n");
sd                278 drivers/media/i2c/saa7110.c 			saa7110_write(sd, 0x0D, 0x87);
sd                279 drivers/media/i2c/saa7110.c 			saa7110_write(sd, 0x0F, 0x10);
sd                280 drivers/media/i2c/saa7110.c 			saa7110_write(sd, 0x11, 0x59);
sd                282 drivers/media/i2c/saa7110.c 			v4l2_dbg(1, debug, sd, "switched to SECAM\n");
sd                290 drivers/media/i2c/saa7110.c static int saa7110_s_routing(struct v4l2_subdev *sd,
sd                293 drivers/media/i2c/saa7110.c 	struct saa7110 *decoder = to_saa7110(sd);
sd                296 drivers/media/i2c/saa7110.c 		v4l2_dbg(1, debug, sd, "input=%d not available\n", input);
sd                300 drivers/media/i2c/saa7110.c 		saa7110_selmux(sd, input);
sd                301 drivers/media/i2c/saa7110.c 		v4l2_dbg(1, debug, sd, "switched to input=%d\n", input);
sd                306 drivers/media/i2c/saa7110.c static int saa7110_s_stream(struct v4l2_subdev *sd, int enable)
sd                308 drivers/media/i2c/saa7110.c 	struct saa7110 *decoder = to_saa7110(sd);
sd                312 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x0E, enable ? 0x18 : 0x80);
sd                313 drivers/media/i2c/saa7110.c 		v4l2_dbg(1, debug, sd, "YUV %s\n", enable ? "on" : "off");
sd                320 drivers/media/i2c/saa7110.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                324 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x19, ctrl->val);
sd                327 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x13, ctrl->val);
sd                330 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x12, ctrl->val);
sd                333 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x07, ctrl->val);
sd                365 drivers/media/i2c/saa7110.c 	struct v4l2_subdev *sd;
sd                379 drivers/media/i2c/saa7110.c 	sd = &decoder->sd;
sd                380 drivers/media/i2c/saa7110.c 	v4l2_i2c_subdev_init(sd, client, &saa7110_ops);
sd                393 drivers/media/i2c/saa7110.c 	sd->ctrl_handler = &decoder->hdl;
sd                404 drivers/media/i2c/saa7110.c 	rv = saa7110_write_block(sd, initseq, sizeof(initseq));
sd                406 drivers/media/i2c/saa7110.c 		v4l2_dbg(1, debug, sd, "init status %d\n", rv);
sd                409 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x21, 0x10);
sd                410 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x0e, 0x18);
sd                411 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x0D, 0x04);
sd                412 drivers/media/i2c/saa7110.c 		ver = saa7110_read(sd);
sd                413 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x0D, 0x06);
sd                415 drivers/media/i2c/saa7110.c 		status = saa7110_read(sd);
sd                416 drivers/media/i2c/saa7110.c 		v4l2_dbg(1, debug, sd, "version %x, status=0x%02x\n",
sd                418 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x0D, 0x86);
sd                419 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x0F, 0x10);
sd                420 drivers/media/i2c/saa7110.c 		saa7110_write(sd, 0x11, 0x59);
sd                433 drivers/media/i2c/saa7110.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                434 drivers/media/i2c/saa7110.c 	struct saa7110 *decoder = to_saa7110(sd);
sd                436 drivers/media/i2c/saa7110.c 	v4l2_device_unregister_subdev(sd);
sd                 69 drivers/media/i2c/saa7115.c 	struct v4l2_subdev sd;
sd                 97 drivers/media/i2c/saa7115.c static inline struct saa711x_state *to_state(struct v4l2_subdev *sd)
sd                 99 drivers/media/i2c/saa7115.c 	return container_of(sd, struct saa711x_state, sd);
sd                104 drivers/media/i2c/saa7115.c 	return &container_of(ctrl->handler, struct saa711x_state, hdl)->sd;
sd                109 drivers/media/i2c/saa7115.c static inline int saa711x_write(struct v4l2_subdev *sd, u8 reg, u8 value)
sd                111 drivers/media/i2c/saa7115.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                154 drivers/media/i2c/saa7115.c static int saa711x_writeregs(struct v4l2_subdev *sd, const unsigned char *regs)
sd                156 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd                166 drivers/media/i2c/saa7115.c 			if (saa711x_write(sd, reg, data) < 0)
sd                169 drivers/media/i2c/saa7115.c 			v4l2_dbg(1, debug, sd, "tried to access reserved reg 0x%02x\n", reg);
sd                175 drivers/media/i2c/saa7115.c static inline int saa711x_read(struct v4l2_subdev *sd, u8 reg)
sd                177 drivers/media/i2c/saa7115.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                750 drivers/media/i2c/saa7115.c static int saa711x_s_clock_freq(struct v4l2_subdev *sd, u32 freq)
sd                752 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd                763 drivers/media/i2c/saa7115.c 	v4l2_dbg(1, debug, sd, "set audio clock freq: %d\n", freq);
sd                794 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_38_CLK_RATIO_AMXCLK_TO_ASCLK, 0x03);
sd                795 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_39_CLK_RATIO_ASCLK_TO_ALRCLK, 0x10 << state->double_asclk);
sd                796 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_3A_AUD_CLK_GEN_BASIC_SETUP, acc);
sd                798 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_30_AUD_MAST_CLK_CYCLES_PER_FIELD, acpf & 0xff);
sd                799 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_30_AUD_MAST_CLK_CYCLES_PER_FIELD+1,
sd                801 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_30_AUD_MAST_CLK_CYCLES_PER_FIELD+2,
sd                804 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_34_AUD_MAST_CLK_NOMINAL_INC, acni & 0xff);
sd                805 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_34_AUD_MAST_CLK_NOMINAL_INC+1, (acni >> 8) & 0xff);
sd                806 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_34_AUD_MAST_CLK_NOMINAL_INC+2, (acni >> 16) & 0x3f);
sd                813 drivers/media/i2c/saa7115.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                814 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd                821 drivers/media/i2c/saa7115.c 				saa711x_read(sd, R_0F_CHROMA_GAIN_CNTL) & 0x7f;
sd                829 drivers/media/i2c/saa7115.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                830 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd                834 drivers/media/i2c/saa7115.c 		saa711x_write(sd, R_0A_LUMA_BRIGHT_CNTL, ctrl->val);
sd                838 drivers/media/i2c/saa7115.c 		saa711x_write(sd, R_0B_LUMA_CONTRAST_CNTL, ctrl->val);
sd                842 drivers/media/i2c/saa7115.c 		saa711x_write(sd, R_0C_CHROMA_SAT_CNTL, ctrl->val);
sd                846 drivers/media/i2c/saa7115.c 		saa711x_write(sd, R_0D_CHROMA_HUE_CNTL, ctrl->val);
sd                852 drivers/media/i2c/saa7115.c 			saa711x_write(sd, R_0F_CHROMA_GAIN_CNTL, state->gain->val);
sd                854 drivers/media/i2c/saa7115.c 			saa711x_write(sd, R_0F_CHROMA_GAIN_CNTL, state->gain->val | 0x80);
sd                864 drivers/media/i2c/saa7115.c static int saa711x_set_size(struct v4l2_subdev *sd, int width, int height)
sd                866 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd                873 drivers/media/i2c/saa7115.c 	v4l2_dbg(1, debug, sd, "decoder set size to %ix%i\n", width, height);
sd                899 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_CC_B_HORIZ_OUTPUT_WINDOW_LENGTH,
sd                901 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_CD_B_HORIZ_OUTPUT_WINDOW_LENGTH_MSB,
sd                912 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_CE_B_VERT_OUTPUT_WINDOW_LENGTH,
sd                914 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_CF_B_VERT_OUTPUT_WINDOW_LENGTH_MSB,
sd                925 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_D0_B_HORIZ_PRESCALING,
sd                928 drivers/media/i2c/saa7115.c 	v4l2_dbg(1, debug, sd, "Hpsc: 0x%05x, Hfsc: 0x%05x\n", HPSC, HFSC);
sd                930 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_D8_B_HORIZ_LUMA_SCALING_INC,
sd                932 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_D9_B_HORIZ_LUMA_SCALING_INC_MSB,
sd                936 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_DC_B_HORIZ_CHROMA_SCALING,
sd                938 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_DD_B_HORIZ_CHROMA_SCALING_MSB,
sd                942 drivers/media/i2c/saa7115.c 	v4l2_dbg(1, debug, sd, "Vsrc: %d, Vscy: 0x%05x\n", Vsrc, VSCY);
sd                945 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_D5_B_LUMA_CONTRAST_CNTL,
sd                947 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_D6_B_CHROMA_SATURATION_CNTL,
sd                951 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_E0_B_VERT_LUMA_SCALING_INC,
sd                953 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_E1_B_VERT_LUMA_SCALING_INC_MSB,
sd                956 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_E2_B_VERT_CHROMA_SCALING_INC,
sd                958 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_E3_B_VERT_CHROMA_SCALING_INC_MSB,
sd                961 drivers/media/i2c/saa7115.c 	saa711x_writeregs(sd, saa7115_cfg_reset_scaler);
sd                964 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_80_GLOBAL_CNTL_1,
sd                965 drivers/media/i2c/saa7115.c 				saa711x_read(sd, R_80_GLOBAL_CNTL_1) | 0x20);
sd                970 drivers/media/i2c/saa7115.c static void saa711x_set_v4lstd(struct v4l2_subdev *sd, v4l2_std_id std)
sd                972 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd                988 drivers/media/i2c/saa7115.c 		v4l2_dbg(1, debug, sd, "decoder set standard 60 Hz\n");
sd                990 drivers/media/i2c/saa7115.c 			u8 reg = saa711x_read(sd, R_08_SYNC_CNTL);
sd                993 drivers/media/i2c/saa7115.c 			saa711x_write(sd, R_08_SYNC_CNTL, reg);
sd                995 drivers/media/i2c/saa7115.c 			saa711x_writeregs(sd, saa7115_cfg_60hz_video);
sd                997 drivers/media/i2c/saa7115.c 		saa711x_set_size(sd, 720, 480);
sd                999 drivers/media/i2c/saa7115.c 		v4l2_dbg(1, debug, sd, "decoder set standard 50 Hz\n");
sd               1001 drivers/media/i2c/saa7115.c 			u8 reg = saa711x_read(sd, R_08_SYNC_CNTL);
sd               1003 drivers/media/i2c/saa7115.c 			saa711x_write(sd, R_08_SYNC_CNTL, reg);
sd               1005 drivers/media/i2c/saa7115.c 			saa711x_writeregs(sd, saa7115_cfg_50hz_video);
sd               1007 drivers/media/i2c/saa7115.c 		saa711x_set_size(sd, 720, 576);
sd               1021 drivers/media/i2c/saa7115.c 		u8 reg = saa711x_read(sd, R_0E_CHROMA_CNTL_1) & 0x8f;
sd               1034 drivers/media/i2c/saa7115.c 		saa711x_write(sd, R_0E_CHROMA_CNTL_1, reg);
sd               1037 drivers/media/i2c/saa7115.c 		int taskb = saa711x_read(sd, R_80_GLOBAL_CNTL_1) & 0x10;
sd               1040 drivers/media/i2c/saa7115.c 			saa711x_writeregs(sd, saa7115_cfg_vbi_on);
sd               1043 drivers/media/i2c/saa7115.c 		saa711x_s_clock_freq(sd, state->audclk_freq);
sd               1048 drivers/media/i2c/saa7115.c static void saa711x_set_lcr(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt)
sd               1050 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd               1121 drivers/media/i2c/saa7115.c 		saa711x_write(sd, i - 2 + R_41_LCR_BASE, lcr[i]);
sd               1125 drivers/media/i2c/saa7115.c 	saa711x_writeregs(sd, fmt == NULL ?
sd               1130 drivers/media/i2c/saa7115.c static int saa711x_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *sliced)
sd               1144 drivers/media/i2c/saa7115.c 	if (saa711x_read(sd, R_80_GLOBAL_CNTL_1) & 0x10)
sd               1147 drivers/media/i2c/saa7115.c 		u8 v = saa711x_read(sd, i - 2 + R_41_LCR_BASE);
sd               1157 drivers/media/i2c/saa7115.c static int saa711x_s_raw_fmt(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt)
sd               1159 drivers/media/i2c/saa7115.c 	saa711x_set_lcr(sd, NULL);
sd               1163 drivers/media/i2c/saa7115.c static int saa711x_s_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt)
sd               1165 drivers/media/i2c/saa7115.c 	saa711x_set_lcr(sd, fmt);
sd               1169 drivers/media/i2c/saa7115.c static int saa711x_set_fmt(struct v4l2_subdev *sd,
sd               1181 drivers/media/i2c/saa7115.c 	return saa711x_set_size(sd, fmt->width, fmt->height);
sd               1190 drivers/media/i2c/saa7115.c static int saa711x_decode_vbi_line(struct v4l2_subdev *sd, struct v4l2_decode_vbi_line *vbi)
sd               1192 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd               1255 drivers/media/i2c/saa7115.c static int saa711x_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
sd               1257 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd               1262 drivers/media/i2c/saa7115.c 	status = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
sd               1264 drivers/media/i2c/saa7115.c 	v4l2_dbg(1, debug, sd, "status: 0x%02x\n", status);
sd               1269 drivers/media/i2c/saa7115.c static int saa711x_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd               1271 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd               1274 drivers/media/i2c/saa7115.c 	saa711x_set_v4lstd(sd, std);
sd               1278 drivers/media/i2c/saa7115.c static int saa711x_s_radio(struct v4l2_subdev *sd)
sd               1280 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd               1286 drivers/media/i2c/saa7115.c static int saa711x_s_routing(struct v4l2_subdev *sd,
sd               1289 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd               1292 drivers/media/i2c/saa7115.c 	v4l2_dbg(1, debug, sd, "decoder set input %d output %d\n",
sd               1306 drivers/media/i2c/saa7115.c 	v4l2_dbg(1, debug, sd, "now setting %s input %s output\n",
sd               1316 drivers/media/i2c/saa7115.c 		saa711x_write(sd, R_10_CHROMA_CNTL_2,
sd               1317 drivers/media/i2c/saa7115.c 				(saa711x_read(sd, R_10_CHROMA_CNTL_2) & 0x3f) |
sd               1319 drivers/media/i2c/saa7115.c 		saa711x_write(sd, R_13_RT_X_PORT_OUT_CNTL,
sd               1320 drivers/media/i2c/saa7115.c 				(saa711x_read(sd, R_13_RT_X_PORT_OUT_CNTL) & 0xf0) |
sd               1325 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_02_INPUT_CNTL_1,
sd               1326 drivers/media/i2c/saa7115.c 		      (saa711x_read(sd, R_02_INPUT_CNTL_1) & mask) |
sd               1330 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_09_LUMA_CNTL,
sd               1331 drivers/media/i2c/saa7115.c 			(saa711x_read(sd, R_09_LUMA_CNTL) & 0x7f) |
sd               1337 drivers/media/i2c/saa7115.c 		saa711x_write(sd, R_83_X_PORT_I_O_ENA_AND_OUT_CLK,
sd               1338 drivers/media/i2c/saa7115.c 				(saa711x_read(sd, R_83_X_PORT_I_O_ENA_AND_OUT_CLK) & 0xfe) |
sd               1343 drivers/media/i2c/saa7115.c 			saa711x_write(sd, R_85_I_PORT_SIGNAL_POLAR, 0x20);
sd               1345 drivers/media/i2c/saa7115.c 			saa711x_write(sd, R_85_I_PORT_SIGNAL_POLAR, 0x21);
sd               1350 drivers/media/i2c/saa7115.c static int saa711x_s_gpio(struct v4l2_subdev *sd, u32 val)
sd               1352 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd               1356 drivers/media/i2c/saa7115.c 	saa711x_write(sd, 0x11, (saa711x_read(sd, 0x11) & 0x7f) |
sd               1361 drivers/media/i2c/saa7115.c static int saa711x_s_stream(struct v4l2_subdev *sd, int enable)
sd               1363 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd               1365 drivers/media/i2c/saa7115.c 	v4l2_dbg(1, debug, sd, "%s output\n",
sd               1373 drivers/media/i2c/saa7115.c 	saa711x_write(sd, R_87_I_PORT_I_O_ENA_OUT_CLK_AND_GATED, state->enable);
sd               1377 drivers/media/i2c/saa7115.c static int saa711x_s_crystal_freq(struct v4l2_subdev *sd, u32 freq, u32 flags)
sd               1379 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd               1388 drivers/media/i2c/saa7115.c 	saa711x_s_clock_freq(sd, state->audclk_freq);
sd               1392 drivers/media/i2c/saa7115.c static int saa711x_reset(struct v4l2_subdev *sd, u32 val)
sd               1394 drivers/media/i2c/saa7115.c 	v4l2_dbg(1, debug, sd, "decoder RESET\n");
sd               1395 drivers/media/i2c/saa7115.c 	saa711x_writeregs(sd, saa7115_cfg_reset_scaler);
sd               1399 drivers/media/i2c/saa7115.c static int saa711x_g_vbi_data(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_data *data)
sd               1406 drivers/media/i2c/saa7115.c 		if (saa711x_read(sd, 0x6b) & 0xc0)
sd               1408 drivers/media/i2c/saa7115.c 		data->data[0] = saa711x_read(sd, 0x6c);
sd               1409 drivers/media/i2c/saa7115.c 		data->data[1] = saa711x_read(sd, 0x6d);
sd               1414 drivers/media/i2c/saa7115.c 			if (saa711x_read(sd, 0x66) & 0x30)
sd               1416 drivers/media/i2c/saa7115.c 			data->data[0] = saa711x_read(sd, 0x69);
sd               1417 drivers/media/i2c/saa7115.c 			data->data[1] = saa711x_read(sd, 0x6a);
sd               1421 drivers/media/i2c/saa7115.c 		if (saa711x_read(sd, 0x66) & 0xc0)
sd               1423 drivers/media/i2c/saa7115.c 		data->data[0] = saa711x_read(sd, 0x67);
sd               1424 drivers/media/i2c/saa7115.c 		data->data[1] = saa711x_read(sd, 0x68);
sd               1431 drivers/media/i2c/saa7115.c static int saa711x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
sd               1433 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd               1442 drivers/media/i2c/saa7115.c 	reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
sd               1445 drivers/media/i2c/saa7115.c 		reg1e = saa711x_read(sd, R_1E_STATUS_BYTE_1_VD_DEC);
sd               1447 drivers/media/i2c/saa7115.c 		v4l2_dbg(1, debug, sd, "Status byte 1 (0x1e)=0x%02x\n", reg1e);
sd               1472 drivers/media/i2c/saa7115.c 	v4l2_dbg(1, debug, sd, "Status byte 2 (0x1f)=0x%02x\n", reg1f);
sd               1486 drivers/media/i2c/saa7115.c 	v4l2_dbg(1, debug, sd, "detected std mask = %08Lx\n", *std);
sd               1491 drivers/media/i2c/saa7115.c static int saa711x_g_input_status(struct v4l2_subdev *sd, u32 *status)
sd               1493 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd               1499 drivers/media/i2c/saa7115.c 		reg1e = saa711x_read(sd, R_1E_STATUS_BYTE_1_VD_DEC);
sd               1500 drivers/media/i2c/saa7115.c 	reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
sd               1507 drivers/media/i2c/saa7115.c static int saa711x_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
sd               1509 drivers/media/i2c/saa7115.c 	reg->val = saa711x_read(sd, reg->reg & 0xff);
sd               1514 drivers/media/i2c/saa7115.c static int saa711x_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
sd               1516 drivers/media/i2c/saa7115.c 	saa711x_write(sd, reg->reg & 0xff, reg->val & 0xff);
sd               1521 drivers/media/i2c/saa7115.c static int saa711x_log_status(struct v4l2_subdev *sd)
sd               1523 drivers/media/i2c/saa7115.c 	struct saa711x_state *state = to_state(sd);
sd               1528 drivers/media/i2c/saa7115.c 	v4l2_info(sd, "Audio frequency: %d Hz\n", state->audclk_freq);
sd               1531 drivers/media/i2c/saa7115.c 		reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
sd               1533 drivers/media/i2c/saa7115.c 		v4l2_info(sd, "Video signal:    %s\n", signalOk ? "ok" : "bad");
sd               1534 drivers/media/i2c/saa7115.c 		v4l2_info(sd, "Frequency:       %s\n", (reg1f & 0x20) ? "60 Hz" : "50 Hz");
sd               1539 drivers/media/i2c/saa7115.c 	reg1e = saa711x_read(sd, R_1E_STATUS_BYTE_1_VD_DEC);
sd               1540 drivers/media/i2c/saa7115.c 	reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
sd               1546 drivers/media/i2c/saa7115.c 		v4l2_info(sd, "Input:           S-Video %d\n", state->input - 6);
sd               1548 drivers/media/i2c/saa7115.c 		v4l2_info(sd, "Input:           Composite %d\n", state->input);
sd               1549 drivers/media/i2c/saa7115.c 	v4l2_info(sd, "Video signal:    %s\n", signalOk ? (vcr ? "VCR" : "broadcast/DVD") : "bad");
sd               1550 drivers/media/i2c/saa7115.c 	v4l2_info(sd, "Frequency:       %s\n", (reg1f & 0x20) ? "60 Hz" : "50 Hz");
sd               1554 drivers/media/i2c/saa7115.c 		v4l2_info(sd, "Detected format: NTSC\n");
sd               1557 drivers/media/i2c/saa7115.c 		v4l2_info(sd, "Detected format: PAL\n");
sd               1560 drivers/media/i2c/saa7115.c 		v4l2_info(sd, "Detected format: SECAM\n");
sd               1563 drivers/media/i2c/saa7115.c 		v4l2_info(sd, "Detected format: BW/No color\n");
sd               1566 drivers/media/i2c/saa7115.c 	v4l2_info(sd, "Width, Height:   %d, %d\n", state->width, state->height);
sd               1567 drivers/media/i2c/saa7115.c 	v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
sd               1634 drivers/media/i2c/saa7115.c 	struct v4l2_subdev *sd = &state->sd;
sd               1642 drivers/media/i2c/saa7115.c 		work = saa711x_read(sd, R_08_SYNC_CNTL);
sd               1645 drivers/media/i2c/saa7115.c 		saa711x_write(sd, R_08_SYNC_CNTL, work);
sd               1649 drivers/media/i2c/saa7115.c 		work = saa711x_read(sd, R_10_CHROMA_CNTL_2);
sd               1653 drivers/media/i2c/saa7115.c 		saa711x_write(sd, R_10_CHROMA_CNTL_2, work);
sd               1657 drivers/media/i2c/saa7115.c 		work = saa711x_read(sd, R_10_CHROMA_CNTL_2);
sd               1660 drivers/media/i2c/saa7115.c 		saa711x_write(sd, R_10_CHROMA_CNTL_2, work);
sd               1664 drivers/media/i2c/saa7115.c 		work = saa711x_read(sd, R_12_RT_SIGNAL_CNTL);
sd               1671 drivers/media/i2c/saa7115.c 		saa711x_write(sd, R_12_RT_SIGNAL_CNTL, work);
sd               1675 drivers/media/i2c/saa7115.c 		work = saa711x_read(sd, R_12_RT_SIGNAL_CNTL);
sd               1678 drivers/media/i2c/saa7115.c 		saa711x_write(sd, R_12_RT_SIGNAL_CNTL, work);
sd               1682 drivers/media/i2c/saa7115.c 		work = saa711x_read(sd, R_13_RT_X_PORT_OUT_CNTL);
sd               1686 drivers/media/i2c/saa7115.c 		saa711x_write(sd, R_13_RT_X_PORT_OUT_CNTL, work);
sd               1811 drivers/media/i2c/saa7115.c 	struct v4l2_subdev *sd;
sd               1839 drivers/media/i2c/saa7115.c 	sd = &state->sd;
sd               1840 drivers/media/i2c/saa7115.c 	v4l2_i2c_subdev_init(sd, client, &saa711x_ops);
sd               1848 drivers/media/i2c/saa7115.c 	sd->entity.function = MEDIA_ENT_F_ATV_DECODER;
sd               1850 drivers/media/i2c/saa7115.c 	ret = media_entity_pads_init(&sd->entity, SAA711X_NUM_PADS,
sd               1873 drivers/media/i2c/saa7115.c 	sd->ctrl_handler = hdl;
sd               1890 drivers/media/i2c/saa7115.c 	v4l2_dbg(1, debug, sd, "writing init values\n");
sd               1898 drivers/media/i2c/saa7115.c 		saa711x_writeregs(sd, saa7111_init);
sd               1901 drivers/media/i2c/saa7115.c 		saa711x_writeregs(sd, gm7113c_init);
sd               1905 drivers/media/i2c/saa7115.c 			saa711x_writeregs(sd, gm7113c_init);
sd               1907 drivers/media/i2c/saa7115.c 			saa711x_writeregs(sd, saa7113_init);
sd               1911 drivers/media/i2c/saa7115.c 		saa711x_writeregs(sd, saa7115_init_auto_input);
sd               1914 drivers/media/i2c/saa7115.c 		saa711x_writeregs(sd, saa7115_init_misc);
sd               1919 drivers/media/i2c/saa7115.c 	saa711x_set_v4lstd(sd, V4L2_STD_NTSC);
sd               1922 drivers/media/i2c/saa7115.c 	v4l2_dbg(1, debug, sd, "status: (1E) 0x%02x, (1F) 0x%02x\n",
sd               1923 drivers/media/i2c/saa7115.c 		saa711x_read(sd, R_1E_STATUS_BYTE_1_VD_DEC),
sd               1924 drivers/media/i2c/saa7115.c 		saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC));
sd               1932 drivers/media/i2c/saa7115.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1934 drivers/media/i2c/saa7115.c 	v4l2_device_unregister_subdev(sd);
sd               1935 drivers/media/i2c/saa7115.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                246 drivers/media/i2c/saa7127.c 	struct v4l2_subdev sd;
sd                266 drivers/media/i2c/saa7127.c static inline struct saa7127_state *to_state(struct v4l2_subdev *sd)
sd                268 drivers/media/i2c/saa7127.c 	return container_of(sd, struct saa7127_state, sd);
sd                302 drivers/media/i2c/saa7127.c static int saa7127_read(struct v4l2_subdev *sd, u8 reg)
sd                304 drivers/media/i2c/saa7127.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                311 drivers/media/i2c/saa7127.c static int saa7127_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                313 drivers/media/i2c/saa7127.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                320 drivers/media/i2c/saa7127.c 	v4l2_err(sd, "I2C Write Problem\n");
sd                326 drivers/media/i2c/saa7127.c static int saa7127_write_inittab(struct v4l2_subdev *sd,
sd                330 drivers/media/i2c/saa7127.c 		saa7127_write(sd, regs->reg, regs->value);
sd                338 drivers/media/i2c/saa7127.c static int saa7127_set_vps(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data)
sd                340 drivers/media/i2c/saa7127.c 	struct saa7127_state *state = to_state(sd);
sd                346 drivers/media/i2c/saa7127.c 		v4l2_dbg(1, debug, sd, "Turn VPS Signal %s\n", enable ? "on" : "off");
sd                347 drivers/media/i2c/saa7127.c 		saa7127_write(sd, 0x54, enable << 7);
sd                358 drivers/media/i2c/saa7127.c 	v4l2_dbg(1, debug, sd, "Set VPS data %*ph\n", 5, state->vps_data);
sd                359 drivers/media/i2c/saa7127.c 	saa7127_write(sd, 0x55, state->vps_data[0]);
sd                360 drivers/media/i2c/saa7127.c 	saa7127_write(sd, 0x56, state->vps_data[1]);
sd                361 drivers/media/i2c/saa7127.c 	saa7127_write(sd, 0x57, state->vps_data[2]);
sd                362 drivers/media/i2c/saa7127.c 	saa7127_write(sd, 0x58, state->vps_data[3]);
sd                363 drivers/media/i2c/saa7127.c 	saa7127_write(sd, 0x59, state->vps_data[4]);
sd                369 drivers/media/i2c/saa7127.c static int saa7127_set_cc(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data)
sd                371 drivers/media/i2c/saa7127.c 	struct saa7127_state *state = to_state(sd);
sd                378 drivers/media/i2c/saa7127.c 		v4l2_dbg(1, debug, sd,
sd                380 drivers/media/i2c/saa7127.c 		saa7127_write(sd, SAA7127_REG_CLOSED_CAPTION,
sd                387 drivers/media/i2c/saa7127.c 	v4l2_dbg(2, debug, sd, "CC data: %04x\n", cc);
sd                388 drivers/media/i2c/saa7127.c 	saa7127_write(sd, SAA7127_REG_LINE_21_ODD_0, cc & 0xff);
sd                389 drivers/media/i2c/saa7127.c 	saa7127_write(sd, SAA7127_REG_LINE_21_ODD_1, cc >> 8);
sd                396 drivers/media/i2c/saa7127.c static int saa7127_set_xds(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data)
sd                398 drivers/media/i2c/saa7127.c 	struct saa7127_state *state = to_state(sd);
sd                405 drivers/media/i2c/saa7127.c 		v4l2_dbg(1, debug, sd, "Turn XDS %s\n", enable ? "on" : "off");
sd                406 drivers/media/i2c/saa7127.c 		saa7127_write(sd, SAA7127_REG_CLOSED_CAPTION,
sd                413 drivers/media/i2c/saa7127.c 	v4l2_dbg(2, debug, sd, "XDS data: %04x\n", xds);
sd                414 drivers/media/i2c/saa7127.c 	saa7127_write(sd, SAA7127_REG_LINE_21_EVEN_0, xds & 0xff);
sd                415 drivers/media/i2c/saa7127.c 	saa7127_write(sd, SAA7127_REG_LINE_21_EVEN_1, xds >> 8);
sd                422 drivers/media/i2c/saa7127.c static int saa7127_set_wss(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data)
sd                424 drivers/media/i2c/saa7127.c 	struct saa7127_state *state = to_state(sd);
sd                430 drivers/media/i2c/saa7127.c 		v4l2_dbg(1, debug, sd, "Turn WSS %s\n", enable ? "on" : "off");
sd                431 drivers/media/i2c/saa7127.c 		saa7127_write(sd, 0x27, enable << 7);
sd                437 drivers/media/i2c/saa7127.c 	saa7127_write(sd, 0x26, data->data[0]);
sd                438 drivers/media/i2c/saa7127.c 	saa7127_write(sd, 0x27, 0x80 | (data->data[1] & 0x3f));
sd                439 drivers/media/i2c/saa7127.c 	v4l2_dbg(1, debug, sd,
sd                447 drivers/media/i2c/saa7127.c static int saa7127_set_video_enable(struct v4l2_subdev *sd, int enable)
sd                449 drivers/media/i2c/saa7127.c 	struct saa7127_state *state = to_state(sd);
sd                452 drivers/media/i2c/saa7127.c 		v4l2_dbg(1, debug, sd, "Enable Video Output\n");
sd                453 drivers/media/i2c/saa7127.c 		saa7127_write(sd, 0x2d, state->reg_2d);
sd                454 drivers/media/i2c/saa7127.c 		saa7127_write(sd, 0x61, state->reg_61);
sd                456 drivers/media/i2c/saa7127.c 		v4l2_dbg(1, debug, sd, "Disable Video Output\n");
sd                457 drivers/media/i2c/saa7127.c 		saa7127_write(sd, 0x2d, (state->reg_2d & 0xf0));
sd                458 drivers/media/i2c/saa7127.c 		saa7127_write(sd, 0x61, (state->reg_61 | 0xc0));
sd                466 drivers/media/i2c/saa7127.c static int saa7127_set_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd                468 drivers/media/i2c/saa7127.c 	struct saa7127_state *state = to_state(sd);
sd                472 drivers/media/i2c/saa7127.c 		v4l2_dbg(1, debug, sd, "Selecting 60 Hz video Standard\n");
sd                481 drivers/media/i2c/saa7127.c 		v4l2_dbg(1, debug, sd,
sd                487 drivers/media/i2c/saa7127.c 		v4l2_dbg(1, debug, sd, "Selecting 50 Hz PAL video Standard\n");
sd                493 drivers/media/i2c/saa7127.c 	saa7127_write_inittab(sd, inittab);
sd                500 drivers/media/i2c/saa7127.c static int saa7127_set_output_type(struct v4l2_subdev *sd, int output)
sd                502 drivers/media/i2c/saa7127.c 	struct saa7127_state *state = to_state(sd);
sd                547 drivers/media/i2c/saa7127.c 	v4l2_dbg(1, debug, sd,
sd                551 drivers/media/i2c/saa7127.c 	saa7127_write(sd, 0x2d, state->reg_2d);
sd                552 drivers/media/i2c/saa7127.c 	saa7127_write(sd, 0x3a, state->reg_3a | state->reg_3a_cb);
sd                559 drivers/media/i2c/saa7127.c static int saa7127_set_input_type(struct v4l2_subdev *sd, int input)
sd                561 drivers/media/i2c/saa7127.c 	struct saa7127_state *state = to_state(sd);
sd                565 drivers/media/i2c/saa7127.c 		v4l2_dbg(1, debug, sd, "Selecting Normal Encoder Input\n");
sd                570 drivers/media/i2c/saa7127.c 		v4l2_dbg(1, debug, sd, "Selecting Color Bar generator\n");
sd                577 drivers/media/i2c/saa7127.c 	saa7127_write(sd, 0x3a, state->reg_3a | state->reg_3a_cb);
sd                584 drivers/media/i2c/saa7127.c static int saa7127_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
sd                586 drivers/media/i2c/saa7127.c 	struct saa7127_state *state = to_state(sd);
sd                590 drivers/media/i2c/saa7127.c 	return saa7127_set_std(sd, std);
sd                593 drivers/media/i2c/saa7127.c static int saa7127_s_routing(struct v4l2_subdev *sd,
sd                596 drivers/media/i2c/saa7127.c 	struct saa7127_state *state = to_state(sd);
sd                600 drivers/media/i2c/saa7127.c 		rc = saa7127_set_input_type(sd, input);
sd                602 drivers/media/i2c/saa7127.c 		rc = saa7127_set_output_type(sd, output);
sd                606 drivers/media/i2c/saa7127.c static int saa7127_s_stream(struct v4l2_subdev *sd, int enable)
sd                608 drivers/media/i2c/saa7127.c 	struct saa7127_state *state = to_state(sd);
sd                612 drivers/media/i2c/saa7127.c 	return saa7127_set_video_enable(sd, enable);
sd                615 drivers/media/i2c/saa7127.c static int saa7127_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt)
sd                617 drivers/media/i2c/saa7127.c 	struct saa7127_state *state = to_state(sd);
sd                635 drivers/media/i2c/saa7127.c static int saa7127_s_vbi_data(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data)
sd                639 drivers/media/i2c/saa7127.c 		return saa7127_set_wss(sd, data);
sd                641 drivers/media/i2c/saa7127.c 		return saa7127_set_vps(sd, data);
sd                644 drivers/media/i2c/saa7127.c 			return saa7127_set_cc(sd, data);
sd                645 drivers/media/i2c/saa7127.c 		return saa7127_set_xds(sd, data);
sd                653 drivers/media/i2c/saa7127.c static int saa7127_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
sd                655 drivers/media/i2c/saa7127.c 	reg->val = saa7127_read(sd, reg->reg & 0xff);
sd                660 drivers/media/i2c/saa7127.c static int saa7127_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
sd                662 drivers/media/i2c/saa7127.c 	saa7127_write(sd, reg->reg & 0xff, reg->val & 0xff);
sd                667 drivers/media/i2c/saa7127.c static int saa7127_log_status(struct v4l2_subdev *sd)
sd                669 drivers/media/i2c/saa7127.c 	struct saa7127_state *state = to_state(sd);
sd                671 drivers/media/i2c/saa7127.c 	v4l2_info(sd, "Standard: %s\n", (state->std & V4L2_STD_525_60) ? "60 Hz" : "50 Hz");
sd                672 drivers/media/i2c/saa7127.c 	v4l2_info(sd, "Input:    %s\n", state->input_type ?  "color bars" : "normal");
sd                673 drivers/media/i2c/saa7127.c 	v4l2_info(sd, "Output:   %s\n", state->video_enable ?
sd                675 drivers/media/i2c/saa7127.c 	v4l2_info(sd, "WSS:      %s\n", state->wss_enable ?
sd                677 drivers/media/i2c/saa7127.c 	v4l2_info(sd, "VPS:      %s\n", state->vps_enable ? "enabled" : "disabled");
sd                678 drivers/media/i2c/saa7127.c 	v4l2_info(sd, "CC:       %s\n", state->cc_enable ? "enabled" : "disabled");
sd                715 drivers/media/i2c/saa7127.c 	struct v4l2_subdev *sd;
sd                729 drivers/media/i2c/saa7127.c 	sd = &state->sd;
sd                730 drivers/media/i2c/saa7127.c 	v4l2_i2c_subdev_init(sd, client, &saa7127_ops);
sd                737 drivers/media/i2c/saa7127.c 	if ((saa7127_read(sd, 0) & 0xe4) != 0 ||
sd                738 drivers/media/i2c/saa7127.c 			(saa7127_read(sd, 0x29) & 0x3f) != 0x1d) {
sd                739 drivers/media/i2c/saa7127.c 		v4l2_dbg(1, debug, sd, "saa7127 not found\n");
sd                749 drivers/media/i2c/saa7127.c 		read_result = saa7127_read(sd, SAA7129_REG_FADE_KEY_COL2);
sd                750 drivers/media/i2c/saa7127.c 		saa7127_write(sd, SAA7129_REG_FADE_KEY_COL2, 0xaa);
sd                751 drivers/media/i2c/saa7127.c 		if (saa7127_read(sd, SAA7129_REG_FADE_KEY_COL2) == 0xaa) {
sd                752 drivers/media/i2c/saa7127.c 			saa7127_write(sd, SAA7129_REG_FADE_KEY_COL2,
sd                762 drivers/media/i2c/saa7127.c 	v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
sd                765 drivers/media/i2c/saa7127.c 	v4l2_dbg(1, debug, sd, "Configuring encoder\n");
sd                766 drivers/media/i2c/saa7127.c 	saa7127_write_inittab(sd, saa7127_init_config_common);
sd                767 drivers/media/i2c/saa7127.c 	saa7127_set_std(sd, V4L2_STD_NTSC);
sd                768 drivers/media/i2c/saa7127.c 	saa7127_set_output_type(sd, SAA7127_OUTPUT_TYPE_BOTH);
sd                769 drivers/media/i2c/saa7127.c 	saa7127_set_vps(sd, &vbi);
sd                770 drivers/media/i2c/saa7127.c 	saa7127_set_wss(sd, &vbi);
sd                771 drivers/media/i2c/saa7127.c 	saa7127_set_cc(sd, &vbi);
sd                772 drivers/media/i2c/saa7127.c 	saa7127_set_xds(sd, &vbi);
sd                776 drivers/media/i2c/saa7127.c 		saa7127_set_input_type(sd, SAA7127_INPUT_TYPE_TEST_IMAGE);
sd                778 drivers/media/i2c/saa7127.c 		saa7127_set_input_type(sd, SAA7127_INPUT_TYPE_NORMAL);
sd                779 drivers/media/i2c/saa7127.c 	saa7127_set_video_enable(sd, 1);
sd                782 drivers/media/i2c/saa7127.c 		saa7127_write_inittab(sd, saa7129_init_config_extra);
sd                790 drivers/media/i2c/saa7127.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                792 drivers/media/i2c/saa7127.c 	v4l2_device_unregister_subdev(sd);
sd                794 drivers/media/i2c/saa7127.c 	saa7127_set_video_enable(sd, 0);
sd                 44 drivers/media/i2c/saa717x.c 	struct v4l2_subdev sd;
sd                 63 drivers/media/i2c/saa717x.c static inline struct saa717x_state *to_state(struct v4l2_subdev *sd)
sd                 65 drivers/media/i2c/saa717x.c 	return container_of(sd, struct saa717x_state, sd);
sd                 70 drivers/media/i2c/saa717x.c 	return &container_of(ctrl->handler, struct saa717x_state, hdl)->sd;
sd                 86 drivers/media/i2c/saa717x.c static int saa717x_write(struct v4l2_subdev *sd, u32 reg, u32 value)
sd                 88 drivers/media/i2c/saa717x.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                108 drivers/media/i2c/saa717x.c 	v4l2_dbg(2, debug, sd, "wrote:  reg 0x%03x=%08x\n", reg, value);
sd                112 drivers/media/i2c/saa717x.c static void saa717x_write_regs(struct v4l2_subdev *sd, u32 *data)
sd                115 drivers/media/i2c/saa717x.c 		saa717x_write(sd, data[0], data[1]);
sd                120 drivers/media/i2c/saa717x.c static u32 saa717x_read(struct v4l2_subdev *sd, u32 reg)
sd                122 drivers/media/i2c/saa717x.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                146 drivers/media/i2c/saa717x.c 	v4l2_dbg(2, debug, sd, "read:  reg 0x%03x=0x%08x\n", reg, value);
sd                680 drivers/media/i2c/saa717x.c static void get_inf_dev_status(struct v4l2_subdev *sd,
sd                719 drivers/media/i2c/saa717x.c 	reg_data3 = saa717x_read(sd, 0x0528);
sd                721 drivers/media/i2c/saa717x.c 	v4l2_dbg(1, debug, sd, "tvaudio thread status: 0x%x [%s%s%s]\n",
sd                725 drivers/media/i2c/saa717x.c 	v4l2_dbg(1, debug, sd, "detailed status: "
sd                746 drivers/media/i2c/saa717x.c 		v4l2_dbg(1, debug, sd, "ST!!!\n");
sd                751 drivers/media/i2c/saa717x.c 		v4l2_dbg(1, debug, sd, "DUAL!!!\n");
sd                757 drivers/media/i2c/saa717x.c static void set_audio_mode(struct v4l2_subdev *sd, int audio_mode)
sd                759 drivers/media/i2c/saa717x.c 	v4l2_dbg(1, debug, sd, "writing registers to set audio mode by set %d\n",
sd                762 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x46c, reg_set_audio_template[audio_mode][0]);
sd                763 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x470, reg_set_audio_template[audio_mode][1]);
sd                767 drivers/media/i2c/saa717x.c static int set_audio_regs(struct v4l2_subdev *sd,
sd                775 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x0594, decoder->audio_input);
sd                776 drivers/media/i2c/saa717x.c 	v4l2_dbg(1, debug, sd, "set audio input %d\n",
sd                796 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x480, val);
sd                801 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x488, val);
sd                806 drivers/media/i2c/saa717x.c static void set_h_prescale(struct v4l2_subdev *sd,
sd                839 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x60 + task_shift, vals[i].xpsc);
sd                841 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x61 + task_shift, vals[i].xacl);
sd                843 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x62 + task_shift,
sd                846 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x63 + task_shift,
sd                851 drivers/media/i2c/saa717x.c static void set_v_scale(struct v4l2_subdev *sd, int task, int yscale)
sd                857 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x70 + task_shift, yscale & 0xff);
sd                859 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x71 + task_shift, yscale >> 8);
sd                864 drivers/media/i2c/saa717x.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                865 drivers/media/i2c/saa717x.c 	struct saa717x_state *state = to_state(sd);
sd                869 drivers/media/i2c/saa717x.c 		saa717x_write(sd, 0x10a, ctrl->val);
sd                873 drivers/media/i2c/saa717x.c 		saa717x_write(sd, 0x10b, ctrl->val);
sd                877 drivers/media/i2c/saa717x.c 		saa717x_write(sd, 0x10c, ctrl->val);
sd                881 drivers/media/i2c/saa717x.c 		saa717x_write(sd, 0x10d, ctrl->val);
sd                907 drivers/media/i2c/saa717x.c 	set_audio_regs(sd, state);
sd                911 drivers/media/i2c/saa717x.c static int saa717x_s_video_routing(struct v4l2_subdev *sd,
sd                914 drivers/media/i2c/saa717x.c 	struct saa717x_state *decoder = to_state(sd);
sd                919 drivers/media/i2c/saa717x.c 	v4l2_dbg(1, debug, sd, "decoder set input (%d)\n", input);
sd                929 drivers/media/i2c/saa717x.c 		v4l2_dbg(1, debug, sd,  "now setting %s input %d\n",
sd                934 drivers/media/i2c/saa717x.c 		saa717x_write(sd, 0x102,
sd                935 drivers/media/i2c/saa717x.c 				(saa717x_read(sd, 0x102) & 0xf0) |
sd                939 drivers/media/i2c/saa717x.c 		saa717x_write(sd, 0x109,
sd                940 drivers/media/i2c/saa717x.c 				(saa717x_read(sd, 0x109) & 0x7f) |
sd                946 drivers/media/i2c/saa717x.c 			set_audio_mode(sd, decoder->tuner_audio_mode);
sd                950 drivers/media/i2c/saa717x.c 			set_audio_mode(sd, TUNER_AUDIO_STEREO);
sd                954 drivers/media/i2c/saa717x.c 			saa717x_write_regs(sd, reg_init_tuner_input);
sd                956 drivers/media/i2c/saa717x.c 			saa717x_write_regs(sd, reg_init_svideo_input);
sd                958 drivers/media/i2c/saa717x.c 			saa717x_write_regs(sd, reg_init_composite_input);
sd                965 drivers/media/i2c/saa717x.c static int saa717x_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
sd                967 drivers/media/i2c/saa717x.c 	reg->val = saa717x_read(sd, reg->reg);
sd                972 drivers/media/i2c/saa717x.c static int saa717x_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
sd                977 drivers/media/i2c/saa717x.c 	saa717x_write(sd, addr, val);
sd                982 drivers/media/i2c/saa717x.c static int saa717x_set_fmt(struct v4l2_subdev *sd,
sd                989 drivers/media/i2c/saa717x.c 	v4l2_dbg(1, debug, sd, "decoder set size\n");
sd               1016 drivers/media/i2c/saa717x.c 	set_h_prescale(sd, 0, prescale);
sd               1017 drivers/media/i2c/saa717x.c 	set_h_prescale(sd, 1, prescale);
sd               1021 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x6C, (u8)(h_scale & 0xFF));
sd               1022 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x6D, (u8)((h_scale >> 8) & 0xFF));
sd               1024 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0xAC, (u8)(h_scale & 0xFF));
sd               1025 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0xAD, (u8)((h_scale >> 8) & 0xFF));
sd               1028 drivers/media/i2c/saa717x.c 	set_v_scale(sd, 0, v_scale);
sd               1029 drivers/media/i2c/saa717x.c 	set_v_scale(sd, 1, v_scale);
sd               1034 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x5C, (u8)(fmt->width & 0xFF));
sd               1035 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x5D, (u8)((fmt->width >> 8) & 0xFF));
sd               1037 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x9C, (u8)(fmt->width & 0xFF));
sd               1038 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x9D, (u8)((fmt->width >> 8) & 0xFF));
sd               1042 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x5E, (u8)(fmt->height & 0xFF));
sd               1043 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x5F, (u8)((fmt->height >> 8) & 0xFF));
sd               1045 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x9E, (u8)(fmt->height & 0xFF));
sd               1046 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x9F, (u8)((fmt->height >> 8) & 0xFF));
sd               1050 drivers/media/i2c/saa717x.c static int saa717x_s_radio(struct v4l2_subdev *sd)
sd               1052 drivers/media/i2c/saa717x.c 	struct saa717x_state *decoder = to_state(sd);
sd               1058 drivers/media/i2c/saa717x.c static int saa717x_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd               1060 drivers/media/i2c/saa717x.c 	struct saa717x_state *decoder = to_state(sd);
sd               1062 drivers/media/i2c/saa717x.c 	v4l2_dbg(1, debug, sd, "decoder set norm ");
sd               1063 drivers/media/i2c/saa717x.c 	v4l2_dbg(1, debug, sd, "(not yet implemented)\n");
sd               1070 drivers/media/i2c/saa717x.c static int saa717x_s_audio_routing(struct v4l2_subdev *sd,
sd               1073 drivers/media/i2c/saa717x.c 	struct saa717x_state *decoder = to_state(sd);
sd               1077 drivers/media/i2c/saa717x.c 		v4l2_dbg(1, debug, sd,
sd               1080 drivers/media/i2c/saa717x.c 		set_audio_regs(sd, decoder);
sd               1086 drivers/media/i2c/saa717x.c static int saa717x_s_stream(struct v4l2_subdev *sd, int enable)
sd               1088 drivers/media/i2c/saa717x.c 	struct saa717x_state *decoder = to_state(sd);
sd               1090 drivers/media/i2c/saa717x.c 	v4l2_dbg(1, debug, sd, "decoder %s output\n",
sd               1093 drivers/media/i2c/saa717x.c 	saa717x_write(sd, 0x193, enable ? 0xa6 : 0x26);
sd               1098 drivers/media/i2c/saa717x.c static int saa717x_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
sd               1100 drivers/media/i2c/saa717x.c 	struct saa717x_state *decoder = to_state(sd);
sd               1123 drivers/media/i2c/saa717x.c 	v4l2_dbg(1, debug, sd, "change audio mode to %s\n",
sd               1128 drivers/media/i2c/saa717x.c 	set_audio_mode(sd, decoder->tuner_audio_mode);
sd               1132 drivers/media/i2c/saa717x.c static int saa717x_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
sd               1134 drivers/media/i2c/saa717x.c 	struct saa717x_state *decoder = to_state(sd);
sd               1139 drivers/media/i2c/saa717x.c 	get_inf_dev_status(sd, &dual_f, &stereo_f);
sd               1141 drivers/media/i2c/saa717x.c 	v4l2_dbg(1, debug, sd, "DETECT==st:%d dual:%d\n",
sd               1147 drivers/media/i2c/saa717x.c 		v4l2_dbg(1, debug, sd, "DETECT==MONO\n");
sd               1155 drivers/media/i2c/saa717x.c 			v4l2_dbg(1, debug, sd, "DETECT==ST(ST)\n");
sd               1158 drivers/media/i2c/saa717x.c 			v4l2_dbg(1, debug, sd, "DETECT==ST(MONO)\n");
sd               1166 drivers/media/i2c/saa717x.c 			v4l2_dbg(1, debug, sd, "DETECT==DUAL1\n");
sd               1169 drivers/media/i2c/saa717x.c 			v4l2_dbg(1, debug, sd, "DETECT==DUAL2\n");
sd               1175 drivers/media/i2c/saa717x.c static int saa717x_log_status(struct v4l2_subdev *sd)
sd               1177 drivers/media/i2c/saa717x.c 	struct saa717x_state *state = to_state(sd);
sd               1179 drivers/media/i2c/saa717x.c 	v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
sd               1236 drivers/media/i2c/saa717x.c 	struct v4l2_subdev *sd;
sd               1248 drivers/media/i2c/saa717x.c 	sd = &decoder->sd;
sd               1249 drivers/media/i2c/saa717x.c 	v4l2_i2c_subdev_init(sd, client, &saa717x_ops);
sd               1251 drivers/media/i2c/saa717x.c 	if (saa717x_write(sd, 0x5a4, 0xfe) &&
sd               1252 drivers/media/i2c/saa717x.c 			saa717x_write(sd, 0x5a5, 0x0f) &&
sd               1253 drivers/media/i2c/saa717x.c 			saa717x_write(sd, 0x5a6, 0x00) &&
sd               1254 drivers/media/i2c/saa717x.c 			saa717x_write(sd, 0x5a7, 0x01))
sd               1255 drivers/media/i2c/saa717x.c 		id = saa717x_read(sd, 0x5a0);
sd               1257 drivers/media/i2c/saa717x.c 		v4l2_dbg(1, debug, sd, "saa717x not found (id=%02x)\n", id);
sd               1268 drivers/media/i2c/saa717x.c 	v4l2_info(sd, "%s found @ 0x%x (%s)\n", p,
sd               1292 drivers/media/i2c/saa717x.c 	sd->ctrl_handler = hdl;
sd               1315 drivers/media/i2c/saa717x.c 	v4l2_dbg(1, debug, sd, "writing init values\n");
sd               1318 drivers/media/i2c/saa717x.c 	saa717x_write_regs(sd, reg_init_initialize);
sd               1329 drivers/media/i2c/saa717x.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1331 drivers/media/i2c/saa717x.c 	v4l2_device_unregister_subdev(sd);
sd               1332 drivers/media/i2c/saa717x.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                 35 drivers/media/i2c/saa7185.c 	struct v4l2_subdev sd;
sd                 41 drivers/media/i2c/saa7185.c static inline struct saa7185 *to_saa7185(struct v4l2_subdev *sd)
sd                 43 drivers/media/i2c/saa7185.c 	return container_of(sd, struct saa7185, sd);
sd                 48 drivers/media/i2c/saa7185.c static inline int saa7185_read(struct v4l2_subdev *sd)
sd                 50 drivers/media/i2c/saa7185.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 55 drivers/media/i2c/saa7185.c static int saa7185_write(struct v4l2_subdev *sd, u8 reg, u8 value)
sd                 57 drivers/media/i2c/saa7185.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 58 drivers/media/i2c/saa7185.c 	struct saa7185 *encoder = to_saa7185(sd);
sd                 60 drivers/media/i2c/saa7185.c 	v4l2_dbg(1, debug, sd, "%02x set to %02x\n", reg, value);
sd                 65 drivers/media/i2c/saa7185.c static int saa7185_write_block(struct v4l2_subdev *sd,
sd                 68 drivers/media/i2c/saa7185.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 69 drivers/media/i2c/saa7185.c 	struct saa7185 *encoder = to_saa7185(sd);
sd                 97 drivers/media/i2c/saa7185.c 			ret = saa7185_write(sd, reg, *data++);
sd                207 drivers/media/i2c/saa7185.c static int saa7185_init(struct v4l2_subdev *sd, u32 val)
sd                209 drivers/media/i2c/saa7185.c 	struct saa7185 *encoder = to_saa7185(sd);
sd                211 drivers/media/i2c/saa7185.c 	saa7185_write_block(sd, init_common, sizeof(init_common));
sd                213 drivers/media/i2c/saa7185.c 		saa7185_write_block(sd, init_ntsc, sizeof(init_ntsc));
sd                215 drivers/media/i2c/saa7185.c 		saa7185_write_block(sd, init_pal, sizeof(init_pal));
sd                219 drivers/media/i2c/saa7185.c static int saa7185_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
sd                221 drivers/media/i2c/saa7185.c 	struct saa7185 *encoder = to_saa7185(sd);
sd                224 drivers/media/i2c/saa7185.c 		saa7185_write_block(sd, init_ntsc, sizeof(init_ntsc));
sd                226 drivers/media/i2c/saa7185.c 		saa7185_write_block(sd, init_pal, sizeof(init_pal));
sd                233 drivers/media/i2c/saa7185.c static int saa7185_s_routing(struct v4l2_subdev *sd,
sd                236 drivers/media/i2c/saa7185.c 	struct saa7185 *encoder = to_saa7185(sd);
sd                244 drivers/media/i2c/saa7185.c 		saa7185_write(sd, 0x3a, 0x0f);
sd                246 drivers/media/i2c/saa7185.c 		saa7185_write(sd, 0x61, (encoder->reg[0x61] & 0xf7) | 0x08);
sd                247 drivers/media/i2c/saa7185.c 		saa7185_write(sd, 0x6e, 0x01);
sd                252 drivers/media/i2c/saa7185.c 		saa7185_write(sd, 0x3a, 0x0f);
sd                254 drivers/media/i2c/saa7185.c 		saa7185_write(sd, 0x61, (encoder->reg[0x61] & 0xf7) | 0x00);
sd                256 drivers/media/i2c/saa7185.c 		saa7185_write(sd, 0x6e, 0x00);
sd                261 drivers/media/i2c/saa7185.c 		saa7185_write(sd, 0x3a, 0x8f);
sd                263 drivers/media/i2c/saa7185.c 		saa7185_write(sd, 0x61, (encoder->reg[0x61] & 0xf7) | 0x08);
sd                265 drivers/media/i2c/saa7185.c 		saa7185_write(sd, 0x6e, 0x01);
sd                298 drivers/media/i2c/saa7185.c 	struct v4l2_subdev *sd;
sd                311 drivers/media/i2c/saa7185.c 	sd = &encoder->sd;
sd                312 drivers/media/i2c/saa7185.c 	v4l2_i2c_subdev_init(sd, client, &saa7185_ops);
sd                314 drivers/media/i2c/saa7185.c 	i = saa7185_write_block(sd, init_common, sizeof(init_common));
sd                316 drivers/media/i2c/saa7185.c 		i = saa7185_write_block(sd, init_ntsc, sizeof(init_ntsc));
sd                318 drivers/media/i2c/saa7185.c 		v4l2_dbg(1, debug, sd, "init error %d\n", i);
sd                320 drivers/media/i2c/saa7185.c 		v4l2_dbg(1, debug, sd, "revision 0x%x\n",
sd                321 drivers/media/i2c/saa7185.c 				saa7185_read(sd) >> 5);
sd                327 drivers/media/i2c/saa7185.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                328 drivers/media/i2c/saa7185.c 	struct saa7185 *encoder = to_saa7185(sd);
sd                330 drivers/media/i2c/saa7185.c 	v4l2_device_unregister_subdev(sd);
sd                332 drivers/media/i2c/saa7185.c 	saa7185_write(sd, 0x61, (encoder->reg[0x61]) | 0x40);
sd                 62 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd                241 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd                362 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd                381 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd                525 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd                584 drivers/media/i2c/smiapp/smiapp-core.c 	sensor->pixel_array->sd.ctrl_handler =
sd                606 drivers/media/i2c/smiapp/smiapp-core.c 	sensor->src->sd.ctrl_handler = &sensor->src->ctrl_handler;
sd                649 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd                687 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd                747 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd                919 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd               1038 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd               1389 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd               1514 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd               1539 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd               1584 drivers/media/i2c/smiapp/smiapp-core.c 	if (subdev != &sensor->src->sd || code->pad != SMIAPP_PAD_SRC) {
sd               1617 drivers/media/i2c/smiapp/smiapp-core.c 	if (subdev == &sensor->src->sd && pad == SMIAPP_PAD_SRC)
sd               1762 drivers/media/i2c/smiapp/smiapp-core.c 	if (subdev != &sensor->src->sd)
sd               2374 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd               2509 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd               2515 drivers/media/i2c/smiapp/smiapp-core.c 	rval = media_entity_pads_init(&ssd->sd.entity,
sd               2523 drivers/media/i2c/smiapp/smiapp-core.c 	rval = v4l2_device_register_subdev(sensor->src->sd.v4l2_dev,
sd               2524 drivers/media/i2c/smiapp/smiapp-core.c 					   &ssd->sd);
sd               2531 drivers/media/i2c/smiapp/smiapp-core.c 	rval = media_create_pad_link(&ssd->sd.entity, source_pad,
sd               2532 drivers/media/i2c/smiapp/smiapp-core.c 				     &sink_ssd->sd.entity, sink_pad,
sd               2537 drivers/media/i2c/smiapp/smiapp-core.c 		v4l2_device_unregister_subdev(&ssd->sd);
sd               2550 drivers/media/i2c/smiapp/smiapp-core.c 		v4l2_device_unregister_subdev(&sensor->ssds[i].sd);
sd               2584 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd               2596 drivers/media/i2c/smiapp/smiapp-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd               2602 drivers/media/i2c/smiapp/smiapp-core.c 		v4l2_subdev_init(&ssd->sd, &smiapp_ops);
sd               2604 drivers/media/i2c/smiapp/smiapp-core.c 	ssd->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               2610 drivers/media/i2c/smiapp/smiapp-core.c 	v4l2_i2c_subdev_set_name(&ssd->sd, client, sensor->minfo.name, name);
sd               2623 drivers/media/i2c/smiapp/smiapp-core.c 	ssd->sd.entity.ops = &smiapp_entity_ops;
sd               2628 drivers/media/i2c/smiapp/smiapp-core.c 	ssd->sd.internal_ops = &smiapp_internal_ops;
sd               2629 drivers/media/i2c/smiapp/smiapp-core.c 	ssd->sd.owner = THIS_MODULE;
sd               2630 drivers/media/i2c/smiapp/smiapp-core.c 	ssd->sd.dev = &client->dev;
sd               2631 drivers/media/i2c/smiapp/smiapp-core.c 	v4l2_set_subdevdata(&ssd->sd, client);
sd               2634 drivers/media/i2c/smiapp/smiapp-core.c static int smiapp_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               2636 drivers/media/i2c/smiapp/smiapp-core.c 	struct smiapp_subdev *ssd = to_smiapp_subdev(sd);
sd               2644 drivers/media/i2c/smiapp/smiapp-core.c 			v4l2_subdev_get_try_format(sd, fh->pad, i);
sd               2646 drivers/media/i2c/smiapp/smiapp-core.c 			v4l2_subdev_get_try_crop(sd, fh->pad, i);
sd               2659 drivers/media/i2c/smiapp/smiapp-core.c 		try_comp = v4l2_subdev_get_try_compose(sd, fh->pad, i);
sd               2868 drivers/media/i2c/smiapp/smiapp-core.c 	v4l2_i2c_subdev_init(&sensor->src->sd, client, &smiapp_ops);
sd               2869 drivers/media/i2c/smiapp/smiapp-core.c 	sensor->src->sd.internal_ops = &smiapp_internal_src_ops;
sd               3066 drivers/media/i2c/smiapp/smiapp-core.c 	sensor->pixel_array->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
sd               3099 drivers/media/i2c/smiapp/smiapp-core.c 	rval = media_entity_pads_init(&sensor->src->sd.entity, 2,
sd               3108 drivers/media/i2c/smiapp/smiapp-core.c 	rval = v4l2_async_register_subdev_sensor_common(&sensor->src->sd);
sd               3122 drivers/media/i2c/smiapp/smiapp-core.c 	media_entity_cleanup(&sensor->src->sd.entity);
sd               3147 drivers/media/i2c/smiapp/smiapp-core.c 		v4l2_device_unregister_subdev(&sensor->ssds[i].sd);
sd               3148 drivers/media/i2c/smiapp/smiapp-core.c 		media_entity_cleanup(&sensor->ssds[i].sd.entity);
sd                 23 drivers/media/i2c/smiapp/smiapp-quirk.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd                 42 drivers/media/i2c/smiapp/smiapp-quirk.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd                138 drivers/media/i2c/smiapp/smiapp-quirk.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd                 70 drivers/media/i2c/smiapp/smiapp-regs.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd                153 drivers/media/i2c/smiapp/smiapp-regs.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd                213 drivers/media/i2c/smiapp/smiapp-regs.c 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
sd                151 drivers/media/i2c/smiapp/smiapp.h 	struct v4l2_subdev sd;
sd                237 drivers/media/i2c/smiapp/smiapp.h 	container_of(_sd, struct smiapp_subdev, sd)
sd                 37 drivers/media/i2c/sony-btf-mpx.c 	struct v4l2_subdev sd;
sd                 42 drivers/media/i2c/sony-btf-mpx.c static inline struct sony_btf_mpx *to_state(struct v4l2_subdev *sd)
sd                 44 drivers/media/i2c/sony-btf-mpx.c 	return container_of(sd, struct sony_btf_mpx, sd);
sd                159 drivers/media/i2c/sony-btf-mpx.c 	struct i2c_client *client = v4l2_get_subdevdata(&t->sd);
sd                267 drivers/media/i2c/sony-btf-mpx.c static int sony_btf_mpx_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd                269 drivers/media/i2c/sony-btf-mpx.c 	struct sony_btf_mpx *t = to_state(sd);
sd                288 drivers/media/i2c/sony-btf-mpx.c static int sony_btf_mpx_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
sd                290 drivers/media/i2c/sony-btf-mpx.c 	struct sony_btf_mpx *t = to_state(sd);
sd                302 drivers/media/i2c/sony-btf-mpx.c static int sony_btf_mpx_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
sd                304 drivers/media/i2c/sony-btf-mpx.c 	struct sony_btf_mpx *t = to_state(sd);
sd                338 drivers/media/i2c/sony-btf-mpx.c 	struct v4l2_subdev *sd;
sd                350 drivers/media/i2c/sony-btf-mpx.c 	sd = &t->sd;
sd                351 drivers/media/i2c/sony-btf-mpx.c 	v4l2_i2c_subdev_init(sd, client, &sony_btf_mpx_ops);
sd                362 drivers/media/i2c/sony-btf-mpx.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                364 drivers/media/i2c/sony-btf-mpx.c 	v4l2_device_unregister_subdev(sd);
sd                141 drivers/media/i2c/sr030pc30.c 	struct v4l2_subdev sd;
sd                280 drivers/media/i2c/sr030pc30.c static inline struct sr030pc30_info *to_sr030pc30(struct v4l2_subdev *sd)
sd                282 drivers/media/i2c/sr030pc30.c 	return container_of(sd, struct sr030pc30_info, sd);
sd                299 drivers/media/i2c/sr030pc30.c static int cam_i2c_read(struct v4l2_subdev *sd, u32 reg_addr)
sd                301 drivers/media/i2c/sr030pc30.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                302 drivers/media/i2c/sr030pc30.c 	struct sr030pc30_info *info = to_sr030pc30(sd);
sd                310 drivers/media/i2c/sr030pc30.c static int cam_i2c_write(struct v4l2_subdev *sd, u32 reg_addr, u32 val)
sd                312 drivers/media/i2c/sr030pc30.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                313 drivers/media/i2c/sr030pc30.c 	struct sr030pc30_info *info = to_sr030pc30(sd);
sd                322 drivers/media/i2c/sr030pc30.c static inline int sr030pc30_bulk_write_reg(struct v4l2_subdev *sd,
sd                326 drivers/media/i2c/sr030pc30.c 		int ret = cam_i2c_write(sd, msg->addr, msg->val);
sd                335 drivers/media/i2c/sr030pc30.c static int sr030pc30_pwr_ctrl(struct v4l2_subdev *sd,
sd                338 drivers/media/i2c/sr030pc30.c 	struct sr030pc30_info *info = to_sr030pc30(sd);
sd                343 drivers/media/i2c/sr030pc30.c 		ret = cam_i2c_write(sd, POWER_CTRL_REG, reg | 0x02);
sd                345 drivers/media/i2c/sr030pc30.c 		ret = cam_i2c_write(sd, POWER_CTRL_REG, reg);
sd                355 drivers/media/i2c/sr030pc30.c static int sr030pc30_set_flip(struct v4l2_subdev *sd)
sd                357 drivers/media/i2c/sr030pc30.c 	struct sr030pc30_info *info = to_sr030pc30(sd);
sd                359 drivers/media/i2c/sr030pc30.c 	s32 reg = cam_i2c_read(sd, VDO_CTL2_REG);
sd                368 drivers/media/i2c/sr030pc30.c 	return cam_i2c_write(sd, VDO_CTL2_REG, reg | 0x80);
sd                372 drivers/media/i2c/sr030pc30.c static int sr030pc30_set_params(struct v4l2_subdev *sd)
sd                374 drivers/media/i2c/sr030pc30.c 	struct sr030pc30_info *info = to_sr030pc30(sd);
sd                381 drivers/media/i2c/sr030pc30.c 	ret = cam_i2c_write(sd, VDO_CTL1_REG,
sd                385 drivers/media/i2c/sr030pc30.c 		ret = cam_i2c_write(sd, ISP_CTL_REG(0),
sd                388 drivers/media/i2c/sr030pc30.c 		ret = sr030pc30_set_flip(sd);
sd                421 drivers/media/i2c/sr030pc30.c 	struct v4l2_subdev *sd = &info->sd;
sd                424 drivers/media/i2c/sr030pc30.c 	v4l2_dbg(1, debug, sd, "%s: ctrl_id: %d, value: %d\n",
sd                430 drivers/media/i2c/sr030pc30.c 			ret = cam_i2c_write(sd, AWB_CTL2_REG,
sd                433 drivers/media/i2c/sr030pc30.c 				ret = cam_i2c_write(sd, AWB_CTL1_REG,
sd                437 drivers/media/i2c/sr030pc30.c 			ret = cam_i2c_write(sd, MWB_BGAIN_REG, info->blue->val);
sd                439 drivers/media/i2c/sr030pc30.c 			ret = cam_i2c_write(sd, MWB_RGAIN_REG, info->red->val);
sd                445 drivers/media/i2c/sr030pc30.c 			ret = cam_i2c_write(sd, AE_CTL1_REG,
sd                453 drivers/media/i2c/sr030pc30.c 				ret = cam_i2c_write(sd, EXP_TIMEH_REG,
sd                456 drivers/media/i2c/sr030pc30.c 				ret = cam_i2c_write(sd, EXP_TIMEM_REG,
sd                459 drivers/media/i2c/sr030pc30.c 				ret = cam_i2c_write(sd, EXP_TIMEL_REG,
sd                470 drivers/media/i2c/sr030pc30.c static int sr030pc30_enum_mbus_code(struct v4l2_subdev *sd,
sd                482 drivers/media/i2c/sr030pc30.c static int sr030pc30_get_fmt(struct v4l2_subdev *sd,
sd                487 drivers/media/i2c/sr030pc30.c 	struct sr030pc30_info *info = to_sr030pc30(sd);
sd                507 drivers/media/i2c/sr030pc30.c static const struct sr030pc30_format *try_fmt(struct v4l2_subdev *sd,
sd                527 drivers/media/i2c/sr030pc30.c static int sr030pc30_set_fmt(struct v4l2_subdev *sd,
sd                531 drivers/media/i2c/sr030pc30.c 	struct sr030pc30_info *info = sd ? to_sr030pc30(sd) : NULL;
sd                535 drivers/media/i2c/sr030pc30.c 	if (!sd || !format)
sd                542 drivers/media/i2c/sr030pc30.c 	fmt = try_fmt(sd, mf);
sd                550 drivers/media/i2c/sr030pc30.c 	return sr030pc30_set_params(sd);
sd                553 drivers/media/i2c/sr030pc30.c static int sr030pc30_base_config(struct v4l2_subdev *sd)
sd                555 drivers/media/i2c/sr030pc30.c 	struct sr030pc30_info *info = to_sr030pc30(sd);
sd                559 drivers/media/i2c/sr030pc30.c 	ret = sr030pc30_bulk_write_reg(sd, sr030pc30_base_regs);
sd                563 drivers/media/i2c/sr030pc30.c 		ret = sr030pc30_set_params(sd);
sd                566 drivers/media/i2c/sr030pc30.c 		ret = sr030pc30_pwr_ctrl(sd, false, false);
sd                574 drivers/media/i2c/sr030pc30.c 	v4l2_dbg(1, debug, sd, "%s: expmin= %lx, expmax= %lx", __func__,
sd                578 drivers/media/i2c/sr030pc30.c 	ret = cam_i2c_write(sd, EXP_MMINH_REG, expmin >> 8 & 0xFF);
sd                580 drivers/media/i2c/sr030pc30.c 		ret = cam_i2c_write(sd, EXP_MMINL_REG, expmin & 0xFF);
sd                582 drivers/media/i2c/sr030pc30.c 		ret = cam_i2c_write(sd, EXP_MMAXH_REG, expmax >> 16 & 0xFF);
sd                584 drivers/media/i2c/sr030pc30.c 		ret = cam_i2c_write(sd, EXP_MMAXM_REG, expmax >> 8 & 0xFF);
sd                586 drivers/media/i2c/sr030pc30.c 		ret = cam_i2c_write(sd, EXP_MMAXL_REG, expmax & 0xFF);
sd                591 drivers/media/i2c/sr030pc30.c static int sr030pc30_s_power(struct v4l2_subdev *sd, int on)
sd                593 drivers/media/i2c/sr030pc30.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                594 drivers/media/i2c/sr030pc30.c 	struct sr030pc30_info *info = to_sr030pc30(sd);
sd                608 drivers/media/i2c/sr030pc30.c 		sr030pc30_pwr_ctrl(sd, false, true);
sd                618 drivers/media/i2c/sr030pc30.c 		ret = sr030pc30_base_config(sd);
sd                682 drivers/media/i2c/sr030pc30.c 	struct v4l2_subdev *sd;
sd                701 drivers/media/i2c/sr030pc30.c 	sd = &info->sd;
sd                704 drivers/media/i2c/sr030pc30.c 	v4l2_i2c_subdev_init(sd, client, &sr030pc30_ops);
sd                718 drivers/media/i2c/sr030pc30.c 	sd->ctrl_handler = hdl;
sd                737 drivers/media/i2c/sr030pc30.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                739 drivers/media/i2c/sr030pc30.c 	v4l2_device_unregister_subdev(sd);
sd                740 drivers/media/i2c/sr030pc30.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                 86 drivers/media/i2c/st-mipid02.c 	struct v4l2_subdev sd;
sd                213 drivers/media/i2c/st-mipid02.c static inline struct mipid02_dev *to_mipid02_dev(struct v4l2_subdev *sd)
sd                215 drivers/media/i2c/st-mipid02.c 	return container_of(sd, struct mipid02_dev, sd);
sd                620 drivers/media/i2c/st-mipid02.c static int mipid02_s_stream(struct v4l2_subdev *sd, int enable)
sd                622 drivers/media/i2c/st-mipid02.c 	struct mipid02_dev *bridge = to_mipid02_dev(sd);
sd                646 drivers/media/i2c/st-mipid02.c static int mipid02_enum_mbus_code(struct v4l2_subdev *sd,
sd                650 drivers/media/i2c/st-mipid02.c 	struct mipid02_dev *bridge = to_mipid02_dev(sd);
sd                673 drivers/media/i2c/st-mipid02.c static int mipid02_get_fmt(struct v4l2_subdev *sd,
sd                678 drivers/media/i2c/st-mipid02.c 	struct mipid02_dev *bridge = to_mipid02_dev(sd);
sd                691 drivers/media/i2c/st-mipid02.c 		fmt = v4l2_subdev_get_try_format(&bridge->sd, cfg, format->pad);
sd                707 drivers/media/i2c/st-mipid02.c static void mipid02_set_fmt_source(struct v4l2_subdev *sd,
sd                711 drivers/media/i2c/st-mipid02.c 	struct mipid02_dev *bridge = to_mipid02_dev(sd);
sd                722 drivers/media/i2c/st-mipid02.c 	*v4l2_subdev_get_try_format(sd, cfg, format->pad) = format->format;
sd                725 drivers/media/i2c/st-mipid02.c static void mipid02_set_fmt_sink(struct v4l2_subdev *sd,
sd                729 drivers/media/i2c/st-mipid02.c 	struct mipid02_dev *bridge = to_mipid02_dev(sd);
sd                735 drivers/media/i2c/st-mipid02.c 		fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
sd                742 drivers/media/i2c/st-mipid02.c static int mipid02_set_fmt(struct v4l2_subdev *sd,
sd                746 drivers/media/i2c/st-mipid02.c 	struct mipid02_dev *bridge = to_mipid02_dev(sd);
sd                766 drivers/media/i2c/st-mipid02.c 		mipid02_set_fmt_source(sd, cfg, format);
sd                768 drivers/media/i2c/st-mipid02.c 		mipid02_set_fmt_sink(sd, cfg, format);
sd                799 drivers/media/i2c/st-mipid02.c 	struct mipid02_dev *bridge = to_mipid02_dev(notifier->sd);
sd                816 drivers/media/i2c/st-mipid02.c 				    &bridge->sd.entity, 0,
sd                833 drivers/media/i2c/st-mipid02.c 	struct mipid02_dev *bridge = to_mipid02_dev(notifier->sd);
sd                893 drivers/media/i2c/st-mipid02.c 	ret = v4l2_async_subdev_notifier_register(&bridge->sd,
sd                955 drivers/media/i2c/st-mipid02.c 	v4l2_i2c_subdev_init(&bridge->sd, client, &mipid02_subdev_ops);
sd                986 drivers/media/i2c/st-mipid02.c 	bridge->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                987 drivers/media/i2c/st-mipid02.c 	bridge->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
sd                988 drivers/media/i2c/st-mipid02.c 	bridge->sd.entity.ops = &mipid02_subdev_entity_ops;
sd                992 drivers/media/i2c/st-mipid02.c 	ret = media_entity_pads_init(&bridge->sd.entity, MIPID02_PAD_NB,
sd               1022 drivers/media/i2c/st-mipid02.c 	ret = v4l2_async_register_subdev(&bridge->sd);
sd               1039 drivers/media/i2c/st-mipid02.c 	media_entity_cleanup(&bridge->sd.entity);
sd               1048 drivers/media/i2c/st-mipid02.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1049 drivers/media/i2c/st-mipid02.c 	struct mipid02_dev *bridge = to_mipid02_dev(sd);
sd               1053 drivers/media/i2c/st-mipid02.c 	v4l2_async_unregister_subdev(&bridge->sd);
sd               1055 drivers/media/i2c/st-mipid02.c 	media_entity_cleanup(&bridge->sd.entity);
sd                 73 drivers/media/i2c/tc358743.c 	struct v4l2_subdev sd;
sd                102 drivers/media/i2c/tc358743.c static void tc358743_enable_interrupts(struct v4l2_subdev *sd,
sd                104 drivers/media/i2c/tc358743.c static int tc358743_s_ctrl_detect_tx_5v(struct v4l2_subdev *sd);
sd                106 drivers/media/i2c/tc358743.c static inline struct tc358743_state *to_state(struct v4l2_subdev *sd)
sd                108 drivers/media/i2c/tc358743.c 	return container_of(sd, struct tc358743_state, sd);
sd                113 drivers/media/i2c/tc358743.c static void i2c_rd(struct v4l2_subdev *sd, u16 reg, u8 *values, u32 n)
sd                115 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                136 drivers/media/i2c/tc358743.c 		v4l2_err(sd, "%s: reading register 0x%x from 0x%x failed\n",
sd                141 drivers/media/i2c/tc358743.c static void i2c_wr(struct v4l2_subdev *sd, u16 reg, u8 *values, u32 n)
sd                143 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                151 drivers/media/i2c/tc358743.c 		v4l2_warn(sd, "i2c wr reg=%04x: len=%d is too big!\n",
sd                168 drivers/media/i2c/tc358743.c 		v4l2_err(sd, "%s: writing register 0x%x from 0x%x failed\n",
sd                178 drivers/media/i2c/tc358743.c 		v4l2_info(sd, "I2C write 0x%04x = 0x%02x",
sd                182 drivers/media/i2c/tc358743.c 		v4l2_info(sd, "I2C write 0x%04x = 0x%02x%02x",
sd                186 drivers/media/i2c/tc358743.c 		v4l2_info(sd, "I2C write 0x%04x = 0x%02x%02x%02x%02x",
sd                190 drivers/media/i2c/tc358743.c 		v4l2_info(sd, "I2C write %d bytes from address 0x%04x\n",
sd                195 drivers/media/i2c/tc358743.c static noinline u32 i2c_rdreg(struct v4l2_subdev *sd, u16 reg, u32 n)
sd                199 drivers/media/i2c/tc358743.c 	i2c_rd(sd, reg, (u8 __force *)&val, n);
sd                204 drivers/media/i2c/tc358743.c static noinline void i2c_wrreg(struct v4l2_subdev *sd, u16 reg, u32 val, u32 n)
sd                208 drivers/media/i2c/tc358743.c 	i2c_wr(sd, reg, (u8 __force *)&raw, n);
sd                211 drivers/media/i2c/tc358743.c static u8 i2c_rd8(struct v4l2_subdev *sd, u16 reg)
sd                213 drivers/media/i2c/tc358743.c 	return i2c_rdreg(sd, reg, 1);
sd                216 drivers/media/i2c/tc358743.c static void i2c_wr8(struct v4l2_subdev *sd, u16 reg, u8 val)
sd                218 drivers/media/i2c/tc358743.c 	i2c_wrreg(sd, reg, val, 1);
sd                221 drivers/media/i2c/tc358743.c static void i2c_wr8_and_or(struct v4l2_subdev *sd, u16 reg,
sd                224 drivers/media/i2c/tc358743.c 	i2c_wrreg(sd, reg, (i2c_rdreg(sd, reg, 1) & mask) | val, 1);
sd                227 drivers/media/i2c/tc358743.c static u16 i2c_rd16(struct v4l2_subdev *sd, u16 reg)
sd                229 drivers/media/i2c/tc358743.c 	return i2c_rdreg(sd, reg, 2);
sd                232 drivers/media/i2c/tc358743.c static void i2c_wr16(struct v4l2_subdev *sd, u16 reg, u16 val)
sd                234 drivers/media/i2c/tc358743.c 	i2c_wrreg(sd, reg, val, 2);
sd                237 drivers/media/i2c/tc358743.c static void i2c_wr16_and_or(struct v4l2_subdev *sd, u16 reg, u16 mask, u16 val)
sd                239 drivers/media/i2c/tc358743.c 	i2c_wrreg(sd, reg, (i2c_rdreg(sd, reg, 2) & mask) | val, 2);
sd                242 drivers/media/i2c/tc358743.c static u32 i2c_rd32(struct v4l2_subdev *sd, u16 reg)
sd                244 drivers/media/i2c/tc358743.c 	return i2c_rdreg(sd, reg, 4);
sd                247 drivers/media/i2c/tc358743.c static void i2c_wr32(struct v4l2_subdev *sd, u16 reg, u32 val)
sd                249 drivers/media/i2c/tc358743.c 	i2c_wrreg(sd, reg, val, 4);
sd                254 drivers/media/i2c/tc358743.c static inline bool is_hdmi(struct v4l2_subdev *sd)
sd                256 drivers/media/i2c/tc358743.c 	return i2c_rd8(sd, SYS_STATUS) & MASK_S_HDMI;
sd                259 drivers/media/i2c/tc358743.c static inline bool tx_5v_power_present(struct v4l2_subdev *sd)
sd                261 drivers/media/i2c/tc358743.c 	return i2c_rd8(sd, SYS_STATUS) & MASK_S_DDC5V;
sd                264 drivers/media/i2c/tc358743.c static inline bool no_signal(struct v4l2_subdev *sd)
sd                266 drivers/media/i2c/tc358743.c 	return !(i2c_rd8(sd, SYS_STATUS) & MASK_S_TMDS);
sd                269 drivers/media/i2c/tc358743.c static inline bool no_sync(struct v4l2_subdev *sd)
sd                271 drivers/media/i2c/tc358743.c 	return !(i2c_rd8(sd, SYS_STATUS) & MASK_S_SYNC);
sd                274 drivers/media/i2c/tc358743.c static inline bool audio_present(struct v4l2_subdev *sd)
sd                276 drivers/media/i2c/tc358743.c 	return i2c_rd8(sd, AU_STATUS0) & MASK_S_A_SAMPLE;
sd                279 drivers/media/i2c/tc358743.c static int get_audio_sampling_rate(struct v4l2_subdev *sd)
sd                287 drivers/media/i2c/tc358743.c 	if (no_signal(sd))
sd                290 drivers/media/i2c/tc358743.c 	return code_to_rate[i2c_rd8(sd, FS_SET) & MASK_FS];
sd                304 drivers/media/i2c/tc358743.c static int tc358743_get_detected_timings(struct v4l2_subdev *sd,
sd                312 drivers/media/i2c/tc358743.c 	if (no_signal(sd)) {
sd                313 drivers/media/i2c/tc358743.c 		v4l2_dbg(1, debug, sd, "%s: no valid signal\n", __func__);
sd                316 drivers/media/i2c/tc358743.c 	if (no_sync(sd)) {
sd                317 drivers/media/i2c/tc358743.c 		v4l2_dbg(1, debug, sd, "%s: no sync on signal\n", __func__);
sd                322 drivers/media/i2c/tc358743.c 	bt->interlaced = i2c_rd8(sd, VI_STATUS1) & MASK_S_V_INTERLACE ?
sd                325 drivers/media/i2c/tc358743.c 	width = ((i2c_rd8(sd, DE_WIDTH_H_HI) & 0x1f) << 8) +
sd                326 drivers/media/i2c/tc358743.c 		i2c_rd8(sd, DE_WIDTH_H_LO);
sd                327 drivers/media/i2c/tc358743.c 	height = ((i2c_rd8(sd, DE_WIDTH_V_HI) & 0x1f) << 8) +
sd                328 drivers/media/i2c/tc358743.c 		i2c_rd8(sd, DE_WIDTH_V_LO);
sd                329 drivers/media/i2c/tc358743.c 	frame_width = ((i2c_rd8(sd, H_SIZE_HI) & 0x1f) << 8) +
sd                330 drivers/media/i2c/tc358743.c 		i2c_rd8(sd, H_SIZE_LO);
sd                331 drivers/media/i2c/tc358743.c 	frame_height = (((i2c_rd8(sd, V_SIZE_HI) & 0x3f) << 8) +
sd                332 drivers/media/i2c/tc358743.c 		i2c_rd8(sd, V_SIZE_LO)) / 2;
sd                335 drivers/media/i2c/tc358743.c 	frame_interval = ((i2c_rd8(sd, FV_CNT_HI) & 0x3) << 8) +
sd                336 drivers/media/i2c/tc358743.c 		i2c_rd8(sd, FV_CNT_LO);
sd                361 drivers/media/i2c/tc358743.c 	struct v4l2_subdev *sd = &state->sd;
sd                363 drivers/media/i2c/tc358743.c 	v4l2_dbg(2, debug, sd, "%s:\n", __func__);
sd                365 drivers/media/i2c/tc358743.c 	i2c_wr8_and_or(sd, HPD_CTL, ~MASK_HPD_OUT0, MASK_HPD_OUT0);
sd                368 drivers/media/i2c/tc358743.c static void tc358743_set_hdmi_hdcp(struct v4l2_subdev *sd, bool enable)
sd                370 drivers/media/i2c/tc358743.c 	v4l2_dbg(2, debug, sd, "%s: %s\n", __func__, enable ?
sd                374 drivers/media/i2c/tc358743.c 		i2c_wr8_and_or(sd, HDCP_REG3, ~KEY_RD_CMD, KEY_RD_CMD);
sd                376 drivers/media/i2c/tc358743.c 		i2c_wr8_and_or(sd, HDCP_MODE, ~MASK_MANUAL_AUTHENTICATION, 0);
sd                378 drivers/media/i2c/tc358743.c 		i2c_wr8_and_or(sd, HDCP_REG1, 0xff,
sd                382 drivers/media/i2c/tc358743.c 		i2c_wr8_and_or(sd, HDCP_REG2, ~MASK_AUTO_P3_RESET,
sd                385 drivers/media/i2c/tc358743.c 		i2c_wr8_and_or(sd, HDCP_MODE, ~MASK_MANUAL_AUTHENTICATION,
sd                390 drivers/media/i2c/tc358743.c static void tc358743_disable_edid(struct v4l2_subdev *sd)
sd                392 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                394 drivers/media/i2c/tc358743.c 	v4l2_dbg(2, debug, sd, "%s:\n", __func__);
sd                400 drivers/media/i2c/tc358743.c 	i2c_wr8_and_or(sd, HPD_CTL, ~MASK_HPD_OUT0, 0x0);
sd                403 drivers/media/i2c/tc358743.c static void tc358743_enable_edid(struct v4l2_subdev *sd)
sd                405 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                408 drivers/media/i2c/tc358743.c 		v4l2_dbg(2, debug, sd, "%s: no EDID -> no hotplug\n", __func__);
sd                409 drivers/media/i2c/tc358743.c 		tc358743_s_ctrl_detect_tx_5v(sd);
sd                413 drivers/media/i2c/tc358743.c 	v4l2_dbg(2, debug, sd, "%s:\n", __func__);
sd                419 drivers/media/i2c/tc358743.c 	tc358743_enable_interrupts(sd, true);
sd                420 drivers/media/i2c/tc358743.c 	tc358743_s_ctrl_detect_tx_5v(sd);
sd                423 drivers/media/i2c/tc358743.c static void tc358743_erase_bksv(struct v4l2_subdev *sd)
sd                428 drivers/media/i2c/tc358743.c 		i2c_wr8(sd, BKSV + i, 0);
sd                433 drivers/media/i2c/tc358743.c static void print_avi_infoframe(struct v4l2_subdev *sd)
sd                435 drivers/media/i2c/tc358743.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                440 drivers/media/i2c/tc358743.c 	if (!is_hdmi(sd)) {
sd                441 drivers/media/i2c/tc358743.c 		v4l2_info(sd, "DVI-D signal - AVI infoframe not supported\n");
sd                445 drivers/media/i2c/tc358743.c 	i2c_rd(sd, PK_AVI_0HEAD, buffer, HDMI_INFOFRAME_SIZE(AVI));
sd                448 drivers/media/i2c/tc358743.c 		v4l2_err(sd, "%s: unpack of AVI infoframe failed\n", __func__);
sd                457 drivers/media/i2c/tc358743.c static int tc358743_s_ctrl_detect_tx_5v(struct v4l2_subdev *sd)
sd                459 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                462 drivers/media/i2c/tc358743.c 			tx_5v_power_present(sd));
sd                465 drivers/media/i2c/tc358743.c static int tc358743_s_ctrl_audio_sampling_rate(struct v4l2_subdev *sd)
sd                467 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                470 drivers/media/i2c/tc358743.c 			get_audio_sampling_rate(sd));
sd                473 drivers/media/i2c/tc358743.c static int tc358743_s_ctrl_audio_present(struct v4l2_subdev *sd)
sd                475 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                478 drivers/media/i2c/tc358743.c 			audio_present(sd));
sd                481 drivers/media/i2c/tc358743.c static int tc358743_update_controls(struct v4l2_subdev *sd)
sd                485 drivers/media/i2c/tc358743.c 	ret |= tc358743_s_ctrl_detect_tx_5v(sd);
sd                486 drivers/media/i2c/tc358743.c 	ret |= tc358743_s_ctrl_audio_sampling_rate(sd);
sd                487 drivers/media/i2c/tc358743.c 	ret |= tc358743_s_ctrl_audio_present(sd);
sd                494 drivers/media/i2c/tc358743.c static void tc358743_reset_phy(struct v4l2_subdev *sd)
sd                496 drivers/media/i2c/tc358743.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd                498 drivers/media/i2c/tc358743.c 	i2c_wr8_and_or(sd, PHY_RST, ~MASK_RESET_CTRL, 0);
sd                499 drivers/media/i2c/tc358743.c 	i2c_wr8_and_or(sd, PHY_RST, ~MASK_RESET_CTRL, MASK_RESET_CTRL);
sd                502 drivers/media/i2c/tc358743.c static void tc358743_reset(struct v4l2_subdev *sd, uint16_t mask)
sd                504 drivers/media/i2c/tc358743.c 	u16 sysctl = i2c_rd16(sd, SYSCTL);
sd                506 drivers/media/i2c/tc358743.c 	i2c_wr16(sd, SYSCTL, sysctl | mask);
sd                507 drivers/media/i2c/tc358743.c 	i2c_wr16(sd, SYSCTL, sysctl & ~mask);
sd                510 drivers/media/i2c/tc358743.c static inline void tc358743_sleep_mode(struct v4l2_subdev *sd, bool enable)
sd                512 drivers/media/i2c/tc358743.c 	i2c_wr16_and_or(sd, SYSCTL, ~MASK_SLEEP,
sd                516 drivers/media/i2c/tc358743.c static inline void enable_stream(struct v4l2_subdev *sd, bool enable)
sd                518 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                520 drivers/media/i2c/tc358743.c 	v4l2_dbg(3, debug, sd, "%s: %sable\n",
sd                527 drivers/media/i2c/tc358743.c 		i2c_wr32(sd, TXOPTIONCNTRL, 0);
sd                529 drivers/media/i2c/tc358743.c 		i2c_wr32(sd, TXOPTIONCNTRL, MASK_CONTCLKMODE);
sd                531 drivers/media/i2c/tc358743.c 		i2c_wr8(sd, VI_MUTE, MASK_AUTO_MUTE);
sd                535 drivers/media/i2c/tc358743.c 		i2c_wr8(sd, VI_MUTE, MASK_AUTO_MUTE | MASK_VI_MUTE);
sd                539 drivers/media/i2c/tc358743.c 	i2c_wr16_and_or(sd, CONFCTL, ~(MASK_VBUFEN | MASK_ABUFEN),
sd                544 drivers/media/i2c/tc358743.c static void tc358743_set_pll(struct v4l2_subdev *sd)
sd                546 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                548 drivers/media/i2c/tc358743.c 	u16 pllctl0 = i2c_rd16(sd, PLLCTL0);
sd                549 drivers/media/i2c/tc358743.c 	u16 pllctl1 = i2c_rd16(sd, PLLCTL1);
sd                554 drivers/media/i2c/tc358743.c 	v4l2_dbg(2, debug, sd, "%s:\n", __func__);
sd                570 drivers/media/i2c/tc358743.c 		v4l2_dbg(1, debug, sd, "%s: updating PLL clock\n", __func__);
sd                571 drivers/media/i2c/tc358743.c 		tc358743_sleep_mode(sd, true);
sd                572 drivers/media/i2c/tc358743.c 		i2c_wr16(sd, PLLCTL0, pllctl0_new);
sd                573 drivers/media/i2c/tc358743.c 		i2c_wr16_and_or(sd, PLLCTL1,
sd                578 drivers/media/i2c/tc358743.c 		i2c_wr16_and_or(sd, PLLCTL1, ~MASK_CKEN, MASK_CKEN);
sd                579 drivers/media/i2c/tc358743.c 		tc358743_sleep_mode(sd, false);
sd                583 drivers/media/i2c/tc358743.c static void tc358743_set_ref_clk(struct v4l2_subdev *sd)
sd                585 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                598 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, SYS_FREQ0, sys_freq & 0x00ff);
sd                599 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, SYS_FREQ1, (sys_freq & 0xff00) >> 8);
sd                601 drivers/media/i2c/tc358743.c 	i2c_wr8_and_or(sd, PHY_CTL0, ~MASK_PHY_SYSCLK_IND,
sd                606 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, FH_MIN0, fh_min & 0x00ff);
sd                607 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, FH_MIN1, (fh_min & 0xff00) >> 8);
sd                610 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, FH_MAX0, fh_max & 0x00ff);
sd                611 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, FH_MAX1, (fh_max & 0xff00) >> 8);
sd                614 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, LOCKDET_REF0, lockdet_ref & 0x0000ff);
sd                615 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, LOCKDET_REF1, (lockdet_ref & 0x00ff00) >> 8);
sd                616 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, LOCKDET_REF2, (lockdet_ref & 0x0f0000) >> 16);
sd                618 drivers/media/i2c/tc358743.c 	i2c_wr8_and_or(sd, NCO_F0_MOD, ~MASK_NCO_F0_MOD,
sd                628 drivers/media/i2c/tc358743.c 	i2c_wr16(sd, CECHCLK, cec_freq);
sd                629 drivers/media/i2c/tc358743.c 	i2c_wr16(sd, CECLCLK, cec_freq);
sd                632 drivers/media/i2c/tc358743.c static void tc358743_set_csi_color_space(struct v4l2_subdev *sd)
sd                634 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                638 drivers/media/i2c/tc358743.c 		v4l2_dbg(2, debug, sd, "%s: YCbCr 422 16-bit\n", __func__);
sd                639 drivers/media/i2c/tc358743.c 		i2c_wr8_and_or(sd, VOUT_SET2,
sd                642 drivers/media/i2c/tc358743.c 		i2c_wr8_and_or(sd, VI_REP, ~MASK_VOUT_COLOR_SEL & 0xff,
sd                645 drivers/media/i2c/tc358743.c 		i2c_wr16_and_or(sd, CONFCTL, ~MASK_YCBCRFMT,
sd                650 drivers/media/i2c/tc358743.c 		v4l2_dbg(2, debug, sd, "%s: RGB 888 24-bit\n", __func__);
sd                651 drivers/media/i2c/tc358743.c 		i2c_wr8_and_or(sd, VOUT_SET2,
sd                654 drivers/media/i2c/tc358743.c 		i2c_wr8_and_or(sd, VI_REP, ~MASK_VOUT_COLOR_SEL & 0xff,
sd                657 drivers/media/i2c/tc358743.c 		i2c_wr16_and_or(sd, CONFCTL, ~MASK_YCBCRFMT, 0);
sd                661 drivers/media/i2c/tc358743.c 		v4l2_dbg(2, debug, sd, "%s: Unsupported format code 0x%x\n",
sd                666 drivers/media/i2c/tc358743.c static unsigned tc358743_num_csi_lanes_needed(struct v4l2_subdev *sd)
sd                668 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                679 drivers/media/i2c/tc358743.c static void tc358743_set_csi(struct v4l2_subdev *sd)
sd                681 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                683 drivers/media/i2c/tc358743.c 	unsigned lanes = tc358743_num_csi_lanes_needed(sd);
sd                685 drivers/media/i2c/tc358743.c 	v4l2_dbg(3, debug, sd, "%s:\n", __func__);
sd                689 drivers/media/i2c/tc358743.c 	tc358743_reset(sd, MASK_CTXRST);
sd                692 drivers/media/i2c/tc358743.c 		i2c_wr32(sd, CLW_CNTRL, MASK_CLW_LANEDISABLE);
sd                694 drivers/media/i2c/tc358743.c 		i2c_wr32(sd, D0W_CNTRL, MASK_D0W_LANEDISABLE);
sd                696 drivers/media/i2c/tc358743.c 		i2c_wr32(sd, D1W_CNTRL, MASK_D1W_LANEDISABLE);
sd                698 drivers/media/i2c/tc358743.c 		i2c_wr32(sd, D2W_CNTRL, MASK_D2W_LANEDISABLE);
sd                700 drivers/media/i2c/tc358743.c 		i2c_wr32(sd, D3W_CNTRL, MASK_D3W_LANEDISABLE);
sd                702 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, LINEINITCNT, pdata->lineinitcnt);
sd                703 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, LPTXTIMECNT, pdata->lptxtimecnt);
sd                704 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, TCLK_HEADERCNT, pdata->tclk_headercnt);
sd                705 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, TCLK_TRAILCNT, pdata->tclk_trailcnt);
sd                706 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, THS_HEADERCNT, pdata->ths_headercnt);
sd                707 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, TWAKEUP, pdata->twakeup);
sd                708 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, TCLK_POSTCNT, pdata->tclk_postcnt);
sd                709 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, THS_TRAILCNT, pdata->ths_trailcnt);
sd                710 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, HSTXVREGCNT, pdata->hstxvregcnt);
sd                712 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, HSTXVREGEN,
sd                719 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, TXOPTIONCNTRL, (state->bus.flags &
sd                721 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, STARTCNTRL, MASK_START);
sd                722 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, CSI_START, MASK_STRT);
sd                724 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, CSI_CONFW, MASK_MODE_SET |
sd                732 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, CSI_CONFW, MASK_MODE_SET |
sd                736 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, CSI_CONFW, MASK_MODE_CLEAR |
sd                739 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, CSI_CONFW, MASK_MODE_SET |
sd                743 drivers/media/i2c/tc358743.c static void tc358743_set_hdmi_phy(struct v4l2_subdev *sd)
sd                745 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                750 drivers/media/i2c/tc358743.c 	i2c_wr8_and_or(sd, PHY_EN, ~MASK_ENABLE_PHY, 0x0);
sd                751 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, PHY_CTL1, SET_PHY_AUTO_RST1_US(1600) |
sd                753 drivers/media/i2c/tc358743.c 	i2c_wr8_and_or(sd, PHY_CTL2, ~MASK_PHY_AUTO_RSTn,
sd                760 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, PHY_BIAS, 0x40);
sd                761 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, PHY_CSQ, SET_CSQ_CNT_LEVEL(0x0a));
sd                762 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, AVM_CTL, 45);
sd                763 drivers/media/i2c/tc358743.c 	i2c_wr8_and_or(sd, HDMI_DET, ~MASK_HDMI_DET_V,
sd                765 drivers/media/i2c/tc358743.c 	i2c_wr8_and_or(sd, HV_RST, ~(MASK_H_PI_RST | MASK_V_PI_RST),
sd                770 drivers/media/i2c/tc358743.c 	i2c_wr8_and_or(sd, PHY_EN, ~MASK_ENABLE_PHY, MASK_ENABLE_PHY);
sd                773 drivers/media/i2c/tc358743.c static void tc358743_set_hdmi_audio(struct v4l2_subdev *sd)
sd                775 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                778 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, FORCE_MUTE, 0x00);
sd                779 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, AUTO_CMD0, MASK_AUTO_MUTE7 | MASK_AUTO_MUTE6 |
sd                782 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, AUTO_CMD1, MASK_AUTO_MUTE9);
sd                783 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, AUTO_CMD2, MASK_AUTO_PLAY3 | MASK_AUTO_PLAY2);
sd                784 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, BUFINIT_START, SET_BUFINIT_START_MS(500));
sd                785 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, FS_MUTE, 0x00);
sd                786 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, FS_IMODE, MASK_NLPCM_SMODE | MASK_FS_SMODE);
sd                787 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, ACR_MODE, MASK_CTS_MODE);
sd                788 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, ACR_MDF0, MASK_ACR_L2MDF_1976_PPM | MASK_ACR_L1MDF_976_PPM);
sd                789 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, ACR_MDF1, MASK_ACR_L3MDF_3906_PPM);
sd                790 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, SDO_MODE1, MASK_SDO_FMT_I2S);
sd                791 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, DIV_MODE, SET_DIV_DLY_MS(100));
sd                794 drivers/media/i2c/tc358743.c 	i2c_wr16_and_or(sd, CONFCTL, 0xffff, MASK_AUDCHNUM_2 |
sd                799 drivers/media/i2c/tc358743.c static void tc358743_set_hdmi_info_frame_mode(struct v4l2_subdev *sd)
sd                802 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, PK_INT_MODE, MASK_ISRC2_INT_MODE | MASK_ISRC_INT_MODE |
sd                806 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, NO_PKT_LIMIT, 0x2c);
sd                807 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, NO_PKT_CLR, 0x53);
sd                808 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, ERR_PK_LIMIT, 0x01);
sd                809 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, NO_PKT_LIMIT2, 0x30);
sd                810 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, NO_GDB_LIMIT, 0x10);
sd                813 drivers/media/i2c/tc358743.c static void tc358743_initial_setup(struct v4l2_subdev *sd)
sd                815 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                822 drivers/media/i2c/tc358743.c 	i2c_wr16_and_or(sd, SYSCTL, ~(MASK_IRRST | MASK_CECRST),
sd                825 drivers/media/i2c/tc358743.c 	tc358743_reset(sd, MASK_CTXRST | MASK_HDMIRST);
sd                827 drivers/media/i2c/tc358743.c 	tc358743_reset(sd, MASK_CECRST);
sd                829 drivers/media/i2c/tc358743.c 	tc358743_sleep_mode(sd, false);
sd                831 drivers/media/i2c/tc358743.c 	i2c_wr16(sd, FIFOCTL, pdata->fifo_level);
sd                833 drivers/media/i2c/tc358743.c 	tc358743_set_ref_clk(sd);
sd                835 drivers/media/i2c/tc358743.c 	i2c_wr8_and_or(sd, DDC_CTL, ~MASK_DDC5V_MODE,
sd                837 drivers/media/i2c/tc358743.c 	i2c_wr8_and_or(sd, EDID_MODE, ~MASK_EDID_MODE, MASK_EDID_MODE_E_DDC);
sd                839 drivers/media/i2c/tc358743.c 	tc358743_set_hdmi_phy(sd);
sd                840 drivers/media/i2c/tc358743.c 	tc358743_set_hdmi_hdcp(sd, pdata->enable_hdcp);
sd                841 drivers/media/i2c/tc358743.c 	tc358743_set_hdmi_audio(sd);
sd                842 drivers/media/i2c/tc358743.c 	tc358743_set_hdmi_info_frame_mode(sd);
sd                845 drivers/media/i2c/tc358743.c 	i2c_wr8_and_or(sd, VI_MODE, ~MASK_RGB_DVI, 0);
sd                847 drivers/media/i2c/tc358743.c 	i2c_wr8_and_or(sd, VOUT_SET2, ~MASK_VOUTCOLORMODE,
sd                849 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, VOUT_SET3, MASK_VOUT_EXTCNT);
sd                858 drivers/media/i2c/tc358743.c 	struct v4l2_subdev *sd = &state->sd;
sd                860 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, CECIMSK, enable ? MASK_CECTIM | MASK_CECRIM : 0);
sd                861 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, CECICLR, MASK_CECTICLR | MASK_CECRICLR);
sd                862 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, CECEN, enable);
sd                864 drivers/media/i2c/tc358743.c 		i2c_wr32(sd, CECREN, MASK_CECREN);
sd                872 drivers/media/i2c/tc358743.c 	struct v4l2_subdev *sd = &state->sd;
sd                875 drivers/media/i2c/tc358743.c 	reg = i2c_rd32(sd, CECRCTL1);
sd                880 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, CECRCTL1, reg);
sd                887 drivers/media/i2c/tc358743.c 	struct v4l2_subdev *sd = &state->sd;
sd                891 drivers/media/i2c/tc358743.c 		la = i2c_rd32(sd, CECADD);
sd                894 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, CECADD, la);
sd                902 drivers/media/i2c/tc358743.c 	struct v4l2_subdev *sd = &state->sd;
sd                905 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, CECTCTL,
sd                909 drivers/media/i2c/tc358743.c 		i2c_wr32(sd, CECTBUF1 + i * 4,
sd                911 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, CECTEN, MASK_CECTEN);
sd                922 drivers/media/i2c/tc358743.c static void tc358743_cec_isr(struct v4l2_subdev *sd, u16 intstatus,
sd                925 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                929 drivers/media/i2c/tc358743.c 	cec_rxint = i2c_rd32(sd, CECRSTAT);
sd                930 drivers/media/i2c/tc358743.c 	cec_txint = i2c_rd32(sd, CECTSTAT);
sd                936 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, CECICLR, clr);
sd                964 drivers/media/i2c/tc358743.c 		v = i2c_rd32(sd, CECRCTR);
sd                967 drivers/media/i2c/tc358743.c 			v = i2c_rd32(sd, CECRBUF1 + i * 4);
sd                973 drivers/media/i2c/tc358743.c 	i2c_wr16(sd, INTSTATUS,
sd                981 drivers/media/i2c/tc358743.c static void tc358743_format_change(struct v4l2_subdev *sd)
sd                983 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd                990 drivers/media/i2c/tc358743.c 	if (tc358743_get_detected_timings(sd, &timings)) {
sd                991 drivers/media/i2c/tc358743.c 		enable_stream(sd, false);
sd                993 drivers/media/i2c/tc358743.c 		v4l2_dbg(1, debug, sd, "%s: No signal\n",
sd                997 drivers/media/i2c/tc358743.c 			enable_stream(sd, false);
sd               1000 drivers/media/i2c/tc358743.c 			v4l2_print_dv_timings(sd->name,
sd               1005 drivers/media/i2c/tc358743.c 	if (sd->devnode)
sd               1006 drivers/media/i2c/tc358743.c 		v4l2_subdev_notify_event(sd, &tc358743_ev_fmt);
sd               1009 drivers/media/i2c/tc358743.c static void tc358743_init_interrupts(struct v4l2_subdev *sd)
sd               1015 drivers/media/i2c/tc358743.c 		i2c_wr8(sd, i, 0xff);
sd               1017 drivers/media/i2c/tc358743.c 	i2c_wr16(sd, INTSTATUS, 0xffff);
sd               1020 drivers/media/i2c/tc358743.c static void tc358743_enable_interrupts(struct v4l2_subdev *sd,
sd               1023 drivers/media/i2c/tc358743.c 	v4l2_dbg(2, debug, sd, "%s: cable connected = %d\n", __func__,
sd               1027 drivers/media/i2c/tc358743.c 		i2c_wr8(sd, SYS_INTM, ~(MASK_M_DDC | MASK_M_DVI_DET |
sd               1029 drivers/media/i2c/tc358743.c 		i2c_wr8(sd, CLK_INTM, ~MASK_M_IN_DE_CHG);
sd               1030 drivers/media/i2c/tc358743.c 		i2c_wr8(sd, CBIT_INTM, ~(MASK_M_CBIT_FS | MASK_M_AF_LOCK |
sd               1032 drivers/media/i2c/tc358743.c 		i2c_wr8(sd, AUDIO_INTM, ~MASK_M_BUFINIT_END);
sd               1033 drivers/media/i2c/tc358743.c 		i2c_wr8(sd, MISC_INTM, ~MASK_M_SYNC_CHG);
sd               1035 drivers/media/i2c/tc358743.c 		i2c_wr8(sd, SYS_INTM, ~MASK_M_DDC & 0xff);
sd               1036 drivers/media/i2c/tc358743.c 		i2c_wr8(sd, CLK_INTM, 0xff);
sd               1037 drivers/media/i2c/tc358743.c 		i2c_wr8(sd, CBIT_INTM, 0xff);
sd               1038 drivers/media/i2c/tc358743.c 		i2c_wr8(sd, AUDIO_INTM, 0xff);
sd               1039 drivers/media/i2c/tc358743.c 		i2c_wr8(sd, MISC_INTM, 0xff);
sd               1043 drivers/media/i2c/tc358743.c static void tc358743_hdmi_audio_int_handler(struct v4l2_subdev *sd,
sd               1046 drivers/media/i2c/tc358743.c 	u8 audio_int_mask = i2c_rd8(sd, AUDIO_INTM);
sd               1047 drivers/media/i2c/tc358743.c 	u8 audio_int = i2c_rd8(sd, AUDIO_INT) & ~audio_int_mask;
sd               1049 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, AUDIO_INT, audio_int);
sd               1051 drivers/media/i2c/tc358743.c 	v4l2_dbg(3, debug, sd, "%s: AUDIO_INT = 0x%02x\n", __func__, audio_int);
sd               1053 drivers/media/i2c/tc358743.c 	tc358743_s_ctrl_audio_sampling_rate(sd);
sd               1054 drivers/media/i2c/tc358743.c 	tc358743_s_ctrl_audio_present(sd);
sd               1057 drivers/media/i2c/tc358743.c static void tc358743_csi_err_int_handler(struct v4l2_subdev *sd, bool *handled)
sd               1059 drivers/media/i2c/tc358743.c 	v4l2_err(sd, "%s: CSI_ERR = 0x%x\n", __func__, i2c_rd32(sd, CSI_ERR));
sd               1061 drivers/media/i2c/tc358743.c 	i2c_wr32(sd, CSI_INT_CLR, MASK_ICRER);
sd               1064 drivers/media/i2c/tc358743.c static void tc358743_hdmi_misc_int_handler(struct v4l2_subdev *sd,
sd               1067 drivers/media/i2c/tc358743.c 	u8 misc_int_mask = i2c_rd8(sd, MISC_INTM);
sd               1068 drivers/media/i2c/tc358743.c 	u8 misc_int = i2c_rd8(sd, MISC_INT) & ~misc_int_mask;
sd               1070 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, MISC_INT, misc_int);
sd               1072 drivers/media/i2c/tc358743.c 	v4l2_dbg(3, debug, sd, "%s: MISC_INT = 0x%02x\n", __func__, misc_int);
sd               1078 drivers/media/i2c/tc358743.c 		if (no_sync(sd) || no_signal(sd)) {
sd               1079 drivers/media/i2c/tc358743.c 			tc358743_reset_phy(sd);
sd               1080 drivers/media/i2c/tc358743.c 			tc358743_erase_bksv(sd);
sd               1083 drivers/media/i2c/tc358743.c 		tc358743_format_change(sd);
sd               1091 drivers/media/i2c/tc358743.c 		v4l2_err(sd, "%s: Unhandled MISC_INT interrupts: 0x%02x\n",
sd               1096 drivers/media/i2c/tc358743.c static void tc358743_hdmi_cbit_int_handler(struct v4l2_subdev *sd,
sd               1099 drivers/media/i2c/tc358743.c 	u8 cbit_int_mask = i2c_rd8(sd, CBIT_INTM);
sd               1100 drivers/media/i2c/tc358743.c 	u8 cbit_int = i2c_rd8(sd, CBIT_INT) & ~cbit_int_mask;
sd               1102 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, CBIT_INT, cbit_int);
sd               1104 drivers/media/i2c/tc358743.c 	v4l2_dbg(3, debug, sd, "%s: CBIT_INT = 0x%02x\n", __func__, cbit_int);
sd               1108 drivers/media/i2c/tc358743.c 		v4l2_dbg(1, debug, sd, "%s: Audio sample rate changed\n",
sd               1110 drivers/media/i2c/tc358743.c 		tc358743_s_ctrl_audio_sampling_rate(sd);
sd               1119 drivers/media/i2c/tc358743.c 		v4l2_dbg(1, debug, sd, "%s: Audio present changed\n",
sd               1121 drivers/media/i2c/tc358743.c 		tc358743_s_ctrl_audio_present(sd);
sd               1129 drivers/media/i2c/tc358743.c 		v4l2_err(sd, "%s: Unhandled CBIT_INT interrupts: 0x%02x\n",
sd               1134 drivers/media/i2c/tc358743.c static void tc358743_hdmi_clk_int_handler(struct v4l2_subdev *sd, bool *handled)
sd               1136 drivers/media/i2c/tc358743.c 	u8 clk_int_mask = i2c_rd8(sd, CLK_INTM);
sd               1137 drivers/media/i2c/tc358743.c 	u8 clk_int = i2c_rd8(sd, CLK_INT) & ~clk_int_mask;
sd               1140 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, CLK_INT, clk_int | 0x80 | MASK_I_OUT_H_CHG);
sd               1142 drivers/media/i2c/tc358743.c 	v4l2_dbg(3, debug, sd, "%s: CLK_INT = 0x%02x\n", __func__, clk_int);
sd               1146 drivers/media/i2c/tc358743.c 		v4l2_dbg(1, debug, sd, "%s: DE size or position has changed\n",
sd               1155 drivers/media/i2c/tc358743.c 		if (!no_signal(sd) && !no_sync(sd))
sd               1156 drivers/media/i2c/tc358743.c 			tc358743_format_change(sd);
sd               1164 drivers/media/i2c/tc358743.c 		v4l2_err(sd, "%s: Unhandled CLK_INT interrupts: 0x%02x\n",
sd               1169 drivers/media/i2c/tc358743.c static void tc358743_hdmi_sys_int_handler(struct v4l2_subdev *sd, bool *handled)
sd               1171 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd               1172 drivers/media/i2c/tc358743.c 	u8 sys_int_mask = i2c_rd8(sd, SYS_INTM);
sd               1173 drivers/media/i2c/tc358743.c 	u8 sys_int = i2c_rd8(sd, SYS_INT) & ~sys_int_mask;
sd               1175 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, SYS_INT, sys_int);
sd               1177 drivers/media/i2c/tc358743.c 	v4l2_dbg(3, debug, sd, "%s: SYS_INT = 0x%02x\n", __func__, sys_int);
sd               1180 drivers/media/i2c/tc358743.c 		bool tx_5v = tx_5v_power_present(sd);
sd               1182 drivers/media/i2c/tc358743.c 		v4l2_dbg(1, debug, sd, "%s: Tx 5V power present: %s\n",
sd               1186 drivers/media/i2c/tc358743.c 			tc358743_enable_edid(sd);
sd               1188 drivers/media/i2c/tc358743.c 			tc358743_enable_interrupts(sd, false);
sd               1189 drivers/media/i2c/tc358743.c 			tc358743_disable_edid(sd);
sd               1191 drivers/media/i2c/tc358743.c 			tc358743_erase_bksv(sd);
sd               1192 drivers/media/i2c/tc358743.c 			tc358743_update_controls(sd);
sd               1201 drivers/media/i2c/tc358743.c 		v4l2_dbg(1, debug, sd, "%s: HDMI->DVI change detected\n",
sd               1207 drivers/media/i2c/tc358743.c 		if (no_sync(sd) || no_signal(sd)) {
sd               1208 drivers/media/i2c/tc358743.c 			tc358743_reset_phy(sd);
sd               1209 drivers/media/i2c/tc358743.c 			tc358743_erase_bksv(sd);
sd               1218 drivers/media/i2c/tc358743.c 		v4l2_dbg(1, debug, sd, "%s: DVI->HDMI change detected\n",
sd               1222 drivers/media/i2c/tc358743.c 		i2c_wr8(sd, ANA_CTL, MASK_APPL_PCSX_NORMAL | MASK_ANALOG_ON);
sd               1230 drivers/media/i2c/tc358743.c 		v4l2_err(sd, "%s: Unhandled SYS_INT interrupts: 0x%02x\n",
sd               1237 drivers/media/i2c/tc358743.c static int tc358743_log_status(struct v4l2_subdev *sd)
sd               1239 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd               1241 drivers/media/i2c/tc358743.c 	uint8_t hdmi_sys_status =  i2c_rd8(sd, SYS_STATUS);
sd               1242 drivers/media/i2c/tc358743.c 	uint16_t sysctl = i2c_rd16(sd, SYSCTL);
sd               1243 drivers/media/i2c/tc358743.c 	u8 vi_status3 =  i2c_rd8(sd, VI_STATUS3);
sd               1250 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "-----Chip status-----\n");
sd               1251 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Chip ID: 0x%02x\n",
sd               1252 drivers/media/i2c/tc358743.c 			(i2c_rd16(sd, CHIPID) & MASK_CHIPID) >> 8);
sd               1253 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Chip revision: 0x%02x\n",
sd               1254 drivers/media/i2c/tc358743.c 			i2c_rd16(sd, CHIPID) & MASK_REVID);
sd               1255 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Reset: IR: %d, CEC: %d, CSI TX: %d, HDMI: %d\n",
sd               1260 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Sleep mode: %s\n", sysctl & MASK_SLEEP ? "on" : "off");
sd               1261 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Cable detected (+5V power): %s\n",
sd               1263 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "DDC lines enabled: %s\n",
sd               1264 drivers/media/i2c/tc358743.c 			(i2c_rd8(sd, EDID_MODE) & MASK_EDID_MODE_E_DDC) ?
sd               1266 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Hotplug enabled: %s\n",
sd               1267 drivers/media/i2c/tc358743.c 			(i2c_rd8(sd, HPD_CTL) & MASK_HPD_OUT0) ?
sd               1269 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "CEC enabled: %s\n",
sd               1270 drivers/media/i2c/tc358743.c 			(i2c_rd16(sd, CECEN) & MASK_CECEN) ?  "yes" : "no");
sd               1271 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "-----Signal status-----\n");
sd               1272 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "TMDS signal detected: %s\n",
sd               1274 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Stable sync signal: %s\n",
sd               1276 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "PHY PLL locked: %s\n",
sd               1278 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "PHY DE detected: %s\n",
sd               1281 drivers/media/i2c/tc358743.c 	if (tc358743_get_detected_timings(sd, &timings)) {
sd               1282 drivers/media/i2c/tc358743.c 		v4l2_info(sd, "No video detected\n");
sd               1284 drivers/media/i2c/tc358743.c 		v4l2_print_dv_timings(sd->name, "Detected format: ", &timings,
sd               1287 drivers/media/i2c/tc358743.c 	v4l2_print_dv_timings(sd->name, "Configured format: ", &state->timings,
sd               1290 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "-----CSI-TX status-----\n");
sd               1291 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Lanes needed: %d\n",
sd               1292 drivers/media/i2c/tc358743.c 			tc358743_num_csi_lanes_needed(sd));
sd               1293 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Lanes in use: %d\n",
sd               1295 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Waiting for particular sync signal: %s\n",
sd               1296 drivers/media/i2c/tc358743.c 			(i2c_rd16(sd, CSI_STATUS) & MASK_S_WSYNC) ?
sd               1298 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Transmit mode: %s\n",
sd               1299 drivers/media/i2c/tc358743.c 			(i2c_rd16(sd, CSI_STATUS) & MASK_S_TXACT) ?
sd               1301 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Receive mode: %s\n",
sd               1302 drivers/media/i2c/tc358743.c 			(i2c_rd16(sd, CSI_STATUS) & MASK_S_RXACT) ?
sd               1304 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Stopped: %s\n",
sd               1305 drivers/media/i2c/tc358743.c 			(i2c_rd16(sd, CSI_STATUS) & MASK_S_HLT) ?
sd               1307 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Color space: %s\n",
sd               1313 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "-----%s status-----\n", is_hdmi(sd) ? "HDMI" : "DVI-D");
sd               1314 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "HDCP encrypted content: %s\n",
sd               1316 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Input color space: %s %s range\n",
sd               1319 drivers/media/i2c/tc358743.c 	if (!is_hdmi(sd))
sd               1321 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "AV Mute: %s\n", hdmi_sys_status & MASK_S_AVMUTE ? "on" :
sd               1323 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "Deep color mode: %d-bits per channel\n",
sd               1324 drivers/media/i2c/tc358743.c 			deep_color_mode[(i2c_rd8(sd, VI_STATUS1) &
sd               1326 drivers/media/i2c/tc358743.c 	print_avi_infoframe(sd);
sd               1332 drivers/media/i2c/tc358743.c static void tc358743_print_register_map(struct v4l2_subdev *sd)
sd               1334 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x0000-0x00FF: Global Control Register\n");
sd               1335 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x0100-0x01FF: CSI2-TX PHY Register\n");
sd               1336 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x0200-0x03FF: CSI2-TX PPI Register\n");
sd               1337 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x0400-0x05FF: Reserved\n");
sd               1338 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x0600-0x06FF: CEC Register\n");
sd               1339 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x0700-0x84FF: Reserved\n");
sd               1340 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x8500-0x85FF: HDMIRX System Control Register\n");
sd               1341 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x8600-0x86FF: HDMIRX Audio Control Register\n");
sd               1342 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x8700-0x87FF: HDMIRX InfoFrame packet data Register\n");
sd               1343 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x8800-0x88FF: HDMIRX HDCP Port Register\n");
sd               1344 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x8900-0x89FF: HDMIRX Video Output Port & 3D Register\n");
sd               1345 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x8A00-0x8BFF: Reserved\n");
sd               1346 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x8C00-0x8FFF: HDMIRX EDID-RAM (1024bytes)\n");
sd               1347 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x9000-0x90FF: HDMIRX GBD Extraction Control\n");
sd               1348 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x9100-0x92FF: HDMIRX GBD RAM read\n");
sd               1349 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "0x9300-      : Reserved\n");
sd               1365 drivers/media/i2c/tc358743.c static int tc358743_g_register(struct v4l2_subdev *sd,
sd               1369 drivers/media/i2c/tc358743.c 		tc358743_print_register_map(sd);
sd               1375 drivers/media/i2c/tc358743.c 	reg->val = i2c_rdreg(sd, reg->reg, reg->size);
sd               1380 drivers/media/i2c/tc358743.c static int tc358743_s_register(struct v4l2_subdev *sd,
sd               1384 drivers/media/i2c/tc358743.c 		tc358743_print_register_map(sd);
sd               1401 drivers/media/i2c/tc358743.c 	i2c_wrreg(sd, (u16)reg->reg, reg->val,
sd               1408 drivers/media/i2c/tc358743.c static int tc358743_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
sd               1410 drivers/media/i2c/tc358743.c 	u16 intstatus = i2c_rd16(sd, INTSTATUS);
sd               1412 drivers/media/i2c/tc358743.c 	v4l2_dbg(1, debug, sd, "%s: IntStatus = 0x%04x\n", __func__, intstatus);
sd               1415 drivers/media/i2c/tc358743.c 		u8 hdmi_int0 = i2c_rd8(sd, HDMI_INT0);
sd               1416 drivers/media/i2c/tc358743.c 		u8 hdmi_int1 = i2c_rd8(sd, HDMI_INT1);
sd               1419 drivers/media/i2c/tc358743.c 			tc358743_hdmi_misc_int_handler(sd, handled);
sd               1421 drivers/media/i2c/tc358743.c 			tc358743_hdmi_cbit_int_handler(sd, handled);
sd               1423 drivers/media/i2c/tc358743.c 			tc358743_hdmi_clk_int_handler(sd, handled);
sd               1425 drivers/media/i2c/tc358743.c 			tc358743_hdmi_sys_int_handler(sd, handled);
sd               1427 drivers/media/i2c/tc358743.c 			tc358743_hdmi_audio_int_handler(sd, handled);
sd               1429 drivers/media/i2c/tc358743.c 		i2c_wr16(sd, INTSTATUS, MASK_HDMI_INT);
sd               1435 drivers/media/i2c/tc358743.c 		tc358743_cec_isr(sd, intstatus, handled);
sd               1436 drivers/media/i2c/tc358743.c 		i2c_wr16(sd, INTSTATUS,
sd               1443 drivers/media/i2c/tc358743.c 		u32 csi_int = i2c_rd32(sd, CSI_INT);
sd               1446 drivers/media/i2c/tc358743.c 			tc358743_csi_err_int_handler(sd, handled);
sd               1448 drivers/media/i2c/tc358743.c 		i2c_wr16(sd, INTSTATUS, MASK_CSI_INT);
sd               1451 drivers/media/i2c/tc358743.c 	intstatus = i2c_rd16(sd, INTSTATUS);
sd               1453 drivers/media/i2c/tc358743.c 		v4l2_dbg(1, debug, sd,
sd               1466 drivers/media/i2c/tc358743.c 	tc358743_isr(&state->sd, 0, &handled);
sd               1491 drivers/media/i2c/tc358743.c 	tc358743_isr(&state->sd, 0, &handled);
sd               1494 drivers/media/i2c/tc358743.c static int tc358743_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
sd               1499 drivers/media/i2c/tc358743.c 		return v4l2_src_change_event_subdev_subscribe(sd, fh, sub);
sd               1501 drivers/media/i2c/tc358743.c 		return v4l2_ctrl_subdev_subscribe_event(sd, fh, sub);
sd               1509 drivers/media/i2c/tc358743.c static int tc358743_g_input_status(struct v4l2_subdev *sd, u32 *status)
sd               1512 drivers/media/i2c/tc358743.c 	*status |= no_signal(sd) ? V4L2_IN_ST_NO_SIGNAL : 0;
sd               1513 drivers/media/i2c/tc358743.c 	*status |= no_sync(sd) ? V4L2_IN_ST_NO_SYNC : 0;
sd               1515 drivers/media/i2c/tc358743.c 	v4l2_dbg(1, debug, sd, "%s: status = 0x%x\n", __func__, *status);
sd               1520 drivers/media/i2c/tc358743.c static int tc358743_s_dv_timings(struct v4l2_subdev *sd,
sd               1523 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd               1529 drivers/media/i2c/tc358743.c 		v4l2_print_dv_timings(sd->name, "tc358743_s_dv_timings: ",
sd               1533 drivers/media/i2c/tc358743.c 		v4l2_dbg(1, debug, sd, "%s: no change\n", __func__);
sd               1539 drivers/media/i2c/tc358743.c 		v4l2_dbg(1, debug, sd, "%s: timings out of range\n", __func__);
sd               1545 drivers/media/i2c/tc358743.c 	enable_stream(sd, false);
sd               1546 drivers/media/i2c/tc358743.c 	tc358743_set_pll(sd);
sd               1547 drivers/media/i2c/tc358743.c 	tc358743_set_csi(sd);
sd               1552 drivers/media/i2c/tc358743.c static int tc358743_g_dv_timings(struct v4l2_subdev *sd,
sd               1555 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd               1562 drivers/media/i2c/tc358743.c static int tc358743_enum_dv_timings(struct v4l2_subdev *sd,
sd               1572 drivers/media/i2c/tc358743.c static int tc358743_query_dv_timings(struct v4l2_subdev *sd,
sd               1577 drivers/media/i2c/tc358743.c 	ret = tc358743_get_detected_timings(sd, timings);
sd               1582 drivers/media/i2c/tc358743.c 		v4l2_print_dv_timings(sd->name, "tc358743_query_dv_timings: ",
sd               1587 drivers/media/i2c/tc358743.c 		v4l2_dbg(1, debug, sd, "%s: timings out of range\n", __func__);
sd               1594 drivers/media/i2c/tc358743.c static int tc358743_dv_timings_cap(struct v4l2_subdev *sd,
sd               1605 drivers/media/i2c/tc358743.c static int tc358743_g_mbus_config(struct v4l2_subdev *sd,
sd               1608 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd               1635 drivers/media/i2c/tc358743.c static int tc358743_s_stream(struct v4l2_subdev *sd, int enable)
sd               1637 drivers/media/i2c/tc358743.c 	enable_stream(sd, enable);
sd               1640 drivers/media/i2c/tc358743.c 		tc358743_set_csi(sd);
sd               1648 drivers/media/i2c/tc358743.c static int tc358743_enum_mbus_code(struct v4l2_subdev *sd,
sd               1665 drivers/media/i2c/tc358743.c static int tc358743_get_fmt(struct v4l2_subdev *sd,
sd               1669 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd               1670 drivers/media/i2c/tc358743.c 	u8 vi_rep = i2c_rd8(sd, VI_REP);
sd               1701 drivers/media/i2c/tc358743.c static int tc358743_set_fmt(struct v4l2_subdev *sd,
sd               1705 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd               1708 drivers/media/i2c/tc358743.c 	int ret = tc358743_get_fmt(sd, cfg, format);
sd               1728 drivers/media/i2c/tc358743.c 	enable_stream(sd, false);
sd               1729 drivers/media/i2c/tc358743.c 	tc358743_set_pll(sd);
sd               1730 drivers/media/i2c/tc358743.c 	tc358743_set_csi(sd);
sd               1731 drivers/media/i2c/tc358743.c 	tc358743_set_csi_color_space(sd);
sd               1736 drivers/media/i2c/tc358743.c static int tc358743_g_edid(struct v4l2_subdev *sd,
sd               1739 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd               1761 drivers/media/i2c/tc358743.c 	i2c_rd(sd, EDID_RAM + (edid->start_block * EDID_BLOCK_SIZE), edid->edid,
sd               1767 drivers/media/i2c/tc358743.c static int tc358743_s_edid(struct v4l2_subdev *sd,
sd               1770 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd               1776 drivers/media/i2c/tc358743.c 	v4l2_dbg(2, debug, sd, "%s, pad %d, start block %d, blocks %d\n",
sd               1798 drivers/media/i2c/tc358743.c 	tc358743_disable_edid(sd);
sd               1800 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, EDID_LEN1, edid_len & 0xff);
sd               1801 drivers/media/i2c/tc358743.c 	i2c_wr8(sd, EDID_LEN2, edid_len >> 8);
sd               1809 drivers/media/i2c/tc358743.c 		i2c_wr(sd, EDID_RAM + i, edid->edid + i, EDID_BLOCK_SIZE);
sd               1815 drivers/media/i2c/tc358743.c 	if (tx_5v_power_present(sd))
sd               1816 drivers/media/i2c/tc358743.c 		tc358743_enable_edid(sd);
sd               2035 drivers/media/i2c/tc358743.c 	struct v4l2_subdev *sd;
sd               2063 drivers/media/i2c/tc358743.c 	sd = &state->sd;
sd               2064 drivers/media/i2c/tc358743.c 	v4l2_i2c_subdev_init(sd, client, &tc358743_ops);
sd               2065 drivers/media/i2c/tc358743.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
sd               2068 drivers/media/i2c/tc358743.c 	if ((i2c_rd16(sd, CHIPID) & MASK_CHIPID) != 0) {
sd               2069 drivers/media/i2c/tc358743.c 		v4l2_info(sd, "not a TC358743 on address 0x%x\n",
sd               2087 drivers/media/i2c/tc358743.c 	sd->ctrl_handler = &state->hdl;
sd               2093 drivers/media/i2c/tc358743.c 	if (tc358743_update_controls(sd)) {
sd               2099 drivers/media/i2c/tc358743.c 	sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
sd               2100 drivers/media/i2c/tc358743.c 	err = media_entity_pads_init(&sd->entity, 1, &state->pad);
sd               2106 drivers/media/i2c/tc358743.c 	sd->dev = &client->dev;
sd               2107 drivers/media/i2c/tc358743.c 	err = v4l2_async_register_subdev(sd);
sd               2127 drivers/media/i2c/tc358743.c 	tc358743_initial_setup(sd);
sd               2129 drivers/media/i2c/tc358743.c 	tc358743_s_dv_timings(sd, &default_timing);
sd               2131 drivers/media/i2c/tc358743.c 	tc358743_set_csi_color_space(sd);
sd               2133 drivers/media/i2c/tc358743.c 	tc358743_init_interrupts(sd);
sd               2160 drivers/media/i2c/tc358743.c 	tc358743_enable_interrupts(sd, tx_5v_power_present(sd));
sd               2161 drivers/media/i2c/tc358743.c 	i2c_wr16(sd, INTMASK, ~irq_mask);
sd               2163 drivers/media/i2c/tc358743.c 	err = v4l2_ctrl_handler_setup(sd->ctrl_handler);
sd               2167 drivers/media/i2c/tc358743.c 	v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
sd               2179 drivers/media/i2c/tc358743.c 	media_entity_cleanup(&sd->entity);
sd               2186 drivers/media/i2c/tc358743.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               2187 drivers/media/i2c/tc358743.c 	struct tc358743_state *state = to_state(sd);
sd               2195 drivers/media/i2c/tc358743.c 	v4l2_async_unregister_subdev(sd);
sd               2196 drivers/media/i2c/tc358743.c 	v4l2_device_unregister_subdev(sd);
sd               2198 drivers/media/i2c/tc358743.c 	media_entity_cleanup(&sd->entity);
sd                226 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev sd;
sd                296 drivers/media/i2c/tda1997x.c static inline struct tda1997x_state *to_state(struct v4l2_subdev *sd)
sd                298 drivers/media/i2c/tda1997x.c 	return container_of(sd, struct tda1997x_state, sd);
sd                303 drivers/media/i2c/tda1997x.c 	return &container_of(ctrl->handler, struct tda1997x_state, hdl)->sd;
sd                306 drivers/media/i2c/tda1997x.c static int tda1997x_cec_read(struct v4l2_subdev *sd, u8 reg)
sd                308 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd                320 drivers/media/i2c/tda1997x.c static int tda1997x_cec_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                322 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd                339 drivers/media/i2c/tda1997x.c static int tda1997x_setpage(struct v4l2_subdev *sd, u8 page)
sd                341 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd                358 drivers/media/i2c/tda1997x.c static inline int io_read(struct v4l2_subdev *sd, u16 reg)
sd                360 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd                364 drivers/media/i2c/tda1997x.c 	if (tda1997x_setpage(sd, reg >> 8)) {
sd                381 drivers/media/i2c/tda1997x.c static inline long io_read16(struct v4l2_subdev *sd, u16 reg)
sd                386 drivers/media/i2c/tda1997x.c 	val = io_read(sd, reg);
sd                390 drivers/media/i2c/tda1997x.c 	val = io_read(sd, reg + 1);
sd                398 drivers/media/i2c/tda1997x.c static inline long io_read24(struct v4l2_subdev *sd, u16 reg)
sd                403 drivers/media/i2c/tda1997x.c 	val = io_read(sd, reg);
sd                407 drivers/media/i2c/tda1997x.c 	val = io_read(sd, reg + 1);
sd                411 drivers/media/i2c/tda1997x.c 	val = io_read(sd, reg + 2);
sd                419 drivers/media/i2c/tda1997x.c static unsigned int io_readn(struct v4l2_subdev *sd, u16 reg, u8 len, u8 *data)
sd                426 drivers/media/i2c/tda1997x.c 		val = io_read(sd, reg + i);
sd                436 drivers/media/i2c/tda1997x.c static int io_write(struct v4l2_subdev *sd, u16 reg, u8 val)
sd                438 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd                442 drivers/media/i2c/tda1997x.c 	if (tda1997x_setpage(sd, reg >> 8)) {
sd                460 drivers/media/i2c/tda1997x.c static int io_write16(struct v4l2_subdev *sd, u16 reg, u16 val)
sd                464 drivers/media/i2c/tda1997x.c 	ret = io_write(sd, reg, (val >> 8) & 0xff);
sd                467 drivers/media/i2c/tda1997x.c 	ret = io_write(sd, reg + 1, val & 0xff);
sd                473 drivers/media/i2c/tda1997x.c static int io_write24(struct v4l2_subdev *sd, u16 reg, u32 val)
sd                477 drivers/media/i2c/tda1997x.c 	ret = io_write(sd, reg, (val >> 16) & 0xff);
sd                480 drivers/media/i2c/tda1997x.c 	ret = io_write(sd, reg + 1, (val >> 8) & 0xff);
sd                483 drivers/media/i2c/tda1997x.c 	ret = io_write(sd, reg + 2, val & 0xff);
sd                502 drivers/media/i2c/tda1997x.c static int tda1997x_manual_hpd(struct v4l2_subdev *sd, enum hpd_mode mode)
sd                506 drivers/media/i2c/tda1997x.c 	hpd_auto = io_read(sd, REG_HPD_AUTO_CTRL);
sd                507 drivers/media/i2c/tda1997x.c 	hpd_pwr = io_read(sd, REG_HPD_POWER);
sd                508 drivers/media/i2c/tda1997x.c 	hpd_man = io_read(sd, REG_HPD_MAN_CTRL);
sd                523 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_HPD_POWER, hpd_pwr);
sd                524 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_HPD_MAN_CTRL, hpd_man);
sd                531 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_HPD_POWER, hpd_pwr);
sd                539 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_HPD_AUTO_CTRL, hpd_auto);
sd                540 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_HPD_MAN_CTRL, hpd_man);
sd                545 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_HPD_AUTO_CTRL, hpd_auto);
sd                551 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_HPD_MAN_CTRL, hpd_man);
sd                564 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = &state->sd;
sd                566 drivers/media/i2c/tda1997x.c 	v4l2_dbg(2, debug, sd, "%s:\n", __func__);
sd                569 drivers/media/i2c/tda1997x.c 	tda1997x_manual_hpd(sd, HPD_HIGH_OTHER);
sd                570 drivers/media/i2c/tda1997x.c 	tda1997x_manual_hpd(sd, HPD_HIGH_BP);
sd                575 drivers/media/i2c/tda1997x.c static void tda1997x_disable_edid(struct v4l2_subdev *sd)
sd                577 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd                579 drivers/media/i2c/tda1997x.c 	v4l2_dbg(1, debug, sd, "%s\n", __func__);
sd                583 drivers/media/i2c/tda1997x.c 	tda1997x_manual_hpd(sd, HPD_LOW_BP);
sd                586 drivers/media/i2c/tda1997x.c static void tda1997x_enable_edid(struct v4l2_subdev *sd)
sd                588 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd                590 drivers/media/i2c/tda1997x.c 	v4l2_dbg(1, debug, sd, "%s\n", __func__);
sd                645 drivers/media/i2c/tda1997x.c tda1997x_configure_csc(struct v4l2_subdev *sd)
sd                647 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd                705 drivers/media/i2c/tda1997x.c 		reg = io_read(sd, REG_VDP_CTRL);
sd                707 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_VDP_CTRL, reg);
sd                709 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_VDP_MATRIX + 0, state->conv->offint1);
sd                710 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_VDP_MATRIX + 2, state->conv->offint2);
sd                711 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_VDP_MATRIX + 4, state->conv->offint3);
sd                713 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_VDP_MATRIX + 6, state->conv->p11coef);
sd                714 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_VDP_MATRIX + 8, state->conv->p12coef);
sd                715 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_VDP_MATRIX + 10, state->conv->p13coef);
sd                716 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_VDP_MATRIX + 12, state->conv->p21coef);
sd                717 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_VDP_MATRIX + 14, state->conv->p22coef);
sd                718 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_VDP_MATRIX + 16, state->conv->p23coef);
sd                719 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_VDP_MATRIX + 18, state->conv->p31coef);
sd                720 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_VDP_MATRIX + 20, state->conv->p32coef);
sd                721 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_VDP_MATRIX + 22, state->conv->p33coef);
sd                723 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_VDP_MATRIX + 24, state->conv->offout1);
sd                724 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_VDP_MATRIX + 26, state->conv->offout2);
sd                725 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_VDP_MATRIX + 28, state->conv->offout3);
sd                728 drivers/media/i2c/tda1997x.c 		reg = io_read(sd, REG_VDP_CTRL);
sd                730 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_VDP_CTRL, reg);
sd                735 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_BLK_GY, blanking_codes->code_gy);
sd                736 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_BLK_BU, blanking_codes->code_bu);
sd                737 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_BLK_RV, blanking_codes->code_rv);
sd                743 drivers/media/i2c/tda1997x.c tda1997x_configure_vhref(struct v4l2_subdev *sd)
sd                745 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd                782 drivers/media/i2c/tda1997x.c 	io_write16(sd, REG_FDW_S, 0x2ef); /* start position */
sd                783 drivers/media/i2c/tda1997x.c 	io_write16(sd, REG_FDW_E, 0x141); /* end position */
sd                787 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_PXCNT_PR, 4);
sd                789 drivers/media/i2c/tda1997x.c 		io_write16(sd, REG_PXCNT_PR, 1);
sd                790 drivers/media/i2c/tda1997x.c 	io_write16(sd, REG_PXCNT_NPIX, width & MASK_VHREF);
sd                791 drivers/media/i2c/tda1997x.c 	io_write16(sd, REG_LCNT_PR, 1);
sd                792 drivers/media/i2c/tda1997x.c 	io_write16(sd, REG_LCNT_NLIN, lines & MASK_VHREF);
sd                800 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_VHREF_CTRL, reg);
sd                809 drivers/media/i2c/tda1997x.c 	io_write16(sd, REG_HREF_S, href_start & MASK_VHREF);
sd                810 drivers/media/i2c/tda1997x.c 	io_write16(sd, REG_HREF_E, href_end & MASK_VHREF);
sd                812 drivers/media/i2c/tda1997x.c 	io_write16(sd, REG_VREF_F1_S, vref_f1_start & MASK_VHREF);
sd                813 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_VREF_F1_WIDTH, vref_f1_width);
sd                815 drivers/media/i2c/tda1997x.c 	io_write16(sd, REG_VREF_F2_S, vref_f2_start & MASK_VHREF);
sd                816 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_VREF_F2_WIDTH, vref_f2_width);
sd                821 drivers/media/i2c/tda1997x.c 	io_write16(sd, REG_FREF_F1_S, reg);
sd                823 drivers/media/i2c/tda1997x.c 	io_write16(sd, REG_FREF_F2_S, reg);
sd                830 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = &state->sd;
sd                840 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_PCLK, reg);
sd                851 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_FILTERS_CTRL, prefilter);
sd                858 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_OF, reg);
sd                861 drivers/media/i2c/tda1997x.c 	reg = io_read(sd, REG_VDP_CTRL);
sd                876 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_VDP_CTRL, reg);
sd                882 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_DE_FREF, reg);
sd                891 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_HS_HREF, reg);
sd                900 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_VS_VREF, reg);
sd                907 drivers/media/i2c/tda1997x.c tda1997x_configure_audout(struct v4l2_subdev *sd, u8 channel_assignment)
sd                909 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd                918 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_AUDIO_PATH, channel_assignment);
sd                965 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_AUDCFG, reg);
sd                973 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_AUDIO_LAYOUT, reg);
sd                976 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_FIFO_LATENCY_VAL, 0x80);
sd               1008 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_AUDIO_OUT_ENABLE, reg);
sd               1011 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_TEST_MODE, 0x00);
sd               1018 drivers/media/i2c/tda1997x.c tda1997x_hdmi_info_reset(struct v4l2_subdev *sd, u8 info_rst, bool reset_sus)
sd               1023 drivers/media/i2c/tda1997x.c 	reg = io_read(sd, REG_HDMI_INFO_RST);
sd               1024 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_HDMI_INFO_RST, info_rst);
sd               1028 drivers/media/i2c/tda1997x.c 		reg = io_read(sd, REG_INT_FLG_CLR_MODE);
sd               1029 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_INT_FLG_CLR_MODE, reg);
sd               1033 drivers/media/i2c/tda1997x.c 	reg = io_read(sd, REG_RATE_CTRL);
sd               1037 drivers/media/i2c/tda1997x.c 	reg = io_write(sd, REG_RATE_CTRL, reg);
sd               1045 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = &state->sd;
sd               1050 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_PON_OVR_EN, PON_DIS);
sd               1052 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_CFG1, PON_EN);
sd               1054 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_DEEP_PLL7_BYP, PON_DIS);
sd               1056 drivers/media/i2c/tda1997x.c 		reg = io_read(sd, REG_OF);
sd               1058 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_OF, reg);
sd               1062 drivers/media/i2c/tda1997x.c 		reg = io_read(sd, REG_OF);
sd               1064 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_OF, reg);
sd               1066 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_DEEP_PLL7_BYP, PON_EN);
sd               1068 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_CFG1, PON_DIS);
sd               1070 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_PON_OVR_EN, PON_EN);
sd               1075 drivers/media/i2c/tda1997x.c tda1997x_detect_tx_5v(struct v4l2_subdev *sd)
sd               1077 drivers/media/i2c/tda1997x.c 	u8 reg = io_read(sd, REG_DETECT_5V);
sd               1083 drivers/media/i2c/tda1997x.c tda1997x_detect_tx_hpd(struct v4l2_subdev *sd)
sd               1085 drivers/media/i2c/tda1997x.c 	u8 reg = io_read(sd, REG_DETECT_5V);
sd               1094 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = &state->sd;
sd               1106 drivers/media/i2c/tda1997x.c 	vper = io_read24(sd, REG_V_PER) & MASK_VPER;
sd               1107 drivers/media/i2c/tda1997x.c 	hper = io_read16(sd, REG_H_PER) & MASK_HPER;
sd               1108 drivers/media/i2c/tda1997x.c 	hsper = io_read16(sd, REG_HS_WIDTH) & MASK_HSWIDTH;
sd               1109 drivers/media/i2c/tda1997x.c 	v4l2_dbg(1, debug, sd, "Signal Timings: %u/%u/%u\n", vper, hper, hsper);
sd               1143 drivers/media/i2c/tda1997x.c 			v4l2_print_dv_timings(sd->name, "Detected format: ",
sd               1160 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = &state->sd;
sd               1164 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_CLK_CFG, CLK_CFG_SEL_ACLK_EN | CLK_CFG_SEL_ACLK);
sd               1165 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_PON_OVR_EN, PON_EN);
sd               1166 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_PON_CBIAS, PON_EN);
sd               1167 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_PON_PLL, PON_EN);
sd               1169 drivers/media/i2c/tda1997x.c 	reg = io_read(sd, REG_MODE_REC_CFG1);
sd               1172 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_MODE_REC_CFG1, reg);
sd               1173 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_CLK_CFG, CLK_CFG_DIS);
sd               1174 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_PON_OVR_EN, PON_DIS);
sd               1175 drivers/media/i2c/tda1997x.c 	reg = io_read(sd, REG_MODE_REC_CFG1);
sd               1177 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_MODE_REC_CFG1, reg);
sd               1187 drivers/media/i2c/tda1997x.c tda1997x_read_activity_status_regs(struct v4l2_subdev *sd)
sd               1192 drivers/media/i2c/tda1997x.c 	reg = io_read(sd, REG_CLK_A_STATUS);
sd               1199 drivers/media/i2c/tda1997x.c 	reg = io_read(sd, REG_CLK_B_STATUS);
sd               1206 drivers/media/i2c/tda1997x.c 	reg = io_read(sd, REG_SUS_STATUS);
sd               1248 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = &state->sd;
sd               1255 drivers/media/i2c/tda1997x.c 	len = io_readn(sd, addr, sizeof(buffer), buffer);
sd               1317 drivers/media/i2c/tda1997x.c 			tda1997x_configure_audout(sd, state->audio_ch_alloc);
sd               1319 drivers/media/i2c/tda1997x.c 			tda1997x_hdmi_info_reset(sd, RESET_AUDIO, false);
sd               1329 drivers/media/i2c/tda1997x.c 		reg = io_read(sd, REG_PIX_REPEAT);
sd               1333 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_PIX_REPEAT, reg);
sd               1336 drivers/media/i2c/tda1997x.c 		reg = io_read(sd, REG_PIX_REPEAT);
sd               1339 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_PIX_REPEAT, reg);
sd               1342 drivers/media/i2c/tda1997x.c 		tda1997x_configure_csc(sd);
sd               1352 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = &state->sd;
sd               1355 drivers/media/i2c/tda1997x.c 	source = io_read(sd, REG_INT_FLG_CLR_SUS);
sd               1356 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_FLG_CLR_SUS, source);
sd               1366 drivers/media/i2c/tda1997x.c 		reg = io_read(sd, REG_HDMI_INFO_RST);
sd               1368 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_HDMI_INFO_RST, reg);
sd               1370 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_HDMI_INFO_RST, reg);
sd               1377 drivers/media/i2c/tda1997x.c 	reg = io_read(sd, REG_SUS_STATUS);
sd               1384 drivers/media/i2c/tda1997x.c 		reg = io_read(sd, REG_SUS_STATUS);
sd               1392 drivers/media/i2c/tda1997x.c 		v4l2_subdev_notify_event(&state->sd, &tda1997x_ev_fmt);
sd               1398 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = &state->sd;
sd               1401 drivers/media/i2c/tda1997x.c 	source = io_read(sd, REG_INT_FLG_CLR_DDC);
sd               1402 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_FLG_CLR_DDC, source);
sd               1412 drivers/media/i2c/tda1997x.c 				 tda1997x_detect_tx_5v(sd));
sd               1418 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = &state->sd;
sd               1423 drivers/media/i2c/tda1997x.c 	source = io_read(sd, REG_INT_FLG_CLR_RATE);
sd               1424 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_FLG_CLR_RATE, source);
sd               1427 drivers/media/i2c/tda1997x.c 	irq_status = tda1997x_read_activity_status_regs(sd);
sd               1435 drivers/media/i2c/tda1997x.c 		irq_status = tda1997x_read_activity_status_regs(sd);
sd               1436 drivers/media/i2c/tda1997x.c 		reg = io_read(sd, REG_INT_FLG_CLR_RATE);
sd               1437 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_INT_FLG_CLR_RATE, reg);
sd               1455 drivers/media/i2c/tda1997x.c 				reg = io_read(sd, REG_PIX_REPEAT);
sd               1458 drivers/media/i2c/tda1997x.c 				io_write(sd, REG_PIX_REPEAT, reg);
sd               1464 drivers/media/i2c/tda1997x.c 				v4l2_subdev_notify_event(sd, &tda1997x_ev_fmt);
sd               1483 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = &state->sd;
sd               1486 drivers/media/i2c/tda1997x.c 	source = io_read(sd, REG_INT_FLG_CLR_INFO);
sd               1487 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_FLG_CLR_INFO, source);
sd               1510 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = &state->sd;
sd               1513 drivers/media/i2c/tda1997x.c 	source = io_read(sd, REG_INT_FLG_CLR_AUDIO);
sd               1514 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_FLG_CLR_AUDIO, source);
sd               1520 drivers/media/i2c/tda1997x.c 		reg = io_read(sd, REG_SUS_STATUS);
sd               1522 drivers/media/i2c/tda1997x.c 			reg = io_read(sd, REG_HDMI_INFO_RST);
sd               1524 drivers/media/i2c/tda1997x.c 			io_write(sd, REG_HDMI_INFO_RST, reg);
sd               1526 drivers/media/i2c/tda1997x.c 			io_write(sd, REG_HDMI_INFO_RST, reg);
sd               1536 drivers/media/i2c/tda1997x.c 		reg = io_read(sd, REG_AUDIO_FREQ);
sd               1542 drivers/media/i2c/tda1997x.c 		reg = io_read(sd, REG_AUDIO_FLAGS);
sd               1558 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = &state->sd;
sd               1561 drivers/media/i2c/tda1997x.c 	source = io_read(sd, REG_INT_FLG_CLR_HDCP);
sd               1562 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_FLG_CLR_HDCP, source);
sd               1569 drivers/media/i2c/tda1997x.c 		reg = io_read(sd, REG_INT_MASK_TOP);
sd               1571 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_INT_MASK_TOP, reg);
sd               1579 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = &state->sd;
sd               1585 drivers/media/i2c/tda1997x.c 		flags = io_read(sd, REG_INT_FLG_CLR_TOP);
sd               1620 drivers/media/i2c/tda1997x.c tda1997x_g_input_status(struct v4l2_subdev *sd, u32 *status)
sd               1622 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               1628 drivers/media/i2c/tda1997x.c 	vper = io_read24(sd, REG_V_PER) & MASK_VPER;
sd               1629 drivers/media/i2c/tda1997x.c 	hper = io_read16(sd, REG_H_PER) & MASK_HPER;
sd               1630 drivers/media/i2c/tda1997x.c 	hsper = io_read16(sd, REG_HS_WIDTH) & MASK_HSWIDTH;
sd               1642 drivers/media/i2c/tda1997x.c 	v4l2_dbg(1, debug, sd, "inputs:%d/%d timings:%d/%d/%d\n",
sd               1656 drivers/media/i2c/tda1997x.c static int tda1997x_s_dv_timings(struct v4l2_subdev *sd,
sd               1659 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               1673 drivers/media/i2c/tda1997x.c 	tda1997x_configure_vhref(sd);
sd               1675 drivers/media/i2c/tda1997x.c 	tda1997x_configure_csc(sd);
sd               1681 drivers/media/i2c/tda1997x.c static int tda1997x_g_dv_timings(struct v4l2_subdev *sd,
sd               1684 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               1694 drivers/media/i2c/tda1997x.c static int tda1997x_query_dv_timings(struct v4l2_subdev *sd,
sd               1697 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               1720 drivers/media/i2c/tda1997x.c static int tda1997x_init_cfg(struct v4l2_subdev *sd,
sd               1723 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               1726 drivers/media/i2c/tda1997x.c 	mf = v4l2_subdev_get_try_format(sd, cfg, 0);
sd               1732 drivers/media/i2c/tda1997x.c static int tda1997x_enum_mbus_code(struct v4l2_subdev *sd,
sd               1736 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               1764 drivers/media/i2c/tda1997x.c static int tda1997x_get_format(struct v4l2_subdev *sd,
sd               1768 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               1778 drivers/media/i2c/tda1997x.c 		fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
sd               1786 drivers/media/i2c/tda1997x.c static int tda1997x_set_format(struct v4l2_subdev *sd,
sd               1790 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               1812 drivers/media/i2c/tda1997x.c 		fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
sd               1820 drivers/media/i2c/tda1997x.c 		tda1997x_configure_csc(sd);
sd               1827 drivers/media/i2c/tda1997x.c static int tda1997x_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
sd               1829 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               1854 drivers/media/i2c/tda1997x.c static int tda1997x_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
sd               1856 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               1868 drivers/media/i2c/tda1997x.c 		tda1997x_disable_edid(sd);
sd               1877 drivers/media/i2c/tda1997x.c 	tda1997x_disable_edid(sd);
sd               1881 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_EDID_IN_BYTE0 + i, edid->edid[i]);
sd               1885 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_EDID_IN_BYTE128 + i, edid->edid[i+128]);
sd               1891 drivers/media/i2c/tda1997x.c 	tda1997x_enable_edid(sd);
sd               1896 drivers/media/i2c/tda1997x.c static int tda1997x_get_dv_timings_cap(struct v4l2_subdev *sd,
sd               1903 drivers/media/i2c/tda1997x.c static int tda1997x_enum_dv_timings(struct v4l2_subdev *sd,
sd               1925 drivers/media/i2c/tda1997x.c static int tda1997x_log_infoframe(struct v4l2_subdev *sd, int addr)
sd               1927 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               1933 drivers/media/i2c/tda1997x.c 	len = io_readn(sd, addr, sizeof(buffer), buffer);
sd               1934 drivers/media/i2c/tda1997x.c 	v4l2_dbg(1, debug, sd, "infoframe: addr=%d len=%d\n", addr, len);
sd               1947 drivers/media/i2c/tda1997x.c static int tda1997x_log_status(struct v4l2_subdev *sd)
sd               1949 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               1953 drivers/media/i2c/tda1997x.c 	v4l2_info(sd, "-----Chip status-----\n");
sd               1954 drivers/media/i2c/tda1997x.c 	v4l2_info(sd, "Chip: %s N%d\n", state->info->name,
sd               1956 drivers/media/i2c/tda1997x.c 	v4l2_info(sd, "EDID Enabled: %s\n", state->edid.present ? "yes" : "no");
sd               1958 drivers/media/i2c/tda1997x.c 	v4l2_info(sd, "-----Signal status-----\n");
sd               1959 drivers/media/i2c/tda1997x.c 	v4l2_info(sd, "Cable detected (+5V power): %s\n",
sd               1960 drivers/media/i2c/tda1997x.c 		  tda1997x_detect_tx_5v(sd) ? "yes" : "no");
sd               1961 drivers/media/i2c/tda1997x.c 	v4l2_info(sd, "HPD detected: %s\n",
sd               1962 drivers/media/i2c/tda1997x.c 		  tda1997x_detect_tx_hpd(sd) ? "yes" : "no");
sd               1964 drivers/media/i2c/tda1997x.c 	v4l2_info(sd, "-----Video Timings-----\n");
sd               1967 drivers/media/i2c/tda1997x.c 		v4l2_info(sd, "No video detected\n");
sd               1970 drivers/media/i2c/tda1997x.c 		v4l2_info(sd, "Invalid signal detected\n");
sd               1973 drivers/media/i2c/tda1997x.c 	v4l2_print_dv_timings(sd->name, "Configured format: ",
sd               1976 drivers/media/i2c/tda1997x.c 	v4l2_info(sd, "-----Color space-----\n");
sd               1977 drivers/media/i2c/tda1997x.c 	v4l2_info(sd, "Input color space: %s %s %s",
sd               1982 drivers/media/i2c/tda1997x.c 	v4l2_info(sd, "Output color space: %s",
sd               1984 drivers/media/i2c/tda1997x.c 	v4l2_info(sd, "Color space conversion: %s", state->conv ?
sd               1987 drivers/media/i2c/tda1997x.c 	v4l2_info(sd, "-----Audio-----\n");
sd               1989 drivers/media/i2c/tda1997x.c 		v4l2_info(sd, "audio: %dch %dHz\n", state->audio_channels,
sd               1992 drivers/media/i2c/tda1997x.c 		v4l2_info(sd, "audio: none\n");
sd               1995 drivers/media/i2c/tda1997x.c 	v4l2_info(sd, "-----Infoframes-----\n");
sd               1996 drivers/media/i2c/tda1997x.c 	tda1997x_log_infoframe(sd, AUD_IF);
sd               1997 drivers/media/i2c/tda1997x.c 	tda1997x_log_infoframe(sd, SPD_IF);
sd               1998 drivers/media/i2c/tda1997x.c 	tda1997x_log_infoframe(sd, AVI_IF);
sd               2003 drivers/media/i2c/tda1997x.c static int tda1997x_subscribe_event(struct v4l2_subdev *sd,
sd               2009 drivers/media/i2c/tda1997x.c 		return v4l2_src_change_event_subdev_subscribe(sd, fh, sub);
sd               2011 drivers/media/i2c/tda1997x.c 		return v4l2_ctrl_subdev_subscribe_event(sd, fh, sub);
sd               2039 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd               2040 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               2047 drivers/media/i2c/tda1997x.c 		tda1997x_configure_csc(sd);
sd               2056 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd               2057 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               2071 drivers/media/i2c/tda1997x.c static int tda1997x_core_init(struct v4l2_subdev *sd)
sd               2073 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               2079 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_HPD_AUTO_CTRL, HPD_AUTO_HPD_UNSEL);
sd               2081 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_MAN_SUS_HDMI_SEL, MAN_DIS_HDCP | MAN_RST_HDCP);
sd               2082 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_CGU_DBG_SEL, 1 << CGU_DBG_CLK_SEL_SHIFT);
sd               2086 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_SUS_SET_RGB2, 0x06);
sd               2087 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_SUS_SET_RGB3, 0x06);
sd               2090 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_RT_MAN_CTRL, RT_MAN_CTRL_RT |
sd               2094 drivers/media/i2c/tda1997x.c 	tda1997x_cec_write(sd, REG_PWR_CONTROL & 0xff, 0x04);
sd               2096 drivers/media/i2c/tda1997x.c 	tda1997x_cec_write(sd, REG_OSC_DIVIDER & 0xff, 0x03);
sd               2097 drivers/media/i2c/tda1997x.c 	tda1997x_cec_write(sd, REG_EN_OSC_PERIOD_LSB & 0xff, 0xa0);
sd               2098 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_TIMER_D, 0x54);
sd               2100 drivers/media/i2c/tda1997x.c 	reg = tda1997x_cec_read(sd, REG_CONTROL & 0xff);
sd               2102 drivers/media/i2c/tda1997x.c 	tda1997x_cec_write(sd, REG_CONTROL & 0xff, reg);
sd               2106 drivers/media/i2c/tda1997x.c 	reg = io_read(sd, REG_VERSION);
sd               2108 drivers/media/i2c/tda1997x.c 	reg = io_read(sd, REG_CMTP_REG10);
sd               2111 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_MASK_TOP,
sd               2115 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_MASK_SUS, MASK_MPT | MASK_FMT | MASK_SUS_END);
sd               2117 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_MASK_RATE, MASK_RATE_B_ST | MASK_RATE_A_ST);
sd               2119 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_MASK_INFO,
sd               2122 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_MASK_AUDIO,
sd               2126 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_MASK_HDCP, MASK_STATE_C5);
sd               2128 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_MASK_DDC, MASK_DET_5V);
sd               2130 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_MASK_AFE, 0);
sd               2131 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_MASK_MODE, 0);
sd               2134 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_FLG_CLR_TOP, 0xff);
sd               2135 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_FLG_CLR_SUS, 0xff);
sd               2136 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_FLG_CLR_DDC, 0xff);
sd               2137 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_FLG_CLR_RATE, 0xff);
sd               2138 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_FLG_CLR_MODE, 0xff);
sd               2139 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_FLG_CLR_INFO, 0xff);
sd               2140 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_FLG_CLR_AUDIO, 0xff);
sd               2141 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_FLG_CLR_HDCP, 0xff);
sd               2142 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INT_FLG_CLR_AFE, 0xff);
sd               2146 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_CGU_DBG_SEL, 1 << CGU_DBG_CLK_SEL_SHIFT);
sd               2147 drivers/media/i2c/tda1997x.c 	io_write24(sd, REG_CLK_MIN_RATE, CLK_MIN_RATE);
sd               2148 drivers/media/i2c/tda1997x.c 	io_write24(sd, REG_CLK_MAX_RATE, CLK_MAX_RATE);
sd               2150 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_WDL_CFG, WDL_CFG_VAL);
sd               2152 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_DEEP_COLOR_CTRL, DC_FILTER_VAL);
sd               2154 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_SVC_MODE, 0x00);
sd               2156 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INFO_CTRL, 0xff);
sd               2158 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_INFO_EXCEED, 3);
sd               2167 drivers/media/i2c/tda1997x.c 	tda1997x_hdmi_info_reset(sd, NACK_HDCP, true);
sd               2170 drivers/media/i2c/tda1997x.c 	tda1997x_manual_hpd(sd, HPD_LOW_BP);
sd               2173 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_HDCP_BCAPS, HDCP_HDMI | HDCP_FAST_REAUTH);
sd               2178 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_HDMI_CTRL, reg);
sd               2181 drivers/media/i2c/tda1997x.c 	tda1997x_hdmi_info_reset(sd, 0, true);
sd               2184 drivers/media/i2c/tda1997x.c 	reg = io_read(sd, REG_VDP_CTRL);
sd               2186 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_VDP_CTRL, reg);
sd               2195 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_VP35_32_CTRL + i, pdata->vidout_port_cfg[i]);
sd               2199 drivers/media/i2c/tda1997x.c 	tda1997x_configure_audout(sd, 0);
sd               2222 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_AUDIO_CLOCK, reg);
sd               2225 drivers/media/i2c/tda1997x.c 	tda1997x_hdmi_info_reset(sd, RESET_AI, false);
sd               2227 drivers/media/i2c/tda1997x.c 	tda1997x_hdmi_info_reset(sd, RESET_IF, false);
sd               2229 drivers/media/i2c/tda1997x.c 	tda1997x_hdmi_info_reset(sd, RESET_AUDIO, false);
sd               2231 drivers/media/i2c/tda1997x.c 	tda1997x_hdmi_info_reset(sd, RESET_GAMUT, false);
sd               2234 drivers/media/i2c/tda1997x.c 	state->hdmi_status = io_read(sd, REG_HDMI_FLAGS);
sd               2404 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = &state->sd;
sd               2409 drivers/media/i2c/tda1997x.c 	reg = io_read(sd, REG_CMTP_REG10);
sd               2432 drivers/media/i2c/tda1997x.c 	state->chip_revision = io_read(sd, REG_CMTP_REG11);
sd               2509 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd;
sd               2571 drivers/media/i2c/tda1997x.c 	sd = &state->sd;
sd               2572 drivers/media/i2c/tda1997x.c 	v4l2_i2c_subdev_init(sd, client, &tda1997x_subdev_ops);
sd               2573 drivers/media/i2c/tda1997x.c 	snprintf(sd->name, sizeof(sd->name), "%s %d-%04x",
sd               2576 drivers/media/i2c/tda1997x.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
sd               2577 drivers/media/i2c/tda1997x.c 	sd->entity.function = MEDIA_ENT_F_DV_DECODER;
sd               2578 drivers/media/i2c/tda1997x.c 	sd->entity.ops = &tda1997x_media_ops;
sd               2667 drivers/media/i2c/tda1997x.c 	io_write(sd, REG_MAN_SUS_HDMI_SEL, MAN_RST_HDCP | MAN_DIS_HDCP);
sd               2674 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_MAN_SUS_HDMI_SEL, 0x00);
sd               2675 drivers/media/i2c/tda1997x.c 		io_write(sd, REG_VDP_CTRL, 0x1f);
sd               2693 drivers/media/i2c/tda1997x.c 	ret = 0x34 + ((io_read(sd, REG_SLAVE_ADDR)>>4) & 0x03);
sd               2703 drivers/media/i2c/tda1997x.c 	ret = tda1997x_core_init(sd);
sd               2723 drivers/media/i2c/tda1997x.c 	state->sd.ctrl_handler = hdl;
sd               2732 drivers/media/i2c/tda1997x.c 	ret = media_entity_pads_init(&sd->entity, TDA1997X_NUM_PADS,
sd               2739 drivers/media/i2c/tda1997x.c 	ret = v4l2_async_register_subdev(sd);
sd               2776 drivers/media/i2c/tda1997x.c 	media_entity_cleanup(&sd->entity);
sd               2792 drivers/media/i2c/tda1997x.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               2793 drivers/media/i2c/tda1997x.c 	struct tda1997x_state *state = to_state(sd);
sd               2803 drivers/media/i2c/tda1997x.c 	v4l2_async_unregister_subdev(sd);
sd               2804 drivers/media/i2c/tda1997x.c 	media_entity_cleanup(&sd->entity);
sd                 63 drivers/media/i2c/tda7432.c 	struct v4l2_subdev sd;
sd                 77 drivers/media/i2c/tda7432.c static inline struct tda7432 *to_state(struct v4l2_subdev *sd)
sd                 79 drivers/media/i2c/tda7432.c 	return container_of(sd, struct tda7432, sd);
sd                 84 drivers/media/i2c/tda7432.c 	return &container_of(ctrl->handler, struct tda7432, hdl)->sd;
sd                220 drivers/media/i2c/tda7432.c static int tda7432_write(struct v4l2_subdev *sd, int subaddr, int val)
sd                222 drivers/media/i2c/tda7432.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                225 drivers/media/i2c/tda7432.c 	v4l2_dbg(2, debug, sd, "In tda7432_write\n");
sd                226 drivers/media/i2c/tda7432.c 	v4l2_dbg(1, debug, sd, "Writing %d 0x%x\n", subaddr, val);
sd                230 drivers/media/i2c/tda7432.c 		v4l2_err(sd, "I/O error, trying (write %d 0x%x)\n",
sd                237 drivers/media/i2c/tda7432.c static int tda7432_set(struct v4l2_subdev *sd)
sd                239 drivers/media/i2c/tda7432.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                256 drivers/media/i2c/tda7432.c 		v4l2_err(sd, "I/O error, trying tda7432_set\n");
sd                263 drivers/media/i2c/tda7432.c static int tda7432_log_status(struct v4l2_subdev *sd)
sd                265 drivers/media/i2c/tda7432.c 	struct tda7432 *state = to_state(sd);
sd                267 drivers/media/i2c/tda7432.c 	v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
sd                273 drivers/media/i2c/tda7432.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                274 drivers/media/i2c/tda7432.c 	struct tda7432 *t = to_state(sd);
sd                300 drivers/media/i2c/tda7432.c 		tda7432_write(sd, TDA7432_LF, lf);
sd                301 drivers/media/i2c/tda7432.c 		tda7432_write(sd, TDA7432_LR, lr);
sd                302 drivers/media/i2c/tda7432.c 		tda7432_write(sd, TDA7432_RF, rf);
sd                303 drivers/media/i2c/tda7432.c 		tda7432_write(sd, TDA7432_RR, rr);
sd                310 drivers/media/i2c/tda7432.c 		tda7432_write(sd, TDA7432_VL, volume);
sd                320 drivers/media/i2c/tda7432.c 		tda7432_write(sd, TDA7432_TN, 0x10 | (bass << 4) | treble);
sd                350 drivers/media/i2c/tda7432.c 	struct v4l2_subdev *sd;
sd                358 drivers/media/i2c/tda7432.c 	sd = &t->sd;
sd                359 drivers/media/i2c/tda7432.c 	v4l2_i2c_subdev_init(sd, client, &tda7432_ops);
sd                371 drivers/media/i2c/tda7432.c 	sd->ctrl_handler = &t->hdl;
sd                382 drivers/media/i2c/tda7432.c 		v4l2_warn(sd, "loudness parameter must be between 0 and 15\n");
sd                389 drivers/media/i2c/tda7432.c 	tda7432_set(sd);
sd                395 drivers/media/i2c/tda7432.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                396 drivers/media/i2c/tda7432.c 	struct tda7432 *t = to_state(sd);
sd                398 drivers/media/i2c/tda7432.c 	tda7432_set(sd);
sd                399 drivers/media/i2c/tda7432.c 	v4l2_device_unregister_subdev(sd);
sd                 47 drivers/media/i2c/tda9840.c static void tda9840_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                 49 drivers/media/i2c/tda9840.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 52 drivers/media/i2c/tda9840.c 		v4l2_dbg(1, debug, sd, "error writing %02x to %02x\n",
sd                 56 drivers/media/i2c/tda9840.c static int tda9840_status(struct v4l2_subdev *sd)
sd                 58 drivers/media/i2c/tda9840.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 64 drivers/media/i2c/tda9840.c 		v4l2_dbg(1, debug, sd,
sd                 72 drivers/media/i2c/tda9840.c 		v4l2_dbg(1, debug, sd,
sd                 77 drivers/media/i2c/tda9840.c 	v4l2_dbg(1, debug, sd, "TDA9840_DETECT: byte: 0x%02x\n", byte);
sd                 81 drivers/media/i2c/tda9840.c static int tda9840_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *t)
sd                 83 drivers/media/i2c/tda9840.c 	int stat = tda9840_status(sd);
sd                108 drivers/media/i2c/tda9840.c 	v4l2_dbg(1, debug, sd, "TDA9840_SWITCH: 0x%02x\n", byte);
sd                109 drivers/media/i2c/tda9840.c 	tda9840_write(sd, SWITCH, byte);
sd                113 drivers/media/i2c/tda9840.c static int tda9840_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *t)
sd                115 drivers/media/i2c/tda9840.c 	int stat = tda9840_status(sd);
sd                155 drivers/media/i2c/tda9840.c 	struct v4l2_subdev *sd;
sd                166 drivers/media/i2c/tda9840.c 	sd = devm_kzalloc(&client->dev, sizeof(*sd), GFP_KERNEL);
sd                167 drivers/media/i2c/tda9840.c 	if (sd == NULL)
sd                169 drivers/media/i2c/tda9840.c 	v4l2_i2c_subdev_init(sd, client, &tda9840_ops);
sd                172 drivers/media/i2c/tda9840.c 	tda9840_write(sd, LEVEL_ADJUST, 0);
sd                173 drivers/media/i2c/tda9840.c 	tda9840_write(sd, STEREO_ADJUST, 0);
sd                174 drivers/media/i2c/tda9840.c 	tda9840_write(sd, SWITCH, TDA9840_SET_STEREO);
sd                180 drivers/media/i2c/tda9840.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                182 drivers/media/i2c/tda9840.c 	v4l2_device_unregister_subdev(sd);
sd                 37 drivers/media/i2c/tea6415c.c static int tea6415c_s_routing(struct v4l2_subdev *sd,
sd                 40 drivers/media/i2c/tea6415c.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 44 drivers/media/i2c/tea6415c.c 	v4l2_dbg(1, debug, sd, "i=%d, o=%d\n", i, o);
sd                102 drivers/media/i2c/tea6415c.c 		v4l2_dbg(1, debug, sd,
sd                122 drivers/media/i2c/tea6415c.c 	struct v4l2_subdev *sd;
sd                130 drivers/media/i2c/tea6415c.c 	sd = devm_kzalloc(&client->dev, sizeof(*sd), GFP_KERNEL);
sd                131 drivers/media/i2c/tea6415c.c 	if (sd == NULL)
sd                133 drivers/media/i2c/tea6415c.c 	v4l2_i2c_subdev_init(sd, client, &tea6415c_ops);
sd                139 drivers/media/i2c/tea6415c.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                141 drivers/media/i2c/tea6415c.c 	v4l2_device_unregister_subdev(sd);
sd                 38 drivers/media/i2c/tea6420.c static int tea6420_s_routing(struct v4l2_subdev *sd,
sd                 41 drivers/media/i2c/tea6420.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 47 drivers/media/i2c/tea6420.c 	v4l2_dbg(1, debug, sd, "i=%d, o=%d, g=%d\n", i, o, g);
sd                 73 drivers/media/i2c/tea6420.c 		v4l2_dbg(1, debug, sd,
sd                 93 drivers/media/i2c/tea6420.c 	struct v4l2_subdev *sd;
sd                103 drivers/media/i2c/tea6420.c 	sd = devm_kzalloc(&client->dev, sizeof(*sd), GFP_KERNEL);
sd                104 drivers/media/i2c/tea6420.c 	if (sd == NULL)
sd                106 drivers/media/i2c/tea6420.c 	v4l2_i2c_subdev_init(sd, client, &tea6420_ops);
sd                111 drivers/media/i2c/tea6420.c 		err += tea6420_s_routing(sd, 6, i, 0);
sd                121 drivers/media/i2c/tea6420.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                123 drivers/media/i2c/tea6420.c 	v4l2_device_unregister_subdev(sd);
sd                 36 drivers/media/i2c/ths7303.c 	struct v4l2_subdev		sd;
sd                 55 drivers/media/i2c/ths7303.c static inline struct ths7303_state *to_state(struct v4l2_subdev *sd)
sd                 57 drivers/media/i2c/ths7303.c 	return container_of(sd, struct ths7303_state, sd);
sd                 60 drivers/media/i2c/ths7303.c static int ths7303_read(struct v4l2_subdev *sd, u8 reg)
sd                 62 drivers/media/i2c/ths7303.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 67 drivers/media/i2c/ths7303.c static int ths7303_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                 69 drivers/media/i2c/ths7303.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 82 drivers/media/i2c/ths7303.c static int ths7303_setval(struct v4l2_subdev *sd,
sd                 85 drivers/media/i2c/ths7303.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 86 drivers/media/i2c/ths7303.c 	struct ths7303_state *state = to_state(sd);
sd                115 drivers/media/i2c/ths7303.c 	err = ths7303_write(sd, THS7303_CHANNEL_1, val);
sd                122 drivers/media/i2c/ths7303.c 	err = ths7303_write(sd, THS7303_CHANNEL_2, val);
sd                129 drivers/media/i2c/ths7303.c 	err = ths7303_write(sd, THS7303_CHANNEL_3, val);
sd                139 drivers/media/i2c/ths7303.c static int ths7303_s_std_output(struct v4l2_subdev *sd, v4l2_std_id norm)
sd                141 drivers/media/i2c/ths7303.c 	struct ths7303_state *state = to_state(sd);
sd                146 drivers/media/i2c/ths7303.c 		return ths7303_setval(sd, THS7303_FILTER_MODE_480I_576I);
sd                149 drivers/media/i2c/ths7303.c 	return ths7303_setval(sd, THS7303_FILTER_MODE_DISABLE);
sd                152 drivers/media/i2c/ths7303.c static int ths7303_config(struct v4l2_subdev *sd)
sd                154 drivers/media/i2c/ths7303.c 	struct ths7303_state *state = to_state(sd);
sd                158 drivers/media/i2c/ths7303.c 		ths7303_write(sd, THS7303_CHANNEL_1,
sd                159 drivers/media/i2c/ths7303.c 			      (ths7303_read(sd, THS7303_CHANNEL_1) & 0xf8) |
sd                161 drivers/media/i2c/ths7303.c 		ths7303_write(sd, THS7303_CHANNEL_2,
sd                162 drivers/media/i2c/ths7303.c 			      (ths7303_read(sd, THS7303_CHANNEL_2) & 0xf8) |
sd                164 drivers/media/i2c/ths7303.c 		ths7303_write(sd, THS7303_CHANNEL_3,
sd                165 drivers/media/i2c/ths7303.c 			      (ths7303_read(sd, THS7303_CHANNEL_3) & 0xf8) |
sd                171 drivers/media/i2c/ths7303.c 		res = ths7303_setval(sd, THS7303_FILTER_MODE_1080P);
sd                173 drivers/media/i2c/ths7303.c 		res = ths7303_setval(sd, THS7303_FILTER_MODE_720P_1080I);
sd                175 drivers/media/i2c/ths7303.c 		res = ths7303_setval(sd, THS7303_FILTER_MODE_480P_576P);
sd                177 drivers/media/i2c/ths7303.c 		res = ths7303_setval(sd, THS7303_FILTER_MODE_480I_576I);
sd                180 drivers/media/i2c/ths7303.c 		res = ths7303_setval(sd, THS7303_FILTER_MODE_DISABLE);
sd                186 drivers/media/i2c/ths7303.c static int ths7303_s_stream(struct v4l2_subdev *sd, int enable)
sd                188 drivers/media/i2c/ths7303.c 	struct ths7303_state *state = to_state(sd);
sd                192 drivers/media/i2c/ths7303.c 	return ths7303_config(sd);
sd                196 drivers/media/i2c/ths7303.c static int ths7303_s_dv_timings(struct v4l2_subdev *sd,
sd                199 drivers/media/i2c/ths7303.c 	struct ths7303_state *state = to_state(sd);
sd                207 drivers/media/i2c/ths7303.c 	return ths7303_config(sd);
sd                218 drivers/media/i2c/ths7303.c static int ths7303_g_register(struct v4l2_subdev *sd,
sd                222 drivers/media/i2c/ths7303.c 	reg->val = ths7303_read(sd, reg->reg);
sd                226 drivers/media/i2c/ths7303.c static int ths7303_s_register(struct v4l2_subdev *sd,
sd                229 drivers/media/i2c/ths7303.c 	ths7303_write(sd, reg->reg, reg->val);
sd                264 drivers/media/i2c/ths7303.c static void ths7303_log_channel_status(struct v4l2_subdev *sd, u8 reg)
sd                266 drivers/media/i2c/ths7303.c 	u8 val = ths7303_read(sd, reg);
sd                269 drivers/media/i2c/ths7303.c 		v4l2_info(sd, "Channel %d Off\n", reg);
sd                273 drivers/media/i2c/ths7303.c 	v4l2_info(sd, "Channel %d On\n", reg);
sd                274 drivers/media/i2c/ths7303.c 	v4l2_info(sd, "  value 0x%x\n", val);
sd                275 drivers/media/i2c/ths7303.c 	v4l2_info(sd, "  %s\n", stc_lpf_sel_txt[(val >> 6) & 0x3]);
sd                276 drivers/media/i2c/ths7303.c 	v4l2_info(sd, "  %s\n", in_mux_sel_txt[(val >> 5) & 0x1]);
sd                277 drivers/media/i2c/ths7303.c 	v4l2_info(sd, "  %s\n", lpf_freq_sel_txt[(val >> 3) & 0x3]);
sd                278 drivers/media/i2c/ths7303.c 	v4l2_info(sd, "  %s\n", in_bias_sel_dis_cont_txt[(val >> 0) & 0x7]);
sd                281 drivers/media/i2c/ths7303.c static int ths7303_log_status(struct v4l2_subdev *sd)
sd                283 drivers/media/i2c/ths7303.c 	struct ths7303_state *state = to_state(sd);
sd                285 drivers/media/i2c/ths7303.c 	v4l2_info(sd, "stream %s\n", state->stream_on ? "On" : "Off");
sd                293 drivers/media/i2c/ths7303.c 		v4l2_info(sd,
sd                302 drivers/media/i2c/ths7303.c 		v4l2_info(sd, "no timings set\n");
sd                305 drivers/media/i2c/ths7303.c 	ths7303_log_channel_status(sd, THS7303_CHANNEL_1);
sd                306 drivers/media/i2c/ths7303.c 	ths7303_log_channel_status(sd, THS7303_CHANNEL_2);
sd                307 drivers/media/i2c/ths7303.c 	ths7303_log_channel_status(sd, THS7303_CHANNEL_3);
sd                330 drivers/media/i2c/ths7303.c 	struct v4l2_subdev *sd;
sd                349 drivers/media/i2c/ths7303.c 	sd = &state->sd;
sd                350 drivers/media/i2c/ths7303.c 	v4l2_i2c_subdev_init(sd, client, &ths7303_ops);
sd                353 drivers/media/i2c/ths7303.c 	if (ths7303_setval(sd, THS7303_FILTER_MODE_480I_576I) < 0) {
sd                363 drivers/media/i2c/ths7303.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                365 drivers/media/i2c/ths7303.c 	v4l2_device_unregister_subdev(sd);
sd                 41 drivers/media/i2c/ths8200.c 	struct v4l2_subdev sd;
sd                 56 drivers/media/i2c/ths8200.c static inline struct ths8200_state *to_state(struct v4l2_subdev *sd)
sd                 58 drivers/media/i2c/ths8200.c 	return container_of(sd, struct ths8200_state, sd);
sd                 71 drivers/media/i2c/ths8200.c static int ths8200_read(struct v4l2_subdev *sd, u8 reg)
sd                 73 drivers/media/i2c/ths8200.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 78 drivers/media/i2c/ths8200.c static int ths8200_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                 80 drivers/media/i2c/ths8200.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 89 drivers/media/i2c/ths8200.c 	v4l2_err(sd, "I2C Write Problem\n");
sd                 97 drivers/media/i2c/ths8200.c ths8200_write_and_or(struct v4l2_subdev *sd, u8 reg,
sd                100 drivers/media/i2c/ths8200.c 	ths8200_write(sd, reg, (ths8200_read(sd, reg) & clr_mask) | val_mask);
sd                105 drivers/media/i2c/ths8200.c static int ths8200_g_register(struct v4l2_subdev *sd,
sd                108 drivers/media/i2c/ths8200.c 	reg->val = ths8200_read(sd, reg->reg & 0xff);
sd                114 drivers/media/i2c/ths8200.c static int ths8200_s_register(struct v4l2_subdev *sd,
sd                117 drivers/media/i2c/ths8200.c 	ths8200_write(sd, reg->reg & 0xff, reg->val & 0xff);
sd                123 drivers/media/i2c/ths8200.c static int ths8200_log_status(struct v4l2_subdev *sd)
sd                125 drivers/media/i2c/ths8200.c 	struct ths8200_state *state = to_state(sd);
sd                126 drivers/media/i2c/ths8200.c 	uint8_t reg_03 = ths8200_read(sd, THS8200_CHIP_CTL);
sd                128 drivers/media/i2c/ths8200.c 	v4l2_info(sd, "----- Chip status -----\n");
sd                129 drivers/media/i2c/ths8200.c 	v4l2_info(sd, "version: %u\n", state->chip_version);
sd                130 drivers/media/i2c/ths8200.c 	v4l2_info(sd, "power: %s\n", (reg_03 & 0x0c) ? "off" : "on");
sd                131 drivers/media/i2c/ths8200.c 	v4l2_info(sd, "reset: %s\n", (reg_03 & 0x01) ? "off" : "on");
sd                132 drivers/media/i2c/ths8200.c 	v4l2_info(sd, "test pattern: %s\n",
sd                134 drivers/media/i2c/ths8200.c 	v4l2_info(sd, "format: %ux%u\n",
sd                135 drivers/media/i2c/ths8200.c 		  ths8200_read(sd, THS8200_DTG2_PIXEL_CNT_MSB) * 256 +
sd                136 drivers/media/i2c/ths8200.c 		  ths8200_read(sd, THS8200_DTG2_PIXEL_CNT_LSB),
sd                137 drivers/media/i2c/ths8200.c 		  (ths8200_read(sd, THS8200_DTG2_LINE_CNT_MSB) & 0x07) * 256 +
sd                138 drivers/media/i2c/ths8200.c 		  ths8200_read(sd, THS8200_DTG2_LINE_CNT_LSB));
sd                139 drivers/media/i2c/ths8200.c 	v4l2_print_dv_timings(sd->name, "Configured format:",
sd                145 drivers/media/i2c/ths8200.c static int ths8200_s_power(struct v4l2_subdev *sd, int on)
sd                147 drivers/media/i2c/ths8200.c 	struct ths8200_state *state = to_state(sd);
sd                149 drivers/media/i2c/ths8200.c 	v4l2_dbg(1, debug, sd, "%s: power %s\n", __func__, on ? "on" : "off");
sd                154 drivers/media/i2c/ths8200.c 	ths8200_write_and_or(sd, THS8200_CHIP_CTL, 0xf2, (on ? 0x00 : 0x0c));
sd                172 drivers/media/i2c/ths8200.c static int ths8200_s_stream(struct v4l2_subdev *sd, int enable)
sd                174 drivers/media/i2c/ths8200.c 	struct ths8200_state *state = to_state(sd);
sd                177 drivers/media/i2c/ths8200.c 		ths8200_s_power(sd, true);
sd                179 drivers/media/i2c/ths8200.c 	ths8200_write_and_or(sd, THS8200_CHIP_CTL, 0xfe,
sd                182 drivers/media/i2c/ths8200.c 	v4l2_dbg(1, debug, sd, "%s: %sable\n",
sd                188 drivers/media/i2c/ths8200.c static void ths8200_core_init(struct v4l2_subdev *sd)
sd                191 drivers/media/i2c/ths8200.c 	ths8200_write_and_or(sd, THS8200_CHIP_CTL, 0x3f, 0xc0);
sd                198 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DATA_CNTL, 0x70);
sd                203 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_MODE, 0x87);
sd                210 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_Y_SYNC_MSB, 0x00);
sd                211 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_CBCR_SYNC_MSB, 0x00);
sd                214 drivers/media/i2c/ths8200.c static void ths8200_setup(struct v4l2_subdev *sd, struct v4l2_bt_timings *bt)
sd                222 drivers/media/i2c/ths8200.c 	ths8200_s_stream(sd, false);
sd                225 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_SPEC_A, bt->hsync);
sd                226 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_SPEC_B, bt->hfrontporch);
sd                230 drivers/media/i2c/ths8200.c 		ths8200_write(sd, THS8200_DTG1_SPEC_C, 0x00);
sd                235 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_SPEC_D_LSB,
sd                238 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_SPEC_E_LSB, 0x00);
sd                243 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_SPEC_DEH_MSB,
sd                247 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_SPEC_K_LSB, (bt->hfrontporch) & 0xff);
sd                248 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_SPEC_K_MSB,
sd                252 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_SPEC_G_LSB, (htotal(bt)/2) & 0xff);
sd                253 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_SPEC_G_MSB,
sd                257 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_TOT_PIXELS_MSB, htotal(bt) >> 8);
sd                258 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_TOT_PIXELS_LSB, htotal(bt) & 0xff);
sd                264 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_FRAME_FIELD_SZ_MSB,
sd                266 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG1_FRAME_SZ_LSB, vtotal(bt) & 0xff);
sd                272 drivers/media/i2c/ths8200.c 		ths8200_write(sd, THS8200_DTG1_FIELD_SZ_LSB, 0xff);
sd                289 drivers/media/i2c/ths8200.c 	ths8200_write_and_or(sd, THS8200_DTG2_BP1_2_MSB, 0x88,
sd                292 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_BP3_4_MSB, ((vtotal(bt)) >> 4) & 0x70);
sd                293 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_BP1_LSB, line_start_active_video & 0xff);
sd                294 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_BP2_LSB, line_start_front_porch & 0xff);
sd                295 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_BP3_LSB, (vtotal(bt)) & 0xff);
sd                298 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_LINETYPE1, 0x90);
sd                299 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_LINETYPE2, 0x90);
sd                302 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_HLENGTH_LSB, bt->hsync & 0xff);
sd                303 drivers/media/i2c/ths8200.c 	ths8200_write_and_or(sd, THS8200_DTG2_HLENGTH_LSB_HDLY_MSB, 0x3f,
sd                307 drivers/media/i2c/ths8200.c 	ths8200_write_and_or(sd, THS8200_DTG2_HLENGTH_LSB_HDLY_MSB, 0xe0,
sd                309 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_HLENGTH_HDLY_LSB, htotal(bt));
sd                312 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_VLENGTH1_LSB, (bt->vsync + 1) & 0xff);
sd                313 drivers/media/i2c/ths8200.c 	ths8200_write_and_or(sd, THS8200_DTG2_VLENGTH1_MSB_VDLY1_MSB, 0x3f,
sd                317 drivers/media/i2c/ths8200.c 	ths8200_write_and_or(sd, THS8200_DTG2_VLENGTH1_MSB_VDLY1_MSB, 0xf8,
sd                319 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_VDLY1_LSB, vtotal(bt) + 1);
sd                324 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_VLENGTH2_LSB, 0x00);
sd                325 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_VLENGTH2_MSB_VDLY2_MSB, 0x07);
sd                326 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_VDLY2_LSB, 0xff);
sd                330 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_HS_IN_DLY_MSB, 0);
sd                331 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_HS_IN_DLY_LSB, 0);
sd                332 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_VS_IN_DLY_MSB, 0);
sd                333 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_VS_IN_DLY_LSB, 0);
sd                349 drivers/media/i2c/ths8200.c 	ths8200_write(sd, THS8200_DTG2_CNTL, 0x44 | polarity);
sd                352 drivers/media/i2c/ths8200.c 	ths8200_s_stream(sd, true);
sd                354 drivers/media/i2c/ths8200.c 	v4l2_dbg(1, debug, sd, "%s: frame %dx%d, polarity %d\n"
sd                361 drivers/media/i2c/ths8200.c static int ths8200_s_dv_timings(struct v4l2_subdev *sd,
sd                364 drivers/media/i2c/ths8200.c 	struct ths8200_state *state = to_state(sd);
sd                366 drivers/media/i2c/ths8200.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd                374 drivers/media/i2c/ths8200.c 		v4l2_dbg(1, debug, sd, "Unsupported format\n");
sd                383 drivers/media/i2c/ths8200.c 	ths8200_setup(sd, &timings->bt);
sd                388 drivers/media/i2c/ths8200.c static int ths8200_g_dv_timings(struct v4l2_subdev *sd,
sd                391 drivers/media/i2c/ths8200.c 	struct ths8200_state *state = to_state(sd);
sd                393 drivers/media/i2c/ths8200.c 	v4l2_dbg(1, debug, sd, "%s:\n", __func__);
sd                400 drivers/media/i2c/ths8200.c static int ths8200_enum_dv_timings(struct v4l2_subdev *sd,
sd                410 drivers/media/i2c/ths8200.c static int ths8200_dv_timings_cap(struct v4l2_subdev *sd,
sd                442 drivers/media/i2c/ths8200.c 	struct v4l2_subdev *sd;
sd                453 drivers/media/i2c/ths8200.c 	sd = &state->sd;
sd                454 drivers/media/i2c/ths8200.c 	v4l2_i2c_subdev_init(sd, client, &ths8200_ops);
sd                456 drivers/media/i2c/ths8200.c 	state->chip_version = ths8200_read(sd, THS8200_VERSION);
sd                457 drivers/media/i2c/ths8200.c 	v4l2_dbg(1, debug, sd, "chip version 0x%x\n", state->chip_version);
sd                459 drivers/media/i2c/ths8200.c 	ths8200_core_init(sd);
sd                461 drivers/media/i2c/ths8200.c 	error = v4l2_async_register_subdev(&state->sd);
sd                465 drivers/media/i2c/ths8200.c 	v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
sd                473 drivers/media/i2c/ths8200.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                474 drivers/media/i2c/ths8200.c 	struct ths8200_state *decoder = to_state(sd);
sd                476 drivers/media/i2c/ths8200.c 	v4l2_dbg(1, debug, sd, "%s removed @ 0x%x (%s)\n", client->name,
sd                479 drivers/media/i2c/ths8200.c 	ths8200_s_power(sd, false);
sd                480 drivers/media/i2c/ths8200.c 	v4l2_async_unregister_subdev(&decoder->sd);
sd                 31 drivers/media/i2c/tlv320aic23b.c 	struct v4l2_subdev sd;
sd                 35 drivers/media/i2c/tlv320aic23b.c static inline struct tlv320aic23b_state *to_state(struct v4l2_subdev *sd)
sd                 37 drivers/media/i2c/tlv320aic23b.c 	return container_of(sd, struct tlv320aic23b_state, sd);
sd                 42 drivers/media/i2c/tlv320aic23b.c 	return &container_of(ctrl->handler, struct tlv320aic23b_state, hdl)->sd;
sd                 45 drivers/media/i2c/tlv320aic23b.c static int tlv320aic23b_write(struct v4l2_subdev *sd, int reg, u16 val)
sd                 47 drivers/media/i2c/tlv320aic23b.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 51 drivers/media/i2c/tlv320aic23b.c 		v4l2_err(sd, "Invalid register R%d\n", reg);
sd                 59 drivers/media/i2c/tlv320aic23b.c 	v4l2_err(sd, "I2C: cannot write %03x to register R%d\n", val, reg);
sd                 63 drivers/media/i2c/tlv320aic23b.c static int tlv320aic23b_s_clock_freq(struct v4l2_subdev *sd, u32 freq)
sd                 67 drivers/media/i2c/tlv320aic23b.c 		tlv320aic23b_write(sd, 8, 0x018);
sd                 70 drivers/media/i2c/tlv320aic23b.c 		tlv320aic23b_write(sd, 8, 0x022);
sd                 73 drivers/media/i2c/tlv320aic23b.c 		tlv320aic23b_write(sd, 8, 0x000);
sd                 83 drivers/media/i2c/tlv320aic23b.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                 87 drivers/media/i2c/tlv320aic23b.c 		tlv320aic23b_write(sd, 0, 0x180); /* mute both channels */
sd                 90 drivers/media/i2c/tlv320aic23b.c 			tlv320aic23b_write(sd, 0, 0x119);
sd                 96 drivers/media/i2c/tlv320aic23b.c static int tlv320aic23b_log_status(struct v4l2_subdev *sd)
sd                 98 drivers/media/i2c/tlv320aic23b.c 	struct tlv320aic23b_state *state = to_state(sd);
sd                100 drivers/media/i2c/tlv320aic23b.c 	v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
sd                136 drivers/media/i2c/tlv320aic23b.c 	struct v4l2_subdev *sd;
sd                148 drivers/media/i2c/tlv320aic23b.c 	sd = &state->sd;
sd                149 drivers/media/i2c/tlv320aic23b.c 	v4l2_i2c_subdev_init(sd, client, &tlv320aic23b_ops);
sd                154 drivers/media/i2c/tlv320aic23b.c 	tlv320aic23b_write(sd, 15, 0x000);
sd                156 drivers/media/i2c/tlv320aic23b.c 	tlv320aic23b_write(sd, 6, 0x00A);
sd                158 drivers/media/i2c/tlv320aic23b.c 	tlv320aic23b_write(sd, 7, 0x049);
sd                160 drivers/media/i2c/tlv320aic23b.c 	tlv320aic23b_write(sd, 0, 0x119);
sd                162 drivers/media/i2c/tlv320aic23b.c 	tlv320aic23b_write(sd, 8, 0x000);
sd                164 drivers/media/i2c/tlv320aic23b.c 	tlv320aic23b_write(sd, 9, 0x001);
sd                169 drivers/media/i2c/tlv320aic23b.c 	sd->ctrl_handler = &state->hdl;
sd                182 drivers/media/i2c/tlv320aic23b.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                183 drivers/media/i2c/tlv320aic23b.c 	struct tlv320aic23b_state *state = to_state(sd);
sd                185 drivers/media/i2c/tlv320aic23b.c 	v4l2_device_unregister_subdev(sd);
sd                113 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev sd;
sd                140 drivers/media/i2c/tvaudio.c static inline struct CHIPSTATE *to_state(struct v4l2_subdev *sd)
sd                142 drivers/media/i2c/tvaudio.c 	return container_of(sd, struct CHIPSTATE, sd);
sd                147 drivers/media/i2c/tvaudio.c 	return &container_of(ctrl->handler, struct CHIPSTATE, hdl)->sd;
sd                156 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = &chip->sd;
sd                157 drivers/media/i2c/tvaudio.c 	struct i2c_client *c = v4l2_get_subdevdata(sd);
sd                162 drivers/media/i2c/tvaudio.c 		v4l2_dbg(1, debug, sd, "chip_write: 0x%x\n", val);
sd                167 drivers/media/i2c/tvaudio.c 			v4l2_warn(sd, "I/O error (write 0x%x)\n", val);
sd                174 drivers/media/i2c/tvaudio.c 			v4l2_info(sd,
sd                180 drivers/media/i2c/tvaudio.c 		v4l2_dbg(1, debug, sd, "chip_write: reg%d=0x%x\n",
sd                187 drivers/media/i2c/tvaudio.c 			v4l2_warn(sd, "I/O error (write reg%d=0x%x)\n",
sd                200 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = &chip->sd;
sd                207 drivers/media/i2c/tvaudio.c 				v4l2_info(sd,
sd                221 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = &chip->sd;
sd                222 drivers/media/i2c/tvaudio.c 	struct i2c_client *c = v4l2_get_subdevdata(sd);
sd                228 drivers/media/i2c/tvaudio.c 		v4l2_warn(sd, "I/O error (read)\n");
sd                233 drivers/media/i2c/tvaudio.c 	v4l2_dbg(1, debug, sd, "chip_read: 0x%x\n", buffer);
sd                239 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = &chip->sd;
sd                240 drivers/media/i2c/tvaudio.c 	struct i2c_client *c = v4l2_get_subdevdata(sd);
sd                262 drivers/media/i2c/tvaudio.c 		v4l2_warn(sd, "I/O error (read2)\n");
sd                267 drivers/media/i2c/tvaudio.c 	v4l2_dbg(1, debug, sd, "chip_read2: reg%d=0x%x\n",
sd                274 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = &chip->sd;
sd                275 drivers/media/i2c/tvaudio.c 	struct i2c_client *c = v4l2_get_subdevdata(sd);
sd                282 drivers/media/i2c/tvaudio.c 		v4l2_info(sd,
sd                291 drivers/media/i2c/tvaudio.c 	v4l2_dbg(1, debug, sd, "chip_cmd(%s): reg=%d, data:",
sd                304 drivers/media/i2c/tvaudio.c 		v4l2_warn(sd, "I/O error (%s)\n", name);
sd                329 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = &chip->sd;
sd                332 drivers/media/i2c/tvaudio.c 	v4l2_dbg(1, debug, sd, "thread started\n");
sd                342 drivers/media/i2c/tvaudio.c 		v4l2_dbg(1, debug, sd, "thread wakeup\n");
sd                354 drivers/media/i2c/tvaudio.c 		v4l2_dbg(1, debug, sd, "thread checkmode\n");
sd                389 drivers/media/i2c/tvaudio.c 	v4l2_dbg(1, debug, sd, "thread exiting\n");
sd                418 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = &chip->sd;
sd                432 drivers/media/i2c/tvaudio.c 	v4l2_dbg(1, debug, sd,
sd                750 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = &chip->sd;
sd                763 drivers/media/i2c/tvaudio.c 	v4l2_dbg(1, debug, sd,
sd                771 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = &chip->sd;
sd                776 drivers/media/i2c/tvaudio.c 		v4l2_dbg(1, debug, sd,
sd                781 drivers/media/i2c/tvaudio.c 	v4l2_dbg(1, debug, sd,
sd                784 drivers/media/i2c/tvaudio.c 	v4l2_dbg(1, debug, sd, "tda9873_setaudmode(): sw_data  = %d\n",
sd                808 drivers/media/i2c/tvaudio.c 	v4l2_dbg(1, debug, sd,
sd                919 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = &chip->sd;
sd                951 drivers/media/i2c/tvaudio.c 	v4l2_dbg(1, debug, sd, "tda9874a_setup(): %s [0x%02X].\n",
sd                958 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = &chip->sd;
sd                998 drivers/media/i2c/tvaudio.c 	v4l2_dbg(1, debug, sd,
sd               1006 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = &chip->sd;
sd               1050 drivers/media/i2c/tvaudio.c 		v4l2_dbg(1, debug, sd,
sd               1089 drivers/media/i2c/tvaudio.c 		v4l2_dbg(1, debug, sd,
sd               1097 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = &chip->sd;
sd               1107 drivers/media/i2c/tvaudio.c 	v4l2_dbg(1, debug, sd, "tda9874a_checkit(): DIC=0x%X, SIC=0x%X.\n", dic, sic);
sd               1110 drivers/media/i2c/tvaudio.c 		v4l2_info(sd, "found tda9874%s.\n", (dic == 0x11) ? "a" : "h");
sd               1240 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = &chip->sd;
sd               1251 drivers/media/i2c/tvaudio.c 		v4l2_info(sd, "found tda9875%s rev. %d.\n",
sd               1449 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = &chip->sd;
sd               1453 drivers/media/i2c/tvaudio.c 	v4l2_dbg(1, debug, sd, "ta8874z_setaudmode(): mode: 0x%02x\n", mode);
sd               1745 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd               1746 drivers/media/i2c/tvaudio.c 	struct CHIPSTATE *chip = to_state(sd);
sd               1785 drivers/media/i2c/tvaudio.c static int tvaudio_s_radio(struct v4l2_subdev *sd)
sd               1787 drivers/media/i2c/tvaudio.c 	struct CHIPSTATE *chip = to_state(sd);
sd               1794 drivers/media/i2c/tvaudio.c static int tvaudio_s_routing(struct v4l2_subdev *sd,
sd               1797 drivers/media/i2c/tvaudio.c 	struct CHIPSTATE *chip = to_state(sd);
sd               1813 drivers/media/i2c/tvaudio.c static int tvaudio_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
sd               1815 drivers/media/i2c/tvaudio.c 	struct CHIPSTATE *chip = to_state(sd);
sd               1843 drivers/media/i2c/tvaudio.c static int tvaudio_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
sd               1845 drivers/media/i2c/tvaudio.c 	struct CHIPSTATE *chip = to_state(sd);
sd               1861 drivers/media/i2c/tvaudio.c static int tvaudio_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd               1863 drivers/media/i2c/tvaudio.c 	struct CHIPSTATE *chip = to_state(sd);
sd               1869 drivers/media/i2c/tvaudio.c static int tvaudio_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *freq)
sd               1871 drivers/media/i2c/tvaudio.c 	struct CHIPSTATE *chip = to_state(sd);
sd               1890 drivers/media/i2c/tvaudio.c static int tvaudio_log_status(struct v4l2_subdev *sd)
sd               1892 drivers/media/i2c/tvaudio.c 	struct CHIPSTATE *chip = to_state(sd);
sd               1895 drivers/media/i2c/tvaudio.c 	v4l2_info(sd, "Chip: %s\n", desc->name);
sd               1896 drivers/media/i2c/tvaudio.c 	v4l2_ctrl_handler_log_status(&chip->hdl, sd->name);
sd               1941 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd;
sd               1955 drivers/media/i2c/tvaudio.c 	sd = &chip->sd;
sd               1956 drivers/media/i2c/tvaudio.c 	v4l2_i2c_subdev_init(sd, client, &tvaudio_ops);
sd               1959 drivers/media/i2c/tvaudio.c 	v4l2_dbg(1, debug, sd, "chip found @ 0x%x\n", client->addr<<1);
sd               1971 drivers/media/i2c/tvaudio.c 		v4l2_dbg(1, debug, sd, "no matching chip description found\n");
sd               1974 drivers/media/i2c/tvaudio.c 	v4l2_info(sd, "%s found @ 0x%x (%s)\n", desc->name, client->addr<<1, client->adapter->name);
sd               1976 drivers/media/i2c/tvaudio.c 		v4l2_dbg(1, debug, sd, "matches:%s%s%s.\n",
sd               2005 drivers/media/i2c/tvaudio.c 			v4l2_info(sd, "volume callback undefined!\n");
sd               2023 drivers/media/i2c/tvaudio.c 			v4l2_info(sd, "bass/treble callbacks undefined!\n");
sd               2037 drivers/media/i2c/tvaudio.c 	sd->ctrl_handler = &chip->hdl;
sd               2054 drivers/media/i2c/tvaudio.c 			v4l2_info(sd, "set/get mode callbacks undefined!\n");
sd               2061 drivers/media/i2c/tvaudio.c 			v4l2_warn(sd, "failed to create kthread\n");
sd               2070 drivers/media/i2c/tvaudio.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               2071 drivers/media/i2c/tvaudio.c 	struct CHIPSTATE *chip = to_state(sd);
sd               2080 drivers/media/i2c/tvaudio.c 	v4l2_device_unregister_subdev(sd);
sd                 76 drivers/media/i2c/tvp514x.c static int tvp514x_s_stream(struct v4l2_subdev *sd, int enable);
sd                 98 drivers/media/i2c/tvp514x.c 	struct v4l2_subdev sd;
sd                261 drivers/media/i2c/tvp514x.c static inline struct tvp514x_decoder *to_decoder(struct v4l2_subdev *sd)
sd                263 drivers/media/i2c/tvp514x.c 	return container_of(sd, struct tvp514x_decoder, sd);
sd                268 drivers/media/i2c/tvp514x.c 	return &container_of(ctrl->handler, struct tvp514x_decoder, hdl)->sd;
sd                279 drivers/media/i2c/tvp514x.c static int tvp514x_read_reg(struct v4l2_subdev *sd, u8 reg)
sd                282 drivers/media/i2c/tvp514x.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                289 drivers/media/i2c/tvp514x.c 			v4l2_warn(sd, "Read: retry ... %d\n", retry);
sd                304 drivers/media/i2c/tvp514x.c static void dump_reg(struct v4l2_subdev *sd, u8 reg)
sd                308 drivers/media/i2c/tvp514x.c 	val = tvp514x_read_reg(sd, reg);
sd                309 drivers/media/i2c/tvp514x.c 	v4l2_info(sd, "Reg(0x%.2X): 0x%.2X\n", reg, val);
sd                321 drivers/media/i2c/tvp514x.c static int tvp514x_write_reg(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                324 drivers/media/i2c/tvp514x.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                331 drivers/media/i2c/tvp514x.c 			v4l2_warn(sd, "Write: retry ... %d\n", retry);
sd                353 drivers/media/i2c/tvp514x.c static int tvp514x_write_regs(struct v4l2_subdev *sd,
sd                368 drivers/media/i2c/tvp514x.c 		err = tvp514x_write_reg(sd, next->reg, (u8) next->val);
sd                370 drivers/media/i2c/tvp514x.c 			v4l2_err(sd, "Write failed. Err[%d]\n", err);
sd                384 drivers/media/i2c/tvp514x.c static enum tvp514x_std tvp514x_query_current_std(struct v4l2_subdev *sd)
sd                388 drivers/media/i2c/tvp514x.c 	std = tvp514x_read_reg(sd, REG_VIDEO_STD);
sd                391 drivers/media/i2c/tvp514x.c 		std_status = tvp514x_read_reg(sd, REG_VIDEO_STD_STATUS);
sd                411 drivers/media/i2c/tvp514x.c static void tvp514x_reg_dump(struct v4l2_subdev *sd)
sd                413 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_INPUT_SEL);
sd                414 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_AFE_GAIN_CTRL);
sd                415 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_VIDEO_STD);
sd                416 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_OPERATION_MODE);
sd                417 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_COLOR_KILLER);
sd                418 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_LUMA_CONTROL1);
sd                419 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_LUMA_CONTROL2);
sd                420 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_LUMA_CONTROL3);
sd                421 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_BRIGHTNESS);
sd                422 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_CONTRAST);
sd                423 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_SATURATION);
sd                424 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_HUE);
sd                425 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_CHROMA_CONTROL1);
sd                426 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_CHROMA_CONTROL2);
sd                427 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_COMP_PR_SATURATION);
sd                428 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_COMP_Y_CONTRAST);
sd                429 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_COMP_PB_SATURATION);
sd                430 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_COMP_Y_BRIGHTNESS);
sd                431 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_AVID_START_PIXEL_LSB);
sd                432 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_AVID_START_PIXEL_MSB);
sd                433 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_AVID_STOP_PIXEL_LSB);
sd                434 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_AVID_STOP_PIXEL_MSB);
sd                435 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_HSYNC_START_PIXEL_LSB);
sd                436 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_HSYNC_START_PIXEL_MSB);
sd                437 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_HSYNC_STOP_PIXEL_LSB);
sd                438 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_HSYNC_STOP_PIXEL_MSB);
sd                439 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_VSYNC_START_LINE_LSB);
sd                440 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_VSYNC_START_LINE_MSB);
sd                441 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_VSYNC_STOP_LINE_LSB);
sd                442 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_VSYNC_STOP_LINE_MSB);
sd                443 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_VBLK_START_LINE_LSB);
sd                444 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_VBLK_START_LINE_MSB);
sd                445 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_VBLK_STOP_LINE_LSB);
sd                446 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_VBLK_STOP_LINE_MSB);
sd                447 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_SYNC_CONTROL);
sd                448 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_OUTPUT_FORMATTER1);
sd                449 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_OUTPUT_FORMATTER2);
sd                450 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_OUTPUT_FORMATTER3);
sd                451 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_OUTPUT_FORMATTER4);
sd                452 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_OUTPUT_FORMATTER5);
sd                453 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_OUTPUT_FORMATTER6);
sd                454 drivers/media/i2c/tvp514x.c 	dump_reg(sd, REG_CLEAR_LOST_LOCK);
sd                464 drivers/media/i2c/tvp514x.c static int tvp514x_configure(struct v4l2_subdev *sd,
sd                471 drivers/media/i2c/tvp514x.c 	    tvp514x_write_regs(sd, decoder->tvp514x_regs);
sd                476 drivers/media/i2c/tvp514x.c 		tvp514x_reg_dump(sd);
sd                492 drivers/media/i2c/tvp514x.c static int tvp514x_detect(struct v4l2_subdev *sd,
sd                496 drivers/media/i2c/tvp514x.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                498 drivers/media/i2c/tvp514x.c 	chip_id_msb = tvp514x_read_reg(sd, REG_CHIP_ID_MSB);
sd                499 drivers/media/i2c/tvp514x.c 	chip_id_lsb = tvp514x_read_reg(sd, REG_CHIP_ID_LSB);
sd                500 drivers/media/i2c/tvp514x.c 	rom_ver = tvp514x_read_reg(sd, REG_ROM_VERSION);
sd                502 drivers/media/i2c/tvp514x.c 	v4l2_dbg(1, debug, sd,
sd                511 drivers/media/i2c/tvp514x.c 		v4l2_err(sd, "chip id mismatch msb:0x%x lsb:0x%x\n",
sd                518 drivers/media/i2c/tvp514x.c 	v4l2_info(sd, "%s (Version - 0x%.2x) found at 0x%x (%s)\n",
sd                532 drivers/media/i2c/tvp514x.c static int tvp514x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std_id)
sd                534 drivers/media/i2c/tvp514x.c 	struct tvp514x_decoder *decoder = to_decoder(sd);
sd                544 drivers/media/i2c/tvp514x.c 		tvp514x_s_stream(sd, 1);
sd                549 drivers/media/i2c/tvp514x.c 	current_std = tvp514x_query_current_std(sd);
sd                593 drivers/media/i2c/tvp514x.c 	sync_lock_status = tvp514x_read_reg(sd, REG_STATUS1);
sd                601 drivers/media/i2c/tvp514x.c 	v4l2_dbg(1, debug, sd, "Current STD: %s\n",
sd                614 drivers/media/i2c/tvp514x.c static int tvp514x_s_std(struct v4l2_subdev *sd, v4l2_std_id std_id)
sd                616 drivers/media/i2c/tvp514x.c 	struct tvp514x_decoder *decoder = to_decoder(sd);
sd                626 drivers/media/i2c/tvp514x.c 	err = tvp514x_write_reg(sd, REG_VIDEO_STD,
sd                635 drivers/media/i2c/tvp514x.c 	v4l2_dbg(1, debug, sd, "Standard set to: %s\n",
sd                651 drivers/media/i2c/tvp514x.c static int tvp514x_s_routing(struct v4l2_subdev *sd,
sd                654 drivers/media/i2c/tvp514x.c 	struct tvp514x_decoder *decoder = to_decoder(sd);
sd                667 drivers/media/i2c/tvp514x.c 	err = tvp514x_write_reg(sd, REG_INPUT_SEL, input_sel);
sd                671 drivers/media/i2c/tvp514x.c 	output_sel |= tvp514x_read_reg(sd,
sd                673 drivers/media/i2c/tvp514x.c 	err = tvp514x_write_reg(sd, REG_OUTPUT_FORMATTER1,
sd                683 drivers/media/i2c/tvp514x.c 	v4l2_dbg(1, debug, sd, "Input set to: %d\n", input_sel);
sd                697 drivers/media/i2c/tvp514x.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                698 drivers/media/i2c/tvp514x.c 	struct tvp514x_decoder *decoder = to_decoder(sd);
sd                705 drivers/media/i2c/tvp514x.c 		err = tvp514x_write_reg(sd, REG_BRIGHTNESS, value);
sd                710 drivers/media/i2c/tvp514x.c 		err = tvp514x_write_reg(sd, REG_CONTRAST, value);
sd                715 drivers/media/i2c/tvp514x.c 		err = tvp514x_write_reg(sd, REG_SATURATION, value);
sd                724 drivers/media/i2c/tvp514x.c 		err = tvp514x_write_reg(sd, REG_HUE, value);
sd                729 drivers/media/i2c/tvp514x.c 		err = tvp514x_write_reg(sd, REG_AFE_GAIN_CTRL, value ? 0x0f : 0x0c);
sd                735 drivers/media/i2c/tvp514x.c 	v4l2_dbg(1, debug, sd, "Set Control: ID - %d - %d\n",
sd                748 drivers/media/i2c/tvp514x.c tvp514x_g_frame_interval(struct v4l2_subdev *sd,
sd                751 drivers/media/i2c/tvp514x.c 	struct tvp514x_decoder *decoder = to_decoder(sd);
sd                773 drivers/media/i2c/tvp514x.c tvp514x_s_frame_interval(struct v4l2_subdev *sd,
sd                776 drivers/media/i2c/tvp514x.c 	struct tvp514x_decoder *decoder = to_decoder(sd);
sd                799 drivers/media/i2c/tvp514x.c static int tvp514x_s_stream(struct v4l2_subdev *sd, int enable)
sd                802 drivers/media/i2c/tvp514x.c 	struct tvp514x_decoder *decoder = to_decoder(sd);
sd                811 drivers/media/i2c/tvp514x.c 		err = tvp514x_write_reg(sd, REG_OPERATION_MODE, 0x01);
sd                813 drivers/media/i2c/tvp514x.c 			v4l2_err(sd, "Unable to turn off decoder\n");
sd                822 drivers/media/i2c/tvp514x.c 		err = tvp514x_write_regs(sd, decoder->int_seq);
sd                824 drivers/media/i2c/tvp514x.c 			v4l2_err(sd, "Unable to turn on decoder\n");
sd                828 drivers/media/i2c/tvp514x.c 		err = tvp514x_detect(sd, decoder);
sd                830 drivers/media/i2c/tvp514x.c 			v4l2_err(sd, "Unable to detect decoder\n");
sd                833 drivers/media/i2c/tvp514x.c 		err = tvp514x_configure(sd, decoder);
sd                835 drivers/media/i2c/tvp514x.c 			v4l2_err(sd, "Unable to configure decoder\n");
sd                861 drivers/media/i2c/tvp514x.c static int tvp514x_enum_mbus_code(struct v4l2_subdev *sd,
sd                888 drivers/media/i2c/tvp514x.c static int tvp514x_get_pad_format(struct v4l2_subdev *sd,
sd                892 drivers/media/i2c/tvp514x.c 	struct tvp514x_decoder *decoder = to_decoder(sd);
sd                920 drivers/media/i2c/tvp514x.c static int tvp514x_set_pad_format(struct v4l2_subdev *sd,
sd                924 drivers/media/i2c/tvp514x.c 	struct tvp514x_decoder *decoder = to_decoder(sd);
sd               1030 drivers/media/i2c/tvp514x.c 	struct v4l2_subdev *sd;
sd               1072 drivers/media/i2c/tvp514x.c 	sd = &decoder->sd;
sd               1073 drivers/media/i2c/tvp514x.c 	v4l2_i2c_subdev_init(sd, client, &tvp514x_ops);
sd               1077 drivers/media/i2c/tvp514x.c 	decoder->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1078 drivers/media/i2c/tvp514x.c 	decoder->sd.entity.function = MEDIA_ENT_F_ATV_DECODER;
sd               1080 drivers/media/i2c/tvp514x.c 	ret = media_entity_pads_init(&decoder->sd.entity, 1, &decoder->pad);
sd               1082 drivers/media/i2c/tvp514x.c 		v4l2_err(sd, "%s decoder driver failed to register !!\n",
sd               1083 drivers/media/i2c/tvp514x.c 			 sd->name);
sd               1098 drivers/media/i2c/tvp514x.c 	sd->ctrl_handler = &decoder->hdl;
sd               1105 drivers/media/i2c/tvp514x.c 	ret = v4l2_async_register_subdev(&decoder->sd);
sd               1107 drivers/media/i2c/tvp514x.c 		v4l2_info(sd, "%s decoder driver registered !!\n", sd->name);
sd               1112 drivers/media/i2c/tvp514x.c 		media_entity_cleanup(&decoder->sd.entity);
sd               1126 drivers/media/i2c/tvp514x.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1127 drivers/media/i2c/tvp514x.c 	struct tvp514x_decoder *decoder = to_decoder(sd);
sd               1129 drivers/media/i2c/tvp514x.c 	v4l2_async_unregister_subdev(&decoder->sd);
sd               1130 drivers/media/i2c/tvp514x.c 	media_entity_cleanup(&decoder->sd.entity);
sd                 53 drivers/media/i2c/tvp5150.c 	struct v4l2_subdev sd;
sd                 78 drivers/media/i2c/tvp5150.c static inline struct tvp5150 *to_tvp5150(struct v4l2_subdev *sd)
sd                 80 drivers/media/i2c/tvp5150.c 	return container_of(sd, struct tvp5150, sd);
sd                 85 drivers/media/i2c/tvp5150.c 	return &container_of(ctrl->handler, struct tvp5150, hdl)->sd;
sd                 88 drivers/media/i2c/tvp5150.c static int tvp5150_read(struct v4l2_subdev *sd, unsigned char addr)
sd                 90 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd                100 drivers/media/i2c/tvp5150.c static void dump_reg_range(struct v4l2_subdev *sd, char *s, u8 init,
sd                107 drivers/media/i2c/tvp5150.c 		dprintk0(sd->dev, "too much data to dump\n");
sd                115 drivers/media/i2c/tvp5150.c 			buf[j] = tvp5150_read(sd, i + j);
sd                117 drivers/media/i2c/tvp5150.c 		dprintk0(sd->dev, "%s reg %02x = %*ph\n", s, i, len, buf);
sd                121 drivers/media/i2c/tvp5150.c static int tvp5150_log_status(struct v4l2_subdev *sd)
sd                123 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Video input source selection #1 = 0x%02x\n",
sd                124 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_VD_IN_SRC_SEL_1));
sd                125 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Analog channel controls = 0x%02x\n",
sd                126 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_ANAL_CHL_CTL));
sd                127 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Operation mode controls = 0x%02x\n",
sd                128 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_OP_MODE_CTL));
sd                129 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Miscellaneous controls = 0x%02x\n",
sd                130 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_MISC_CTL));
sd                131 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Autoswitch mask= 0x%02x\n",
sd                132 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_AUTOSW_MSK));
sd                133 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Color killer threshold control = 0x%02x\n",
sd                134 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_COLOR_KIL_THSH_CTL));
sd                135 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Luminance processing controls #1 #2 and #3 = %02x %02x %02x\n",
sd                136 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_LUMA_PROC_CTL_1),
sd                137 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_LUMA_PROC_CTL_2),
sd                138 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_LUMA_PROC_CTL_3));
sd                139 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Brightness control = 0x%02x\n",
sd                140 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_BRIGHT_CTL));
sd                141 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Color saturation control = 0x%02x\n",
sd                142 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_SATURATION_CTL));
sd                143 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Hue control = 0x%02x\n",
sd                144 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_HUE_CTL));
sd                145 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Contrast control = 0x%02x\n",
sd                146 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_CONTRAST_CTL));
sd                147 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Outputs and data rates select = 0x%02x\n",
sd                148 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_DATA_RATE_SEL));
sd                149 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Configuration shared pins = 0x%02x\n",
sd                150 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_CONF_SHARED_PIN));
sd                151 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Active video cropping start = 0x%02x%02x\n",
sd                152 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_ACT_VD_CROP_ST_MSB),
sd                153 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_ACT_VD_CROP_ST_LSB));
sd                154 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Active video cropping stop  = 0x%02x%02x\n",
sd                155 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_ACT_VD_CROP_STP_MSB),
sd                156 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_ACT_VD_CROP_STP_LSB));
sd                157 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Genlock/RTC = 0x%02x\n",
sd                158 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_GENLOCK));
sd                159 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Horizontal sync start = 0x%02x\n",
sd                160 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_HORIZ_SYNC_START));
sd                161 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Vertical blanking start = 0x%02x\n",
sd                162 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_VERT_BLANKING_START));
sd                163 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Vertical blanking stop = 0x%02x\n",
sd                164 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_VERT_BLANKING_STOP));
sd                165 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Chrominance processing control #1 and #2 = %02x %02x\n",
sd                166 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_CHROMA_PROC_CTL_1),
sd                167 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_CHROMA_PROC_CTL_2));
sd                168 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Interrupt reset register B = 0x%02x\n",
sd                169 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_INT_RESET_REG_B));
sd                170 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Interrupt enable register B = 0x%02x\n",
sd                171 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_INT_ENABLE_REG_B));
sd                172 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Interrupt configuration register B = 0x%02x\n",
sd                173 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_INTT_CONFIG_REG_B));
sd                174 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Video standard = 0x%02x\n",
sd                175 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_VIDEO_STD));
sd                176 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Chroma gain factor: Cb=0x%02x Cr=0x%02x\n",
sd                177 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_CB_GAIN_FACT),
sd                178 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_CR_GAIN_FACTOR));
sd                179 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Macrovision on counter = 0x%02x\n",
sd                180 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_MACROVISION_ON_CTR));
sd                181 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Macrovision off counter = 0x%02x\n",
sd                182 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_MACROVISION_OFF_CTR));
sd                183 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: ITU-R BT.656.%d timing(TVP5150AM1 only)\n",
sd                184 drivers/media/i2c/tvp5150.c 		(tvp5150_read(sd, TVP5150_REV_SELECT) & 1) ? 3 : 4);
sd                185 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Device ID = %02x%02x\n",
sd                186 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_MSB_DEV_ID),
sd                187 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_LSB_DEV_ID));
sd                188 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: ROM version = (hex) %02x.%02x\n",
sd                189 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_ROM_MAJOR_VER),
sd                190 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_ROM_MINOR_VER));
sd                191 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Vertical line count = 0x%02x%02x\n",
sd                192 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_VERT_LN_COUNT_MSB),
sd                193 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_VERT_LN_COUNT_LSB));
sd                194 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Interrupt status register B = 0x%02x\n",
sd                195 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_INT_STATUS_REG_B));
sd                196 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Interrupt active register B = 0x%02x\n",
sd                197 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_INT_ACTIVE_REG_B));
sd                198 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Status regs #1 to #5 = %02x %02x %02x %02x %02x\n",
sd                199 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_STATUS_REG_1),
sd                200 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_STATUS_REG_2),
sd                201 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_STATUS_REG_3),
sd                202 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_STATUS_REG_4),
sd                203 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_STATUS_REG_5));
sd                205 drivers/media/i2c/tvp5150.c 	dump_reg_range(sd, "Teletext filter 1",   TVP5150_TELETEXT_FIL1_INI,
sd                207 drivers/media/i2c/tvp5150.c 	dump_reg_range(sd, "Teletext filter 2",   TVP5150_TELETEXT_FIL2_INI,
sd                210 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Teletext filter enable = 0x%02x\n",
sd                211 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_TELETEXT_FIL_ENA));
sd                212 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Interrupt status register A = 0x%02x\n",
sd                213 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_INT_STATUS_REG_A));
sd                214 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Interrupt enable register A = 0x%02x\n",
sd                215 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_INT_ENABLE_REG_A));
sd                216 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Interrupt configuration = 0x%02x\n",
sd                217 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_INT_CONF));
sd                218 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: VDP status register = 0x%02x\n",
sd                219 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_VDP_STATUS_REG));
sd                220 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: FIFO word count = 0x%02x\n",
sd                221 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_FIFO_WORD_COUNT));
sd                222 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: FIFO interrupt threshold = 0x%02x\n",
sd                223 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_FIFO_INT_THRESHOLD));
sd                224 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: FIFO reset = 0x%02x\n",
sd                225 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_FIFO_RESET));
sd                226 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Line number interrupt = 0x%02x\n",
sd                227 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_LINE_NUMBER_INT));
sd                228 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Pixel alignment register = 0x%02x%02x\n",
sd                229 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_PIX_ALIGN_REG_HIGH),
sd                230 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_PIX_ALIGN_REG_LOW));
sd                231 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: FIFO output control = 0x%02x\n",
sd                232 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_FIFO_OUT_CTRL));
sd                233 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Full field enable = 0x%02x\n",
sd                234 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_FULL_FIELD_ENA));
sd                235 drivers/media/i2c/tvp5150.c 	dprintk0(sd->dev, "tvp5150: Full field mode register = 0x%02x\n",
sd                236 drivers/media/i2c/tvp5150.c 		tvp5150_read(sd, TVP5150_FULL_FIELD_MODE_REG));
sd                238 drivers/media/i2c/tvp5150.c 	dump_reg_range(sd, "CC   data",   TVP5150_CC_DATA_INI,
sd                241 drivers/media/i2c/tvp5150.c 	dump_reg_range(sd, "WSS  data",   TVP5150_WSS_DATA_INI,
sd                244 drivers/media/i2c/tvp5150.c 	dump_reg_range(sd, "VPS  data",   TVP5150_VPS_DATA_INI,
sd                247 drivers/media/i2c/tvp5150.c 	dump_reg_range(sd, "VITC data",   TVP5150_VITC_DATA_INI,
sd                250 drivers/media/i2c/tvp5150.c 	dump_reg_range(sd, "Line mode",   TVP5150_LINE_MODE_INI,
sd                259 drivers/media/i2c/tvp5150.c static void tvp5150_selmux(struct v4l2_subdev *sd)
sd                262 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd                285 drivers/media/i2c/tvp5150.c 	dev_dbg_lvl(sd->dev, 1, debug, "Selecting video route: route input=%i, output=%i => tvp5150 input=%i, opmode=%i\n",
sd                574 drivers/media/i2c/tvp5150.c static int tvp5150_write_inittab(struct v4l2_subdev *sd,
sd                577 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd                586 drivers/media/i2c/tvp5150.c static int tvp5150_vdp_init(struct v4l2_subdev *sd)
sd                588 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd                618 drivers/media/i2c/tvp5150.c static int tvp5150_g_sliced_vbi_cap(struct v4l2_subdev *sd,
sd                623 drivers/media/i2c/tvp5150.c 	dev_dbg_lvl(sd->dev, 1, debug, "g_sliced_vbi_cap\n");
sd                655 drivers/media/i2c/tvp5150.c static int tvp5150_set_vbi(struct v4l2_subdev *sd,
sd                659 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd                665 drivers/media/i2c/tvp5150.c 		dev_err(sd->dev, "VBI can't be configured without knowing number of lines\n");
sd                700 drivers/media/i2c/tvp5150.c static int tvp5150_get_vbi(struct v4l2_subdev *sd, int line)
sd                702 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd                709 drivers/media/i2c/tvp5150.c 		dev_err(sd->dev, "VBI can't be configured without knowing number of lines\n");
sd                722 drivers/media/i2c/tvp5150.c 		ret = tvp5150_read(sd, reg + i);
sd                724 drivers/media/i2c/tvp5150.c 			dev_err(sd->dev, "%s: failed with error = %d\n",
sd                736 drivers/media/i2c/tvp5150.c static int tvp5150_set_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd                738 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd                759 drivers/media/i2c/tvp5150.c 	dev_dbg_lvl(sd->dev, 1, debug, "Set video std register to %d.\n", fmt);
sd                764 drivers/media/i2c/tvp5150.c static int tvp5150_g_std(struct v4l2_subdev *sd, v4l2_std_id *std)
sd                766 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd                773 drivers/media/i2c/tvp5150.c static int tvp5150_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd                775 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd                788 drivers/media/i2c/tvp5150.c 	return tvp5150_set_std(sd, std);
sd                791 drivers/media/i2c/tvp5150.c static v4l2_std_id tvp5150_read_std(struct v4l2_subdev *sd)
sd                793 drivers/media/i2c/tvp5150.c 	int val = tvp5150_read(sd, TVP5150_STATUS_REG_5);
sd                813 drivers/media/i2c/tvp5150.c static int query_lock(struct v4l2_subdev *sd)
sd                815 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd                827 drivers/media/i2c/tvp5150.c static int tvp5150_querystd(struct v4l2_subdev *sd, v4l2_std_id *std_id)
sd                829 drivers/media/i2c/tvp5150.c 	*std_id = query_lock(sd) ? tvp5150_read_std(sd) : V4L2_STD_UNKNOWN;
sd                854 drivers/media/i2c/tvp5150.c 			dev_dbg_lvl(decoder->sd.dev, 1, debug,
sd                857 drivers/media/i2c/tvp5150.c 			v4l2_subdev_notify_event(&decoder->sd, &tvp5150_ev_fmt);
sd                876 drivers/media/i2c/tvp5150.c static int tvp5150_reset(struct v4l2_subdev *sd, u32 val)
sd                878 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd                882 drivers/media/i2c/tvp5150.c 	tvp5150_write_inittab(sd, tvp5150_init_default);
sd                899 drivers/media/i2c/tvp5150.c 	tvp5150_vdp_init(sd);
sd                902 drivers/media/i2c/tvp5150.c 	tvp5150_selmux(sd);
sd                910 drivers/media/i2c/tvp5150.c static int tvp5150_enable(struct v4l2_subdev *sd)
sd                912 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd                916 drivers/media/i2c/tvp5150.c 	tvp5150_write_inittab(sd, tvp5150_init_enable);
sd                919 drivers/media/i2c/tvp5150.c 		std = tvp5150_read_std(sd);
sd                924 drivers/media/i2c/tvp5150.c 	tvp5150_set_std(sd, std);
sd                952 drivers/media/i2c/tvp5150.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                953 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd                971 drivers/media/i2c/tvp5150.c 		tvp5150_selmux(sd);
sd                989 drivers/media/i2c/tvp5150.c static int tvp5150_fill_fmt(struct v4l2_subdev *sd,
sd                994 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd               1008 drivers/media/i2c/tvp5150.c 	dev_dbg_lvl(sd->dev, 1, debug, "width = %d, height = %d\n", f->width,
sd               1013 drivers/media/i2c/tvp5150.c static int tvp5150_set_selection(struct v4l2_subdev *sd,
sd               1017 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd               1026 drivers/media/i2c/tvp5150.c 	dev_dbg_lvl(sd->dev, 1, debug, "%s left=%d, top=%d, width=%d, height=%d\n",
sd               1035 drivers/media/i2c/tvp5150.c 		std = tvp5150_read_std(sd);
sd               1073 drivers/media/i2c/tvp5150.c static int tvp5150_get_selection(struct v4l2_subdev *sd,
sd               1077 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = container_of(sd, struct tvp5150, sd);
sd               1091 drivers/media/i2c/tvp5150.c 			std = tvp5150_read_std(sd);
sd               1107 drivers/media/i2c/tvp5150.c static int tvp5150_g_mbus_config(struct v4l2_subdev *sd,
sd               1110 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd               1122 drivers/media/i2c/tvp5150.c static int tvp5150_init_cfg(struct v4l2_subdev *sd,
sd               1125 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd               1133 drivers/media/i2c/tvp5150.c 		std = tvp5150_read_std(sd);
sd               1143 drivers/media/i2c/tvp5150.c static int tvp5150_enum_mbus_code(struct v4l2_subdev *sd,
sd               1154 drivers/media/i2c/tvp5150.c static int tvp5150_enum_frame_size(struct v4l2_subdev *sd,
sd               1158 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd               1181 drivers/media/i2c/tvp5150.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd               1182 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd               1196 drivers/media/i2c/tvp5150.c 	tvp5150_selmux(sd);
sd               1210 drivers/media/i2c/tvp5150.c static int tvp5150_s_stream(struct v4l2_subdev *sd, int enable)
sd               1212 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd               1219 drivers/media/i2c/tvp5150.c 		tvp5150_enable(sd);
sd               1227 drivers/media/i2c/tvp5150.c 		v4l2_subdev_notify_event(&decoder->sd, &tvp5150_ev_fmt);
sd               1239 drivers/media/i2c/tvp5150.c static int tvp5150_s_routing(struct v4l2_subdev *sd,
sd               1242 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd               1252 drivers/media/i2c/tvp5150.c 	tvp5150_selmux(sd);
sd               1256 drivers/media/i2c/tvp5150.c static int tvp5150_s_raw_fmt(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt)
sd               1258 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd               1278 drivers/media/i2c/tvp5150.c static int tvp5150_s_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *svbi)
sd               1280 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd               1287 drivers/media/i2c/tvp5150.c 				tvp5150_set_vbi(sd, svbi->service_lines[0][i],
sd               1306 drivers/media/i2c/tvp5150.c static int tvp5150_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *svbi)
sd               1314 drivers/media/i2c/tvp5150.c 			tvp5150_get_vbi(sd, i);
sd               1322 drivers/media/i2c/tvp5150.c static int tvp5150_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
sd               1326 drivers/media/i2c/tvp5150.c 	res = tvp5150_read(sd, reg->reg & 0xff);
sd               1328 drivers/media/i2c/tvp5150.c 		dev_err(sd->dev, "%s: failed with error = %d\n", __func__, res);
sd               1337 drivers/media/i2c/tvp5150.c static int tvp5150_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
sd               1339 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd               1345 drivers/media/i2c/tvp5150.c static int tvp5150_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
sd               1347 drivers/media/i2c/tvp5150.c 	int status = tvp5150_read(sd, 0x88);
sd               1353 drivers/media/i2c/tvp5150.c static int tvp5150_registered(struct v4l2_subdev *sd)
sd               1356 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd               1373 drivers/media/i2c/tvp5150.c 		ret = media_device_register_entity(sd->v4l2_dev->mdev, input);
sd               1377 drivers/media/i2c/tvp5150.c 		ret = media_create_pad_link(input, 0, &sd->entity,
sd               1525 drivers/media/i2c/tvp5150.c 	struct v4l2_subdev *sd = &core->sd;
sd               1526 drivers/media/i2c/tvp5150.c 	struct i2c_client *c = v4l2_get_subdevdata(sd);
sd               1543 drivers/media/i2c/tvp5150.c 	dev_info(sd->dev, "tvp%04x (%u.%u) chip found @ 0x%02x (%s)\n",
sd               1548 drivers/media/i2c/tvp5150.c 		dev_info(sd->dev, "tvp5150a detected.\n");
sd               1550 drivers/media/i2c/tvp5150.c 		dev_info(sd->dev, "tvp5150am1 detected.\n");
sd               1555 drivers/media/i2c/tvp5150.c 		dev_info(sd->dev, "tvp5151 detected.\n");
sd               1557 drivers/media/i2c/tvp5150.c 		dev_info(sd->dev, "*** unknown tvp%04x chip detected.\n",
sd               1636 drivers/media/i2c/tvp5150.c 			dev_err(decoder->sd.dev,
sd               1653 drivers/media/i2c/tvp5150.c 			dev_err(decoder->sd.dev,
sd               1675 drivers/media/i2c/tvp5150.c 			dev_err(decoder->sd.dev,
sd               1701 drivers/media/i2c/tvp5150.c 	struct v4l2_subdev *sd;
sd               1724 drivers/media/i2c/tvp5150.c 	sd = &core->sd;
sd               1729 drivers/media/i2c/tvp5150.c 			dev_err(sd->dev, "DT parsing error: %d\n", res);
sd               1737 drivers/media/i2c/tvp5150.c 	v4l2_i2c_subdev_init(sd, c, &tvp5150_ops);
sd               1738 drivers/media/i2c/tvp5150.c 	sd->internal_ops = &tvp5150_internal_ops;
sd               1739 drivers/media/i2c/tvp5150.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1747 drivers/media/i2c/tvp5150.c 	sd->entity.function = MEDIA_ENT_F_ATV_DECODER;
sd               1749 drivers/media/i2c/tvp5150.c 	res = media_entity_pads_init(&sd->entity, TVP5150_NUM_PADS, core->pads);
sd               1753 drivers/media/i2c/tvp5150.c 	sd->entity.ops = &tvp5150_sd_media_ops;
sd               1781 drivers/media/i2c/tvp5150.c 	sd->ctrl_handler = &core->hdl;
sd               1787 drivers/media/i2c/tvp5150.c 	tvp5150_set_default(tvp5150_read_std(sd), &core->rect);
sd               1790 drivers/media/i2c/tvp5150.c 	tvp5150_reset(sd, 0);	/* Calls v4l2_ctrl_handler_setup() */
sd               1799 drivers/media/i2c/tvp5150.c 	res = v4l2_async_register_subdev(sd);
sd               1804 drivers/media/i2c/tvp5150.c 		tvp5150_log_status(sd);
sd               1814 drivers/media/i2c/tvp5150.c 	struct v4l2_subdev *sd = i2c_get_clientdata(c);
sd               1815 drivers/media/i2c/tvp5150.c 	struct tvp5150 *decoder = to_tvp5150(sd);
sd               1817 drivers/media/i2c/tvp5150.c 	dev_dbg_lvl(sd->dev, 1, debug,
sd               1821 drivers/media/i2c/tvp5150.c 	v4l2_async_unregister_subdev(sd);
sd                407 drivers/media/i2c/tvp7002.c 	struct v4l2_subdev sd;
sd                424 drivers/media/i2c/tvp7002.c static inline struct tvp7002 *to_tvp7002(struct v4l2_subdev *sd)
sd                426 drivers/media/i2c/tvp7002.c 	return container_of(sd, struct tvp7002, sd);
sd                431 drivers/media/i2c/tvp7002.c 	return &container_of(ctrl->handler, struct tvp7002, hdl)->sd;
sd                442 drivers/media/i2c/tvp7002.c static int tvp7002_read(struct v4l2_subdev *sd, u8 addr, u8 *dst)
sd                444 drivers/media/i2c/tvp7002.c 	struct i2c_client *c = v4l2_get_subdevdata(sd);
sd                458 drivers/media/i2c/tvp7002.c 	v4l2_err(sd, "TVP7002 read error %d\n", error);
sd                472 drivers/media/i2c/tvp7002.c static inline void tvp7002_read_err(struct v4l2_subdev *sd, u8 reg,
sd                476 drivers/media/i2c/tvp7002.c 		*err = tvp7002_read(sd, reg, dst);
sd                488 drivers/media/i2c/tvp7002.c static int tvp7002_write(struct v4l2_subdev *sd, u8 addr, u8 value)
sd                494 drivers/media/i2c/tvp7002.c 	c = v4l2_get_subdevdata(sd);
sd                502 drivers/media/i2c/tvp7002.c 		v4l2_warn(sd, "Write: retry ... %d\n", retry);
sd                505 drivers/media/i2c/tvp7002.c 	v4l2_err(sd, "TVP7002 write error %d\n", error);
sd                519 drivers/media/i2c/tvp7002.c static inline void tvp7002_write_err(struct v4l2_subdev *sd, u8 reg,
sd                523 drivers/media/i2c/tvp7002.c 		*err = tvp7002_write(sd, reg, val);
sd                534 drivers/media/i2c/tvp7002.c static int tvp7002_write_inittab(struct v4l2_subdev *sd,
sd                542 drivers/media/i2c/tvp7002.c 			tvp7002_write_err(sd, regs->reg, regs->value, &error);
sd                549 drivers/media/i2c/tvp7002.c static int tvp7002_s_dv_timings(struct v4l2_subdev *sd,
sd                552 drivers/media/i2c/tvp7002.c 	struct tvp7002 *device = to_tvp7002(sd);
sd                563 drivers/media/i2c/tvp7002.c 			return tvp7002_write_inittab(sd, tvp7002_timings[i].p_settings);
sd                569 drivers/media/i2c/tvp7002.c static int tvp7002_g_dv_timings(struct v4l2_subdev *sd,
sd                572 drivers/media/i2c/tvp7002.c 	struct tvp7002 *device = to_tvp7002(sd);
sd                587 drivers/media/i2c/tvp7002.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                592 drivers/media/i2c/tvp7002.c 		tvp7002_write_err(sd, TVP7002_R_FINE_GAIN, ctrl->val, &error);
sd                593 drivers/media/i2c/tvp7002.c 		tvp7002_write_err(sd, TVP7002_G_FINE_GAIN, ctrl->val, &error);
sd                594 drivers/media/i2c/tvp7002.c 		tvp7002_write_err(sd, TVP7002_B_FINE_GAIN, ctrl->val, &error);
sd                608 drivers/media/i2c/tvp7002.c static int tvp7002_query_dv(struct v4l2_subdev *sd, int *index)
sd                624 drivers/media/i2c/tvp7002.c 	tvp7002_read_err(sd, TVP7002_L_FRAME_STAT_LSBS, &lpf_lsb, &error);
sd                625 drivers/media/i2c/tvp7002.c 	tvp7002_read_err(sd, TVP7002_L_FRAME_STAT_MSBS, &lpf_msb, &error);
sd                630 drivers/media/i2c/tvp7002.c 	tvp7002_read_err(sd, TVP7002_CLK_L_STAT_LSBS, &cpl_lsb, &error);
sd                631 drivers/media/i2c/tvp7002.c 	tvp7002_read_err(sd, TVP7002_CLK_L_STAT_MSBS, &cpl_msb, &error);
sd                652 drivers/media/i2c/tvp7002.c 		v4l2_dbg(1, debug, sd, "detection failed: lpf = %x, cpl = %x\n",
sd                658 drivers/media/i2c/tvp7002.c 	v4l2_dbg(1, debug, sd, "detected timings: %d\n", *index);
sd                662 drivers/media/i2c/tvp7002.c static int tvp7002_query_dv_timings(struct v4l2_subdev *sd,
sd                666 drivers/media/i2c/tvp7002.c 	int err = tvp7002_query_dv(sd, &index);
sd                684 drivers/media/i2c/tvp7002.c static int tvp7002_g_register(struct v4l2_subdev *sd,
sd                690 drivers/media/i2c/tvp7002.c 	ret = tvp7002_read(sd, reg->reg & 0xff, &val);
sd                704 drivers/media/i2c/tvp7002.c static int tvp7002_s_register(struct v4l2_subdev *sd,
sd                707 drivers/media/i2c/tvp7002.c 	return tvp7002_write(sd, reg->reg & 0xff, reg->val & 0xff);
sd                718 drivers/media/i2c/tvp7002.c static int tvp7002_s_stream(struct v4l2_subdev *sd, int enable)
sd                720 drivers/media/i2c/tvp7002.c 	struct tvp7002 *device = to_tvp7002(sd);
sd                727 drivers/media/i2c/tvp7002.c 	error = tvp7002_write(sd, TVP7002_MISC_CTL_2, enable ? 0x00 : 0x03);
sd                729 drivers/media/i2c/tvp7002.c 		v4l2_dbg(1, debug, sd, "Fail to set streaming\n");
sd                744 drivers/media/i2c/tvp7002.c static int tvp7002_log_status(struct v4l2_subdev *sd)
sd                746 drivers/media/i2c/tvp7002.c 	struct tvp7002 *device = to_tvp7002(sd);
sd                751 drivers/media/i2c/tvp7002.c 	tvp7002_query_dv(sd, &detected);
sd                754 drivers/media/i2c/tvp7002.c 	v4l2_info(sd, "Selected DV Timings: %ux%u\n", bt->width, bt->height);
sd                756 drivers/media/i2c/tvp7002.c 		v4l2_info(sd, "Detected DV Timings: None\n");
sd                759 drivers/media/i2c/tvp7002.c 		v4l2_info(sd, "Detected DV Timings: %ux%u\n",
sd                762 drivers/media/i2c/tvp7002.c 	v4l2_info(sd, "Streaming enabled: %s\n",
sd                766 drivers/media/i2c/tvp7002.c 	v4l2_ctrl_handler_log_status(&device->hdl, sd->name);
sd                771 drivers/media/i2c/tvp7002.c static int tvp7002_enum_dv_timings(struct v4l2_subdev *sd,
sd                798 drivers/media/i2c/tvp7002.c tvp7002_enum_mbus_code(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd                819 drivers/media/i2c/tvp7002.c tvp7002_get_pad_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd                822 drivers/media/i2c/tvp7002.c 	struct tvp7002 *tvp7002 = to_tvp7002(sd);
sd                842 drivers/media/i2c/tvp7002.c tvp7002_set_pad_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd                845 drivers/media/i2c/tvp7002.c 	return tvp7002_get_pad_format(sd, cfg, fmt);
sd                936 drivers/media/i2c/tvp7002.c 	struct v4l2_subdev *sd;
sd                959 drivers/media/i2c/tvp7002.c 	sd = &device->sd;
sd                964 drivers/media/i2c/tvp7002.c 	v4l2_i2c_subdev_init(sd, c, &tvp7002_ops);
sd                968 drivers/media/i2c/tvp7002.c 	error = tvp7002_read(sd, TVP7002_CHIP_REV, &revision);
sd                973 drivers/media/i2c/tvp7002.c 	v4l2_info(sd, "Rev. %02x detected.\n", revision);
sd                975 drivers/media/i2c/tvp7002.c 		v4l2_info(sd, "Unknown revision detected.\n");
sd                978 drivers/media/i2c/tvp7002.c 	error = tvp7002_write_inittab(sd, tvp7002_init_default);
sd                986 drivers/media/i2c/tvp7002.c 	error = tvp7002_write(sd, TVP7002_SYNC_CTL_1, polarity_a);
sd                993 drivers/media/i2c/tvp7002.c 	error = tvp7002_write(sd, TVP7002_MISC_CTL_3, polarity_b);
sd                999 drivers/media/i2c/tvp7002.c 	error = tvp7002_s_dv_timings(sd, &timings);
sd               1003 drivers/media/i2c/tvp7002.c 	device->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1004 drivers/media/i2c/tvp7002.c 	device->sd.entity.function = MEDIA_ENT_F_ATV_DECODER;
sd               1006 drivers/media/i2c/tvp7002.c 	error = media_entity_pads_init(&device->sd.entity, 1, &device->pad);
sd               1014 drivers/media/i2c/tvp7002.c 	sd->ctrl_handler = &device->hdl;
sd               1021 drivers/media/i2c/tvp7002.c 	error = v4l2_async_register_subdev(&device->sd);
sd               1030 drivers/media/i2c/tvp7002.c 	media_entity_cleanup(&device->sd.entity);
sd               1044 drivers/media/i2c/tvp7002.c 	struct v4l2_subdev *sd = i2c_get_clientdata(c);
sd               1045 drivers/media/i2c/tvp7002.c 	struct tvp7002 *device = to_tvp7002(sd);
sd               1047 drivers/media/i2c/tvp7002.c 	v4l2_dbg(1, debug, sd, "Removing tvp7002 adapter"
sd               1049 drivers/media/i2c/tvp7002.c 	v4l2_async_unregister_subdev(&device->sd);
sd               1051 drivers/media/i2c/tvp7002.c 	media_entity_cleanup(&device->sd.entity);
sd                 28 drivers/media/i2c/tw2804.c 	struct v4l2_subdev sd;
sd                130 drivers/media/i2c/tw2804.c static inline struct tw2804 *to_state(struct v4l2_subdev *sd)
sd                132 drivers/media/i2c/tw2804.c 	return container_of(sd, struct tw2804, sd);
sd                140 drivers/media/i2c/tw2804.c static int tw2804_log_status(struct v4l2_subdev *sd)
sd                142 drivers/media/i2c/tw2804.c 	struct tw2804 *state = to_state(sd);
sd                144 drivers/media/i2c/tw2804.c 	v4l2_info(sd, "Standard: %s\n",
sd                146 drivers/media/i2c/tw2804.c 	v4l2_info(sd, "Channel: %d\n", state->channel);
sd                147 drivers/media/i2c/tw2804.c 	v4l2_info(sd, "Input: %d\n", state->input);
sd                148 drivers/media/i2c/tw2804.c 	return v4l2_ctrl_subdev_log_status(sd);
sd                167 drivers/media/i2c/tw2804.c 	struct i2c_client *client = v4l2_get_subdevdata(&state->sd);
sd                192 drivers/media/i2c/tw2804.c 	struct i2c_client *client = v4l2_get_subdevdata(&state->sd);
sd                250 drivers/media/i2c/tw2804.c static int tw2804_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
sd                252 drivers/media/i2c/tw2804.c 	struct tw2804 *dec = to_state(sd);
sd                253 drivers/media/i2c/tw2804.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                274 drivers/media/i2c/tw2804.c static int tw2804_s_video_routing(struct v4l2_subdev *sd, u32 input, u32 output,
sd                277 drivers/media/i2c/tw2804.c 	struct tw2804 *dec = to_state(sd);
sd                278 drivers/media/i2c/tw2804.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                351 drivers/media/i2c/tw2804.c 	struct v4l2_subdev *sd;
sd                361 drivers/media/i2c/tw2804.c 	sd = &state->sd;
sd                362 drivers/media/i2c/tw2804.c 	v4l2_i2c_subdev_init(sd, client, &tw2804_ops);
sd                395 drivers/media/i2c/tw2804.c 	sd->ctrl_handler = &state->hdl;
sd                410 drivers/media/i2c/tw2804.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                411 drivers/media/i2c/tw2804.c 	struct tw2804 *state = to_state(sd);
sd                413 drivers/media/i2c/tw2804.c 	v4l2_device_unregister_subdev(sd);
sd                 28 drivers/media/i2c/tw9903.c 	struct v4l2_subdev sd;
sd                 33 drivers/media/i2c/tw9903.c static inline struct tw9903 *to_state(struct v4l2_subdev *sd)
sd                 35 drivers/media/i2c/tw9903.c 	return container_of(sd, struct tw9903, sd);
sd                 90 drivers/media/i2c/tw9903.c static int write_reg(struct v4l2_subdev *sd, u8 reg, u8 value)
sd                 92 drivers/media/i2c/tw9903.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 97 drivers/media/i2c/tw9903.c static int write_regs(struct v4l2_subdev *sd, const u8 *regs)
sd                102 drivers/media/i2c/tw9903.c 		if (write_reg(sd, regs[i], regs[i + 1]) < 0)
sd                107 drivers/media/i2c/tw9903.c static int tw9903_s_video_routing(struct v4l2_subdev *sd, u32 input,
sd                110 drivers/media/i2c/tw9903.c 	write_reg(sd, 0x02, 0x40 | (input << 1));
sd                114 drivers/media/i2c/tw9903.c static int tw9903_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
sd                116 drivers/media/i2c/tw9903.c 	struct tw9903 *dec = to_state(sd);
sd                133 drivers/media/i2c/tw9903.c 	write_regs(sd, is_60hz ? config_60hz : config_50hz);
sd                142 drivers/media/i2c/tw9903.c 	struct v4l2_subdev *sd = &dec->sd;
sd                146 drivers/media/i2c/tw9903.c 		write_reg(sd, 0x10, ctrl->val);
sd                149 drivers/media/i2c/tw9903.c 		write_reg(sd, 0x11, ctrl->val);
sd                152 drivers/media/i2c/tw9903.c 		write_reg(sd, 0x15, ctrl->val);
sd                160 drivers/media/i2c/tw9903.c static int tw9903_log_status(struct v4l2_subdev *sd)
sd                162 drivers/media/i2c/tw9903.c 	struct tw9903 *dec = to_state(sd);
sd                165 drivers/media/i2c/tw9903.c 	v4l2_info(sd, "Standard: %d Hz\n", is_60hz ? 60 : 50);
sd                166 drivers/media/i2c/tw9903.c 	v4l2_ctrl_subdev_log_status(sd);
sd                196 drivers/media/i2c/tw9903.c 	struct v4l2_subdev *sd;
sd                209 drivers/media/i2c/tw9903.c 	sd = &dec->sd;
sd                210 drivers/media/i2c/tw9903.c 	v4l2_i2c_subdev_init(sd, client, &tw9903_ops);
sd                219 drivers/media/i2c/tw9903.c 	sd->ctrl_handler = hdl;
sd                230 drivers/media/i2c/tw9903.c 	if (write_regs(sd, initial_registers) < 0) {
sd                240 drivers/media/i2c/tw9903.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                242 drivers/media/i2c/tw9903.c 	v4l2_device_unregister_subdev(sd);
sd                243 drivers/media/i2c/tw9903.c 	v4l2_ctrl_handler_free(&to_state(sd)->hdl);
sd                 19 drivers/media/i2c/tw9906.c 	struct v4l2_subdev sd;
sd                 24 drivers/media/i2c/tw9906.c static inline struct tw9906 *to_state(struct v4l2_subdev *sd)
sd                 26 drivers/media/i2c/tw9906.c 	return container_of(sd, struct tw9906, sd);
sd                 61 drivers/media/i2c/tw9906.c static int write_reg(struct v4l2_subdev *sd, u8 reg, u8 value)
sd                 63 drivers/media/i2c/tw9906.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 68 drivers/media/i2c/tw9906.c static int write_regs(struct v4l2_subdev *sd, const u8 *regs)
sd                 73 drivers/media/i2c/tw9906.c 		if (write_reg(sd, regs[i], regs[i + 1]) < 0)
sd                 78 drivers/media/i2c/tw9906.c static int tw9906_s_video_routing(struct v4l2_subdev *sd, u32 input,
sd                 81 drivers/media/i2c/tw9906.c 	write_reg(sd, 0x02, 0x40 | (input << 1));
sd                 85 drivers/media/i2c/tw9906.c static int tw9906_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
sd                 87 drivers/media/i2c/tw9906.c 	struct tw9906 *dec = to_state(sd);
sd                104 drivers/media/i2c/tw9906.c 	write_regs(sd, is_60hz ? config_60hz : config_50hz);
sd                112 drivers/media/i2c/tw9906.c 	struct v4l2_subdev *sd = &dec->sd;
sd                116 drivers/media/i2c/tw9906.c 		write_reg(sd, 0x10, ctrl->val);
sd                119 drivers/media/i2c/tw9906.c 		write_reg(sd, 0x11, ctrl->val);
sd                122 drivers/media/i2c/tw9906.c 		write_reg(sd, 0x15, ctrl->val);
sd                130 drivers/media/i2c/tw9906.c static int tw9906_log_status(struct v4l2_subdev *sd)
sd                132 drivers/media/i2c/tw9906.c 	struct tw9906 *dec = to_state(sd);
sd                135 drivers/media/i2c/tw9906.c 	v4l2_info(sd, "Standard: %d Hz\n", is_60hz ? 60 : 50);
sd                136 drivers/media/i2c/tw9906.c 	v4l2_ctrl_subdev_log_status(sd);
sd                164 drivers/media/i2c/tw9906.c 	struct v4l2_subdev *sd;
sd                177 drivers/media/i2c/tw9906.c 	sd = &dec->sd;
sd                178 drivers/media/i2c/tw9906.c 	v4l2_i2c_subdev_init(sd, client, &tw9906_ops);
sd                187 drivers/media/i2c/tw9906.c 	sd->ctrl_handler = hdl;
sd                198 drivers/media/i2c/tw9906.c 	if (write_regs(sd, initial_registers) < 0) {
sd                208 drivers/media/i2c/tw9906.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                210 drivers/media/i2c/tw9906.c 	v4l2_device_unregister_subdev(sd);
sd                211 drivers/media/i2c/tw9906.c 	v4l2_ctrl_handler_free(&to_state(sd)->hdl);
sd                461 drivers/media/i2c/tw9910.c static int tw9910_s_stream(struct v4l2_subdev *sd, int enable)
sd                463 drivers/media/i2c/tw9910.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                501 drivers/media/i2c/tw9910.c static int tw9910_g_std(struct v4l2_subdev *sd, v4l2_std_id *norm)
sd                503 drivers/media/i2c/tw9910.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                511 drivers/media/i2c/tw9910.c static int tw9910_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
sd                513 drivers/media/i2c/tw9910.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                551 drivers/media/i2c/tw9910.c static int tw9910_g_register(struct v4l2_subdev *sd,
sd                554 drivers/media/i2c/tw9910.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                574 drivers/media/i2c/tw9910.c static int tw9910_s_register(struct v4l2_subdev *sd,
sd                577 drivers/media/i2c/tw9910.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                641 drivers/media/i2c/tw9910.c static int tw9910_s_power(struct v4l2_subdev *sd, int on)
sd                643 drivers/media/i2c/tw9910.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                649 drivers/media/i2c/tw9910.c static int tw9910_set_frame(struct v4l2_subdev *sd, u32 *width, u32 *height)
sd                651 drivers/media/i2c/tw9910.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                722 drivers/media/i2c/tw9910.c static int tw9910_get_selection(struct v4l2_subdev *sd,
sd                726 drivers/media/i2c/tw9910.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                748 drivers/media/i2c/tw9910.c static int tw9910_get_fmt(struct v4l2_subdev *sd,
sd                753 drivers/media/i2c/tw9910.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                774 drivers/media/i2c/tw9910.c static int tw9910_s_fmt(struct v4l2_subdev *sd,
sd                789 drivers/media/i2c/tw9910.c 	ret = tw9910_set_frame(sd, &width, &height);
sd                799 drivers/media/i2c/tw9910.c static int tw9910_set_fmt(struct v4l2_subdev *sd,
sd                804 drivers/media/i2c/tw9910.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                830 drivers/media/i2c/tw9910.c 		return tw9910_s_fmt(sd, mf);
sd                888 drivers/media/i2c/tw9910.c static int tw9910_enum_mbus_code(struct v4l2_subdev *sd,
sd                900 drivers/media/i2c/tw9910.c static int tw9910_g_tvnorms(struct v4l2_subdev *sd, v4l2_std_id *norm)
sd                 21 drivers/media/i2c/uda1342.c static int uda1342_s_routing(struct v4l2_subdev *sd,
sd                 24 drivers/media/i2c/uda1342.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 34 drivers/media/i2c/uda1342.c 		v4l2_err(sd, "input %d not supported\n", input);
sd                 52 drivers/media/i2c/uda1342.c 	struct v4l2_subdev *sd;
sd                 60 drivers/media/i2c/uda1342.c 	sd = devm_kzalloc(&client->dev, sizeof(*sd), GFP_KERNEL);
sd                 61 drivers/media/i2c/uda1342.c 	if (sd == NULL)
sd                 64 drivers/media/i2c/uda1342.c 	v4l2_i2c_subdev_init(sd, client, &uda1342_ops);
sd                 77 drivers/media/i2c/uda1342.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                 79 drivers/media/i2c/uda1342.c 	v4l2_device_unregister_subdev(sd);
sd                 50 drivers/media/i2c/upd64031a.c 	struct v4l2_subdev sd;
sd                 58 drivers/media/i2c/upd64031a.c static inline struct upd64031a_state *to_state(struct v4l2_subdev *sd)
sd                 60 drivers/media/i2c/upd64031a.c 	return container_of(sd, struct upd64031a_state, sd);
sd                 72 drivers/media/i2c/upd64031a.c static u8 upd64031a_read(struct v4l2_subdev *sd, u8 reg)
sd                 74 drivers/media/i2c/upd64031a.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 85 drivers/media/i2c/upd64031a.c static void upd64031a_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                 87 drivers/media/i2c/upd64031a.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 92 drivers/media/i2c/upd64031a.c 	v4l2_dbg(1, debug, sd, "write reg: %02X val: %02X\n", reg, val);
sd                 94 drivers/media/i2c/upd64031a.c 		v4l2_err(sd, "I/O error write 0x%02x/0x%02x\n", reg, val);
sd                100 drivers/media/i2c/upd64031a.c static int upd64031a_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *freq)
sd                102 drivers/media/i2c/upd64031a.c 	struct upd64031a_state *state = to_state(sd);
sd                105 drivers/media/i2c/upd64031a.c 	v4l2_dbg(1, debug, sd, "changed input or channel\n");
sd                106 drivers/media/i2c/upd64031a.c 	upd64031a_write(sd, R00, reg | 0x10);
sd                107 drivers/media/i2c/upd64031a.c 	upd64031a_write(sd, R00, reg & ~0x10);
sd                113 drivers/media/i2c/upd64031a.c static int upd64031a_s_routing(struct v4l2_subdev *sd,
sd                116 drivers/media/i2c/upd64031a.c 	struct upd64031a_state *state = to_state(sd);
sd                130 drivers/media/i2c/upd64031a.c 	upd64031a_write(sd, R00, r00);
sd                131 drivers/media/i2c/upd64031a.c 	upd64031a_write(sd, R05, r05);
sd                132 drivers/media/i2c/upd64031a.c 	upd64031a_write(sd, R08, r08);
sd                133 drivers/media/i2c/upd64031a.c 	return upd64031a_s_frequency(sd, NULL);
sd                136 drivers/media/i2c/upd64031a.c static int upd64031a_log_status(struct v4l2_subdev *sd)
sd                138 drivers/media/i2c/upd64031a.c 	v4l2_info(sd, "Status: SA00=0x%02x SA01=0x%02x\n",
sd                139 drivers/media/i2c/upd64031a.c 			upd64031a_read(sd, 0), upd64031a_read(sd, 1));
sd                144 drivers/media/i2c/upd64031a.c static int upd64031a_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
sd                146 drivers/media/i2c/upd64031a.c 	reg->val = upd64031a_read(sd, reg->reg & 0xff);
sd                151 drivers/media/i2c/upd64031a.c static int upd64031a_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
sd                153 drivers/media/i2c/upd64031a.c 	upd64031a_write(sd, reg->reg & 0xff, reg->val & 0xff);
sd                190 drivers/media/i2c/upd64031a.c 	struct v4l2_subdev *sd;
sd                202 drivers/media/i2c/upd64031a.c 	sd = &state->sd;
sd                203 drivers/media/i2c/upd64031a.c 	v4l2_i2c_subdev_init(sd, client, &upd64031a_ops);
sd                209 drivers/media/i2c/upd64031a.c 		upd64031a_write(sd, i, state->regs[i]);
sd                215 drivers/media/i2c/upd64031a.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                217 drivers/media/i2c/upd64031a.c 	v4l2_device_unregister_subdev(sd);
sd                 38 drivers/media/i2c/upd64083.c 	struct v4l2_subdev sd;
sd                 44 drivers/media/i2c/upd64083.c static inline struct upd64083_state *to_state(struct v4l2_subdev *sd)
sd                 46 drivers/media/i2c/upd64083.c 	return container_of(sd, struct upd64083_state, sd);
sd                 61 drivers/media/i2c/upd64083.c static void upd64083_write(struct v4l2_subdev *sd, u8 reg, u8 val)
sd                 63 drivers/media/i2c/upd64083.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 68 drivers/media/i2c/upd64083.c 	v4l2_dbg(1, debug, sd, "write reg: %02x val: %02x\n", reg, val);
sd                 70 drivers/media/i2c/upd64083.c 		v4l2_err(sd, "I/O error write 0x%02x/0x%02x\n", reg, val);
sd                 76 drivers/media/i2c/upd64083.c static u8 upd64083_read(struct v4l2_subdev *sd, u8 reg)
sd                 78 drivers/media/i2c/upd64083.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 90 drivers/media/i2c/upd64083.c static int upd64083_s_routing(struct v4l2_subdev *sd,
sd                 93 drivers/media/i2c/upd64083.c 	struct upd64083_state *state = to_state(sd);
sd                102 drivers/media/i2c/upd64083.c 	upd64083_write(sd, R00, r00);
sd                103 drivers/media/i2c/upd64083.c 	upd64083_write(sd, R02, r02);
sd                108 drivers/media/i2c/upd64083.c static int upd64083_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
sd                110 drivers/media/i2c/upd64083.c 	reg->val = upd64083_read(sd, reg->reg & 0xff);
sd                115 drivers/media/i2c/upd64083.c static int upd64083_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
sd                117 drivers/media/i2c/upd64083.c 	upd64083_write(sd, reg->reg & 0xff, reg->val & 0xff);
sd                122 drivers/media/i2c/upd64083.c static int upd64083_log_status(struct v4l2_subdev *sd)
sd                124 drivers/media/i2c/upd64083.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                128 drivers/media/i2c/upd64083.c 	v4l2_info(sd, "Status: SA00=%02x SA01=%02x SA02=%02x SA03=%02x "
sd                161 drivers/media/i2c/upd64083.c 	struct v4l2_subdev *sd;
sd                173 drivers/media/i2c/upd64083.c 	sd = &state->sd;
sd                174 drivers/media/i2c/upd64083.c 	v4l2_i2c_subdev_init(sd, client, &upd64083_ops);
sd                180 drivers/media/i2c/upd64083.c 		upd64083_write(sd, i, state->regs[i]);
sd                186 drivers/media/i2c/upd64083.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                188 drivers/media/i2c/upd64083.c 	v4l2_device_unregister_subdev(sd);
sd                 28 drivers/media/i2c/vp27smpx.c 	struct v4l2_subdev sd;
sd                 33 drivers/media/i2c/vp27smpx.c static inline struct vp27smpx_state *to_state(struct v4l2_subdev *sd)
sd                 35 drivers/media/i2c/vp27smpx.c 	return container_of(sd, struct vp27smpx_state, sd);
sd                 38 drivers/media/i2c/vp27smpx.c static void vp27smpx_set_audmode(struct v4l2_subdev *sd, u32 audmode)
sd                 40 drivers/media/i2c/vp27smpx.c 	struct vp27smpx_state *state = to_state(sd);
sd                 41 drivers/media/i2c/vp27smpx.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 58 drivers/media/i2c/vp27smpx.c 		v4l2_err(sd, "I/O error setting audmode\n");
sd                 63 drivers/media/i2c/vp27smpx.c static int vp27smpx_s_radio(struct v4l2_subdev *sd)
sd                 65 drivers/media/i2c/vp27smpx.c 	struct vp27smpx_state *state = to_state(sd);
sd                 71 drivers/media/i2c/vp27smpx.c static int vp27smpx_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
sd                 73 drivers/media/i2c/vp27smpx.c 	struct vp27smpx_state *state = to_state(sd);
sd                 79 drivers/media/i2c/vp27smpx.c static int vp27smpx_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
sd                 81 drivers/media/i2c/vp27smpx.c 	struct vp27smpx_state *state = to_state(sd);
sd                 84 drivers/media/i2c/vp27smpx.c 		vp27smpx_set_audmode(sd, vt->audmode);
sd                 88 drivers/media/i2c/vp27smpx.c static int vp27smpx_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
sd                 90 drivers/media/i2c/vp27smpx.c 	struct vp27smpx_state *state = to_state(sd);
sd                101 drivers/media/i2c/vp27smpx.c static int vp27smpx_log_status(struct v4l2_subdev *sd)
sd                103 drivers/media/i2c/vp27smpx.c 	struct vp27smpx_state *state = to_state(sd);
sd                105 drivers/media/i2c/vp27smpx.c 	v4l2_info(sd, "Audio Mode: %u%s\n", state->audmode,
sd                145 drivers/media/i2c/vp27smpx.c 	struct v4l2_subdev *sd;
sd                157 drivers/media/i2c/vp27smpx.c 	sd = &state->sd;
sd                158 drivers/media/i2c/vp27smpx.c 	v4l2_i2c_subdev_init(sd, client, &vp27smpx_ops);
sd                162 drivers/media/i2c/vp27smpx.c 	vp27smpx_set_audmode(sd, state->audmode);
sd                168 drivers/media/i2c/vp27smpx.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                170 drivers/media/i2c/vp27smpx.c 	v4l2_device_unregister_subdev(sd);
sd                 33 drivers/media/i2c/vpx3220.c 	struct v4l2_subdev sd;
sd                 42 drivers/media/i2c/vpx3220.c static inline struct vpx3220 *to_vpx3220(struct v4l2_subdev *sd)
sd                 44 drivers/media/i2c/vpx3220.c 	return container_of(sd, struct vpx3220, sd);
sd                 49 drivers/media/i2c/vpx3220.c 	return &container_of(ctrl->handler, struct vpx3220, hdl)->sd;
sd                 56 drivers/media/i2c/vpx3220.c static inline int vpx3220_write(struct v4l2_subdev *sd, u8 reg, u8 value)
sd                 58 drivers/media/i2c/vpx3220.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 65 drivers/media/i2c/vpx3220.c static inline int vpx3220_read(struct v4l2_subdev *sd, u8 reg)
sd                 67 drivers/media/i2c/vpx3220.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 72 drivers/media/i2c/vpx3220.c static int vpx3220_fp_status(struct v4l2_subdev *sd)
sd                 78 drivers/media/i2c/vpx3220.c 		status = vpx3220_read(sd, 0x29);
sd                 92 drivers/media/i2c/vpx3220.c static int vpx3220_fp_write(struct v4l2_subdev *sd, u8 fpaddr, u16 data)
sd                 94 drivers/media/i2c/vpx3220.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 98 drivers/media/i2c/vpx3220.c 		v4l2_dbg(1, debug, sd, "%s: failed\n", __func__);
sd                102 drivers/media/i2c/vpx3220.c 	if (vpx3220_fp_status(sd) < 0)
sd                107 drivers/media/i2c/vpx3220.c 		v4l2_dbg(1, debug, sd, "%s: failed\n", __func__);
sd                114 drivers/media/i2c/vpx3220.c static int vpx3220_fp_read(struct v4l2_subdev *sd, u16 fpaddr)
sd                116 drivers/media/i2c/vpx3220.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                121 drivers/media/i2c/vpx3220.c 		v4l2_dbg(1, debug, sd, "%s: failed\n", __func__);
sd                125 drivers/media/i2c/vpx3220.c 	if (vpx3220_fp_status(sd) < 0)
sd                131 drivers/media/i2c/vpx3220.c 		v4l2_dbg(1, debug, sd, "%s: failed\n", __func__);
sd                138 drivers/media/i2c/vpx3220.c static int vpx3220_write_block(struct v4l2_subdev *sd, const u8 *data, unsigned int len)
sd                145 drivers/media/i2c/vpx3220.c 		ret = vpx3220_write(sd, reg, *data++);
sd                154 drivers/media/i2c/vpx3220.c static int vpx3220_write_fp_block(struct v4l2_subdev *sd,
sd                162 drivers/media/i2c/vpx3220.c 		ret |= vpx3220_fp_write(sd, reg, *data++);
sd                265 drivers/media/i2c/vpx3220.c static int vpx3220_init(struct v4l2_subdev *sd, u32 val)
sd                267 drivers/media/i2c/vpx3220.c 	struct vpx3220 *decoder = to_vpx3220(sd);
sd                269 drivers/media/i2c/vpx3220.c 	vpx3220_write_block(sd, init_common, sizeof(init_common));
sd                270 drivers/media/i2c/vpx3220.c 	vpx3220_write_fp_block(sd, init_fp, sizeof(init_fp) >> 1);
sd                272 drivers/media/i2c/vpx3220.c 		vpx3220_write_fp_block(sd, init_ntsc, sizeof(init_ntsc) >> 1);
sd                274 drivers/media/i2c/vpx3220.c 		vpx3220_write_fp_block(sd, init_pal, sizeof(init_pal) >> 1);
sd                276 drivers/media/i2c/vpx3220.c 		vpx3220_write_fp_block(sd, init_secam, sizeof(init_secam) >> 1);
sd                278 drivers/media/i2c/vpx3220.c 		vpx3220_write_fp_block(sd, init_pal, sizeof(init_pal) >> 1);
sd                282 drivers/media/i2c/vpx3220.c static int vpx3220_status(struct v4l2_subdev *sd, u32 *pstatus, v4l2_std_id *pstd)
sd                287 drivers/media/i2c/vpx3220.c 	status = vpx3220_fp_read(sd, 0x0f3);
sd                289 drivers/media/i2c/vpx3220.c 	v4l2_dbg(1, debug, sd, "status: 0x%04x\n", status);
sd                325 drivers/media/i2c/vpx3220.c static int vpx3220_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
sd                327 drivers/media/i2c/vpx3220.c 	v4l2_dbg(1, debug, sd, "querystd\n");
sd                328 drivers/media/i2c/vpx3220.c 	return vpx3220_status(sd, NULL, std);
sd                331 drivers/media/i2c/vpx3220.c static int vpx3220_g_input_status(struct v4l2_subdev *sd, u32 *status)
sd                333 drivers/media/i2c/vpx3220.c 	v4l2_dbg(1, debug, sd, "g_input_status\n");
sd                334 drivers/media/i2c/vpx3220.c 	return vpx3220_status(sd, status, NULL);
sd                337 drivers/media/i2c/vpx3220.c static int vpx3220_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd                339 drivers/media/i2c/vpx3220.c 	struct vpx3220 *decoder = to_vpx3220(sd);
sd                345 drivers/media/i2c/vpx3220.c 	temp_input = vpx3220_fp_read(sd, 0xf2);
sd                347 drivers/media/i2c/vpx3220.c 	v4l2_dbg(1, debug, sd, "s_std %llx\n", (unsigned long long)std);
sd                349 drivers/media/i2c/vpx3220.c 		vpx3220_write_fp_block(sd, init_ntsc, sizeof(init_ntsc) >> 1);
sd                350 drivers/media/i2c/vpx3220.c 		v4l2_dbg(1, debug, sd, "norm switched to NTSC\n");
sd                352 drivers/media/i2c/vpx3220.c 		vpx3220_write_fp_block(sd, init_pal, sizeof(init_pal) >> 1);
sd                353 drivers/media/i2c/vpx3220.c 		v4l2_dbg(1, debug, sd, "norm switched to PAL\n");
sd                355 drivers/media/i2c/vpx3220.c 		vpx3220_write_fp_block(sd, init_secam, sizeof(init_secam) >> 1);
sd                356 drivers/media/i2c/vpx3220.c 		v4l2_dbg(1, debug, sd, "norm switched to SECAM\n");
sd                364 drivers/media/i2c/vpx3220.c 	vpx3220_fp_write(sd, 0xf2, temp_input | 0x0010);
sd                369 drivers/media/i2c/vpx3220.c static int vpx3220_s_routing(struct v4l2_subdev *sd,
sd                387 drivers/media/i2c/vpx3220.c 	v4l2_dbg(1, debug, sd, "input switched to %s\n", inputs[input]);
sd                389 drivers/media/i2c/vpx3220.c 	vpx3220_write(sd, 0x33, input_vals[input][0]);
sd                391 drivers/media/i2c/vpx3220.c 	data = vpx3220_fp_read(sd, 0xf2) & ~(0x0020);
sd                395 drivers/media/i2c/vpx3220.c 	vpx3220_fp_write(sd, 0xf2,
sd                402 drivers/media/i2c/vpx3220.c static int vpx3220_s_stream(struct v4l2_subdev *sd, int enable)
sd                404 drivers/media/i2c/vpx3220.c 	v4l2_dbg(1, debug, sd, "s_stream %s\n", enable ? "on" : "off");
sd                406 drivers/media/i2c/vpx3220.c 	vpx3220_write(sd, 0xf2, (enable ? 0x1b : 0x00));
sd                412 drivers/media/i2c/vpx3220.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                416 drivers/media/i2c/vpx3220.c 		vpx3220_write(sd, 0xe6, ctrl->val);
sd                420 drivers/media/i2c/vpx3220.c 		vpx3220_write(sd, 0xe7, ctrl->val + 192);
sd                423 drivers/media/i2c/vpx3220.c 		vpx3220_fp_write(sd, 0xa0, ctrl->val);
sd                426 drivers/media/i2c/vpx3220.c 		vpx3220_fp_write(sd, 0x1c, ctrl->val);
sd                463 drivers/media/i2c/vpx3220.c 	struct v4l2_subdev *sd;
sd                476 drivers/media/i2c/vpx3220.c 	sd = &decoder->sd;
sd                477 drivers/media/i2c/vpx3220.c 	v4l2_i2c_subdev_init(sd, client, &vpx3220_ops);
sd                490 drivers/media/i2c/vpx3220.c 	sd->ctrl_handler = &decoder->hdl;
sd                516 drivers/media/i2c/vpx3220.c 		v4l2_info(sd, "%s found @ 0x%x (%s)\n", name,
sd                519 drivers/media/i2c/vpx3220.c 		v4l2_info(sd, "chip (%02x:%04x) found @ 0x%x (%s)\n",
sd                522 drivers/media/i2c/vpx3220.c 	vpx3220_write_block(sd, init_common, sizeof(init_common));
sd                523 drivers/media/i2c/vpx3220.c 	vpx3220_write_fp_block(sd, init_fp, sizeof(init_fp) >> 1);
sd                525 drivers/media/i2c/vpx3220.c 	vpx3220_write_fp_block(sd, init_pal, sizeof(init_pal) >> 1);
sd                531 drivers/media/i2c/vpx3220.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                532 drivers/media/i2c/vpx3220.c 	struct vpx3220 *decoder = to_vpx3220(sd);
sd                534 drivers/media/i2c/vpx3220.c 	v4l2_device_unregister_subdev(sd);
sd                 28 drivers/media/i2c/vs6624.c 	struct v4l2_subdev sd;
sd                473 drivers/media/i2c/vs6624.c static inline struct vs6624 *to_vs6624(struct v4l2_subdev *sd)
sd                475 drivers/media/i2c/vs6624.c 	return container_of(sd, struct vs6624, sd);
sd                479 drivers/media/i2c/vs6624.c 	return &container_of(ctrl->handler, struct vs6624, hdl)->sd;
sd                483 drivers/media/i2c/vs6624.c static int vs6624_read(struct v4l2_subdev *sd, u16 index)
sd                485 drivers/media/i2c/vs6624.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                497 drivers/media/i2c/vs6624.c static int vs6624_write(struct v4l2_subdev *sd, u16 index,
sd                500 drivers/media/i2c/vs6624.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                510 drivers/media/i2c/vs6624.c static int vs6624_writeregs(struct v4l2_subdev *sd, const u16 *regs)
sd                519 drivers/media/i2c/vs6624.c 		vs6624_write(sd, reg, data);
sd                526 drivers/media/i2c/vs6624.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                530 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_CONTRAST0, ctrl->val);
sd                533 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_SATURATION0, ctrl->val);
sd                536 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_HMIRROR0, ctrl->val);
sd                539 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_VFLIP0, ctrl->val);
sd                548 drivers/media/i2c/vs6624.c static int vs6624_enum_mbus_code(struct v4l2_subdev *sd,
sd                559 drivers/media/i2c/vs6624.c static int vs6624_set_fmt(struct v4l2_subdev *sd,
sd                564 drivers/media/i2c/vs6624.c 	struct vs6624 *sensor = to_vs6624(sd);
sd                597 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_IMG_FMT0, 0x0);
sd                598 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_YUV_SETUP, 0x1);
sd                601 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_IMG_FMT0, 0x0);
sd                602 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_YUV_SETUP, 0x3);
sd                605 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_IMG_FMT0, 0x4);
sd                606 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_RGB_SETUP, 0x0);
sd                614 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_IMAGE_SIZE0, 0x2);
sd                616 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_IMAGE_SIZE0, 0x4);
sd                618 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_IMAGE_SIZE0, 0x6);
sd                620 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_IMAGE_SIZE0, 0x3);
sd                622 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_IMAGE_SIZE0, 0x5);
sd                624 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_IMAGE_SIZE0, 0x7);
sd                626 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_IMAGE_SIZE0, 0x8);
sd                627 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_MAN_HSIZE0_MSB, fmt->width >> 8);
sd                628 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_MAN_HSIZE0_LSB, fmt->width & 0xFF);
sd                629 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_MAN_VSIZE0_MSB, fmt->height >> 8);
sd                630 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_MAN_VSIZE0_LSB, fmt->height & 0xFF);
sd                631 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_CROP_CTRL0, 0x1);
sd                639 drivers/media/i2c/vs6624.c static int vs6624_get_fmt(struct v4l2_subdev *sd,
sd                643 drivers/media/i2c/vs6624.c 	struct vs6624 *sensor = to_vs6624(sd);
sd                652 drivers/media/i2c/vs6624.c static int vs6624_g_frame_interval(struct v4l2_subdev *sd,
sd                655 drivers/media/i2c/vs6624.c 	struct vs6624 *sensor = to_vs6624(sd);
sd                662 drivers/media/i2c/vs6624.c static int vs6624_s_frame_interval(struct v4l2_subdev *sd,
sd                665 drivers/media/i2c/vs6624.c 	struct vs6624 *sensor = to_vs6624(sd);
sd                677 drivers/media/i2c/vs6624.c 	vs6624_write(sd, VS6624_DISABLE_FR_DAMPER, 0x0);
sd                678 drivers/media/i2c/vs6624.c 	vs6624_write(sd, VS6624_FR_NUM_MSB,
sd                680 drivers/media/i2c/vs6624.c 	vs6624_write(sd, VS6624_FR_NUM_LSB,
sd                682 drivers/media/i2c/vs6624.c 	vs6624_write(sd, VS6624_FR_DEN,
sd                687 drivers/media/i2c/vs6624.c static int vs6624_s_stream(struct v4l2_subdev *sd, int enable)
sd                690 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_USER_CMD, 0x2);
sd                692 drivers/media/i2c/vs6624.c 		vs6624_write(sd, VS6624_USER_CMD, 0x4);
sd                698 drivers/media/i2c/vs6624.c static int vs6624_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
sd                700 drivers/media/i2c/vs6624.c 	reg->val = vs6624_read(sd, reg->reg & 0xffff);
sd                705 drivers/media/i2c/vs6624.c static int vs6624_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
sd                707 drivers/media/i2c/vs6624.c 	vs6624_write(sd, reg->reg & 0xffff, reg->val & 0xff);
sd                745 drivers/media/i2c/vs6624.c 	struct v4l2_subdev *sd;
sd                771 drivers/media/i2c/vs6624.c 	sd = &sensor->sd;
sd                772 drivers/media/i2c/vs6624.c 	v4l2_i2c_subdev_init(sd, client, &vs6624_ops);
sd                774 drivers/media/i2c/vs6624.c 	vs6624_writeregs(sd, vs6624_p1);
sd                775 drivers/media/i2c/vs6624.c 	vs6624_write(sd, VS6624_MICRO_EN, 0x2);
sd                776 drivers/media/i2c/vs6624.c 	vs6624_write(sd, VS6624_DIO_EN, 0x1);
sd                778 drivers/media/i2c/vs6624.c 	vs6624_writeregs(sd, vs6624_p2);
sd                780 drivers/media/i2c/vs6624.c 	vs6624_writeregs(sd, vs6624_default);
sd                781 drivers/media/i2c/vs6624.c 	vs6624_write(sd, VS6624_HSYNC_SETUP, 0xF);
sd                782 drivers/media/i2c/vs6624.c 	vs6624_writeregs(sd, vs6624_run_setup);
sd                787 drivers/media/i2c/vs6624.c 	vs6624_write(sd, VS6624_DISABLE_FR_DAMPER, 0x0);
sd                788 drivers/media/i2c/vs6624.c 	vs6624_write(sd, VS6624_FR_NUM_MSB,
sd                790 drivers/media/i2c/vs6624.c 	vs6624_write(sd, VS6624_FR_NUM_LSB,
sd                792 drivers/media/i2c/vs6624.c 	vs6624_write(sd, VS6624_FR_DEN,
sd                812 drivers/media/i2c/vs6624.c 	sd->ctrl_handler = hdl;
sd                829 drivers/media/i2c/vs6624.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                831 drivers/media/i2c/vs6624.c 	v4l2_device_unregister_subdev(sd);
sd                832 drivers/media/i2c/vs6624.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                 41 drivers/media/i2c/wm8739.c 	struct v4l2_subdev sd;
sd                 52 drivers/media/i2c/wm8739.c static inline struct wm8739_state *to_state(struct v4l2_subdev *sd)
sd                 54 drivers/media/i2c/wm8739.c 	return container_of(sd, struct wm8739_state, sd);
sd                 59 drivers/media/i2c/wm8739.c 	return &container_of(ctrl->handler, struct wm8739_state, hdl)->sd;
sd                 64 drivers/media/i2c/wm8739.c static int wm8739_write(struct v4l2_subdev *sd, int reg, u16 val)
sd                 66 drivers/media/i2c/wm8739.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 70 drivers/media/i2c/wm8739.c 		v4l2_err(sd, "Invalid register R%d\n", reg);
sd                 74 drivers/media/i2c/wm8739.c 	v4l2_dbg(1, debug, sd, "write: %02x %02x\n", reg, val);
sd                 80 drivers/media/i2c/wm8739.c 	v4l2_err(sd, "I2C: cannot write %03x to register R%d\n", val, reg);
sd                 86 drivers/media/i2c/wm8739.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                 87 drivers/media/i2c/wm8739.c 	struct wm8739_state *state = to_state(sd);
sd                114 drivers/media/i2c/wm8739.c 	wm8739_write(sd, R0, (vol_l & 0x1f) | mute);
sd                115 drivers/media/i2c/wm8739.c 	wm8739_write(sd, R1, (vol_r & 0x1f) | mute);
sd                121 drivers/media/i2c/wm8739.c static int wm8739_s_clock_freq(struct v4l2_subdev *sd, u32 audiofreq)
sd                123 drivers/media/i2c/wm8739.c 	struct wm8739_state *state = to_state(sd);
sd                127 drivers/media/i2c/wm8739.c 	wm8739_write(sd, R9, 0x000);
sd                131 drivers/media/i2c/wm8739.c 		wm8739_write(sd, R8, 0x020);
sd                135 drivers/media/i2c/wm8739.c 		wm8739_write(sd, R8, 0x000);
sd                139 drivers/media/i2c/wm8739.c 		wm8739_write(sd, R8, 0x018);
sd                145 drivers/media/i2c/wm8739.c 	wm8739_write(sd, R9, 0x001);
sd                149 drivers/media/i2c/wm8739.c static int wm8739_log_status(struct v4l2_subdev *sd)
sd                151 drivers/media/i2c/wm8739.c 	struct wm8739_state *state = to_state(sd);
sd                153 drivers/media/i2c/wm8739.c 	v4l2_info(sd, "Frequency: %u Hz\n", state->clock_freq);
sd                154 drivers/media/i2c/wm8739.c 	v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
sd                185 drivers/media/i2c/wm8739.c 	struct v4l2_subdev *sd;
sd                197 drivers/media/i2c/wm8739.c 	sd = &state->sd;
sd                198 drivers/media/i2c/wm8739.c 	v4l2_i2c_subdev_init(sd, client, &wm8739_ops);
sd                206 drivers/media/i2c/wm8739.c 	sd->ctrl_handler = &state->hdl;
sd                220 drivers/media/i2c/wm8739.c 	wm8739_write(sd, R15, 0x00);
sd                222 drivers/media/i2c/wm8739.c 	wm8739_write(sd, R5, 0x000);
sd                224 drivers/media/i2c/wm8739.c 	wm8739_write(sd, R6, 0x000);
sd                227 drivers/media/i2c/wm8739.c 	wm8739_write(sd, R7, 0x049);
sd                229 drivers/media/i2c/wm8739.c 	wm8739_write(sd, R8, 0x000);
sd                231 drivers/media/i2c/wm8739.c 	wm8739_write(sd, R9, 0x001);
sd                239 drivers/media/i2c/wm8739.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                240 drivers/media/i2c/wm8739.c 	struct wm8739_state *state = to_state(sd);
sd                242 drivers/media/i2c/wm8739.c 	v4l2_device_unregister_subdev(sd);
sd                 44 drivers/media/i2c/wm8775.c 	struct v4l2_subdev sd;
sd                 53 drivers/media/i2c/wm8775.c static inline struct wm8775_state *to_state(struct v4l2_subdev *sd)
sd                 55 drivers/media/i2c/wm8775.c 	return container_of(sd, struct wm8775_state, sd);
sd                 60 drivers/media/i2c/wm8775.c 	return &container_of(ctrl->handler, struct wm8775_state, hdl)->sd;
sd                 63 drivers/media/i2c/wm8775.c static int wm8775_write(struct v4l2_subdev *sd, int reg, u16 val)
sd                 65 drivers/media/i2c/wm8775.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 69 drivers/media/i2c/wm8775.c 		v4l2_err(sd, "Invalid register R%d\n", reg);
sd                 77 drivers/media/i2c/wm8775.c 	v4l2_err(sd, "I2C: cannot write %03x to register R%d\n", val, reg);
sd                 81 drivers/media/i2c/wm8775.c static void wm8775_set_audio(struct v4l2_subdev *sd, int quietly)
sd                 83 drivers/media/i2c/wm8775.c 	struct wm8775_state *state = to_state(sd);
sd                 95 drivers/media/i2c/wm8775.c 		wm8775_write(sd, R21, 0x0c0 | state->input);
sd                 97 drivers/media/i2c/wm8775.c 	wm8775_write(sd, R14, vol_l | 0x100); /* 0x100= Left channel ADC zero cross enable */
sd                 98 drivers/media/i2c/wm8775.c 	wm8775_write(sd, R15, vol_r | 0x100); /* 0x100= Right channel ADC zero cross enable */
sd                102 drivers/media/i2c/wm8775.c 		wm8775_write(sd, R21, state->input);
sd                105 drivers/media/i2c/wm8775.c static int wm8775_s_routing(struct v4l2_subdev *sd,
sd                108 drivers/media/i2c/wm8775.c 	struct wm8775_state *state = to_state(sd);
sd                116 drivers/media/i2c/wm8775.c 		v4l2_err(sd, "Invalid input %d.\n", input);
sd                124 drivers/media/i2c/wm8775.c 	wm8775_set_audio(sd, 1);
sd                130 drivers/media/i2c/wm8775.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                136 drivers/media/i2c/wm8775.c 		wm8775_set_audio(sd, 0);
sd                139 drivers/media/i2c/wm8775.c 		wm8775_write(sd, R17, (ctrl->val ? ALC_EN : 0) | ALC_HOLD);
sd                145 drivers/media/i2c/wm8775.c static int wm8775_log_status(struct v4l2_subdev *sd)
sd                147 drivers/media/i2c/wm8775.c 	struct wm8775_state *state = to_state(sd);
sd                149 drivers/media/i2c/wm8775.c 	v4l2_info(sd, "Input: %d\n", state->input);
sd                150 drivers/media/i2c/wm8775.c 	v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
sd                154 drivers/media/i2c/wm8775.c static int wm8775_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *freq)
sd                156 drivers/media/i2c/wm8775.c 	wm8775_set_audio(sd, 0);
sd                197 drivers/media/i2c/wm8775.c 	struct v4l2_subdev *sd;
sd                216 drivers/media/i2c/wm8775.c 	sd = &state->sd;
sd                217 drivers/media/i2c/wm8775.c 	v4l2_i2c_subdev_init(sd, client, &wm8775_ops);
sd                229 drivers/media/i2c/wm8775.c 	sd->ctrl_handler = &state->hdl;
sd                239 drivers/media/i2c/wm8775.c 	wm8775_write(sd, R23, 0x000);
sd                241 drivers/media/i2c/wm8775.c 	wm8775_write(sd, R7, 0x000);
sd                243 drivers/media/i2c/wm8775.c 	wm8775_write(sd, R11, 0x021);
sd                245 drivers/media/i2c/wm8775.c 	wm8775_write(sd, R12, 0x102);
sd                247 drivers/media/i2c/wm8775.c 	wm8775_write(sd, R13, 0x000);
sd                251 drivers/media/i2c/wm8775.c 		wm8775_write(sd, R14, 0x1d4);
sd                253 drivers/media/i2c/wm8775.c 		wm8775_write(sd, R15, 0x1d4);
sd                255 drivers/media/i2c/wm8775.c 		wm8775_write(sd, R16, 0x1bf);
sd                258 drivers/media/i2c/wm8775.c 		wm8775_write(sd, R17, 0x185);
sd                261 drivers/media/i2c/wm8775.c 		wm8775_write(sd, R16, 0x1bb);
sd                263 drivers/media/i2c/wm8775.c 		wm8775_write(sd, R17, (state->loud->val ? ALC_EN : 0) | ALC_HOLD);
sd                266 drivers/media/i2c/wm8775.c 	wm8775_write(sd, R18, 0x0a2);
sd                268 drivers/media/i2c/wm8775.c 	wm8775_write(sd, R19, 0x005);
sd                271 drivers/media/i2c/wm8775.c 		wm8775_write(sd, R20, 0x07a);
sd                273 drivers/media/i2c/wm8775.c 		wm8775_write(sd, R21, 0x102);
sd                276 drivers/media/i2c/wm8775.c 		wm8775_write(sd, R20, 0x0fb);
sd                278 drivers/media/i2c/wm8775.c 		wm8775_set_audio(sd, 1);      /* set volume/mute/mux */
sd                285 drivers/media/i2c/wm8775.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                286 drivers/media/i2c/wm8775.c 	struct wm8775_state *state = to_state(sd);
sd                288 drivers/media/i2c/wm8775.c 	v4l2_device_unregister_subdev(sd);
sd               3535 drivers/media/pci/bt8xx/bttv-cards.c 		struct v4l2_subdev *sd;
sd               3537 drivers/media/pci/bt8xx/bttv-cards.c 		sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
sd               3539 drivers/media/pci/bt8xx/bttv-cards.c 		btv->has_saa6588 = (sd != NULL);
sd                123 drivers/media/pci/cobalt/cobalt-driver.c static unsigned cobalt_get_sd_nr(struct v4l2_subdev *sd)
sd                125 drivers/media/pci/cobalt/cobalt-driver.c 	struct cobalt *cobalt = to_cobalt(sd->v4l2_dev);
sd                129 drivers/media/pci/cobalt/cobalt-driver.c 		if (sd == cobalt->streams[i].sd)
sd                135 drivers/media/pci/cobalt/cobalt-driver.c static void cobalt_notify(struct v4l2_subdev *sd,
sd                138 drivers/media/pci/cobalt/cobalt-driver.c 	struct cobalt *cobalt = to_cobalt(sd->v4l2_dev);
sd                139 drivers/media/pci/cobalt/cobalt-driver.c 	unsigned sd_nr = cobalt_get_sd_nr(sd);
sd                512 drivers/media/pci/cobalt/cobalt-driver.c 		s[i].sd = v4l2_i2c_new_subdev_board(&cobalt->v4l2_dev,
sd                514 drivers/media/pci/cobalt/cobalt-driver.c 		if (!s[i].sd) {
sd                519 drivers/media/pci/cobalt/cobalt-driver.c 		err = v4l2_subdev_call(s[i].sd, video, s_routing,
sd                523 drivers/media/pci/cobalt/cobalt-driver.c 		err = v4l2_subdev_call(s[i].sd, pad, set_edid,
sd                527 drivers/media/pci/cobalt/cobalt-driver.c 		err = v4l2_subdev_call(s[i].sd, pad, set_fmt, NULL,
sd                604 drivers/media/pci/cobalt/cobalt-driver.c 	s->sd = v4l2_i2c_new_subdev_board(&cobalt->v4l2_dev,
sd                606 drivers/media/pci/cobalt/cobalt-driver.c 	if (s->sd) {
sd                607 drivers/media/pci/cobalt/cobalt-driver.c 		int err = v4l2_subdev_call(s->sd, pad, set_edid, &cobalt_edid);
sd                611 drivers/media/pci/cobalt/cobalt-driver.c 		err = v4l2_subdev_call(s->sd, pad, set_fmt, NULL,
sd                632 drivers/media/pci/cobalt/cobalt-driver.c 	s->sd = v4l2_i2c_new_subdev_board(&cobalt->v4l2_dev,
sd                634 drivers/media/pci/cobalt/cobalt-driver.c 	if (s->sd) {
sd                643 drivers/media/pci/cobalt/cobalt-driver.c 		v4l2_subdev_call(s->sd, core, s_power, 1);
sd                644 drivers/media/pci/cobalt/cobalt-driver.c 		v4l2_subdev_call(s->sd, video, s_stream, 1);
sd                645 drivers/media/pci/cobalt/cobalt-driver.c 		v4l2_subdev_call(s->sd, audio, s_stream, 1);
sd                646 drivers/media/pci/cobalt/cobalt-driver.c 		v4l2_ctrl_s_ctrl(v4l2_ctrl_find(s->sd->ctrl_handler,
sd                765 drivers/media/pci/cobalt/cobalt-driver.c 		struct v4l2_subdev *sd = cobalt->streams[i].sd;
sd                768 drivers/media/pci/cobalt/cobalt-driver.c 		if (sd == NULL)
sd                770 drivers/media/pci/cobalt/cobalt-driver.c 		client = v4l2_get_subdevdata(sd);
sd                771 drivers/media/pci/cobalt/cobalt-driver.c 		v4l2_device_unregister_subdev(sd);
sd                214 drivers/media/pci/cobalt/cobalt-driver.h 	struct v4l2_subdev *sd;
sd                211 drivers/media/pci/cobalt/cobalt-irq.c 			v4l2_subdev_call(cobalt->streams[i].sd, core,
sd                177 drivers/media/pci/cobalt/cobalt-v4l2.c 	v4l2_subdev_call(s->sd, pad, set_fmt, NULL, &sd_fmt);
sd                228 drivers/media/pci/cobalt/cobalt-v4l2.c 		v4l2_subdev_call(s->sd, pad, set_fmt, NULL,
sd                235 drivers/media/pci/cobalt/cobalt-v4l2.c 		v4l2_subdev_call(s->sd, pad, set_fmt, NULL,
sd                243 drivers/media/pci/cobalt/cobalt-v4l2.c 		v4l2_subdev_call(s->sd, pad, set_fmt, NULL,
sd                588 drivers/media/pci/cobalt/cobalt-v4l2.c 	v4l2_subdev_call(s->sd, core, log_status);
sd                618 drivers/media/pci/cobalt/cobalt-v4l2.c 	return v4l2_subdev_call(s->sd,
sd                639 drivers/media/pci/cobalt/cobalt-v4l2.c 	err = v4l2_subdev_call(s->sd,
sd                659 drivers/media/pci/cobalt/cobalt-v4l2.c 	return v4l2_subdev_call(s->sd,
sd                672 drivers/media/pci/cobalt/cobalt-v4l2.c 	return v4l2_subdev_call(s->sd,
sd                682 drivers/media/pci/cobalt/cobalt-v4l2.c 	return v4l2_subdev_call(s->sd,
sd                723 drivers/media/pci/cobalt/cobalt-v4l2.c 		v4l2_subdev_call(s->sd, pad, get_fmt, NULL, &sd_fmt);
sd                765 drivers/media/pci/cobalt/cobalt-v4l2.c 		v4l2_subdev_call(s->sd, pad, get_fmt, NULL, &sd_fmt);
sd                942 drivers/media/pci/cobalt/cobalt-v4l2.c 	v4l2_subdev_call(s->sd, pad, set_fmt, NULL, &sd_fmt);
sd                963 drivers/media/pci/cobalt/cobalt-v4l2.c 	return v4l2_subdev_call(s->sd,
sd                990 drivers/media/pci/cobalt/cobalt-v4l2.c 	return v4l2_subdev_call(s->sd, video, s_routing,
sd               1025 drivers/media/pci/cobalt/cobalt-v4l2.c 	ret = v4l2_subdev_call(s->sd, pad, get_edid, edid);
sd               1039 drivers/media/pci/cobalt/cobalt-v4l2.c 	ret = v4l2_subdev_call(s->sd, pad, set_edid, edid);
sd               1082 drivers/media/pci/cobalt/cobalt-v4l2.c 		err = v4l2_subdev_call(s->sd, video, g_dv_timings, &timings);
sd               1101 drivers/media/pci/cobalt/cobalt-v4l2.c 		err = v4l2_subdev_call(s->sd, video, g_dv_timings, &timings);
sd               1242 drivers/media/pci/cobalt/cobalt-v4l2.c 		if (s->sd)
sd               1243 drivers/media/pci/cobalt/cobalt-v4l2.c 			vdev->ctrl_handler = s->sd->ctrl_handler;
sd               1245 drivers/media/pci/cobalt/cobalt-v4l2.c 		v4l2_subdev_call(s->sd, video, s_dv_timings, &s->timings);
sd               1246 drivers/media/pci/cobalt/cobalt-v4l2.c 		if (!s->is_output && s->sd)
sd                402 drivers/media/pci/cx18/cx18-av-audio.c int cx18_av_s_clock_freq(struct v4l2_subdev *sd, u32 freq)
sd                404 drivers/media/pci/cx18/cx18-av-audio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                430 drivers/media/pci/cx18/cx18-av-audio.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                431 drivers/media/pci/cx18/cx18-av-audio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                113 drivers/media/pci/cx18/cx18-av-core.c static void cx18_av_initialize(struct v4l2_subdev *sd)
sd                115 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18_av_state *state = to_cx18_av_state(sd);
sd                116 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                255 drivers/media/pci/cx18/cx18-av-core.c static int cx18_av_reset(struct v4l2_subdev *sd, u32 val)
sd                257 drivers/media/pci/cx18/cx18-av-core.c 	cx18_av_initialize(sd);
sd                261 drivers/media/pci/cx18/cx18-av-core.c static int cx18_av_load_fw(struct v4l2_subdev *sd)
sd                263 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18_av_state *state = to_cx18_av_state(sd);
sd                268 drivers/media/pci/cx18/cx18-av-core.c 		cx18_av_initialize(sd);
sd                276 drivers/media/pci/cx18/cx18-av-core.c 	struct v4l2_subdev *sd = &state->sd;
sd                443 drivers/media/pci/cx18/cx18-av-core.c 	CX18_DEBUG_INFO_DEV(sd, "PLL regs = int: %u, frac: %u, post: %u\n",
sd                452 drivers/media/pci/cx18/cx18-av-core.c 		CX18_DEBUG_INFO_DEV(sd, "Video PLL = %d.%06d MHz\n",
sd                454 drivers/media/pci/cx18/cx18-av-core.c 		CX18_DEBUG_INFO_DEV(sd, "Pixel rate = %d.%06d Mpixel/sec\n",
sd                457 drivers/media/pci/cx18/cx18-av-core.c 		CX18_DEBUG_INFO_DEV(sd, "ADC XTAL/pixel clock decimation ratio = %d.%03d\n",
sd                464 drivers/media/pci/cx18/cx18-av-core.c 		CX18_DEBUG_INFO_DEV(sd,
sd                468 drivers/media/pci/cx18/cx18-av-core.c 		CX18_DEBUG_INFO_DEV(sd,
sd                561 drivers/media/pci/cx18/cx18-av-core.c static int cx18_av_s_frequency(struct v4l2_subdev *sd,
sd                564 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                573 drivers/media/pci/cx18/cx18-av-core.c 	struct v4l2_subdev *sd = &state->sd;
sd                585 drivers/media/pci/cx18/cx18-av-core.c 	CX18_DEBUG_INFO_DEV(sd, "decoder set video input %d, audio input %d\n",
sd                605 drivers/media/pci/cx18/cx18-av-core.c 			CX18_ERR_DEV(sd, "0x%06x is not a valid video input!\n",
sd                625 drivers/media/pci/cx18/cx18-av-core.c 			CX18_ERR_DEV(sd, "0x%06x is not a valid video input!\n",
sd                670 drivers/media/pci/cx18/cx18-av-core.c 		CX18_ERR_DEV(sd, "0x%04x is not a valid audio input!\n",
sd                742 drivers/media/pci/cx18/cx18-av-core.c static int cx18_av_s_video_routing(struct v4l2_subdev *sd,
sd                745 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18_av_state *state = to_cx18_av_state(sd);
sd                746 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                750 drivers/media/pci/cx18/cx18-av-core.c static int cx18_av_s_audio_routing(struct v4l2_subdev *sd,
sd                753 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18_av_state *state = to_cx18_av_state(sd);
sd                754 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                758 drivers/media/pci/cx18/cx18-av-core.c static int cx18_av_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
sd                760 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18_av_state *state = to_cx18_av_state(sd);
sd                761 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                795 drivers/media/pci/cx18/cx18-av-core.c static int cx18_av_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
sd                797 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18_av_state *state = to_cx18_av_state(sd);
sd                798 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                840 drivers/media/pci/cx18/cx18-av-core.c static int cx18_av_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
sd                842 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18_av_state *state = to_cx18_av_state(sd);
sd                843 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                878 drivers/media/pci/cx18/cx18-av-core.c 	CX18_DEBUG_INFO_DEV(sd, "changing video std to fmt %i\n", fmt);
sd                896 drivers/media/pci/cx18/cx18-av-core.c static int cx18_av_s_radio(struct v4l2_subdev *sd)
sd                898 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18_av_state *state = to_cx18_av_state(sd);
sd                905 drivers/media/pci/cx18/cx18-av-core.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                906 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                932 drivers/media/pci/cx18/cx18-av-core.c static int cx18_av_set_fmt(struct v4l2_subdev *sd,
sd                937 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18_av_state *state = to_cx18_av_state(sd);
sd                938 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                972 drivers/media/pci/cx18/cx18-av-core.c 		CX18_ERR_DEV(sd, "%dx%d is not a valid size!\n",
sd                993 drivers/media/pci/cx18/cx18-av-core.c 	CX18_DEBUG_INFO_DEV(sd,
sd               1009 drivers/media/pci/cx18/cx18-av-core.c static int cx18_av_s_stream(struct v4l2_subdev *sd, int enable)
sd               1011 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd               1013 drivers/media/pci/cx18/cx18-av-core.c 	CX18_DEBUG_INFO_DEV(sd, "%s output\n", enable ? "enable" : "disable");
sd               1036 drivers/media/pci/cx18/cx18-av-core.c 	struct v4l2_subdev *sd = &state->sd;
sd               1042 drivers/media/pci/cx18/cx18-av-core.c 	CX18_INFO_DEV(sd, "Video signal:              %spresent\n",
sd               1044 drivers/media/pci/cx18/cx18-av-core.c 	CX18_INFO_DEV(sd, "Detected format:           %s\n",
sd               1047 drivers/media/pci/cx18/cx18-av-core.c 	CX18_INFO_DEV(sd, "Specified standard:        %s\n",
sd               1053 drivers/media/pci/cx18/cx18-av-core.c 		CX18_INFO_DEV(sd, "Specified video input:     Composite %d\n",
sd               1056 drivers/media/pci/cx18/cx18-av-core.c 		CX18_INFO_DEV(sd, "Specified video input:     S-Video (Luma In%d, Chroma In%d)\n",
sd               1061 drivers/media/pci/cx18/cx18-av-core.c 	CX18_INFO_DEV(sd, "Specified audioclock freq: %d Hz\n",
sd               1068 drivers/media/pci/cx18/cx18-av-core.c 	struct v4l2_subdev *sd = &state->sd;
sd               1091 drivers/media/pci/cx18/cx18-av-core.c 	CX18_INFO_DEV(sd, "Detected audio mode:       %s\n", p);
sd               1116 drivers/media/pci/cx18/cx18-av-core.c 	CX18_INFO_DEV(sd, "Detected audio standard:   %s\n", p);
sd               1117 drivers/media/pci/cx18/cx18-av-core.c 	CX18_INFO_DEV(sd, "Audio muted:               %s\n",
sd               1119 drivers/media/pci/cx18/cx18-av-core.c 	CX18_INFO_DEV(sd, "Audio microcontroller:     %s\n",
sd               1141 drivers/media/pci/cx18/cx18-av-core.c 	CX18_INFO_DEV(sd, "Configured audio standard: %s\n", p);
sd               1155 drivers/media/pci/cx18/cx18-av-core.c 		CX18_INFO_DEV(sd, "Configured audio mode:     %s\n", p);
sd               1173 drivers/media/pci/cx18/cx18-av-core.c 		CX18_INFO_DEV(sd, "Configured audio system:   %s\n", p);
sd               1177 drivers/media/pci/cx18/cx18-av-core.c 		CX18_INFO_DEV(sd, "Specified audio input:     Tuner (In%d)\n",
sd               1180 drivers/media/pci/cx18/cx18-av-core.c 		CX18_INFO_DEV(sd, "Specified audio input:     External\n");
sd               1193 drivers/media/pci/cx18/cx18-av-core.c 	CX18_INFO_DEV(sd, "Preferred audio mode:      %s\n", p);
sd               1200 drivers/media/pci/cx18/cx18-av-core.c 		CX18_INFO_DEV(sd, "Selected 65 MHz format:    %s\n", p);
sd               1210 drivers/media/pci/cx18/cx18-av-core.c 		CX18_INFO_DEV(sd, "Selected 45 MHz format:    %s\n", p);
sd               1214 drivers/media/pci/cx18/cx18-av-core.c static int cx18_av_log_status(struct v4l2_subdev *sd)
sd               1216 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd               1223 drivers/media/pci/cx18/cx18-av-core.c static int cx18_av_g_register(struct v4l2_subdev *sd,
sd               1226 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd               1235 drivers/media/pci/cx18/cx18-av-core.c static int cx18_av_s_register(struct v4l2_subdev *sd,
sd               1238 drivers/media/pci/cx18/cx18-av-core.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd               1302 drivers/media/pci/cx18/cx18-av-core.c 	struct v4l2_subdev *sd;
sd               1314 drivers/media/pci/cx18/cx18-av-core.c 	sd = &state->sd;
sd               1315 drivers/media/pci/cx18/cx18-av-core.c 	v4l2_subdev_init(sd, &cx18_av_ops);
sd               1316 drivers/media/pci/cx18/cx18-av-core.c 	v4l2_set_subdevdata(sd, cx);
sd               1317 drivers/media/pci/cx18/cx18-av-core.c 	snprintf(sd->name, sizeof(sd->name),
sd               1319 drivers/media/pci/cx18/cx18-av-core.c 	sd->grp_id = CX18_HW_418_AV;
sd               1345 drivers/media/pci/cx18/cx18-av-core.c 	sd->ctrl_handler = &state->hdl;
sd               1352 drivers/media/pci/cx18/cx18-av-core.c 	err = v4l2_device_register_subdev(&cx->v4l2_dev, sd);
sd                 84 drivers/media/pci/cx18/cx18-av-core.h 	struct v4l2_subdev sd;
sd                332 drivers/media/pci/cx18/cx18-av-core.h static inline struct cx18_av_state *to_cx18_av_state(struct v4l2_subdev *sd)
sd                334 drivers/media/pci/cx18/cx18-av-core.h 	return container_of(sd, struct cx18_av_state, sd);
sd                339 drivers/media/pci/cx18/cx18-av-core.h 	return &container_of(ctrl->handler, struct cx18_av_state, hdl)->sd;
sd                364 drivers/media/pci/cx18/cx18-av-core.h int cx18_av_s_clock_freq(struct v4l2_subdev *sd, u32 freq);
sd                370 drivers/media/pci/cx18/cx18-av-core.h int cx18_av_decode_vbi_line(struct v4l2_subdev *sd,
sd                372 drivers/media/pci/cx18/cx18-av-core.h int cx18_av_s_raw_fmt(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt);
sd                373 drivers/media/pci/cx18/cx18-av-core.h int cx18_av_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt);
sd                374 drivers/media/pci/cx18/cx18-av-core.h int cx18_av_s_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt);
sd                 24 drivers/media/pci/cx18/cx18-av-firmware.c 	struct v4l2_subdev *sd = &cx->av_state.sd;
sd                 50 drivers/media/pci/cx18/cx18-av-firmware.c 			CX18_ERR_DEV(sd, "verification of %s firmware load failed: expected %#010x got %#010x\n",
sd                 58 drivers/media/pci/cx18/cx18-av-firmware.c 		CX18_INFO_DEV(sd, "verified load of %s firmware (%d bytes)\n",
sd                 65 drivers/media/pci/cx18/cx18-av-firmware.c 	struct v4l2_subdev *sd = &cx->av_state.sd;
sd                 74 drivers/media/pci/cx18/cx18-av-firmware.c 		CX18_ERR_DEV(sd, "unable to open firmware %s\n", FWFILE);
sd                125 drivers/media/pci/cx18/cx18-av-firmware.c 		CX18_ERR_DEV(sd, "unable to load firmware %s\n", FWFILE);
sd                133 drivers/media/pci/cx18/cx18-av-firmware.c 	CX18_INFO_DEV(sd, "loaded %s firmware (%d bytes)\n", FWFILE, size);
sd                118 drivers/media/pci/cx18/cx18-av-vbi.c int cx18_av_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *svbi)
sd                120 drivers/media/pci/cx18/cx18-av-vbi.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                161 drivers/media/pci/cx18/cx18-av-vbi.c int cx18_av_s_raw_fmt(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt)
sd                163 drivers/media/pci/cx18/cx18-av-vbi.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                175 drivers/media/pci/cx18/cx18-av-vbi.c int cx18_av_s_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *svbi)
sd                177 drivers/media/pci/cx18/cx18-av-vbi.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                245 drivers/media/pci/cx18/cx18-av-vbi.c int cx18_av_decode_vbi_line(struct v4l2_subdev *sd,
sd                248 drivers/media/pci/cx18/cx18-av-vbi.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                 94 drivers/media/pci/cx18/cx18-gpio.c static int gpiomux_log_status(struct v4l2_subdev *sd)
sd                 96 drivers/media/pci/cx18/cx18-gpio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                 99 drivers/media/pci/cx18/cx18-gpio.c 	CX18_INFO_DEV(sd, "GPIO:  direction 0x%08x, value 0x%08x\n",
sd                105 drivers/media/pci/cx18/cx18-gpio.c static int gpiomux_s_radio(struct v4l2_subdev *sd)
sd                107 drivers/media/pci/cx18/cx18-gpio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                119 drivers/media/pci/cx18/cx18-gpio.c static int gpiomux_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
sd                121 drivers/media/pci/cx18/cx18-gpio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                144 drivers/media/pci/cx18/cx18-gpio.c static int gpiomux_s_audio_routing(struct v4l2_subdev *sd,
sd                147 drivers/media/pci/cx18/cx18-gpio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                193 drivers/media/pci/cx18/cx18-gpio.c static int resetctrl_log_status(struct v4l2_subdev *sd)
sd                195 drivers/media/pci/cx18/cx18-gpio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                198 drivers/media/pci/cx18/cx18-gpio.c 	CX18_INFO_DEV(sd, "GPIO:  direction 0x%08x, value 0x%08x\n",
sd                204 drivers/media/pci/cx18/cx18-gpio.c static int resetctrl_reset(struct v4l2_subdev *sd, u32 val)
sd                206 drivers/media/pci/cx18/cx18-gpio.c 	struct cx18 *cx = v4l2_get_subdevdata(sd);
sd                282 drivers/media/pci/cx18/cx18-gpio.c 	struct v4l2_subdev *sd;
sd                288 drivers/media/pci/cx18/cx18-gpio.c 		sd = &cx->sd_gpiomux;
sd                293 drivers/media/pci/cx18/cx18-gpio.c 		sd = &cx->sd_resetctrl;
sd                301 drivers/media/pci/cx18/cx18-gpio.c 	v4l2_subdev_init(sd, ops);
sd                302 drivers/media/pci/cx18/cx18-gpio.c 	v4l2_set_subdevdata(sd, cx);
sd                303 drivers/media/pci/cx18/cx18-gpio.c 	snprintf(sd->name, sizeof(sd->name), "%s %s", cx->v4l2_dev.name, str);
sd                304 drivers/media/pci/cx18/cx18-gpio.c 	sd->grp_id = hw;
sd                305 drivers/media/pci/cx18/cx18-gpio.c 	return v4l2_device_register_subdev(&cx->v4l2_dev, sd);
sd                 97 drivers/media/pci/cx18/cx18-i2c.c 	struct v4l2_subdev *sd;
sd                105 drivers/media/pci/cx18/cx18-i2c.c 		sd = v4l2_i2c_new_subdev(&cx->v4l2_dev,
sd                107 drivers/media/pci/cx18/cx18-i2c.c 		if (sd != NULL)
sd                108 drivers/media/pci/cx18/cx18-i2c.c 			sd->grp_id = hw;
sd                109 drivers/media/pci/cx18/cx18-i2c.c 		sd = v4l2_i2c_new_subdev(&cx->v4l2_dev,
sd                111 drivers/media/pci/cx18/cx18-i2c.c 		if (sd != NULL)
sd                112 drivers/media/pci/cx18/cx18-i2c.c 			sd->grp_id = hw;
sd                113 drivers/media/pci/cx18/cx18-i2c.c 		sd = v4l2_i2c_new_subdev(&cx->v4l2_dev,
sd                115 drivers/media/pci/cx18/cx18-i2c.c 		if (sd != NULL)
sd                116 drivers/media/pci/cx18/cx18-i2c.c 			sd->grp_id = hw;
sd                117 drivers/media/pci/cx18/cx18-i2c.c 		return sd != NULL ? 0 : -1;
sd                128 drivers/media/pci/cx18/cx18-i2c.c 	sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, adap, type, hw_addrs[idx],
sd                130 drivers/media/pci/cx18/cx18-i2c.c 	if (sd != NULL)
sd                131 drivers/media/pci/cx18/cx18-i2c.c 		sd->grp_id = hw;
sd                132 drivers/media/pci/cx18/cx18-i2c.c 	return sd != NULL ? 0 : -1;
sd                139 drivers/media/pci/cx18/cx18-i2c.c 	struct v4l2_subdev *sd;
sd                142 drivers/media/pci/cx18/cx18-i2c.c 	v4l2_device_for_each_subdev(sd, &cx->v4l2_dev) {
sd                143 drivers/media/pci/cx18/cx18-i2c.c 		if (sd->grp_id == hw) {
sd                144 drivers/media/pci/cx18/cx18-i2c.c 			result = sd;
sd                 44 drivers/media/pci/cx18/cx18-vbi.c 	const int sd = sizeof(mpeg_hdr_data);	/* start of vbi data */
sd                 63 drivers/media/pci/cx18/cx18-vbi.c 		dst[sd + 12 + line * 43] = cx18_service2vbi(sdata->id);
sd                 64 drivers/media/pci/cx18/cx18-vbi.c 		memcpy(dst + sd + 12 + line * 43 + 1, sdata->data, 42);
sd                 72 drivers/media/pci/cx18/cx18-vbi.c 		memcpy(dst + sd, "ITV0", 4);
sd                 73 drivers/media/pci/cx18/cx18-vbi.c 		memmove(dst + sd + 4, dst + sd + 12, line * 43);
sd                 76 drivers/media/pci/cx18/cx18-vbi.c 		memcpy(dst + sd, "itv0", 4);
sd                 79 drivers/media/pci/cx18/cx18-vbi.c 		memcpy(dst + sd + 4, &linemask[0], 8);
sd                 89 drivers/media/pci/cx18/cx18-vbi.c 	cx->vbi.sliced_mpeg_size[idx] = sd + size;
sd                859 drivers/media/pci/cx23885/cx23885-core.c 	struct v4l2_subdev *sd;
sd                862 drivers/media/pci/cx23885/cx23885-core.c 	v4l2_device_for_each_subdev(sd, &dev->v4l2_dev) {
sd                863 drivers/media/pci/cx23885/cx23885-core.c 		if (sd->grp_id == hw) {
sd                864 drivers/media/pci/cx23885/cx23885-core.c 			result = sd;
sd               1941 drivers/media/pci/cx23885/cx23885-core.c static void cx23885_v4l2_dev_notify(struct v4l2_subdev *sd,
sd               1946 drivers/media/pci/cx23885/cx23885-core.c 	if (sd == NULL)
sd               1949 drivers/media/pci/cx23885/cx23885-core.c 	dev = to_cx23885(sd->v4l2_dev);
sd               1953 drivers/media/pci/cx23885/cx23885-core.c 		if (sd == dev->sd_ir)
sd               1954 drivers/media/pci/cx23885/cx23885-core.c 			cx23885_ir_rx_v4l2_dev_notify(sd, *(u32 *)arg);
sd               1957 drivers/media/pci/cx23885/cx23885-core.c 		if (sd == dev->sd_ir)
sd               1958 drivers/media/pci/cx23885/cx23885-core.c 			cx23885_ir_tx_v4l2_dev_notify(sd, *(u32 *)arg);
sd                 63 drivers/media/pci/cx23885/cx23885-ir.c void cx23885_ir_rx_v4l2_dev_notify(struct v4l2_subdev *sd, u32 events)
sd                 65 drivers/media/pci/cx23885/cx23885-ir.c 	struct cx23885_dev *dev = to_cx23885(sd->v4l2_dev);
sd                 81 drivers/media/pci/cx23885/cx23885-ir.c 	if (sd == dev->sd_cx25840)
sd                 88 drivers/media/pci/cx23885/cx23885-ir.c void cx23885_ir_tx_v4l2_dev_notify(struct v4l2_subdev *sd, u32 events)
sd                 90 drivers/media/pci/cx23885/cx23885-ir.c 	struct cx23885_dev *dev = to_cx23885(sd->v4l2_dev);
sd                100 drivers/media/pci/cx23885/cx23885-ir.c 	if (sd == dev->sd_cx25840)
sd                 12 drivers/media/pci/cx23885/cx23885-ir.h void cx23885_ir_rx_v4l2_dev_notify(struct v4l2_subdev *sd, u32 events);
sd                 13 drivers/media/pci/cx23885/cx23885-ir.h void cx23885_ir_tx_v4l2_dev_notify(struct v4l2_subdev *sd, u32 events);
sd               1210 drivers/media/pci/cx23885/cx23885-video.c 		struct v4l2_subdev *sd = NULL;
sd               1213 drivers/media/pci/cx23885/cx23885-video.c 			sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
sd               1217 drivers/media/pci/cx23885/cx23885-video.c 			sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
sd               1220 drivers/media/pci/cx23885/cx23885-video.c 		if (sd) {
sd               1226 drivers/media/pci/cx23885/cx23885-video.c 			tun_setup.addr = v4l2_i2c_subdev_addr(sd);
sd               1229 drivers/media/pci/cx23885/cx23885-video.c 			v4l2_subdev_call(sd, tuner, s_type_addr, &tun_setup);
sd               1241 drivers/media/pci/cx23885/cx23885-video.c 				v4l2_subdev_call(sd, tuner, s_config, &cfg);
sd               1253 drivers/media/pci/cx23885/cx23885-video.c 				v4l2_subdev_call(sd, tuner, s_config, &cfg);
sd                117 drivers/media/pci/cx23885/cx23888-ir.c 	struct v4l2_subdev sd;
sd                133 drivers/media/pci/cx23885/cx23888-ir.c static inline struct cx23888_ir_state *to_state(struct v4l2_subdev *sd)
sd                135 drivers/media/pci/cx23885/cx23888-ir.c 	return v4l2_get_subdevdata(sd);
sd                520 drivers/media/pci/cx23885/cx23888-ir.c static int cx23888_ir_irq_handler(struct v4l2_subdev *sd, u32 status,
sd                523 drivers/media/pci/cx23885/cx23888-ir.c 	struct cx23888_ir_state *state = to_state(sd);
sd                547 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_dbg(2, ir_888_debug, sd, "IRQ Status:  %s %s %s %s %s %s\n",
sd                553 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_dbg(2, ir_888_debug, sd, "IRQ Enables: %s %s %s %s\n",
sd                574 drivers/media/pci/cx23885/cx23888-ir.c 		v4l2_subdev_notify(sd, V4L2_SUBDEV_IR_TX_NOTIFY, &events);
sd                612 drivers/media/pci/cx23885/cx23888-ir.c 		v4l2_err(sd, "IR receiver software FIFO overrun\n");
sd                621 drivers/media/pci/cx23885/cx23888-ir.c 		v4l2_err(sd, "IR receiver hardware FIFO overrun\n");
sd                644 drivers/media/pci/cx23885/cx23888-ir.c 		v4l2_subdev_notify(sd, V4L2_SUBDEV_IR_RX_NOTIFY, &events);
sd                649 drivers/media/pci/cx23885/cx23888-ir.c static int cx23888_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count,
sd                652 drivers/media/pci/cx23885/cx23888-ir.c 	struct cx23888_ir_state *state = to_state(sd);
sd                693 drivers/media/pci/cx23885/cx23888-ir.c 		v4l2_dbg(2, ir_888_debug, sd, "rx read: %10u ns  %s  %s\n",
sd                696 drivers/media/pci/cx23885/cx23888-ir.c 			v4l2_dbg(2, ir_888_debug, sd, "rx read: end of rx\n");
sd                701 drivers/media/pci/cx23885/cx23888-ir.c static int cx23888_ir_rx_g_parameters(struct v4l2_subdev *sd,
sd                704 drivers/media/pci/cx23885/cx23888-ir.c 	struct cx23888_ir_state *state = to_state(sd);
sd                711 drivers/media/pci/cx23885/cx23888-ir.c static int cx23888_ir_rx_shutdown(struct v4l2_subdev *sd)
sd                713 drivers/media/pci/cx23885/cx23888-ir.c 	struct cx23888_ir_state *state = to_state(sd);
sd                732 drivers/media/pci/cx23885/cx23888-ir.c static int cx23888_ir_rx_s_parameters(struct v4l2_subdev *sd,
sd                735 drivers/media/pci/cx23885/cx23888-ir.c 	struct cx23888_ir_state *state = to_state(sd);
sd                741 drivers/media/pci/cx23885/cx23888-ir.c 		return cx23888_ir_rx_shutdown(sd);
sd                820 drivers/media/pci/cx23885/cx23888-ir.c static int cx23888_ir_tx_write(struct v4l2_subdev *sd, u8 *buf, size_t count,
sd                823 drivers/media/pci/cx23885/cx23888-ir.c 	struct cx23888_ir_state *state = to_state(sd);
sd                831 drivers/media/pci/cx23885/cx23888-ir.c static int cx23888_ir_tx_g_parameters(struct v4l2_subdev *sd,
sd                834 drivers/media/pci/cx23885/cx23888-ir.c 	struct cx23888_ir_state *state = to_state(sd);
sd                841 drivers/media/pci/cx23885/cx23888-ir.c static int cx23888_ir_tx_shutdown(struct v4l2_subdev *sd)
sd                843 drivers/media/pci/cx23885/cx23888-ir.c 	struct cx23888_ir_state *state = to_state(sd);
sd                860 drivers/media/pci/cx23885/cx23888-ir.c static int cx23888_ir_tx_s_parameters(struct v4l2_subdev *sd,
sd                863 drivers/media/pci/cx23885/cx23888-ir.c 	struct cx23888_ir_state *state = to_state(sd);
sd                869 drivers/media/pci/cx23885/cx23888-ir.c 		return cx23888_ir_tx_shutdown(sd);
sd                936 drivers/media/pci/cx23885/cx23888-ir.c static int cx23888_ir_log_status(struct v4l2_subdev *sd)
sd                938 drivers/media/pci/cx23885/cx23888-ir.c 	struct cx23888_ir_state *state = to_state(sd);
sd                951 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "IR Receiver:\n");
sd                952 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tEnabled:                           %s\n",
sd                954 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tDemodulation from a carrier:       %s\n",
sd                956 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tFIFO:                              %s\n",
sd                975 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tPulse timers' start/stop trigger:  %s\n", s);
sd                976 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tFIFO data on pulse timer overflow: %s\n",
sd                978 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tFIFO interrupt watermark:          %s\n",
sd                980 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tLoopback mode:                     %s\n",
sd                983 drivers/media/pci/cx23885/cx23888-ir.c 		v4l2_info(sd, "\tExpected carrier (16 clocks):      %u Hz\n",
sd               1007 drivers/media/pci/cx23885/cx23888-ir.c 		v4l2_info(sd, "\tNext carrier edge window:	    16 clocks -%1d/+%1d, %u to %u Hz\n",
sd               1012 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tMax measurable pulse width:        %u us, %llu ns\n",
sd               1015 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tLow pass filter:                   %s\n",
sd               1018 drivers/media/pci/cx23885/cx23888-ir.c 		v4l2_info(sd, "\tMin acceptable pulse width (LPF):  %u us, %u ns\n",
sd               1021 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tPulse width timer timed-out:       %s\n",
sd               1023 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tPulse width timer time-out intr:   %s\n",
sd               1025 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tFIFO overrun:                      %s\n",
sd               1027 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tFIFO overrun interrupt:            %s\n",
sd               1029 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tBusy:                              %s\n",
sd               1031 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tFIFO service requested:            %s\n",
sd               1033 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tFIFO service request interrupt:    %s\n",
sd               1036 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "IR Transmitter:\n");
sd               1037 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tEnabled:                           %s\n",
sd               1039 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tModulation onto a carrier:         %s\n",
sd               1041 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tFIFO:                              %s\n",
sd               1043 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tFIFO interrupt watermark:          %s\n",
sd               1045 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tOutput pin level inversion         %s\n",
sd               1047 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tCarrier polarity:                  %s\n",
sd               1051 drivers/media/pci/cx23885/cx23888-ir.c 		v4l2_info(sd, "\tCarrier (16 clocks):               %u Hz\n",
sd               1053 drivers/media/pci/cx23885/cx23888-ir.c 		v4l2_info(sd, "\tCarrier duty cycle:                %2u/16\n",
sd               1056 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tMax pulse width:                   %u us, %llu ns\n",
sd               1059 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tBusy:                              %s\n",
sd               1061 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tFIFO service requested:            %s\n",
sd               1063 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_info(sd, "\tFIFO service request interrupt:    %s\n",
sd               1070 drivers/media/pci/cx23885/cx23888-ir.c static int cx23888_ir_g_register(struct v4l2_subdev *sd,
sd               1073 drivers/media/pci/cx23885/cx23888-ir.c 	struct cx23888_ir_state *state = to_state(sd);
sd               1085 drivers/media/pci/cx23885/cx23888-ir.c static int cx23888_ir_s_register(struct v4l2_subdev *sd,
sd               1088 drivers/media/pci/cx23885/cx23888-ir.c 	struct cx23888_ir_state *state = to_state(sd);
sd               1161 drivers/media/pci/cx23885/cx23888-ir.c 	struct v4l2_subdev *sd;
sd               1174 drivers/media/pci/cx23885/cx23888-ir.c 	sd = &state->sd;
sd               1176 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_subdev_init(sd, &cx23888_ir_controller_ops);
sd               1177 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_set_subdevdata(sd, state);
sd               1179 drivers/media/pci/cx23885/cx23888-ir.c 	snprintf(sd->name, sizeof(sd->name), "%s/888-ir", dev->name);
sd               1180 drivers/media/pci/cx23885/cx23888-ir.c 	sd->grp_id = CX23885_HW_888_IR;
sd               1182 drivers/media/pci/cx23885/cx23888-ir.c 	ret = v4l2_device_register_subdev(&dev->v4l2_dev, sd);
sd               1193 drivers/media/pci/cx23885/cx23888-ir.c 		v4l2_subdev_call(sd, ir, rx_s_parameters, &default_params);
sd               1197 drivers/media/pci/cx23885/cx23888-ir.c 		v4l2_subdev_call(sd, ir, tx_s_parameters, &default_params);
sd               1206 drivers/media/pci/cx23885/cx23888-ir.c 	struct v4l2_subdev *sd;
sd               1209 drivers/media/pci/cx23885/cx23888-ir.c 	sd = cx23885_find_hw(dev, CX23885_HW_888_IR);
sd               1210 drivers/media/pci/cx23885/cx23888-ir.c 	if (sd == NULL)
sd               1213 drivers/media/pci/cx23885/cx23888-ir.c 	cx23888_ir_rx_shutdown(sd);
sd               1214 drivers/media/pci/cx23885/cx23888-ir.c 	cx23888_ir_tx_shutdown(sd);
sd               1216 drivers/media/pci/cx23885/cx23888-ir.c 	state = to_state(sd);
sd               1217 drivers/media/pci/cx23885/cx23888-ir.c 	v4l2_device_unregister_subdev(sd);
sd               1356 drivers/media/pci/cx88/cx88-video.c 		struct v4l2_subdev *sd;
sd               1363 drivers/media/pci/cx88/cx88-video.c 		sd = v4l2_i2c_new_subdev_board(&core->v4l2_dev, &core->i2c_adap,
sd               1365 drivers/media/pci/cx88/cx88-video.c 		if (sd) {
sd               1366 drivers/media/pci/cx88/cx88-video.c 			core->sd_wm8775 = sd;
sd               1367 drivers/media/pci/cx88/cx88-video.c 			sd->grp_id = WM8775_GID;
sd               1195 drivers/media/pci/intel/ipu3/ipu3-cio2.c static int cio2_subdev_subscribe_event(struct v4l2_subdev *sd,
sd               1209 drivers/media/pci/intel/ipu3/ipu3-cio2.c static int cio2_subdev_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1224 drivers/media/pci/intel/ipu3/ipu3-cio2.c 	format = v4l2_subdev_get_try_format(sd, fh->pad, CIO2_PAD_SINK);
sd               1228 drivers/media/pci/intel/ipu3/ipu3-cio2.c 	format = v4l2_subdev_get_try_format(sd, fh->pad, CIO2_PAD_SOURCE);
sd               1241 drivers/media/pci/intel/ipu3/ipu3-cio2.c static int cio2_subdev_get_fmt(struct v4l2_subdev *sd,
sd               1245 drivers/media/pci/intel/ipu3/ipu3-cio2.c 	struct cio2_queue *q = container_of(sd, struct cio2_queue, subdev);
sd               1250 drivers/media/pci/intel/ipu3/ipu3-cio2.c 		fmt->format = *v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1256 drivers/media/pci/intel/ipu3/ipu3-cio2.c 		ret = v4l2_subdev_call(sd, pad, get_fmt, NULL,
sd               1280 drivers/media/pci/intel/ipu3/ipu3-cio2.c static int cio2_subdev_set_fmt(struct v4l2_subdev *sd,
sd               1284 drivers/media/pci/intel/ipu3/ipu3-cio2.c 	struct cio2_queue *q = container_of(sd, struct cio2_queue, subdev);
sd               1291 drivers/media/pci/intel/ipu3/ipu3-cio2.c 		return cio2_subdev_get_fmt(sd, cfg, fmt);
sd               1294 drivers/media/pci/intel/ipu3/ipu3-cio2.c 		*v4l2_subdev_get_try_format(sd, cfg, fmt->pad) = fmt->format;
sd               1306 drivers/media/pci/intel/ipu3/ipu3-cio2.c static int cio2_subdev_enum_mbus_code(struct v4l2_subdev *sd,
sd               1321 drivers/media/pci/intel/ipu3/ipu3-cio2.c 		struct v4l2_subdev *sd =
sd               1326 drivers/media/pci/intel/ipu3/ipu3-cio2.c 		return v4l2_subdev_call(sd, pad, get_fmt, NULL, fmt);
sd               1396 drivers/media/pci/intel/ipu3/ipu3-cio2.c 			       struct v4l2_subdev *sd,
sd               1411 drivers/media/pci/intel/ipu3/ipu3-cio2.c 	q->sensor = sd;
sd               1419 drivers/media/pci/intel/ipu3/ipu3-cio2.c 				 struct v4l2_subdev *sd,
sd                136 drivers/media/pci/ivtv/ivtv-gpio.c static inline struct ivtv *sd_to_ivtv(struct v4l2_subdev *sd)
sd                138 drivers/media/pci/ivtv/ivtv-gpio.c 	return container_of(sd, struct ivtv, sd_gpio);
sd                146 drivers/media/pci/ivtv/ivtv-gpio.c static int subdev_s_clock_freq(struct v4l2_subdev *sd, u32 freq)
sd                148 drivers/media/pci/ivtv/ivtv-gpio.c 	struct ivtv *itv = sd_to_ivtv(sd);
sd                169 drivers/media/pci/ivtv/ivtv-gpio.c static int subdev_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
sd                171 drivers/media/pci/ivtv/ivtv-gpio.c 	struct ivtv *itv = sd_to_ivtv(sd);
sd                183 drivers/media/pci/ivtv/ivtv-gpio.c static int subdev_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
sd                185 drivers/media/pci/ivtv/ivtv-gpio.c 	struct ivtv *itv = sd_to_ivtv(sd);
sd                210 drivers/media/pci/ivtv/ivtv-gpio.c static int subdev_s_radio(struct v4l2_subdev *sd)
sd                212 drivers/media/pci/ivtv/ivtv-gpio.c 	struct ivtv *itv = sd_to_ivtv(sd);
sd                222 drivers/media/pci/ivtv/ivtv-gpio.c static int subdev_s_audio_routing(struct v4l2_subdev *sd,
sd                225 drivers/media/pci/ivtv/ivtv-gpio.c 	struct ivtv *itv = sd_to_ivtv(sd);
sd                250 drivers/media/pci/ivtv/ivtv-gpio.c 	struct v4l2_subdev *sd = to_sd(ctrl);
sd                251 drivers/media/pci/ivtv/ivtv-gpio.c 	struct ivtv *itv = sd_to_ivtv(sd);
sd                267 drivers/media/pci/ivtv/ivtv-gpio.c static int subdev_log_status(struct v4l2_subdev *sd)
sd                269 drivers/media/pci/ivtv/ivtv-gpio.c 	struct ivtv *itv = sd_to_ivtv(sd);
sd                274 drivers/media/pci/ivtv/ivtv-gpio.c 	v4l2_ctrl_handler_log_status(&itv->hdl_gpio, sd->name);
sd                278 drivers/media/pci/ivtv/ivtv-gpio.c static int subdev_s_video_routing(struct v4l2_subdev *sd,
sd                281 drivers/media/pci/ivtv/ivtv-gpio.c 	struct ivtv *itv = sd_to_ivtv(sd);
sd                243 drivers/media/pci/ivtv/ivtv-i2c.c 	struct v4l2_subdev *sd;
sd                250 drivers/media/pci/ivtv/ivtv-i2c.c 		sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, adap, type, 0,
sd                252 drivers/media/pci/ivtv/ivtv-i2c.c 		if (sd)
sd                253 drivers/media/pci/ivtv/ivtv-i2c.c 			sd->grp_id = 1 << idx;
sd                254 drivers/media/pci/ivtv/ivtv-i2c.c 		sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, adap, type, 0,
sd                256 drivers/media/pci/ivtv/ivtv-i2c.c 		if (sd)
sd                257 drivers/media/pci/ivtv/ivtv-i2c.c 			sd->grp_id = 1 << idx;
sd                258 drivers/media/pci/ivtv/ivtv-i2c.c 		sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, adap, type, 0,
sd                260 drivers/media/pci/ivtv/ivtv-i2c.c 		if (sd)
sd                261 drivers/media/pci/ivtv/ivtv-i2c.c 			sd->grp_id = 1 << idx;
sd                262 drivers/media/pci/ivtv/ivtv-i2c.c 		return sd ? 0 : -1;
sd                274 drivers/media/pci/ivtv/ivtv-i2c.c 		sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
sd                286 drivers/media/pci/ivtv/ivtv-i2c.c 		sd = v4l2_i2c_new_subdev_board(&itv->v4l2_dev, adap,
sd                289 drivers/media/pci/ivtv/ivtv-i2c.c 		sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
sd                292 drivers/media/pci/ivtv/ivtv-i2c.c 	if (sd)
sd                293 drivers/media/pci/ivtv/ivtv-i2c.c 		sd->grp_id = 1 << idx;
sd                294 drivers/media/pci/ivtv/ivtv-i2c.c 	return sd ? 0 : -1;
sd                300 drivers/media/pci/ivtv/ivtv-i2c.c 	struct v4l2_subdev *sd;
sd                303 drivers/media/pci/ivtv/ivtv-i2c.c 	v4l2_device_for_each_subdev(sd, &itv->v4l2_dev) {
sd                304 drivers/media/pci/ivtv/ivtv-i2c.c 		if (sd->grp_id == hw) {
sd                305 drivers/media/pci/ivtv/ivtv-i2c.c 			result = sd;
sd                186 drivers/media/pci/ivtv/ivtv-vbi.c 	const int sd = sizeof(mpeg_hdr_data);	/* start of vbi data */
sd                204 drivers/media/pci/ivtv/ivtv-vbi.c 		dst[sd + 12 + line * 43] =
sd                206 drivers/media/pci/ivtv/ivtv-vbi.c 		memcpy(dst + sd + 12 + line * 43 + 1, itv->vbi.sliced_data[i].data, 42);
sd                214 drivers/media/pci/ivtv/ivtv-vbi.c 		memcpy(dst + sd, "ITV0", 4);
sd                215 drivers/media/pci/ivtv/ivtv-vbi.c 		memmove(dst + sd + 4, dst + sd + 12, line * 43);
sd                218 drivers/media/pci/ivtv/ivtv-vbi.c 		memcpy(dst + sd, "itv0", 4);
sd                221 drivers/media/pci/ivtv/ivtv-vbi.c 		memcpy(dst + sd + 4, &linemask[0], 8);
sd                231 drivers/media/pci/ivtv/ivtv-vbi.c 	itv->vbi.sliced_mpeg_size[idx] = sd + size;
sd               1178 drivers/media/pci/saa7134/saa7134-core.c 		struct v4l2_subdev *sd;
sd               1180 drivers/media/pci/saa7134/saa7134-core.c 		sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
sd               1183 drivers/media/pci/saa7134/saa7134-core.c 		if (sd) {
sd                 51 drivers/media/pci/saa7134/saa7134-go7007.c 	struct v4l2_subdev sd;
sd                 59 drivers/media/pci/saa7134/saa7134-go7007.c static inline struct saa7134_go7007 *to_state(struct v4l2_subdev *sd)
sd                 61 drivers/media/pci/saa7134/saa7134-go7007.c 	return container_of(sd, struct saa7134_go7007, sd);
sd                385 drivers/media/pci/saa7134/saa7134-go7007.c static int saa7134_go7007_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
sd                388 drivers/media/pci/saa7134/saa7134-go7007.c 	struct saa7134_go7007 *saa = to_state(sd);
sd                414 drivers/media/pci/saa7134/saa7134-go7007.c 	struct v4l2_subdev *sd;
sd                436 drivers/media/pci/saa7134/saa7134-go7007.c 	sd = &saa->sd;
sd                437 drivers/media/pci/saa7134/saa7134-go7007.c 	v4l2_subdev_init(sd, &saa7134_go7007_sd_ops);
sd                438 drivers/media/pci/saa7134/saa7134-go7007.c 	v4l2_set_subdevdata(sd, saa);
sd                439 drivers/media/pci/saa7134/saa7134-go7007.c 	strscpy(sd->name, "saa7134-go7007", sizeof(sd->name));
sd                460 drivers/media/pci/saa7134/saa7134-go7007.c 	if (v4l2_device_register_subdev(&go->v4l2_dev, sd) < 0)
sd                494 drivers/media/pci/saa7134/saa7134-go7007.c 	v4l2_device_unregister_subdev(&saa->sd);
sd               1149 drivers/media/platform/am437x/am437x-vpfe.c 	sdinfo->sd = vpfe->sd[0];
sd               1416 drivers/media/platform/am437x/am437x-vpfe.c 	if (!sdinfo->sd)
sd               1422 drivers/media/platform/am437x/am437x-vpfe.c 	ret = v4l2_subdev_call(sdinfo->sd, pad, get_fmt, NULL, &fmt);
sd               1462 drivers/media/platform/am437x/am437x-vpfe.c 	if (!sdinfo->sd)
sd               1470 drivers/media/platform/am437x/am437x-vpfe.c 	ret = v4l2_subdev_call(sdinfo->sd, pad, set_fmt, NULL, &fmt);
sd               1512 drivers/media/platform/am437x/am437x-vpfe.c 	if (!sdinfo->sd)
sd               1614 drivers/media/platform/am437x/am437x-vpfe.c 	if (!sdinfo->sd)
sd               1631 drivers/media/platform/am437x/am437x-vpfe.c 	ret = v4l2_subdev_call(sdinfo->sd, pad, enum_frame_size, NULL, &fse);
sd               1687 drivers/media/platform/am437x/am437x-vpfe.c 	curr_client = v4l2_get_subdevdata(vpfe->current_subdev->sd);
sd               1690 drivers/media/platform/am437x/am437x-vpfe.c 		client = v4l2_get_subdevdata(sdinfo->sd);
sd               1759 drivers/media/platform/am437x/am437x-vpfe.c 	sdinfo->sd = vpfe->sd[subdev_index];
sd               1764 drivers/media/platform/am437x/am437x-vpfe.c 		if (sdinfo->sd) {
sd               1765 drivers/media/platform/am437x/am437x-vpfe.c 			ret = v4l2_subdev_call(sdinfo->sd, video,
sd               1777 drivers/media/platform/am437x/am437x-vpfe.c 	if (sdinfo->sd)
sd               1778 drivers/media/platform/am437x/am437x-vpfe.c 		vpfe->v4l2_dev.ctrl_handler = sdinfo->sd->ctrl_handler;
sd               2006 drivers/media/platform/am437x/am437x-vpfe.c 	ret = v4l2_subdev_call(sdinfo->sd, video, s_stream, 1);
sd               2042 drivers/media/platform/am437x/am437x-vpfe.c 	ret = v4l2_subdev_call(sdinfo->sd, video, s_stream, 0);
sd               2295 drivers/media/platform/am437x/am437x-vpfe.c 			vpfe->sd[i] = subdev;
sd               2296 drivers/media/platform/am437x/am437x-vpfe.c 			vpfe->sd[i]->grp_id = sdinfo->grp_id;
sd               2346 drivers/media/platform/am437x/am437x-vpfe.c 	vpfe->v4l2_dev.ctrl_handler = vpfe->sd[0]->ctrl_handler;
sd               2579 drivers/media/platform/am437x/am437x-vpfe.c 	vpfe->sd = devm_kcalloc(&pdev->dev,
sd               2583 drivers/media/platform/am437x/am437x-vpfe.c 	if (!vpfe->sd) {
sd                 91 drivers/media/platform/am437x/am437x-vpfe.h 	struct v4l2_subdev *sd;
sd                222 drivers/media/platform/am437x/am437x-vpfe.h 	struct v4l2_subdev **sd;
sd                777 drivers/media/platform/atmel/atmel-isc-base.c 	ret = v4l2_subdev_call(isc->current_subdev->sd, video, s_stream, 1);
sd                816 drivers/media/platform/atmel/atmel-isc-base.c 	v4l2_subdev_call(isc->current_subdev->sd, video, s_stream, 0);
sd                850 drivers/media/platform/atmel/atmel-isc-base.c 	ret = v4l2_subdev_call(isc->current_subdev->sd, video, s_stream, 0);
sd               1294 drivers/media/platform/atmel/atmel-isc-base.c 	ret = v4l2_subdev_call(isc->current_subdev->sd, pad, set_fmt,
sd               1331 drivers/media/platform/atmel/atmel-isc-base.c 	ret = v4l2_subdev_call(isc->current_subdev->sd, pad,
sd               1402 drivers/media/platform/atmel/atmel-isc-base.c 	return v4l2_g_parm_cap(video_devdata(file), isc->current_subdev->sd, a);
sd               1409 drivers/media/platform/atmel/atmel-isc-base.c 	return v4l2_s_parm_cap(video_devdata(file), isc->current_subdev->sd, a);
sd               1434 drivers/media/platform/atmel/atmel-isc-base.c 	ret = v4l2_subdev_call(isc->current_subdev->sd, pad, enum_frame_size,
sd               1472 drivers/media/platform/atmel/atmel-isc-base.c 	ret = v4l2_subdev_call(isc->current_subdev->sd, pad,
sd               1518 drivers/media/platform/atmel/atmel-isc-base.c 	struct v4l2_subdev *sd = isc->current_subdev->sd;
sd               1531 drivers/media/platform/atmel/atmel-isc-base.c 	ret = v4l2_subdev_call(sd, core, s_power, 1);
sd               1539 drivers/media/platform/atmel/atmel-isc-base.c 		v4l2_subdev_call(sd, core, s_power, 0);
sd               1551 drivers/media/platform/atmel/atmel-isc-base.c 	struct v4l2_subdev *sd = isc->current_subdev->sd;
sd               1562 drivers/media/platform/atmel/atmel-isc-base.c 		v4l2_subdev_call(sd, core, s_power, 0);
sd               1913 drivers/media/platform/atmel/atmel-isc-base.c 	subdev_entity->sd = subdev;
sd               1949 drivers/media/platform/atmel/atmel-isc-base.c 	struct v4l2_subdev *subdev = isc->current_subdev->sd;
sd                 42 drivers/media/platform/atmel/atmel-isc.h 	struct v4l2_subdev		*sd;
sd                840 drivers/media/platform/atmel/atmel-isi.c 	struct v4l2_subdev *sd = isi->entity.subdev;
sd                853 drivers/media/platform/atmel/atmel-isi.c 	ret = v4l2_subdev_call(sd, core, s_power, 1);
sd                859 drivers/media/platform/atmel/atmel-isi.c 		v4l2_subdev_call(sd, core, s_power, 0);
sd                871 drivers/media/platform/atmel/atmel-isi.c 	struct v4l2_subdev *sd = isi->entity.subdev;
sd                882 drivers/media/platform/atmel/atmel-isi.c 		v4l2_subdev_call(sd, core, s_power, 0);
sd               1071 drivers/media/platform/atmel/atmel-isi.c 				     struct v4l2_subdev *sd,
sd                252 drivers/media/platform/cadence/cdns-csi2rx.c 	struct v4l2_subdev *subdev = notifier->sd;
sd                 48 drivers/media/platform/davinci/vpbe_osd.c static inline u32 osd_read(struct osd_state *sd, u32 offset)
sd                 50 drivers/media/platform/davinci/vpbe_osd.c 	struct osd_state *osd = sd;
sd                 55 drivers/media/platform/davinci/vpbe_osd.c static inline u32 osd_write(struct osd_state *sd, u32 val, u32 offset)
sd                 57 drivers/media/platform/davinci/vpbe_osd.c 	struct osd_state *osd = sd;
sd                 64 drivers/media/platform/davinci/vpbe_osd.c static inline u32 osd_set(struct osd_state *sd, u32 mask, u32 offset)
sd                 66 drivers/media/platform/davinci/vpbe_osd.c 	struct osd_state *osd = sd;
sd                 76 drivers/media/platform/davinci/vpbe_osd.c static inline u32 osd_clear(struct osd_state *sd, u32 mask, u32 offset)
sd                 78 drivers/media/platform/davinci/vpbe_osd.c 	struct osd_state *osd = sd;
sd                 88 drivers/media/platform/davinci/vpbe_osd.c static inline u32 osd_modify(struct osd_state *sd, u32 mask, u32 val,
sd                 91 drivers/media/platform/davinci/vpbe_osd.c 	struct osd_state *osd = sd;
sd                127 drivers/media/platform/davinci/vpbe_osd.c static int _osd_dm6446_vid0_pingpong(struct osd_state *sd,
sd                134 drivers/media/platform/davinci/vpbe_osd.c 	pdata = (struct osd_platform_data *)sd->dev->platform_data;
sd                138 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, fb_base_phys & ~0x1F, OSD_VIDWIN0ADR);
sd                139 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, fb_base_phys & ~0x1F, OSD_PPVWIN0ADR);
sd                140 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_MISCCTL_PPSW | OSD_MISCCTL_PPRV, 0,
sd                146 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd,
sd                149 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd,
sd                152 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd,
sd                163 drivers/media/platform/davinci/vpbe_osd.c static void _osd_set_field_inversion(struct osd_state *sd, int enable)
sd                170 drivers/media/platform/davinci/vpbe_osd.c 	osd_modify(sd, OSD_MODE_FSINV, fsinv, OSD_MODE);
sd                173 drivers/media/platform/davinci/vpbe_osd.c static void _osd_set_blink_attribute(struct osd_state *sd, int enable,
sd                183 drivers/media/platform/davinci/vpbe_osd.c 	osd_modify(sd, OSD_OSDATRMD_BLNKINT | OSD_OSDATRMD_BLNK, osdatrmd,
sd                187 drivers/media/platform/davinci/vpbe_osd.c static void _osd_set_rom_clut(struct osd_state *sd,
sd                191 drivers/media/platform/davinci/vpbe_osd.c 		osd_clear(sd, OSD_MISCCTL_RSEL, OSD_MISCCTL);
sd                193 drivers/media/platform/davinci/vpbe_osd.c 		osd_set(sd, OSD_MISCCTL_RSEL, OSD_MISCCTL);
sd                196 drivers/media/platform/davinci/vpbe_osd.c static void _osd_set_palette_map(struct osd_state *sd,
sd                242 drivers/media/platform/davinci/vpbe_osd.c 	osd_modify(sd, bmp_mask, clut_index << bmp_shift, bmp_offset);
sd                245 drivers/media/platform/davinci/vpbe_osd.c static void _osd_set_rec601_attenuation(struct osd_state *sd,
sd                250 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, OSD_OSDWIN0MD_ATN0E,
sd                253 drivers/media/platform/davinci/vpbe_osd.c 		if (sd->vpbe_type == VPBE_VERSION_1)
sd                254 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_OSDWIN0MD_ATN0E,
sd                257 drivers/media/platform/davinci/vpbe_osd.c 		else if ((sd->vpbe_type == VPBE_VERSION_3) ||
sd                258 drivers/media/platform/davinci/vpbe_osd.c 			   (sd->vpbe_type == VPBE_VERSION_2))
sd                259 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_EXTMODE_ATNOSD0EN,
sd                264 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, OSD_OSDWIN1MD_ATN1E,
sd                267 drivers/media/platform/davinci/vpbe_osd.c 		if (sd->vpbe_type == VPBE_VERSION_1)
sd                268 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_OSDWIN1MD_ATN1E,
sd                271 drivers/media/platform/davinci/vpbe_osd.c 		else if ((sd->vpbe_type == VPBE_VERSION_3) ||
sd                272 drivers/media/platform/davinci/vpbe_osd.c 			   (sd->vpbe_type == VPBE_VERSION_2))
sd                273 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_EXTMODE_ATNOSD1EN,
sd                280 drivers/media/platform/davinci/vpbe_osd.c static void _osd_set_blending_factor(struct osd_state *sd,
sd                286 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, OSD_OSDWIN0MD_BLND0,
sd                290 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, OSD_OSDWIN1MD_BLND1,
sd                296 drivers/media/platform/davinci/vpbe_osd.c static void _osd_enable_rgb888_pixblend(struct osd_state *sd,
sd                300 drivers/media/platform/davinci/vpbe_osd.c 	osd_modify(sd, OSD_MISCCTL_BLDSEL, 0, OSD_MISCCTL);
sd                303 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, OSD_EXTMODE_OSD0BLDCHR,
sd                307 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, OSD_EXTMODE_OSD1BLDCHR,
sd                313 drivers/media/platform/davinci/vpbe_osd.c static void _osd_enable_color_key(struct osd_state *sd,
sd                323 drivers/media/platform/davinci/vpbe_osd.c 		if (sd->vpbe_type == VPBE_VERSION_3) {
sd                326 drivers/media/platform/davinci/vpbe_osd.c 				osd_modify(sd, OSD_TRANSPBMPIDX_BMP0,
sd                332 drivers/media/platform/davinci/vpbe_osd.c 				osd_modify(sd, OSD_TRANSPBMPIDX_BMP1,
sd                341 drivers/media/platform/davinci/vpbe_osd.c 		if (sd->vpbe_type == VPBE_VERSION_1)
sd                342 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, colorkey & OSD_TRANSPVAL_RGBTRANS,
sd                344 drivers/media/platform/davinci/vpbe_osd.c 		else if (sd->vpbe_type == VPBE_VERSION_3)
sd                345 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, colorkey & OSD_TRANSPVALL_RGBL,
sd                350 drivers/media/platform/davinci/vpbe_osd.c 		if (sd->vpbe_type == VPBE_VERSION_3)
sd                351 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_TRANSPVALU_Y, colorkey,
sd                355 drivers/media/platform/davinci/vpbe_osd.c 		if (sd->vpbe_type == VPBE_VERSION_3) {
sd                356 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, colorkey & OSD_TRANSPVALL_RGBL,
sd                358 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_TRANSPVALU_RGBU, colorkey >> 16,
sd                368 drivers/media/platform/davinci/vpbe_osd.c 		osd_set(sd, OSD_OSDWIN0MD_TE0, OSD_OSDWIN0MD);
sd                371 drivers/media/platform/davinci/vpbe_osd.c 		osd_set(sd, OSD_OSDWIN1MD_TE1, OSD_OSDWIN1MD);
sd                376 drivers/media/platform/davinci/vpbe_osd.c static void _osd_disable_color_key(struct osd_state *sd,
sd                381 drivers/media/platform/davinci/vpbe_osd.c 		osd_clear(sd, OSD_OSDWIN0MD_TE0, OSD_OSDWIN0MD);
sd                384 drivers/media/platform/davinci/vpbe_osd.c 		osd_clear(sd, OSD_OSDWIN1MD_TE1, OSD_OSDWIN1MD);
sd                389 drivers/media/platform/davinci/vpbe_osd.c static void _osd_set_osd_clut(struct osd_state *sd,
sd                399 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, OSD_OSDWIN0MD_CLUTS0, winmd, OSD_OSDWIN0MD);
sd                404 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, OSD_OSDWIN1MD_CLUTS1, winmd, OSD_OSDWIN1MD);
sd                409 drivers/media/platform/davinci/vpbe_osd.c static void _osd_set_zoom(struct osd_state *sd, enum osd_layer layer,
sd                419 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, OSD_OSDWIN0MD_OHZ0 | OSD_OSDWIN0MD_OVZ0, winmd,
sd                425 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, OSD_VIDWINMD_VHZ0 | OSD_VIDWINMD_VVZ0, winmd,
sd                431 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, OSD_OSDWIN1MD_OHZ1 | OSD_OSDWIN1MD_OVZ1, winmd,
sd                437 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, OSD_VIDWINMD_VHZ1 | OSD_VIDWINMD_VVZ1, winmd,
sd                443 drivers/media/platform/davinci/vpbe_osd.c static void _osd_disable_layer(struct osd_state *sd, enum osd_layer layer)
sd                447 drivers/media/platform/davinci/vpbe_osd.c 		osd_clear(sd, OSD_OSDWIN0MD_OACT0, OSD_OSDWIN0MD);
sd                450 drivers/media/platform/davinci/vpbe_osd.c 		osd_clear(sd, OSD_VIDWINMD_ACT0, OSD_VIDWINMD);
sd                454 drivers/media/platform/davinci/vpbe_osd.c 		osd_clear(sd, OSD_OSDWIN1MD_OASW | OSD_OSDWIN1MD_OACT1,
sd                458 drivers/media/platform/davinci/vpbe_osd.c 		osd_clear(sd, OSD_VIDWINMD_ACT1, OSD_VIDWINMD);
sd                463 drivers/media/platform/davinci/vpbe_osd.c static void osd_disable_layer(struct osd_state *sd, enum osd_layer layer)
sd                465 drivers/media/platform/davinci/vpbe_osd.c 	struct osd_state *osd = sd;
sd                477 drivers/media/platform/davinci/vpbe_osd.c 	_osd_disable_layer(sd, layer);
sd                482 drivers/media/platform/davinci/vpbe_osd.c static void _osd_enable_attribute_mode(struct osd_state *sd)
sd                485 drivers/media/platform/davinci/vpbe_osd.c 	osd_set(sd, OSD_OSDWIN1MD_OASW, OSD_OSDWIN1MD);
sd                488 drivers/media/platform/davinci/vpbe_osd.c static void _osd_enable_layer(struct osd_state *sd, enum osd_layer layer)
sd                492 drivers/media/platform/davinci/vpbe_osd.c 		osd_set(sd, OSD_OSDWIN0MD_OACT0, OSD_OSDWIN0MD);
sd                495 drivers/media/platform/davinci/vpbe_osd.c 		osd_set(sd, OSD_VIDWINMD_ACT0, OSD_VIDWINMD);
sd                499 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, OSD_OSDWIN1MD_OASW | OSD_OSDWIN1MD_OACT1,
sd                503 drivers/media/platform/davinci/vpbe_osd.c 		osd_set(sd, OSD_VIDWINMD_ACT1, OSD_VIDWINMD);
sd                508 drivers/media/platform/davinci/vpbe_osd.c static int osd_enable_layer(struct osd_state *sd, enum osd_layer layer,
sd                511 drivers/media/platform/davinci/vpbe_osd.c 	struct osd_state *osd = sd;
sd                538 drivers/media/platform/davinci/vpbe_osd.c 		_osd_enable_layer(sd, layer);
sd                540 drivers/media/platform/davinci/vpbe_osd.c 		_osd_enable_attribute_mode(sd);
sd                541 drivers/media/platform/davinci/vpbe_osd.c 		_osd_set_blink_attribute(sd, osd->is_blinking, osd->blink);
sd                557 drivers/media/platform/davinci/vpbe_osd.c static void _osd_start_layer(struct osd_state *sd, enum osd_layer layer,
sd                562 drivers/media/platform/davinci/vpbe_osd.c 	if (sd->vpbe_type == VPBE_VERSION_1) {
sd                565 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, fb_base_phys & ~0x1F, OSD_OSDWIN0ADR);
sd                568 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, fb_base_phys & ~0x1F, OSD_VIDWIN0ADR);
sd                571 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, fb_base_phys & ~0x1F, OSD_OSDWIN1ADR);
sd                574 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, fb_base_phys & ~0x1F, OSD_VIDWIN1ADR);
sd                577 drivers/media/platform/davinci/vpbe_osd.c 	} else if (sd->vpbe_type == VPBE_VERSION_3) {
sd                583 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_OSDWINADH_O0AH,
sd                587 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, fb_offset_32 & OSD_OSDWIN0ADL_O0AL,
sd                591 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_VIDWINADH_V0AH,
sd                595 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, fb_offset_32 & OSD_VIDWIN0ADL_V0AL,
sd                599 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_OSDWINADH_O1AH,
sd                603 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, fb_offset_32 & OSD_OSDWIN1ADL_O1AL,
sd                607 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_VIDWINADH_V1AH,
sd                611 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, fb_offset_32 & OSD_VIDWIN1ADL_V1AL,
sd                615 drivers/media/platform/davinci/vpbe_osd.c 	} else if (sd->vpbe_type == VPBE_VERSION_2) {
sd                616 drivers/media/platform/davinci/vpbe_osd.c 		struct osd_window_state *win = &sd->win[layer];
sd                637 drivers/media/platform/davinci/vpbe_osd.c 				osd_modify(sd, OSD_VIDWIN0OFST_V0AH,
sd                642 drivers/media/platform/davinci/vpbe_osd.c 				osd_modify(sd, OSD_VIDWINADH_V0AH,
sd                647 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd, fb_offset_32 & OSD_WINADL_MASK,
sd                650 drivers/media/platform/davinci/vpbe_osd.c 				osd_modify(sd, OSD_VIDWIN1OFST_V1AH,
sd                656 drivers/media/platform/davinci/vpbe_osd.c 				osd_modify(sd, OSD_VIDWINADH_V1AH,
sd                662 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd, cbcr_offset_32 & OSD_WINADL_MASK,
sd                672 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_OSDWIN0OFST_O0AH,
sd                677 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_OSDWINADH_O0AH,
sd                681 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, fb_offset_32 & OSD_WINADL_MASK,
sd                686 drivers/media/platform/davinci/vpbe_osd.c 				osd_modify(sd, OSD_VIDWIN0OFST_V0AH,
sd                691 drivers/media/platform/davinci/vpbe_osd.c 				osd_modify(sd, OSD_VIDWINADH_V0AH,
sd                696 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd, fb_offset_32 & OSD_WINADL_MASK,
sd                701 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_OSDWIN1OFST_O1AH,
sd                706 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_OSDWINADH_O1AH,
sd                711 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, fb_offset_32 & OSD_WINADL_MASK,
sd                716 drivers/media/platform/davinci/vpbe_osd.c 				osd_modify(sd, OSD_VIDWIN1OFST_V1AH,
sd                721 drivers/media/platform/davinci/vpbe_osd.c 				osd_modify(sd, OSD_VIDWINADH_V1AH,
sd                726 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd, fb_offset_32 & OSD_WINADL_MASK,
sd                734 drivers/media/platform/davinci/vpbe_osd.c static void osd_start_layer(struct osd_state *sd, enum osd_layer layer,
sd                738 drivers/media/platform/davinci/vpbe_osd.c 	struct osd_state *osd = sd;
sd                746 drivers/media/platform/davinci/vpbe_osd.c 	_osd_start_layer(sd, layer, fb_base_phys, cbcr_ofst);
sd                750 drivers/media/platform/davinci/vpbe_osd.c 		    _osd_dm6446_vid0_pingpong(sd, osd->field_inversion,
sd                758 drivers/media/platform/davinci/vpbe_osd.c static void osd_get_layer_config(struct osd_state *sd, enum osd_layer layer,
sd                761 drivers/media/platform/davinci/vpbe_osd.c 	struct osd_state *osd = sd;
sd                784 drivers/media/platform/davinci/vpbe_osd.c static int try_layer_config(struct osd_state *sd, enum osd_layer layer,
sd                787 drivers/media/platform/davinci/vpbe_osd.c 	struct osd_state *osd = sd;
sd                899 drivers/media/platform/davinci/vpbe_osd.c static void _osd_disable_vid_rgb888(struct osd_state *sd)
sd                907 drivers/media/platform/davinci/vpbe_osd.c 	if (sd->vpbe_type == VPBE_VERSION_1)
sd                908 drivers/media/platform/davinci/vpbe_osd.c 		osd_clear(sd, OSD_MISCCTL_RGBEN, OSD_MISCCTL);
sd                911 drivers/media/platform/davinci/vpbe_osd.c static void _osd_enable_vid_rgb888(struct osd_state *sd,
sd                921 drivers/media/platform/davinci/vpbe_osd.c 	if (sd->vpbe_type == VPBE_VERSION_1) {
sd                923 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_MISCCTL_RGBEN | OSD_MISCCTL_RGBWIN,
sd                926 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_MISCCTL_RGBEN | OSD_MISCCTL_RGBWIN,
sd                932 drivers/media/platform/davinci/vpbe_osd.c static void _osd_set_cbcr_order(struct osd_state *sd,
sd                940 drivers/media/platform/davinci/vpbe_osd.c 		osd_clear(sd, OSD_MODE_CS, OSD_MODE);
sd                942 drivers/media/platform/davinci/vpbe_osd.c 		osd_set(sd, OSD_MODE_CS, OSD_MODE);
sd                945 drivers/media/platform/davinci/vpbe_osd.c static void _osd_set_layer_config(struct osd_state *sd, enum osd_layer layer,
sd                950 drivers/media/platform/davinci/vpbe_osd.c 	_osd_set_cbcr_order(sd, lconfig->pixfmt);
sd                954 drivers/media/platform/davinci/vpbe_osd.c 		if (sd->vpbe_type == VPBE_VERSION_1) {
sd                958 drivers/media/platform/davinci/vpbe_osd.c 		} else if ((sd->vpbe_type == VPBE_VERSION_3) ||
sd                959 drivers/media/platform/davinci/vpbe_osd.c 		  (sd->vpbe_type == VPBE_VERSION_2)) {
sd                968 drivers/media/platform/davinci/vpbe_osd.c 				_osd_enable_rgb888_pixblend(sd, OSDWIN_OSD0);
sd               1002 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, winmd_mask, winmd, OSD_OSDWIN0MD);
sd               1003 drivers/media/platform/davinci/vpbe_osd.c 		osd_write(sd, lconfig->line_length >> 5, OSD_OSDWIN0OFST);
sd               1004 drivers/media/platform/davinci/vpbe_osd.c 		osd_write(sd, lconfig->xpos, OSD_OSDWIN0XP);
sd               1005 drivers/media/platform/davinci/vpbe_osd.c 		osd_write(sd, lconfig->xsize, OSD_OSDWIN0XL);
sd               1007 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ypos >> 1, OSD_OSDWIN0YP);
sd               1008 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ysize >> 1, OSD_OSDWIN0YL);
sd               1010 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ypos, OSD_OSDWIN0YP);
sd               1011 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ysize, OSD_OSDWIN0YL);
sd               1019 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, winmd_mask, winmd, OSD_VIDWINMD);
sd               1020 drivers/media/platform/davinci/vpbe_osd.c 		osd_write(sd, lconfig->line_length >> 5, OSD_VIDWIN0OFST);
sd               1021 drivers/media/platform/davinci/vpbe_osd.c 		osd_write(sd, lconfig->xpos, OSD_VIDWIN0XP);
sd               1022 drivers/media/platform/davinci/vpbe_osd.c 		osd_write(sd, lconfig->xsize, OSD_VIDWIN0XL);
sd               1027 drivers/media/platform/davinci/vpbe_osd.c 		if ((sd->vpbe_type == VPBE_VERSION_2) &&
sd               1033 drivers/media/platform/davinci/vpbe_osd.c 				osd_modify(sd, winmd_mask, winmd,
sd               1037 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_MISCCTL_S420D,
sd               1039 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->line_length >> 5,
sd               1041 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->xpos, OSD_VIDWIN1XP);
sd               1042 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->xsize, OSD_VIDWIN1XL);
sd               1049 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd,
sd               1052 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd,
sd               1056 drivers/media/platform/davinci/vpbe_osd.c 		} else if ((sd->vpbe_type == VPBE_VERSION_2) &&
sd               1058 drivers/media/platform/davinci/vpbe_osd.c 			osd_modify(sd, OSD_MISCCTL_S420D, ~OSD_MISCCTL_S420D,
sd               1063 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ypos >> 1, OSD_VIDWIN0YP);
sd               1064 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ysize >> 1, OSD_VIDWIN0YL);
sd               1065 drivers/media/platform/davinci/vpbe_osd.c 			if ((sd->vpbe_type == VPBE_VERSION_2) &&
sd               1067 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd, lconfig->ypos >> 1,
sd               1069 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd, lconfig->ysize >> 1,
sd               1073 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ypos, OSD_VIDWIN0YP);
sd               1074 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ysize, OSD_VIDWIN0YL);
sd               1075 drivers/media/platform/davinci/vpbe_osd.c 			if ((sd->vpbe_type == VPBE_VERSION_2) &&
sd               1077 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd, lconfig->ypos, OSD_VIDWIN1YP);
sd               1078 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd, lconfig->ysize, OSD_VIDWIN1YL);
sd               1089 drivers/media/platform/davinci/vpbe_osd.c 			if (sd->vpbe_type == VPBE_VERSION_1) {
sd               1099 drivers/media/platform/davinci/vpbe_osd.c 			if (sd->vpbe_type == VPBE_VERSION_1) {
sd               1103 drivers/media/platform/davinci/vpbe_osd.c 			} else if ((sd->vpbe_type == VPBE_VERSION_3)
sd               1104 drivers/media/platform/davinci/vpbe_osd.c 				   || (sd->vpbe_type == VPBE_VERSION_2)) {
sd               1114 drivers/media/platform/davinci/vpbe_osd.c 					_osd_enable_rgb888_pixblend(sd,
sd               1151 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, winmd_mask, winmd, OSD_OSDWIN1MD);
sd               1152 drivers/media/platform/davinci/vpbe_osd.c 		osd_write(sd, lconfig->line_length >> 5, OSD_OSDWIN1OFST);
sd               1153 drivers/media/platform/davinci/vpbe_osd.c 		osd_write(sd, lconfig->xpos, OSD_OSDWIN1XP);
sd               1154 drivers/media/platform/davinci/vpbe_osd.c 		osd_write(sd, lconfig->xsize, OSD_OSDWIN1XL);
sd               1156 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ypos >> 1, OSD_OSDWIN1YP);
sd               1157 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ysize >> 1, OSD_OSDWIN1YL);
sd               1159 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ypos, OSD_OSDWIN1YP);
sd               1160 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ysize, OSD_OSDWIN1YL);
sd               1168 drivers/media/platform/davinci/vpbe_osd.c 		osd_modify(sd, winmd_mask, winmd, OSD_VIDWINMD);
sd               1169 drivers/media/platform/davinci/vpbe_osd.c 		osd_write(sd, lconfig->line_length >> 5, OSD_VIDWIN1OFST);
sd               1170 drivers/media/platform/davinci/vpbe_osd.c 		osd_write(sd, lconfig->xpos, OSD_VIDWIN1XP);
sd               1171 drivers/media/platform/davinci/vpbe_osd.c 		osd_write(sd, lconfig->xsize, OSD_VIDWIN1XL);
sd               1176 drivers/media/platform/davinci/vpbe_osd.c 		if (sd->vpbe_type == VPBE_VERSION_2) {
sd               1182 drivers/media/platform/davinci/vpbe_osd.c 					osd_modify(sd, winmd_mask, winmd,
sd               1185 drivers/media/platform/davinci/vpbe_osd.c 				osd_modify(sd, OSD_MISCCTL_S420D,
sd               1187 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd, lconfig->line_length >> 5,
sd               1189 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd, lconfig->xpos, OSD_VIDWIN0XP);
sd               1190 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd, lconfig->xsize, OSD_VIDWIN0XL);
sd               1192 drivers/media/platform/davinci/vpbe_osd.c 				osd_modify(sd, OSD_MISCCTL_S420D,
sd               1198 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ypos >> 1, OSD_VIDWIN1YP);
sd               1199 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ysize >> 1, OSD_VIDWIN1YL);
sd               1200 drivers/media/platform/davinci/vpbe_osd.c 			if ((sd->vpbe_type == VPBE_VERSION_2) &&
sd               1202 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd, lconfig->ypos >> 1,
sd               1204 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd, lconfig->ysize >> 1,
sd               1208 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ypos, OSD_VIDWIN1YP);
sd               1209 drivers/media/platform/davinci/vpbe_osd.c 			osd_write(sd, lconfig->ysize, OSD_VIDWIN1YL);
sd               1210 drivers/media/platform/davinci/vpbe_osd.c 			if ((sd->vpbe_type == VPBE_VERSION_2) &&
sd               1212 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd, lconfig->ypos, OSD_VIDWIN0YP);
sd               1213 drivers/media/platform/davinci/vpbe_osd.c 				osd_write(sd, lconfig->ysize, OSD_VIDWIN0YL);
sd               1220 drivers/media/platform/davinci/vpbe_osd.c static int osd_set_layer_config(struct osd_state *sd, enum osd_layer layer,
sd               1223 drivers/media/platform/davinci/vpbe_osd.c 	struct osd_state *osd = sd;
sd               1231 drivers/media/platform/davinci/vpbe_osd.c 	reject_config = try_layer_config(sd, layer, lconfig);
sd               1251 drivers/media/platform/davinci/vpbe_osd.c 			_osd_disable_layer(sd, layer);
sd               1255 drivers/media/platform/davinci/vpbe_osd.c 	_osd_set_layer_config(sd, layer, lconfig);
sd               1270 drivers/media/platform/davinci/vpbe_osd.c 			_osd_set_osd_clut(sd, OSDWIN_OSD1,
sd               1272 drivers/media/platform/davinci/vpbe_osd.c 			_osd_set_blending_factor(sd, OSDWIN_OSD1,
sd               1275 drivers/media/platform/davinci/vpbe_osd.c 				_osd_enable_color_key(sd, OSDWIN_OSD1,
sd               1280 drivers/media/platform/davinci/vpbe_osd.c 				_osd_disable_color_key(sd, OSDWIN_OSD1);
sd               1281 drivers/media/platform/davinci/vpbe_osd.c 			_osd_set_rec601_attenuation(sd, OSDWIN_OSD1,
sd               1291 drivers/media/platform/davinci/vpbe_osd.c 			_osd_set_blink_attribute(sd, osd->is_blinking,
sd               1332 drivers/media/platform/davinci/vpbe_osd.c 				_osd_set_palette_map(sd, osdwin, clut_index,
sd               1342 drivers/media/platform/davinci/vpbe_osd.c 		_osd_enable_vid_rgb888(sd, WIN_VID0);
sd               1344 drivers/media/platform/davinci/vpbe_osd.c 		_osd_enable_vid_rgb888(sd, WIN_VID1);
sd               1346 drivers/media/platform/davinci/vpbe_osd.c 		_osd_disable_vid_rgb888(sd);
sd               1350 drivers/media/platform/davinci/vpbe_osd.c 		    _osd_dm6446_vid0_pingpong(sd, osd->field_inversion,
sd               1360 drivers/media/platform/davinci/vpbe_osd.c static void osd_init_layer(struct osd_state *sd, enum osd_layer layer)
sd               1362 drivers/media/platform/davinci/vpbe_osd.c 	struct osd_state *osd = sd;
sd               1372 drivers/media/platform/davinci/vpbe_osd.c 	_osd_disable_layer(sd, layer);
sd               1376 drivers/media/platform/davinci/vpbe_osd.c 	_osd_set_zoom(sd, layer, win->h_zoom, win->v_zoom);
sd               1379 drivers/media/platform/davinci/vpbe_osd.c 	_osd_start_layer(sd, layer, win->fb_base_phys, 0);
sd               1398 drivers/media/platform/davinci/vpbe_osd.c 		_osd_set_layer_config(sd, layer, cfg);
sd               1400 drivers/media/platform/davinci/vpbe_osd.c 		_osd_set_osd_clut(sd, osdwin, osdwin_state->clut);
sd               1402 drivers/media/platform/davinci/vpbe_osd.c 		_osd_disable_color_key(sd, osdwin);
sd               1404 drivers/media/platform/davinci/vpbe_osd.c 		_osd_set_blending_factor(sd, osdwin, osdwin_state->blend);
sd               1406 drivers/media/platform/davinci/vpbe_osd.c 		_osd_set_rec601_attenuation(sd, osdwin,
sd               1417 drivers/media/platform/davinci/vpbe_osd.c 		_osd_set_layer_config(sd, layer, cfg);
sd               1424 drivers/media/platform/davinci/vpbe_osd.c static void osd_release_layer(struct osd_state *sd, enum osd_layer layer)
sd               1426 drivers/media/platform/davinci/vpbe_osd.c 	struct osd_state *osd = sd;
sd               1438 drivers/media/platform/davinci/vpbe_osd.c 	osd_init_layer(sd, layer);
sd               1446 drivers/media/platform/davinci/vpbe_osd.c static int osd_request_layer(struct osd_state *sd, enum osd_layer layer)
sd               1448 drivers/media/platform/davinci/vpbe_osd.c 	struct osd_state *osd = sd;
sd               1465 drivers/media/platform/davinci/vpbe_osd.c static void _osd_init(struct osd_state *sd)
sd               1467 drivers/media/platform/davinci/vpbe_osd.c 	osd_write(sd, 0, OSD_MODE);
sd               1468 drivers/media/platform/davinci/vpbe_osd.c 	osd_write(sd, 0, OSD_VIDWINMD);
sd               1469 drivers/media/platform/davinci/vpbe_osd.c 	osd_write(sd, 0, OSD_OSDWIN0MD);
sd               1470 drivers/media/platform/davinci/vpbe_osd.c 	osd_write(sd, 0, OSD_OSDWIN1MD);
sd               1471 drivers/media/platform/davinci/vpbe_osd.c 	osd_write(sd, 0, OSD_RECTCUR);
sd               1472 drivers/media/platform/davinci/vpbe_osd.c 	osd_write(sd, 0, OSD_MISCCTL);
sd               1473 drivers/media/platform/davinci/vpbe_osd.c 	if (sd->vpbe_type == VPBE_VERSION_3) {
sd               1474 drivers/media/platform/davinci/vpbe_osd.c 		osd_write(sd, 0, OSD_VBNDRY);
sd               1475 drivers/media/platform/davinci/vpbe_osd.c 		osd_write(sd, 0, OSD_EXTMODE);
sd               1476 drivers/media/platform/davinci/vpbe_osd.c 		osd_write(sd, OSD_MISCCTL_DMANG, OSD_MISCCTL);
sd               1480 drivers/media/platform/davinci/vpbe_osd.c static void osd_set_left_margin(struct osd_state *sd, u32 val)
sd               1482 drivers/media/platform/davinci/vpbe_osd.c 	osd_write(sd, val, OSD_BASEPX);
sd               1485 drivers/media/platform/davinci/vpbe_osd.c static void osd_set_top_margin(struct osd_state *sd, u32 val)
sd               1487 drivers/media/platform/davinci/vpbe_osd.c 	osd_write(sd, val, OSD_BASEPY);
sd                 53 drivers/media/platform/davinci/vpbe_venc.c 	struct v4l2_subdev sd;
sd                 65 drivers/media/platform/davinci/vpbe_venc.c static inline struct venc_state *to_state(struct v4l2_subdev *sd)
sd                 67 drivers/media/platform/davinci/vpbe_venc.c 	return container_of(sd, struct venc_state, sd);
sd                 70 drivers/media/platform/davinci/vpbe_venc.c static inline u32 venc_read(struct v4l2_subdev *sd, u32 offset)
sd                 72 drivers/media/platform/davinci/vpbe_venc.c 	struct venc_state *venc = to_state(sd);
sd                 77 drivers/media/platform/davinci/vpbe_venc.c static inline u32 venc_write(struct v4l2_subdev *sd, u32 offset, u32 val)
sd                 79 drivers/media/platform/davinci/vpbe_venc.c 	struct venc_state *venc = to_state(sd);
sd                 86 drivers/media/platform/davinci/vpbe_venc.c static inline u32 venc_modify(struct v4l2_subdev *sd, u32 offset,
sd                 89 drivers/media/platform/davinci/vpbe_venc.c 	u32 new_val = (venc_read(sd, offset) & ~mask) | (val & mask);
sd                 91 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, offset, new_val);
sd                 96 drivers/media/platform/davinci/vpbe_venc.c static inline u32 vdaccfg_write(struct v4l2_subdev *sd, u32 val)
sd                 98 drivers/media/platform/davinci/vpbe_venc.c 	struct venc_state *venc = to_state(sd);
sd                111 drivers/media/platform/davinci/vpbe_venc.c static int venc_set_dac(struct v4l2_subdev *sd, u32 out_index)
sd                115 drivers/media/platform/davinci/vpbe_venc.c 		v4l2_dbg(debug, 1, sd, "Setting output to Composite\n");
sd                116 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_DACSEL, 0);
sd                119 drivers/media/platform/davinci/vpbe_venc.c 		v4l2_dbg(debug, 1, sd, "Setting output to Component\n");
sd                120 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_DACSEL, VDAC_COMPONENT);
sd                123 drivers/media/platform/davinci/vpbe_venc.c 		v4l2_dbg(debug, 1, sd, "Setting output to S-video\n");
sd                124 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_DACSEL, VDAC_S_VIDEO);
sd                133 drivers/media/platform/davinci/vpbe_venc.c static void venc_enabledigitaloutput(struct v4l2_subdev *sd, int benable)
sd                135 drivers/media/platform/davinci/vpbe_venc.c 	struct venc_state *venc = to_state(sd);
sd                137 drivers/media/platform/davinci/vpbe_venc.c 	v4l2_dbg(debug, 2, sd, "venc_enabledigitaloutput\n");
sd                140 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VMOD, 0);
sd                141 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_CVBS, 0);
sd                142 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_LCDOUT, 0);
sd                143 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_HSPLS, 0);
sd                144 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_HSTART, 0);
sd                145 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_HVALID, 0);
sd                146 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_HINT, 0);
sd                147 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VSPLS, 0);
sd                148 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VSTART, 0);
sd                149 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VVALID, 0);
sd                150 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VINT, 0);
sd                151 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_YCCCTL, 0);
sd                152 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_DACSEL, 0);
sd                155 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VMOD, 0);
sd                157 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VIDCTL, 0x141);
sd                160 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_SYNCCTL, 0);
sd                163 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_DCLKCTL, 0);
sd                164 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_DRGBX1, 0x0000057C);
sd                167 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_LCDOUT, 0);
sd                169 drivers/media/platform/davinci/vpbe_venc.c 			venc_write(sd, VENC_CMPNT, 0x100);
sd                170 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_HSPLS, 0);
sd                171 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_HINT, 0);
sd                172 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_HSTART, 0);
sd                173 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_HVALID, 0);
sd                175 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VSPLS, 0);
sd                176 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VINT, 0);
sd                177 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VSTART, 0);
sd                178 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VVALID, 0);
sd                180 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_HSDLY, 0);
sd                181 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VSDLY, 0);
sd                183 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_YCCCTL, 0);
sd                184 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VSTARTA, 0);
sd                187 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_OSDCLK0, 1);
sd                188 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_OSDCLK1, 2);
sd                216 drivers/media/platform/davinci/vpbe_venc.c static int venc_set_ntsc(struct v4l2_subdev *sd)
sd                218 drivers/media/platform/davinci/vpbe_venc.c 	struct venc_state *venc = to_state(sd);
sd                221 drivers/media/platform/davinci/vpbe_venc.c 	v4l2_dbg(debug, 2, sd, "venc_set_ntsc\n");
sd                229 drivers/media/platform/davinci/vpbe_venc.c 	venc_enabledigitaloutput(sd, 0);
sd                232 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_CLKCTL, 0x01);
sd                233 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VIDCTL, 0);
sd                234 drivers/media/platform/davinci/vpbe_venc.c 		vdaccfg_write(sd, VDAC_CONFIG_SD_V3);
sd                236 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_CLKCTL, 0x01);
sd                237 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VIDCTL, 0);
sd                238 drivers/media/platform/davinci/vpbe_venc.c 		vdaccfg_write(sd, VDAC_CONFIG_SD_V2);
sd                241 drivers/media/platform/davinci/vpbe_venc.c 		venc_modify(sd, VENC_VIDCTL, 0, 1 << 1);
sd                243 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_YCCCTL, 0x1);
sd                244 drivers/media/platform/davinci/vpbe_venc.c 		venc_modify(sd, VENC_VDPRO, 0, VENC_VDPRO_DAFRQ);
sd                245 drivers/media/platform/davinci/vpbe_venc.c 		venc_modify(sd, VENC_VDPRO, 0, VENC_VDPRO_DAUPS);
sd                248 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_VMOD, 0);
sd                249 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, (1 << VENC_VMOD_VIE_SHIFT),
sd                251 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, (0 << VENC_VMOD_VMD), VENC_VMOD_VMD);
sd                252 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, (0 << VENC_VMOD_TVTYP_SHIFT),
sd                254 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_DACTST, 0x0);
sd                255 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, VENC_VMOD_VENC, VENC_VMOD_VENC);
sd                263 drivers/media/platform/davinci/vpbe_venc.c static int venc_set_pal(struct v4l2_subdev *sd)
sd                265 drivers/media/platform/davinci/vpbe_venc.c 	struct venc_state *venc = to_state(sd);
sd                267 drivers/media/platform/davinci/vpbe_venc.c 	v4l2_dbg(debug, 2, sd, "venc_set_pal\n");
sd                275 drivers/media/platform/davinci/vpbe_venc.c 	venc_enabledigitaloutput(sd, 0);
sd                278 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_CLKCTL, 0x1);
sd                279 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VIDCTL, 0);
sd                280 drivers/media/platform/davinci/vpbe_venc.c 		vdaccfg_write(sd, VDAC_CONFIG_SD_V3);
sd                282 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_CLKCTL, 0x1);
sd                283 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_VIDCTL, 0);
sd                284 drivers/media/platform/davinci/vpbe_venc.c 		vdaccfg_write(sd, VDAC_CONFIG_SD_V2);
sd                287 drivers/media/platform/davinci/vpbe_venc.c 		venc_modify(sd, VENC_VIDCTL, 0, 1 << 1);
sd                289 drivers/media/platform/davinci/vpbe_venc.c 		venc_write(sd, VENC_YCCCTL, 0x1);
sd                292 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_SYNCCTL, 1 << VENC_SYNCCTL_OVD_SHIFT,
sd                294 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_VMOD, 0);
sd                295 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD,
sd                298 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD,
sd                300 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD,
sd                303 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_DACTST, 0x0);
sd                304 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, VENC_VMOD_VENC, VENC_VMOD_VENC);
sd                315 drivers/media/platform/davinci/vpbe_venc.c static int venc_set_480p59_94(struct v4l2_subdev *sd)
sd                317 drivers/media/platform/davinci/vpbe_venc.c 	struct venc_state *venc = to_state(sd);
sd                320 drivers/media/platform/davinci/vpbe_venc.c 	v4l2_dbg(debug, 2, sd, "venc_set_480p59_94\n");
sd                330 drivers/media/platform/davinci/vpbe_venc.c 	venc_enabledigitaloutput(sd, 0);
sd                333 drivers/media/platform/davinci/vpbe_venc.c 		vdaccfg_write(sd, VDAC_CONFIG_HD_V2);
sd                334 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_OSDCLK0, 0);
sd                335 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_OSDCLK1, 1);
sd                338 drivers/media/platform/davinci/vpbe_venc.c 		venc_modify(sd, VENC_VDPRO, VENC_VDPRO_DAFRQ,
sd                340 drivers/media/platform/davinci/vpbe_venc.c 		venc_modify(sd, VENC_VDPRO, VENC_VDPRO_DAUPS,
sd                344 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_VMOD, 0);
sd                345 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, (1 << VENC_VMOD_VIE_SHIFT),
sd                347 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, VENC_VMOD_HDMD, VENC_VMOD_HDMD);
sd                348 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, (HDTV_525P << VENC_VMOD_TVTYP_SHIFT),
sd                350 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, VENC_VMOD_VDMD_YCBCR8 <<
sd                353 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, VENC_VMOD_VENC, VENC_VMOD_VENC);
sd                363 drivers/media/platform/davinci/vpbe_venc.c static int venc_set_576p50(struct v4l2_subdev *sd)
sd                365 drivers/media/platform/davinci/vpbe_venc.c 	struct venc_state *venc = to_state(sd);
sd                368 drivers/media/platform/davinci/vpbe_venc.c 	v4l2_dbg(debug, 2, sd, "venc_set_576p50\n");
sd                378 drivers/media/platform/davinci/vpbe_venc.c 	venc_enabledigitaloutput(sd, 0);
sd                381 drivers/media/platform/davinci/vpbe_venc.c 		vdaccfg_write(sd, VDAC_CONFIG_HD_V2);
sd                383 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_OSDCLK0, 0);
sd                384 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_OSDCLK1, 1);
sd                387 drivers/media/platform/davinci/vpbe_venc.c 		venc_modify(sd, VENC_VDPRO, VENC_VDPRO_DAFRQ,
sd                389 drivers/media/platform/davinci/vpbe_venc.c 		venc_modify(sd, VENC_VDPRO, VENC_VDPRO_DAUPS,
sd                393 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_VMOD, 0);
sd                394 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, (1 << VENC_VMOD_VIE_SHIFT),
sd                396 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, VENC_VMOD_HDMD, VENC_VMOD_HDMD);
sd                397 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, (HDTV_625P << VENC_VMOD_TVTYP_SHIFT),
sd                400 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, VENC_VMOD_VDMD_YCBCR8 <<
sd                402 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, VENC_VMOD_VENC, VENC_VMOD_VENC);
sd                410 drivers/media/platform/davinci/vpbe_venc.c static int venc_set_720p60_internal(struct v4l2_subdev *sd)
sd                412 drivers/media/platform/davinci/vpbe_venc.c 	struct venc_state *venc = to_state(sd);
sd                419 drivers/media/platform/davinci/vpbe_venc.c 	venc_enabledigitaloutput(sd, 0);
sd                421 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_OSDCLK0, 0);
sd                422 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_OSDCLK1, 1);
sd                424 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_VMOD, 0);
sd                426 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, (1 << VENC_VMOD_VIE_SHIFT),
sd                428 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, VENC_VMOD_HDMD, VENC_VMOD_HDMD);
sd                429 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, (HDTV_720P << VENC_VMOD_TVTYP_SHIFT),
sd                431 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, VENC_VMOD_VENC, VENC_VMOD_VENC);
sd                432 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_XHINTVL, 0);
sd                439 drivers/media/platform/davinci/vpbe_venc.c static int venc_set_1080i30_internal(struct v4l2_subdev *sd)
sd                441 drivers/media/platform/davinci/vpbe_venc.c 	struct venc_state *venc = to_state(sd);
sd                448 drivers/media/platform/davinci/vpbe_venc.c 	venc_enabledigitaloutput(sd, 0);
sd                450 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_OSDCLK0, 0);
sd                451 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_OSDCLK1, 1);
sd                454 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_VMOD, 0);
sd                456 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, (1 << VENC_VMOD_VIE_SHIFT),
sd                458 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, VENC_VMOD_HDMD, VENC_VMOD_HDMD);
sd                459 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, (HDTV_1080I << VENC_VMOD_TVTYP_SHIFT),
sd                461 drivers/media/platform/davinci/vpbe_venc.c 	venc_modify(sd, VENC_VMOD, VENC_VMOD_VENC, VENC_VMOD_VENC);
sd                462 drivers/media/platform/davinci/vpbe_venc.c 	venc_write(sd, VENC_XHINTVL, 0);
sd                466 drivers/media/platform/davinci/vpbe_venc.c static int venc_s_std_output(struct v4l2_subdev *sd, v4l2_std_id norm)
sd                468 drivers/media/platform/davinci/vpbe_venc.c 	v4l2_dbg(debug, 1, sd, "venc_s_std_output\n");
sd                471 drivers/media/platform/davinci/vpbe_venc.c 		return venc_set_ntsc(sd);
sd                473 drivers/media/platform/davinci/vpbe_venc.c 		return venc_set_pal(sd);
sd                478 drivers/media/platform/davinci/vpbe_venc.c static int venc_s_dv_timings(struct v4l2_subdev *sd,
sd                481 drivers/media/platform/davinci/vpbe_venc.c 	struct venc_state *venc = to_state(sd);
sd                485 drivers/media/platform/davinci/vpbe_venc.c 	v4l2_dbg(debug, 1, sd, "venc_s_dv_timings\n");
sd                488 drivers/media/platform/davinci/vpbe_venc.c 		return venc_set_576p50(sd);
sd                490 drivers/media/platform/davinci/vpbe_venc.c 		return venc_set_480p59_94(sd);
sd                494 drivers/media/platform/davinci/vpbe_venc.c 		ret = venc_set_720p60_internal(sd);
sd                496 drivers/media/platform/davinci/vpbe_venc.c 		vdaccfg_write(sd, VDAC_CONFIG_HD_V2);
sd                501 drivers/media/platform/davinci/vpbe_venc.c 		ret = venc_set_1080i30_internal(sd);
sd                503 drivers/media/platform/davinci/vpbe_venc.c 		vdaccfg_write(sd, VDAC_CONFIG_HD_V2);
sd                509 drivers/media/platform/davinci/vpbe_venc.c static int venc_s_routing(struct v4l2_subdev *sd, u32 input, u32 output,
sd                512 drivers/media/platform/davinci/vpbe_venc.c 	struct venc_state *venc = to_state(sd);
sd                515 drivers/media/platform/davinci/vpbe_venc.c 	v4l2_dbg(debug, 1, sd, "venc_s_routing\n");
sd                517 drivers/media/platform/davinci/vpbe_venc.c 	ret = venc_set_dac(sd, output);
sd                524 drivers/media/platform/davinci/vpbe_venc.c static long venc_ioctl(struct v4l2_subdev *sd,
sd                532 drivers/media/platform/davinci/vpbe_venc.c 		val = venc_read(sd, VENC_VSTAT);
sd                537 drivers/media/platform/davinci/vpbe_venc.c 		v4l2_err(sd, "Wrong IOCTL cmd\n");
sd                559 drivers/media/platform/davinci/vpbe_venc.c static int venc_initialize(struct v4l2_subdev *sd)
sd                561 drivers/media/platform/davinci/vpbe_venc.c 	struct venc_state *venc = to_state(sd);
sd                568 drivers/media/platform/davinci/vpbe_venc.c 	ret = venc_s_routing(sd, 0, venc->output, 0);
sd                570 drivers/media/platform/davinci/vpbe_venc.c 		v4l2_err(sd, "Error setting output during init\n");
sd                574 drivers/media/platform/davinci/vpbe_venc.c 	ret = venc_s_std_output(sd, venc->std);
sd                576 drivers/media/platform/davinci/vpbe_venc.c 		v4l2_err(sd, "Error setting std during init\n");
sd                604 drivers/media/platform/davinci/vpbe_venc.c 	v4l2_subdev_init(&venc->sd, &venc_ops);
sd                606 drivers/media/platform/davinci/vpbe_venc.c 	strscpy(venc->sd.name, venc_name, sizeof(venc->sd.name));
sd                607 drivers/media/platform/davinci/vpbe_venc.c 	if (v4l2_device_register_subdev(v4l2_dev, &venc->sd) < 0) {
sd                612 drivers/media/platform/davinci/vpbe_venc.c 	if (venc_initialize(&venc->sd)) {
sd                618 drivers/media/platform/davinci/vpbe_venc.c 	return &venc->sd;
sd               1020 drivers/media/platform/davinci/vpfe_capture.c 	struct v4l2_subdev *sd;
sd               1052 drivers/media/platform/davinci/vpfe_capture.c 	sd = vpfe_dev->sd[subdev_index];
sd               1062 drivers/media/platform/davinci/vpfe_capture.c 	if (sd)
sd               1063 drivers/media/platform/davinci/vpfe_capture.c 		ret = v4l2_subdev_call(sd, video, s_routing, input, output, 0);
sd               1072 drivers/media/platform/davinci/vpfe_capture.c 	if (sd)
sd               1073 drivers/media/platform/davinci/vpfe_capture.c 		vpfe_dev->v4l2_dev.ctrl_handler = sd->ctrl_handler;
sd               1797 drivers/media/platform/davinci/vpfe_capture.c 	vpfe_dev->sd = kmalloc_array(num_subdevs,
sd               1798 drivers/media/platform/davinci/vpfe_capture.c 				     sizeof(*vpfe_dev->sd),
sd               1800 drivers/media/platform/davinci/vpfe_capture.c 	if (!vpfe_dev->sd) {
sd               1811 drivers/media/platform/davinci/vpfe_capture.c 		vpfe_dev->sd[i] =
sd               1816 drivers/media/platform/davinci/vpfe_capture.c 		if (vpfe_dev->sd[i]) {
sd               1820 drivers/media/platform/davinci/vpfe_capture.c 			vpfe_dev->sd[i]->grp_id = sdinfo->grp_id;
sd               1837 drivers/media/platform/davinci/vpfe_capture.c 	vpfe_dev->v4l2_dev.ctrl_handler = vpfe_dev->sd[0]->ctrl_handler;
sd               1844 drivers/media/platform/davinci/vpfe_capture.c 	kfree(vpfe_dev->sd);
sd               1869 drivers/media/platform/davinci/vpfe_capture.c 	kfree(vpfe_dev->sd);
sd                188 drivers/media/platform/davinci/vpif_capture.c 	ret = v4l2_subdev_call(ch->sd, video, s_stream, 1);
sd                278 drivers/media/platform/davinci/vpif_capture.c 	ret = v4l2_subdev_call(ch->sd, video, s_stream, 0);
sd                707 drivers/media/platform/davinci/vpif_capture.c 	struct v4l2_subdev *sd = NULL;
sd                714 drivers/media/platform/davinci/vpif_capture.c 		sd = vpif_obj.sd[sd_index];
sd                722 drivers/media/platform/davinci/vpif_capture.c 	if (sd && vpif_cfg->setup_input_path) {
sd                733 drivers/media/platform/davinci/vpif_capture.c 	if (sd) {
sd                736 drivers/media/platform/davinci/vpif_capture.c 		ret = v4l2_subdev_call(sd, video, s_routing,
sd                744 drivers/media/platform/davinci/vpif_capture.c 	ch->sd = sd;
sd                770 drivers/media/platform/davinci/vpif_capture.c 	ret = v4l2_subdev_call(ch->sd, video, querystd, std_id);
sd                850 drivers/media/platform/davinci/vpif_capture.c 	ret = v4l2_subdev_call(ch->sd, video, s_std, std_id);
sd               1012 drivers/media/platform/davinci/vpif_capture.c 	ret = v4l2_subdev_call(ch->sd, pad, get_fmt, NULL, &format);
sd               1115 drivers/media/platform/davinci/vpif_capture.c 	ret = v4l2_subdev_call(ch->sd, pad, enum_dv_timings, timings);
sd               1147 drivers/media/platform/davinci/vpif_capture.c 	ret = v4l2_subdev_call(ch->sd, video, query_dv_timings, timings);
sd               1192 drivers/media/platform/davinci/vpif_capture.c 	ret = v4l2_subdev_call(ch->sd, video, s_dv_timings, timings);
sd               1388 drivers/media/platform/davinci/vpif_capture.c 			vpif_obj.sd[i] = subdev;
sd               1402 drivers/media/platform/davinci/vpif_capture.c 			vpif_obj.sd[i] = subdev;
sd               1485 drivers/media/platform/davinci/vpif_capture.c 	kfree(vpif_obj.sd);
sd               1663 drivers/media/platform/davinci/vpif_capture.c 	vpif_obj.sd = kcalloc(subdev_count, sizeof(*vpif_obj.sd), GFP_KERNEL);
sd               1664 drivers/media/platform/davinci/vpif_capture.c 	if (!vpif_obj.sd) {
sd               1676 drivers/media/platform/davinci/vpif_capture.c 			vpif_obj.sd[i] =
sd               1683 drivers/media/platform/davinci/vpif_capture.c 			if (!vpif_obj.sd[i]) {
sd               1710 drivers/media/platform/davinci/vpif_capture.c 	kfree(vpif_obj.sd);
sd               1736 drivers/media/platform/davinci/vpif_capture.c 	kfree(vpif_obj.sd);
sd                 90 drivers/media/platform/davinci/vpif_capture.h 	struct v4l2_subdev *sd;
sd                102 drivers/media/platform/davinci/vpif_capture.h 	struct v4l2_subdev **sd;
sd                811 drivers/media/platform/davinci/vpif_display.c 	struct v4l2_subdev *sd = NULL;
sd                818 drivers/media/platform/davinci/vpif_display.c 		sd = vpif_obj.sd[sd_index];
sd                820 drivers/media/platform/davinci/vpif_display.c 	if (sd) {
sd                823 drivers/media/platform/davinci/vpif_display.c 		ret = v4l2_subdev_call(sd, video, s_routing, input, output, 0);
sd                831 drivers/media/platform/davinci/vpif_display.c 	ch->sd = sd;
sd                894 drivers/media/platform/davinci/vpif_display.c 	ret = v4l2_subdev_call(ch->sd, pad, enum_dv_timings, timings);
sd                938 drivers/media/platform/davinci/vpif_display.c 	ret = v4l2_subdev_call(ch->sd, video, s_dv_timings, timings);
sd               1129 drivers/media/platform/davinci/vpif_display.c 			vpif_obj.sd[i] = subdev;
sd               1130 drivers/media/platform/davinci/vpif_display.c 			vpif_obj.sd[i]->grp_id = 1 << i;
sd               1163 drivers/media/platform/davinci/vpif_display.c 			ch->sd = vpif_obj.sd[0];
sd               1292 drivers/media/platform/davinci/vpif_display.c 	vpif_obj.sd = kcalloc(subdev_count, sizeof(*vpif_obj.sd), GFP_KERNEL);
sd               1293 drivers/media/platform/davinci/vpif_display.c 	if (!vpif_obj.sd) {
sd               1303 drivers/media/platform/davinci/vpif_display.c 			vpif_obj.sd[i] =
sd               1309 drivers/media/platform/davinci/vpif_display.c 			if (!vpif_obj.sd[i]) {
sd               1315 drivers/media/platform/davinci/vpif_display.c 			if (vpif_obj.sd[i])
sd               1316 drivers/media/platform/davinci/vpif_display.c 				vpif_obj.sd[i]->grp_id = 1 << i;
sd               1345 drivers/media/platform/davinci/vpif_display.c 	kfree(vpif_obj.sd);
sd               1369 drivers/media/platform/davinci/vpif_display.c 	kfree(vpif_obj.sd);
sd                108 drivers/media/platform/davinci/vpif_display.h 	struct v4l2_subdev *sd;		/* Current output subdev(may be NULL) */
sd                120 drivers/media/platform/davinci/vpif_display.h 	struct v4l2_subdev **sd;
sd                 17 drivers/media/platform/exynos4-is/common.c 	struct v4l2_subdev *sd;
sd                 25 drivers/media/platform/exynos4-is/common.c 		sd = media_entity_to_v4l2_subdev(pad->entity);
sd                 27 drivers/media/platform/exynos4-is/common.c 		if (sd->grp_id == GRP_ID_FIMC_IS_SENSOR ||
sd                 28 drivers/media/platform/exynos4-is/common.c 		    sd->grp_id == GRP_ID_SENSOR)
sd                 29 drivers/media/platform/exynos4-is/common.c 			return sd;
sd                 31 drivers/media/platform/exynos4-is/common.c 		pad = &sd->entity.pads[0];
sd                775 drivers/media/platform/exynos4-is/fimc-capture.c 	struct v4l2_subdev *sd = p->subdevs[IDX_SENSOR];
sd                784 drivers/media/platform/exynos4-is/fimc-capture.c 	if (WARN_ON(!sd || !tfmt))
sd                791 drivers/media/platform/exynos4-is/fimc-capture.c 	me = fimc_pipeline_get_head(&sd->entity);
sd                807 drivers/media/platform/exynos4-is/fimc-capture.c 			sd = media_entity_to_v4l2_subdev(me);
sd                810 drivers/media/platform/exynos4-is/fimc-capture.c 			ret = v4l2_subdev_call(sd, pad, set_fmt, NULL, &sfmt);
sd                817 drivers/media/platform/exynos4-is/fimc-capture.c 				ret = v4l2_subdev_call(sd, pad, set_fmt, NULL,
sd               1072 drivers/media/platform/exynos4-is/fimc-capture.c 	struct v4l2_subdev *sd;
sd               1079 drivers/media/platform/exynos4-is/fimc-capture.c 	sd = __fimc_md_get_subdev(ve->pipe, IDX_SENSOR);
sd               1082 drivers/media/platform/exynos4-is/fimc-capture.c 	if (sd)
sd               1083 drivers/media/platform/exynos4-is/fimc-capture.c 		strscpy(i->name, sd->name, sizeof(i->name));
sd               1110 drivers/media/platform/exynos4-is/fimc-capture.c 	struct v4l2_subdev *sd = &vc->subdev;
sd               1123 drivers/media/platform/exynos4-is/fimc-capture.c 		for (i = 0; i < sd->entity.num_pads; i++) {
sd               1124 drivers/media/platform/exynos4-is/fimc-capture.c 			struct media_pad *p = &sd->entity.pads[i];
sd               1138 drivers/media/platform/exynos4-is/fimc-capture.c 		if (sd == &vc->subdev) {
sd               1146 drivers/media/platform/exynos4-is/fimc-capture.c 			ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &sink_fmt);
sd               1152 drivers/media/platform/exynos4-is/fimc-capture.c 		sd = media_entity_to_v4l2_subdev(src_pad->entity);
sd               1155 drivers/media/platform/exynos4-is/fimc-capture.c 		ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &src_fmt);
sd               1164 drivers/media/platform/exynos4-is/fimc-capture.c 		if (sd == p->subdevs[IDX_SENSOR] &&
sd               1170 drivers/media/platform/exynos4-is/fimc-capture.c 			ret = fimc_get_sensor_frame_desc(sd, plane_fmt,
sd               1191 drivers/media/platform/exynos4-is/fimc-capture.c 	struct v4l2_subdev *sd;
sd               1201 drivers/media/platform/exynos4-is/fimc-capture.c 	sd = __fimc_md_get_subdev(vc->ve.pipe, IDX_SENSOR);
sd               1202 drivers/media/platform/exynos4-is/fimc-capture.c 	if (sd)
sd               1203 drivers/media/platform/exynos4-is/fimc-capture.c 		si = v4l2_get_subdev_hostdata(sd);
sd               1386 drivers/media/platform/exynos4-is/fimc-capture.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd               1387 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
sd               1409 drivers/media/platform/exynos4-is/fimc-capture.c 	vc->input = sd->grp_id;
sd               1440 drivers/media/platform/exynos4-is/fimc-capture.c void fimc_sensor_notify(struct v4l2_subdev *sd, unsigned int notification,
sd               1449 drivers/media/platform/exynos4-is/fimc-capture.c 	if (sd == NULL)
sd               1452 drivers/media/platform/exynos4-is/fimc-capture.c 	si = v4l2_get_subdev_hostdata(sd);
sd               1453 drivers/media/platform/exynos4-is/fimc-capture.c 	fmd = entity_to_fimc_mdev(&sd->entity);
sd               1476 drivers/media/platform/exynos4-is/fimc-capture.c static int fimc_subdev_enum_mbus_code(struct v4l2_subdev *sd,
sd               1489 drivers/media/platform/exynos4-is/fimc-capture.c static int fimc_subdev_get_fmt(struct v4l2_subdev *sd,
sd               1493 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
sd               1499 drivers/media/platform/exynos4-is/fimc-capture.c 		mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1530 drivers/media/platform/exynos4-is/fimc-capture.c static int fimc_subdev_set_fmt(struct v4l2_subdev *sd,
sd               1534 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
sd               1554 drivers/media/platform/exynos4-is/fimc-capture.c 		mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1596 drivers/media/platform/exynos4-is/fimc-capture.c static int fimc_subdev_get_selection(struct v4l2_subdev *sd,
sd               1600 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
sd               1624 drivers/media/platform/exynos4-is/fimc-capture.c 		try_sel = v4l2_subdev_get_try_crop(sd, cfg, sel->pad);
sd               1627 drivers/media/platform/exynos4-is/fimc-capture.c 		try_sel = v4l2_subdev_get_try_compose(sd, cfg, sel->pad);
sd               1652 drivers/media/platform/exynos4-is/fimc-capture.c static int fimc_subdev_set_selection(struct v4l2_subdev *sd,
sd               1656 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
sd               1671 drivers/media/platform/exynos4-is/fimc-capture.c 		try_sel = v4l2_subdev_get_try_crop(sd, cfg, sel->pad);
sd               1674 drivers/media/platform/exynos4-is/fimc-capture.c 		try_sel = v4l2_subdev_get_try_compose(sd, cfg, sel->pad);
sd               1830 drivers/media/platform/exynos4-is/fimc-capture.c static int fimc_capture_subdev_registered(struct v4l2_subdev *sd)
sd               1832 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
sd               1838 drivers/media/platform/exynos4-is/fimc-capture.c 	ret = fimc_register_m2m_device(fimc, sd->v4l2_dev);
sd               1842 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc->vid_cap.ve.pipe = v4l2_get_subdev_hostdata(sd);
sd               1844 drivers/media/platform/exynos4-is/fimc-capture.c 	ret = fimc_register_capture_device(fimc, sd->v4l2_dev);
sd               1853 drivers/media/platform/exynos4-is/fimc-capture.c static void fimc_capture_subdev_unregistered(struct v4l2_subdev *sd)
sd               1855 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
sd               1885 drivers/media/platform/exynos4-is/fimc-capture.c 	struct v4l2_subdev *sd = &fimc->vid_cap.subdev;
sd               1888 drivers/media/platform/exynos4-is/fimc-capture.c 	v4l2_subdev_init(sd, &fimc_subdev_ops);
sd               1889 drivers/media/platform/exynos4-is/fimc-capture.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1890 drivers/media/platform/exynos4-is/fimc-capture.c 	snprintf(sd->name, sizeof(sd->name), "FIMC.%d", fimc->id);
sd               1895 drivers/media/platform/exynos4-is/fimc-capture.c 	ret = media_entity_pads_init(&sd->entity, FIMC_SD_PADS_NUM,
sd               1900 drivers/media/platform/exynos4-is/fimc-capture.c 	sd->entity.ops = &fimc_sd_media_ops;
sd               1901 drivers/media/platform/exynos4-is/fimc-capture.c 	sd->internal_ops = &fimc_capture_sd_internal_ops;
sd               1902 drivers/media/platform/exynos4-is/fimc-capture.c 	v4l2_set_subdevdata(sd, fimc);
sd               1908 drivers/media/platform/exynos4-is/fimc-capture.c 	struct v4l2_subdev *sd = &fimc->vid_cap.subdev;
sd               1910 drivers/media/platform/exynos4-is/fimc-capture.c 	v4l2_device_unregister_subdev(sd);
sd               1911 drivers/media/platform/exynos4-is/fimc-capture.c 	media_entity_cleanup(&sd->entity);
sd               1912 drivers/media/platform/exynos4-is/fimc-capture.c 	v4l2_set_subdevdata(sd, NULL);
sd                663 drivers/media/platform/exynos4-is/fimc-core.h void fimc_sensor_notify(struct v4l2_subdev *sd, unsigned int notification,
sd                448 drivers/media/platform/exynos4-is/fimc-isp-video.c 	struct v4l2_subdev *sd = &isp->subdev;
sd                455 drivers/media/platform/exynos4-is/fimc-isp-video.c 		pad = &sd->entity.pads[0];
sd                460 drivers/media/platform/exynos4-is/fimc-isp-video.c 		ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &sink_fmt);
sd                469 drivers/media/platform/exynos4-is/fimc-isp-video.c 		sd = media_entity_to_v4l2_subdev(pad->entity);
sd                472 drivers/media/platform/exynos4-is/fimc-isp-video.c 		ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &src_fmt);
sd                108 drivers/media/platform/exynos4-is/fimc-isp.c static int fimc_is_subdev_enum_mbus_code(struct v4l2_subdev *sd,
sd                121 drivers/media/platform/exynos4-is/fimc-isp.c static int fimc_isp_subdev_get_fmt(struct v4l2_subdev *sd,
sd                125 drivers/media/platform/exynos4-is/fimc-isp.c 	struct fimc_isp *isp = v4l2_get_subdevdata(sd);
sd                129 drivers/media/platform/exynos4-is/fimc-isp.c 		*mf = *v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd                152 drivers/media/platform/exynos4-is/fimc-isp.c 	isp_dbg(1, sd, "%s: pad%d: fmt: 0x%x, %dx%d\n", __func__,
sd                193 drivers/media/platform/exynos4-is/fimc-isp.c static int fimc_isp_subdev_set_fmt(struct v4l2_subdev *sd,
sd                197 drivers/media/platform/exynos4-is/fimc-isp.c 	struct fimc_isp *isp = v4l2_get_subdevdata(sd);
sd                202 drivers/media/platform/exynos4-is/fimc-isp.c 	isp_dbg(1, sd, "%s: pad%d: code: 0x%x, %dx%d\n",
sd                209 drivers/media/platform/exynos4-is/fimc-isp.c 		mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd                221 drivers/media/platform/exynos4-is/fimc-isp.c 				mf = v4l2_subdev_get_try_format(sd, cfg, pad);
sd                226 drivers/media/platform/exynos4-is/fimc-isp.c 		if (sd->entity.stream_count == 0) {
sd                249 drivers/media/platform/exynos4-is/fimc-isp.c static int fimc_isp_subdev_s_stream(struct v4l2_subdev *sd, int on)
sd                251 drivers/media/platform/exynos4-is/fimc-isp.c 	struct fimc_isp *isp = v4l2_get_subdevdata(sd);
sd                255 drivers/media/platform/exynos4-is/fimc-isp.c 	isp_dbg(1, sd, "%s: on: %d\n", __func__, on);
sd                269 drivers/media/platform/exynos4-is/fimc-isp.c 		isp_dbg(1, sd, "changing mode to %d\n", is->config_index);
sd                280 drivers/media/platform/exynos4-is/fimc-isp.c 			v4l2_err(sd, "stream on timeout\n");
sd                289 drivers/media/platform/exynos4-is/fimc-isp.c 			v4l2_err(sd, "stream off timeout\n");
sd                298 drivers/media/platform/exynos4-is/fimc-isp.c static int fimc_isp_subdev_s_power(struct v4l2_subdev *sd, int on)
sd                300 drivers/media/platform/exynos4-is/fimc-isp.c 	struct fimc_isp *isp = v4l2_get_subdevdata(sd);
sd                314 drivers/media/platform/exynos4-is/fimc-isp.c 			v4l2_err(sd, "firmware booting failed\n");
sd                329 drivers/media/platform/exynos4-is/fimc-isp.c 				v4l2_err(sd, "sensor close timeout\n");
sd                340 drivers/media/platform/exynos4-is/fimc-isp.c 				v4l2_err(sd, "sub-IP power off timeout\n");
sd                360 drivers/media/platform/exynos4-is/fimc-isp.c static int fimc_isp_subdev_open(struct v4l2_subdev *sd,
sd                372 drivers/media/platform/exynos4-is/fimc-isp.c 	format = v4l2_subdev_get_try_format(sd, fh->pad, FIMC_ISP_SD_PAD_SINK);
sd                375 drivers/media/platform/exynos4-is/fimc-isp.c 	format = v4l2_subdev_get_try_format(sd, fh->pad, FIMC_ISP_SD_PAD_SRC_FIFO);
sd                380 drivers/media/platform/exynos4-is/fimc-isp.c 	format = v4l2_subdev_get_try_format(sd, fh->pad, FIMC_ISP_SD_PAD_SRC_DMA);
sd                386 drivers/media/platform/exynos4-is/fimc-isp.c static int fimc_isp_subdev_registered(struct v4l2_subdev *sd)
sd                388 drivers/media/platform/exynos4-is/fimc-isp.c 	struct fimc_isp *isp = v4l2_get_subdevdata(sd);
sd                392 drivers/media/platform/exynos4-is/fimc-isp.c 	isp->video_capture.ve.pipe = v4l2_get_subdev_hostdata(sd);
sd                394 drivers/media/platform/exynos4-is/fimc-isp.c 	ret = fimc_isp_video_device_register(isp, sd->v4l2_dev,
sd                402 drivers/media/platform/exynos4-is/fimc-isp.c static void fimc_isp_subdev_unregistered(struct v4l2_subdev *sd)
sd                404 drivers/media/platform/exynos4-is/fimc-isp.c 	struct fimc_isp *isp = v4l2_get_subdevdata(sd);
sd                689 drivers/media/platform/exynos4-is/fimc-isp.c 	struct v4l2_subdev *sd = &isp->subdev;
sd                695 drivers/media/platform/exynos4-is/fimc-isp.c 	v4l2_subdev_init(sd, &fimc_is_subdev_ops);
sd                697 drivers/media/platform/exynos4-is/fimc-isp.c 	sd->owner = THIS_MODULE;
sd                698 drivers/media/platform/exynos4-is/fimc-isp.c 	sd->grp_id = GRP_ID_FIMC_IS;
sd                699 drivers/media/platform/exynos4-is/fimc-isp.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                700 drivers/media/platform/exynos4-is/fimc-isp.c 	snprintf(sd->name, sizeof(sd->name), "FIMC-IS-ISP");
sd                702 drivers/media/platform/exynos4-is/fimc-isp.c 	sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
sd                706 drivers/media/platform/exynos4-is/fimc-isp.c 	ret = media_entity_pads_init(&sd->entity, FIMC_ISP_SD_PADS_NUM,
sd                756 drivers/media/platform/exynos4-is/fimc-isp.c 		media_entity_cleanup(&sd->entity);
sd                763 drivers/media/platform/exynos4-is/fimc-isp.c 	sd->ctrl_handler = handler;
sd                764 drivers/media/platform/exynos4-is/fimc-isp.c 	sd->internal_ops = &fimc_is_subdev_internal_ops;
sd                765 drivers/media/platform/exynos4-is/fimc-isp.c 	sd->entity.ops = &fimc_is_subdev_media_ops;
sd                766 drivers/media/platform/exynos4-is/fimc-isp.c 	v4l2_set_subdevdata(sd, isp);
sd                775 drivers/media/platform/exynos4-is/fimc-isp.c 	struct v4l2_subdev *sd = &isp->subdev;
sd                777 drivers/media/platform/exynos4-is/fimc-isp.c 	v4l2_device_unregister_subdev(sd);
sd                778 drivers/media/platform/exynos4-is/fimc-isp.c 	media_entity_cleanup(&sd->entity);
sd                780 drivers/media/platform/exynos4-is/fimc-isp.c 	v4l2_set_subdevdata(sd, NULL);
sd                767 drivers/media/platform/exynos4-is/fimc-lite.c 	struct v4l2_subdev *sd = &fimc->subdev;
sd                774 drivers/media/platform/exynos4-is/fimc-lite.c 		pad = &sd->entity.pads[0];
sd                778 drivers/media/platform/exynos4-is/fimc-lite.c 		if (sd == &fimc->subdev) {
sd                786 drivers/media/platform/exynos4-is/fimc-lite.c 			ret = v4l2_subdev_call(sd, pad, get_fmt, NULL,
sd                796 drivers/media/platform/exynos4-is/fimc-lite.c 		sd = media_entity_to_v4l2_subdev(pad->entity);
sd                799 drivers/media/platform/exynos4-is/fimc-lite.c 		ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &src_fmt);
sd                964 drivers/media/platform/exynos4-is/fimc-lite.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd                965 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
sd                971 drivers/media/platform/exynos4-is/fimc-lite.c 	v4l2_dbg(1, debug, sd, "%s: %s --> %s, flags: 0x%x. source_id: 0x%x\n",
sd                979 drivers/media/platform/exynos4-is/fimc-lite.c 				fimc->source_subdev_grp_id = sd->grp_id;
sd               1003 drivers/media/platform/exynos4-is/fimc-lite.c 		v4l2_err(sd, "Invalid pad index\n");
sd               1015 drivers/media/platform/exynos4-is/fimc-lite.c static int fimc_lite_subdev_enum_mbus_code(struct v4l2_subdev *sd,
sd               1029 drivers/media/platform/exynos4-is/fimc-lite.c 		struct v4l2_subdev *sd,
sd               1035 drivers/media/platform/exynos4-is/fimc-lite.c 	return v4l2_subdev_get_try_format(sd, cfg, pad);
sd               1038 drivers/media/platform/exynos4-is/fimc-lite.c static int fimc_lite_subdev_get_fmt(struct v4l2_subdev *sd,
sd               1042 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
sd               1047 drivers/media/platform/exynos4-is/fimc-lite.c 		mf = __fimc_lite_subdev_get_try_fmt(sd, cfg, fmt->pad);
sd               1069 drivers/media/platform/exynos4-is/fimc-lite.c static int fimc_lite_subdev_set_fmt(struct v4l2_subdev *sd,
sd               1073 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
sd               1079 drivers/media/platform/exynos4-is/fimc-lite.c 	v4l2_dbg(1, debug, sd, "pad%d: code: 0x%x, %dx%d\n",
sd               1085 drivers/media/platform/exynos4-is/fimc-lite.c 	    sd->entity.stream_count > 0) ||
sd               1097 drivers/media/platform/exynos4-is/fimc-lite.c 		mf = __fimc_lite_subdev_get_try_fmt(sd, cfg, fmt->pad);
sd               1102 drivers/media/platform/exynos4-is/fimc-lite.c 			src_fmt = __fimc_lite_subdev_get_try_fmt(sd, cfg, pad);
sd               1129 drivers/media/platform/exynos4-is/fimc-lite.c static int fimc_lite_subdev_get_selection(struct v4l2_subdev *sd,
sd               1133 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
sd               1142 drivers/media/platform/exynos4-is/fimc-lite.c 		sel->r = *v4l2_subdev_get_try_crop(sd, cfg, sel->pad);
sd               1157 drivers/media/platform/exynos4-is/fimc-lite.c 	v4l2_dbg(1, debug, sd, "%s: (%d,%d) %dx%d, f_w: %d, f_h: %d\n",
sd               1164 drivers/media/platform/exynos4-is/fimc-lite.c static int fimc_lite_subdev_set_selection(struct v4l2_subdev *sd,
sd               1168 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
sd               1179 drivers/media/platform/exynos4-is/fimc-lite.c 		*v4l2_subdev_get_try_crop(sd, cfg, sel->pad) = sel->r;
sd               1191 drivers/media/platform/exynos4-is/fimc-lite.c 	v4l2_dbg(1, debug, sd, "%s: (%d,%d) %dx%d, f_w: %d, f_h: %d\n",
sd               1198 drivers/media/platform/exynos4-is/fimc-lite.c static int fimc_lite_subdev_s_stream(struct v4l2_subdev *sd, int on)
sd               1200 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
sd               1211 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->sensor = fimc_find_remote_sensor(&sd->entity);
sd               1236 drivers/media/platform/exynos4-is/fimc-lite.c 			v4l2_err(sd, "s_stream(0) timeout\n");
sd               1244 drivers/media/platform/exynos4-is/fimc-lite.c static int fimc_lite_log_status(struct v4l2_subdev *sd)
sd               1246 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
sd               1252 drivers/media/platform/exynos4-is/fimc-lite.c static int fimc_lite_subdev_registered(struct v4l2_subdev *sd)
sd               1254 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
sd               1267 drivers/media/platform/exynos4-is/fimc-lite.c 	vfd->v4l2_dev = sd->v4l2_dev;
sd               1298 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->ve.pipe = v4l2_get_subdev_hostdata(sd);
sd               1307 drivers/media/platform/exynos4-is/fimc-lite.c 	v4l2_info(sd->v4l2_dev, "Registered %s as /dev/%s\n",
sd               1312 drivers/media/platform/exynos4-is/fimc-lite.c static void fimc_lite_subdev_unregistered(struct v4l2_subdev *sd)
sd               1314 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
sd               1397 drivers/media/platform/exynos4-is/fimc-lite.c 	struct v4l2_subdev *sd = &fimc->subdev;
sd               1400 drivers/media/platform/exynos4-is/fimc-lite.c 	v4l2_subdev_init(sd, &fimc_lite_subdev_ops);
sd               1401 drivers/media/platform/exynos4-is/fimc-lite.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1402 drivers/media/platform/exynos4-is/fimc-lite.c 	snprintf(sd->name, sizeof(sd->name), "FIMC-LITE.%d", fimc->index);
sd               1407 drivers/media/platform/exynos4-is/fimc-lite.c 	ret = media_entity_pads_init(&sd->entity, FLITE_SD_PADS_NUM,
sd               1416 drivers/media/platform/exynos4-is/fimc-lite.c 		media_entity_cleanup(&sd->entity);
sd               1420 drivers/media/platform/exynos4-is/fimc-lite.c 	sd->ctrl_handler = handler;
sd               1421 drivers/media/platform/exynos4-is/fimc-lite.c 	sd->internal_ops = &fimc_lite_subdev_internal_ops;
sd               1422 drivers/media/platform/exynos4-is/fimc-lite.c 	sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER;
sd               1423 drivers/media/platform/exynos4-is/fimc-lite.c 	sd->entity.ops = &fimc_lite_subdev_media_ops;
sd               1424 drivers/media/platform/exynos4-is/fimc-lite.c 	sd->owner = THIS_MODULE;
sd               1425 drivers/media/platform/exynos4-is/fimc-lite.c 	v4l2_set_subdevdata(sd, fimc);
sd               1432 drivers/media/platform/exynos4-is/fimc-lite.c 	struct v4l2_subdev *sd = &fimc->subdev;
sd               1434 drivers/media/platform/exynos4-is/fimc-lite.c 	v4l2_device_unregister_subdev(sd);
sd               1435 drivers/media/platform/exynos4-is/fimc-lite.c 	media_entity_cleanup(&sd->entity);
sd               1437 drivers/media/platform/exynos4-is/fimc-lite.c 	v4l2_set_subdevdata(sd, NULL);
sd                 68 drivers/media/platform/exynos4-is/media-dev.c 	struct v4l2_subdev *sd;
sd                 90 drivers/media/platform/exynos4-is/media-dev.c 		sd = media_entity_to_v4l2_subdev(pad->entity);
sd                 92 drivers/media/platform/exynos4-is/media-dev.c 		switch (sd->grp_id) {
sd                 94 drivers/media/platform/exynos4-is/media-dev.c 			sensor = sd;
sd                 97 drivers/media/platform/exynos4-is/media-dev.c 			p->subdevs[IDX_SENSOR] = sd;
sd                100 drivers/media/platform/exynos4-is/media-dev.c 			p->subdevs[IDX_CSIS] = sd;
sd                103 drivers/media/platform/exynos4-is/media-dev.c 			p->subdevs[IDX_FLITE] = sd;
sd                106 drivers/media/platform/exynos4-is/media-dev.c 			p->subdevs[IDX_FIMC] = sd;
sd                109 drivers/media/platform/exynos4-is/media-dev.c 			p->subdevs[IDX_IS_ISP] = sd;
sd                114 drivers/media/platform/exynos4-is/media-dev.c 		me = &sd->entity;
sd                131 drivers/media/platform/exynos4-is/media-dev.c static int __subdev_set_power(struct v4l2_subdev *sd, int on)
sd                136 drivers/media/platform/exynos4-is/media-dev.c 	if (sd == NULL)
sd                139 drivers/media/platform/exynos4-is/media-dev.c 	use_count = &sd->entity.use_count;
sd                144 drivers/media/platform/exynos4-is/media-dev.c 	ret = v4l2_subdev_call(sd, core, s_power, on);
sd                230 drivers/media/platform/exynos4-is/media-dev.c 	struct v4l2_subdev *sd;
sd                238 drivers/media/platform/exynos4-is/media-dev.c 	sd = p->subdevs[IDX_SENSOR];
sd                239 drivers/media/platform/exynos4-is/media-dev.c 	if (sd == NULL) {
sd                260 drivers/media/platform/exynos4-is/media-dev.c 	struct v4l2_subdev *sd = p ? p->subdevs[IDX_SENSOR] : NULL;
sd                264 drivers/media/platform/exynos4-is/media-dev.c 	if (sd == NULL) {
sd                271 drivers/media/platform/exynos4-is/media-dev.c 	fmd = entity_to_fimc_mdev(&sd->entity);
sd                556 drivers/media/platform/exynos4-is/media-dev.c 	struct v4l2_subdev *sd;
sd                564 drivers/media/platform/exynos4-is/media-dev.c 	sd = &fimc_lite->subdev;
sd                565 drivers/media/platform/exynos4-is/media-dev.c 	sd->grp_id = GRP_ID_FLITE;
sd                571 drivers/media/platform/exynos4-is/media-dev.c 	v4l2_set_subdev_hostdata(sd, ep);
sd                573 drivers/media/platform/exynos4-is/media-dev.c 	ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd);
sd                584 drivers/media/platform/exynos4-is/media-dev.c 	struct v4l2_subdev *sd;
sd                591 drivers/media/platform/exynos4-is/media-dev.c 	sd = &fimc->vid_cap.subdev;
sd                592 drivers/media/platform/exynos4-is/media-dev.c 	sd->grp_id = GRP_ID_FIMC;
sd                598 drivers/media/platform/exynos4-is/media-dev.c 	v4l2_set_subdev_hostdata(sd, ep);
sd                600 drivers/media/platform/exynos4-is/media-dev.c 	ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd);
sd                615 drivers/media/platform/exynos4-is/media-dev.c 				struct v4l2_subdev *sd)
sd                625 drivers/media/platform/exynos4-is/media-dev.c 	if (WARN_ON(fmd->csis[id].sd))
sd                628 drivers/media/platform/exynos4-is/media-dev.c 	sd->grp_id = GRP_ID_CSIS;
sd                629 drivers/media/platform/exynos4-is/media-dev.c 	ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd);
sd                631 drivers/media/platform/exynos4-is/media-dev.c 		fmd->csis[id].sd = sd;
sd                640 drivers/media/platform/exynos4-is/media-dev.c 	struct v4l2_subdev *sd = &is->isp.subdev;
sd                649 drivers/media/platform/exynos4-is/media-dev.c 	v4l2_set_subdev_hostdata(sd, ep);
sd                651 drivers/media/platform/exynos4-is/media-dev.c 	ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd);
sd                769 drivers/media/platform/exynos4-is/media-dev.c 		if (fmd->csis[i].sd == NULL)
sd                771 drivers/media/platform/exynos4-is/media-dev.c 		v4l2_device_unregister_subdev(fmd->csis[i].sd);
sd                772 drivers/media/platform/exynos4-is/media-dev.c 		fmd->csis[i].sd = NULL;
sd                957 drivers/media/platform/exynos4-is/media-dev.c 			csis = fmd->csis[pdata->mux_id].sd;
sd                996 drivers/media/platform/exynos4-is/media-dev.c 		if (fmd->csis[i].sd == NULL)
sd                999 drivers/media/platform/exynos4-is/media-dev.c 		source = &fmd->csis[i].sd->entity;
sd                 67 drivers/media/platform/exynos4-is/media-dev.h 	struct v4l2_subdev *sd;
sd                183 drivers/media/platform/exynos4-is/media-dev.h int fimc_md_set_camclk(struct v4l2_subdev *sd, bool on);
sd                203 drivers/media/platform/exynos4-is/mipi-csis.c 	struct v4l2_subdev sd;
sd                276 drivers/media/platform/exynos4-is/mipi-csis.c 	return container_of(sdev, struct csis_state, sd);
sd                334 drivers/media/platform/exynos4-is/mipi-csis.c 	v4l2_dbg(1, debug, &state->sd, "fmt: %#x, %d x %d\n",
sd                439 drivers/media/platform/exynos4-is/mipi-csis.c 	v4l2_info(&state->sd, "--- %s ---\n", label);
sd                443 drivers/media/platform/exynos4-is/mipi-csis.c 		v4l2_info(&state->sd, "%10s: 0x%08x\n", registers[i].name, cfg);
sd                481 drivers/media/platform/exynos4-is/mipi-csis.c 			v4l2_info(&state->sd, "%s events: %d\n",
sd                491 drivers/media/platform/exynos4-is/mipi-csis.c static int s5pcsis_s_power(struct v4l2_subdev *sd, int on)
sd                493 drivers/media/platform/exynos4-is/mipi-csis.c 	struct csis_state *state = sd_to_csis_state(sd);
sd                502 drivers/media/platform/exynos4-is/mipi-csis.c static int s5pcsis_s_stream(struct v4l2_subdev *sd, int enable)
sd                504 drivers/media/platform/exynos4-is/mipi-csis.c 	struct csis_state *state = sd_to_csis_state(sd);
sd                507 drivers/media/platform/exynos4-is/mipi-csis.c 	v4l2_dbg(1, debug, sd, "%s: %d, state: 0x%x\n",
sd                539 drivers/media/platform/exynos4-is/mipi-csis.c static int s5pcsis_enum_mbus_code(struct v4l2_subdev *sd,
sd                572 drivers/media/platform/exynos4-is/mipi-csis.c 		return cfg ? v4l2_subdev_get_try_format(&state->sd, cfg, 0) : NULL;
sd                577 drivers/media/platform/exynos4-is/mipi-csis.c static int s5pcsis_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd                580 drivers/media/platform/exynos4-is/mipi-csis.c 	struct csis_state *state = sd_to_csis_state(sd);
sd                605 drivers/media/platform/exynos4-is/mipi-csis.c static int s5pcsis_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd                608 drivers/media/platform/exynos4-is/mipi-csis.c 	struct csis_state *state = sd_to_csis_state(sd);
sd                621 drivers/media/platform/exynos4-is/mipi-csis.c static int s5pcsis_s_rx_buffer(struct v4l2_subdev *sd, void *buf,
sd                624 drivers/media/platform/exynos4-is/mipi-csis.c 	struct csis_state *state = sd_to_csis_state(sd);
sd                637 drivers/media/platform/exynos4-is/mipi-csis.c static int s5pcsis_log_status(struct v4l2_subdev *sd)
sd                639 drivers/media/platform/exynos4-is/mipi-csis.c 	struct csis_state *state = sd_to_csis_state(sd);
sd                702 drivers/media/platform/exynos4-is/mipi-csis.c 			v4l2_dbg(2, debug, &state->sd, "%s: %d\n",
sd                706 drivers/media/platform/exynos4-is/mipi-csis.c 		v4l2_dbg(2, debug, &state->sd, "status: %08x\n", status);
sd                840 drivers/media/platform/exynos4-is/mipi-csis.c 	v4l2_subdev_init(&state->sd, &s5pcsis_subdev_ops);
sd                841 drivers/media/platform/exynos4-is/mipi-csis.c 	state->sd.owner = THIS_MODULE;
sd                842 drivers/media/platform/exynos4-is/mipi-csis.c 	snprintf(state->sd.name, sizeof(state->sd.name), "%s.%d",
sd                844 drivers/media/platform/exynos4-is/mipi-csis.c 	state->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                851 drivers/media/platform/exynos4-is/mipi-csis.c 	state->sd.entity.function = MEDIA_ENT_F_IO_V4L;
sd                854 drivers/media/platform/exynos4-is/mipi-csis.c 	ret = media_entity_pads_init(&state->sd.entity,
sd                860 drivers/media/platform/exynos4-is/mipi-csis.c 	v4l2_set_subdevdata(&state->sd, pdev);
sd                863 drivers/media/platform/exynos4-is/mipi-csis.c 	platform_set_drvdata(pdev, &state->sd);
sd                879 drivers/media/platform/exynos4-is/mipi-csis.c 	media_entity_cleanup(&state->sd.entity);
sd                889 drivers/media/platform/exynos4-is/mipi-csis.c 	struct v4l2_subdev *sd = dev_get_drvdata(dev);
sd                890 drivers/media/platform/exynos4-is/mipi-csis.c 	struct csis_state *state = sd_to_csis_state(sd);
sd                893 drivers/media/platform/exynos4-is/mipi-csis.c 	v4l2_dbg(1, debug, sd, "%s: flags: 0x%x\n",
sd                918 drivers/media/platform/exynos4-is/mipi-csis.c 	struct v4l2_subdev *sd = dev_get_drvdata(dev);
sd                919 drivers/media/platform/exynos4-is/mipi-csis.c 	struct csis_state *state = sd_to_csis_state(sd);
sd                922 drivers/media/platform/exynos4-is/mipi-csis.c 	v4l2_dbg(1, debug, sd, "%s: flags: 0x%x\n",
sd                979 drivers/media/platform/exynos4-is/mipi-csis.c 	struct v4l2_subdev *sd = platform_get_drvdata(pdev);
sd                980 drivers/media/platform/exynos4-is/mipi-csis.c 	struct csis_state *state = sd_to_csis_state(sd);
sd                988 drivers/media/platform/exynos4-is/mipi-csis.c 	media_entity_cleanup(&state->sd.entity);
sd               2030 drivers/media/platform/omap3isp/isp.c 	struct v4l2_subdev *sd;
sd               2037 drivers/media/platform/omap3isp/isp.c 	list_for_each_entry(sd, &v4l2_dev->subdevs, list) {
sd               2038 drivers/media/platform/omap3isp/isp.c 		if (sd->notifier != &isp->notifier)
sd               2041 drivers/media/platform/omap3isp/isp.c 		ret = isp_link_entity(isp, &sd->entity,
sd               2042 drivers/media/platform/omap3isp/isp.c 				      v4l2_subdev_to_bus_cfg(sd)->interface);
sd                227 drivers/media/platform/omap3isp/isp.h #define v4l2_subdev_to_bus_cfg(sd) \
sd                228 drivers/media/platform/omap3isp/isp.h 	(&container_of((sd)->asd, struct isp_async_subdev, asd)->bus)
sd               1139 drivers/media/platform/omap3isp/ispccdc.c 		struct v4l2_subdev *sd =
sd               1142 drivers/media/platform/omap3isp/ispccdc.c 		parcfg = &v4l2_subdev_to_bus_cfg(sd)->bus.parallel;
sd               1830 drivers/media/platform/omap3isp/ispccdc.c static long ccdc_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
sd               1832 drivers/media/platform/omap3isp/ispccdc.c 	struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
sd               1849 drivers/media/platform/omap3isp/ispccdc.c static int ccdc_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
sd               1862 drivers/media/platform/omap3isp/ispccdc.c static int ccdc_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
sd               1880 drivers/media/platform/omap3isp/ispccdc.c static int ccdc_set_stream(struct v4l2_subdev *sd, int enable)
sd               1882 drivers/media/platform/omap3isp/ispccdc.c 	struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
sd               2113 drivers/media/platform/omap3isp/ispccdc.c static int ccdc_enum_mbus_code(struct v4l2_subdev *sd,
sd               2117 drivers/media/platform/omap3isp/ispccdc.c 	struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
sd               2179 drivers/media/platform/omap3isp/ispccdc.c static int ccdc_enum_frame_size(struct v4l2_subdev *sd,
sd               2183 drivers/media/platform/omap3isp/ispccdc.c 	struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
sd               2220 drivers/media/platform/omap3isp/ispccdc.c static int ccdc_get_selection(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd               2223 drivers/media/platform/omap3isp/ispccdc.c 	struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
sd               2262 drivers/media/platform/omap3isp/ispccdc.c static int ccdc_set_selection(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd               2265 drivers/media/platform/omap3isp/ispccdc.c 	struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
sd               2305 drivers/media/platform/omap3isp/ispccdc.c static int ccdc_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd               2308 drivers/media/platform/omap3isp/ispccdc.c 	struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
sd               2328 drivers/media/platform/omap3isp/ispccdc.c static int ccdc_set_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd               2331 drivers/media/platform/omap3isp/ispccdc.c 	struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
sd               2399 drivers/media/platform/omap3isp/ispccdc.c static int ccdc_link_validate(struct v4l2_subdev *sd,
sd               2404 drivers/media/platform/omap3isp/ispccdc.c 	struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
sd               2414 drivers/media/platform/omap3isp/ispccdc.c 		struct v4l2_subdev *sd =
sd               2416 drivers/media/platform/omap3isp/ispccdc.c 		struct isp_bus_cfg *bus_cfg = v4l2_subdev_to_bus_cfg(sd);
sd               2440 drivers/media/platform/omap3isp/ispccdc.c static int ccdc_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               2450 drivers/media/platform/omap3isp/ispccdc.c 	ccdc_set_format(sd, fh ? fh->pad : NULL, &format);
sd               2507 drivers/media/platform/omap3isp/ispccdc.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd               2508 drivers/media/platform/omap3isp/ispccdc.c 	struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
sd               2633 drivers/media/platform/omap3isp/ispccdc.c 	struct v4l2_subdev *sd = &ccdc->subdev;
sd               2635 drivers/media/platform/omap3isp/ispccdc.c 	struct media_entity *me = &sd->entity;
sd               2640 drivers/media/platform/omap3isp/ispccdc.c 	v4l2_subdev_init(sd, &ccdc_v4l2_ops);
sd               2641 drivers/media/platform/omap3isp/ispccdc.c 	sd->internal_ops = &ccdc_v4l2_internal_ops;
sd               2642 drivers/media/platform/omap3isp/ispccdc.c 	strscpy(sd->name, "OMAP3 ISP CCDC", sizeof(sd->name));
sd               2643 drivers/media/platform/omap3isp/ispccdc.c 	sd->grp_id = 1 << 16;	/* group ID for isp subdevs */
sd               2644 drivers/media/platform/omap3isp/ispccdc.c 	v4l2_set_subdevdata(sd, ccdc);
sd               2645 drivers/media/platform/omap3isp/ispccdc.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_EVENTS | V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               2657 drivers/media/platform/omap3isp/ispccdc.c 	ccdc_init_formats(sd, NULL);
sd                690 drivers/media/platform/omap3isp/ispccp2.c static int ccp2_enum_mbus_code(struct v4l2_subdev *sd,
sd                694 drivers/media/platform/omap3isp/ispccp2.c 	struct isp_ccp2_device *ccp2 = v4l2_get_subdevdata(sd);
sd                714 drivers/media/platform/omap3isp/ispccp2.c static int ccp2_enum_frame_size(struct v4l2_subdev *sd,
sd                718 drivers/media/platform/omap3isp/ispccp2.c 	struct isp_ccp2_device *ccp2 = v4l2_get_subdevdata(sd);
sd                751 drivers/media/platform/omap3isp/ispccp2.c static int ccp2_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd                754 drivers/media/platform/omap3isp/ispccp2.c 	struct isp_ccp2_device *ccp2 = v4l2_get_subdevdata(sd);
sd                772 drivers/media/platform/omap3isp/ispccp2.c static int ccp2_set_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd                775 drivers/media/platform/omap3isp/ispccp2.c 	struct isp_ccp2_device *ccp2 = v4l2_get_subdevdata(sd);
sd                805 drivers/media/platform/omap3isp/ispccp2.c static int ccp2_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                815 drivers/media/platform/omap3isp/ispccp2.c 	ccp2_set_format(sd, fh ? fh->pad : NULL, &format);
sd                826 drivers/media/platform/omap3isp/ispccp2.c static int ccp2_s_stream(struct v4l2_subdev *sd, int enable)
sd                828 drivers/media/platform/omap3isp/ispccp2.c 	struct isp_ccp2_device *ccp2 = v4l2_get_subdevdata(sd);
sd                842 drivers/media/platform/omap3isp/ispccp2.c 			ret = omap3isp_csiphy_acquire(ccp2->phy, &sd->entity);
sd                877 drivers/media/platform/omap3isp/ispccp2.c 		if (omap3isp_module_sync_idle(&sd->entity, &ccp2->wait,
sd                879 drivers/media/platform/omap3isp/ispccp2.c 			dev_dbg(dev, "%s: module stop timeout.\n", sd->name);
sd                958 drivers/media/platform/omap3isp/ispccp2.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd                959 drivers/media/platform/omap3isp/ispccp2.c 	struct isp_ccp2_device *ccp2 = v4l2_get_subdevdata(sd);
sd               1061 drivers/media/platform/omap3isp/ispccp2.c 	struct v4l2_subdev *sd = &ccp2->subdev;
sd               1063 drivers/media/platform/omap3isp/ispccp2.c 	struct media_entity *me = &sd->entity;
sd               1069 drivers/media/platform/omap3isp/ispccp2.c 	v4l2_subdev_init(sd, &ccp2_sd_ops);
sd               1070 drivers/media/platform/omap3isp/ispccp2.c 	sd->internal_ops = &ccp2_sd_internal_ops;
sd               1071 drivers/media/platform/omap3isp/ispccp2.c 	strscpy(sd->name, "OMAP3 ISP CCP2", sizeof(sd->name));
sd               1072 drivers/media/platform/omap3isp/ispccp2.c 	sd->grp_id = 1 << 16;   /* group ID for isp subdevs */
sd               1073 drivers/media/platform/omap3isp/ispccp2.c 	v4l2_set_subdevdata(sd, ccp2);
sd               1074 drivers/media/platform/omap3isp/ispccp2.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1085 drivers/media/platform/omap3isp/ispccp2.c 	ccp2_init_formats(sd, NULL);
sd                895 drivers/media/platform/omap3isp/ispcsi2.c static int csi2_enum_mbus_code(struct v4l2_subdev *sd,
sd                899 drivers/media/platform/omap3isp/ispcsi2.c 	struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd);
sd                932 drivers/media/platform/omap3isp/ispcsi2.c static int csi2_enum_frame_size(struct v4l2_subdev *sd,
sd                936 drivers/media/platform/omap3isp/ispcsi2.c 	struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd);
sd                969 drivers/media/platform/omap3isp/ispcsi2.c static int csi2_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd                972 drivers/media/platform/omap3isp/ispcsi2.c 	struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd);
sd                990 drivers/media/platform/omap3isp/ispcsi2.c static int csi2_set_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd                993 drivers/media/platform/omap3isp/ispcsi2.c 	struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd);
sd               1023 drivers/media/platform/omap3isp/ispcsi2.c static int csi2_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1033 drivers/media/platform/omap3isp/ispcsi2.c 	csi2_set_format(sd, fh ? fh->pad : NULL, &format);
sd               1045 drivers/media/platform/omap3isp/ispcsi2.c static int csi2_set_stream(struct v4l2_subdev *sd, int enable)
sd               1047 drivers/media/platform/omap3isp/ispcsi2.c 	struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd);
sd               1053 drivers/media/platform/omap3isp/ispcsi2.c 		if (omap3isp_csiphy_acquire(csi2->phy, &sd->entity) < 0)
sd               1079 drivers/media/platform/omap3isp/ispcsi2.c 		if (omap3isp_module_sync_idle(&sd->entity, &csi2->wait,
sd               1082 drivers/media/platform/omap3isp/ispcsi2.c 				sd->name);
sd               1136 drivers/media/platform/omap3isp/ispcsi2.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd               1137 drivers/media/platform/omap3isp/ispcsi2.c 	struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd);
sd               1228 drivers/media/platform/omap3isp/ispcsi2.c 	struct v4l2_subdev *sd = &csi2->subdev;
sd               1230 drivers/media/platform/omap3isp/ispcsi2.c 	struct media_entity *me = &sd->entity;
sd               1233 drivers/media/platform/omap3isp/ispcsi2.c 	v4l2_subdev_init(sd, &csi2_ops);
sd               1234 drivers/media/platform/omap3isp/ispcsi2.c 	sd->internal_ops = &csi2_internal_ops;
sd               1235 drivers/media/platform/omap3isp/ispcsi2.c 	strscpy(sd->name, "OMAP3 ISP CSI2a", sizeof(sd->name));
sd               1237 drivers/media/platform/omap3isp/ispcsi2.c 	sd->grp_id = 1 << 16;	/* group ID for isp subdevs */
sd               1238 drivers/media/platform/omap3isp/ispcsi2.c 	v4l2_set_subdevdata(sd, csi2);
sd               1239 drivers/media/platform/omap3isp/ispcsi2.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1250 drivers/media/platform/omap3isp/ispcsi2.c 	csi2_init_formats(sd, NULL);
sd                241 drivers/media/platform/omap3isp/isph3a_aewb.c static long h3a_aewb_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
sd                243 drivers/media/platform/omap3isp/isph3a_aewb.c 	struct ispstat *stat = v4l2_get_subdevdata(sd);
sd                305 drivers/media/platform/omap3isp/isph3a_af.c static long h3a_af_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
sd                307 drivers/media/platform/omap3isp/isph3a_af.c 	struct ispstat *stat = v4l2_get_subdevdata(sd);
sd                426 drivers/media/platform/omap3isp/isphist.c static long hist_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
sd                428 drivers/media/platform/omap3isp/isphist.c 	struct ispstat *stat = v4l2_get_subdevdata(sd);
sd               1609 drivers/media/platform/omap3isp/isppreview.c static long preview_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
sd               1611 drivers/media/platform/omap3isp/isppreview.c 	struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
sd               1628 drivers/media/platform/omap3isp/isppreview.c static int preview_set_stream(struct v4l2_subdev *sd, int enable)
sd               1630 drivers/media/platform/omap3isp/isppreview.c 	struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
sd               1667 drivers/media/platform/omap3isp/isppreview.c 		if (omap3isp_module_sync_idle(&sd->entity, &prev->wait,
sd               1669 drivers/media/platform/omap3isp/isppreview.c 			dev_dbg(dev, "%s: stop timeout.\n", sd->name);
sd               1864 drivers/media/platform/omap3isp/isppreview.c static int preview_enum_mbus_code(struct v4l2_subdev *sd,
sd               1888 drivers/media/platform/omap3isp/isppreview.c static int preview_enum_frame_size(struct v4l2_subdev *sd,
sd               1892 drivers/media/platform/omap3isp/isppreview.c 	struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
sd               1928 drivers/media/platform/omap3isp/isppreview.c static int preview_get_selection(struct v4l2_subdev *sd,
sd               1932 drivers/media/platform/omap3isp/isppreview.c 	struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
sd               1971 drivers/media/platform/omap3isp/isppreview.c static int preview_set_selection(struct v4l2_subdev *sd,
sd               1975 drivers/media/platform/omap3isp/isppreview.c 	struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
sd               2013 drivers/media/platform/omap3isp/isppreview.c static int preview_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd               2016 drivers/media/platform/omap3isp/isppreview.c 	struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
sd               2034 drivers/media/platform/omap3isp/isppreview.c static int preview_set_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd               2037 drivers/media/platform/omap3isp/isppreview.c 	struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
sd               2078 drivers/media/platform/omap3isp/isppreview.c static int preview_init_formats(struct v4l2_subdev *sd,
sd               2089 drivers/media/platform/omap3isp/isppreview.c 	preview_set_format(sd, fh ? fh->pad : NULL, &format);
sd               2142 drivers/media/platform/omap3isp/isppreview.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd               2143 drivers/media/platform/omap3isp/isppreview.c 	struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
sd               2259 drivers/media/platform/omap3isp/isppreview.c 	struct v4l2_subdev *sd = &prev->subdev;
sd               2261 drivers/media/platform/omap3isp/isppreview.c 	struct media_entity *me = &sd->entity;
sd               2266 drivers/media/platform/omap3isp/isppreview.c 	v4l2_subdev_init(sd, &preview_v4l2_ops);
sd               2267 drivers/media/platform/omap3isp/isppreview.c 	sd->internal_ops = &preview_v4l2_internal_ops;
sd               2268 drivers/media/platform/omap3isp/isppreview.c 	strscpy(sd->name, "OMAP3 ISP preview", sizeof(sd->name));
sd               2269 drivers/media/platform/omap3isp/isppreview.c 	sd->grp_id = 1 << 16;	/* group ID for isp subdevs */
sd               2270 drivers/media/platform/omap3isp/isppreview.c 	v4l2_set_subdevdata(sd, prev);
sd               2271 drivers/media/platform/omap3isp/isppreview.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               2281 drivers/media/platform/omap3isp/isppreview.c 	sd->ctrl_handler = &prev->ctrls;
sd               2292 drivers/media/platform/omap3isp/isppreview.c 	preview_init_formats(sd, NULL);
sd               1130 drivers/media/platform/omap3isp/ispresizer.c static int resizer_set_stream(struct v4l2_subdev *sd, int enable)
sd               1132 drivers/media/platform/omap3isp/ispresizer.c 	struct isp_res_device *res = v4l2_get_subdevdata(sd);
sd               1164 drivers/media/platform/omap3isp/ispresizer.c 		if (omap3isp_module_sync_idle(&sd->entity, &res->wait,
sd               1166 drivers/media/platform/omap3isp/ispresizer.c 			dev_dbg(dev, "%s: module stop timeout.\n", sd->name);
sd               1222 drivers/media/platform/omap3isp/ispresizer.c static int resizer_get_selection(struct v4l2_subdev *sd,
sd               1226 drivers/media/platform/omap3isp/ispresizer.c 	struct isp_res_device *res = v4l2_get_subdevdata(sd);
sd               1275 drivers/media/platform/omap3isp/ispresizer.c static int resizer_set_selection(struct v4l2_subdev *sd,
sd               1279 drivers/media/platform/omap3isp/ispresizer.c 	struct isp_res_device *res = v4l2_get_subdevdata(sd);
sd               1414 drivers/media/platform/omap3isp/ispresizer.c static int resizer_enum_mbus_code(struct v4l2_subdev *sd,
sd               1418 drivers/media/platform/omap3isp/ispresizer.c 	struct isp_res_device *res = v4l2_get_subdevdata(sd);
sd               1438 drivers/media/platform/omap3isp/ispresizer.c static int resizer_enum_frame_size(struct v4l2_subdev *sd,
sd               1442 drivers/media/platform/omap3isp/ispresizer.c 	struct isp_res_device *res = v4l2_get_subdevdata(sd);
sd               1475 drivers/media/platform/omap3isp/ispresizer.c static int resizer_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd               1478 drivers/media/platform/omap3isp/ispresizer.c 	struct isp_res_device *res = v4l2_get_subdevdata(sd);
sd               1496 drivers/media/platform/omap3isp/ispresizer.c static int resizer_set_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
sd               1499 drivers/media/platform/omap3isp/ispresizer.c 	struct isp_res_device *res = v4l2_get_subdevdata(sd);
sd               1539 drivers/media/platform/omap3isp/ispresizer.c static int resizer_link_validate(struct v4l2_subdev *sd,
sd               1544 drivers/media/platform/omap3isp/ispresizer.c 	struct isp_res_device *res = v4l2_get_subdevdata(sd);
sd               1545 drivers/media/platform/omap3isp/ispresizer.c 	struct isp_pipeline *pipe = to_isp_pipeline(&sd->entity);
sd               1549 drivers/media/platform/omap3isp/ispresizer.c 	return v4l2_subdev_link_validate_default(sd, link,
sd               1562 drivers/media/platform/omap3isp/ispresizer.c static int resizer_init_formats(struct v4l2_subdev *sd,
sd               1573 drivers/media/platform/omap3isp/ispresizer.c 	resizer_set_format(sd, fh ? fh->pad : NULL, &format);
sd               1621 drivers/media/platform/omap3isp/ispresizer.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd               1622 drivers/media/platform/omap3isp/ispresizer.c 	struct isp_res_device *res = v4l2_get_subdevdata(sd);
sd               1715 drivers/media/platform/omap3isp/ispresizer.c 	struct v4l2_subdev *sd = &res->subdev;
sd               1717 drivers/media/platform/omap3isp/ispresizer.c 	struct media_entity *me = &sd->entity;
sd               1722 drivers/media/platform/omap3isp/ispresizer.c 	v4l2_subdev_init(sd, &resizer_v4l2_ops);
sd               1723 drivers/media/platform/omap3isp/ispresizer.c 	sd->internal_ops = &resizer_v4l2_internal_ops;
sd               1724 drivers/media/platform/omap3isp/ispresizer.c 	strscpy(sd->name, "OMAP3 ISP resizer", sizeof(sd->name));
sd               1725 drivers/media/platform/omap3isp/ispresizer.c 	sd->grp_id = 1 << 16;	/* group ID for isp subdevs */
sd               1726 drivers/media/platform/omap3isp/ispresizer.c 	v4l2_set_subdevdata(sd, res);
sd               1727 drivers/media/platform/omap3isp/ispresizer.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1738 drivers/media/platform/omap3isp/ispresizer.c 	resizer_init_formats(sd, NULL);
sd                555 drivers/media/platform/qcom/camss/camss-csid.c static int csid_set_power(struct v4l2_subdev *sd, int on)
sd                557 drivers/media/platform/qcom/camss/camss-csid.c 	struct csid_device *csid = v4l2_get_subdevdata(sd);
sd                620 drivers/media/platform/qcom/camss/camss-csid.c static int csid_set_stream(struct v4l2_subdev *sd, int enable)
sd                622 drivers/media/platform/qcom/camss/camss-csid.c 	struct csid_device *csid = v4l2_get_subdevdata(sd);
sd                848 drivers/media/platform/qcom/camss/camss-csid.c static int csid_enum_mbus_code(struct v4l2_subdev *sd,
sd                852 drivers/media/platform/qcom/camss/camss-csid.c 	struct csid_device *csid = v4l2_get_subdevdata(sd);
sd                889 drivers/media/platform/qcom/camss/camss-csid.c static int csid_enum_frame_size(struct v4l2_subdev *sd,
sd                893 drivers/media/platform/qcom/camss/camss-csid.c 	struct csid_device *csid = v4l2_get_subdevdata(sd);
sd                927 drivers/media/platform/qcom/camss/camss-csid.c static int csid_get_format(struct v4l2_subdev *sd,
sd                931 drivers/media/platform/qcom/camss/camss-csid.c 	struct csid_device *csid = v4l2_get_subdevdata(sd);
sd                951 drivers/media/platform/qcom/camss/camss-csid.c static int csid_set_format(struct v4l2_subdev *sd,
sd                955 drivers/media/platform/qcom/camss/camss-csid.c 	struct csid_device *csid = v4l2_get_subdevdata(sd);
sd                987 drivers/media/platform/qcom/camss/camss-csid.c static int csid_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1000 drivers/media/platform/qcom/camss/camss-csid.c 	return csid_set_format(sd, fh ? fh->pad : NULL, &format);
sd               1197 drivers/media/platform/qcom/camss/camss-csid.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd               1198 drivers/media/platform/qcom/camss/camss-csid.c 	struct csid_device *csid = v4l2_get_subdevdata(sd);
sd               1239 drivers/media/platform/qcom/camss/camss-csid.c 		struct v4l2_subdev *sd;
sd               1245 drivers/media/platform/qcom/camss/camss-csid.c 		sd = media_entity_to_v4l2_subdev(entity);
sd               1246 drivers/media/platform/qcom/camss/camss-csid.c 		csid = v4l2_get_subdevdata(sd);
sd               1253 drivers/media/platform/qcom/camss/camss-csid.c 		sd = media_entity_to_v4l2_subdev(remote->entity);
sd               1254 drivers/media/platform/qcom/camss/camss-csid.c 		csiphy = v4l2_get_subdevdata(sd);
sd               1318 drivers/media/platform/qcom/camss/camss-csid.c 	struct v4l2_subdev *sd = &csid->subdev;
sd               1323 drivers/media/platform/qcom/camss/camss-csid.c 	v4l2_subdev_init(sd, &csid_v4l2_ops);
sd               1324 drivers/media/platform/qcom/camss/camss-csid.c 	sd->internal_ops = &csid_v4l2_internal_ops;
sd               1325 drivers/media/platform/qcom/camss/camss-csid.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
sd               1327 drivers/media/platform/qcom/camss/camss-csid.c 	snprintf(sd->name, ARRAY_SIZE(sd->name), "%s%d",
sd               1329 drivers/media/platform/qcom/camss/camss-csid.c 	v4l2_set_subdevdata(sd, csid);
sd               1350 drivers/media/platform/qcom/camss/camss-csid.c 	ret = csid_init_formats(sd, NULL);
sd               1359 drivers/media/platform/qcom/camss/camss-csid.c 	sd->entity.function = MEDIA_ENT_F_IO_V4L;
sd               1360 drivers/media/platform/qcom/camss/camss-csid.c 	sd->entity.ops = &csid_media_ops;
sd               1361 drivers/media/platform/qcom/camss/camss-csid.c 	ret = media_entity_pads_init(&sd->entity, MSM_CSID_PADS_NUM, pads);
sd               1367 drivers/media/platform/qcom/camss/camss-csid.c 	ret = v4l2_device_register_subdev(v4l2_dev, sd);
sd               1376 drivers/media/platform/qcom/camss/camss-csid.c 	media_entity_cleanup(&sd->entity);
sd                170 drivers/media/platform/qcom/camss/camss-csiphy.c static int csiphy_set_power(struct v4l2_subdev *sd, int on)
sd                172 drivers/media/platform/qcom/camss/camss-csiphy.c 	struct csiphy_device *csiphy = v4l2_get_subdevdata(sd);
sd                295 drivers/media/platform/qcom/camss/camss-csiphy.c static int csiphy_set_stream(struct v4l2_subdev *sd, int enable)
sd                297 drivers/media/platform/qcom/camss/camss-csiphy.c 	struct csiphy_device *csiphy = v4l2_get_subdevdata(sd);
sd                382 drivers/media/platform/qcom/camss/camss-csiphy.c static int csiphy_enum_mbus_code(struct v4l2_subdev *sd,
sd                386 drivers/media/platform/qcom/camss/camss-csiphy.c 	struct csiphy_device *csiphy = v4l2_get_subdevdata(sd);
sd                414 drivers/media/platform/qcom/camss/camss-csiphy.c static int csiphy_enum_frame_size(struct v4l2_subdev *sd,
sd                418 drivers/media/platform/qcom/camss/camss-csiphy.c 	struct csiphy_device *csiphy = v4l2_get_subdevdata(sd);
sd                452 drivers/media/platform/qcom/camss/camss-csiphy.c static int csiphy_get_format(struct v4l2_subdev *sd,
sd                456 drivers/media/platform/qcom/camss/camss-csiphy.c 	struct csiphy_device *csiphy = v4l2_get_subdevdata(sd);
sd                476 drivers/media/platform/qcom/camss/camss-csiphy.c static int csiphy_set_format(struct v4l2_subdev *sd,
sd                480 drivers/media/platform/qcom/camss/camss-csiphy.c 	struct csiphy_device *csiphy = v4l2_get_subdevdata(sd);
sd                512 drivers/media/platform/qcom/camss/camss-csiphy.c static int csiphy_init_formats(struct v4l2_subdev *sd,
sd                526 drivers/media/platform/qcom/camss/camss-csiphy.c 	return csiphy_set_format(sd, fh ? fh->pad : NULL, &format);
sd                660 drivers/media/platform/qcom/camss/camss-csiphy.c 		struct v4l2_subdev *sd;
sd                667 drivers/media/platform/qcom/camss/camss-csiphy.c 		sd = media_entity_to_v4l2_subdev(entity);
sd                668 drivers/media/platform/qcom/camss/camss-csiphy.c 		csiphy = v4l2_get_subdevdata(sd);
sd                670 drivers/media/platform/qcom/camss/camss-csiphy.c 		sd = media_entity_to_v4l2_subdev(remote->entity);
sd                671 drivers/media/platform/qcom/camss/camss-csiphy.c 		csid = v4l2_get_subdevdata(sd);
sd                719 drivers/media/platform/qcom/camss/camss-csiphy.c 	struct v4l2_subdev *sd = &csiphy->subdev;
sd                724 drivers/media/platform/qcom/camss/camss-csiphy.c 	v4l2_subdev_init(sd, &csiphy_v4l2_ops);
sd                725 drivers/media/platform/qcom/camss/camss-csiphy.c 	sd->internal_ops = &csiphy_v4l2_internal_ops;
sd                726 drivers/media/platform/qcom/camss/camss-csiphy.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                727 drivers/media/platform/qcom/camss/camss-csiphy.c 	snprintf(sd->name, ARRAY_SIZE(sd->name), "%s%d",
sd                729 drivers/media/platform/qcom/camss/camss-csiphy.c 	v4l2_set_subdevdata(sd, csiphy);
sd                731 drivers/media/platform/qcom/camss/camss-csiphy.c 	ret = csiphy_init_formats(sd, NULL);
sd                740 drivers/media/platform/qcom/camss/camss-csiphy.c 	sd->entity.function = MEDIA_ENT_F_IO_V4L;
sd                741 drivers/media/platform/qcom/camss/camss-csiphy.c 	sd->entity.ops = &csiphy_media_ops;
sd                742 drivers/media/platform/qcom/camss/camss-csiphy.c 	ret = media_entity_pads_init(&sd->entity, MSM_CSIPHY_PADS_NUM, pads);
sd                748 drivers/media/platform/qcom/camss/camss-csiphy.c 	ret = v4l2_device_register_subdev(v4l2_dev, sd);
sd                751 drivers/media/platform/qcom/camss/camss-csiphy.c 		media_entity_cleanup(&sd->entity);
sd                330 drivers/media/platform/qcom/camss/camss-ispif.c static int ispif_set_power(struct v4l2_subdev *sd, int on)
sd                332 drivers/media/platform/qcom/camss/camss-ispif.c 	struct ispif_line *line = v4l2_get_subdevdata(sd);
sd                773 drivers/media/platform/qcom/camss/camss-ispif.c static int ispif_set_stream(struct v4l2_subdev *sd, int enable)
sd                775 drivers/media/platform/qcom/camss/camss-ispif.c 	struct ispif_line *line = v4l2_get_subdevdata(sd);
sd                910 drivers/media/platform/qcom/camss/camss-ispif.c static int ispif_enum_mbus_code(struct v4l2_subdev *sd,
sd                914 drivers/media/platform/qcom/camss/camss-ispif.c 	struct ispif_line *line = v4l2_get_subdevdata(sd);
sd                942 drivers/media/platform/qcom/camss/camss-ispif.c static int ispif_enum_frame_size(struct v4l2_subdev *sd,
sd                946 drivers/media/platform/qcom/camss/camss-ispif.c 	struct ispif_line *line = v4l2_get_subdevdata(sd);
sd                980 drivers/media/platform/qcom/camss/camss-ispif.c static int ispif_get_format(struct v4l2_subdev *sd,
sd                984 drivers/media/platform/qcom/camss/camss-ispif.c 	struct ispif_line *line = v4l2_get_subdevdata(sd);
sd               1004 drivers/media/platform/qcom/camss/camss-ispif.c static int ispif_set_format(struct v4l2_subdev *sd,
sd               1008 drivers/media/platform/qcom/camss/camss-ispif.c 	struct ispif_line *line = v4l2_get_subdevdata(sd);
sd               1040 drivers/media/platform/qcom/camss/camss-ispif.c static int ispif_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1053 drivers/media/platform/qcom/camss/camss-ispif.c 	return ispif_set_format(sd, fh ? fh->pad : NULL, &format);
sd               1238 drivers/media/platform/qcom/camss/camss-ispif.c 			struct v4l2_subdev *sd;
sd               1241 drivers/media/platform/qcom/camss/camss-ispif.c 			sd = media_entity_to_v4l2_subdev(entity);
sd               1242 drivers/media/platform/qcom/camss/camss-ispif.c 			line = v4l2_get_subdevdata(sd);
sd               1246 drivers/media/platform/qcom/camss/camss-ispif.c 			struct v4l2_subdev *sd;
sd               1250 drivers/media/platform/qcom/camss/camss-ispif.c 			sd = media_entity_to_v4l2_subdev(entity);
sd               1251 drivers/media/platform/qcom/camss/camss-ispif.c 			line = v4l2_get_subdevdata(sd);
sd               1307 drivers/media/platform/qcom/camss/camss-ispif.c 		struct v4l2_subdev *sd = &ispif->line[i].subdev;
sd               1310 drivers/media/platform/qcom/camss/camss-ispif.c 		v4l2_subdev_init(sd, &ispif_v4l2_ops);
sd               1311 drivers/media/platform/qcom/camss/camss-ispif.c 		sd->internal_ops = &ispif_v4l2_internal_ops;
sd               1312 drivers/media/platform/qcom/camss/camss-ispif.c 		sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1313 drivers/media/platform/qcom/camss/camss-ispif.c 		snprintf(sd->name, ARRAY_SIZE(sd->name), "%s%d",
sd               1315 drivers/media/platform/qcom/camss/camss-ispif.c 		v4l2_set_subdevdata(sd, &ispif->line[i]);
sd               1317 drivers/media/platform/qcom/camss/camss-ispif.c 		ret = ispif_init_formats(sd, NULL);
sd               1326 drivers/media/platform/qcom/camss/camss-ispif.c 		sd->entity.function = MEDIA_ENT_F_IO_V4L;
sd               1327 drivers/media/platform/qcom/camss/camss-ispif.c 		sd->entity.ops = &ispif_media_ops;
sd               1328 drivers/media/platform/qcom/camss/camss-ispif.c 		ret = media_entity_pads_init(&sd->entity, MSM_ISPIF_PADS_NUM,
sd               1335 drivers/media/platform/qcom/camss/camss-ispif.c 		ret = v4l2_device_register_subdev(v4l2_dev, sd);
sd               1338 drivers/media/platform/qcom/camss/camss-ispif.c 			media_entity_cleanup(&sd->entity);
sd               1347 drivers/media/platform/qcom/camss/camss-ispif.c 		struct v4l2_subdev *sd = &ispif->line[i].subdev;
sd               1349 drivers/media/platform/qcom/camss/camss-ispif.c 		v4l2_device_unregister_subdev(sd);
sd               1350 drivers/media/platform/qcom/camss/camss-ispif.c 		media_entity_cleanup(&sd->entity);
sd               1368 drivers/media/platform/qcom/camss/camss-ispif.c 		struct v4l2_subdev *sd = &ispif->line[i].subdev;
sd               1370 drivers/media/platform/qcom/camss/camss-ispif.c 		v4l2_device_unregister_subdev(sd);
sd               1371 drivers/media/platform/qcom/camss/camss-ispif.c 		media_entity_cleanup(&sd->entity);
sd               1411 drivers/media/platform/qcom/camss/camss-vfe.c static int vfe_set_power(struct v4l2_subdev *sd, int on)
sd               1413 drivers/media/platform/qcom/camss/camss-vfe.c 	struct vfe_line *line = v4l2_get_subdevdata(sd);
sd               1439 drivers/media/platform/qcom/camss/camss-vfe.c static int vfe_set_stream(struct v4l2_subdev *sd, int enable)
sd               1441 drivers/media/platform/qcom/camss/camss-vfe.c 	struct vfe_line *line = v4l2_get_subdevdata(sd);
sd               1671 drivers/media/platform/qcom/camss/camss-vfe.c static int vfe_enum_mbus_code(struct v4l2_subdev *sd,
sd               1675 drivers/media/platform/qcom/camss/camss-vfe.c 	struct vfe_line *line = v4l2_get_subdevdata(sd);
sd               1705 drivers/media/platform/qcom/camss/camss-vfe.c static int vfe_enum_frame_size(struct v4l2_subdev *sd,
sd               1709 drivers/media/platform/qcom/camss/camss-vfe.c 	struct vfe_line *line = v4l2_get_subdevdata(sd);
sd               1743 drivers/media/platform/qcom/camss/camss-vfe.c static int vfe_get_format(struct v4l2_subdev *sd,
sd               1747 drivers/media/platform/qcom/camss/camss-vfe.c 	struct vfe_line *line = v4l2_get_subdevdata(sd);
sd               1759 drivers/media/platform/qcom/camss/camss-vfe.c static int vfe_set_selection(struct v4l2_subdev *sd,
sd               1771 drivers/media/platform/qcom/camss/camss-vfe.c static int vfe_set_format(struct v4l2_subdev *sd,
sd               1775 drivers/media/platform/qcom/camss/camss-vfe.c 	struct vfe_line *line = v4l2_get_subdevdata(sd);
sd               1806 drivers/media/platform/qcom/camss/camss-vfe.c 		ret = vfe_set_selection(sd, cfg, &sel);
sd               1822 drivers/media/platform/qcom/camss/camss-vfe.c static int vfe_get_selection(struct v4l2_subdev *sd,
sd               1826 drivers/media/platform/qcom/camss/camss-vfe.c 	struct vfe_line *line = v4l2_get_subdevdata(sd);
sd               1839 drivers/media/platform/qcom/camss/camss-vfe.c 			ret = vfe_get_format(sd, cfg, &fmt);
sd               1892 drivers/media/platform/qcom/camss/camss-vfe.c static int vfe_set_selection(struct v4l2_subdev *sd,
sd               1896 drivers/media/platform/qcom/camss/camss-vfe.c 	struct vfe_line *line = v4l2_get_subdevdata(sd);
sd               1919 drivers/media/platform/qcom/camss/camss-vfe.c 		ret = vfe_set_selection(sd, cfg, &crop);
sd               1934 drivers/media/platform/qcom/camss/camss-vfe.c 		ret = vfe_get_format(sd, cfg, &fmt);
sd               1940 drivers/media/platform/qcom/camss/camss-vfe.c 		ret = vfe_set_format(sd, cfg, &fmt);
sd               1957 drivers/media/platform/qcom/camss/camss-vfe.c static int vfe_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1970 drivers/media/platform/qcom/camss/camss-vfe.c 	return vfe_set_format(sd, fh ? fh->pad : NULL, &format);
sd               2126 drivers/media/platform/qcom/camss/camss-vfe.c 	struct v4l2_subdev *sd;
sd               2130 drivers/media/platform/qcom/camss/camss-vfe.c 	sd = media_entity_to_v4l2_subdev(entity);
sd               2131 drivers/media/platform/qcom/camss/camss-vfe.c 	line = v4l2_get_subdevdata(sd);
sd               2144 drivers/media/platform/qcom/camss/camss-vfe.c 	struct v4l2_subdev *sd;
sd               2147 drivers/media/platform/qcom/camss/camss-vfe.c 	sd = media_entity_to_v4l2_subdev(entity);
sd               2148 drivers/media/platform/qcom/camss/camss-vfe.c 	line = v4l2_get_subdevdata(sd);
sd               2234 drivers/media/platform/qcom/camss/camss-vfe.c 	struct v4l2_subdev *sd;
sd               2243 drivers/media/platform/qcom/camss/camss-vfe.c 		sd = &vfe->line[i].subdev;
sd               2247 drivers/media/platform/qcom/camss/camss-vfe.c 		v4l2_subdev_init(sd, &vfe_v4l2_ops);
sd               2248 drivers/media/platform/qcom/camss/camss-vfe.c 		sd->internal_ops = &vfe_v4l2_internal_ops;
sd               2249 drivers/media/platform/qcom/camss/camss-vfe.c 		sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               2251 drivers/media/platform/qcom/camss/camss-vfe.c 			snprintf(sd->name, ARRAY_SIZE(sd->name), "%s%d_%s",
sd               2254 drivers/media/platform/qcom/camss/camss-vfe.c 			snprintf(sd->name, ARRAY_SIZE(sd->name), "%s%d_%s%d",
sd               2257 drivers/media/platform/qcom/camss/camss-vfe.c 		v4l2_set_subdevdata(sd, &vfe->line[i]);
sd               2259 drivers/media/platform/qcom/camss/camss-vfe.c 		ret = vfe_init_formats(sd, NULL);
sd               2268 drivers/media/platform/qcom/camss/camss-vfe.c 		sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
sd               2269 drivers/media/platform/qcom/camss/camss-vfe.c 		sd->entity.ops = &vfe_media_ops;
sd               2270 drivers/media/platform/qcom/camss/camss-vfe.c 		ret = media_entity_pads_init(&sd->entity, MSM_VFE_PADS_NUM,
sd               2277 drivers/media/platform/qcom/camss/camss-vfe.c 		ret = v4l2_device_register_subdev(v4l2_dev, sd);
sd               2301 drivers/media/platform/qcom/camss/camss-vfe.c 				&sd->entity, MSM_VFE_PAD_SRC,
sd               2306 drivers/media/platform/qcom/camss/camss-vfe.c 				sd->entity.name, video_out->vdev.entity.name,
sd               2318 drivers/media/platform/qcom/camss/camss-vfe.c 	v4l2_device_unregister_subdev(sd);
sd               2321 drivers/media/platform/qcom/camss/camss-vfe.c 	media_entity_cleanup(&sd->entity);
sd               2325 drivers/media/platform/qcom/camss/camss-vfe.c 		sd = &vfe->line[i].subdev;
sd               2329 drivers/media/platform/qcom/camss/camss-vfe.c 		v4l2_device_unregister_subdev(sd);
sd               2330 drivers/media/platform/qcom/camss/camss-vfe.c 		media_entity_cleanup(&sd->entity);
sd               2348 drivers/media/platform/qcom/camss/camss-vfe.c 		struct v4l2_subdev *sd = &vfe->line[i].subdev;
sd               2352 drivers/media/platform/qcom/camss/camss-vfe.c 		v4l2_device_unregister_subdev(sd);
sd               2353 drivers/media/platform/qcom/camss/camss-vfe.c 		media_entity_cleanup(&sd->entity);
sd                757 drivers/media/platform/qcom/camss/camss.c 	struct v4l2_subdev *sd;
sd                760 drivers/media/platform/qcom/camss/camss.c 	list_for_each_entry(sd, &v4l2_dev->subdevs, list) {
sd                761 drivers/media/platform/qcom/camss/camss.c 		if (sd->host_priv) {
sd                762 drivers/media/platform/qcom/camss/camss.c 			struct media_entity *sensor = &sd->entity;
sd                764 drivers/media/platform/qcom/camss/camss.c 					(struct csiphy_device *) sd->host_priv;
sd                 55 drivers/media/platform/rcar-vin/rcar-core.c 	struct v4l2_subdev *sd;
sd                 58 drivers/media/platform/rcar-vin/rcar-core.c 	sd = media_entity_to_v4l2_subdev(entity);
sd                 61 drivers/media/platform/rcar-vin/rcar-core.c 		if (group->csi[i].subdev == sd)
sd                176 drivers/media/platform/rcar-vin/rcar-core.c 		struct v4l2_subdev *sd;
sd                186 drivers/media/platform/rcar-vin/rcar-core.c 		sd = media_entity_to_v4l2_subdev(link->source->entity);
sd                189 drivers/media/platform/rcar-vin/rcar-core.c 			    group->vin[i]->parallel->subdev == sd) {
sd                418 drivers/media/platform/rcar-vin/rcar-core.c static int rvin_find_pad(struct v4l2_subdev *sd, int direction)
sd                422 drivers/media/platform/rcar-vin/rcar-core.c 	if (sd->entity.num_pads <= 1)
sd                425 drivers/media/platform/rcar-vin/rcar-core.c 	for (pad = 0; pad < sd->entity.num_pads; pad++)
sd                426 drivers/media/platform/rcar-vin/rcar-core.c 		if (sd->entity.pads[pad].flags & direction)
sd                376 drivers/media/platform/rcar-vin/rcar-csi2.c static inline struct rcar_csi2 *sd_to_csi2(struct v4l2_subdev *sd)
sd                378 drivers/media/platform/rcar-vin/rcar-csi2.c 	return container_of(sd, struct rcar_csi2, subdev);
sd                620 drivers/media/platform/rcar-vin/rcar-csi2.c static int rcsi2_s_stream(struct v4l2_subdev *sd, int enable)
sd                622 drivers/media/platform/rcar-vin/rcar-csi2.c 	struct rcar_csi2 *priv = sd_to_csi2(sd);
sd                647 drivers/media/platform/rcar-vin/rcar-csi2.c static int rcsi2_set_pad_format(struct v4l2_subdev *sd,
sd                651 drivers/media/platform/rcar-vin/rcar-csi2.c 	struct rcar_csi2 *priv = sd_to_csi2(sd);
sd                660 drivers/media/platform/rcar-vin/rcar-csi2.c 		framefmt = v4l2_subdev_get_try_format(sd, cfg, 0);
sd                667 drivers/media/platform/rcar-vin/rcar-csi2.c static int rcsi2_get_pad_format(struct v4l2_subdev *sd,
sd                671 drivers/media/platform/rcar-vin/rcar-csi2.c 	struct rcar_csi2 *priv = sd_to_csi2(sd);
sd                676 drivers/media/platform/rcar-vin/rcar-csi2.c 		format->format = *v4l2_subdev_get_try_format(sd, cfg, 0);
sd               1039 drivers/media/platform/rcar-vin/rcar-dma.c static int rvin_mc_validate_format(struct rvin_dev *vin, struct v4l2_subdev *sd,
sd               1047 drivers/media/platform/rcar-vin/rcar-dma.c 	if (v4l2_subdev_call(sd, pad, get_fmt, NULL, &fmt))
sd               1107 drivers/media/platform/rcar-vin/rcar-dma.c 	struct v4l2_subdev *sd;
sd               1123 drivers/media/platform/rcar-vin/rcar-dma.c 	sd = media_entity_to_v4l2_subdev(pad->entity);
sd               1127 drivers/media/platform/rcar-vin/rcar-dma.c 		return v4l2_subdev_call(sd, video, s_stream, 0);
sd               1130 drivers/media/platform/rcar-vin/rcar-dma.c 	ret = rvin_mc_validate_format(vin, sd, pad);
sd               1142 drivers/media/platform/rcar-vin/rcar-dma.c 	pipe = sd->entity.pipe ? sd->entity.pipe : &vin->vdev.pipe;
sd               1148 drivers/media/platform/rcar-vin/rcar-dma.c 	ret = v4l2_subdev_call(sd, video, s_stream, 1);
sd                184 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
sd                194 drivers/media/platform/rcar-vin/rcar-v4l2.c 	pad_cfg = v4l2_subdev_alloc_pad_config(sd);
sd                208 drivers/media/platform/rcar-vin/rcar-v4l2.c 	ret = v4l2_subdev_call(sd, pad, set_fmt, pad_cfg, &format);
sd                424 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
sd                429 drivers/media/platform/rcar-vin/rcar-v4l2.c 	return v4l2_subdev_call(sd, video, g_pixelaspect, f);
sd                436 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
sd                442 drivers/media/platform/rcar-vin/rcar-v4l2.c 	ret = v4l2_subdev_call(sd, video, g_input_status, &i->status);
sd                448 drivers/media/platform/rcar-vin/rcar-v4l2.c 	if (v4l2_subdev_has_op(sd, pad, dv_timings_cap)) {
sd                477 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
sd                479 drivers/media/platform/rcar-vin/rcar-v4l2.c 	return v4l2_subdev_call(sd, video, querystd, a);
sd                523 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
sd                531 drivers/media/platform/rcar-vin/rcar-v4l2.c 	ret = v4l2_subdev_call(sd, pad, enum_dv_timings, timings);
sd                542 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
sd                545 drivers/media/platform/rcar-vin/rcar-v4l2.c 	ret = v4l2_subdev_call(sd, video, s_dv_timings, timings);
sd                557 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
sd                559 drivers/media/platform/rcar-vin/rcar-v4l2.c 	return v4l2_subdev_call(sd, video, g_dv_timings, timings);
sd                566 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
sd                568 drivers/media/platform/rcar-vin/rcar-v4l2.c 	return v4l2_subdev_call(sd, video, query_dv_timings, timings);
sd                575 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
sd                583 drivers/media/platform/rcar-vin/rcar-v4l2.c 	ret = v4l2_subdev_call(sd, pad, dv_timings_cap, cap);
sd                593 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
sd                601 drivers/media/platform/rcar-vin/rcar-v4l2.c 	ret = v4l2_subdev_call(sd, pad, get_edid, edid);
sd                611 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
sd                619 drivers/media/platform/rcar-vin/rcar-v4l2.c 	ret = v4l2_subdev_call(sd, pad, set_edid, edid);
sd                767 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
sd                771 drivers/media/platform/rcar-vin/rcar-v4l2.c 	ret = v4l2_subdev_call(sd, core, s_power, power);
sd                877 drivers/media/platform/rcar-vin/rcar-v4l2.c static void rvin_notify(struct v4l2_subdev *sd,
sd                881 drivers/media/platform/rcar-vin/rcar-v4l2.c 		container_of(sd->v4l2_dev, struct rvin_dev, v4l2_dev);
sd                179 drivers/media/platform/renesas-ceu.c 	struct ceu_subdev	*sd;
sd                353 drivers/media/platform/renesas-ceu.c 	struct ceu_subdev *ceu_sd = ceudev->sd;
sd                682 drivers/media/platform/renesas-ceu.c 	struct v4l2_subdev *v4l2_sd = ceudev->sd->v4l2_sd;
sd                742 drivers/media/platform/renesas-ceu.c 	struct v4l2_subdev *v4l2_sd = ceudev->sd->v4l2_sd;
sd                793 drivers/media/platform/renesas-ceu.c 	struct ceu_subdev *ceu_sd = ceudev->sd;
sd                893 drivers/media/platform/renesas-ceu.c 	struct ceu_subdev *ceu_sd = ceudev->sd;
sd                976 drivers/media/platform/renesas-ceu.c 	struct ceu_subdev *ceu_sd = ceudev->sd;
sd               1063 drivers/media/platform/renesas-ceu.c 	struct v4l2_subdev *v4l2_sd = ceudev->sd->v4l2_sd;
sd               1079 drivers/media/platform/renesas-ceu.c 	struct v4l2_subdev *v4l2_sd = ceudev->sd->v4l2_sd;
sd               1232 drivers/media/platform/renesas-ceu.c 	ceu_sd_old = ceudev->sd;
sd               1233 drivers/media/platform/renesas-ceu.c 	ceudev->sd = &ceudev->subdevs[i];
sd               1241 drivers/media/platform/renesas-ceu.c 		ceudev->sd = ceu_sd_old;
sd               1247 drivers/media/platform/renesas-ceu.c 		ceudev->sd = ceu_sd_old;
sd               1253 drivers/media/platform/renesas-ceu.c 	v4l2_subdev_call(ceudev->sd->v4l2_sd, core, s_power, 1);
sd               1264 drivers/media/platform/renesas-ceu.c 	return v4l2_g_parm_cap(video_devdata(file), ceudev->sd->v4l2_sd, a);
sd               1271 drivers/media/platform/renesas-ceu.c 	return v4l2_s_parm_cap(video_devdata(file), ceudev->sd->v4l2_sd, a);
sd               1278 drivers/media/platform/renesas-ceu.c 	struct ceu_subdev *ceu_sd = ceudev->sd;
sd               1310 drivers/media/platform/renesas-ceu.c 	struct ceu_subdev *ceu_sd = ceudev->sd;
sd               1425 drivers/media/platform/renesas-ceu.c 	if (!ceudev->sd) {
sd               1426 drivers/media/platform/renesas-ceu.c 		ceudev->sd = &ceudev->subdevs[0];
sd               1430 drivers/media/platform/renesas-ceu.c 	v4l2_sd = ceudev->sd->v4l2_sd;
sd               1483 drivers/media/platform/renesas-ceu.c 	ceudev->sd = NULL;
sd                 69 drivers/media/platform/s3c-camif/camif-capture.c 	if (camif->sensor.sd == NULL || vp->out_fmt == NULL)
sd                116 drivers/media/platform/s3c-camif/camif-capture.c 		err = v4l2_subdev_call(sensor->sd, core, s_power, on);
sd                134 drivers/media/platform/s3c-camif/camif-capture.c 		err = v4l2_subdev_call(sensor->sd, video, s_stream, on);
sd                651 drivers/media/platform/s3c-camif/camif-capture.c 	struct v4l2_subdev *sensor = vp->camif->sensor.sd;
sd                820 drivers/media/platform/s3c-camif/camif-capture.c 	ret = v4l2_subdev_call(camif->sensor.sd, pad, get_fmt, NULL, &src_fmt);
sd                837 drivers/media/platform/s3c-camif/camif-capture.c 	struct media_entity *sensor = &camif->sensor.sd->entity;
sd                881 drivers/media/platform/s3c-camif/camif-capture.c 		media_pipeline_stop(&camif->sensor.sd->entity);
sd               1201 drivers/media/platform/s3c-camif/camif-capture.c static int s3c_camif_subdev_enum_mbus_code(struct v4l2_subdev *sd,
sd               1212 drivers/media/platform/s3c-camif/camif-capture.c static int s3c_camif_subdev_get_fmt(struct v4l2_subdev *sd,
sd               1216 drivers/media/platform/s3c-camif/camif-capture.c 	struct camif_dev *camif = v4l2_get_subdevdata(sd);
sd               1220 drivers/media/platform/s3c-camif/camif-capture.c 		mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1280 drivers/media/platform/s3c-camif/camif-capture.c static int s3c_camif_subdev_set_fmt(struct v4l2_subdev *sd,
sd               1284 drivers/media/platform/s3c-camif/camif-capture.c 	struct camif_dev *camif = v4l2_get_subdevdata(sd);
sd               1289 drivers/media/platform/s3c-camif/camif-capture.c 	v4l2_dbg(1, debug, sd, "pad%d: code: 0x%x, %ux%u\n",
sd               1309 drivers/media/platform/s3c-camif/camif-capture.c 		mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd               1347 drivers/media/platform/s3c-camif/camif-capture.c static int s3c_camif_subdev_get_selection(struct v4l2_subdev *sd,
sd               1351 drivers/media/platform/s3c-camif/camif-capture.c 	struct camif_dev *camif = v4l2_get_subdevdata(sd);
sd               1361 drivers/media/platform/s3c-camif/camif-capture.c 		sel->r = *v4l2_subdev_get_try_crop(sd, cfg, sel->pad);
sd               1378 drivers/media/platform/s3c-camif/camif-capture.c 	v4l2_dbg(1, debug, sd, "%s: crop: (%d,%d) %dx%d, size: %ux%u\n",
sd               1434 drivers/media/platform/s3c-camif/camif-capture.c static int s3c_camif_subdev_set_selection(struct v4l2_subdev *sd,
sd               1438 drivers/media/platform/s3c-camif/camif-capture.c 	struct camif_dev *camif = v4l2_get_subdevdata(sd);
sd               1449 drivers/media/platform/s3c-camif/camif-capture.c 		*v4l2_subdev_get_try_crop(sd, cfg, sel->pad) = sel->r;
sd               1470 drivers/media/platform/s3c-camif/camif-capture.c 	v4l2_dbg(1, debug, sd, "%s: (%d,%d) %dx%d, f_w: %u, f_h: %u\n",
sd               1544 drivers/media/platform/s3c-camif/camif-capture.c 	struct v4l2_subdev *sd = &camif->subdev;
sd               1547 drivers/media/platform/s3c-camif/camif-capture.c 	v4l2_subdev_init(sd, &s3c_camif_subdev_ops);
sd               1548 drivers/media/platform/s3c-camif/camif-capture.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1549 drivers/media/platform/s3c-camif/camif-capture.c 	strscpy(sd->name, "S3C-CAMIF", sizeof(sd->name));
sd               1555 drivers/media/platform/s3c-camif/camif-capture.c 	ret = media_entity_pads_init(&sd->entity, CAMIF_SD_PADS_NUM,
sd               1579 drivers/media/platform/s3c-camif/camif-capture.c 		media_entity_cleanup(&sd->entity);
sd               1587 drivers/media/platform/s3c-camif/camif-capture.c 	sd->ctrl_handler = handler;
sd               1588 drivers/media/platform/s3c-camif/camif-capture.c 	v4l2_set_subdevdata(sd, camif);
sd               1595 drivers/media/platform/s3c-camif/camif-capture.c 	struct v4l2_subdev *sd = &camif->subdev;
sd               1598 drivers/media/platform/s3c-camif/camif-capture.c 	if (v4l2_get_subdevdata(sd) == NULL)
sd               1601 drivers/media/platform/s3c-camif/camif-capture.c 	v4l2_device_unregister_subdev(sd);
sd               1602 drivers/media/platform/s3c-camif/camif-capture.c 	media_entity_cleanup(&sd->entity);
sd               1604 drivers/media/platform/s3c-camif/camif-capture.c 	v4l2_set_subdevdata(sd, NULL);
sd                193 drivers/media/platform/s3c-camif/camif-core.c 	struct v4l2_subdev *sd;
sd                196 drivers/media/platform/s3c-camif/camif-core.c 	camif->sensor.sd = NULL;
sd                208 drivers/media/platform/s3c-camif/camif-core.c 	sd = v4l2_i2c_new_subdev_board(v4l2_dev, adapter,
sd                210 drivers/media/platform/s3c-camif/camif-core.c 	if (sd == NULL) {
sd                216 drivers/media/platform/s3c-camif/camif-core.c 	camif->sensor.sd = sd;
sd                218 drivers/media/platform/s3c-camif/camif-core.c 	v4l2_info(v4l2_dev, "registered sensor subdevice %s\n", sd->name);
sd                223 drivers/media/platform/s3c-camif/camif-core.c 	ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &format);
sd                231 drivers/media/platform/s3c-camif/camif-core.c 	v4l2_info(sd, "Initial format from sensor: %dx%d, %#x\n",
sd                239 drivers/media/platform/s3c-camif/camif-core.c 	struct v4l2_subdev *sd = camif->sensor.sd;
sd                240 drivers/media/platform/s3c-camif/camif-core.c 	struct i2c_client *client = sd ? v4l2_get_subdevdata(sd) : NULL;
sd                247 drivers/media/platform/s3c-camif/camif-core.c 	v4l2_device_unregister_subdev(sd);
sd                248 drivers/media/platform/s3c-camif/camif-core.c 	camif->sensor.sd = NULL;
sd                257 drivers/media/platform/s3c-camif/camif-core.c 	ret = media_create_pad_link(&camif->sensor.sd->entity, 0,
sd                271 drivers/media/platform/s3c-camif/camif-core.h 		struct v4l2_subdev	*sd;
sd               1347 drivers/media/platform/sh_vou.c 	struct v4l2_subdev *sd = list_entry(v4l2_dev->subdevs.next,
sd               1349 drivers/media/platform/sh_vou.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1438 drivers/media/platform/stm32/stm32-dcmi.c 	struct v4l2_subdev *sd = dcmi->entity.source;
sd               1451 drivers/media/platform/stm32/stm32-dcmi.c 	ret = v4l2_subdev_call(sd, core, s_power, 1);
sd               1457 drivers/media/platform/stm32/stm32-dcmi.c 		v4l2_subdev_call(sd, core, s_power, 0);
sd               1469 drivers/media/platform/stm32/stm32-dcmi.c 	struct v4l2_subdev *sd = dcmi->entity.source;
sd               1480 drivers/media/platform/stm32/stm32-dcmi.c 		v4l2_subdev_call(sd, core, s_power, 0);
sd               1729 drivers/media/platform/stm32/stm32-dcmi.c 				     struct v4l2_subdev *sd,
sd                671 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c 	struct v4l2_subdev *sd;
sd                676 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c 	sd = list_first_entry(&v4l2_dev->subdevs, struct v4l2_subdev, list);
sd                677 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c 	if (!sd)
sd                680 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c 	ret = sun6i_csi_link_entity(csi, &sd->entity, sd->fwnode);
sd                536 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c 		struct v4l2_subdev *sd =
sd                541 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c 		return v4l2_subdev_call(sd, pad, get_fmt, NULL, fmt);
sd                 28 drivers/media/platform/ti-vpe/csc.c 	u16	sd[12];
sd                156 drivers/media/platform/ti-vpe/csc.c 		coeff = sd_hd_coeffs->sd;
sd                 38 drivers/media/platform/video-mux.c static inline struct video_mux *v4l2_subdev_to_video_mux(struct v4l2_subdev *sd)
sd                 40 drivers/media/platform/video-mux.c 	return container_of(sd, struct video_mux, subdev);
sd                 47 drivers/media/platform/video-mux.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd                 48 drivers/media/platform/video-mux.c 	struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
sd                 59 drivers/media/platform/video-mux.c 	dev_dbg(sd->dev, "link setup '%s':%d->'%s':%d[%d]",
sd                 74 drivers/media/platform/video-mux.c 		dev_dbg(sd->dev, "setting %d active\n", local->index);
sd                 86 drivers/media/platform/video-mux.c 		dev_dbg(sd->dev, "going inactive\n");
sd                101 drivers/media/platform/video-mux.c static int video_mux_s_stream(struct v4l2_subdev *sd, int enable)
sd                103 drivers/media/platform/video-mux.c 	struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
sd                108 drivers/media/platform/video-mux.c 		dev_err(sd->dev, "Can not start streaming on inactive mux\n");
sd                112 drivers/media/platform/video-mux.c 	pad = media_entity_remote_pad(&sd->entity.pads[vmux->active]);
sd                114 drivers/media/platform/video-mux.c 		dev_err(sd->dev, "Failed to find remote source pad\n");
sd                119 drivers/media/platform/video-mux.c 		dev_err(sd->dev, "Upstream entity is not a v4l2 subdev\n");
sd                133 drivers/media/platform/video-mux.c __video_mux_get_pad_format(struct v4l2_subdev *sd,
sd                137 drivers/media/platform/video-mux.c 	struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
sd                141 drivers/media/platform/video-mux.c 		return v4l2_subdev_get_try_format(sd, cfg, pad);
sd                149 drivers/media/platform/video-mux.c static int video_mux_get_format(struct v4l2_subdev *sd,
sd                153 drivers/media/platform/video-mux.c 	struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
sd                157 drivers/media/platform/video-mux.c 	sdformat->format = *__video_mux_get_pad_format(sd, cfg, sdformat->pad,
sd                165 drivers/media/platform/video-mux.c static int video_mux_set_format(struct v4l2_subdev *sd,
sd                169 drivers/media/platform/video-mux.c 	struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
sd                172 drivers/media/platform/video-mux.c 	u16 source_pad = sd->entity.num_pads - 1;
sd                174 drivers/media/platform/video-mux.c 	mbusformat = __video_mux_get_pad_format(sd, cfg, sdformat->pad,
sd                179 drivers/media/platform/video-mux.c 	source_mbusformat = __video_mux_get_pad_format(sd, cfg, source_pad,
sd                303 drivers/media/platform/video-mux.c static int video_mux_init_cfg(struct v4l2_subdev *sd,
sd                306 drivers/media/platform/video-mux.c 	struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
sd                312 drivers/media/platform/video-mux.c 	for (i = 0; i < sd->entity.num_pads; i++) {
sd                313 drivers/media/platform/video-mux.c 		mbusformat = v4l2_subdev_get_try_format(sd, cfg, i);
sd                443 drivers/media/platform/video-mux.c 	struct v4l2_subdev *sd = &vmux->subdev;
sd                445 drivers/media/platform/video-mux.c 	v4l2_async_unregister_subdev(sd);
sd                446 drivers/media/platform/video-mux.c 	media_entity_cleanup(&sd->entity);
sd                223 drivers/media/platform/vimc/vimc-common.c 	struct v4l2_subdev *sd;
sd                240 drivers/media/platform/vimc/vimc-common.c 		sd = media_entity_to_v4l2_subdev(pad->entity);
sd                241 drivers/media/platform/vimc/vimc-common.c 		ret = v4l2_subdev_call(sd, video, s_stream, enable);
sd                254 drivers/media/platform/vimc/vimc-common.c 		struct v4l2_subdev *sd =
sd                261 drivers/media/platform/vimc/vimc-common.c 		ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, fmt);
sd                367 drivers/media/platform/vimc/vimc-common.c 			 struct v4l2_subdev *sd,
sd                384 drivers/media/platform/vimc/vimc-common.c 	ved->ent = &sd->entity;
sd                387 drivers/media/platform/vimc/vimc-common.c 	v4l2_subdev_init(sd, sd_ops);
sd                388 drivers/media/platform/vimc/vimc-common.c 	sd->internal_ops = sd_int_ops;
sd                389 drivers/media/platform/vimc/vimc-common.c 	sd->entity.function = function;
sd                390 drivers/media/platform/vimc/vimc-common.c 	sd->entity.ops = &vimc_ent_sd_mops;
sd                391 drivers/media/platform/vimc/vimc-common.c 	sd->owner = THIS_MODULE;
sd                392 drivers/media/platform/vimc/vimc-common.c 	strscpy(sd->name, name, sizeof(sd->name));
sd                393 drivers/media/platform/vimc/vimc-common.c 	v4l2_set_subdevdata(sd, ved);
sd                396 drivers/media/platform/vimc/vimc-common.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                397 drivers/media/platform/vimc/vimc-common.c 	if (sd->ctrl_handler)
sd                398 drivers/media/platform/vimc/vimc-common.c 		sd->flags |= V4L2_SUBDEV_FL_HAS_EVENTS;
sd                401 drivers/media/platform/vimc/vimc-common.c 	ret = media_entity_pads_init(&sd->entity, num_pads, ved->pads);
sd                406 drivers/media/platform/vimc/vimc-common.c 	ret = v4l2_device_register_subdev(v4l2_dev, sd);
sd                417 drivers/media/platform/vimc/vimc-common.c 	media_entity_cleanup(&sd->entity);
sd                424 drivers/media/platform/vimc/vimc-common.c void vimc_ent_sd_unregister(struct vimc_ent_device *ved, struct v4l2_subdev *sd)
sd                427 drivers/media/platform/vimc/vimc-common.c 	v4l2_device_unregister_subdev(sd);
sd                187 drivers/media/platform/vimc/vimc-common.h 			 struct v4l2_subdev *sd,
sd                206 drivers/media/platform/vimc/vimc-common.h 			    struct v4l2_subdev *sd);
sd                 43 drivers/media/platform/vimc/vimc-debayer.c 	struct v4l2_subdev sd;
sd                138 drivers/media/platform/vimc/vimc-debayer.c static int vimc_deb_init_cfg(struct v4l2_subdev *sd,
sd                141 drivers/media/platform/vimc/vimc-debayer.c 	struct vimc_deb_device *vdeb = v4l2_get_subdevdata(sd);
sd                145 drivers/media/platform/vimc/vimc-debayer.c 	mf = v4l2_subdev_get_try_format(sd, cfg, 0);
sd                148 drivers/media/platform/vimc/vimc-debayer.c 	for (i = 1; i < sd->entity.num_pads; i++) {
sd                149 drivers/media/platform/vimc/vimc-debayer.c 		mf = v4l2_subdev_get_try_format(sd, cfg, i);
sd                157 drivers/media/platform/vimc/vimc-debayer.c static int vimc_deb_enum_mbus_code(struct v4l2_subdev *sd,
sd                163 drivers/media/platform/vimc/vimc-debayer.c 		struct vimc_deb_device *vdeb = v4l2_get_subdevdata(sd);
sd                179 drivers/media/platform/vimc/vimc-debayer.c static int vimc_deb_enum_frame_size(struct v4l2_subdev *sd,
sd                183 drivers/media/platform/vimc/vimc-debayer.c 	struct vimc_deb_device *vdeb = v4l2_get_subdevdata(sd);
sd                206 drivers/media/platform/vimc/vimc-debayer.c static int vimc_deb_get_fmt(struct v4l2_subdev *sd,
sd                210 drivers/media/platform/vimc/vimc-debayer.c 	struct vimc_deb_device *vdeb = v4l2_get_subdevdata(sd);
sd                214 drivers/media/platform/vimc/vimc-debayer.c 		      *v4l2_subdev_get_try_format(sd, cfg, 0) :
sd                244 drivers/media/platform/vimc/vimc-debayer.c static int vimc_deb_set_fmt(struct v4l2_subdev *sd,
sd                248 drivers/media/platform/vimc/vimc-debayer.c 	struct vimc_deb_device *vdeb = v4l2_get_subdevdata(sd);
sd                258 drivers/media/platform/vimc/vimc-debayer.c 		sink_fmt = v4l2_subdev_get_try_format(sd, cfg, 0);
sd                275 drivers/media/platform/vimc/vimc-debayer.c 			"new:%dx%d (0x%x, %d, %d, %d, %d)\n", vdeb->sd.name,
sd                311 drivers/media/platform/vimc/vimc-debayer.c static int vimc_deb_s_stream(struct v4l2_subdev *sd, int enable)
sd                313 drivers/media/platform/vimc/vimc-debayer.c 	struct vimc_deb_device *vdeb = v4l2_get_subdevdata(sd);
sd                398 drivers/media/platform/vimc/vimc-debayer.c 		vdeb->sd.name, lin, col, vdeb->sink_fmt.height, seek);
sd                431 drivers/media/platform/vimc/vimc-debayer.c 				vdeb->sd.name, index, wlin, wcol, color);
sd                441 drivers/media/platform/vimc/vimc-debayer.c 				vdeb->sd.name, rgb[color], n_rgb[color]);
sd                449 drivers/media/platform/vimc/vimc-debayer.c 			vdeb->sd.name, lin, col, i, rgb[i], n_rgb[i]);
sd                456 drivers/media/platform/vimc/vimc-debayer.c 			vdeb->sd.name, lin, col, i, rgb[i]);
sd                482 drivers/media/platform/vimc/vimc-debayer.c static void vimc_deb_release(struct v4l2_subdev *sd)
sd                485 drivers/media/platform/vimc/vimc-debayer.c 				container_of(sd, struct vimc_deb_device, sd);
sd                502 drivers/media/platform/vimc/vimc-debayer.c 	vimc_ent_sd_unregister(ved, &vdeb->sd);
sd                519 drivers/media/platform/vimc/vimc-debayer.c 	ret = vimc_ent_sd_register(&vdeb->ved, &vdeb->sd, v4l2_dev,
sd                 30 drivers/media/platform/vimc/vimc-scaler.c 	struct v4l2_subdev sd;
sd                 50 drivers/media/platform/vimc/vimc-scaler.c static int vimc_sca_init_cfg(struct v4l2_subdev *sd,
sd                 56 drivers/media/platform/vimc/vimc-scaler.c 	mf = v4l2_subdev_get_try_format(sd, cfg, 0);
sd                 59 drivers/media/platform/vimc/vimc-scaler.c 	for (i = 1; i < sd->entity.num_pads; i++) {
sd                 60 drivers/media/platform/vimc/vimc-scaler.c 		mf = v4l2_subdev_get_try_format(sd, cfg, i);
sd                 69 drivers/media/platform/vimc/vimc-scaler.c static int vimc_sca_enum_mbus_code(struct v4l2_subdev *sd,
sd                 84 drivers/media/platform/vimc/vimc-scaler.c static int vimc_sca_enum_frame_size(struct v4l2_subdev *sd,
sd                112 drivers/media/platform/vimc/vimc-scaler.c static int vimc_sca_get_fmt(struct v4l2_subdev *sd,
sd                116 drivers/media/platform/vimc/vimc-scaler.c 	struct vimc_sca_device *vsca = v4l2_get_subdevdata(sd);
sd                120 drivers/media/platform/vimc/vimc-scaler.c 			 *v4l2_subdev_get_try_format(sd, cfg, 0) :
sd                152 drivers/media/platform/vimc/vimc-scaler.c static int vimc_sca_set_fmt(struct v4l2_subdev *sd,
sd                156 drivers/media/platform/vimc/vimc-scaler.c 	struct vimc_sca_device *vsca = v4l2_get_subdevdata(sd);
sd                166 drivers/media/platform/vimc/vimc-scaler.c 		sink_fmt = v4l2_subdev_get_try_format(sd, cfg, 0);
sd                183 drivers/media/platform/vimc/vimc-scaler.c 			"new:%dx%d (0x%x, %d, %d, %d, %d)\n", vsca->sd.name,
sd                207 drivers/media/platform/vimc/vimc-scaler.c static int vimc_sca_s_stream(struct v4l2_subdev *sd, int enable)
sd                209 drivers/media/platform/vimc/vimc-scaler.c 	struct vimc_sca_device *vsca = v4l2_get_subdevdata(sd);
sd                283 drivers/media/platform/vimc/vimc-scaler.c 		vsca->sd.name, lin, col, index);
sd                292 drivers/media/platform/vimc/vimc-scaler.c 		vsca->sd.name, lin * sca_mult, col * sca_mult, index);
sd                302 drivers/media/platform/vimc/vimc-scaler.c 				vsca->sd.name, index + j);
sd                341 drivers/media/platform/vimc/vimc-scaler.c static void vimc_sca_release(struct v4l2_subdev *sd)
sd                344 drivers/media/platform/vimc/vimc-scaler.c 				container_of(sd, struct vimc_sca_device, sd);
sd                361 drivers/media/platform/vimc/vimc-scaler.c 	vimc_ent_sd_unregister(ved, &vsca->sd);
sd                379 drivers/media/platform/vimc/vimc-scaler.c 	ret = vimc_ent_sd_register(&vsca->ved, &vsca->sd, v4l2_dev,
sd                 25 drivers/media/platform/vimc/vimc-sensor.c 	struct v4l2_subdev sd;
sd                 42 drivers/media/platform/vimc/vimc-sensor.c static int vimc_sen_init_cfg(struct v4l2_subdev *sd,
sd                 47 drivers/media/platform/vimc/vimc-sensor.c 	for (i = 0; i < sd->entity.num_pads; i++) {
sd                 50 drivers/media/platform/vimc/vimc-sensor.c 		mf = v4l2_subdev_get_try_format(sd, cfg, i);
sd                 57 drivers/media/platform/vimc/vimc-sensor.c static int vimc_sen_enum_mbus_code(struct v4l2_subdev *sd,
sd                 71 drivers/media/platform/vimc/vimc-sensor.c static int vimc_sen_enum_frame_size(struct v4l2_subdev *sd,
sd                 93 drivers/media/platform/vimc/vimc-sensor.c static int vimc_sen_get_fmt(struct v4l2_subdev *sd,
sd                 98 drivers/media/platform/vimc/vimc-sensor.c 				container_of(sd, struct vimc_sen_device, sd);
sd                101 drivers/media/platform/vimc/vimc-sensor.c 		      *v4l2_subdev_get_try_format(sd, cfg, fmt->pad) :
sd                146 drivers/media/platform/vimc/vimc-sensor.c static int vimc_sen_set_fmt(struct v4l2_subdev *sd,
sd                150 drivers/media/platform/vimc/vimc-sensor.c 	struct vimc_sen_device *vsen = v4l2_get_subdevdata(sd);
sd                160 drivers/media/platform/vimc/vimc-sensor.c 		mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
sd                168 drivers/media/platform/vimc/vimc-sensor.c 		"new:%dx%d (0x%x, %d, %d, %d, %d)\n", vsen->sd.name,
sd                201 drivers/media/platform/vimc/vimc-sensor.c static int vimc_sen_s_stream(struct v4l2_subdev *sd, int enable)
sd                204 drivers/media/platform/vimc/vimc-sensor.c 				container_of(sd, struct vimc_sen_device, sd);
sd                288 drivers/media/platform/vimc/vimc-sensor.c static void vimc_sen_release(struct v4l2_subdev *sd)
sd                291 drivers/media/platform/vimc/vimc-sensor.c 				container_of(sd, struct vimc_sen_device, sd);
sd                310 drivers/media/platform/vimc/vimc-sensor.c 	vimc_ent_sd_unregister(ved, &vsen->sd);
sd                359 drivers/media/platform/vimc/vimc-sensor.c 	vsen->sd.ctrl_handler = &vsen->hdl;
sd                366 drivers/media/platform/vimc/vimc-sensor.c 	ret = vimc_ent_sd_register(&vsen->ved, &vsen->sd, v4l2_dev,
sd                391 drivers/media/platform/vimc/vimc-sensor.c 	vimc_ent_sd_unregister(&vsen->ved,  &vsen->sd);
sd                 52 drivers/media/platform/vimc/vimc-streamer.c 	struct v4l2_subdev *sd;
sd                 62 drivers/media/platform/vimc/vimc-streamer.c 		sd = media_entity_to_v4l2_subdev(ved->ent);
sd                 63 drivers/media/platform/vimc/vimc-streamer.c 		v4l2_subdev_call(sd, video, s_stream, 0);
sd                 85 drivers/media/platform/vimc/vimc-streamer.c 	struct v4l2_subdev *sd;
sd                 97 drivers/media/platform/vimc/vimc-streamer.c 			sd = media_entity_to_v4l2_subdev(ved->ent);
sd                 98 drivers/media/platform/vimc/vimc-streamer.c 			ret = v4l2_subdev_call(sd, video, s_stream, 1);
sd                114 drivers/media/platform/vimc/vimc-streamer.c 			sd = media_entity_to_v4l2_subdev(entity);
sd                115 drivers/media/platform/vimc/vimc-streamer.c 			ved = v4l2_get_subdevdata(sd);
sd                117 drivers/media/radio/saa7706h.c 	struct v4l2_subdev sd;
sd                122 drivers/media/radio/saa7706h.c static inline struct saa7706h_state *to_state(struct v4l2_subdev *sd)
sd                124 drivers/media/radio/saa7706h.c 	return container_of(sd, struct saa7706h_state, sd);
sd                144 drivers/media/radio/saa7706h.c static int saa7706h_set_reg24(struct v4l2_subdev *sd, u16 reg, u32 val)
sd                146 drivers/media/radio/saa7706h.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                159 drivers/media/radio/saa7706h.c static int saa7706h_set_reg24_err(struct v4l2_subdev *sd, u16 reg, u32 val,
sd                162 drivers/media/radio/saa7706h.c 	return *err ? *err : saa7706h_set_reg24(sd, reg, val);
sd                165 drivers/media/radio/saa7706h.c static int saa7706h_set_reg16(struct v4l2_subdev *sd, u16 reg, u16 val)
sd                167 drivers/media/radio/saa7706h.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                179 drivers/media/radio/saa7706h.c static int saa7706h_set_reg16_err(struct v4l2_subdev *sd, u16 reg, u16 val,
sd                182 drivers/media/radio/saa7706h.c 	return *err ? *err : saa7706h_set_reg16(sd, reg, val);
sd                185 drivers/media/radio/saa7706h.c static int saa7706h_get_reg16(struct v4l2_subdev *sd, u16 reg)
sd                187 drivers/media/radio/saa7706h.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                212 drivers/media/radio/saa7706h.c static int saa7706h_unmute(struct v4l2_subdev *sd)
sd                214 drivers/media/radio/saa7706h.c 	struct saa7706h_state *state = to_state(sd);
sd                217 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg16_err(sd, SAA7706H_REG_CTRL,
sd                224 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg16_err(sd, SAA7706H_REG_CTRL,
sd                227 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_REG_EVALUATION, 0, &err);
sd                229 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_REG_CL_GEN1, 0x040022, &err);
sd                231 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_REG_CL_GEN2,
sd                234 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_REG_CL_GEN4, 0x024080, &err);
sd                236 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_REG_SEL, 0x200080, &err);
sd                238 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_REG_IAC, 0xf4caed, &err);
sd                240 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_REG_CLK_SET, 0x124334, &err);
sd                242 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_REG_CLK_COEFF, 0x004a1a,
sd                245 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_REG_INPUT_SENS, 0x0071c7,
sd                248 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_REG_PHONE_NAV_AUDIO,
sd                251 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_REG_IO_CONF_DSP2, 0x001ff8,
sd                254 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_REG_STATUS_DSP2, 0x080003,
sd                257 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_REG_PC_DSP2, 0x000004, &err);
sd                259 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg16_err(sd, SAA7706H_DSP1_MOD0, 0x0c6c, &err);
sd                261 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_DSP2_MPTR0, 0x000b4b, &err);
sd                263 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_DSP1_MODPNTR, 0x000600, &err);
sd                265 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_DSP1_MODPNTR, 0x0000c0, &err);
sd                267 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_DSP2_XMEM_CONTLLCW, 0x000819,
sd                270 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_DSP2_XMEM_CONTLLCW, 0x00085a,
sd                273 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_DSP2_XMEM_BUSAMP, 0x7fffff,
sd                276 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_DSP2_XMEM_FDACPNTR, 0x2000cb,
sd                279 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_DSP2_XMEM_IIS1PNTR, 0x2000cb,
sd                282 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg16_err(sd, SAA7706H_DSP2_YMEM_PVGA, 0x0f80, &err);
sd                284 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg16_err(sd, SAA7706H_DSP2_YMEM_PVAT1, 0x0800,
sd                287 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg16_err(sd, SAA7706H_DSP2_YMEM_PVAT, 0x0800, &err);
sd                289 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg24_err(sd, SAA7706H_DSP2_XMEM_CONTLLCW, 0x000905,
sd                296 drivers/media/radio/saa7706h.c static int saa7706h_mute(struct v4l2_subdev *sd)
sd                298 drivers/media/radio/saa7706h.c 	struct saa7706h_state *state = to_state(sd);
sd                301 drivers/media/radio/saa7706h.c 	err = saa7706h_set_reg16(sd, SAA7706H_REG_CTRL,
sd                317 drivers/media/radio/saa7706h.c 			return saa7706h_mute(&state->sd);
sd                318 drivers/media/radio/saa7706h.c 		return saa7706h_unmute(&state->sd);
sd                338 drivers/media/radio/saa7706h.c 	struct v4l2_subdev *sd;
sd                351 drivers/media/radio/saa7706h.c 	sd = &state->sd;
sd                352 drivers/media/radio/saa7706h.c 	v4l2_i2c_subdev_init(sd, client, &empty_ops);
sd                357 drivers/media/radio/saa7706h.c 	sd->ctrl_handler = &state->hdl;
sd                363 drivers/media/radio/saa7706h.c 	err = saa7706h_get_reg16(sd, SAA7706H_DSP1_ROM_VER);
sd                367 drivers/media/radio/saa7706h.c 		v4l2_warn(sd, "Unknown DSP1 ROM code version: 0x%x\n", err);
sd                371 drivers/media/radio/saa7706h.c 	err = saa7706h_mute(sd);
sd                378 drivers/media/radio/saa7706h.c 	v4l2_device_unregister_subdev(sd);
sd                380 drivers/media/radio/saa7706h.c 	kfree(to_state(sd));
sd                389 drivers/media/radio/saa7706h.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                390 drivers/media/radio/saa7706h.c 	struct saa7706h_state *state = to_state(sd);
sd                392 drivers/media/radio/saa7706h.c 	saa7706h_mute(sd);
sd                393 drivers/media/radio/saa7706h.c 	v4l2_device_unregister_subdev(sd);
sd                395 drivers/media/radio/saa7706h.c 	kfree(to_state(sd));
sd                140 drivers/media/radio/si4713/radio-platform-si4713.c 	struct v4l2_subdev *sd;
sd                163 drivers/media/radio/si4713/radio-platform-si4713.c 	sd = i2c_get_clientdata(pdata->subdev);
sd                164 drivers/media/radio/si4713/radio-platform-si4713.c 	rval = v4l2_device_register_subdev(&rsdev->v4l2_dev, sd);
sd                172 drivers/media/radio/si4713/radio-platform-si4713.c 	rsdev->radio_dev.ctrl_handler = sd->ctrl_handler;
sd                416 drivers/media/radio/si4713/radio-usb-si4713.c 	struct v4l2_subdev *sd;
sd                456 drivers/media/radio/si4713/radio-usb-si4713.c 	sd = v4l2_i2c_new_subdev_board(&radio->v4l2_dev, adapter,
sd                458 drivers/media/radio/si4713/radio-usb-si4713.c 	radio->v4l2_subdev = sd;
sd                459 drivers/media/radio/si4713/radio-usb-si4713.c 	if (!sd) {
sd                465 drivers/media/radio/si4713/radio-usb-si4713.c 	radio->vdev.ctrl_handler = sd->ctrl_handler;
sd                 53 drivers/media/radio/si4713/si4713.c #define to_si4713_device(sd)	container_of(sd, struct si4713_device, sd)
sd                176 drivers/media/radio/si4713/si4713.c 	v4l2_dbg(2, debug, &sdev->sd,
sd                197 drivers/media/radio/si4713/si4713.c 	struct i2c_client *client = v4l2_get_subdevdata(&sdev->sd);
sd                208 drivers/media/radio/si4713/si4713.c 	DBG_BUFFER(&sdev->sd, "Parameters", data1, argn + 1);
sd                212 drivers/media/radio/si4713/si4713.c 		v4l2_err(&sdev->sd, "Error while sending command 0x%02x\n",
sd                223 drivers/media/radio/si4713/si4713.c 			v4l2_warn(&sdev->sd,
sd                231 drivers/media/radio/si4713/si4713.c 			v4l2_err(&sdev->sd,
sd                237 drivers/media/radio/si4713/si4713.c 		DBG_BUFFER(&sdev->sd, "Response", response, respn);
sd                282 drivers/media/radio/si4713/si4713.c 	v4l2_dbg(1, debug, &sdev->sd,
sd                322 drivers/media/radio/si4713/si4713.c 	v4l2_dbg(1, debug, &sdev->sd,
sd                342 drivers/media/radio/si4713/si4713.c 	struct i2c_client *client = v4l2_get_subdevdata(&sdev->sd);
sd                360 drivers/media/radio/si4713/si4713.c 			v4l2_err(&sdev->sd, "Failed to enable vdd: %d\n", err);
sd                368 drivers/media/radio/si4713/si4713.c 			v4l2_err(&sdev->sd, "Failed to enable vio: %d\n", err);
sd                387 drivers/media/radio/si4713/si4713.c 		v4l2_dbg(1, debug, &sdev->sd, "Powerup response: 0x%02x\n",
sd                389 drivers/media/radio/si4713/si4713.c 		v4l2_dbg(1, debug, &sdev->sd, "Device in power up mode\n");
sd                403 drivers/media/radio/si4713/si4713.c 			v4l2_err(&sdev->sd, "Failed to disable vdd: %d\n", err);
sd                409 drivers/media/radio/si4713/si4713.c 			v4l2_err(&sdev->sd, "Failed to disable vio: %d\n", err);
sd                433 drivers/media/radio/si4713/si4713.c 		v4l2_dbg(1, debug, &sdev->sd, "Power down response: 0x%02x\n",
sd                435 drivers/media/radio/si4713/si4713.c 		v4l2_dbg(1, debug, &sdev->sd, "Device in reset mode\n");
sd                442 drivers/media/radio/si4713/si4713.c 				v4l2_err(&sdev->sd,
sd                450 drivers/media/radio/si4713/si4713.c 				v4l2_err(&sdev->sd,
sd                466 drivers/media/radio/si4713/si4713.c 	struct i2c_client *client = v4l2_get_subdevdata(&sdev->sd);
sd                479 drivers/media/radio/si4713/si4713.c 		v4l2_info(&sdev->sd, "chip found @ 0x%02x (%s)\n",
sd                482 drivers/media/radio/si4713/si4713.c 		v4l2_err(&sdev->sd, "Invalid product number 0x%X\n", resp[1]);
sd                496 drivers/media/radio/si4713/si4713.c 	struct i2c_client *client = v4l2_get_subdevdata(&sdev->sd);
sd                503 drivers/media/radio/si4713/si4713.c 		v4l2_warn(&sdev->sd,
sd                515 drivers/media/radio/si4713/si4713.c 			v4l2_dbg(1, debug, &sdev->sd,
sd                560 drivers/media/radio/si4713/si4713.c 	v4l2_dbg(1, debug, &sdev->sd,
sd                611 drivers/media/radio/si4713/si4713.c 	v4l2_dbg(1, debug, &sdev->sd,
sd                660 drivers/media/radio/si4713/si4713.c 	v4l2_dbg(1, debug, &sdev->sd,
sd                699 drivers/media/radio/si4713/si4713.c 		v4l2_dbg(1, debug, &sdev->sd,
sd                706 drivers/media/radio/si4713/si4713.c 		v4l2_dbg(1, debug, &sdev->sd,
sd                745 drivers/media/radio/si4713/si4713.c 		v4l2_dbg(1, debug, &sdev->sd,
sd                748 drivers/media/radio/si4713/si4713.c 		v4l2_dbg(1, debug, &sdev->sd,
sd                783 drivers/media/radio/si4713/si4713.c 	v4l2_dbg(1, debug, &sdev->sd, "%s: status=0x%02x\n", __func__, val[0]);
sd               1046 drivers/media/radio/si4713/si4713.c static int si4713_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *f);
sd               1047 drivers/media/radio/si4713/si4713.c static int si4713_s_modulator(struct v4l2_subdev *sd, const struct v4l2_modulator *);
sd               1062 drivers/media/radio/si4713/si4713.c 	rval = si4713_s_frequency(&sdev->sd, &f);
sd               1071 drivers/media/radio/si4713/si4713.c 	si4713_s_modulator(&sdev->sd, &vm);
sd               1219 drivers/media/radio/si4713/si4713.c static long si4713_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
sd               1221 drivers/media/radio/si4713/si4713.c 	struct si4713_device *sdev = to_si4713_device(sd);
sd               1255 drivers/media/radio/si4713/si4713.c static int si4713_g_modulator(struct v4l2_subdev *sd, struct v4l2_modulator *vm)
sd               1257 drivers/media/radio/si4713/si4713.c 	struct si4713_device *sdev = to_si4713_device(sd);
sd               1301 drivers/media/radio/si4713/si4713.c static int si4713_s_modulator(struct v4l2_subdev *sd, const struct v4l2_modulator *vm)
sd               1303 drivers/media/radio/si4713/si4713.c 	struct si4713_device *sdev = to_si4713_device(sd);
sd               1346 drivers/media/radio/si4713/si4713.c static int si4713_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
sd               1348 drivers/media/radio/si4713/si4713.c 	struct si4713_device *sdev = to_si4713_device(sd);
sd               1371 drivers/media/radio/si4713/si4713.c static int si4713_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *f)
sd               1373 drivers/media/radio/si4713/si4713.c 	struct si4713_device *sdev = to_si4713_device(sd);
sd               1475 drivers/media/radio/si4713/si4713.c 	v4l2_i2c_subdev_init(&sdev->sd, client, &si4713_subdev_ops);
sd               1572 drivers/media/radio/si4713/si4713.c 	sdev->sd.ctrl_handler = hdl;
sd               1579 drivers/media/radio/si4713/si4713.c 			v4l2_err(&sdev->sd, "Could not request IRQ\n");
sd               1582 drivers/media/radio/si4713/si4713.c 		v4l2_dbg(1, debug, &sdev->sd, "IRQ requested.\n");
sd               1584 drivers/media/radio/si4713/si4713.c 		v4l2_warn(&sdev->sd, "IRQ not configured. Using timeouts.\n");
sd               1589 drivers/media/radio/si4713/si4713.c 		v4l2_err(&sdev->sd, "Failed to probe device information.\n");
sd               1618 drivers/media/radio/si4713/si4713.c 	v4l2_device_unregister_subdev(&sdev->sd);
sd               1628 drivers/media/radio/si4713/si4713.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1629 drivers/media/radio/si4713/si4713.c 	struct si4713_device *sdev = to_si4713_device(sd);
sd               1636 drivers/media/radio/si4713/si4713.c 	v4l2_device_unregister_subdev(sd);
sd               1637 drivers/media/radio/si4713/si4713.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                200 drivers/media/radio/si4713/si4713.h 	struct v4l2_subdev sd;
sd                 50 drivers/media/radio/tef6862.c 	struct v4l2_subdev sd;
sd                 54 drivers/media/radio/tef6862.c static inline struct tef6862_state *to_state(struct v4l2_subdev *sd)
sd                 56 drivers/media/radio/tef6862.c 	return container_of(sd, struct tef6862_state, sd);
sd                 68 drivers/media/radio/tef6862.c static int tef6862_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v)
sd                 81 drivers/media/radio/tef6862.c 	v->signal = tef6862_sigstr(v4l2_get_subdevdata(sd));
sd                 86 drivers/media/radio/tef6862.c static int tef6862_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *v)
sd                 91 drivers/media/radio/tef6862.c static int tef6862_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *f)
sd                 93 drivers/media/radio/tef6862.c 	struct tef6862_state *state = to_state(sd);
sd                 94 drivers/media/radio/tef6862.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                117 drivers/media/radio/tef6862.c static int tef6862_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
sd                119 drivers/media/radio/tef6862.c 	struct tef6862_state *state = to_state(sd);
sd                148 drivers/media/radio/tef6862.c 	struct v4l2_subdev *sd;
sd                162 drivers/media/radio/tef6862.c 	sd = &state->sd;
sd                163 drivers/media/radio/tef6862.c 	v4l2_i2c_subdev_init(sd, client, &tef6862_ops);
sd                170 drivers/media/radio/tef6862.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                172 drivers/media/radio/tef6862.c 	v4l2_device_unregister_subdev(sd);
sd                173 drivers/media/radio/tef6862.c 	kfree(to_state(sd));
sd                 48 drivers/media/spi/gs1662.c 	struct v4l2_subdev sd;
sd                195 drivers/media/spi/gs1662.c static int gs_g_register(struct v4l2_subdev *sd,
sd                198 drivers/media/spi/gs1662.c 	struct spi_device *spi = v4l2_get_subdevdata(sd);
sd                208 drivers/media/spi/gs1662.c static int gs_s_register(struct v4l2_subdev *sd,
sd                211 drivers/media/spi/gs1662.c 	struct spi_device *spi = v4l2_get_subdevdata(sd);
sd                245 drivers/media/spi/gs1662.c static inline struct gs *to_gs(struct v4l2_subdev *sd)
sd                247 drivers/media/spi/gs1662.c 	return container_of(sd, struct gs, sd);
sd                250 drivers/media/spi/gs1662.c static int gs_s_dv_timings(struct v4l2_subdev *sd,
sd                253 drivers/media/spi/gs1662.c 	struct gs *gs = to_gs(sd);
sd                264 drivers/media/spi/gs1662.c static int gs_g_dv_timings(struct v4l2_subdev *sd,
sd                267 drivers/media/spi/gs1662.c 	struct gs *gs = to_gs(sd);
sd                273 drivers/media/spi/gs1662.c static int gs_query_dv_timings(struct v4l2_subdev *sd,
sd                276 drivers/media/spi/gs1662.c 	struct gs *gs = to_gs(sd);
sd                313 drivers/media/spi/gs1662.c static int gs_enum_dv_timings(struct v4l2_subdev *sd,
sd                326 drivers/media/spi/gs1662.c static int gs_s_stream(struct v4l2_subdev *sd, int enable)
sd                328 drivers/media/spi/gs1662.c 	struct gs *gs = to_gs(sd);
sd                346 drivers/media/spi/gs1662.c static int gs_g_input_status(struct v4l2_subdev *sd, u32 *status)
sd                348 drivers/media/spi/gs1662.c 	struct gs *gs = to_gs(sd);
sd                382 drivers/media/spi/gs1662.c static int gs_dv_timings_cap(struct v4l2_subdev *sd,
sd                424 drivers/media/spi/gs1662.c 	struct v4l2_subdev *sd;
sd                431 drivers/media/spi/gs1662.c 	sd = &gs->sd;
sd                438 drivers/media/spi/gs1662.c 	v4l2_spi_subdev_init(sd, spi, &gs_ops);
sd                451 drivers/media/spi/gs1662.c 	struct v4l2_subdev *sd = spi_get_drvdata(spi);
sd                453 drivers/media/spi/gs1662.c 	v4l2_device_unregister_subdev(sd);
sd                278 drivers/media/tuners/e4000.c static inline struct e4000_dev *e4000_subdev_to_dev(struct v4l2_subdev *sd)
sd                280 drivers/media/tuners/e4000.c 	return container_of(sd, struct e4000_dev, sd);
sd                283 drivers/media/tuners/e4000.c static int e4000_standby(struct v4l2_subdev *sd)
sd                285 drivers/media/tuners/e4000.c 	struct e4000_dev *dev = e4000_subdev_to_dev(sd);
sd                295 drivers/media/tuners/e4000.c static int e4000_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v)
sd                297 drivers/media/tuners/e4000.c 	struct e4000_dev *dev = e4000_subdev_to_dev(sd);
sd                310 drivers/media/tuners/e4000.c static int e4000_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *v)
sd                312 drivers/media/tuners/e4000.c 	struct e4000_dev *dev = e4000_subdev_to_dev(sd);
sd                319 drivers/media/tuners/e4000.c static int e4000_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
sd                321 drivers/media/tuners/e4000.c 	struct e4000_dev *dev = e4000_subdev_to_dev(sd);
sd                329 drivers/media/tuners/e4000.c static int e4000_s_frequency(struct v4l2_subdev *sd,
sd                332 drivers/media/tuners/e4000.c 	struct e4000_dev *dev = e4000_subdev_to_dev(sd);
sd                343 drivers/media/tuners/e4000.c static int e4000_enum_freq_bands(struct v4l2_subdev *sd,
sd                346 drivers/media/tuners/e4000.c 	struct e4000_dev *dev = e4000_subdev_to_dev(sd);
sd                689 drivers/media/tuners/e4000.c 	dev->sd.ctrl_handler = &dev->hdl;
sd                692 drivers/media/tuners/e4000.c 	v4l2_i2c_subdev_init(&dev->sd, client, &e4000_subdev_ops);
sd                697 drivers/media/tuners/e4000.c 	v4l2_set_subdevdata(&dev->sd, client);
sd                698 drivers/media/tuners/e4000.c 	i2c_set_clientdata(client, &dev->sd);
sd                711 drivers/media/tuners/e4000.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                712 drivers/media/tuners/e4000.c 	struct e4000_dev *dev = container_of(sd, struct e4000_dev, sd);
sd                 22 drivers/media/tuners/e4000_priv.h 	struct v4l2_subdev sd;
sd                371 drivers/media/tuners/fc2580.c static inline struct fc2580_dev *fc2580_subdev_to_dev(struct v4l2_subdev *sd)
sd                373 drivers/media/tuners/fc2580.c 	return container_of(sd, struct fc2580_dev, subdev);
sd                376 drivers/media/tuners/fc2580.c static int fc2580_standby(struct v4l2_subdev *sd)
sd                378 drivers/media/tuners/fc2580.c 	struct fc2580_dev *dev = fc2580_subdev_to_dev(sd);
sd                388 drivers/media/tuners/fc2580.c static int fc2580_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v)
sd                390 drivers/media/tuners/fc2580.c 	struct fc2580_dev *dev = fc2580_subdev_to_dev(sd);
sd                403 drivers/media/tuners/fc2580.c static int fc2580_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *v)
sd                405 drivers/media/tuners/fc2580.c 	struct fc2580_dev *dev = fc2580_subdev_to_dev(sd);
sd                412 drivers/media/tuners/fc2580.c static int fc2580_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
sd                414 drivers/media/tuners/fc2580.c 	struct fc2580_dev *dev = fc2580_subdev_to_dev(sd);
sd                422 drivers/media/tuners/fc2580.c static int fc2580_s_frequency(struct v4l2_subdev *sd,
sd                425 drivers/media/tuners/fc2580.c 	struct fc2580_dev *dev = fc2580_subdev_to_dev(sd);
sd                436 drivers/media/tuners/fc2580.c static int fc2580_enum_freq_bands(struct v4l2_subdev *sd,
sd                439 drivers/media/tuners/fc2580.c 	struct fc2580_dev *dev = fc2580_subdev_to_dev(sd);
sd                 32 drivers/media/tuners/msi001.c 	struct v4l2_subdev sd;
sd                 45 drivers/media/tuners/msi001.c static inline struct msi001_dev *sd_to_msi001_dev(struct v4l2_subdev *sd)
sd                 47 drivers/media/tuners/msi001.c 	return container_of(sd, struct msi001_dev, sd);
sd                285 drivers/media/tuners/msi001.c static int msi001_standby(struct v4l2_subdev *sd)
sd                287 drivers/media/tuners/msi001.c 	struct msi001_dev *dev = sd_to_msi001_dev(sd);
sd                292 drivers/media/tuners/msi001.c static int msi001_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v)
sd                294 drivers/media/tuners/msi001.c 	struct msi001_dev *dev = sd_to_msi001_dev(sd);
sd                308 drivers/media/tuners/msi001.c static int msi001_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *v)
sd                310 drivers/media/tuners/msi001.c 	struct msi001_dev *dev = sd_to_msi001_dev(sd);
sd                317 drivers/media/tuners/msi001.c static int msi001_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
sd                319 drivers/media/tuners/msi001.c 	struct msi001_dev *dev = sd_to_msi001_dev(sd);
sd                327 drivers/media/tuners/msi001.c static int msi001_s_frequency(struct v4l2_subdev *sd,
sd                330 drivers/media/tuners/msi001.c 	struct msi001_dev *dev = sd_to_msi001_dev(sd);
sd                347 drivers/media/tuners/msi001.c static int msi001_enum_freq_bands(struct v4l2_subdev *sd,
sd                350 drivers/media/tuners/msi001.c 	struct msi001_dev *dev = sd_to_msi001_dev(sd);
sd                437 drivers/media/tuners/msi001.c 	v4l2_spi_subdev_init(&dev->sd, spi, &msi001_ops);
sd                459 drivers/media/tuners/msi001.c 	dev->sd.ctrl_handler = &dev->hdl;
sd                470 drivers/media/tuners/msi001.c 	struct v4l2_subdev *sd = spi_get_drvdata(spi);
sd                471 drivers/media/tuners/msi001.c 	struct msi001_dev *dev = sd_to_msi001_dev(sd);
sd                479 drivers/media/tuners/msi001.c 	v4l2_device_unregister_subdev(&dev->sd);
sd                185 drivers/media/tuners/qm1d1c0042.c 	u32 a, sd;
sd                243 drivers/media/tuners/qm1d1c0042.c 		sd = b;
sd                245 drivers/media/tuners/qm1d1c0042.c 		sd = (1 << 22) + b;
sd                248 drivers/media/tuners/qm1d1c0042.c 	state->regs[0x09] |= (sd >> 16) & 0x3f;
sd                249 drivers/media/tuners/qm1d1c0042.c 	state->regs[0x0a] = (sd >> 8) & 0xff;
sd                250 drivers/media/tuners/qm1d1c0042.c 	state->regs[0x0b] = sd & 0xff;
sd                206 drivers/media/usb/au0828/au0828-cards.c 	struct v4l2_subdev *sd;
sd                213 drivers/media/usb/au0828/au0828-cards.c 		sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
sd                215 drivers/media/usb/au0828/au0828-cards.c 		if (sd == NULL)
sd                222 drivers/media/usb/au0828/au0828-cards.c 		sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
sd                224 drivers/media/usb/au0828/au0828-cards.c 		if (sd == NULL)
sd               1580 drivers/media/usb/cx231xx/cx231xx-417.c 	struct v4l2_subdev *sd;
sd               1584 drivers/media/usb/cx231xx/cx231xx-417.c 	v4l2_device_for_each_subdev(sd, &dev->v4l2_dev)
sd               1585 drivers/media/usb/cx231xx/cx231xx-417.c 		v4l2_s_ctrl(NULL, sd->ctrl_handler, ctl);
sd               2617 drivers/media/usb/em28xx/em28xx-video.c 			struct v4l2_subdev *sd;
sd               2619 drivers/media/usb/em28xx/em28xx-video.c 			sd = v4l2_i2c_new_subdev(&v4l2->v4l2_dev,
sd               2624 drivers/media/usb/em28xx/em28xx-video.c 			if (sd)
sd               2625 drivers/media/usb/em28xx/em28xx-video.c 				tuner_addr = v4l2_i2c_subdev_addr(sd);
sd                199 drivers/media/usb/go7007/go7007-driver.c 	struct v4l2_subdev *sd;
sd                207 drivers/media/usb/go7007/go7007-driver.c 	sd = v4l2_i2c_new_subdev_board(v4l2_dev, adapter, &info, NULL);
sd                208 drivers/media/usb/go7007/go7007-driver.c 	if (sd) {
sd                210 drivers/media/usb/go7007/go7007-driver.c 			go->sd_video = sd;
sd                212 drivers/media/usb/go7007/go7007-driver.c 			go->sd_audio = sd;
sd                112 drivers/media/usb/go7007/s2250-board.c 	struct v4l2_subdev sd;
sd                125 drivers/media/usb/go7007/s2250-board.c static inline struct s2250 *to_state(struct v4l2_subdev *sd)
sd                127 drivers/media/usb/go7007/s2250-board.c 	return container_of(sd, struct s2250, sd);
sd                319 drivers/media/usb/go7007/s2250-board.c static int s2250_s_video_routing(struct v4l2_subdev *sd, u32 input, u32 output,
sd                322 drivers/media/usb/go7007/s2250-board.c 	struct s2250 *state = to_state(sd);
sd                323 drivers/media/usb/go7007/s2250-board.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                344 drivers/media/usb/go7007/s2250-board.c static int s2250_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
sd                346 drivers/media/usb/go7007/s2250-board.c 	struct s2250 *state = to_state(sd);
sd                347 drivers/media/usb/go7007/s2250-board.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                366 drivers/media/usb/go7007/s2250-board.c 	struct i2c_client *client = v4l2_get_subdevdata(&state->sd);
sd                400 drivers/media/usb/go7007/s2250-board.c static int s2250_set_fmt(struct v4l2_subdev *sd,
sd                405 drivers/media/usb/go7007/s2250-board.c 	struct s2250 *state = to_state(sd);
sd                406 drivers/media/usb/go7007/s2250-board.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                424 drivers/media/usb/go7007/s2250-board.c static int s2250_s_audio_routing(struct v4l2_subdev *sd, u32 input, u32 output,
sd                427 drivers/media/usb/go7007/s2250-board.c 	struct s2250 *state = to_state(sd);
sd                447 drivers/media/usb/go7007/s2250-board.c static int s2250_log_status(struct v4l2_subdev *sd)
sd                449 drivers/media/usb/go7007/s2250-board.c 	struct s2250 *state = to_state(sd);
sd                451 drivers/media/usb/go7007/s2250-board.c 	v4l2_info(sd, "Standard: %s\n", state->std == V4L2_STD_NTSC ? "NTSC" :
sd                455 drivers/media/usb/go7007/s2250-board.c 	v4l2_info(sd, "Input: %s\n", state->input == 0 ? "Composite" :
sd                458 drivers/media/usb/go7007/s2250-board.c 	v4l2_info(sd, "Audio input: %s\n", state->audio_input == 0 ? "Line In" :
sd                462 drivers/media/usb/go7007/s2250-board.c 	return v4l2_ctrl_subdev_log_status(sd);
sd                503 drivers/media/usb/go7007/s2250-board.c 	struct v4l2_subdev *sd;
sd                518 drivers/media/usb/go7007/s2250-board.c 	sd = &state->sd;
sd                519 drivers/media/usb/go7007/s2250-board.c 	v4l2_i2c_subdev_init(sd, client, &s2250_ops);
sd                521 drivers/media/usb/go7007/s2250-board.c 	v4l2_info(sd, "initializing %s at address 0x%x on %s\n",
sd                533 drivers/media/usb/go7007/s2250-board.c 	sd->ctrl_handler = &state->hdl;
sd                596 drivers/media/usb/go7007/s2250-board.c 	v4l2_info(sd, "initialized successfully\n");
sd                610 drivers/media/usb/go7007/s2250-board.c 	v4l2_device_unregister_subdev(&state->sd);
sd                258 drivers/media/usb/gspca/benq.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                771 drivers/media/usb/gspca/conex.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                774 drivers/media/usb/gspca/conex.c 	jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
sd                777 drivers/media/usb/gspca/conex.c 	jpeg_set_qual(sd->jpeg_hdr, QUALITY);
sd                815 drivers/media/usb/gspca/conex.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                824 drivers/media/usb/gspca/conex.c 				sd->jpeg_hdr, JPEG_HDR_SZ);
sd                869 drivers/media/usb/gspca/conex.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                878 drivers/media/usb/gspca/conex.c 		setbrightness(gspca_dev, ctrl->val, sd->sat->cur.val);
sd                881 drivers/media/usb/gspca/conex.c 		setcontrast(gspca_dev, ctrl->val, sd->sat->cur.val);
sd                884 drivers/media/usb/gspca/conex.c 		setbrightness(gspca_dev, sd->brightness->cur.val, ctrl->val);
sd                885 drivers/media/usb/gspca/conex.c 		setcontrast(gspca_dev, sd->contrast->cur.val, ctrl->val);
sd                897 drivers/media/usb/gspca/conex.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                902 drivers/media/usb/gspca/conex.c 	sd->brightness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                904 drivers/media/usb/gspca/conex.c 	sd->contrast = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                906 drivers/media/usb/gspca/conex.c 	sd->sat = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                937 drivers/media/usb/gspca/conex.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                213 drivers/media/usb/gspca/cpia1.c #define FIRMWARE_VERSION(x, y) (sd->params.version.firmwareVersion == (x) && \
sd                214 drivers/media/usb/gspca/cpia1.c 				sd->params.version.firmwareRevision == (y))
sd                440 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                478 drivers/media/usb/gspca/cpia1.c 		sd->params.version.firmwareVersion = gspca_dev->usb_buf[0];
sd                479 drivers/media/usb/gspca/cpia1.c 		sd->params.version.firmwareRevision = gspca_dev->usb_buf[1];
sd                480 drivers/media/usb/gspca/cpia1.c 		sd->params.version.vcVersion = gspca_dev->usb_buf[2];
sd                481 drivers/media/usb/gspca/cpia1.c 		sd->params.version.vcRevision = gspca_dev->usb_buf[3];
sd                484 drivers/media/usb/gspca/cpia1.c 		sd->params.pnpID.vendor =
sd                486 drivers/media/usb/gspca/cpia1.c 		sd->params.pnpID.product =
sd                488 drivers/media/usb/gspca/cpia1.c 		sd->params.pnpID.deviceRevision =
sd                492 drivers/media/usb/gspca/cpia1.c 		sd->params.status.systemState = gspca_dev->usb_buf[0];
sd                493 drivers/media/usb/gspca/cpia1.c 		sd->params.status.grabState = gspca_dev->usb_buf[1];
sd                494 drivers/media/usb/gspca/cpia1.c 		sd->params.status.streamState = gspca_dev->usb_buf[2];
sd                495 drivers/media/usb/gspca/cpia1.c 		sd->params.status.fatalError = gspca_dev->usb_buf[3];
sd                496 drivers/media/usb/gspca/cpia1.c 		sd->params.status.cmdError = gspca_dev->usb_buf[4];
sd                497 drivers/media/usb/gspca/cpia1.c 		sd->params.status.debugFlags = gspca_dev->usb_buf[5];
sd                498 drivers/media/usb/gspca/cpia1.c 		sd->params.status.vpStatus = gspca_dev->usb_buf[6];
sd                499 drivers/media/usb/gspca/cpia1.c 		sd->params.status.errorCode = gspca_dev->usb_buf[7];
sd                502 drivers/media/usb/gspca/cpia1.c 		sd->params.vpVersion.vpVersion = gspca_dev->usb_buf[0];
sd                503 drivers/media/usb/gspca/cpia1.c 		sd->params.vpVersion.vpRevision = gspca_dev->usb_buf[1];
sd                504 drivers/media/usb/gspca/cpia1.c 		sd->params.vpVersion.cameraHeadID =
sd                508 drivers/media/usb/gspca/cpia1.c 		sd->params.colourParams.brightness = gspca_dev->usb_buf[0];
sd                509 drivers/media/usb/gspca/cpia1.c 		sd->params.colourParams.contrast = gspca_dev->usb_buf[1];
sd                510 drivers/media/usb/gspca/cpia1.c 		sd->params.colourParams.saturation = gspca_dev->usb_buf[2];
sd                513 drivers/media/usb/gspca/cpia1.c 		sd->params.colourBalance.redGain = gspca_dev->usb_buf[0];
sd                514 drivers/media/usb/gspca/cpia1.c 		sd->params.colourBalance.greenGain = gspca_dev->usb_buf[1];
sd                515 drivers/media/usb/gspca/cpia1.c 		sd->params.colourBalance.blueGain = gspca_dev->usb_buf[2];
sd                518 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.gain = gspca_dev->usb_buf[0];
sd                519 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.fineExp = gspca_dev->usb_buf[1];
sd                520 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.coarseExpLo = gspca_dev->usb_buf[2];
sd                521 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.coarseExpHi = gspca_dev->usb_buf[3];
sd                522 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.redComp = gspca_dev->usb_buf[4];
sd                523 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.green1Comp = gspca_dev->usb_buf[5];
sd                524 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.green2Comp = gspca_dev->usb_buf[6];
sd                525 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.blueComp = gspca_dev->usb_buf[7];
sd                531 drivers/media/usb/gspca/cpia1.c 		if (a != sd->params.qx3.button) {
sd                536 drivers/media/usb/gspca/cpia1.c 			sd->params.qx3.button = a;
sd                538 drivers/media/usb/gspca/cpia1.c 		if (sd->params.qx3.button) {
sd                551 drivers/media/usb/gspca/cpia1.c 		sd->params.qx3.cradled = ((gspca_dev->usb_buf[2] & 0x40) == 0);
sd                619 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                620 drivers/media/usb/gspca/cpia1.c 	struct cam_params *params = &sd->params;
sd                670 drivers/media/usb/gspca/cpia1.c 		flicker_jumps[sd->mainsFreq]
sd                707 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                718 drivers/media/usb/gspca/cpia1.c 	if (sd->params.status.systemState != LO_POWER_STATE) {
sd                719 drivers/media/usb/gspca/cpia1.c 		if (sd->params.status.systemState != WARM_BOOT_STATE) {
sd                721 drivers/media/usb/gspca/cpia1.c 				  sd->params.status.systemState);
sd                722 drivers/media/usb/gspca/cpia1.c 			printstatus(gspca_dev, &sd->params);
sd                733 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                749 drivers/media/usb/gspca/cpia1.c 	if (sd->params.status.systemState != HI_POWER_STATE) {
sd                751 drivers/media/usb/gspca/cpia1.c 			  sd->params.status.systemState);
sd                752 drivers/media/usb/gspca/cpia1.c 		printstatus(gspca_dev, &sd->params);
sd                786 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                790 drivers/media/usb/gspca/cpia1.c 			 sd->params.format.videoSize,
sd                791 drivers/media/usb/gspca/cpia1.c 			 sd->params.format.subSample,
sd                792 drivers/media/usb/gspca/cpia1.c 			 sd->params.format.yuvOrder, 0);
sd                797 drivers/media/usb/gspca/cpia1.c 			  sd->params.roi.colStart, sd->params.roi.colEnd,
sd                798 drivers/media/usb/gspca/cpia1.c 			  sd->params.roi.rowStart, sd->params.roi.rowEnd);
sd                803 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                805 drivers/media/usb/gspca/cpia1.c 			  sd->params.colourParams.brightness,
sd                806 drivers/media/usb/gspca/cpia1.c 			  sd->params.colourParams.contrast,
sd                807 drivers/media/usb/gspca/cpia1.c 			  sd->params.colourParams.saturation, 0);
sd                812 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                814 drivers/media/usb/gspca/cpia1.c 			  sd->params.apcor.gain1,
sd                815 drivers/media/usb/gspca/cpia1.c 			  sd->params.apcor.gain2,
sd                816 drivers/media/usb/gspca/cpia1.c 			  sd->params.apcor.gain4,
sd                817 drivers/media/usb/gspca/cpia1.c 			  sd->params.apcor.gain8);
sd                822 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                824 drivers/media/usb/gspca/cpia1.c 			  sd->params.vlOffset.gain1,
sd                825 drivers/media/usb/gspca/cpia1.c 			  sd->params.vlOffset.gain2,
sd                826 drivers/media/usb/gspca/cpia1.c 			  sd->params.vlOffset.gain4,
sd                827 drivers/media/usb/gspca/cpia1.c 			  sd->params.vlOffset.gain8);
sd                832 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                836 drivers/media/usb/gspca/cpia1.c 				  sd->params.exposure.gainMode,
sd                838 drivers/media/usb/gspca/cpia1.c 				  sd->params.exposure.compMode,
sd                839 drivers/media/usb/gspca/cpia1.c 				  sd->params.exposure.centreWeight,
sd                840 drivers/media/usb/gspca/cpia1.c 				  sd->params.exposure.gain,
sd                841 drivers/media/usb/gspca/cpia1.c 				  sd->params.exposure.fineExp,
sd                842 drivers/media/usb/gspca/cpia1.c 				  sd->params.exposure.coarseExpLo,
sd                843 drivers/media/usb/gspca/cpia1.c 				  sd->params.exposure.coarseExpHi,
sd                844 drivers/media/usb/gspca/cpia1.c 				  sd->params.exposure.redComp,
sd                845 drivers/media/usb/gspca/cpia1.c 				  sd->params.exposure.green1Comp,
sd                846 drivers/media/usb/gspca/cpia1.c 				  sd->params.exposure.green2Comp,
sd                847 drivers/media/usb/gspca/cpia1.c 				  sd->params.exposure.blueComp);
sd                851 drivers/media/usb/gspca/cpia1.c 	if (sd->params.exposure.expMode != 1) {
sd                854 drivers/media/usb/gspca/cpia1.c 					  sd->params.exposure.expMode,
sd                856 drivers/media/usb/gspca/cpia1.c 					  sd->params.exposure.gain,
sd                857 drivers/media/usb/gspca/cpia1.c 					  sd->params.exposure.fineExp,
sd                858 drivers/media/usb/gspca/cpia1.c 					  sd->params.exposure.coarseExpLo,
sd                859 drivers/media/usb/gspca/cpia1.c 					  sd->params.exposure.coarseExpHi,
sd                868 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                870 drivers/media/usb/gspca/cpia1.c 	if (sd->params.colourBalance.balanceMode == 1) {
sd                875 drivers/media/usb/gspca/cpia1.c 				 sd->params.colourBalance.redGain,
sd                876 drivers/media/usb/gspca/cpia1.c 				 sd->params.colourBalance.greenGain,
sd                877 drivers/media/usb/gspca/cpia1.c 				 sd->params.colourBalance.blueGain);
sd                884 drivers/media/usb/gspca/cpia1.c 	if (sd->params.colourBalance.balanceMode == 2) {
sd                888 drivers/media/usb/gspca/cpia1.c 	if (sd->params.colourBalance.balanceMode == 3) {
sd                898 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                901 drivers/media/usb/gspca/cpia1.c 			  sd->params.compressionTarget.frTargeting,
sd                902 drivers/media/usb/gspca/cpia1.c 			  sd->params.compressionTarget.targetFR,
sd                903 drivers/media/usb/gspca/cpia1.c 			  sd->params.compressionTarget.targetQ, 0);
sd                908 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                911 drivers/media/usb/gspca/cpia1.c 			  sd->params.yuvThreshold.yThreshold,
sd                912 drivers/media/usb/gspca/cpia1.c 			  sd->params.yuvThreshold.uvThreshold, 0, 0);
sd                917 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                922 drivers/media/usb/gspca/cpia1.c 			    sd->params.compressionParams.hysteresis,
sd                923 drivers/media/usb/gspca/cpia1.c 			    sd->params.compressionParams.threshMax,
sd                924 drivers/media/usb/gspca/cpia1.c 			    sd->params.compressionParams.smallStep,
sd                925 drivers/media/usb/gspca/cpia1.c 			    sd->params.compressionParams.largeStep,
sd                926 drivers/media/usb/gspca/cpia1.c 			    sd->params.compressionParams.decimationHysteresis,
sd                927 drivers/media/usb/gspca/cpia1.c 			    sd->params.compressionParams.frDiffStepThresh,
sd                928 drivers/media/usb/gspca/cpia1.c 			    sd->params.compressionParams.qDiffStepThresh,
sd                929 drivers/media/usb/gspca/cpia1.c 			    sd->params.compressionParams.decimationThreshMod);
sd                934 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                937 drivers/media/usb/gspca/cpia1.c 			  sd->params.compression.mode,
sd                938 drivers/media/usb/gspca/cpia1.c 			  sd->params.compression.decimation, 0, 0);
sd                943 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                946 drivers/media/usb/gspca/cpia1.c 			  sd->params.sensorFps.divisor,
sd                947 drivers/media/usb/gspca/cpia1.c 			  sd->params.sensorFps.baserate, 0, 0);
sd                952 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                955 drivers/media/usb/gspca/cpia1.c 			  sd->params.flickerControl.flickerMode,
sd                956 drivers/media/usb/gspca/cpia1.c 			  sd->params.flickerControl.coarseJump,
sd                957 drivers/media/usb/gspca/cpia1.c 			  sd->params.flickerControl.allowableOverExposure,
sd                963 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                966 drivers/media/usb/gspca/cpia1.c 			  sd->params.ecpTiming, 0, 0, 0);
sd                976 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                979 drivers/media/usb/gspca/cpia1.c 			  0, sd->params.streamStartLine, 0, 0);
sd                984 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                987 drivers/media/usb/gspca/cpia1.c 	p1 = (sd->params.qx3.bottomlight == 0) << 1;
sd                988 drivers/media/usb/gspca/cpia1.c 	p2 = (sd->params.qx3.toplight == 0) << 3;
sd               1017 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1018 drivers/media/usb/gspca/cpia1.c 	int currentexp = sd->params.exposure.coarseExpLo +
sd               1019 drivers/media/usb/gspca/cpia1.c 			 sd->params.exposure.coarseExpHi * 256;
sd               1023 drivers/media/usb/gspca/cpia1.c 		int cj = sd->params.flickerControl.coarseJump;
sd               1024 drivers/media/usb/gspca/cpia1.c 		sd->params.flickerControl.flickerMode = 1;
sd               1025 drivers/media/usb/gspca/cpia1.c 		sd->params.flickerControl.disabled = 0;
sd               1026 drivers/media/usb/gspca/cpia1.c 		if (sd->params.exposure.expMode != 2) {
sd               1027 drivers/media/usb/gspca/cpia1.c 			sd->params.exposure.expMode = 2;
sd               1028 drivers/media/usb/gspca/cpia1.c 			sd->exposure_status = EXPOSURE_NORMAL;
sd               1030 drivers/media/usb/gspca/cpia1.c 		currentexp = currentexp << sd->params.exposure.gain;
sd               1031 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.gain = 0;
sd               1043 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.coarseExpLo = startexp & 0xff;
sd               1044 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.coarseExpHi = startexp >> 8;
sd               1048 drivers/media/usb/gspca/cpia1.c 			sd->params.exposure.redComp =
sd               1050 drivers/media/usb/gspca/cpia1.c 			sd->params.exposure.green1Comp =
sd               1052 drivers/media/usb/gspca/cpia1.c 			sd->params.exposure.green2Comp =
sd               1054 drivers/media/usb/gspca/cpia1.c 			sd->params.exposure.blueComp =
sd               1057 drivers/media/usb/gspca/cpia1.c 			sd->params.exposure.redComp = COMP_RED;
sd               1058 drivers/media/usb/gspca/cpia1.c 			sd->params.exposure.green1Comp = COMP_GREEN1;
sd               1059 drivers/media/usb/gspca/cpia1.c 			sd->params.exposure.green2Comp = COMP_GREEN2;
sd               1060 drivers/media/usb/gspca/cpia1.c 			sd->params.exposure.blueComp = COMP_BLUE;
sd               1063 drivers/media/usb/gspca/cpia1.c 			sd->params.exposure.compMode = 0;
sd               1065 drivers/media/usb/gspca/cpia1.c 			sd->params.exposure.compMode = 1;
sd               1067 drivers/media/usb/gspca/cpia1.c 		sd->params.apcor.gain1 = 0x18;
sd               1068 drivers/media/usb/gspca/cpia1.c 		sd->params.apcor.gain2 = 0x18;
sd               1069 drivers/media/usb/gspca/cpia1.c 		sd->params.apcor.gain4 = 0x16;
sd               1070 drivers/media/usb/gspca/cpia1.c 		sd->params.apcor.gain8 = 0x14;
sd               1072 drivers/media/usb/gspca/cpia1.c 		sd->params.flickerControl.flickerMode = 0;
sd               1073 drivers/media/usb/gspca/cpia1.c 		sd->params.flickerControl.disabled = 1;
sd               1076 drivers/media/usb/gspca/cpia1.c 				sd->params.exposure.redComp, currentexp);
sd               1078 drivers/media/usb/gspca/cpia1.c 				sd->params.exposure.green1Comp, currentexp);
sd               1080 drivers/media/usb/gspca/cpia1.c 				sd->params.exposure.green2Comp, currentexp);
sd               1082 drivers/media/usb/gspca/cpia1.c 				sd->params.exposure.blueComp, currentexp);
sd               1084 drivers/media/usb/gspca/cpia1.c 		while (startexp > MAX_EXP && sd->params.exposure.gain <
sd               1085 drivers/media/usb/gspca/cpia1.c 		       sd->params.exposure.gainMode - 1) {
sd               1087 drivers/media/usb/gspca/cpia1.c 			++sd->params.exposure.gain;
sd               1093 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.coarseExpLo = startexp & 0xff;
sd               1094 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.coarseExpHi = startexp >> 8;
sd               1095 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.redComp = COMP_RED;
sd               1096 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.green1Comp = COMP_GREEN1;
sd               1097 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.green2Comp = COMP_GREEN2;
sd               1098 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.blueComp = COMP_BLUE;
sd               1099 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.compMode = 1;
sd               1100 drivers/media/usb/gspca/cpia1.c 		sd->params.apcor.gain1 = 0x18;
sd               1101 drivers/media/usb/gspca/cpia1.c 		sd->params.apcor.gain2 = 0x16;
sd               1102 drivers/media/usb/gspca/cpia1.c 		sd->params.apcor.gain4 = 0x24;
sd               1103 drivers/media/usb/gspca/cpia1.c 		sd->params.apcor.gain8 = 0x34;
sd               1105 drivers/media/usb/gspca/cpia1.c 	sd->params.vlOffset.gain1 = 20;
sd               1106 drivers/media/usb/gspca/cpia1.c 	sd->params.vlOffset.gain2 = 24;
sd               1107 drivers/media/usb/gspca/cpia1.c 	sd->params.vlOffset.gain4 = 26;
sd               1108 drivers/media/usb/gspca/cpia1.c 	sd->params.vlOffset.gain8 = 26;
sd               1136 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1160 drivers/media/usb/gspca/cpia1.c 	light_exp = sd->params.colourParams.brightness +
sd               1164 drivers/media/usb/gspca/cpia1.c 	dark_exp = sd->params.colourParams.brightness +
sd               1170 drivers/media/usb/gspca/cpia1.c 	old_exposure = sd->params.exposure.coarseExpHi * 256 +
sd               1171 drivers/media/usb/gspca/cpia1.c 		       sd->params.exposure.coarseExpLo;
sd               1173 drivers/media/usb/gspca/cpia1.c 	if (!sd->params.flickerControl.disabled) {
sd               1182 drivers/media/usb/gspca/cpia1.c 				if (sd->exposure_status == EXPOSURE_VERY_DARK)
sd               1183 drivers/media/usb/gspca/cpia1.c 					++sd->exposure_count;
sd               1185 drivers/media/usb/gspca/cpia1.c 					sd->exposure_status =
sd               1187 drivers/media/usb/gspca/cpia1.c 					sd->exposure_count = 1;
sd               1191 drivers/media/usb/gspca/cpia1.c 				if (sd->exposure_status == EXPOSURE_DARK)
sd               1192 drivers/media/usb/gspca/cpia1.c 					++sd->exposure_count;
sd               1194 drivers/media/usb/gspca/cpia1.c 					sd->exposure_status = EXPOSURE_DARK;
sd               1195 drivers/media/usb/gspca/cpia1.c 					sd->exposure_count = 1;
sd               1202 drivers/media/usb/gspca/cpia1.c 				if (sd->exposure_status == EXPOSURE_VERY_LIGHT)
sd               1203 drivers/media/usb/gspca/cpia1.c 					++sd->exposure_count;
sd               1205 drivers/media/usb/gspca/cpia1.c 					sd->exposure_status =
sd               1207 drivers/media/usb/gspca/cpia1.c 					sd->exposure_count = 1;
sd               1211 drivers/media/usb/gspca/cpia1.c 				if (sd->exposure_status == EXPOSURE_LIGHT)
sd               1212 drivers/media/usb/gspca/cpia1.c 					++sd->exposure_count;
sd               1214 drivers/media/usb/gspca/cpia1.c 					sd->exposure_status = EXPOSURE_LIGHT;
sd               1215 drivers/media/usb/gspca/cpia1.c 					sd->exposure_count = 1;
sd               1220 drivers/media/usb/gspca/cpia1.c 			sd->exposure_status = EXPOSURE_NORMAL;
sd               1228 drivers/media/usb/gspca/cpia1.c 				if (sd->exposure_status == EXPOSURE_VERY_DARK)
sd               1229 drivers/media/usb/gspca/cpia1.c 					++sd->exposure_count;
sd               1231 drivers/media/usb/gspca/cpia1.c 					sd->exposure_status =
sd               1233 drivers/media/usb/gspca/cpia1.c 					sd->exposure_count = 1;
sd               1237 drivers/media/usb/gspca/cpia1.c 				if (sd->exposure_status == EXPOSURE_DARK)
sd               1238 drivers/media/usb/gspca/cpia1.c 					++sd->exposure_count;
sd               1240 drivers/media/usb/gspca/cpia1.c 					sd->exposure_status = EXPOSURE_DARK;
sd               1241 drivers/media/usb/gspca/cpia1.c 					sd->exposure_count = 1;
sd               1248 drivers/media/usb/gspca/cpia1.c 				if (sd->exposure_status == EXPOSURE_VERY_LIGHT)
sd               1249 drivers/media/usb/gspca/cpia1.c 					++sd->exposure_count;
sd               1251 drivers/media/usb/gspca/cpia1.c 					sd->exposure_status =
sd               1253 drivers/media/usb/gspca/cpia1.c 					sd->exposure_count = 1;
sd               1257 drivers/media/usb/gspca/cpia1.c 				if (sd->exposure_status == EXPOSURE_LIGHT)
sd               1258 drivers/media/usb/gspca/cpia1.c 					++sd->exposure_count;
sd               1260 drivers/media/usb/gspca/cpia1.c 					sd->exposure_status = EXPOSURE_LIGHT;
sd               1261 drivers/media/usb/gspca/cpia1.c 					sd->exposure_count = 1;
sd               1266 drivers/media/usb/gspca/cpia1.c 			sd->exposure_status = EXPOSURE_NORMAL;
sd               1270 drivers/media/usb/gspca/cpia1.c 	framerate = atomic_read(&sd->fps);
sd               1274 drivers/media/usb/gspca/cpia1.c 	if (!sd->params.flickerControl.disabled) {
sd               1276 drivers/media/usb/gspca/cpia1.c 		if ((sd->exposure_status == EXPOSURE_VERY_DARK ||
sd               1277 drivers/media/usb/gspca/cpia1.c 		     sd->exposure_status == EXPOSURE_DARK) &&
sd               1278 drivers/media/usb/gspca/cpia1.c 		    sd->exposure_count >= DARK_TIME * framerate &&
sd               1279 drivers/media/usb/gspca/cpia1.c 		    sd->params.sensorFps.divisor < 2) {
sd               1282 drivers/media/usb/gspca/cpia1.c 			++sd->params.sensorFps.divisor;
sd               1285 drivers/media/usb/gspca/cpia1.c 			sd->params.flickerControl.coarseJump =
sd               1286 drivers/media/usb/gspca/cpia1.c 				flicker_jumps[sd->mainsFreq]
sd               1287 drivers/media/usb/gspca/cpia1.c 					     [sd->params.sensorFps.baserate]
sd               1288 drivers/media/usb/gspca/cpia1.c 					     [sd->params.sensorFps.divisor];
sd               1291 drivers/media/usb/gspca/cpia1.c 			new_exposure = sd->params.flickerControl.coarseJump-1;
sd               1294 drivers/media/usb/gspca/cpia1.c 					sd->params.flickerControl.coarseJump;
sd               1295 drivers/media/usb/gspca/cpia1.c 			sd->params.exposure.coarseExpLo = new_exposure & 0xff;
sd               1296 drivers/media/usb/gspca/cpia1.c 			sd->params.exposure.coarseExpHi = new_exposure >> 8;
sd               1298 drivers/media/usb/gspca/cpia1.c 			sd->exposure_status = EXPOSURE_NORMAL;
sd               1301 drivers/media/usb/gspca/cpia1.c 		} else if ((sd->exposure_status == EXPOSURE_VERY_LIGHT ||
sd               1302 drivers/media/usb/gspca/cpia1.c 			    sd->exposure_status == EXPOSURE_LIGHT) &&
sd               1303 drivers/media/usb/gspca/cpia1.c 			   sd->exposure_count >= LIGHT_TIME * framerate &&
sd               1304 drivers/media/usb/gspca/cpia1.c 			   sd->params.sensorFps.divisor > 0) {
sd               1309 drivers/media/usb/gspca/cpia1.c 			--sd->params.sensorFps.divisor;
sd               1312 drivers/media/usb/gspca/cpia1.c 			sd->params.flickerControl.coarseJump =
sd               1313 drivers/media/usb/gspca/cpia1.c 				flicker_jumps[sd->mainsFreq]
sd               1314 drivers/media/usb/gspca/cpia1.c 					     [sd->params.sensorFps.baserate]
sd               1315 drivers/media/usb/gspca/cpia1.c 					     [sd->params.sensorFps.divisor];
sd               1318 drivers/media/usb/gspca/cpia1.c 			new_exposure = sd->params.flickerControl.coarseJump-1;
sd               1321 drivers/media/usb/gspca/cpia1.c 			       sd->params.flickerControl.coarseJump < max_exp)
sd               1323 drivers/media/usb/gspca/cpia1.c 					sd->params.flickerControl.coarseJump;
sd               1324 drivers/media/usb/gspca/cpia1.c 			sd->params.exposure.coarseExpLo = new_exposure & 0xff;
sd               1325 drivers/media/usb/gspca/cpia1.c 			sd->params.exposure.coarseExpHi = new_exposure >> 8;
sd               1327 drivers/media/usb/gspca/cpia1.c 			sd->exposure_status = EXPOSURE_NORMAL;
sd               1332 drivers/media/usb/gspca/cpia1.c 		if ((sd->exposure_status == EXPOSURE_VERY_DARK ||
sd               1333 drivers/media/usb/gspca/cpia1.c 		     sd->exposure_status == EXPOSURE_DARK) &&
sd               1334 drivers/media/usb/gspca/cpia1.c 		    sd->exposure_count >= DARK_TIME * framerate &&
sd               1335 drivers/media/usb/gspca/cpia1.c 		    sd->params.sensorFps.divisor < 2) {
sd               1338 drivers/media/usb/gspca/cpia1.c 			++sd->params.sensorFps.divisor;
sd               1341 drivers/media/usb/gspca/cpia1.c 			if (sd->params.exposure.gain > 0) {
sd               1342 drivers/media/usb/gspca/cpia1.c 				--sd->params.exposure.gain;
sd               1345 drivers/media/usb/gspca/cpia1.c 			sd->exposure_status = EXPOSURE_NORMAL;
sd               1348 drivers/media/usb/gspca/cpia1.c 		} else if ((sd->exposure_status == EXPOSURE_VERY_LIGHT ||
sd               1349 drivers/media/usb/gspca/cpia1.c 			    sd->exposure_status == EXPOSURE_LIGHT) &&
sd               1350 drivers/media/usb/gspca/cpia1.c 			   sd->exposure_count >= LIGHT_TIME * framerate &&
sd               1351 drivers/media/usb/gspca/cpia1.c 			   sd->params.sensorFps.divisor > 0) {
sd               1354 drivers/media/usb/gspca/cpia1.c 			--sd->params.sensorFps.divisor;
sd               1357 drivers/media/usb/gspca/cpia1.c 			if (sd->params.exposure.gain <
sd               1358 drivers/media/usb/gspca/cpia1.c 			    sd->params.exposure.gainMode - 1) {
sd               1359 drivers/media/usb/gspca/cpia1.c 				++sd->params.exposure.gain;
sd               1362 drivers/media/usb/gspca/cpia1.c 			sd->exposure_status = EXPOSURE_NORMAL;
sd               1387 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1393 drivers/media/usb/gspca/cpia1.c 	cam_exposure = atomic_read(&sd->cam_exposure);
sd               1395 drivers/media/usb/gspca/cpia1.c 	if (sd->params.flickerControl.flickerMode == 0 ||
sd               1399 drivers/media/usb/gspca/cpia1.c 	old_exp = sd->params.exposure.coarseExpLo +
sd               1400 drivers/media/usb/gspca/cpia1.c 		  sd->params.exposure.coarseExpHi*256;
sd               1405 drivers/media/usb/gspca/cpia1.c 	cam_exposure %= sd->params.flickerControl.coarseJump;
sd               1406 drivers/media/usb/gspca/cpia1.c 	if (!sd->params.flickerControl.disabled &&
sd               1407 drivers/media/usb/gspca/cpia1.c 	    cam_exposure <= sd->params.flickerControl.coarseJump - 3) {
sd               1409 drivers/media/usb/gspca/cpia1.c 		sd->params.flickerControl.disabled = 1;
sd               1412 drivers/media/usb/gspca/cpia1.c 	if (sd->params.flickerControl.disabled &&
sd               1413 drivers/media/usb/gspca/cpia1.c 	    old_exp > sd->params.flickerControl.coarseJump +
sd               1425 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1429 drivers/media/usb/gspca/cpia1.c 	sd->mainsFreq = FREQ_DEF == V4L2_CID_POWER_LINE_FREQUENCY_60HZ;
sd               1444 drivers/media/usb/gspca/cpia1.c 	sd->params.version.firmwareVersion = 0;
sd               1446 drivers/media/usb/gspca/cpia1.c 	if (sd->params.version.firmwareVersion != 1) {
sd               1448 drivers/media/usb/gspca/cpia1.c 			  sd->params.version.firmwareVersion);
sd               1453 drivers/media/usb/gspca/cpia1.c 	if (sd->params.version.firmwareRevision <= 2 &&
sd               1454 drivers/media/usb/gspca/cpia1.c 	    sd->params.exposure.gainMode > 2) {
sd               1455 drivers/media/usb/gspca/cpia1.c 		sd->params.exposure.gainMode = 2;
sd               1459 drivers/media/usb/gspca/cpia1.c 	sd->params.qx3.qx3_detected = (sd->params.pnpID.vendor == 0x0813 &&
sd               1460 drivers/media/usb/gspca/cpia1.c 				       sd->params.pnpID.product == 0x0001);
sd               1467 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1472 drivers/media/usb/gspca/cpia1.c 		if (sd->params.status.systemState != WARM_BOOT_STATE) {
sd               1474 drivers/media/usb/gspca/cpia1.c 				  sd->params.status.systemState);
sd               1475 drivers/media/usb/gspca/cpia1.c 			printstatus(gspca_dev, &sd->params);
sd               1497 drivers/media/usb/gspca/cpia1.c 	sd->params.version.firmwareVersion = 0;
sd               1520 drivers/media/usb/gspca/cpia1.c 	if (sd->params.status.fatalError) {
sd               1522 drivers/media/usb/gspca/cpia1.c 			  sd->params.status.fatalError,
sd               1523 drivers/media/usb/gspca/cpia1.c 			  sd->params.status.vpStatus);
sd               1534 drivers/media/usb/gspca/cpia1.c 	sd->params.streamStartLine = 120;
sd               1538 drivers/media/usb/gspca/cpia1.c 		sd->params.roi.colStart = 2;
sd               1539 drivers/media/usb/gspca/cpia1.c 		sd->params.roi.rowStart = 6;
sd               1541 drivers/media/usb/gspca/cpia1.c 		sd->params.roi.colStart = 0;
sd               1542 drivers/media/usb/gspca/cpia1.c 		sd->params.roi.rowStart = 0;
sd               1546 drivers/media/usb/gspca/cpia1.c 		sd->params.format.videoSize = VIDEOSIZE_QCIF;
sd               1547 drivers/media/usb/gspca/cpia1.c 		sd->params.roi.colStart /= 2;
sd               1548 drivers/media/usb/gspca/cpia1.c 		sd->params.roi.rowStart /= 2;
sd               1549 drivers/media/usb/gspca/cpia1.c 		sd->params.streamStartLine /= 2;
sd               1551 drivers/media/usb/gspca/cpia1.c 		sd->params.format.videoSize = VIDEOSIZE_CIF;
sd               1553 drivers/media/usb/gspca/cpia1.c 	sd->params.roi.colEnd = sd->params.roi.colStart +
sd               1555 drivers/media/usb/gspca/cpia1.c 	sd->params.roi.rowEnd = sd->params.roi.rowStart +
sd               1614 drivers/media/usb/gspca/cpia1.c 	sd->first_frame = 6;
sd               1615 drivers/media/usb/gspca/cpia1.c 	sd->exposure_status = EXPOSURE_NORMAL;
sd               1616 drivers/media/usb/gspca/cpia1.c 	sd->exposure_count = 0;
sd               1617 drivers/media/usb/gspca/cpia1.c 	atomic_set(&sd->cam_exposure, 0);
sd               1618 drivers/media/usb/gspca/cpia1.c 	atomic_set(&sd->fps, 0);
sd               1625 drivers/media/usb/gspca/cpia1.c 	struct sd *sd __maybe_unused = (struct sd *) gspca_dev;
sd               1640 drivers/media/usb/gspca/cpia1.c 	if (sd->params.qx3.button) {
sd               1653 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1665 drivers/media/usb/gspca/cpia1.c 	if (sd->params.qx3.qx3_detected)
sd               1671 drivers/media/usb/gspca/cpia1.c 		  sd->params.version.firmwareVersion,
sd               1672 drivers/media/usb/gspca/cpia1.c 		  sd->params.version.firmwareRevision,
sd               1673 drivers/media/usb/gspca/cpia1.c 		  sd->params.version.vcVersion,
sd               1674 drivers/media/usb/gspca/cpia1.c 		  sd->params.version.vcRevision);
sd               1676 drivers/media/usb/gspca/cpia1.c 		  sd->params.pnpID.vendor, sd->params.pnpID.product,
sd               1677 drivers/media/usb/gspca/cpia1.c 		  sd->params.pnpID.deviceRevision);
sd               1679 drivers/media/usb/gspca/cpia1.c 		  sd->params.vpVersion.vpVersion,
sd               1680 drivers/media/usb/gspca/cpia1.c 		  sd->params.vpVersion.vpRevision,
sd               1681 drivers/media/usb/gspca/cpia1.c 		  sd->params.vpVersion.cameraHeadID);
sd               1690 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1695 drivers/media/usb/gspca/cpia1.c 	    data[16] == sd->params.format.videoSize &&
sd               1696 drivers/media/usb/gspca/cpia1.c 	    data[17] == sd->params.format.subSample &&
sd               1697 drivers/media/usb/gspca/cpia1.c 	    data[18] == sd->params.format.yuvOrder &&
sd               1698 drivers/media/usb/gspca/cpia1.c 	    data[24] == sd->params.roi.colStart &&
sd               1699 drivers/media/usb/gspca/cpia1.c 	    data[25] == sd->params.roi.colEnd &&
sd               1700 drivers/media/usb/gspca/cpia1.c 	    data[26] == sd->params.roi.rowStart &&
sd               1701 drivers/media/usb/gspca/cpia1.c 	    data[27] == sd->params.roi.rowEnd) {
sd               1704 drivers/media/usb/gspca/cpia1.c 		atomic_set(&sd->cam_exposure, data[39] * 2);
sd               1705 drivers/media/usb/gspca/cpia1.c 		atomic_set(&sd->fps, data[41]);
sd               1727 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1731 drivers/media/usb/gspca/cpia1.c 	if (sd->first_frame) {
sd               1732 drivers/media/usb/gspca/cpia1.c 		sd->first_frame--;
sd               1733 drivers/media/usb/gspca/cpia1.c 		if (sd->first_frame == 0)
sd               1742 drivers/media/usb/gspca/cpia1.c 	if (sd->params.exposure.expMode == 2)
sd               1754 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               1763 drivers/media/usb/gspca/cpia1.c 		sd->params.colourParams.brightness = ctrl->val;
sd               1764 drivers/media/usb/gspca/cpia1.c 		sd->params.flickerControl.allowableOverExposure =
sd               1765 drivers/media/usb/gspca/cpia1.c 			find_over_exposure(sd->params.colourParams.brightness);
sd               1771 drivers/media/usb/gspca/cpia1.c 		sd->params.colourParams.contrast = ctrl->val;
sd               1775 drivers/media/usb/gspca/cpia1.c 		sd->params.colourParams.saturation = ctrl->val;
sd               1779 drivers/media/usb/gspca/cpia1.c 		sd->mainsFreq = ctrl->val == V4L2_CID_POWER_LINE_FREQUENCY_60HZ;
sd               1780 drivers/media/usb/gspca/cpia1.c 		sd->params.flickerControl.coarseJump =
sd               1781 drivers/media/usb/gspca/cpia1.c 			flicker_jumps[sd->mainsFreq]
sd               1782 drivers/media/usb/gspca/cpia1.c 			[sd->params.sensorFps.baserate]
sd               1783 drivers/media/usb/gspca/cpia1.c 			[sd->params.sensorFps.divisor];
sd               1790 drivers/media/usb/gspca/cpia1.c 		sd->params.qx3.bottomlight = ctrl->val;
sd               1794 drivers/media/usb/gspca/cpia1.c 		sd->params.qx3.toplight = ctrl->val;
sd               1798 drivers/media/usb/gspca/cpia1.c 		sd->params.compressionTarget.frTargeting = ctrl->val;
sd               1811 drivers/media/usb/gspca/cpia1.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               1836 drivers/media/usb/gspca/cpia1.c 	sd->freq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
sd               1840 drivers/media/usb/gspca/cpia1.c 	if (sd->params.qx3.qx3_detected) {
sd               1884 drivers/media/usb/gspca/cpia1.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                192 drivers/media/usb/gspca/dtcs033.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                202 drivers/media/usb/gspca/dtcs033.c 				ctrl->val, sd->gain->val);
sd                206 drivers/media/usb/gspca/dtcs033.c 				sd->exposure->val, ctrl->val);
sd                219 drivers/media/usb/gspca/dtcs033.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                224 drivers/media/usb/gspca/dtcs033.c 	sd->exposure = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                227 drivers/media/usb/gspca/dtcs033.c 	sd->gain     = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                236 drivers/media/usb/gspca/dtcs033.c 	v4l2_ctrl_cluster(2, &sd->exposure);
sd                264 drivers/media/usb/gspca/dtcs033.c 			&sd_desc, sizeof(struct sd),
sd                398 drivers/media/usb/gspca/etoms.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                407 drivers/media/usb/gspca/etoms.c 	if (sd->sensor == SENSOR_PAS106) {
sd                415 drivers/media/usb/gspca/etoms.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                417 drivers/media/usb/gspca/etoms.c 	if (sd->sensor == SENSOR_PAS106) {
sd                427 drivers/media/usb/gspca/etoms.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                429 drivers/media/usb/gspca/etoms.c 	if (sd->autogain)
sd                430 drivers/media/usb/gspca/etoms.c 		sd->ag_cnt = AG_CNT_START;
sd                432 drivers/media/usb/gspca/etoms.c 		sd->ag_cnt = -1;
sd                539 drivers/media/usb/gspca/etoms.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                543 drivers/media/usb/gspca/etoms.c 	sd->sensor = id->driver_info;
sd                544 drivers/media/usb/gspca/etoms.c 	if (sd->sensor == SENSOR_PAS106) {
sd                551 drivers/media/usb/gspca/etoms.c 	sd->ag_cnt = -1;
sd                558 drivers/media/usb/gspca/etoms.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                560 drivers/media/usb/gspca/etoms.c 	if (sd->sensor == SENSOR_PAS106)
sd                572 drivers/media/usb/gspca/etoms.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                574 drivers/media/usb/gspca/etoms.c 	if (sd->sensor == SENSOR_PAS106)
sd                593 drivers/media/usb/gspca/etoms.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                595 drivers/media/usb/gspca/etoms.c 	if (sd->sensor == SENSOR_PAS106) {
sd                606 drivers/media/usb/gspca/etoms.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                608 drivers/media/usb/gspca/etoms.c 	if (sd->sensor == SENSOR_PAS106) {
sd                623 drivers/media/usb/gspca/etoms.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                631 drivers/media/usb/gspca/etoms.c 	if (sd->ag_cnt < 0)
sd                633 drivers/media/usb/gspca/etoms.c 	if (--sd->ag_cnt >= 0)
sd                635 drivers/media/usb/gspca/etoms.c 	sd->ag_cnt = AG_CNT_START;
sd                689 drivers/media/usb/gspca/etoms.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                707 drivers/media/usb/gspca/etoms.c 		sd->autogain = ctrl->val;
sd                720 drivers/media/usb/gspca/etoms.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                729 drivers/media/usb/gspca/etoms.c 	if (sd->sensor == SENSOR_PAS106)
sd                766 drivers/media/usb/gspca/etoms.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                175 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                177 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vcur.backlight  =  0;
sd                178 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vcur.brightness =  0;
sd                179 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vcur.sharpness  =  6;
sd                180 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vcur.contrast   = 10;
sd                181 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vcur.gamma      = 20;
sd                182 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vcur.hue        =  0;
sd                183 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vcur.saturation =  6;
sd                184 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vcur.whitebal   =  0;
sd                185 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vcur.mirror     = 0;
sd                186 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vcur.flip       = 0;
sd                187 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vcur.AC50Hz     = 1;
sd                189 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vmax.backlight  =  2;
sd                190 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vmax.brightness =  8;
sd                191 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vmax.sharpness  =  7;
sd                192 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vmax.contrast   =  0; /* 10 but not working with this driver */
sd                193 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vmax.gamma      = 40;
sd                194 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vmax.hue        =  5 + 1;
sd                195 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vmax.saturation =  8;
sd                196 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vmax.whitebal   =  2;
sd                197 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vmax.mirror     = 1;
sd                198 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vmax.flip       = 1;
sd                199 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vmax.AC50Hz     = 1;
sd                201 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->dev_camera_settings = mi1320_camera_settings;
sd                202 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->dev_init_at_startup = mi1320_init_at_startup;
sd                203 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->dev_configure_alt   = mi1320_configure_alt;
sd                204 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->dev_init_pre_alt    = mi1320_init_pre_alt;
sd                205 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->dev_post_unset_alt  = mi1320_post_unset_alt;
sd                250 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                252 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->mirrorMask = 0;
sd                254 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vold.backlight  = -1;
sd                255 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vold.brightness = -1;
sd                256 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vold.sharpness  = -1;
sd                257 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vold.contrast   = -1;
sd                258 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vold.saturation = -1;
sd                259 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vold.gamma    = -1;
sd                260 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vold.hue      = -1;
sd                261 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vold.whitebal = -1;
sd                262 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vold.mirror   = -1;
sd                263 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vold.flip     = -1;
sd                264 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	sd->vold.AC50Hz   = -1;
sd                338 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                340 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	s32 backlight = sd->vcur.backlight;
sd                341 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	s32 bright = sd->vcur.brightness;
sd                342 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	s32 sharp  = sd->vcur.sharpness;
sd                343 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	s32 cntr   = sd->vcur.contrast;
sd                344 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	s32 gam	   = sd->vcur.gamma;
sd                345 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	s32 hue    = sd->vcur.hue;
sd                346 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	s32 sat	   = sd->vcur.saturation;
sd                347 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	s32 wbal   = sd->vcur.whitebal;
sd                348 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	s32 mirror = (((sd->vcur.mirror > 0) ^ sd->mirrorMask) > 0);
sd                349 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	s32 flip   = (((sd->vcur.flip   > 0) ^ sd->mirrorMask) > 0);
sd                350 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	s32 freq   = (sd->vcur.AC50Hz > 0);
sd                353 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	if (freq != sd->vold.AC50Hz) {
sd                354 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		sd->vold.AC50Hz = freq;
sd                363 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	if (wbal != sd->vold.whitebal) {
sd                364 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		sd->vold.whitebal = wbal;
sd                365 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		if (wbal < 0 || wbal > sd->vmax.whitebal)
sd                404 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	if (bright != sd->vold.brightness) {
sd                405 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		sd->vold.brightness = bright;
sd                406 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		if (bright < 0 || bright > sd->vmax.brightness)
sd                416 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	if (sat != sd->vold.saturation) {
sd                417 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		sd->vold.saturation = sat;
sd                418 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		if (sat < 0 || sat > sd->vmax.saturation)
sd                428 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	if (sharp != sd->vold.sharpness) {
sd                429 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		sd->vold.sharpness = sharp;
sd                430 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		if (sharp < 0 || sharp > sd->vmax.sharpness)
sd                439 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	if (hue != sd->vold.hue) {
sd                441 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		if (hue < 0 || hue > sd->vmax.hue)
sd                443 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		if (hue == sd->vmax.hue)
sd                444 drivers/media/usb/gspca/gl860/gl860-mi1320.c 			sd->swapRB = 1;
sd                446 drivers/media/usb/gspca/gl860/gl860-mi1320.c 			sd->swapRB = 0;
sd                455 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	if (backlight != sd->vold.backlight) {
sd                456 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		sd->vold.backlight = backlight;
sd                457 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		if (backlight < 0 || backlight > sd->vmax.backlight)
sd                470 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	if (hue != sd->vold.hue) {
sd                471 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		sd->vold.hue = hue;
sd                480 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	if (mirror != sd->vold.mirror || flip != sd->vold.flip) {
sd                482 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		sd->vold.mirror = mirror;
sd                483 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		sd->vold.flip = flip;
sd                490 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	if (gam != sd->vold.gamma) {
sd                491 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		sd->vold.gamma = gam;
sd                492 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		if (gam < 0 || gam > sd->vmax.gamma)
sd                502 drivers/media/usb/gspca/gl860/gl860-mi1320.c 	if (cntr != sd->vold.contrast) {
sd                503 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		sd->vold.contrast = cntr;
sd                504 drivers/media/usb/gspca/gl860/gl860-mi1320.c 		if (cntr < 0 || cntr > sd->vmax.contrast)
sd                353 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                355 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vcur.backlight  =  0;
sd                356 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vcur.brightness = 70;
sd                357 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vcur.sharpness  = 20;
sd                358 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vcur.contrast   =  0;
sd                359 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vcur.gamma      =  0;
sd                360 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vcur.hue        =  0;
sd                361 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vcur.saturation = 60;
sd                362 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vcur.whitebal   =  0; /* 50, not done by hardware */
sd                363 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vcur.mirror = 0;
sd                364 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vcur.flip   = 0;
sd                365 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vcur.AC50Hz = 1;
sd                367 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vmax.backlight  =  64;
sd                368 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vmax.brightness = 128;
sd                369 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vmax.sharpness  =  40;
sd                370 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vmax.contrast   =   3;
sd                371 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vmax.gamma      =   2;
sd                372 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vmax.hue        =   0 + 1; /* 200, not done by hardware */
sd                373 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vmax.saturation =   0;     /* 100, not done by hardware */
sd                374 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vmax.whitebal   =   2;     /* 100, not done by hardware */
sd                375 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vmax.mirror = 1;
sd                376 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vmax.flip   = 1;
sd                377 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vmax.AC50Hz = 1;
sd                379 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->dev_camera_settings = mi2020_camera_settings;
sd                380 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->dev_init_at_startup = mi2020_init_at_startup;
sd                381 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->dev_configure_alt   = mi2020_configure_alt;
sd                382 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->dev_init_pre_alt    = mi2020_init_pre_alt;
sd                383 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->dev_post_unset_alt  = mi2020_post_unset_alt;
sd                420 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                422 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->mirrorMask =  0;
sd                423 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vold.hue   = -1;
sd                426 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vold.brightness = -1;
sd                427 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vold.sharpness  = -1;
sd                430 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vold.contrast  = 0;
sd                431 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vold.gamma     = 0;
sd                432 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vold.backlight = 0;
sd                441 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                444 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	s32 mirror = (((sd->vcur.mirror > 0) ^ sd->mirrorMask) > 0);
sd                445 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	s32 flip   = (((sd->vcur.flip   > 0) ^ sd->mirrorMask) > 0);
sd                446 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	s32 freq   = (sd->vcur.AC50Hz  > 0);
sd                447 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	s32 wbal   = sd->vcur.whitebal;
sd                459 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->nbIm = -1;
sd                591 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->nbIm = 0;
sd                593 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vold.mirror    = mirror;
sd                594 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vold.flip      = flip;
sd                595 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vold.AC50Hz    = freq;
sd                596 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->vold.whitebal  = wbal;
sd                623 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                626 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	s32 backlight = sd->vcur.backlight;
sd                627 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	s32 bright =  sd->vcur.brightness;
sd                628 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	s32 sharp  =  sd->vcur.sharpness;
sd                629 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	s32 cntr   =  sd->vcur.contrast;
sd                630 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	s32 gam	   =  sd->vcur.gamma;
sd                631 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	s32 hue    = (sd->vcur.hue > 0);
sd                632 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	s32 mirror = (((sd->vcur.mirror > 0) ^ sd->mirrorMask) > 0);
sd                633 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	s32 flip   = (((sd->vcur.flip   > 0) ^ sd->mirrorMask) > 0);
sd                634 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	s32 freq   = (sd->vcur.AC50Hz > 0);
sd                635 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	s32 wbal   = sd->vcur.whitebal;
sd                649 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	if (sd->nbIm < 4) {
sd                650 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		sd->waitSet = 1;
sd                653 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	sd->waitSet = 0;
sd                655 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	if (freq != sd->vold.AC50Hz) {
sd                656 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		sd->vold.AC50Hz = freq;
sd                664 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	if (wbal != sd->vold.whitebal) {
sd                665 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		sd->vold.whitebal = wbal;
sd                666 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		if (wbal < 0 || wbal > sd->vmax.whitebal)
sd                691 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	if (mirror != sd->vold.mirror || flip != sd->vold.flip) {
sd                692 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		sd->vold.mirror = mirror;
sd                693 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		sd->vold.flip   = flip;
sd                720 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	if (bright != sd->vold.brightness) {
sd                721 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		sd->vold.brightness = bright;
sd                722 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		if (bright < 0 || bright > sd->vmax.brightness)
sd                734 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	if (cntr != sd->vold.contrast || gam != sd->vold.gamma) {
sd                735 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		sd->vold.contrast = cntr;
sd                736 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		if (cntr < 0 || cntr > sd->vmax.contrast)
sd                738 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		sd->vold.gamma = gam;
sd                739 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		if (gam < 0 || gam > sd->vmax.gamma)
sd                755 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	if (backlight != sd->vold.backlight) {
sd                756 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		sd->vold.backlight = backlight;
sd                757 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		if (backlight < 0 || backlight > sd->vmax.backlight)
sd                771 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	if (sharp != sd->vold.sharpness) {
sd                772 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		sd->vold.sharpness = sharp;
sd                773 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		if (sharp < 0 || sharp > sd->vmax.sharpness)
sd                780 drivers/media/usb/gspca/gl860/gl860-mi2020.c 	if (hue != sd->vold.hue) {
sd                781 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		sd->swapRB = hue;
sd                782 drivers/media/usb/gspca/gl860/gl860-mi2020.c 		sd->vold.hue = hue;
sd                173 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                175 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vcur.backlight  =  32;
sd                176 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vcur.brightness =   0;
sd                177 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vcur.sharpness  =   6;
sd                178 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vcur.contrast   =   0;
sd                179 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vcur.gamma      =  32;
sd                180 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vcur.hue        =   0;
sd                181 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vcur.saturation = 128;
sd                182 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vcur.whitebal   =  64;
sd                183 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vcur.mirror     =   0;
sd                184 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vcur.flip       =   0;
sd                186 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vmax.backlight  =  64;
sd                187 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vmax.brightness = 255;
sd                188 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vmax.sharpness  =  31;
sd                189 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vmax.contrast   = 255;
sd                190 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vmax.gamma      =  64;
sd                191 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vmax.hue        = 254 + 2;
sd                192 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vmax.saturation = 255;
sd                193 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vmax.whitebal   = 128;
sd                194 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vmax.mirror     = 1;
sd                195 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vmax.flip       = 1;
sd                196 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vmax.AC50Hz     = 0;
sd                198 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->dev_camera_settings = ov2640_camera_settings;
sd                199 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->dev_init_at_startup = ov2640_init_at_startup;
sd                200 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->dev_configure_alt   = ov2640_configure_alt;
sd                201 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->dev_init_pre_alt    = ov2640_init_pre_alt;
sd                202 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->dev_post_unset_alt  = ov2640_post_unset_alt;
sd                235 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                237 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->mirrorMask = 0;
sd                239 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vold.backlight  = -1;
sd                240 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vold.brightness = -1;
sd                241 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vold.sharpness  = -1;
sd                242 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vold.contrast   = -1;
sd                243 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vold.saturation = -1;
sd                244 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vold.gamma    = -1;
sd                245 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vold.hue      = -1;
sd                246 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vold.whitebal = -1;
sd                247 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vold.mirror = -1;
sd                248 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	sd->vold.flip   = -1;
sd                337 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                339 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	s32 backlight = sd->vcur.backlight;
sd                340 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	s32 bright = sd->vcur.brightness;
sd                341 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	s32 sharp  = sd->vcur.sharpness;
sd                342 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	s32 gam    = sd->vcur.gamma;
sd                343 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	s32 cntr   = sd->vcur.contrast;
sd                344 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	s32 sat    = sd->vcur.saturation;
sd                345 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	s32 hue    = sd->vcur.hue;
sd                346 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	s32 wbal   = sd->vcur.whitebal;
sd                347 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	s32 mirror = (((sd->vcur.mirror > 0) ^ sd->mirrorMask) == 0);
sd                348 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	s32 flip   = (((sd->vcur.flip   > 0) ^ sd->mirrorMask) == 0);
sd                350 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	if (backlight != sd->vold.backlight) {
sd                352 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		if (backlight < 0 || backlight > sd->vmax.backlight)
sd                363 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	if (bright != sd->vold.brightness) {
sd                364 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		sd->vold.brightness = bright;
sd                365 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		if (bright < 0 || bright > sd->vmax.brightness)
sd                373 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	if (wbal != sd->vold.whitebal) {
sd                374 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		sd->vold.whitebal = wbal;
sd                375 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		if (wbal < 0 || wbal > sd->vmax.whitebal)
sd                383 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	if (cntr != sd->vold.contrast) {
sd                384 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		sd->vold.contrast = cntr;
sd                385 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		if (cntr < 0 || cntr > sd->vmax.contrast)
sd                393 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	if (sat != sd->vold.saturation) {
sd                394 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		sd->vold.saturation = sat;
sd                395 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		if (sat < 0 || sat > sd->vmax.saturation)
sd                403 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	if (sharp != sd->vold.sharpness) {
sd                404 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		sd->vold.sharpness = sharp;
sd                405 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		if (sharp < 0 || sharp > sd->vmax.sharpness)
sd                413 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	if (hue != sd->vold.hue) {
sd                414 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		sd->vold.hue = hue;
sd                415 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		if (hue < 0 || hue > sd->vmax.hue)
sd                423 drivers/media/usb/gspca/gl860/gl860-ov2640.c 			sd->swapRB = 1;
sd                425 drivers/media/usb/gspca/gl860/gl860-ov2640.c 			sd->swapRB = 0;
sd                428 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	if (gam != sd->vold.gamma) {
sd                429 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		sd->vold.gamma = gam;
sd                430 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		if (gam < 0 || gam > sd->vmax.gamma)
sd                438 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	if (mirror != sd->vold.mirror || flip != sd->vold.flip) {
sd                439 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		sd->vold.mirror = mirror;
sd                440 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		sd->vold.flip   = flip;
sd                457 drivers/media/usb/gspca/gl860/gl860-ov2640.c 	if (backlight != sd->vold.backlight) {
sd                458 drivers/media/usb/gspca/gl860/gl860-ov2640.c 		sd->vold.backlight = backlight;
sd                143 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                145 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vcur.backlight  =   0;
sd                146 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vcur.brightness = 128;
sd                147 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vcur.sharpness  =   0;
sd                148 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vcur.contrast   =   0;
sd                149 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vcur.gamma      =   0;
sd                150 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vcur.hue        =   0;
sd                151 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vcur.saturation =   0;
sd                152 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vcur.whitebal   =   0;
sd                154 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vmax.backlight  =   0;
sd                155 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vmax.brightness = 255;
sd                156 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vmax.sharpness  =   0;
sd                157 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vmax.contrast   =   0;
sd                158 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vmax.gamma      =   0;
sd                159 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vmax.hue        =   0 + 1;
sd                160 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vmax.saturation =   0;
sd                161 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vmax.whitebal   =   0;
sd                162 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vmax.mirror     = 0;
sd                163 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vmax.flip       = 0;
sd                164 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vmax.AC50Hz     = 0;
sd                166 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->dev_camera_settings = ov9655_camera_settings;
sd                167 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->dev_init_at_startup = ov9655_init_at_startup;
sd                168 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->dev_configure_alt   = ov9655_configure_alt;
sd                169 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->dev_init_pre_alt    = ov9655_init_pre_alt;
sd                170 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->dev_post_unset_alt  = ov9655_post_unset_alt;
sd                187 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                189 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vold.brightness = -1;
sd                190 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	sd->vold.hue = -1;
sd                296 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                300 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	s32 bright = sd->vcur.brightness;
sd                301 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	s32 hue    = sd->vcur.hue;
sd                303 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	if (bright != sd->vold.brightness) {
sd                304 drivers/media/usb/gspca/gl860/gl860-ov9655.c 		sd->vold.brightness = bright;
sd                305 drivers/media/usb/gspca/gl860/gl860-ov9655.c 		if (bright < 0 || bright > sd->vmax.brightness)
sd                312 drivers/media/usb/gspca/gl860/gl860-ov9655.c 	if (hue != sd->vold.hue) {
sd                313 drivers/media/usb/gspca/gl860/gl860-ov9655.c 		sd->vold.hue = hue;
sd                314 drivers/media/usb/gspca/gl860/gl860-ov9655.c 		sd->swapRB = (hue != 0);
sd                 53 drivers/media/usb/gspca/gl860/gl860.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                 57 drivers/media/usb/gspca/gl860/gl860.c 		sd->vcur.brightness = ctrl->val;
sd                 60 drivers/media/usb/gspca/gl860/gl860.c 		sd->vcur.contrast = ctrl->val;
sd                 63 drivers/media/usb/gspca/gl860/gl860.c 		sd->vcur.saturation = ctrl->val;
sd                 66 drivers/media/usb/gspca/gl860/gl860.c 		sd->vcur.hue = ctrl->val;
sd                 69 drivers/media/usb/gspca/gl860/gl860.c 		sd->vcur.gamma = ctrl->val;
sd                 72 drivers/media/usb/gspca/gl860/gl860.c 		sd->vcur.mirror = ctrl->val;
sd                 75 drivers/media/usb/gspca/gl860/gl860.c 		sd->vcur.flip = ctrl->val;
sd                 78 drivers/media/usb/gspca/gl860/gl860.c 		sd->vcur.AC50Hz = ctrl->val;
sd                 81 drivers/media/usb/gspca/gl860/gl860.c 		sd->vcur.whitebal = ctrl->val;
sd                 84 drivers/media/usb/gspca/gl860/gl860.c 		sd->vcur.sharpness = ctrl->val;
sd                 87 drivers/media/usb/gspca/gl860/gl860.c 		sd->vcur.backlight = ctrl->val;
sd                 94 drivers/media/usb/gspca/gl860/gl860.c 		sd->waitSet = 1;
sd                105 drivers/media/usb/gspca/gl860/gl860.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                111 drivers/media/usb/gspca/gl860/gl860.c 	if (sd->vmax.brightness)
sd                113 drivers/media/usb/gspca/gl860/gl860.c 				  0, sd->vmax.brightness, 1,
sd                114 drivers/media/usb/gspca/gl860/gl860.c 				  sd->vcur.brightness);
sd                116 drivers/media/usb/gspca/gl860/gl860.c 	if (sd->vmax.contrast)
sd                118 drivers/media/usb/gspca/gl860/gl860.c 				  0, sd->vmax.contrast, 1,
sd                119 drivers/media/usb/gspca/gl860/gl860.c 				  sd->vcur.contrast);
sd                121 drivers/media/usb/gspca/gl860/gl860.c 	if (sd->vmax.saturation)
sd                123 drivers/media/usb/gspca/gl860/gl860.c 				  0, sd->vmax.saturation, 1,
sd                124 drivers/media/usb/gspca/gl860/gl860.c 				  sd->vcur.saturation);
sd                126 drivers/media/usb/gspca/gl860/gl860.c 	if (sd->vmax.hue)
sd                128 drivers/media/usb/gspca/gl860/gl860.c 				  0, sd->vmax.hue, 1, sd->vcur.hue);
sd                130 drivers/media/usb/gspca/gl860/gl860.c 	if (sd->vmax.gamma)
sd                132 drivers/media/usb/gspca/gl860/gl860.c 				  0, sd->vmax.gamma, 1, sd->vcur.gamma);
sd                134 drivers/media/usb/gspca/gl860/gl860.c 	if (sd->vmax.mirror)
sd                136 drivers/media/usb/gspca/gl860/gl860.c 				  0, sd->vmax.mirror, 1, sd->vcur.mirror);
sd                138 drivers/media/usb/gspca/gl860/gl860.c 	if (sd->vmax.flip)
sd                140 drivers/media/usb/gspca/gl860/gl860.c 				  0, sd->vmax.flip, 1, sd->vcur.flip);
sd                142 drivers/media/usb/gspca/gl860/gl860.c 	if (sd->vmax.AC50Hz)
sd                145 drivers/media/usb/gspca/gl860/gl860.c 				  sd->vmax.AC50Hz, 0, sd->vcur.AC50Hz);
sd                147 drivers/media/usb/gspca/gl860/gl860.c 	if (sd->vmax.whitebal)
sd                150 drivers/media/usb/gspca/gl860/gl860.c 				  0, sd->vmax.whitebal, 1, sd->vcur.whitebal);
sd                152 drivers/media/usb/gspca/gl860/gl860.c 	if (sd->vmax.sharpness)
sd                154 drivers/media/usb/gspca/gl860/gl860.c 				  0, sd->vmax.sharpness, 1,
sd                155 drivers/media/usb/gspca/gl860/gl860.c 				  sd->vcur.sharpness);
sd                157 drivers/media/usb/gspca/gl860/gl860.c 	if (sd->vmax.backlight)
sd                160 drivers/media/usb/gspca/gl860/gl860.c 				  0, sd->vmax.backlight, 1,
sd                161 drivers/media/usb/gspca/gl860/gl860.c 				  sd->vcur.backlight);
sd                319 drivers/media/usb/gspca/gl860/gl860.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                327 drivers/media/usb/gspca/gl860/gl860.c 	sd->nbRightUp = 1;
sd                328 drivers/media/usb/gspca/gl860/gl860.c 	sd->nbIm = -1;
sd                330 drivers/media/usb/gspca/gl860/gl860.c 	sd->sensor = 0xff;
sd                332 drivers/media/usb/gspca/gl860/gl860.c 		sd->sensor = ID_MI1320;
sd                334 drivers/media/usb/gspca/gl860/gl860.c 		sd->sensor = ID_OV2640;
sd                336 drivers/media/usb/gspca/gl860/gl860.c 		sd->sensor = ID_OV9655;
sd                338 drivers/media/usb/gspca/gl860/gl860.c 		sd->sensor = ID_MI2020;
sd                346 drivers/media/usb/gspca/gl860/gl860.c 	switch (sd->sensor) {
sd                378 drivers/media/usb/gspca/gl860/gl860.c 		((struct sd *) gspca_dev)->vcur.AC50Hz = AC50Hz;
sd                386 drivers/media/usb/gspca/gl860/gl860.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                388 drivers/media/usb/gspca/gl860/gl860.c 	return sd->dev_init_at_startup(gspca_dev);
sd                394 drivers/media/usb/gspca/gl860/gl860.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                396 drivers/media/usb/gspca/gl860/gl860.c 	return sd->dev_configure_alt(gspca_dev);
sd                402 drivers/media/usb/gspca/gl860/gl860.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                404 drivers/media/usb/gspca/gl860/gl860.c 	return sd->dev_init_pre_alt(gspca_dev);
sd                410 drivers/media/usb/gspca/gl860/gl860.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                412 drivers/media/usb/gspca/gl860/gl860.c 	if (!sd->gspca_dev.present)
sd                415 drivers/media/usb/gspca/gl860/gl860.c 	return sd->dev_post_unset_alt(gspca_dev);
sd                422 drivers/media/usb/gspca/gl860/gl860.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                427 drivers/media/usb/gspca/gl860/gl860.c 		sd->swapRB * (gspca_dev->cam.cam_mode[mode].bytesperline + 1);
sd                434 drivers/media/usb/gspca/gl860/gl860.c 		if (sd->nbIm >= 0 && sd->nbIm < 10)
sd                435 drivers/media/usb/gspca/gl860/gl860.c 			sd->nbIm++;
sd                461 drivers/media/usb/gspca/gl860/gl860.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                474 drivers/media/usb/gspca/gl860/gl860.c 		if (upsideDown && sd->nbRightUp > -4) {
sd                475 drivers/media/usb/gspca/gl860/gl860.c 			if (sd->nbRightUp > 0)
sd                476 drivers/media/usb/gspca/gl860/gl860.c 				sd->nbRightUp = 0;
sd                477 drivers/media/usb/gspca/gl860/gl860.c 			if (sd->nbRightUp == -3) {
sd                478 drivers/media/usb/gspca/gl860/gl860.c 				sd->mirrorMask = 1;
sd                479 drivers/media/usb/gspca/gl860/gl860.c 				sd->waitSet = 1;
sd                481 drivers/media/usb/gspca/gl860/gl860.c 			sd->nbRightUp--;
sd                483 drivers/media/usb/gspca/gl860/gl860.c 		if (!upsideDown && sd->nbRightUp < 4) {
sd                484 drivers/media/usb/gspca/gl860/gl860.c 			if (sd->nbRightUp  < 0)
sd                485 drivers/media/usb/gspca/gl860/gl860.c 				sd->nbRightUp = 0;
sd                486 drivers/media/usb/gspca/gl860/gl860.c 			if (sd->nbRightUp == 3) {
sd                487 drivers/media/usb/gspca/gl860/gl860.c 				sd->mirrorMask = 0;
sd                488 drivers/media/usb/gspca/gl860/gl860.c 				sd->waitSet = 1;
sd                490 drivers/media/usb/gspca/gl860/gl860.c 			sd->nbRightUp++;
sd                494 drivers/media/usb/gspca/gl860/gl860.c 	if (sd->waitSet)
sd                495 drivers/media/usb/gspca/gl860/gl860.c 		sd->dev_camera_settings(gspca_dev);
sd                512 drivers/media/usb/gspca/gl860/gl860.c 			&sd_desc_mi1320, sizeof(struct sd), THIS_MODULE);
sd                627 drivers/media/usb/gspca/gl860/gl860.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                631 drivers/media/usb/gspca/gl860/gl860.c 		sd->sensor = ID_MI1320;
sd                633 drivers/media/usb/gspca/gl860/gl860.c 	if (sd->sensor == 0xff) {
sd                688 drivers/media/usb/gspca/gl860/gl860.c 					sd->sensor = ID_OV2640;
sd                696 drivers/media/usb/gspca/gl860/gl860.c 					sd->sensor = ID_OV9655;
sd                712 drivers/media/usb/gspca/gl860/gl860.c 			sd->sensor = ID_MI2020;
sd                 23 drivers/media/usb/gspca/gl860/gl860.h #define _MI1320_  (((struct sd *) gspca_dev)->sensor == ID_MI1320)
sd                 24 drivers/media/usb/gspca/gl860/gl860.h #define _MI2020_  (((struct sd *) gspca_dev)->sensor == ID_MI2020)
sd                 25 drivers/media/usb/gspca/gl860/gl860.h #define _OV2640_  (((struct sd *) gspca_dev)->sensor == ID_OV2640)
sd                 26 drivers/media/usb/gspca/gl860/gl860.h #define _OV9655_  (((struct sd *) gspca_dev)->sensor == ID_OV9655)
sd                208 drivers/media/usb/gspca/jeilinj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                236 drivers/media/usb/gspca/jeilinj.c 	sd->blocks_left = 0;
sd                240 drivers/media/usb/gspca/jeilinj.c 	if (sd->type == SPORTSCAM_DV15)
sd                252 drivers/media/usb/gspca/jeilinj.c 	setcamquality(gspca_dev, v4l2_ctrl_g_ctrl(sd->jpegqual));
sd                254 drivers/media/usb/gspca/jeilinj.c 	setfreq(gspca_dev, v4l2_ctrl_g_ctrl(sd->freq));
sd                263 drivers/media/usb/gspca/jeilinj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                276 drivers/media/usb/gspca/jeilinj.c 		sd->blocks_left = data[0x0a] - 1;
sd                278 drivers/media/usb/gspca/jeilinj.c 			  sd->blocks_left);
sd                281 drivers/media/usb/gspca/jeilinj.c 				sd->jpeg_hdr, JPEG_HDR_SZ);
sd                286 drivers/media/usb/gspca/jeilinj.c 	} else if (sd->blocks_left > 0) {
sd                288 drivers/media/usb/gspca/jeilinj.c 			  sd->blocks_left);
sd                289 drivers/media/usb/gspca/jeilinj.c 		sd->blocks_left -= 1;
sd                290 drivers/media/usb/gspca/jeilinj.c 		if (sd->blocks_left == 0)
sd                309 drivers/media/usb/gspca/jeilinj.c 	struct sd *dev  = (struct sd *) gspca_dev;
sd                366 drivers/media/usb/gspca/jeilinj.c 	struct sd *dev = (struct sd *) gspca_dev;
sd                392 drivers/media/usb/gspca/jeilinj.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                416 drivers/media/usb/gspca/jeilinj.c 		jpeg_set_qual(sd->jpeg_hdr, ctrl->val);
sd                429 drivers/media/usb/gspca/jeilinj.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                443 drivers/media/usb/gspca/jeilinj.c 	sd->freq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
sd                454 drivers/media/usb/gspca/jeilinj.c 	sd->jpegqual = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                468 drivers/media/usb/gspca/jeilinj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                470 drivers/media/usb/gspca/jeilinj.c 	v4l2_ctrl_s_ctrl(sd->jpegqual, jcomp->quality);
sd                477 drivers/media/usb/gspca/jeilinj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                480 drivers/media/usb/gspca/jeilinj.c 	jcomp->quality = v4l2_ctrl_g_ctrl(sd->jpegqual);
sd                521 drivers/media/usb/gspca/jeilinj.c 			sizeof(struct sd),
sd                166 drivers/media/usb/gspca/jl2005bcd.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                183 drivers/media/usb/gspca/jl2005bcd.c 		sd->firmware_id[i] = gspca_dev->usb_buf[0];
sd                186 drivers/media/usb/gspca/jl2005bcd.c 		  sd->firmware_id[0],
sd                187 drivers/media/usb/gspca/jl2005bcd.c 		  sd->firmware_id[1],
sd                188 drivers/media/usb/gspca/jl2005bcd.c 		  sd->firmware_id[2],
sd                189 drivers/media/usb/gspca/jl2005bcd.c 		  sd->firmware_id[3],
sd                190 drivers/media/usb/gspca/jl2005bcd.c 		  sd->firmware_id[4],
sd                191 drivers/media/usb/gspca/jl2005bcd.c 		  sd->firmware_id[5]);
sd                304 drivers/media/usb/gspca/jl2005bcd.c 	struct sd *dev = container_of(work, struct sd, work_struct);
sd                397 drivers/media/usb/gspca/jl2005bcd.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                417 drivers/media/usb/gspca/jl2005bcd.c 	if ((sd->firmware_id[0] & 0xf0) == 0x40) {
sd                420 drivers/media/usb/gspca/jl2005bcd.c 		sd->block_size	= 0x80;
sd                424 drivers/media/usb/gspca/jl2005bcd.c 		sd->block_size	= 0x200;
sd                427 drivers/media/usb/gspca/jl2005bcd.c 	INIT_WORK(&sd->work_struct, jl2005c_dostream);
sd                441 drivers/media/usb/gspca/jl2005bcd.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                442 drivers/media/usb/gspca/jl2005bcd.c 	sd->cap_mode = gspca_dev->cam.cam_mode;
sd                466 drivers/media/usb/gspca/jl2005bcd.c 	schedule_work(&sd->work_struct);
sd                475 drivers/media/usb/gspca/jl2005bcd.c 	struct sd *dev = (struct sd *) gspca_dev;
sd                506 drivers/media/usb/gspca/jl2005bcd.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                123 drivers/media/usb/gspca/kinect.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                126 drivers/media/usb/gspca/kinect.c 	uint8_t *obuf = sd->obuf;
sd                127 drivers/media/usb/gspca/kinect.c 	uint8_t *ibuf = sd->ibuf;
sd                139 drivers/media/usb/gspca/kinect.c 	chdr->tag = cpu_to_le16(sd->cam_tag);
sd                147 drivers/media/usb/gspca/kinect.c 		  sd->cam_tag, cmd_len, res);
sd                193 drivers/media/usb/gspca/kinect.c 	sd->cam_tag++;
sd                223 drivers/media/usb/gspca/kinect.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                226 drivers/media/usb/gspca/kinect.c 	sd->cam_tag = 0;
sd                228 drivers/media/usb/gspca/kinect.c 	sd->stream_flag = 0x80;
sd                249 drivers/media/usb/gspca/kinect.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                252 drivers/media/usb/gspca/kinect.c 	sd->cam_tag = 0;
sd                254 drivers/media/usb/gspca/kinect.c 	sd->stream_flag = 0x70;
sd                381 drivers/media/usb/gspca/kinect.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                387 drivers/media/usb/gspca/kinect.c 	uint8_t sof = sd->stream_flag | 1;
sd                388 drivers/media/usb/gspca/kinect.c 	uint8_t mof = sd->stream_flag | 2;
sd                389 drivers/media/usb/gspca/kinect.c 	uint8_t eof = sd->stream_flag | 5;
sd                396 drivers/media/usb/gspca/kinect.c 			sd->stream_flag, hdr->magic[0], hdr->magic[1]);
sd                453 drivers/media/usb/gspca/kinect.c 				       sizeof(struct sd), THIS_MODULE);
sd                456 drivers/media/usb/gspca/kinect.c 				       sizeof(struct sd), THIS_MODULE);
sd                170 drivers/media/usb/gspca/konica.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                176 drivers/media/usb/gspca/konica.c 	intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
sd                177 drivers/media/usb/gspca/konica.c 	alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt);
sd                239 drivers/media/usb/gspca/konica.c 	struct sd *sd __maybe_unused = (struct sd *) gspca_dev;
sd                245 drivers/media/usb/gspca/konica.c 	if (sd->snapshot_pressed) {
sd                248 drivers/media/usb/gspca/konica.c 		sd->snapshot_pressed = 0;
sd                257 drivers/media/usb/gspca/konica.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                282 drivers/media/usb/gspca/konica.c 		sd->last_data_urb = urb;
sd                287 drivers/media/usb/gspca/konica.c 	data_urb   = sd->last_data_urb;
sd                288 drivers/media/usb/gspca/konica.c 	sd->last_data_urb = NULL;
sd                341 drivers/media/usb/gspca/konica.c 			if (sd->snapshot_pressed != button_state) {
sd                346 drivers/media/usb/gspca/konica.c 				sd->snapshot_pressed = button_state;
sd                462 drivers/media/usb/gspca/konica.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                150 drivers/media/usb/gspca/m5602/m5602_bridge.h 	struct sd *sd, const u8 address, u8 *i2c_data);
sd                153 drivers/media/usb/gspca/m5602/m5602_bridge.h 	struct sd *sd, const u8 address, const u8 i2c_data);
sd                155 drivers/media/usb/gspca/m5602/m5602_bridge.h int m5602_write_sensor(struct sd *sd, const u8 address,
sd                158 drivers/media/usb/gspca/m5602/m5602_bridge.h int m5602_read_sensor(struct sd *sd, const u8 address,
sd                 52 drivers/media/usb/gspca/m5602/m5602_core.c int m5602_read_bridge(struct sd *sd, const u8 address, u8 *i2c_data)
sd                 55 drivers/media/usb/gspca/m5602/m5602_core.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *) sd;
sd                 56 drivers/media/usb/gspca/m5602/m5602_core.c 	struct usb_device *udev = sd->gspca_dev.dev;
sd                 57 drivers/media/usb/gspca/m5602/m5602_core.c 	__u8 *buf = sd->gspca_dev.usb_buf;
sd                 74 drivers/media/usb/gspca/m5602/m5602_core.c int m5602_write_bridge(struct sd *sd, const u8 address, const u8 i2c_data)
sd                 77 drivers/media/usb/gspca/m5602/m5602_core.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *) sd;
sd                 78 drivers/media/usb/gspca/m5602/m5602_core.c 	struct usb_device *udev = sd->gspca_dev.dev;
sd                 79 drivers/media/usb/gspca/m5602/m5602_core.c 	__u8 *buf = sd->gspca_dev.usb_buf;
sd                 99 drivers/media/usb/gspca/m5602/m5602_core.c static int m5602_wait_for_i2c(struct sd *sd)
sd                105 drivers/media/usb/gspca/m5602/m5602_core.c 		err = m5602_read_bridge(sd, M5602_XB_I2C_STATUS, &data);
sd                110 drivers/media/usb/gspca/m5602/m5602_core.c int m5602_read_sensor(struct sd *sd, const u8 address,
sd                114 drivers/media/usb/gspca/m5602/m5602_core.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *) sd;
sd                116 drivers/media/usb/gspca/m5602/m5602_core.c 	if (!len || len > sd->sensor->i2c_regW)
sd                119 drivers/media/usb/gspca/m5602/m5602_core.c 	err = m5602_wait_for_i2c(sd);
sd                123 drivers/media/usb/gspca/m5602/m5602_core.c 	err = m5602_write_bridge(sd, M5602_XB_I2C_DEV_ADDR,
sd                124 drivers/media/usb/gspca/m5602/m5602_core.c 				 sd->sensor->i2c_slave_id);
sd                128 drivers/media/usb/gspca/m5602/m5602_core.c 	err = m5602_write_bridge(sd, M5602_XB_I2C_REG_ADDR, address);
sd                136 drivers/media/usb/gspca/m5602/m5602_core.c 	if (sd->sensor->i2c_regW == 1) {
sd                137 drivers/media/usb/gspca/m5602/m5602_core.c 		err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 1);
sd                141 drivers/media/usb/gspca/m5602/m5602_core.c 		err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 0x08);
sd                143 drivers/media/usb/gspca/m5602/m5602_core.c 		err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 0x18 + len);
sd                147 drivers/media/usb/gspca/m5602/m5602_core.c 		err = m5602_wait_for_i2c(sd);
sd                151 drivers/media/usb/gspca/m5602/m5602_core.c 		err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i]));
sd                159 drivers/media/usb/gspca/m5602/m5602_core.c int m5602_write_sensor(struct sd *sd, const u8 address,
sd                164 drivers/media/usb/gspca/m5602/m5602_core.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *) sd;
sd                165 drivers/media/usb/gspca/m5602/m5602_core.c 	struct usb_device *udev = sd->gspca_dev.dev;
sd                166 drivers/media/usb/gspca/m5602/m5602_core.c 	__u8 *buf = sd->gspca_dev.usb_buf;
sd                169 drivers/media/usb/gspca/m5602/m5602_core.c 	if (len > sd->sensor->i2c_regW || !len)
sd                175 drivers/media/usb/gspca/m5602/m5602_core.c 	buf[11] = sd->sensor->i2c_slave_id;
sd                206 drivers/media/usb/gspca/m5602/m5602_core.c static void m5602_dump_bridge(struct sd *sd)
sd                211 drivers/media/usb/gspca/m5602/m5602_core.c 		m5602_read_bridge(sd, i, &val);
sd                217 drivers/media/usb/gspca/m5602/m5602_core.c static int m5602_probe_sensor(struct sd *sd)
sd                220 drivers/media/usb/gspca/m5602/m5602_core.c 	sd->sensor = &po1030;
sd                221 drivers/media/usb/gspca/m5602/m5602_core.c 	if (!sd->sensor->probe(sd))
sd                225 drivers/media/usb/gspca/m5602/m5602_core.c 	sd->sensor = &mt9m111;
sd                226 drivers/media/usb/gspca/m5602/m5602_core.c 	if (!sd->sensor->probe(sd))
sd                230 drivers/media/usb/gspca/m5602/m5602_core.c 	sd->sensor = &s5k4aa;
sd                231 drivers/media/usb/gspca/m5602/m5602_core.c 	if (!sd->sensor->probe(sd))
sd                235 drivers/media/usb/gspca/m5602/m5602_core.c 	sd->sensor = &ov9650;
sd                236 drivers/media/usb/gspca/m5602/m5602_core.c 	if (!sd->sensor->probe(sd))
sd                240 drivers/media/usb/gspca/m5602/m5602_core.c 	sd->sensor = &ov7660;
sd                241 drivers/media/usb/gspca/m5602/m5602_core.c 	if (!sd->sensor->probe(sd))
sd                245 drivers/media/usb/gspca/m5602/m5602_core.c 	sd->sensor = &s5k83a;
sd                246 drivers/media/usb/gspca/m5602/m5602_core.c 	if (!sd->sensor->probe(sd))
sd                251 drivers/media/usb/gspca/m5602/m5602_core.c 	sd->sensor = NULL;
sd                260 drivers/media/usb/gspca/m5602/m5602_core.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                265 drivers/media/usb/gspca/m5602/m5602_core.c 	err = sd->sensor->init(sd);
sd                272 drivers/media/usb/gspca/m5602/m5602_core.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                274 drivers/media/usb/gspca/m5602/m5602_core.c 	if (!sd->sensor->init_controls)
sd                277 drivers/media/usb/gspca/m5602/m5602_core.c 	return sd->sensor->init_controls(sd);
sd                282 drivers/media/usb/gspca/m5602/m5602_core.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                283 drivers/media/usb/gspca/m5602/m5602_core.c 	__u8 *buf = sd->gspca_dev.usb_buf;
sd                289 drivers/media/usb/gspca/m5602/m5602_core.c 	if (sd->sensor->start)
sd                290 drivers/media/usb/gspca/m5602/m5602_core.c 		sd->sensor->start(sd);
sd                305 drivers/media/usb/gspca/m5602/m5602_core.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                314 drivers/media/usb/gspca/m5602/m5602_core.c 	    data[2] != sd->frame_id) {
sd                316 drivers/media/usb/gspca/m5602/m5602_core.c 		sd->frame_id = data[2];
sd                325 drivers/media/usb/gspca/m5602/m5602_core.c 		sd->frame_count++;
sd                331 drivers/media/usb/gspca/m5602/m5602_core.c 			  sd->frame_count);
sd                343 drivers/media/usb/gspca/m5602/m5602_core.c 				  sd->frame_count, len);
sd                357 drivers/media/usb/gspca/m5602/m5602_core.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                360 drivers/media/usb/gspca/m5602/m5602_core.c 	if (sd->sensor->stop)
sd                361 drivers/media/usb/gspca/m5602/m5602_core.c 		sd->sensor->stop(sd);
sd                379 drivers/media/usb/gspca/m5602/m5602_core.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                386 drivers/media/usb/gspca/m5602/m5602_core.c 		m5602_dump_bridge(sd);
sd                389 drivers/media/usb/gspca/m5602/m5602_core.c 	err = m5602_probe_sensor(sd);
sd                406 drivers/media/usb/gspca/m5602/m5602_core.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                413 drivers/media/usb/gspca/m5602/m5602_core.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                415 drivers/media/usb/gspca/m5602/m5602_core.c 	if (sd->sensor->disconnect)
sd                416 drivers/media/usb/gspca/m5602/m5602_core.c 		sd->sensor->disconnect(sd);
sd                 20 drivers/media/usb/gspca/m5602/m5602_mt9m111.c static void mt9m111_dump_registers(struct sd *sd);
sd                195 drivers/media/usb/gspca/m5602/m5602_mt9m111.c int mt9m111_probe(struct sd *sd)
sd                199 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                216 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 			rc |= m5602_write_bridge(sd,
sd                222 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 			rc |= m5602_write_sensor(sd,
sd                229 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	if (m5602_read_sensor(sd, MT9M111_SC_CHIPVER, data, 2))
sd                240 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	sd->gspca_dev.cam.cam_mode = mt9m111_modes;
sd                241 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	sd->gspca_dev.cam.nmodes = ARRAY_SIZE(mt9m111_modes);
sd                246 drivers/media/usb/gspca/m5602/m5602_mt9m111.c int mt9m111_init(struct sd *sd)
sd                255 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 			err = m5602_write_bridge(sd,
sd                261 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 			err = m5602_write_sensor(sd,
sd                267 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 		mt9m111_dump_registers(sd);
sd                272 drivers/media/usb/gspca/m5602/m5602_mt9m111.c int mt9m111_init_controls(struct sd *sd)
sd                274 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
sd                276 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	sd->gspca_dev.vdev.ctrl_handler = hdl;
sd                279 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	sd->auto_white_bal = v4l2_ctrl_new_std(hdl, &mt9m111_ctrl_ops,
sd                282 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	sd->green_bal = v4l2_ctrl_new_custom(hdl, &mt9m111_greenbal_cfg, NULL);
sd                283 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	sd->red_bal = v4l2_ctrl_new_std(hdl, &mt9m111_ctrl_ops,
sd                286 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	sd->blue_bal = v4l2_ctrl_new_std(hdl, &mt9m111_ctrl_ops,
sd                294 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	sd->hflip = v4l2_ctrl_new_std(hdl, &mt9m111_ctrl_ops, V4L2_CID_HFLIP,
sd                296 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	sd->vflip = v4l2_ctrl_new_std(hdl, &mt9m111_ctrl_ops, V4L2_CID_VFLIP,
sd                304 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	v4l2_ctrl_auto_cluster(4, &sd->auto_white_bal, 0, false);
sd                305 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	v4l2_ctrl_cluster(2, &sd->hflip);
sd                310 drivers/media/usb/gspca/m5602/m5602_mt9m111.c int mt9m111_start(struct sd *sd)
sd                314 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	struct cam *cam = &sd->gspca_dev.cam;
sd                315 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                317 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	int width = cam->cam_mode[sd->gspca_dev.curr_mode].width - 1;
sd                318 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	int height = cam->cam_mode[sd->gspca_dev.curr_mode].height;
sd                322 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 			err = m5602_write_bridge(sd,
sd                328 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 			err = m5602_write_sensor(sd,
sd                335 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height >> 8) & 0xff);
sd                339 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height & 0xff));
sd                344 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 		err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0);
sd                348 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0);
sd                352 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 2);
sd                357 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 		err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, 0);
sd                361 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA,
sd                366 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, width & 0xff);
sd                370 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0);
sd                386 drivers/media/usb/gspca/m5602/m5602_mt9m111.c void mt9m111_disconnect(struct sd *sd)
sd                388 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	sd->sensor = NULL;
sd                395 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                400 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 		  sd->hflip->val, sd->vflip->val);
sd                403 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	hflip = !sd->hflip->val;
sd                404 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	vflip = !sd->vflip->val;
sd                407 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	err = m5602_write_sensor(sd, MT9M111_PAGE_MAP, data, 2);
sd                421 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	err = m5602_write_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B,
sd                429 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                433 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	err = m5602_read_sensor(sd, MT9M111_CP_OPERATING_MODE_CTL, data, 2);
sd                439 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	err = m5602_write_sensor(sd, MT9M111_CP_OPERATING_MODE_CTL, data, 2);
sd                449 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                452 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	err = m5602_write_sensor(sd, MT9M111_PAGE_MAP, data, 2);
sd                477 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	err = m5602_write_sensor(sd, MT9M111_SC_GLOBAL_GAIN,
sd                487 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                493 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	err = m5602_write_sensor(sd, MT9M111_SC_GREEN_1_GAIN,
sd                498 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	return m5602_write_sensor(sd, MT9M111_SC_GREEN_2_GAIN,
sd                505 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                512 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	return m5602_write_sensor(sd, MT9M111_SC_BLUE_GAIN,
sd                519 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                526 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	return m5602_write_sensor(sd, MT9M111_SC_RED_GAIN,
sd                534 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                545 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 		err = mt9m111_set_green_balance(gspca_dev, sd->green_bal->val);
sd                548 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 		err = mt9m111_set_red_balance(gspca_dev, sd->red_bal->val);
sd                551 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 		err = mt9m111_set_blue_balance(gspca_dev, sd->blue_bal->val);
sd                566 drivers/media/usb/gspca/m5602/m5602_mt9m111.c static void mt9m111_dump_registers(struct sd *sd)
sd                574 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	m5602_write_sensor(sd, MT9M111_PAGE_MAP, value, 2);
sd                576 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 		m5602_read_sensor(sd, address, value, 2);
sd                583 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	m5602_write_sensor(sd, MT9M111_PAGE_MAP, value, 2);
sd                585 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 		m5602_read_sensor(sd, address, value, 2);
sd                592 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 	m5602_write_sensor(sd, MT9M111_PAGE_MAP, value, 2);
sd                594 drivers/media/usb/gspca/m5602/m5602_mt9m111.c 		m5602_read_sensor(sd, address, value, 2);
sd                107 drivers/media/usb/gspca/m5602/m5602_mt9m111.h int mt9m111_probe(struct sd *sd);
sd                108 drivers/media/usb/gspca/m5602/m5602_mt9m111.h int mt9m111_init(struct sd *sd);
sd                109 drivers/media/usb/gspca/m5602/m5602_mt9m111.h int mt9m111_init_controls(struct sd *sd);
sd                110 drivers/media/usb/gspca/m5602/m5602_mt9m111.h int mt9m111_start(struct sd *sd);
sd                111 drivers/media/usb/gspca/m5602/m5602_mt9m111.h void mt9m111_disconnect(struct sd *sd);
sd                 20 drivers/media/usb/gspca/m5602/m5602_ov7660.c static void ov7660_dump_registers(struct sd *sd);
sd                193 drivers/media/usb/gspca/m5602/m5602_ov7660.c int ov7660_probe(struct sd *sd)
sd                213 drivers/media/usb/gspca/m5602/m5602_ov7660.c 			err = m5602_write_bridge(sd,
sd                218 drivers/media/usb/gspca/m5602/m5602_ov7660.c 			err = m5602_write_sensor(sd,
sd                225 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	if (m5602_read_sensor(sd, OV7660_PID, &prod_id, 1))
sd                228 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	if (m5602_read_sensor(sd, OV7660_VER, &ver_id, 1))
sd                240 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	sd->gspca_dev.cam.cam_mode = ov7660_modes;
sd                241 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	sd->gspca_dev.cam.nmodes = ARRAY_SIZE(ov7660_modes);
sd                246 drivers/media/usb/gspca/m5602/m5602_ov7660.c int ov7660_init(struct sd *sd)
sd                255 drivers/media/usb/gspca/m5602/m5602_ov7660.c 			err = m5602_write_bridge(sd,
sd                260 drivers/media/usb/gspca/m5602/m5602_ov7660.c 			err = m5602_write_sensor(sd,
sd                268 drivers/media/usb/gspca/m5602/m5602_ov7660.c 		ov7660_dump_registers(sd);
sd                273 drivers/media/usb/gspca/m5602/m5602_ov7660.c int ov7660_init_controls(struct sd *sd)
sd                275 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
sd                277 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	sd->gspca_dev.vdev.ctrl_handler = hdl;
sd                285 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	sd->autogain = v4l2_ctrl_new_std(hdl, &ov7660_ctrl_ops,
sd                287 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	sd->gain = v4l2_ctrl_new_std(hdl, &ov7660_ctrl_ops, V4L2_CID_GAIN, 0,
sd                290 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	sd->hflip = v4l2_ctrl_new_std(hdl, &ov7660_ctrl_ops, V4L2_CID_HFLIP,
sd                292 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	sd->vflip = v4l2_ctrl_new_std(hdl, &ov7660_ctrl_ops, V4L2_CID_VFLIP,
sd                300 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	v4l2_ctrl_auto_cluster(2, &sd->autogain, 0, false);
sd                301 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	v4l2_ctrl_cluster(2, &sd->hflip);
sd                306 drivers/media/usb/gspca/m5602/m5602_ov7660.c int ov7660_start(struct sd *sd)
sd                311 drivers/media/usb/gspca/m5602/m5602_ov7660.c int ov7660_stop(struct sd *sd)
sd                316 drivers/media/usb/gspca/m5602/m5602_ov7660.c void ov7660_disconnect(struct sd *sd)
sd                318 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	ov7660_stop(sd);
sd                320 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	sd->sensor = NULL;
sd                327 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                331 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	err = m5602_write_sensor(sd, OV7660_GAIN, &i2c_data, 1);
sd                340 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                344 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	err = m5602_read_sensor(sd, OV7660_COM8, &i2c_data, 1);
sd                349 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	err = m5602_write_sensor(sd, OV7660_COM8, &i2c_data, 1);
sd                358 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                362 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	err = m5602_read_sensor(sd, OV7660_COM8, &i2c_data, 1);
sd                368 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	return m5602_write_sensor(sd, OV7660_COM8, &i2c_data, 1);
sd                376 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                380 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	err = m5602_read_sensor(sd, OV7660_COM8, &i2c_data, 1);
sd                387 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	return m5602_write_sensor(sd, OV7660_COM8, &i2c_data, 1);
sd                394 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                397 drivers/media/usb/gspca/m5602/m5602_ov7660.c 		  sd->hflip->val, sd->vflip->val);
sd                399 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	i2c_data = (sd->hflip->val << 5) | (sd->vflip->val << 4);
sd                401 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	err = m5602_write_sensor(sd, OV7660_MVFP, &i2c_data, 1);
sd                410 drivers/media/usb/gspca/m5602/m5602_ov7660.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                427 drivers/media/usb/gspca/m5602/m5602_ov7660.c 		err = ov7660_set_gain(gspca_dev, sd->gain->val);
sd                439 drivers/media/usb/gspca/m5602/m5602_ov7660.c static void ov7660_dump_registers(struct sd *sd)
sd                445 drivers/media/usb/gspca/m5602/m5602_ov7660.c 		m5602_read_sensor(sd, address, &value, 1);
sd                456 drivers/media/usb/gspca/m5602/m5602_ov7660.c 		m5602_read_sensor(sd, address, &old_value, 1);
sd                457 drivers/media/usb/gspca/m5602/m5602_ov7660.c 		m5602_write_sensor(sd, address, test_value, 1);
sd                458 drivers/media/usb/gspca/m5602/m5602_ov7660.c 		m5602_read_sensor(sd, address, &ctrl_value, 1);
sd                466 drivers/media/usb/gspca/m5602/m5602_ov7660.c 		m5602_write_sensor(sd, address, &old_value, 1);
sd                 87 drivers/media/usb/gspca/m5602/m5602_ov7660.h int ov7660_probe(struct sd *sd);
sd                 88 drivers/media/usb/gspca/m5602/m5602_ov7660.h int ov7660_init(struct sd *sd);
sd                 89 drivers/media/usb/gspca/m5602/m5602_ov7660.h int ov7660_init(struct sd *sd);
sd                 90 drivers/media/usb/gspca/m5602/m5602_ov7660.h int ov7660_init_controls(struct sd *sd);
sd                 91 drivers/media/usb/gspca/m5602/m5602_ov7660.h int ov7660_start(struct sd *sd);
sd                 92 drivers/media/usb/gspca/m5602/m5602_ov7660.h int ov7660_stop(struct sd *sd);
sd                 93 drivers/media/usb/gspca/m5602/m5602_ov7660.h void ov7660_disconnect(struct sd *sd);
sd                 21 drivers/media/usb/gspca/m5602/m5602_ov9650.c static void ov9650_dump_registers(struct sd *sd);
sd                294 drivers/media/usb/gspca/m5602/m5602_ov9650.c int ov9650_probe(struct sd *sd)
sd                298 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                316 drivers/media/usb/gspca/m5602/m5602_ov9650.c 			err = m5602_write_sensor(sd,
sd                319 drivers/media/usb/gspca/m5602/m5602_ov9650.c 			err = m5602_write_bridge(sd,
sd                326 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	if (m5602_read_sensor(sd, OV9650_PID, &prod_id, 1))
sd                329 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	if (m5602_read_sensor(sd, OV9650_VER, &ver_id, 1))
sd                339 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	sd->gspca_dev.cam.cam_mode = ov9650_modes;
sd                340 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	sd->gspca_dev.cam.nmodes = ARRAY_SIZE(ov9650_modes);
sd                345 drivers/media/usb/gspca/m5602/m5602_ov9650.c int ov9650_init(struct sd *sd)
sd                351 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		ov9650_dump_registers(sd);
sd                356 drivers/media/usb/gspca/m5602/m5602_ov9650.c 			err = m5602_write_sensor(sd, init_ov9650[i][1],
sd                359 drivers/media/usb/gspca/m5602/m5602_ov9650.c 			err = m5602_write_bridge(sd, init_ov9650[i][1], data);
sd                365 drivers/media/usb/gspca/m5602/m5602_ov9650.c int ov9650_init_controls(struct sd *sd)
sd                367 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
sd                369 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	sd->gspca_dev.vdev.ctrl_handler = hdl;
sd                372 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	sd->auto_white_bal = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops,
sd                375 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	sd->red_bal = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops,
sd                378 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	sd->blue_bal = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops,
sd                382 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	sd->autoexpo = v4l2_ctrl_new_std_menu(hdl, &ov9650_ctrl_ops,
sd                384 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	sd->expo = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, V4L2_CID_EXPOSURE,
sd                387 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	sd->autogain = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops,
sd                389 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	sd->gain = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, V4L2_CID_GAIN, 0,
sd                392 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	sd->hflip = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, V4L2_CID_HFLIP,
sd                394 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	sd->vflip = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, V4L2_CID_VFLIP,
sd                402 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	v4l2_ctrl_auto_cluster(3, &sd->auto_white_bal, 0, false);
sd                403 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	v4l2_ctrl_auto_cluster(2, &sd->autoexpo, 0, false);
sd                404 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	v4l2_ctrl_auto_cluster(2, &sd->autogain, 0, false);
sd                405 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	v4l2_ctrl_cluster(2, &sd->hflip);
sd                410 drivers/media/usb/gspca/m5602/m5602_ov9650.c int ov9650_start(struct sd *sd)
sd                414 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	struct cam *cam = &sd->gspca_dev.cam;
sd                416 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	int width = cam->cam_mode[sd->gspca_dev.curr_mode].width;
sd                417 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	int height = cam->cam_mode[sd->gspca_dev.curr_mode].height;
sd                418 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	int ver_offs = cam->cam_mode[sd->gspca_dev.curr_mode].priv;
sd                420 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                423 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		sd->vflip->val) ||
sd                425 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		!sd->vflip->val))
sd                434 drivers/media/usb/gspca/m5602/m5602_ov9650.c 			err = m5602_write_bridge(sd, res_init_ov9650[i][1],
sd                438 drivers/media/usb/gspca/m5602/m5602_ov9650.c 			err = m5602_write_sensor(sd,
sd                445 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA,
sd                450 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (ver_offs & 0xff));
sd                454 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0);
sd                458 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height >> 8) & 0xff);
sd                462 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height & 0xff));
sd                467 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0);
sd                471 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0);
sd                475 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 2);
sd                479 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA,
sd                484 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, hor_offs & 0xff);
sd                488 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA,
sd                493 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA,
sd                498 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0);
sd                508 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		err = m5602_write_sensor(sd, OV9650_COM7, &data, 1);
sd                516 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		err = m5602_write_sensor(sd, OV9650_COM7, &data, 1);
sd                524 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		err = m5602_write_sensor(sd, OV9650_COM7, &data, 1);
sd                532 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		err = m5602_write_sensor(sd, OV9650_COM7, &data, 1);
sd                538 drivers/media/usb/gspca/m5602/m5602_ov9650.c int ov9650_stop(struct sd *sd)
sd                541 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	return m5602_write_sensor(sd, OV9650_COM2, &data, 1);
sd                544 drivers/media/usb/gspca/m5602/m5602_ov9650.c void ov9650_disconnect(struct sd *sd)
sd                546 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	ov9650_stop(sd);
sd                548 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	sd->sensor = NULL;
sd                553 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                561 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_sensor(sd, OV9650_AECHM,
sd                568 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_sensor(sd, OV9650_AECH,
sd                575 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_sensor(sd, OV9650_COM1, &i2c_data, 1);
sd                583 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                590 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_read_sensor(sd, OV9650_VREF, &i2c_data, 1);
sd                597 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_sensor(sd, OV9650_VREF, &i2c_data, 1);
sd                603 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_sensor(sd, OV9650_GAIN, &i2c_data, 1);
sd                611 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                616 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_sensor(sd, OV9650_RED, &i2c_data, 1);
sd                624 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                629 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_sensor(sd, OV9650_BLUE, &i2c_data, 1);
sd                637 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                638 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	int hflip = sd->hflip->val;
sd                639 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	int vflip = sd->vflip->val;
sd                647 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_sensor(sd, OV9650_MVFP, &i2c_data, 1);
sd                653 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		err = ov9650_start(sd);
sd                663 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                667 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_read_sensor(sd, OV9650_COM8, &i2c_data, 1);
sd                674 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	return m5602_write_sensor(sd, OV9650_COM8, &i2c_data, 1);
sd                682 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                686 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_read_sensor(sd, OV9650_COM8, &i2c_data, 1);
sd                691 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_write_sensor(sd, OV9650_COM8, &i2c_data, 1);
sd                700 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                704 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	err = m5602_read_sensor(sd, OV9650_COM8, &i2c_data, 1);
sd                710 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	return m5602_write_sensor(sd, OV9650_COM8, &i2c_data, 1);
sd                717 drivers/media/usb/gspca/m5602/m5602_ov9650.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                728 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		err = ov9650_set_red_balance(gspca_dev, sd->red_bal->val);
sd                731 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		err = ov9650_set_blue_balance(gspca_dev, sd->blue_bal->val);
sd                737 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		err = ov9650_set_exposure(gspca_dev, sd->expo->val);
sd                743 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		err = ov9650_set_gain(gspca_dev, sd->gain->val);
sd                755 drivers/media/usb/gspca/m5602/m5602_ov9650.c static void ov9650_dump_registers(struct sd *sd)
sd                761 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		m5602_read_sensor(sd, address, &value, 1);
sd                772 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		m5602_read_sensor(sd, address, &old_value, 1);
sd                773 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		m5602_write_sensor(sd, address, test_value, 1);
sd                774 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		m5602_read_sensor(sd, address, &ctrl_value, 1);
sd                782 drivers/media/usb/gspca/m5602/m5602_ov9650.c 		m5602_write_sensor(sd, address, &old_value, 1);
sd                136 drivers/media/usb/gspca/m5602/m5602_ov9650.h int ov9650_probe(struct sd *sd);
sd                137 drivers/media/usb/gspca/m5602/m5602_ov9650.h int ov9650_init(struct sd *sd);
sd                138 drivers/media/usb/gspca/m5602/m5602_ov9650.h int ov9650_init_controls(struct sd *sd);
sd                139 drivers/media/usb/gspca/m5602/m5602_ov9650.h int ov9650_start(struct sd *sd);
sd                140 drivers/media/usb/gspca/m5602/m5602_ov9650.h int ov9650_stop(struct sd *sd);
sd                141 drivers/media/usb/gspca/m5602/m5602_ov9650.h void ov9650_disconnect(struct sd *sd);
sd                 20 drivers/media/usb/gspca/m5602/m5602_po1030.c static void po1030_dump_registers(struct sd *sd);
sd                155 drivers/media/usb/gspca/m5602/m5602_po1030.c int po1030_probe(struct sd *sd)
sd                159 drivers/media/usb/gspca/m5602/m5602_po1030.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                177 drivers/media/usb/gspca/m5602/m5602_po1030.c 			rc |= m5602_write_sensor(sd,
sd                180 drivers/media/usb/gspca/m5602/m5602_po1030.c 			rc |= m5602_write_bridge(sd, preinit_po1030[i][1],
sd                186 drivers/media/usb/gspca/m5602/m5602_po1030.c 	if (m5602_read_sensor(sd, PO1030_DEVID_H, &dev_id_h, 1))
sd                196 drivers/media/usb/gspca/m5602/m5602_po1030.c 	sd->gspca_dev.cam.cam_mode = po1030_modes;
sd                197 drivers/media/usb/gspca/m5602/m5602_po1030.c 	sd->gspca_dev.cam.nmodes = ARRAY_SIZE(po1030_modes);
sd                202 drivers/media/usb/gspca/m5602/m5602_po1030.c int po1030_init(struct sd *sd)
sd                212 drivers/media/usb/gspca/m5602/m5602_po1030.c 			err = m5602_write_bridge(sd,
sd                219 drivers/media/usb/gspca/m5602/m5602_po1030.c 			err = m5602_write_sensor(sd,
sd                232 drivers/media/usb/gspca/m5602/m5602_po1030.c 		po1030_dump_registers(sd);
sd                237 drivers/media/usb/gspca/m5602/m5602_po1030.c int po1030_init_controls(struct sd *sd)
sd                239 drivers/media/usb/gspca/m5602/m5602_po1030.c 	struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
sd                241 drivers/media/usb/gspca/m5602/m5602_po1030.c 	sd->gspca_dev.vdev.ctrl_handler = hdl;
sd                244 drivers/media/usb/gspca/m5602/m5602_po1030.c 	sd->auto_white_bal = v4l2_ctrl_new_std(hdl, &po1030_ctrl_ops,
sd                247 drivers/media/usb/gspca/m5602/m5602_po1030.c 	sd->green_bal = v4l2_ctrl_new_custom(hdl, &po1030_greenbal_cfg, NULL);
sd                248 drivers/media/usb/gspca/m5602/m5602_po1030.c 	sd->red_bal = v4l2_ctrl_new_std(hdl, &po1030_ctrl_ops,
sd                251 drivers/media/usb/gspca/m5602/m5602_po1030.c 	sd->blue_bal = v4l2_ctrl_new_std(hdl, &po1030_ctrl_ops,
sd                255 drivers/media/usb/gspca/m5602/m5602_po1030.c 	sd->autoexpo = v4l2_ctrl_new_std_menu(hdl, &po1030_ctrl_ops,
sd                257 drivers/media/usb/gspca/m5602/m5602_po1030.c 	sd->expo = v4l2_ctrl_new_std(hdl, &po1030_ctrl_ops, V4L2_CID_EXPOSURE,
sd                260 drivers/media/usb/gspca/m5602/m5602_po1030.c 	sd->gain = v4l2_ctrl_new_std(hdl, &po1030_ctrl_ops, V4L2_CID_GAIN, 0,
sd                263 drivers/media/usb/gspca/m5602/m5602_po1030.c 	sd->hflip = v4l2_ctrl_new_std(hdl, &po1030_ctrl_ops, V4L2_CID_HFLIP,
sd                265 drivers/media/usb/gspca/m5602/m5602_po1030.c 	sd->vflip = v4l2_ctrl_new_std(hdl, &po1030_ctrl_ops, V4L2_CID_VFLIP,
sd                273 drivers/media/usb/gspca/m5602/m5602_po1030.c 	v4l2_ctrl_auto_cluster(4, &sd->auto_white_bal, 0, false);
sd                274 drivers/media/usb/gspca/m5602/m5602_po1030.c 	v4l2_ctrl_auto_cluster(2, &sd->autoexpo, 0, false);
sd                275 drivers/media/usb/gspca/m5602/m5602_po1030.c 	v4l2_ctrl_cluster(2, &sd->hflip);
sd                280 drivers/media/usb/gspca/m5602/m5602_po1030.c int po1030_start(struct sd *sd)
sd                282 drivers/media/usb/gspca/m5602/m5602_po1030.c 	struct cam *cam = &sd->gspca_dev.cam;
sd                284 drivers/media/usb/gspca/m5602/m5602_po1030.c 	int width = cam->cam_mode[sd->gspca_dev.curr_mode].width;
sd                285 drivers/media/usb/gspca/m5602/m5602_po1030.c 	int height = cam->cam_mode[sd->gspca_dev.curr_mode].height;
sd                286 drivers/media/usb/gspca/m5602/m5602_po1030.c 	int ver_offs = cam->cam_mode[sd->gspca_dev.curr_mode].priv;
sd                292 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = m5602_write_sensor(sd, PO1030_CONTROL3, &data, 1);
sd                297 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = m5602_write_sensor(sd, PO1030_WINDOWWIDTH_H, &data, 1);
sd                302 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = m5602_write_sensor(sd, PO1030_WINDOWWIDTH_L, &data, 1);
sd                307 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = m5602_write_sensor(sd, PO1030_WINDOWHEIGHT_H, &data, 1);
sd                312 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = m5602_write_sensor(sd, PO1030_WINDOWHEIGHT_L, &data, 1);
sd                320 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = m5602_write_sensor(sd, PO1030_CONTROL3, &data, 1);
sd                325 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = m5602_write_sensor(sd, PO1030_WINDOWWIDTH_H, &data, 1);
sd                330 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = m5602_write_sensor(sd, PO1030_WINDOWWIDTH_L, &data, 1);
sd                335 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = m5602_write_sensor(sd, PO1030_WINDOWHEIGHT_H, &data, 1);
sd                340 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = m5602_write_sensor(sd, PO1030_WINDOWHEIGHT_L, &data, 1);
sd                346 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_bridge(sd, M5602_XB_SENSOR_TYPE, 0x0c);
sd                350 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_bridge(sd, M5602_XB_LINE_OF_FRAME_H, 0x81);
sd                354 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_bridge(sd, M5602_XB_PIX_OF_LINE_H, 0x82);
sd                358 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0x01);
sd                362 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA,
sd                367 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (ver_offs & 0xff));
sd                372 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0);
sd                376 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height >> 8) & 0xff);
sd                380 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height & 0xff));
sd                385 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0);
sd                388 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0);
sd                391 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, 0);
sd                395 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, (width >> 8) & 0xff);
sd                399 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, (width & 0xff));
sd                403 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0);
sd                409 drivers/media/usb/gspca/m5602/m5602_po1030.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                419 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_sensor(sd, PO1030_INTEGLINES_H,
sd                427 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_sensor(sd, PO1030_INTEGLINES_M,
sd                435 drivers/media/usb/gspca/m5602/m5602_po1030.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                441 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_sensor(sd, PO1030_GLOBALGAIN,
sd                448 drivers/media/usb/gspca/m5602/m5602_po1030.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                453 drivers/media/usb/gspca/m5602/m5602_po1030.c 		  sd->hflip->val, sd->vflip->val);
sd                454 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_read_sensor(sd, PO1030_CONTROL2, &i2c_data, 1);
sd                458 drivers/media/usb/gspca/m5602/m5602_po1030.c 	i2c_data = (0x3f & i2c_data) | (sd->hflip->val << 7) |
sd                459 drivers/media/usb/gspca/m5602/m5602_po1030.c 		   (sd->vflip->val << 6);
sd                461 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_sensor(sd, PO1030_CONTROL2,
sd                469 drivers/media/usb/gspca/m5602/m5602_po1030.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                475 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_sensor(sd, PO1030_RED_GAIN,
sd                482 drivers/media/usb/gspca/m5602/m5602_po1030.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                488 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_sensor(sd, PO1030_BLUE_GAIN,
sd                496 drivers/media/usb/gspca/m5602/m5602_po1030.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                503 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_sensor(sd, PO1030_GREEN_1_GAIN,
sd                508 drivers/media/usb/gspca/m5602/m5602_po1030.c 	return m5602_write_sensor(sd, PO1030_GREEN_2_GAIN,
sd                515 drivers/media/usb/gspca/m5602/m5602_po1030.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                519 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_read_sensor(sd, PO1030_AUTOCTRL1, &i2c_data, 1);
sd                525 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_write_sensor(sd, PO1030_AUTOCTRL1, &i2c_data, 1);
sd                532 drivers/media/usb/gspca/m5602/m5602_po1030.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                536 drivers/media/usb/gspca/m5602/m5602_po1030.c 	err = m5602_read_sensor(sd, PO1030_AUTOCTRL1, &i2c_data, 1);
sd                543 drivers/media/usb/gspca/m5602/m5602_po1030.c 	return m5602_write_sensor(sd, PO1030_AUTOCTRL1, &i2c_data, 1);
sd                546 drivers/media/usb/gspca/m5602/m5602_po1030.c void po1030_disconnect(struct sd *sd)
sd                548 drivers/media/usb/gspca/m5602/m5602_po1030.c 	sd->sensor = NULL;
sd                555 drivers/media/usb/gspca/m5602/m5602_po1030.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                566 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = po1030_set_green_balance(gspca_dev, sd->green_bal->val);
sd                569 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = po1030_set_red_balance(gspca_dev, sd->red_bal->val);
sd                572 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = po1030_set_blue_balance(gspca_dev, sd->blue_bal->val);
sd                578 drivers/media/usb/gspca/m5602/m5602_po1030.c 		err = po1030_set_exposure(gspca_dev, sd->expo->val);
sd                593 drivers/media/usb/gspca/m5602/m5602_po1030.c static void po1030_dump_registers(struct sd *sd)
sd                600 drivers/media/usb/gspca/m5602/m5602_po1030.c 		m5602_read_sensor(sd, address, &value, 1);
sd                611 drivers/media/usb/gspca/m5602/m5602_po1030.c 		m5602_read_sensor(sd, address, &old_value, 1);
sd                612 drivers/media/usb/gspca/m5602/m5602_po1030.c 		m5602_write_sensor(sd, address, test_value, 1);
sd                613 drivers/media/usb/gspca/m5602/m5602_po1030.c 		m5602_read_sensor(sd, address, &ctrl_value, 1);
sd                621 drivers/media/usb/gspca/m5602/m5602_po1030.c 		m5602_write_sensor(sd, address, &old_value, 1);
sd                148 drivers/media/usb/gspca/m5602/m5602_po1030.h int po1030_probe(struct sd *sd);
sd                149 drivers/media/usb/gspca/m5602/m5602_po1030.h int po1030_init(struct sd *sd);
sd                150 drivers/media/usb/gspca/m5602/m5602_po1030.h int po1030_init_controls(struct sd *sd);
sd                151 drivers/media/usb/gspca/m5602/m5602_po1030.h int po1030_start(struct sd *sd);
sd                152 drivers/media/usb/gspca/m5602/m5602_po1030.h void po1030_disconnect(struct sd *sd);
sd                219 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c static void s5k4aa_dump_registers(struct sd *sd);
sd                339 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c int s5k4aa_probe(struct sd *sd)
sd                343 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                364 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 			err = m5602_write_bridge(sd,
sd                371 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 			err = m5602_write_sensor(sd,
sd                379 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 			err = m5602_write_sensor(sd,
sd                390 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	if (m5602_read_sensor(sd, 0x00, prod_id, 2))
sd                392 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	if (m5602_read_sensor(sd, 0x02, prod_id+2, 2))
sd                394 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	if (m5602_read_sensor(sd, 0x04, prod_id+4, 2))
sd                403 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	sd->gspca_dev.cam.cam_mode = s5k4aa_modes;
sd                404 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	sd->gspca_dev.cam.nmodes = ARRAY_SIZE(s5k4aa_modes);
sd                409 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c int s5k4aa_start(struct sd *sd)
sd                413 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	struct cam *cam = &sd->gspca_dev.cam;
sd                414 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                416 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	switch (cam->cam_mode[sd->gspca_dev.curr_mode].width) {
sd                423 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 				err = m5602_write_bridge(sd,
sd                430 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 				err = m5602_write_sensor(sd,
sd                438 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 				err = m5602_write_sensor(sd,
sd                456 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 				err = m5602_write_bridge(sd,
sd                463 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 				err = m5602_write_sensor(sd,
sd                471 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 				err = m5602_write_sensor(sd,
sd                489 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c int s5k4aa_init(struct sd *sd)
sd                498 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 			err = m5602_write_bridge(sd,
sd                505 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 			err = m5602_write_sensor(sd,
sd                512 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 			err = m5602_write_sensor(sd,
sd                522 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 		s5k4aa_dump_registers(sd);
sd                527 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c int s5k4aa_init_controls(struct sd *sd)
sd                529 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
sd                531 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	sd->gspca_dev.vdev.ctrl_handler = hdl;
sd                546 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	sd->hflip = v4l2_ctrl_new_std(hdl, &s5k4aa_ctrl_ops, V4L2_CID_HFLIP,
sd                548 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	sd->vflip = v4l2_ctrl_new_std(hdl, &s5k4aa_ctrl_ops, V4L2_CID_VFLIP,
sd                556 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	v4l2_ctrl_cluster(2, &sd->hflip);
sd                563 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                568 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
sd                572 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	err = m5602_write_sensor(sd, S5K4AA_EXPOSURE_HI, &data, 1);
sd                576 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	err = m5602_write_sensor(sd, S5K4AA_EXPOSURE_LO, &data, 1);
sd                583 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                586 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	int hflip = sd->hflip->val;
sd                587 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	int vflip = sd->vflip->val;
sd                590 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
sd                594 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	err = m5602_read_sensor(sd, S5K4AA_READ_MODE, &data, 1);
sd                604 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	err = m5602_write_sensor(sd, S5K4AA_READ_MODE, &data, 1);
sd                608 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	err = m5602_read_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
sd                615 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	err = m5602_write_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
sd                619 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	err = m5602_read_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
sd                626 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	err = m5602_write_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
sd                635 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                640 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
sd                645 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	err = m5602_write_sensor(sd, S5K4AA_GAIN, &data, 1);
sd                652 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                657 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
sd                662 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	return m5602_write_sensor(sd, S5K4AA_BRIGHTNESS, &data, 1);
sd                667 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                672 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
sd                677 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	return m5602_write_sensor(sd, S5K4AA_NOISE_SUPP, &data, 1);
sd                712 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c void s5k4aa_disconnect(struct sd *sd)
sd                714 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	sd->sensor = NULL;
sd                717 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c static void s5k4aa_dump_registers(struct sd *sd)
sd                721 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	m5602_read_sensor(sd, S5K4AA_PAGE_MAP, &old_page, 1);
sd                723 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 		m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &page, 1);
sd                728 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 			m5602_read_sensor(sd, address, &value, 1);
sd                736 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 		m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &page, 1);
sd                742 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 			m5602_read_sensor(sd, address, &old_value, 1);
sd                743 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 			m5602_write_sensor(sd, address, &test_value, 1);
sd                744 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 			m5602_read_sensor(sd, address, &ctrl_value, 1);
sd                754 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 			m5602_write_sensor(sd, address, &old_value, 1);
sd                758 drivers/media/usb/gspca/m5602/m5602_s5k4aa.c 	m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &old_page, 1);
sd                 66 drivers/media/usb/gspca/m5602/m5602_s5k4aa.h int s5k4aa_probe(struct sd *sd);
sd                 67 drivers/media/usb/gspca/m5602/m5602_s5k4aa.h int s5k4aa_init(struct sd *sd);
sd                 68 drivers/media/usb/gspca/m5602/m5602_s5k4aa.h int s5k4aa_init_controls(struct sd *sd);
sd                 69 drivers/media/usb/gspca/m5602/m5602_s5k4aa.h int s5k4aa_start(struct sd *sd);
sd                 70 drivers/media/usb/gspca/m5602/m5602_s5k4aa.h void s5k4aa_disconnect(struct sd *sd);
sd                164 drivers/media/usb/gspca/m5602/m5602_s5k83a.c static void s5k83a_dump_registers(struct sd *sd);
sd                165 drivers/media/usb/gspca/m5602/m5602_s5k83a.c static int s5k83a_get_rotation(struct sd *sd, u8 *reg_data);
sd                166 drivers/media/usb/gspca/m5602/m5602_s5k83a.c static int s5k83a_set_led_indication(struct sd *sd, u8 val);
sd                170 drivers/media/usb/gspca/m5602/m5602_s5k83a.c int s5k83a_probe(struct sd *sd)
sd                174 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                192 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 			err = m5602_write_sensor(sd, preinit_s5k83a[i][1],
sd                195 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 			err = m5602_write_bridge(sd, preinit_s5k83a[i][1],
sd                202 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	if (m5602_read_sensor(sd, 0x00, &prod_id, 1))
sd                205 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	if (m5602_read_sensor(sd, 0x01, &ver_id, 1))
sd                214 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	sd->gspca_dev.cam.cam_mode = s5k83a_modes;
sd                215 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	sd->gspca_dev.cam.nmodes = ARRAY_SIZE(s5k83a_modes);
sd                218 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	sd->rotation_thread = NULL;
sd                223 drivers/media/usb/gspca/m5602/m5602_s5k83a.c int s5k83a_init(struct sd *sd)
sd                232 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 			err = m5602_write_bridge(sd,
sd                239 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 			err = m5602_write_sensor(sd,
sd                246 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 			err = m5602_write_sensor(sd,
sd                256 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 		s5k83a_dump_registers(sd);
sd                261 drivers/media/usb/gspca/m5602/m5602_s5k83a.c int s5k83a_init_controls(struct sd *sd)
sd                263 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
sd                265 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	sd->gspca_dev.vdev.ctrl_handler = hdl;
sd                278 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	sd->hflip = v4l2_ctrl_new_std(hdl, &s5k83a_ctrl_ops, V4L2_CID_HFLIP,
sd                280 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	sd->vflip = v4l2_ctrl_new_std(hdl, &s5k83a_ctrl_ops, V4L2_CID_VFLIP,
sd                288 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	v4l2_ctrl_cluster(2, &sd->hflip);
sd                295 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	struct sd *sd = (struct sd *) data;
sd                301 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 		if (mutex_lock_interruptible(&sd->gspca_dev.usb_lock))
sd                304 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 		s5k83a_get_rotation(sd, &reg);
sd                309 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 			hflip = sd->hflip->val;
sd                310 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 			vflip = sd->vflip->val;
sd                316 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 			s5k83a_set_flip_real((struct gspca_dev *) sd,
sd                320 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 		mutex_unlock(&sd->gspca_dev.usb_lock);
sd                326 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 		hflip = sd->hflip->val;
sd                327 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 		vflip = sd->vflip->val;
sd                328 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 		s5k83a_set_flip_real((struct gspca_dev *) sd, vflip, hflip);
sd                331 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	sd->rotation_thread = NULL;
sd                335 drivers/media/usb/gspca/m5602/m5602_s5k83a.c int s5k83a_start(struct sd *sd)
sd                342 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	sd->rotation_thread = kthread_create(rotation_thread_function,
sd                343 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 					     sd, "rotation thread");
sd                344 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	if (IS_ERR(sd->rotation_thread)) {
sd                345 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 		err = PTR_ERR(sd->rotation_thread);
sd                346 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 		sd->rotation_thread = NULL;
sd                349 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	wake_up_process(sd->rotation_thread);
sd                355 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 			err = m5602_write_sensor(sd, start_s5k83a[i][1],
sd                358 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 			err = m5602_write_bridge(sd, start_s5k83a[i][1],
sd                364 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	return s5k83a_set_led_indication(sd, 1);
sd                367 drivers/media/usb/gspca/m5602/m5602_s5k83a.c int s5k83a_stop(struct sd *sd)
sd                369 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	if (sd->rotation_thread)
sd                370 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 		kthread_stop(sd->rotation_thread);
sd                372 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	return s5k83a_set_led_indication(sd, 0);
sd                375 drivers/media/usb/gspca/m5602/m5602_s5k83a.c void s5k83a_disconnect(struct sd *sd)
sd                377 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	s5k83a_stop(sd);
sd                379 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	sd->sensor = NULL;
sd                386 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                390 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	err = m5602_write_sensor(sd, 0x14, data, 2);
sd                396 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	err = m5602_write_sensor(sd, 0x0d, data, 2);
sd                404 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	err = m5602_write_sensor(sd, S5K83A_GAIN, data, 2);
sd                413 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                416 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	err = m5602_write_sensor(sd, S5K83A_BRIGHTNESS, data, 1);
sd                424 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                428 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	err = m5602_write_sensor(sd, S5K83A_EXPOSURE, data, 2);
sd                437 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                440 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	err = m5602_write_sensor(sd, S5K83A_PAGE_MAP, data, 1);
sd                449 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	err = m5602_write_sensor(sd, S5K83A_FLIP, data, 1);
sd                454 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	err = m5602_write_sensor(sd, S5K83A_VFLIP_TUNE, data, 1);
sd                459 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	err = m5602_write_sensor(sd, S5K83A_HFLIP_TUNE, data, 1);
sd                467 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                468 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	int hflip = sd->hflip->val;
sd                469 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	int vflip = sd->vflip->val;
sd                471 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	err = s5k83a_get_rotation(sd, &reg);
sd                512 drivers/media/usb/gspca/m5602/m5602_s5k83a.c static int s5k83a_set_led_indication(struct sd *sd, u8 val)
sd                517 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	err = m5602_read_bridge(sd, M5602_XB_GPIO_DAT, data);
sd                526 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	err = m5602_write_bridge(sd, M5602_XB_GPIO_DAT, data[0]);
sd                532 drivers/media/usb/gspca/m5602/m5602_s5k83a.c static int s5k83a_get_rotation(struct sd *sd, u8 *reg_data)
sd                534 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	int err = m5602_read_bridge(sd, M5602_XB_GPIO_DAT, reg_data);
sd                539 drivers/media/usb/gspca/m5602/m5602_s5k83a.c static void s5k83a_dump_registers(struct sd *sd)
sd                543 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	m5602_read_sensor(sd, S5K83A_PAGE_MAP, &old_page, 1);
sd                546 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 		m5602_write_sensor(sd, S5K83A_PAGE_MAP, &page, 1);
sd                551 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 			m5602_read_sensor(sd, address, &val, 1);
sd                558 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 		m5602_write_sensor(sd, S5K83A_PAGE_MAP, &page, 1);
sd                564 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 			m5602_read_sensor(sd, address, &old_val, 1);
sd                565 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 			m5602_write_sensor(sd, address, &test_val, 1);
sd                566 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 			m5602_read_sensor(sd, address, &ctrl_val, 1);
sd                576 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 			m5602_write_sensor(sd, address, &old_val, 1);
sd                580 drivers/media/usb/gspca/m5602/m5602_s5k83a.c 	m5602_write_sensor(sd, S5K83A_PAGE_MAP, &old_page, 1);
sd                 42 drivers/media/usb/gspca/m5602/m5602_s5k83a.h int s5k83a_probe(struct sd *sd);
sd                 43 drivers/media/usb/gspca/m5602/m5602_s5k83a.h int s5k83a_init(struct sd *sd);
sd                 44 drivers/media/usb/gspca/m5602/m5602_s5k83a.h int s5k83a_init_controls(struct sd *sd);
sd                 45 drivers/media/usb/gspca/m5602/m5602_s5k83a.h int s5k83a_start(struct sd *sd);
sd                 46 drivers/media/usb/gspca/m5602/m5602_s5k83a.h int s5k83a_stop(struct sd *sd);
sd                 47 drivers/media/usb/gspca/m5602/m5602_s5k83a.h void s5k83a_disconnect(struct sd *sd);
sd                 51 drivers/media/usb/gspca/m5602/m5602_sensor.h 	int (*probe)(struct sd *sd);
sd                 54 drivers/media/usb/gspca/m5602/m5602_sensor.h 	int (*init)(struct sd *sd);
sd                 57 drivers/media/usb/gspca/m5602/m5602_sensor.h 	int (*init_controls)(struct sd *sd);
sd                 60 drivers/media/usb/gspca/m5602/m5602_sensor.h 	int (*start)(struct sd *sd);
sd                 63 drivers/media/usb/gspca/m5602/m5602_sensor.h 	int (*stop)(struct sd *sd);
sd                 66 drivers/media/usb/gspca/m5602/m5602_sensor.h 	void (*disconnect)(struct sd *sd);
sd                147 drivers/media/usb/gspca/mars.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                154 drivers/media/usb/gspca/mars.c 			sd->illum_bottom->val = 0;
sd                155 drivers/media/usb/gspca/mars.c 		if (sd->illum_bottom->is_new && sd->illum_bottom->val)
sd                156 drivers/media/usb/gspca/mars.c 			sd->illum_top->val = 0;
sd                173 drivers/media/usb/gspca/mars.c 		setilluminators(gspca_dev, sd->illum_top->val,
sd                174 drivers/media/usb/gspca/mars.c 					   sd->illum_bottom->val);
sd                192 drivers/media/usb/gspca/mars.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                197 drivers/media/usb/gspca/mars.c 	sd->brightness = v4l2_ctrl_new_std(hdl, &mars_ctrl_ops,
sd                199 drivers/media/usb/gspca/mars.c 	sd->saturation = v4l2_ctrl_new_std(hdl, &mars_ctrl_ops,
sd                201 drivers/media/usb/gspca/mars.c 	sd->gamma = v4l2_ctrl_new_std(hdl, &mars_ctrl_ops,
sd                203 drivers/media/usb/gspca/mars.c 	sd->sharpness = v4l2_ctrl_new_std(hdl, &mars_ctrl_ops,
sd                205 drivers/media/usb/gspca/mars.c 	sd->illum_top = v4l2_ctrl_new_std(hdl, &mars_ctrl_ops,
sd                207 drivers/media/usb/gspca/mars.c 	sd->illum_top->flags |= V4L2_CTRL_FLAG_UPDATE;
sd                208 drivers/media/usb/gspca/mars.c 	sd->illum_bottom = v4l2_ctrl_new_std(hdl, &mars_ctrl_ops,
sd                210 drivers/media/usb/gspca/mars.c 	sd->illum_bottom->flags |= V4L2_CTRL_FLAG_UPDATE;
sd                215 drivers/media/usb/gspca/mars.c 	v4l2_ctrl_cluster(2, &sd->illum_top);
sd                239 drivers/media/usb/gspca/mars.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                244 drivers/media/usb/gspca/mars.c 	jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
sd                247 drivers/media/usb/gspca/mars.c 	jpeg_set_qual(sd->jpeg_hdr, QUALITY);
sd                266 drivers/media/usb/gspca/mars.c 	data[7] = v4l2_ctrl_g_ctrl(sd->gamma) * 0x40;	/* reg 0x06: gamma */
sd                298 drivers/media/usb/gspca/mars.c 	data[2] = v4l2_ctrl_g_ctrl(sd->saturation) << 3;
sd                299 drivers/media/usb/gspca/mars.c 	data[3] = ((v4l2_ctrl_g_ctrl(sd->saturation) >> 2) & 0xf8) | 0x04;
sd                300 drivers/media/usb/gspca/mars.c 	data[4] = v4l2_ctrl_g_ctrl(sd->brightness); /* reg 0x61 = brightness */
sd                307 drivers/media/usb/gspca/mars.c 	data[1] = v4l2_ctrl_g_ctrl(sd->sharpness) * 4 + 3;
sd                330 drivers/media/usb/gspca/mars.c 	setilluminators(gspca_dev, v4l2_ctrl_g_ctrl(sd->illum_top),
sd                331 drivers/media/usb/gspca/mars.c 				   v4l2_ctrl_g_ctrl(sd->illum_bottom));
sd                338 drivers/media/usb/gspca/mars.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                340 drivers/media/usb/gspca/mars.c 	if (v4l2_ctrl_g_ctrl(sd->illum_top) ||
sd                341 drivers/media/usb/gspca/mars.c 	    v4l2_ctrl_g_ctrl(sd->illum_bottom)) {
sd                355 drivers/media/usb/gspca/mars.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                379 drivers/media/usb/gspca/mars.c 					sd->jpeg_hdr, JPEG_HDR_SZ);
sd                411 drivers/media/usb/gspca/mars.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                178 drivers/media/usb/gspca/mr97310a.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                183 drivers/media/usb/gspca/mr97310a.c 	if (sd->cam_type == CAM_TYPE_CIF) {
sd                185 drivers/media/usb/gspca/mr97310a.c 		confirm_reg = sd->sensor_type ? 0x13 : 0x11;
sd                342 drivers/media/usb/gspca/mr97310a.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                349 drivers/media/usb/gspca/mr97310a.c 	sd->do_lcd_stop = 0;
sd                373 drivers/media/usb/gspca/mr97310a.c 		sd->cam_type = CAM_TYPE_CIF;
sd                398 drivers/media/usb/gspca/mr97310a.c 			sd->sensor_type = 0;
sd                401 drivers/media/usb/gspca/mr97310a.c 			sd->sensor_type = 1;
sd                409 drivers/media/usb/gspca/mr97310a.c 			  sd->sensor_type);
sd                411 drivers/media/usb/gspca/mr97310a.c 		sd->cam_type = CAM_TYPE_VGA;
sd                432 drivers/media/usb/gspca/mr97310a.c 		sd->sensor_type = 1;
sd                433 drivers/media/usb/gspca/mr97310a.c 		sd->do_lcd_stop = 0;
sd                434 drivers/media/usb/gspca/mr97310a.c 		sd->adj_colors = 0;
sd                436 drivers/media/usb/gspca/mr97310a.c 			sd->sensor_type = 2;
sd                447 drivers/media/usb/gspca/mr97310a.c 			sd->adj_colors = 1;
sd                449 drivers/media/usb/gspca/mr97310a.c 			sd->do_lcd_stop = 1;
sd                452 drivers/media/usb/gspca/mr97310a.c 				sd->sensor_type = 0;
sd                466 drivers/media/usb/gspca/mr97310a.c 			  sd->sensor_type);
sd                472 drivers/media/usb/gspca/mr97310a.c 		sd->sensor_type = !!force_sensor_type;
sd                474 drivers/media/usb/gspca/mr97310a.c 			  sd->sensor_type);
sd                488 drivers/media/usb/gspca/mr97310a.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                508 drivers/media/usb/gspca/mr97310a.c 	if (sd->sensor_type)
sd                520 drivers/media/usb/gspca/mr97310a.c 		data[8] = 0x1a + sd->sensor_type;  /* reg 7, V start  */
sd                529 drivers/media/usb/gspca/mr97310a.c 		data[8] = 0x06 - sd->sensor_type;  /* reg 7, V start  */
sd                536 drivers/media/usb/gspca/mr97310a.c 	if (!sd->sensor_type) {
sd                590 drivers/media/usb/gspca/mr97310a.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                599 drivers/media/usb/gspca/mr97310a.c 	if (!sd->sensor_type) {
sd                603 drivers/media/usb/gspca/mr97310a.c 	if (sd->sensor_type == 2) {
sd                621 drivers/media/usb/gspca/mr97310a.c 		if (sd->sensor_type == 2) {
sd                625 drivers/media/usb/gspca/mr97310a.c 		if (sd->do_lcd_stop)
sd                637 drivers/media/usb/gspca/mr97310a.c 		if (sd->do_lcd_stop)
sd                646 drivers/media/usb/gspca/mr97310a.c 	if (!sd->sensor_type) {
sd                657 drivers/media/usb/gspca/mr97310a.c 	} else if (sd->sensor_type == 1) {
sd                683 drivers/media/usb/gspca/mr97310a.c 		if (sd->adj_colors)
sd                743 drivers/media/usb/gspca/mr97310a.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                746 drivers/media/usb/gspca/mr97310a.c 	sd->sof_read = 0;
sd                760 drivers/media/usb/gspca/mr97310a.c 	if (sd->cam_type == CAM_TYPE_CIF) {
sd                773 drivers/media/usb/gspca/mr97310a.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                778 drivers/media/usb/gspca/mr97310a.c 	if (sd->do_lcd_stop)
sd                784 drivers/media/usb/gspca/mr97310a.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                790 drivers/media/usb/gspca/mr97310a.c 	if (sd->cam_type == CAM_TYPE_VGA) {
sd                803 drivers/media/usb/gspca/mr97310a.c 	if (sd->do_lcd_stop)
sd                811 drivers/media/usb/gspca/mr97310a.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                815 drivers/media/usb/gspca/mr97310a.c 	if (sd->cam_type == CAM_TYPE_CIF && sd->sensor_type == 1) {
sd                821 drivers/media/usb/gspca/mr97310a.c 	} else if (sd->sensor_type == 2) {
sd                842 drivers/media/usb/gspca/mr97310a.c 		if (sd->cam_type == CAM_TYPE_VGA && clockdiv < 4)
sd                863 drivers/media/usb/gspca/mr97310a.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                866 drivers/media/usb/gspca/mr97310a.c 	if (sd->cam_type == CAM_TYPE_CIF && sd->sensor_type == 1)
sd                868 drivers/media/usb/gspca/mr97310a.c 	else if (sd->cam_type == CAM_TYPE_VGA && sd->sensor_type == 2)
sd                886 drivers/media/usb/gspca/mr97310a.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                901 drivers/media/usb/gspca/mr97310a.c 		setexposure(gspca_dev, sd->exposure->val,
sd                902 drivers/media/usb/gspca/mr97310a.c 			    sd->min_clockdiv ? sd->min_clockdiv->val : 0);
sd                917 drivers/media/usb/gspca/mr97310a.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                941 drivers/media/usb/gspca/mr97310a.c 	if (sd->cam_type == CAM_TYPE_CIF) {
sd                943 drivers/media/usb/gspca/mr97310a.c 		if (sd->sensor_type == 0)
sd                949 drivers/media/usb/gspca/mr97310a.c 		if (sd->sensor_type == 0)
sd                951 drivers/media/usb/gspca/mr97310a.c 		else if (sd->sensor_type == 2)
sd                953 drivers/media/usb/gspca/mr97310a.c 		else if (sd->do_lcd_stop)
sd                991 drivers/media/usb/gspca/mr97310a.c 		sd->exposure = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                995 drivers/media/usb/gspca/mr97310a.c 		sd->min_clockdiv = v4l2_ctrl_new_custom(hdl, &clockdiv, NULL);
sd               1002 drivers/media/usb/gspca/mr97310a.c 		v4l2_ctrl_cluster(2, &sd->exposure);
sd               1013 drivers/media/usb/gspca/mr97310a.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1016 drivers/media/usb/gspca/mr97310a.c 	sof = pac_find_sof(gspca_dev, &sd->sof_read, data, len);
sd               1062 drivers/media/usb/gspca/mr97310a.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd               1653 drivers/media/usb/gspca/nw80x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1656 drivers/media/usb/gspca/nw80x.c 	switch (sd->webcam) {
sd               1672 drivers/media/usb/gspca/nw80x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1675 drivers/media/usb/gspca/nw80x.c 	switch (sd->webcam) {
sd               1693 drivers/media/usb/gspca/nw80x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1697 drivers/media/usb/gspca/nw80x.c 		sd->ag_cnt = -1;
sd               1700 drivers/media/usb/gspca/nw80x.c 	sd->ag_cnt = AG_CNT_START;
sd               1704 drivers/media/usb/gspca/nw80x.c 		sd->ae_res = gspca_dev->pixfmt.width * gspca_dev->pixfmt.height;
sd               1711 drivers/media/usb/gspca/nw80x.c 		sd->ae_res = h * w;
sd               1712 drivers/media/usb/gspca/nw80x.c 		if (sd->ae_res == 0)
sd               1713 drivers/media/usb/gspca/nw80x.c 			sd->ae_res = gspca_dev->pixfmt.width *
sd               1735 drivers/media/usb/gspca/nw80x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1739 drivers/media/usb/gspca/nw80x.c 	sd->webcam = webcam;
sd               1741 drivers/media/usb/gspca/nw80x.c 	sd->ag_cnt = -1;
sd               1753 drivers/media/usb/gspca/nw80x.c 		sd->bridge = BRIDGE_NW802;
sd               1754 drivers/media/usb/gspca/nw80x.c 		if (sd->webcam == Generic800)
sd               1755 drivers/media/usb/gspca/nw80x.c 			sd->webcam = Generic802;
sd               1757 drivers/media/usb/gspca/nw80x.c 		sd->bridge = BRIDGE_NW801;
sd               1758 drivers/media/usb/gspca/nw80x.c 		if (sd->webcam == Generic800)
sd               1759 drivers/media/usb/gspca/nw80x.c 			sd->webcam = P35u;
sd               1766 drivers/media/usb/gspca/nw80x.c 			if (sd->webcam == Generic800)
sd               1767 drivers/media/usb/gspca/nw80x.c 				sd->webcam = SpaceCam;
sd               1770 drivers/media/usb/gspca/nw80x.c 			if (sd->webcam == Generic800)
sd               1771 drivers/media/usb/gspca/nw80x.c 				sd->webcam = Twinkle;
sd               1774 drivers/media/usb/gspca/nw80x.c 			if (sd->webcam == Generic800)
sd               1775 drivers/media/usb/gspca/nw80x.c 				sd->webcam = SpaceCam2;
sd               1779 drivers/media/usb/gspca/nw80x.c 	if (webcam_chip[sd->webcam] != sd->bridge) {
sd               1781 drivers/media/usb/gspca/nw80x.c 		       sd->webcam, sd->bridge);
sd               1786 drivers/media/usb/gspca/nw80x.c 		  sd->bridge, sd->webcam);
sd               1788 drivers/media/usb/gspca/nw80x.c 	if (sd->bridge == BRIDGE_NW800) {
sd               1789 drivers/media/usb/gspca/nw80x.c 		switch (sd->webcam) {
sd               1800 drivers/media/usb/gspca/nw80x.c 		switch (sd->webcam) {
sd               1818 drivers/media/usb/gspca/nw80x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1820 drivers/media/usb/gspca/nw80x.c 	switch (sd->bridge) {
sd               1822 drivers/media/usb/gspca/nw80x.c 		switch (sd->webcam) {
sd               1832 drivers/media/usb/gspca/nw80x.c 		switch (sd->webcam) {
sd               1847 drivers/media/usb/gspca/nw80x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1850 drivers/media/usb/gspca/nw80x.c 	cmd = webcam_start[sd->webcam];
sd               1852 drivers/media/usb/gspca/nw80x.c 	switch (sd->webcam) {
sd               1876 drivers/media/usb/gspca/nw80x.c 	sd->exp_too_high_cnt = 0;
sd               1877 drivers/media/usb/gspca/nw80x.c 	sd->exp_too_low_cnt = 0;
sd               1883 drivers/media/usb/gspca/nw80x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1887 drivers/media/usb/gspca/nw80x.c 	if (sd->bridge != BRIDGE_NW801) {
sd               1893 drivers/media/usb/gspca/nw80x.c 	switch (sd->webcam) {
sd               1937 drivers/media/usb/gspca/nw80x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1940 drivers/media/usb/gspca/nw80x.c 	if (sd->ag_cnt < 0)
sd               1942 drivers/media/usb/gspca/nw80x.c 	if (--sd->ag_cnt >= 0)
sd               1944 drivers/media/usb/gspca/nw80x.c 	sd->ag_cnt = AG_CNT_START;
sd               1947 drivers/media/usb/gspca/nw80x.c 	reg_r(gspca_dev, sd->bridge == BRIDGE_NW801 ? 0x080d : 0x080c, 4);
sd               1950 drivers/media/usb/gspca/nw80x.c 	luma /= sd->ae_res;
sd               1952 drivers/media/usb/gspca/nw80x.c 	switch (sd->webcam) {
sd               2001 drivers/media/usb/gspca/nw80x.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               2006 drivers/media/usb/gspca/nw80x.c 	switch (sd->webcam) {
sd               2073 drivers/media/usb/gspca/nw80x.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd               1989 drivers/media/usb/gspca/ov519.c static void reg_w(struct sd *sd, u16 index, u16 value)
sd               1991 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               1994 drivers/media/usb/gspca/ov519.c 	if (sd->gspca_dev.usb_err < 0)
sd               2000 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               2011 drivers/media/usb/gspca/ov519.c 		ret = usb_control_msg(sd->gspca_dev.dev,
sd               2012 drivers/media/usb/gspca/ov519.c 			usb_sndctrlpipe(sd->gspca_dev.dev, 0),
sd               2023 drivers/media/usb/gspca/ov519.c 	sd->gspca_dev.usb_buf[0] = value;
sd               2024 drivers/media/usb/gspca/ov519.c 	ret = usb_control_msg(sd->gspca_dev.dev,
sd               2025 drivers/media/usb/gspca/ov519.c 			usb_sndctrlpipe(sd->gspca_dev.dev, 0),
sd               2029 drivers/media/usb/gspca/ov519.c 			sd->gspca_dev.usb_buf, 1, 500);
sd               2033 drivers/media/usb/gspca/ov519.c 		sd->gspca_dev.usb_err = ret;
sd               2040 drivers/media/usb/gspca/ov519.c static int reg_r(struct sd *sd, u16 index)
sd               2042 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2046 drivers/media/usb/gspca/ov519.c 	if (sd->gspca_dev.usb_err < 0)
sd               2049 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               2063 drivers/media/usb/gspca/ov519.c 	ret = usb_control_msg(sd->gspca_dev.dev,
sd               2064 drivers/media/usb/gspca/ov519.c 			usb_rcvctrlpipe(sd->gspca_dev.dev, 0),
sd               2067 drivers/media/usb/gspca/ov519.c 			0, index, sd->gspca_dev.usb_buf, 1, 500);
sd               2070 drivers/media/usb/gspca/ov519.c 		ret = sd->gspca_dev.usb_buf[0];
sd               2075 drivers/media/usb/gspca/ov519.c 		sd->gspca_dev.usb_err = ret;
sd               2087 drivers/media/usb/gspca/ov519.c static int reg_r8(struct sd *sd,
sd               2090 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2093 drivers/media/usb/gspca/ov519.c 	if (sd->gspca_dev.usb_err < 0)
sd               2098 drivers/media/usb/gspca/ov519.c 	ret = usb_control_msg(sd->gspca_dev.dev,
sd               2099 drivers/media/usb/gspca/ov519.c 			usb_rcvctrlpipe(sd->gspca_dev.dev, 0),
sd               2102 drivers/media/usb/gspca/ov519.c 			0, index, sd->gspca_dev.usb_buf, 8, 500);
sd               2105 drivers/media/usb/gspca/ov519.c 		ret = sd->gspca_dev.usb_buf[0];
sd               2108 drivers/media/usb/gspca/ov519.c 		sd->gspca_dev.usb_err = ret;
sd               2125 drivers/media/usb/gspca/ov519.c static void reg_w_mask(struct sd *sd,
sd               2135 drivers/media/usb/gspca/ov519.c 		ret = reg_r(sd, index);
sd               2142 drivers/media/usb/gspca/ov519.c 	reg_w(sd, index, value);
sd               2149 drivers/media/usb/gspca/ov519.c static void ov518_reg_w32(struct sd *sd, u16 index, u32 value, int n)
sd               2151 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2154 drivers/media/usb/gspca/ov519.c 	if (sd->gspca_dev.usb_err < 0)
sd               2157 drivers/media/usb/gspca/ov519.c 	*((__le32 *) sd->gspca_dev.usb_buf) = __cpu_to_le32(value);
sd               2161 drivers/media/usb/gspca/ov519.c 	ret = usb_control_msg(sd->gspca_dev.dev,
sd               2162 drivers/media/usb/gspca/ov519.c 			usb_sndctrlpipe(sd->gspca_dev.dev, 0),
sd               2166 drivers/media/usb/gspca/ov519.c 			sd->gspca_dev.usb_buf, n, 500);
sd               2169 drivers/media/usb/gspca/ov519.c 		sd->gspca_dev.usb_err = ret;
sd               2173 drivers/media/usb/gspca/ov519.c static void ov511_i2c_w(struct sd *sd, u8 reg, u8 value)
sd               2175 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2183 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R51x_I2C_SADDR_3, reg);
sd               2186 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R51x_I2C_DATA, value);
sd               2189 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R511_I2C_CTL, 0x01);
sd               2192 drivers/media/usb/gspca/ov519.c 			rc = reg_r(sd, R511_I2C_CTL);
sd               2207 drivers/media/usb/gspca/ov519.c static int ov511_i2c_r(struct sd *sd, u8 reg)
sd               2209 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2215 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R51x_I2C_SADDR_2, reg);
sd               2218 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R511_I2C_CTL, 0x03);
sd               2221 drivers/media/usb/gspca/ov519.c 			rc = reg_r(sd, R511_I2C_CTL);
sd               2231 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R511_I2C_CTL, 0x10);
sd               2242 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R511_I2C_CTL, 0x05);
sd               2245 drivers/media/usb/gspca/ov519.c 			rc = reg_r(sd, R511_I2C_CTL);
sd               2255 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R511_I2C_CTL, 0x10);
sd               2263 drivers/media/usb/gspca/ov519.c 	value = reg_r(sd, R51x_I2C_DATA);
sd               2268 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R511_I2C_CTL, 0x05);
sd               2278 drivers/media/usb/gspca/ov519.c static void ov518_i2c_w(struct sd *sd,
sd               2282 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2287 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R51x_I2C_SADDR_3, reg);
sd               2290 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R51x_I2C_DATA, value);
sd               2293 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R518_I2C_CTL, 0x01);
sd               2297 drivers/media/usb/gspca/ov519.c 	reg_r8(sd, R518_I2C_CTL);
sd               2307 drivers/media/usb/gspca/ov519.c static int ov518_i2c_r(struct sd *sd, u8 reg)
sd               2309 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2313 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R51x_I2C_SADDR_2, reg);
sd               2316 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R518_I2C_CTL, 0x03);
sd               2317 drivers/media/usb/gspca/ov519.c 	reg_r8(sd, R518_I2C_CTL);
sd               2320 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R518_I2C_CTL, 0x05);
sd               2321 drivers/media/usb/gspca/ov519.c 	reg_r8(sd, R518_I2C_CTL);
sd               2323 drivers/media/usb/gspca/ov519.c 	value = reg_r(sd, R51x_I2C_DATA);
sd               2328 drivers/media/usb/gspca/ov519.c static void ovfx2_i2c_w(struct sd *sd, u8 reg, u8 value)
sd               2330 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2333 drivers/media/usb/gspca/ov519.c 	if (sd->gspca_dev.usb_err < 0)
sd               2336 drivers/media/usb/gspca/ov519.c 	ret = usb_control_msg(sd->gspca_dev.dev,
sd               2337 drivers/media/usb/gspca/ov519.c 			usb_sndctrlpipe(sd->gspca_dev.dev, 0),
sd               2344 drivers/media/usb/gspca/ov519.c 		sd->gspca_dev.usb_err = ret;
sd               2350 drivers/media/usb/gspca/ov519.c static int ovfx2_i2c_r(struct sd *sd, u8 reg)
sd               2352 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2355 drivers/media/usb/gspca/ov519.c 	if (sd->gspca_dev.usb_err < 0)
sd               2358 drivers/media/usb/gspca/ov519.c 	ret = usb_control_msg(sd->gspca_dev.dev,
sd               2359 drivers/media/usb/gspca/ov519.c 			usb_rcvctrlpipe(sd->gspca_dev.dev, 0),
sd               2362 drivers/media/usb/gspca/ov519.c 			0, (u16) reg, sd->gspca_dev.usb_buf, 1, 500);
sd               2365 drivers/media/usb/gspca/ov519.c 		ret = sd->gspca_dev.usb_buf[0];
sd               2370 drivers/media/usb/gspca/ov519.c 		sd->gspca_dev.usb_err = ret;
sd               2376 drivers/media/usb/gspca/ov519.c static void i2c_w(struct sd *sd, u8 reg, u8 value)
sd               2378 drivers/media/usb/gspca/ov519.c 	if (sd->sensor_reg_cache[reg] == value)
sd               2381 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               2384 drivers/media/usb/gspca/ov519.c 		ov511_i2c_w(sd, reg, value);
sd               2389 drivers/media/usb/gspca/ov519.c 		ov518_i2c_w(sd, reg, value);
sd               2392 drivers/media/usb/gspca/ov519.c 		ovfx2_i2c_w(sd, reg, value);
sd               2395 drivers/media/usb/gspca/ov519.c 		w9968cf_i2c_w(sd, reg, value);
sd               2399 drivers/media/usb/gspca/ov519.c 	if (sd->gspca_dev.usb_err >= 0) {
sd               2402 drivers/media/usb/gspca/ov519.c 			memset(sd->sensor_reg_cache, -1,
sd               2403 drivers/media/usb/gspca/ov519.c 				sizeof(sd->sensor_reg_cache));
sd               2405 drivers/media/usb/gspca/ov519.c 			sd->sensor_reg_cache[reg] = value;
sd               2409 drivers/media/usb/gspca/ov519.c static int i2c_r(struct sd *sd, u8 reg)
sd               2413 drivers/media/usb/gspca/ov519.c 	if (sd->sensor_reg_cache[reg] != -1)
sd               2414 drivers/media/usb/gspca/ov519.c 		return sd->sensor_reg_cache[reg];
sd               2416 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               2419 drivers/media/usb/gspca/ov519.c 		ret = ov511_i2c_r(sd, reg);
sd               2424 drivers/media/usb/gspca/ov519.c 		ret = ov518_i2c_r(sd, reg);
sd               2427 drivers/media/usb/gspca/ov519.c 		ret = ovfx2_i2c_r(sd, reg);
sd               2430 drivers/media/usb/gspca/ov519.c 		ret = w9968cf_i2c_r(sd, reg);
sd               2435 drivers/media/usb/gspca/ov519.c 		sd->sensor_reg_cache[reg] = ret;
sd               2445 drivers/media/usb/gspca/ov519.c static void i2c_w_mask(struct sd *sd,
sd               2454 drivers/media/usb/gspca/ov519.c 	rc = i2c_r(sd, reg);
sd               2459 drivers/media/usb/gspca/ov519.c 	i2c_w(sd, reg, value);
sd               2464 drivers/media/usb/gspca/ov519.c static inline void ov51x_stop(struct sd *sd)
sd               2466 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2469 drivers/media/usb/gspca/ov519.c 	sd->stopped = 1;
sd               2470 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               2473 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R51x_SYS_RESET, 0x3d);
sd               2477 drivers/media/usb/gspca/ov519.c 		reg_w_mask(sd, R51x_SYS_RESET, 0x3a, 0x3a);
sd               2480 drivers/media/usb/gspca/ov519.c 		reg_w(sd, OV519_R51_RESET1, 0x0f);
sd               2481 drivers/media/usb/gspca/ov519.c 		reg_w(sd, OV519_R51_RESET1, 0x00);
sd               2482 drivers/media/usb/gspca/ov519.c 		reg_w(sd, 0x22, 0x00);		/* FRAR */
sd               2485 drivers/media/usb/gspca/ov519.c 		reg_w_mask(sd, 0x0f, 0x00, 0x02);
sd               2488 drivers/media/usb/gspca/ov519.c 		reg_w(sd, 0x3c, 0x0a05); /* stop USB transfer */
sd               2495 drivers/media/usb/gspca/ov519.c static inline void ov51x_restart(struct sd *sd)
sd               2497 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2500 drivers/media/usb/gspca/ov519.c 	if (!sd->stopped)
sd               2502 drivers/media/usb/gspca/ov519.c 	sd->stopped = 0;
sd               2505 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               2508 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R51x_SYS_RESET, 0x00);
sd               2512 drivers/media/usb/gspca/ov519.c 		reg_w(sd, 0x2f, 0x80);
sd               2513 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R51x_SYS_RESET, 0x00);
sd               2516 drivers/media/usb/gspca/ov519.c 		reg_w(sd, OV519_R51_RESET1, 0x0f);
sd               2517 drivers/media/usb/gspca/ov519.c 		reg_w(sd, OV519_R51_RESET1, 0x00);
sd               2518 drivers/media/usb/gspca/ov519.c 		reg_w(sd, 0x22, 0x1d);		/* FRAR */
sd               2521 drivers/media/usb/gspca/ov519.c 		reg_w_mask(sd, 0x0f, 0x02, 0x02);
sd               2524 drivers/media/usb/gspca/ov519.c 		reg_w(sd, 0x3c, 0x8a05); /* USB FIFO enable */
sd               2529 drivers/media/usb/gspca/ov519.c static void ov51x_set_slave_ids(struct sd *sd, u8 slave);
sd               2534 drivers/media/usb/gspca/ov519.c static int init_ov_sensor(struct sd *sd, u8 slave)
sd               2537 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2539 drivers/media/usb/gspca/ov519.c 	ov51x_set_slave_ids(sd, slave);
sd               2542 drivers/media/usb/gspca/ov519.c 	i2c_w(sd, 0x12, 0x80);
sd               2548 drivers/media/usb/gspca/ov519.c 		if (i2c_r(sd, OV7610_REG_ID_HIGH) == 0x7f &&
sd               2549 drivers/media/usb/gspca/ov519.c 		    i2c_r(sd, OV7610_REG_ID_LOW) == 0xa2) {
sd               2556 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, 0x12, 0x80);
sd               2562 drivers/media/usb/gspca/ov519.c 		if (i2c_r(sd, 0x00) < 0)
sd               2573 drivers/media/usb/gspca/ov519.c static void ov51x_set_slave_ids(struct sd *sd,
sd               2576 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               2578 drivers/media/usb/gspca/ov519.c 		reg_w(sd, OVFX2_I2C_ADDR, slave);
sd               2581 drivers/media/usb/gspca/ov519.c 		sd->sensor_addr = slave;
sd               2585 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R51x_I2C_W_SID, slave);
sd               2586 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R51x_I2C_R_SID, slave + 1);
sd               2589 drivers/media/usb/gspca/ov519.c static void write_regvals(struct sd *sd,
sd               2594 drivers/media/usb/gspca/ov519.c 		reg_w(sd, regvals->reg, regvals->val);
sd               2599 drivers/media/usb/gspca/ov519.c static void write_i2c_regvals(struct sd *sd,
sd               2604 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, regvals->reg, regvals->val);
sd               2616 drivers/media/usb/gspca/ov519.c static void ov_hires_configure(struct sd *sd)
sd               2618 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2621 drivers/media/usb/gspca/ov519.c 	if (sd->bridge != BRIDGE_OVFX2) {
sd               2629 drivers/media/usb/gspca/ov519.c 	high = i2c_r(sd, 0x0a);
sd               2630 drivers/media/usb/gspca/ov519.c 	low = i2c_r(sd, 0x0b);
sd               2637 drivers/media/usb/gspca/ov519.c 			sd->sensor = SEN_OV2610;
sd               2641 drivers/media/usb/gspca/ov519.c 			sd->sensor = SEN_OV2610AE;
sd               2645 drivers/media/usb/gspca/ov519.c 			sd->sensor = SEN_OV9600;
sd               2652 drivers/media/usb/gspca/ov519.c 			sd->sensor = SEN_OV3610;
sd               2664 drivers/media/usb/gspca/ov519.c static void ov8xx0_configure(struct sd *sd)
sd               2666 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2672 drivers/media/usb/gspca/ov519.c 	rc = i2c_r(sd, OV7610_REG_COM_I);
sd               2678 drivers/media/usb/gspca/ov519.c 		sd->sensor = SEN_OV8610;
sd               2687 drivers/media/usb/gspca/ov519.c static void ov7xx0_configure(struct sd *sd)
sd               2689 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2695 drivers/media/usb/gspca/ov519.c 	rc = i2c_r(sd, OV7610_REG_COM_I);
sd               2705 drivers/media/usb/gspca/ov519.c 		high = i2c_r(sd, 0x0a);
sd               2706 drivers/media/usb/gspca/ov519.c 		low = i2c_r(sd, 0x0b);
sd               2711 drivers/media/usb/gspca/ov519.c 			sd->sensor = SEN_OV7670;
sd               2714 drivers/media/usb/gspca/ov519.c 			sd->sensor = SEN_OV7610;
sd               2718 drivers/media/usb/gspca/ov519.c 		if (i2c_r(sd, 0x15) & 1) {
sd               2720 drivers/media/usb/gspca/ov519.c 			sd->sensor = SEN_OV7620AE;
sd               2723 drivers/media/usb/gspca/ov519.c 			sd->sensor = SEN_OV76BE;
sd               2727 drivers/media/usb/gspca/ov519.c 		high = i2c_r(sd, 0x0a);
sd               2732 drivers/media/usb/gspca/ov519.c 		low = i2c_r(sd, 0x0b);
sd               2745 drivers/media/usb/gspca/ov519.c 				sd->sensor = SEN_OV7640; /* FIXME */
sd               2749 drivers/media/usb/gspca/ov519.c 				sd->sensor = SEN_OV7640; /* FIXME */
sd               2753 drivers/media/usb/gspca/ov519.c 				sd->sensor = SEN_OV7648;
sd               2757 drivers/media/usb/gspca/ov519.c 				sd->sensor = SEN_OV7660;
sd               2766 drivers/media/usb/gspca/ov519.c 			sd->sensor = SEN_OV7620;
sd               2775 drivers/media/usb/gspca/ov519.c static void ov6xx0_configure(struct sd *sd)
sd               2777 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2783 drivers/media/usb/gspca/ov519.c 	rc = i2c_r(sd, OV7610_REG_COM_I);
sd               2794 drivers/media/usb/gspca/ov519.c 		sd->sensor = SEN_OV6630;
sd               2798 drivers/media/usb/gspca/ov519.c 		sd->sensor = SEN_OV6620;
sd               2802 drivers/media/usb/gspca/ov519.c 		sd->sensor = SEN_OV6630;
sd               2806 drivers/media/usb/gspca/ov519.c 		sd->sensor = SEN_OV66308AF;
sd               2810 drivers/media/usb/gspca/ov519.c 		sd->sensor = SEN_OV6630;
sd               2820 drivers/media/usb/gspca/ov519.c 	sd->sif = 1;
sd               2824 drivers/media/usb/gspca/ov519.c static void ov51x_led_control(struct sd *sd, int on)
sd               2826 drivers/media/usb/gspca/ov519.c 	if (sd->invert_led)
sd               2829 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               2832 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R511_SYS_LED_CTL, on);
sd               2836 drivers/media/usb/gspca/ov519.c 		reg_w_mask(sd, R518_GPIO_OUT, 0x02 * on, 0x02);
sd               2839 drivers/media/usb/gspca/ov519.c 		reg_w_mask(sd, OV519_GPIO_DATA_OUT0, on, 1);
sd               2846 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2848 drivers/media/usb/gspca/ov519.c 	if (!sd->snapshot_needs_reset)
sd               2854 drivers/media/usb/gspca/ov519.c 	sd->snapshot_needs_reset = 0;
sd               2856 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               2859 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R51x_SYS_SNAP, 0x02);
sd               2860 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R51x_SYS_SNAP, 0x00);
sd               2864 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R51x_SYS_SNAP, 0x02); /* Reset */
sd               2865 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R51x_SYS_SNAP, 0x01); /* Enable */
sd               2868 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R51x_SYS_RESET, 0x40);
sd               2869 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R51x_SYS_RESET, 0x00);
sd               2874 drivers/media/usb/gspca/ov519.c static void ov51x_upload_quan_tables(struct sd *sd)
sd               2912 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               2919 drivers/media/usb/gspca/ov519.c 	if (sd->bridge == BRIDGE_OV511 || sd->bridge == BRIDGE_OV511PLUS) {
sd               2935 drivers/media/usb/gspca/ov519.c 		reg_w(sd, reg, val0);
sd               2942 drivers/media/usb/gspca/ov519.c 		reg_w(sd, reg + size, val0);
sd               2951 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2996 drivers/media/usb/gspca/ov519.c 		  reg_r(sd, R51x_SYS_CUST_ID));
sd               2998 drivers/media/usb/gspca/ov519.c 	write_regvals(sd, init_511, ARRAY_SIZE(init_511));
sd               3000 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               3002 drivers/media/usb/gspca/ov519.c 		write_regvals(sd, norm_511, ARRAY_SIZE(norm_511));
sd               3005 drivers/media/usb/gspca/ov519.c 		write_regvals(sd, norm_511_p, ARRAY_SIZE(norm_511_p));
sd               3010 drivers/media/usb/gspca/ov519.c 	write_regvals(sd, compress_511, ARRAY_SIZE(compress_511));
sd               3012 drivers/media/usb/gspca/ov519.c 	ov51x_upload_quan_tables(sd);
sd               3018 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3065 drivers/media/usb/gspca/ov519.c 	sd->revision = reg_r(sd, R51x_SYS_CUST_ID) & 0x1f;
sd               3066 drivers/media/usb/gspca/ov519.c 	gspca_dbg(gspca_dev, D_PROBE, "Device revision %d\n", sd->revision);
sd               3068 drivers/media/usb/gspca/ov519.c 	write_regvals(sd, init_518, ARRAY_SIZE(init_518));
sd               3071 drivers/media/usb/gspca/ov519.c 	reg_w_mask(sd, R518_GPIO_CTL, 0x00, 0x02);
sd               3073 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               3075 drivers/media/usb/gspca/ov519.c 		write_regvals(sd, norm_518, ARRAY_SIZE(norm_518));
sd               3078 drivers/media/usb/gspca/ov519.c 		write_regvals(sd, norm_518_p, ARRAY_SIZE(norm_518_p));
sd               3082 drivers/media/usb/gspca/ov519.c 	ov51x_upload_quan_tables(sd);
sd               3084 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x2f, 0x80);
sd               3087 drivers/media/usb/gspca/ov519.c static void ov519_configure(struct sd *sd)
sd               3105 drivers/media/usb/gspca/ov519.c 	write_regvals(sd, init_519, ARRAY_SIZE(init_519));
sd               3108 drivers/media/usb/gspca/ov519.c static void ovfx2_configure(struct sd *sd)
sd               3120 drivers/media/usb/gspca/ov519.c 	sd->stopped = 1;
sd               3122 drivers/media/usb/gspca/ov519.c 	write_regvals(sd, init_fx2, ARRAY_SIZE(init_fx2));
sd               3127 drivers/media/usb/gspca/ov519.c static void ov519_set_mode(struct sd *sd)
sd               3154 drivers/media/usb/gspca/ov519.c 	write_regvals(sd, bridge_ov7660[sd->gspca_dev.curr_mode],
sd               3156 drivers/media/usb/gspca/ov519.c 	write_i2c_regvals(sd, sensor_ov7660[sd->gspca_dev.curr_mode],
sd               3158 drivers/media/usb/gspca/ov519.c 	write_i2c_regvals(sd, sensor_ov7660_2,
sd               3164 drivers/media/usb/gspca/ov519.c static void ov519_set_fr(struct sd *sd)
sd               3189 drivers/media/usb/gspca/ov519.c 		sd->frame_rate = frame_rate;
sd               3190 drivers/media/usb/gspca/ov519.c 	if (sd->frame_rate >= 30)
sd               3192 drivers/media/usb/gspca/ov519.c 	else if (sd->frame_rate >= 25)
sd               3194 drivers/media/usb/gspca/ov519.c 	else if (sd->frame_rate >= 20)
sd               3196 drivers/media/usb/gspca/ov519.c 	else if (sd->frame_rate >= 15)
sd               3198 drivers/media/usb/gspca/ov519.c 	else if (sd->frame_rate >= 10)
sd               3202 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0xa4, fr_tb[sd->gspca_dev.curr_mode][fr][0]);
sd               3203 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x23, fr_tb[sd->gspca_dev.curr_mode][fr][1]);
sd               3204 drivers/media/usb/gspca/ov519.c 	clock = fr_tb[sd->gspca_dev.curr_mode][fr][2];
sd               3205 drivers/media/usb/gspca/ov519.c 	if (sd->sensor == SEN_OV7660)
sd               3207 drivers/media/usb/gspca/ov519.c 	ov518_i2c_w(sd, OV7670_R11_CLKRC, clock);
sd               3212 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3214 drivers/media/usb/gspca/ov519.c 	i2c_w_mask(sd, 0x13, val ? 0x05 : 0x00, 0x05);
sd               3221 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3224 drivers/media/usb/gspca/ov519.c 	sd->bridge = id->driver_info & BRIDGE_MASK;
sd               3225 drivers/media/usb/gspca/ov519.c 	sd->invert_led = (id->driver_info & BRIDGE_INVERT_LED) != 0;
sd               3227 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               3255 drivers/media/usb/gspca/ov519.c 	sd->frame_rate = 15;
sd               3263 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3266 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               3276 drivers/media/usb/gspca/ov519.c 		ov519_configure(sd);
sd               3279 drivers/media/usb/gspca/ov519.c 		ovfx2_configure(sd);
sd               3282 drivers/media/usb/gspca/ov519.c 		w9968cf_configure(sd);
sd               3289 drivers/media/usb/gspca/ov519.c 	sd->sensor = -1;
sd               3292 drivers/media/usb/gspca/ov519.c 	if (init_ov_sensor(sd, OV7xx0_SID) >= 0) {
sd               3293 drivers/media/usb/gspca/ov519.c 		ov7xx0_configure(sd);
sd               3296 drivers/media/usb/gspca/ov519.c 	} else if (init_ov_sensor(sd, OV6xx0_SID) >= 0) {
sd               3297 drivers/media/usb/gspca/ov519.c 		ov6xx0_configure(sd);
sd               3300 drivers/media/usb/gspca/ov519.c 	} else if (init_ov_sensor(sd, OV8xx0_SID) >= 0) {
sd               3301 drivers/media/usb/gspca/ov519.c 		ov8xx0_configure(sd);
sd               3304 drivers/media/usb/gspca/ov519.c 	} else if (init_ov_sensor(sd, OV_HIRES_SID) >= 0) {
sd               3305 drivers/media/usb/gspca/ov519.c 		ov_hires_configure(sd);
sd               3311 drivers/media/usb/gspca/ov519.c 	if (sd->sensor < 0)
sd               3314 drivers/media/usb/gspca/ov519.c 	ov51x_led_control(sd, 0);	/* turn LED off */
sd               3316 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               3319 drivers/media/usb/gspca/ov519.c 		if (sd->sif) {
sd               3326 drivers/media/usb/gspca/ov519.c 		if (sd->sif) {
sd               3332 drivers/media/usb/gspca/ov519.c 		if (sd->sif) {
sd               3338 drivers/media/usb/gspca/ov519.c 		switch (sd->sensor) {
sd               3353 drivers/media/usb/gspca/ov519.c 			if (sd->sif) {
sd               3361 drivers/media/usb/gspca/ov519.c 		if (sd->sif)
sd               3365 drivers/media/usb/gspca/ov519.c 		w9968cf_init(sd);
sd               3370 drivers/media/usb/gspca/ov519.c 	switch (sd->sensor) {
sd               3372 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, norm_2610, ARRAY_SIZE(norm_2610));
sd               3375 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x13, 0x27, 0x27);
sd               3378 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, norm_2610ae, ARRAY_SIZE(norm_2610ae));
sd               3381 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x13, 0x05, 0x05);
sd               3384 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, norm_3620b, ARRAY_SIZE(norm_3620b));
sd               3387 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x13, 0x27, 0x27);
sd               3390 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, norm_6x20, ARRAY_SIZE(norm_6x20));
sd               3394 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, norm_6x30, ARRAY_SIZE(norm_6x30));
sd               3399 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, norm_7610, ARRAY_SIZE(norm_7610));
sd               3400 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x0e, 0x00, 0x40);
sd               3404 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, norm_7620, ARRAY_SIZE(norm_7620));
sd               3408 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, norm_7640, ARRAY_SIZE(norm_7640));
sd               3411 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, OV7670_R12_COM7, OV7670_COM7_RESET);
sd               3413 drivers/media/usb/gspca/ov519.c 		reg_w(sd, OV519_R57_SNAPSHOT, 0x23);
sd               3414 drivers/media/usb/gspca/ov519.c 		write_regvals(sd, init_519_ov7660,
sd               3416 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, norm_7660, ARRAY_SIZE(norm_7660));
sd               3417 drivers/media/usb/gspca/ov519.c 		sd->gspca_dev.curr_mode = 1;	/* 640x480 */
sd               3418 drivers/media/usb/gspca/ov519.c 		ov519_set_mode(sd);
sd               3419 drivers/media/usb/gspca/ov519.c 		ov519_set_fr(sd);
sd               3421 drivers/media/usb/gspca/ov519.c 		ov51x_restart(sd);
sd               3422 drivers/media/usb/gspca/ov519.c 		ov51x_stop(sd);			/* not in win traces */
sd               3423 drivers/media/usb/gspca/ov519.c 		ov51x_led_control(sd, 0);
sd               3426 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, norm_7670, ARRAY_SIZE(norm_7670));
sd               3429 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, norm_8610, ARRAY_SIZE(norm_8610));
sd               3432 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, norm_9600, ARRAY_SIZE(norm_9600));
sd               3447 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3449 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               3464 drivers/media/usb/gspca/ov519.c static void ov511_mode_init_regs(struct sd *sd)
sd               3466 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               3472 drivers/media/usb/gspca/ov519.c 	intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
sd               3473 drivers/media/usb/gspca/ov519.c 	alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt);
sd               3476 drivers/media/usb/gspca/ov519.c 		sd->gspca_dev.usb_err = -EIO;
sd               3481 drivers/media/usb/gspca/ov519.c 		sd->gspca_dev.usb_err = -ENODEV;
sd               3486 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R51x_FIFO_PSIZE, packet_size >> 5);
sd               3488 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R511_CAM_UV_EN, 0x01);
sd               3489 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R511_SNAP_UV_EN, 0x01);
sd               3490 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R511_SNAP_OPTS, 0x03);
sd               3495 drivers/media/usb/gspca/ov519.c 	hsegs = (sd->gspca_dev.pixfmt.width >> 3) - 1;
sd               3496 drivers/media/usb/gspca/ov519.c 	vsegs = (sd->gspca_dev.pixfmt.height >> 3) - 1;
sd               3498 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R511_CAM_PXCNT, hsegs);
sd               3499 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R511_CAM_LNCNT, vsegs);
sd               3500 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R511_CAM_PXDIV, 0x00);
sd               3501 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R511_CAM_LNDIV, 0x00);
sd               3504 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R511_CAM_OPTS, 0x03);
sd               3507 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R511_SNAP_PXCNT, hsegs);
sd               3508 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R511_SNAP_LNCNT, vsegs);
sd               3509 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R511_SNAP_PXDIV, 0x00);
sd               3510 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R511_SNAP_LNDIV, 0x00);
sd               3514 drivers/media/usb/gspca/ov519.c 		sd->frame_rate = frame_rate;
sd               3516 drivers/media/usb/gspca/ov519.c 	switch (sd->sensor) {
sd               3519 drivers/media/usb/gspca/ov519.c 		sd->clockdiv = 3;
sd               3529 drivers/media/usb/gspca/ov519.c 		if (sd->gspca_dev.pixfmt.width == 320)
sd               3535 drivers/media/usb/gspca/ov519.c 		switch (sd->frame_rate) {
sd               3539 drivers/media/usb/gspca/ov519.c 			if (sd->gspca_dev.pixfmt.width != 640) {
sd               3540 drivers/media/usb/gspca/ov519.c 				sd->clockdiv = 0;
sd               3548 drivers/media/usb/gspca/ov519.c 			sd->clockdiv = 1;
sd               3551 drivers/media/usb/gspca/ov519.c 			sd->clockdiv = 2;
sd               3554 drivers/media/usb/gspca/ov519.c 			sd->clockdiv = 5;
sd               3558 drivers/media/usb/gspca/ov519.c 			sd->clockdiv = (sd->clockdiv + 1) * 2 - 1;
sd               3560 drivers/media/usb/gspca/ov519.c 			if (sd->clockdiv > 10)
sd               3561 drivers/media/usb/gspca/ov519.c 				sd->clockdiv = 10;
sd               3567 drivers/media/usb/gspca/ov519.c 		sd->clockdiv = 0;
sd               3572 drivers/media/usb/gspca/ov519.c 	fps = (interlaced ? 60 : 30) / (sd->clockdiv + 1) + 1;
sd               3573 drivers/media/usb/gspca/ov519.c 	needed = fps * sd->gspca_dev.pixfmt.width *
sd               3574 drivers/media/usb/gspca/ov519.c 			sd->gspca_dev.pixfmt.height * 3 / 2;
sd               3578 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R511_COMP_EN, 0x07);
sd               3579 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R511_COMP_LUT_EN, 0x03);
sd               3581 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R511_COMP_EN, 0x06);
sd               3582 drivers/media/usb/gspca/ov519.c 		reg_w(sd, R511_COMP_LUT_EN, 0x00);
sd               3585 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R51x_SYS_RESET, OV511_RESET_OMNICE);
sd               3586 drivers/media/usb/gspca/ov519.c 	reg_w(sd, R51x_SYS_RESET, 0);
sd               3596 drivers/media/usb/gspca/ov519.c static void ov518_mode_init_regs(struct sd *sd)
sd               3598 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               3603 drivers/media/usb/gspca/ov519.c 	intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
sd               3604 drivers/media/usb/gspca/ov519.c 	alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt);
sd               3607 drivers/media/usb/gspca/ov519.c 		sd->gspca_dev.usb_err = -EIO;
sd               3612 drivers/media/usb/gspca/ov519.c 		sd->gspca_dev.usb_err = -ENODEV;
sd               3617 drivers/media/usb/gspca/ov519.c 	ov518_reg_w32(sd, R51x_FIFO_PSIZE, packet_size & ~7, 2);
sd               3620 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x2b, 0);
sd               3621 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x2c, 0);
sd               3622 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x2d, 0);
sd               3623 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x2e, 0);
sd               3624 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x3b, 0);
sd               3625 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x3c, 0);
sd               3626 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x3d, 0);
sd               3627 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x3e, 0);
sd               3629 drivers/media/usb/gspca/ov519.c 	if (sd->bridge == BRIDGE_OV518) {
sd               3631 drivers/media/usb/gspca/ov519.c 		reg_w_mask(sd, 0x20, 0x08, 0x08);
sd               3634 drivers/media/usb/gspca/ov519.c 		reg_w_mask(sd, 0x28, 0x80, 0xf0);
sd               3635 drivers/media/usb/gspca/ov519.c 		reg_w_mask(sd, 0x38, 0x80, 0xf0);
sd               3637 drivers/media/usb/gspca/ov519.c 		reg_w(sd, 0x28, 0x80);
sd               3638 drivers/media/usb/gspca/ov519.c 		reg_w(sd, 0x38, 0x80);
sd               3641 drivers/media/usb/gspca/ov519.c 	hsegs = sd->gspca_dev.pixfmt.width / 16;
sd               3642 drivers/media/usb/gspca/ov519.c 	vsegs = sd->gspca_dev.pixfmt.height / 4;
sd               3644 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x29, hsegs);
sd               3645 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x2a, vsegs);
sd               3647 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x39, hsegs);
sd               3648 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x3a, vsegs);
sd               3651 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x2f, 0x80);
sd               3654 drivers/media/usb/gspca/ov519.c 	if (sd->bridge == BRIDGE_OV518PLUS && sd->revision == 0 &&
sd               3655 drivers/media/usb/gspca/ov519.c 					      sd->sensor == SEN_OV7620AE)
sd               3656 drivers/media/usb/gspca/ov519.c 		sd->clockdiv = 0;
sd               3658 drivers/media/usb/gspca/ov519.c 		sd->clockdiv = 1;
sd               3662 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x51, 0x04);
sd               3663 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x22, 0x18);
sd               3664 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x23, 0xff);
sd               3666 drivers/media/usb/gspca/ov519.c 	if (sd->bridge == BRIDGE_OV518PLUS) {
sd               3667 drivers/media/usb/gspca/ov519.c 		switch (sd->sensor) {
sd               3681 drivers/media/usb/gspca/ov519.c 			if (sd->revision > 0 &&
sd               3682 drivers/media/usb/gspca/ov519.c 					sd->gspca_dev.pixfmt.width == 640) {
sd               3683 drivers/media/usb/gspca/ov519.c 				reg_w(sd, 0x20, 0x60);
sd               3684 drivers/media/usb/gspca/ov519.c 				reg_w(sd, 0x21, 0x1f);
sd               3686 drivers/media/usb/gspca/ov519.c 				reg_w(sd, 0x20, 0x00);
sd               3687 drivers/media/usb/gspca/ov519.c 				reg_w(sd, 0x21, 0x19);
sd               3691 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0x20, 0x00);
sd               3692 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0x21, 0x19);
sd               3695 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0x21, 0x19);
sd               3698 drivers/media/usb/gspca/ov519.c 		reg_w(sd, 0x71, 0x17);	/* Compression-related? */
sd               3702 drivers/media/usb/gspca/ov519.c 	i2c_w(sd, 0x54, 0x23);
sd               3704 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x2f, 0x80);
sd               3706 drivers/media/usb/gspca/ov519.c 	if (sd->bridge == BRIDGE_OV518PLUS) {
sd               3707 drivers/media/usb/gspca/ov519.c 		reg_w(sd, 0x24, 0x94);
sd               3708 drivers/media/usb/gspca/ov519.c 		reg_w(sd, 0x25, 0x90);
sd               3709 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xc4,    400, 2);	/* 190h   */
sd               3710 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xc6,    540, 2);	/* 21ch   */
sd               3711 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xc7,    540, 2);	/* 21ch   */
sd               3712 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xc8,    108, 2);	/* 6ch    */
sd               3713 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xca, 131098, 3);	/* 2001ah */
sd               3714 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xcb,    532, 2);	/* 214h   */
sd               3715 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xcc,   2400, 2);	/* 960h   */
sd               3716 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xcd,     32, 2);	/* 20h    */
sd               3717 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xce,    608, 2);	/* 260h   */
sd               3719 drivers/media/usb/gspca/ov519.c 		reg_w(sd, 0x24, 0x9f);
sd               3720 drivers/media/usb/gspca/ov519.c 		reg_w(sd, 0x25, 0x90);
sd               3721 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xc4,    400, 2);	/* 190h   */
sd               3722 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xc6,    381, 2);	/* 17dh   */
sd               3723 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xc7,    381, 2);	/* 17dh   */
sd               3724 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xc8,    128, 2);	/* 80h    */
sd               3725 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xca, 183331, 3);	/* 2cc23h */
sd               3726 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xcb,    746, 2);	/* 2eah   */
sd               3727 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xcc,   1750, 2);	/* 6d6h   */
sd               3728 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xcd,     45, 2);	/* 2dh    */
sd               3729 drivers/media/usb/gspca/ov519.c 		ov518_reg_w32(sd, 0xce,    851, 2);	/* 353h   */
sd               3732 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x2f, 0x80);
sd               3742 drivers/media/usb/gspca/ov519.c static void ov519_mode_init_regs(struct sd *sd)
sd               3788 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               3791 drivers/media/usb/gspca/ov519.c 	switch (sd->sensor) {
sd               3793 drivers/media/usb/gspca/ov519.c 		write_regvals(sd, mode_init_519, ARRAY_SIZE(mode_init_519));
sd               3794 drivers/media/usb/gspca/ov519.c 		if (sd->sensor == SEN_OV7640 ||
sd               3795 drivers/media/usb/gspca/ov519.c 		    sd->sensor == SEN_OV7648) {
sd               3797 drivers/media/usb/gspca/ov519.c 			reg_w_mask(sd, OV519_R20_DFR, 0x10, 0x10);
sd               3803 drivers/media/usb/gspca/ov519.c 		write_regvals(sd, mode_init_519_ov7670,
sd               3808 drivers/media/usb/gspca/ov519.c 	reg_w(sd, OV519_R10_H_SIZE,	sd->gspca_dev.pixfmt.width >> 4);
sd               3809 drivers/media/usb/gspca/ov519.c 	reg_w(sd, OV519_R11_V_SIZE,	sd->gspca_dev.pixfmt.height >> 3);
sd               3810 drivers/media/usb/gspca/ov519.c 	if (sd->sensor == SEN_OV7670 &&
sd               3811 drivers/media/usb/gspca/ov519.c 	    sd->gspca_dev.cam.cam_mode[sd->gspca_dev.curr_mode].priv)
sd               3812 drivers/media/usb/gspca/ov519.c 		reg_w(sd, OV519_R12_X_OFFSETL, 0x04);
sd               3813 drivers/media/usb/gspca/ov519.c 	else if (sd->sensor == SEN_OV7648 &&
sd               3814 drivers/media/usb/gspca/ov519.c 	    sd->gspca_dev.cam.cam_mode[sd->gspca_dev.curr_mode].priv)
sd               3815 drivers/media/usb/gspca/ov519.c 		reg_w(sd, OV519_R12_X_OFFSETL, 0x01);
sd               3817 drivers/media/usb/gspca/ov519.c 		reg_w(sd, OV519_R12_X_OFFSETL, 0x00);
sd               3818 drivers/media/usb/gspca/ov519.c 	reg_w(sd, OV519_R13_X_OFFSETH,	0x00);
sd               3819 drivers/media/usb/gspca/ov519.c 	reg_w(sd, OV519_R14_Y_OFFSETL,	0x00);
sd               3820 drivers/media/usb/gspca/ov519.c 	reg_w(sd, OV519_R15_Y_OFFSETH,	0x00);
sd               3821 drivers/media/usb/gspca/ov519.c 	reg_w(sd, OV519_R16_DIVIDER,	0x00);
sd               3822 drivers/media/usb/gspca/ov519.c 	reg_w(sd, OV519_R25_FORMAT,	0x03); /* YUV422 */
sd               3823 drivers/media/usb/gspca/ov519.c 	reg_w(sd, 0x26,			0x00); /* Undocumented */
sd               3827 drivers/media/usb/gspca/ov519.c 		sd->frame_rate = frame_rate;
sd               3830 drivers/media/usb/gspca/ov519.c 	sd->clockdiv = 0;
sd               3831 drivers/media/usb/gspca/ov519.c 	switch (sd->sensor) {
sd               3834 drivers/media/usb/gspca/ov519.c 		switch (sd->frame_rate) {
sd               3837 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0xa4, 0x0c);
sd               3838 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0x23, 0xff);
sd               3841 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0xa4, 0x0c);
sd               3842 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0x23, 0x1f);
sd               3845 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0xa4, 0x0c);
sd               3846 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0x23, 0x1b);
sd               3849 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0xa4, 0x04);
sd               3850 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0x23, 0xff);
sd               3851 drivers/media/usb/gspca/ov519.c 			sd->clockdiv = 1;
sd               3854 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0xa4, 0x04);
sd               3855 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0x23, 0x1f);
sd               3856 drivers/media/usb/gspca/ov519.c 			sd->clockdiv = 1;
sd               3859 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0xa4, 0x04);
sd               3860 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0x23, 0x1b);
sd               3861 drivers/media/usb/gspca/ov519.c 			sd->clockdiv = 1;
sd               3866 drivers/media/usb/gspca/ov519.c 		switch (sd->frame_rate) {
sd               3869 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0xa4, 0x06);
sd               3870 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0x23, 0xff);
sd               3873 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0xa4, 0x06);
sd               3874 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0x23, 0x1f);
sd               3877 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0xa4, 0x06);
sd               3878 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0x23, 0x1b);
sd               3884 drivers/media/usb/gspca/ov519.c 			  (sd->frame_rate == 0) ? 15 : sd->frame_rate);
sd               3885 drivers/media/usb/gspca/ov519.c 		reg_w(sd, 0xa4, 0x10);
sd               3886 drivers/media/usb/gspca/ov519.c 		switch (sd->frame_rate) {
sd               3888 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0x23, 0xff);
sd               3891 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0x23, 0x1b);
sd               3895 drivers/media/usb/gspca/ov519.c 			reg_w(sd, 0x23, 0xff);
sd               3896 drivers/media/usb/gspca/ov519.c 			sd->clockdiv = 1;
sd               3903 drivers/media/usb/gspca/ov519.c static void mode_init_ov_sensor_regs(struct sd *sd)
sd               3905 drivers/media/usb/gspca/ov519.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd               3912 drivers/media/usb/gspca/ov519.c 	switch (sd->sensor) {
sd               3914 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x14, qvga ? 0x20 : 0x00, 0x20);
sd               3915 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x28, qvga ? 0x00 : 0x20, 0x20);
sd               3916 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, 0x24, qvga ? 0x20 : 0x3a);
sd               3917 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, 0x25, qvga ? 0x30 : 0x60);
sd               3918 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x2d, qvga ? 0x40 : 0x00, 0x40);
sd               3919 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x67, qvga ? 0xf0 : 0x90, 0xf0);
sd               3920 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x74, qvga ? 0x20 : 0x00, 0x20);
sd               3931 drivers/media/usb/gspca/ov519.c 			if (sd->frame_rate < 25)
sd               3934 drivers/media/usb/gspca/ov519.c 			if (sd->frame_rate < 10)
sd               3937 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, 0x11, v);
sd               3938 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, 0x12, qvga ? 0x60 : 0x20);
sd               3955 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x12, qvga ? 0x40 : 0x00, 0xf0);
sd               3956 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x32,
sd               3959 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x03,
sd               3962 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, 0x17, xstart >> 4);
sd               3963 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, 0x18, xend >> 4);
sd               3964 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, 0x19, ystart >> 3);
sd               3965 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, 0x1a, yend >> 3);
sd               3969 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, OV7610_REG_COM_C, qvga ? (1 << 5) : 0, 1 << 5);
sd               3970 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x13, 0x00, 0x20); /* Select 16 bit data bus */
sd               3971 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x12, 0x04, 0x06); /* AWB: 1 Test pattern: 0 */
sd               3972 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x2d, 0x00, 0x40); /* from windrv 090403 */
sd               3973 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x28, 0x20, 0x20); /* progressive mode on */
sd               3976 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x14, qvga ? 0x20 : 0x00, 0x20);
sd               3977 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, 0x35, qvga ? 0x1e : 0x9e);
sd               3978 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x13, 0x00, 0x20); /* Select 16 bit data bus */
sd               3979 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x12, 0x04, 0x06); /* AWB: 1 Test pattern: 0 */
sd               3984 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x14, qvga ? 0x20 : 0x00, 0x20);
sd               3985 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x28, qvga ? 0x00 : 0x20, 0x20);
sd               3986 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, 0x24, qvga ? 0x20 : 0x3a);
sd               3987 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, 0x25, qvga ? 0x30 : 0x60);
sd               3988 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x2d, qvga ? 0x40 : 0x00, 0x40);
sd               3989 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x67, qvga ? 0xb0 : 0x90, 0xf0);
sd               3990 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x74, qvga ? 0x20 : 0x00, 0x20);
sd               3991 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x13, 0x00, 0x20); /* Select 16 bit data bus */
sd               3992 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x12, 0x04, 0x06); /* AWB: 1 Test pattern: 0 */
sd               3993 drivers/media/usb/gspca/ov519.c 		if (sd->sensor == SEN_OV76BE)
sd               3994 drivers/media/usb/gspca/ov519.c 			i2c_w(sd, 0x35, qvga ? 0x1e : 0x9e);
sd               3998 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x14, qvga ? 0x20 : 0x00, 0x20);
sd               3999 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x28, qvga ? 0x00 : 0x20, 0x20);
sd               4002 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x2d, qvga ? 0x40 : 0x00, 0x40);
sd               4004 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x67, qvga ? 0xf0 : 0x90, 0xf0);
sd               4006 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x74, qvga ? 0x20 : 0x00, 0x20);
sd               4007 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x12, 0x04, 0x04); /* AWB: 1 */
sd               4013 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, OV7670_R12_COM7,
sd               4016 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x13, 0x00, 0x20); /* Select 16 bit data bus */
sd               4017 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, OV7670_R13_COM8, OV7670_COM8_AWB,
sd               4033 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, OV7670_R17_HSTART, xstart >> 3);
sd               4034 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, OV7670_R18_HSTOP, xend >> 3);
sd               4035 drivers/media/usb/gspca/ov519.c 		v = i2c_r(sd, OV7670_R32_HREF);
sd               4039 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, OV7670_R32_HREF, v);
sd               4041 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, OV7670_R19_VSTART, ystart >> 2);
sd               4042 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, OV7670_R1A_VSTOP, yend >> 2);
sd               4043 drivers/media/usb/gspca/ov519.c 		v = i2c_r(sd, OV7670_R03_VREF);
sd               4047 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, OV7670_R03_VREF, v);
sd               4050 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x14, qvga ? 0x20 : 0x00, 0x20);
sd               4051 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x13, 0x00, 0x20); /* Select 16 bit data bus */
sd               4052 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x12, 0x04, 0x06); /* AWB: 1 Test pattern: 0 */
sd               4056 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x14, qvga ? 0x20 : 0x00, 0x20);
sd               4057 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x12, 0x04, 0x06); /* AWB: 1 Test pattern: 0 */
sd               4078 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, 0x12, qvga ? 0x40 : 0x00, 0x40);
sd               4080 drivers/media/usb/gspca/ov519.c 			vals = sd->frame_rate < 30 ? vga_15 : vga_30;
sd               4082 drivers/media/usb/gspca/ov519.c 			vals = sd->frame_rate < 15 ? sxga_7_5 : sxga_15;
sd               4083 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, vals, ARRAY_SIZE(sxga_15));
sd               4091 drivers/media/usb/gspca/ov519.c 	i2c_w(sd, 0x11, sd->clockdiv);
sd               4097 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4099 drivers/media/usb/gspca/ov519.c 	if (sd->gspca_dev.streaming)
sd               4100 drivers/media/usb/gspca/ov519.c 		reg_w(sd, OV519_R51_RESET1, 0x0f);	/* block stream */
sd               4101 drivers/media/usb/gspca/ov519.c 	i2c_w_mask(sd, OV7670_R1E_MVFP,
sd               4104 drivers/media/usb/gspca/ov519.c 	if (sd->gspca_dev.streaming)
sd               4105 drivers/media/usb/gspca/ov519.c 		reg_w(sd, OV519_R51_RESET1, 0x00);	/* restart stream */
sd               4108 drivers/media/usb/gspca/ov519.c static void set_ov_sensor_window(struct sd *sd)
sd               4115 drivers/media/usb/gspca/ov519.c 	switch (sd->sensor) {
sd               4121 drivers/media/usb/gspca/ov519.c 		mode_init_ov_sensor_regs(sd);
sd               4124 drivers/media/usb/gspca/ov519.c 		ov519_set_mode(sd);
sd               4125 drivers/media/usb/gspca/ov519.c 		ov519_set_fr(sd);
sd               4129 drivers/media/usb/gspca/ov519.c 	gspca_dev = &sd->gspca_dev;
sd               4135 drivers/media/usb/gspca/ov519.c 	switch (sd->sensor) {
sd               4155 drivers/media/usb/gspca/ov519.c 		if (sd->sensor == SEN_OV66308AF && qvga)
sd               4181 drivers/media/usb/gspca/ov519.c 	switch (sd->sensor) {
sd               4213 drivers/media/usb/gspca/ov519.c 	mode_init_ov_sensor_regs(sd);
sd               4215 drivers/media/usb/gspca/ov519.c 	i2c_w(sd, 0x17, hwsbase);
sd               4216 drivers/media/usb/gspca/ov519.c 	i2c_w(sd, 0x18, hwebase + (sd->sensor_width >> hwscale));
sd               4217 drivers/media/usb/gspca/ov519.c 	i2c_w(sd, 0x19, vwsbase);
sd               4218 drivers/media/usb/gspca/ov519.c 	i2c_w(sd, 0x1a, vwebase + (sd->sensor_height >> vwscale));
sd               4224 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4227 drivers/media/usb/gspca/ov519.c 	sd->sensor_width = sd->gspca_dev.pixfmt.width;
sd               4228 drivers/media/usb/gspca/ov519.c 	sd->sensor_height = sd->gspca_dev.pixfmt.height;
sd               4230 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               4233 drivers/media/usb/gspca/ov519.c 		ov511_mode_init_regs(sd);
sd               4237 drivers/media/usb/gspca/ov519.c 		ov518_mode_init_regs(sd);
sd               4240 drivers/media/usb/gspca/ov519.c 		ov519_mode_init_regs(sd);
sd               4244 drivers/media/usb/gspca/ov519.c 		w9968cf_mode_init_regs(sd);
sd               4248 drivers/media/usb/gspca/ov519.c 	set_ov_sensor_window(sd);
sd               4252 drivers/media/usb/gspca/ov519.c 	sd->snapshot_needs_reset = 1;
sd               4255 drivers/media/usb/gspca/ov519.c 	sd->first_frame = 3;
sd               4257 drivers/media/usb/gspca/ov519.c 	ov51x_restart(sd);
sd               4258 drivers/media/usb/gspca/ov519.c 	ov51x_led_control(sd, 1);
sd               4264 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4266 drivers/media/usb/gspca/ov519.c 	ov51x_stop(sd);
sd               4267 drivers/media/usb/gspca/ov519.c 	ov51x_led_control(sd, 0);
sd               4272 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4274 drivers/media/usb/gspca/ov519.c 	if (!sd->gspca_dev.present)
sd               4276 drivers/media/usb/gspca/ov519.c 	if (sd->bridge == BRIDGE_W9968CF)
sd               4277 drivers/media/usb/gspca/ov519.c 		w9968cf_stop0(sd);
sd               4281 drivers/media/usb/gspca/ov519.c 	if (sd->snapshot_pressed) {
sd               4284 drivers/media/usb/gspca/ov519.c 		sd->snapshot_pressed = 0;
sd               4287 drivers/media/usb/gspca/ov519.c 	if (sd->bridge == BRIDGE_OV519)
sd               4288 drivers/media/usb/gspca/ov519.c 		reg_w(sd, OV519_R57_SNAPSHOT, 0x23);
sd               4293 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4295 drivers/media/usb/gspca/ov519.c 	if (sd->snapshot_pressed != state) {
sd               4301 drivers/media/usb/gspca/ov519.c 			sd->snapshot_needs_reset = 1;
sd               4303 drivers/media/usb/gspca/ov519.c 		sd->snapshot_pressed = state;
sd               4308 drivers/media/usb/gspca/ov519.c 		switch (sd->bridge) {
sd               4313 drivers/media/usb/gspca/ov519.c 				sd->snapshot_needs_reset = 1;
sd               4323 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4358 drivers/media/usb/gspca/ov519.c 			sd->packet_nr = 0;
sd               4373 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4381 drivers/media/usb/gspca/ov519.c 		sd->packet_nr = 0;
sd               4390 drivers/media/usb/gspca/ov519.c 		if (sd->packet_nr == data[len])
sd               4391 drivers/media/usb/gspca/ov519.c 			sd->packet_nr++;
sd               4395 drivers/media/usb/gspca/ov519.c 		else if (sd->packet_nr == 0 || data[len]) {
sd               4397 drivers/media/usb/gspca/ov519.c 				  (int)data[len], (int)sd->packet_nr);
sd               4457 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4465 drivers/media/usb/gspca/ov519.c 		if (sd->first_frame) {
sd               4466 drivers/media/usb/gspca/ov519.c 			sd->first_frame--;
sd               4468 drivers/media/usb/gspca/ov519.c 				  sd->gspca_dev.pixfmt.width *
sd               4469 drivers/media/usb/gspca/ov519.c 					sd->gspca_dev.pixfmt.height)
sd               4481 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4483 drivers/media/usb/gspca/ov519.c 	switch (sd->bridge) {
sd               4508 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4526 drivers/media/usb/gspca/ov519.c 	switch (sd->sensor) {
sd               4535 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, OV7610_REG_BRT, val);
sd               4539 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, OV7610_REG_BRT, val);
sd               4542 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, brit_7660[val],
sd               4548 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, OV7670_R55_BRIGHT, ov7670_abs_to_sm(val));
sd               4555 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4615 drivers/media/usb/gspca/ov519.c 	switch (sd->sensor) {
sd               4618 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, OV7610_REG_CNT, val);
sd               4622 drivers/media/usb/gspca/ov519.c 		i2c_w_mask(sd, OV7610_REG_CNT, val >> 4, 0x0f);
sd               4630 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, 0x64, ctab[val >> 5]);
sd               4641 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, 0x64, ctab[val >> 4]);
sd               4645 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, contrast_7660[val],
sd               4650 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, OV7670_R56_CONTRAS, val >> 1);
sd               4657 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4659 drivers/media/usb/gspca/ov519.c 	i2c_w(sd, 0x10, val);
sd               4664 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4678 drivers/media/usb/gspca/ov519.c 	switch (sd->sensor) {
sd               4685 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, OV7610_REG_SAT, val);
sd               4693 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, OV7610_REG_SAT, val);
sd               4697 drivers/media/usb/gspca/ov519.c 		i2c_w(sd, OV7610_REG_SAT, val & 0xf0);
sd               4700 drivers/media/usb/gspca/ov519.c 		write_i2c_regvals(sd, colors_7660[val],
sd               4713 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4715 drivers/media/usb/gspca/ov519.c 	i2c_w_mask(sd, 0x2d, val ? 0x10 : 0x00, 0x10);
sd               4718 drivers/media/usb/gspca/ov519.c static void setfreq_i(struct sd *sd, s32 val)
sd               4720 drivers/media/usb/gspca/ov519.c 	if (sd->sensor == SEN_OV7660
sd               4721 drivers/media/usb/gspca/ov519.c 	 || sd->sensor == SEN_OV7670) {
sd               4724 drivers/media/usb/gspca/ov519.c 			i2c_w_mask(sd, OV7670_R13_COM8, 0, OV7670_COM8_BFILT);
sd               4727 drivers/media/usb/gspca/ov519.c 			i2c_w_mask(sd, OV7670_R13_COM8, OV7670_COM8_BFILT,
sd               4729 drivers/media/usb/gspca/ov519.c 			i2c_w_mask(sd, OV7670_R3B_COM11, 0x08, 0x18);
sd               4732 drivers/media/usb/gspca/ov519.c 			i2c_w_mask(sd, OV7670_R13_COM8, OV7670_COM8_BFILT,
sd               4734 drivers/media/usb/gspca/ov519.c 			i2c_w_mask(sd, OV7670_R3B_COM11, 0x00, 0x18);
sd               4737 drivers/media/usb/gspca/ov519.c 			i2c_w_mask(sd, OV7670_R13_COM8, OV7670_COM8_BFILT,
sd               4739 drivers/media/usb/gspca/ov519.c 			i2c_w_mask(sd, OV7670_R3B_COM11, OV7670_COM11_HZAUTO,
sd               4746 drivers/media/usb/gspca/ov519.c 			i2c_w_mask(sd, 0x2d, 0x00, 0x04);
sd               4747 drivers/media/usb/gspca/ov519.c 			i2c_w_mask(sd, 0x2a, 0x00, 0x80);
sd               4750 drivers/media/usb/gspca/ov519.c 			i2c_w_mask(sd, 0x2d, 0x04, 0x04);
sd               4751 drivers/media/usb/gspca/ov519.c 			i2c_w_mask(sd, 0x2a, 0x80, 0x80);
sd               4753 drivers/media/usb/gspca/ov519.c 			if (sd->sensor == SEN_OV6620 ||
sd               4754 drivers/media/usb/gspca/ov519.c 			    sd->sensor == SEN_OV6630 ||
sd               4755 drivers/media/usb/gspca/ov519.c 			    sd->sensor == SEN_OV66308AF)
sd               4756 drivers/media/usb/gspca/ov519.c 				i2c_w(sd, 0x2b, 0x5e);
sd               4758 drivers/media/usb/gspca/ov519.c 				i2c_w(sd, 0x2b, 0xac);
sd               4761 drivers/media/usb/gspca/ov519.c 			i2c_w_mask(sd, 0x2d, 0x04, 0x04);
sd               4762 drivers/media/usb/gspca/ov519.c 			if (sd->sensor == SEN_OV6620 ||
sd               4763 drivers/media/usb/gspca/ov519.c 			    sd->sensor == SEN_OV6630 ||
sd               4764 drivers/media/usb/gspca/ov519.c 			    sd->sensor == SEN_OV66308AF) {
sd               4766 drivers/media/usb/gspca/ov519.c 				i2c_w_mask(sd, 0x2a, 0x80, 0x80);
sd               4767 drivers/media/usb/gspca/ov519.c 				i2c_w(sd, 0x2b, 0xa8);
sd               4770 drivers/media/usb/gspca/ov519.c 				i2c_w_mask(sd, 0x2a, 0x00, 0x80);
sd               4779 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4781 drivers/media/usb/gspca/ov519.c 	setfreq_i(sd, val);
sd               4784 drivers/media/usb/gspca/ov519.c 	if (sd->bridge == BRIDGE_W9968CF)
sd               4785 drivers/media/usb/gspca/ov519.c 		w9968cf_set_crop_window(sd);
sd               4791 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4793 drivers/media/usb/gspca/ov519.c 	if (sd->bridge != BRIDGE_W9968CF)
sd               4797 drivers/media/usb/gspca/ov519.c 	jcomp->quality = v4l2_ctrl_g_ctrl(sd->jpegqual);
sd               4806 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4808 drivers/media/usb/gspca/ov519.c 	if (sd->bridge != BRIDGE_W9968CF)
sd               4811 drivers/media/usb/gspca/ov519.c 	v4l2_ctrl_s_ctrl(sd->jpegqual, jcomp->quality);
sd               4819 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               4825 drivers/media/usb/gspca/ov519.c 		gspca_dev->exposure->val = i2c_r(sd, 0x10);
sd               4835 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               4855 drivers/media/usb/gspca/ov519.c 		if (!ctrl->val && sd->brightness->is_new)
sd               4856 drivers/media/usb/gspca/ov519.c 			setbrightness(gspca_dev, sd->brightness->val);
sd               4862 drivers/media/usb/gspca/ov519.c 		sethvflip(gspca_dev, ctrl->val, sd->vflip->val);
sd               4883 drivers/media/usb/gspca/ov519.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               4888 drivers/media/usb/gspca/ov519.c 	if (valid_controls[sd->sensor].has_brightness)
sd               4889 drivers/media/usb/gspca/ov519.c 		sd->brightness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               4891 drivers/media/usb/gspca/ov519.c 			sd->sensor == SEN_OV7660 ? 6 : 255, 1,
sd               4892 drivers/media/usb/gspca/ov519.c 			sd->sensor == SEN_OV7660 ? 3 : 127);
sd               4893 drivers/media/usb/gspca/ov519.c 	if (valid_controls[sd->sensor].has_contrast) {
sd               4894 drivers/media/usb/gspca/ov519.c 		if (sd->sensor == SEN_OV7660)
sd               4900 drivers/media/usb/gspca/ov519.c 				(sd->sensor == SEN_OV6630 ||
sd               4901 drivers/media/usb/gspca/ov519.c 				 sd->sensor == SEN_OV66308AF) ? 200 : 127);
sd               4903 drivers/media/usb/gspca/ov519.c 	if (valid_controls[sd->sensor].has_sat)
sd               4906 drivers/media/usb/gspca/ov519.c 			sd->sensor == SEN_OV7660 ? 4 : 255, 1,
sd               4907 drivers/media/usb/gspca/ov519.c 			sd->sensor == SEN_OV7660 ? 2 : 127);
sd               4908 drivers/media/usb/gspca/ov519.c 	if (valid_controls[sd->sensor].has_exposure)
sd               4911 drivers/media/usb/gspca/ov519.c 	if (valid_controls[sd->sensor].has_hvflip) {
sd               4912 drivers/media/usb/gspca/ov519.c 		sd->hflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               4914 drivers/media/usb/gspca/ov519.c 		sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               4917 drivers/media/usb/gspca/ov519.c 	if (valid_controls[sd->sensor].has_autobright)
sd               4918 drivers/media/usb/gspca/ov519.c 		sd->autobright = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               4920 drivers/media/usb/gspca/ov519.c 	if (valid_controls[sd->sensor].has_autogain)
sd               4923 drivers/media/usb/gspca/ov519.c 	if (valid_controls[sd->sensor].has_freq) {
sd               4924 drivers/media/usb/gspca/ov519.c 		if (sd->sensor == SEN_OV7670)
sd               4925 drivers/media/usb/gspca/ov519.c 			sd->freq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
sd               4930 drivers/media/usb/gspca/ov519.c 			sd->freq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
sd               4934 drivers/media/usb/gspca/ov519.c 	if (sd->bridge == BRIDGE_W9968CF)
sd               4935 drivers/media/usb/gspca/ov519.c 		sd->jpegqual = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               4945 drivers/media/usb/gspca/ov519.c 	if (sd->autobright)
sd               4946 drivers/media/usb/gspca/ov519.c 		v4l2_ctrl_auto_cluster(2, &sd->autobright, 0, false);
sd               4947 drivers/media/usb/gspca/ov519.c 	if (sd->hflip)
sd               4948 drivers/media/usb/gspca/ov519.c 		v4l2_ctrl_cluster(2, &sd->hflip);
sd               5011 drivers/media/usb/gspca/ov519.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                811 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                841 drivers/media/usb/gspca/ov534.c 	if (sd->sensor != SENSOR_OV772x)
sd                851 drivers/media/usb/gspca/ov534.c 		if (sd->frame_rate >= r->fps)
sd                865 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                867 drivers/media/usb/gspca/ov534.c 	if (sd->sensor == SENSOR_OV767x) {
sd                900 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                902 drivers/media/usb/gspca/ov534.c 	if (sd->sensor == SENSOR_OV767x) {
sd                924 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                926 drivers/media/usb/gspca/ov534.c 	if (sd->sensor == SENSOR_OV767x) {
sd                937 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                939 drivers/media/usb/gspca/ov534.c 	if (sd->sensor == SENSOR_OV767x)
sd                975 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                977 drivers/media/usb/gspca/ov534.c 	if (sd->sensor == SENSOR_OV767x) {
sd                996 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                998 drivers/media/usb/gspca/ov534.c 	if (sd->sensor == SENSOR_OV767x) {
sd               1025 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1030 drivers/media/usb/gspca/ov534.c 		if (sd->sensor == SENSOR_OV772x)
sd               1036 drivers/media/usb/gspca/ov534.c 		if (sd->sensor == SENSOR_OV772x)
sd               1044 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1047 drivers/media/usb/gspca/ov534.c 	data = sd->sensor == SENSOR_OV767x ?
sd               1070 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1073 drivers/media/usb/gspca/ov534.c 	if (sd->sensor == SENSOR_OV767x) {
sd               1094 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1097 drivers/media/usb/gspca/ov534.c 	if (sd->sensor == SENSOR_OV767x) {
sd               1110 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1118 drivers/media/usb/gspca/ov534.c 	sd->frame_rate = DEFAULT_FRAME_RATE;
sd               1125 drivers/media/usb/gspca/ov534.c 	struct sd *sd = container_of(ctrl->handler, struct sd, ctrl_handler);
sd               1126 drivers/media/usb/gspca/ov534.c 	struct gspca_dev *gspca_dev = &sd->gspca_dev;
sd               1131 drivers/media/usb/gspca/ov534.c 		if (ctrl->val && sd->gain && gspca_dev->streaming)
sd               1132 drivers/media/usb/gspca/ov534.c 			sd->gain->val = getgain(gspca_dev);
sd               1137 drivers/media/usb/gspca/ov534.c 		if (ctrl->val == V4L2_EXPOSURE_AUTO && sd->exposure &&
sd               1139 drivers/media/usb/gspca/ov534.c 			sd->exposure->val = getexposure(gspca_dev);
sd               1147 drivers/media/usb/gspca/ov534.c 	struct sd *sd = container_of(ctrl->handler, struct sd, ctrl_handler);
sd               1148 drivers/media/usb/gspca/ov534.c 	struct gspca_dev *gspca_dev = &sd->gspca_dev;
sd               1170 drivers/media/usb/gspca/ov534.c 		if (!gspca_dev->usb_err && !ctrl->val && sd->gain)
sd               1171 drivers/media/usb/gspca/ov534.c 			setgain(gspca_dev, sd->gain->val);
sd               1180 drivers/media/usb/gspca/ov534.c 		    sd->exposure)
sd               1181 drivers/media/usb/gspca/ov534.c 			setexposure(gspca_dev, sd->exposure->val);
sd               1187 drivers/media/usb/gspca/ov534.c 		sethvflip(gspca_dev, ctrl->val, sd->vflip->val);
sd               1190 drivers/media/usb/gspca/ov534.c 		sethvflip(gspca_dev, sd->hflip->val, ctrl->val);
sd               1206 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1207 drivers/media/usb/gspca/ov534.c 	struct v4l2_ctrl_handler *hdl = &sd->ctrl_handler;
sd               1222 drivers/media/usb/gspca/ov534.c 	if (sd->sensor == SENSOR_OV767x) {
sd               1254 drivers/media/usb/gspca/ov534.c 	if (sd->sensor == SENSOR_OV772x)
sd               1255 drivers/media/usb/gspca/ov534.c 		sd->hue = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
sd               1258 drivers/media/usb/gspca/ov534.c 	sd->saturation = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
sd               1261 drivers/media/usb/gspca/ov534.c 	sd->brightness = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
sd               1264 drivers/media/usb/gspca/ov534.c 	sd->contrast = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
sd               1267 drivers/media/usb/gspca/ov534.c 	if (sd->sensor == SENSOR_OV772x) {
sd               1268 drivers/media/usb/gspca/ov534.c 		sd->autogain = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
sd               1270 drivers/media/usb/gspca/ov534.c 		sd->gain = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
sd               1274 drivers/media/usb/gspca/ov534.c 	sd->autoexposure = v4l2_ctrl_new_std_menu(hdl, &ov534_ctrl_ops,
sd               1278 drivers/media/usb/gspca/ov534.c 	sd->exposure = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
sd               1282 drivers/media/usb/gspca/ov534.c 	sd->autowhitebalance = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
sd               1285 drivers/media/usb/gspca/ov534.c 	if (sd->sensor == SENSOR_OV772x)
sd               1286 drivers/media/usb/gspca/ov534.c 		sd->sharpness = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
sd               1289 drivers/media/usb/gspca/ov534.c 	sd->hflip = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
sd               1291 drivers/media/usb/gspca/ov534.c 	sd->vflip = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
sd               1293 drivers/media/usb/gspca/ov534.c 	sd->plfreq = v4l2_ctrl_new_std_menu(hdl, &ov534_ctrl_ops,
sd               1303 drivers/media/usb/gspca/ov534.c 	if (sd->sensor == SENSOR_OV772x)
sd               1304 drivers/media/usb/gspca/ov534.c 		v4l2_ctrl_auto_cluster(2, &sd->autogain, 0, true);
sd               1306 drivers/media/usb/gspca/ov534.c 	v4l2_ctrl_auto_cluster(2, &sd->autoexposure, V4L2_EXPOSURE_MANUAL,
sd               1315 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1346 drivers/media/usb/gspca/ov534.c 		sd->sensor = SENSOR_OV767x;
sd               1350 drivers/media/usb/gspca/ov534.c 		sd->sensor = SENSOR_OV772x;
sd               1358 drivers/media/usb/gspca/ov534.c 	reg_w_array(gspca_dev, bridge_init[sd->sensor].val,
sd               1359 drivers/media/usb/gspca/ov534.c 			bridge_init[sd->sensor].len);
sd               1361 drivers/media/usb/gspca/ov534.c 	sccb_w_array(gspca_dev, sensor_init[sd->sensor].val,
sd               1362 drivers/media/usb/gspca/ov534.c 			sensor_init[sd->sensor].len);
sd               1372 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1404 drivers/media/usb/gspca/ov534.c 	if (sd->sensor == SENSOR_OV767x)
sd               1409 drivers/media/usb/gspca/ov534.c 	reg_w_array(gspca_dev, bridge_start[sd->sensor][mode].val,
sd               1410 drivers/media/usb/gspca/ov534.c 				bridge_start[sd->sensor][mode].len);
sd               1411 drivers/media/usb/gspca/ov534.c 	sccb_w_array(gspca_dev, sensor_start[sd->sensor][mode].val,
sd               1412 drivers/media/usb/gspca/ov534.c 				sensor_start[sd->sensor][mode].len);
sd               1416 drivers/media/usb/gspca/ov534.c 	if (sd->hue)
sd               1417 drivers/media/usb/gspca/ov534.c 		sethue(gspca_dev, v4l2_ctrl_g_ctrl(sd->hue));
sd               1418 drivers/media/usb/gspca/ov534.c 	setsaturation(gspca_dev, v4l2_ctrl_g_ctrl(sd->saturation));
sd               1419 drivers/media/usb/gspca/ov534.c 	if (sd->autogain)
sd               1420 drivers/media/usb/gspca/ov534.c 		setagc(gspca_dev, v4l2_ctrl_g_ctrl(sd->autogain));
sd               1421 drivers/media/usb/gspca/ov534.c 	setawb(gspca_dev, v4l2_ctrl_g_ctrl(sd->autowhitebalance));
sd               1422 drivers/media/usb/gspca/ov534.c 	setaec(gspca_dev, v4l2_ctrl_g_ctrl(sd->autoexposure));
sd               1423 drivers/media/usb/gspca/ov534.c 	if (sd->gain)
sd               1424 drivers/media/usb/gspca/ov534.c 		setgain(gspca_dev, v4l2_ctrl_g_ctrl(sd->gain));
sd               1425 drivers/media/usb/gspca/ov534.c 	setexposure(gspca_dev, v4l2_ctrl_g_ctrl(sd->exposure));
sd               1426 drivers/media/usb/gspca/ov534.c 	setbrightness(gspca_dev, v4l2_ctrl_g_ctrl(sd->brightness));
sd               1427 drivers/media/usb/gspca/ov534.c 	setcontrast(gspca_dev, v4l2_ctrl_g_ctrl(sd->contrast));
sd               1428 drivers/media/usb/gspca/ov534.c 	if (sd->sharpness)
sd               1429 drivers/media/usb/gspca/ov534.c 		setsharpness(gspca_dev, v4l2_ctrl_g_ctrl(sd->sharpness));
sd               1430 drivers/media/usb/gspca/ov534.c 	sethvflip(gspca_dev, v4l2_ctrl_g_ctrl(sd->hflip),
sd               1431 drivers/media/usb/gspca/ov534.c 		  v4l2_ctrl_g_ctrl(sd->vflip));
sd               1432 drivers/media/usb/gspca/ov534.c 	setlightfreq(gspca_dev, v4l2_ctrl_g_ctrl(sd->plfreq));
sd               1458 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1495 drivers/media/usb/gspca/ov534.c 		if (this_pts != sd->last_pts || this_fid != sd->last_fid) {
sd               1499 drivers/media/usb/gspca/ov534.c 			sd->last_pts = this_pts;
sd               1500 drivers/media/usb/gspca/ov534.c 			sd->last_fid = this_fid;
sd               1505 drivers/media/usb/gspca/ov534.c 			sd->last_pts = 0;
sd               1540 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1543 drivers/media/usb/gspca/ov534.c 	tpf->denominator = sd->frame_rate;
sd               1552 drivers/media/usb/gspca/ov534.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1555 drivers/media/usb/gspca/ov534.c 		sd->frame_rate = DEFAULT_FRAME_RATE;
sd               1557 drivers/media/usb/gspca/ov534.c 		sd->frame_rate = tpf->denominator / tpf->numerator;
sd               1564 drivers/media/usb/gspca/ov534.c 	tpf->denominator = sd->frame_rate;
sd               1592 drivers/media/usb/gspca/ov534.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd               1257 drivers/media/usb/gspca/ov534_9.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1261 drivers/media/usb/gspca/ov534_9.c 	if (sd->sensor == SENSOR_OV562x) {
sd               1399 drivers/media/usb/gspca/ov534_9.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1423 drivers/media/usb/gspca/ov534_9.c 		sd->sensor = SENSOR_OV965x;
sd               1444 drivers/media/usb/gspca/ov534_9.c 		sd->sensor = SENSOR_OV971x;
sd               1473 drivers/media/usb/gspca/ov534_9.c 		sd->sensor = SENSOR_OV562x;
sd               1483 drivers/media/usb/gspca/ov534_9.c 		sd->sensor = SENSOR_OV361x;
sd               1546 drivers/media/usb/gspca/ov534_9.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1548 drivers/media/usb/gspca/ov534_9.c 	if (sd->sensor == SENSOR_OV971x)
sd               1550 drivers/media/usb/gspca/ov534_9.c 	if (sd->sensor == SENSOR_OV562x)
sd               1552 drivers/media/usb/gspca/ov534_9.c 	if (sd->sensor == SENSOR_OV361x)
sd               1607 drivers/media/usb/gspca/ov534_9.c 	if (((struct sd *)gspca_dev)->sensor == SENSOR_OV361x) {
sd               1630 drivers/media/usb/gspca/ov534_9.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1667 drivers/media/usb/gspca/ov534_9.c 		if (this_pts != sd->last_pts || this_fid != sd->last_fid) {
sd               1671 drivers/media/usb/gspca/ov534_9.c 			sd->last_pts = this_pts;
sd               1672 drivers/media/usb/gspca/ov534_9.c 			sd->last_fid = this_fid;
sd               1677 drivers/media/usb/gspca/ov534_9.c 			sd->last_pts = 0;
sd               1742 drivers/media/usb/gspca/ov534_9.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               1745 drivers/media/usb/gspca/ov534_9.c 	if (sd->sensor == SENSOR_OV971x)
sd               1747 drivers/media/usb/gspca/ov534_9.c 	if (sd->sensor == SENSOR_OV361x)
sd               1751 drivers/media/usb/gspca/ov534_9.c 	if (sd->sensor == SENSOR_OV562x) {
sd               1805 drivers/media/usb/gspca/ov534_9.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                205 drivers/media/usb/gspca/pac207.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                216 drivers/media/usb/gspca/pac207.c 		sd->autogain_ignore_frames  = PAC_AUTOGAIN_IGNORE_FRAMES;
sd                247 drivers/media/usb/gspca/pac207.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                253 drivers/media/usb/gspca/pac207.c 	sd->brightness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                278 drivers/media/usb/gspca/pac207.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                293 drivers/media/usb/gspca/pac207.c 	pac207_write_reg(gspca_dev, 0x08, v4l2_ctrl_g_ctrl(sd->brightness));
sd                319 drivers/media/usb/gspca/pac207.c 	sd->sof_read = 0;
sd                320 drivers/media/usb/gspca/pac207.c 	sd->autogain_ignore_frames = 0;
sd                321 drivers/media/usb/gspca/pac207.c 	atomic_set(&sd->avg_lum, -1);
sd                342 drivers/media/usb/gspca/pac207.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                343 drivers/media/usb/gspca/pac207.c 	int avg_lum = atomic_read(&sd->avg_lum);
sd                348 drivers/media/usb/gspca/pac207.c 	if (sd->autogain_ignore_frames > 0)
sd                349 drivers/media/usb/gspca/pac207.c 		sd->autogain_ignore_frames--;
sd                352 drivers/media/usb/gspca/pac207.c 		sd->autogain_ignore_frames = PAC_AUTOGAIN_IGNORE_FRAMES;
sd                359 drivers/media/usb/gspca/pac207.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                362 drivers/media/usb/gspca/pac207.c 	sof = pac_find_sof(gspca_dev, &sd->sof_read, data, len);
sd                374 drivers/media/usb/gspca/pac207.c 		sd->header_read = 0;
sd                379 drivers/media/usb/gspca/pac207.c 	if (sd->header_read < 11) {
sd                383 drivers/media/usb/gspca/pac207.c 		if (sd->header_read < 5) {
sd                384 drivers/media/usb/gspca/pac207.c 			needed = 5 - sd->header_read;
sd                386 drivers/media/usb/gspca/pac207.c 				atomic_set(&sd->avg_lum, data[needed - 1]);
sd                389 drivers/media/usb/gspca/pac207.c 		needed = 11 - sd->header_read;
sd                391 drivers/media/usb/gspca/pac207.c 			sd->header_read += len;
sd                396 drivers/media/usb/gspca/pac207.c 		sd->header_read = 11;
sd                459 drivers/media/usb/gspca/pac207.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                357 drivers/media/usb/gspca/pac7302.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                365 drivers/media/usb/gspca/pac7302.c 	sd->flags = id->driver_info;
sd                371 drivers/media/usb/gspca/pac7302.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                383 drivers/media/usb/gspca/pac7302.c 		v += (sd->brightness->val - (s32)sd->brightness->maximum)
sd                384 drivers/media/usb/gspca/pac7302.c 			* 150 / (s32)sd->brightness->maximum; /* 200 ? */
sd                385 drivers/media/usb/gspca/pac7302.c 		v -= delta[i] * sd->contrast->val / (s32)sd->contrast->maximum;
sd                397 drivers/media/usb/gspca/pac7302.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                408 drivers/media/usb/gspca/pac7302.c 		v = a[i] * sd->saturation->val / (s32)sd->saturation->maximum;
sd                418 drivers/media/usb/gspca/pac7302.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                421 drivers/media/usb/gspca/pac7302.c 	reg_w(gspca_dev, 0xc6, sd->white_balance->val);
sd                446 drivers/media/usb/gspca/pac7302.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                450 drivers/media/usb/gspca/pac7302.c 	      rgbbalance_ctrl_to_reg_value(sd->red_balance->val));
sd                457 drivers/media/usb/gspca/pac7302.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                461 drivers/media/usb/gspca/pac7302.c 	      rgbbalance_ctrl_to_reg_value(sd->blue_balance->val));
sd                536 drivers/media/usb/gspca/pac7302.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                539 drivers/media/usb/gspca/pac7302.c 	hflip = sd->hflip->val;
sd                540 drivers/media/usb/gspca/pac7302.c 	if (sd->flags & FL_HFLIP)
sd                542 drivers/media/usb/gspca/pac7302.c 	vflip = sd->vflip->val;
sd                543 drivers/media/usb/gspca/pac7302.c 	if (sd->flags & FL_VFLIP)
sd                556 drivers/media/usb/gspca/pac7302.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                559 drivers/media/usb/gspca/pac7302.c 	reg_w(gspca_dev, 0xb6, sd->sharpness->val);
sd                575 drivers/media/usb/gspca/pac7302.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                586 drivers/media/usb/gspca/pac7302.c 		sd->autogain_ignore_frames  = PAC_AUTOGAIN_IGNORE_FRAMES;
sd                633 drivers/media/usb/gspca/pac7302.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                639 drivers/media/usb/gspca/pac7302.c 	sd->brightness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                641 drivers/media/usb/gspca/pac7302.c 	sd->contrast = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                644 drivers/media/usb/gspca/pac7302.c 	sd->saturation = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                646 drivers/media/usb/gspca/pac7302.c 	sd->white_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                649 drivers/media/usb/gspca/pac7302.c 	sd->red_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                654 drivers/media/usb/gspca/pac7302.c 	sd->blue_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                669 drivers/media/usb/gspca/pac7302.c 	sd->hflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                671 drivers/media/usb/gspca/pac7302.c 	sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                674 drivers/media/usb/gspca/pac7302.c 	sd->sharpness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                682 drivers/media/usb/gspca/pac7302.c 	v4l2_ctrl_cluster(2, &sd->brightness);
sd                684 drivers/media/usb/gspca/pac7302.c 	v4l2_ctrl_cluster(2, &sd->hflip);
sd                691 drivers/media/usb/gspca/pac7302.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                696 drivers/media/usb/gspca/pac7302.c 	sd->sof_read = 0;
sd                697 drivers/media/usb/gspca/pac7302.c 	sd->autogain_ignore_frames = 0;
sd                698 drivers/media/usb/gspca/pac7302.c 	atomic_set(&sd->avg_lum, 270 + sd->brightness->val);
sd                726 drivers/media/usb/gspca/pac7302.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                727 drivers/media/usb/gspca/pac7302.c 	int avg_lum = atomic_read(&sd->avg_lum);
sd                731 drivers/media/usb/gspca/pac7302.c 	if (sd->autogain_ignore_frames < 0)
sd                734 drivers/media/usb/gspca/pac7302.c 	if (sd->autogain_ignore_frames > 0) {
sd                735 drivers/media/usb/gspca/pac7302.c 		sd->autogain_ignore_frames--;
sd                737 drivers/media/usb/gspca/pac7302.c 		desired_lum = 270 + sd->brightness->val;
sd                742 drivers/media/usb/gspca/pac7302.c 			sd->autogain_ignore_frames =
sd                776 drivers/media/usb/gspca/pac7302.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                780 drivers/media/usb/gspca/pac7302.c 	sof = pac_find_sof(gspca_dev, &sd->sof_read, data, len);
sd                815 drivers/media/usb/gspca/pac7302.c 			atomic_set(&sd->avg_lum, data[-lum_offset] +
sd                936 drivers/media/usb/gspca/pac7302.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                360 drivers/media/usb/gspca/pac7311.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                371 drivers/media/usb/gspca/pac7311.c 		sd->autogain_ignore_frames  = PAC_AUTOGAIN_IGNORE_FRAMES;
sd                388 drivers/media/usb/gspca/pac7311.c 		sethvflip(gspca_dev, sd->hflip->val, 1);
sd                403 drivers/media/usb/gspca/pac7311.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                409 drivers/media/usb/gspca/pac7311.c 	sd->contrast = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                419 drivers/media/usb/gspca/pac7311.c 	sd->hflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                434 drivers/media/usb/gspca/pac7311.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                436 drivers/media/usb/gspca/pac7311.c 	sd->sof_read = 0;
sd                440 drivers/media/usb/gspca/pac7311.c 	setcontrast(gspca_dev, v4l2_ctrl_g_ctrl(sd->contrast));
sd                443 drivers/media/usb/gspca/pac7311.c 	sethvflip(gspca_dev, v4l2_ctrl_g_ctrl(sd->hflip), 1);
sd                464 drivers/media/usb/gspca/pac7311.c 	sd->sof_read = 0;
sd                465 drivers/media/usb/gspca/pac7311.c 	sd->autogain_ignore_frames = 0;
sd                466 drivers/media/usb/gspca/pac7311.c 	atomic_set(&sd->avg_lum, -1);
sd                491 drivers/media/usb/gspca/pac7311.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                492 drivers/media/usb/gspca/pac7311.c 	int avg_lum = atomic_read(&sd->avg_lum);
sd                501 drivers/media/usb/gspca/pac7311.c 	if (sd->autogain_ignore_frames > 0)
sd                502 drivers/media/usb/gspca/pac7311.c 		sd->autogain_ignore_frames--;
sd                505 drivers/media/usb/gspca/pac7311.c 		sd->autogain_ignore_frames = PAC_AUTOGAIN_IGNORE_FRAMES;
sd                560 drivers/media/usb/gspca/pac7311.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                564 drivers/media/usb/gspca/pac7311.c 	sof = pac_find_sof(gspca_dev, &sd->sof_read, data, len);
sd                598 drivers/media/usb/gspca/pac7311.c 			atomic_set(&sd->avg_lum, data[-lum_offset] +
sd                601 drivers/media/usb/gspca/pac7311.c 			atomic_set(&sd->avg_lum, -1);
sd                671 drivers/media/usb/gspca/pac7311.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                179 drivers/media/usb/gspca/se401.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                188 drivers/media/usb/gspca/se401.c 	sd->expo_change_state = EXPO_CHANGED;
sd                210 drivers/media/usb/gspca/se401.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                256 drivers/media/usb/gspca/se401.c 		sd->fmts[i].width = widths[i];
sd                257 drivers/media/usb/gspca/se401.c 		sd->fmts[i].height = heights[i];
sd                258 drivers/media/usb/gspca/se401.c 		sd->fmts[i].field = V4L2_FIELD_NONE;
sd                259 drivers/media/usb/gspca/se401.c 		sd->fmts[i].colorspace = V4L2_COLORSPACE_SRGB;
sd                260 drivers/media/usb/gspca/se401.c 		sd->fmts[i].priv = 1;
sd                266 drivers/media/usb/gspca/se401.c 				sd->fmts[i].priv = 2;
sd                275 drivers/media/usb/gspca/se401.c 				sd->fmts[i].priv = 4;
sd                280 drivers/media/usb/gspca/se401.c 		if (sd->fmts[i].priv == 1) {
sd                282 drivers/media/usb/gspca/se401.c 			sd->fmts[i].pixelformat = V4L2_PIX_FMT_SBGGR8;
sd                283 drivers/media/usb/gspca/se401.c 			sd->fmts[i].bytesperline = widths[i];
sd                284 drivers/media/usb/gspca/se401.c 			sd->fmts[i].sizeimage = widths[i] * heights[i];
sd                289 drivers/media/usb/gspca/se401.c 			sd->fmts[i].pixelformat = V4L2_PIX_FMT_SE401;
sd                290 drivers/media/usb/gspca/se401.c 			sd->fmts[i].bytesperline = 0;
sd                291 drivers/media/usb/gspca/se401.c 			sd->fmts[i].sizeimage = widths[i] * heights[i] * 3;
sd                294 drivers/media/usb/gspca/se401.c 				sd->fmts[i].priv * sd->fmts[i].priv);
sd                298 drivers/media/usb/gspca/se401.c 	cam->cam_mode = sd->fmts;
sd                303 drivers/media/usb/gspca/se401.c 	sd->resetlevel = 0x2d; /* Set initial resetlevel */
sd                307 drivers/media/usb/gspca/se401.c 	sd->has_brightness = !!gspca_dev->usb_err;
sd                330 drivers/media/usb/gspca/se401.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                367 drivers/media/usb/gspca/se401.c 	se401_set_feature(gspca_dev, HV7131_REG_ARLV, sd->resetlevel);
sd                369 drivers/media/usb/gspca/se401.c 	sd->packet_read = 0;
sd                370 drivers/media/usb/gspca/se401.c 	sd->pixels_read = 0;
sd                371 drivers/media/usb/gspca/se401.c 	sd->restart_stream = 0;
sd                372 drivers/media/usb/gspca/se401.c 	sd->resetlevel_frame_count = 0;
sd                373 drivers/media/usb/gspca/se401.c 	sd->resetlevel_adjust_dir = 0;
sd                374 drivers/media/usb/gspca/se401.c 	sd->expo_change_state = EXPO_NO_CHANGE;
sd                390 drivers/media/usb/gspca/se401.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                395 drivers/media/usb/gspca/se401.c 	if (sd->restart_stream) {
sd                398 drivers/media/usb/gspca/se401.c 		sd->restart_stream = 0;
sd                404 drivers/media/usb/gspca/se401.c 	sd->resetlevel_frame_count++;
sd                405 drivers/media/usb/gspca/se401.c 	if (sd->resetlevel_frame_count < 20)
sd                420 drivers/media/usb/gspca/se401.c 	oldreset = sd->resetlevel;
sd                422 drivers/media/usb/gspca/se401.c 		while (alrc >= 10 && sd->resetlevel < 63) {
sd                423 drivers/media/usb/gspca/se401.c 			sd->resetlevel++;
sd                427 drivers/media/usb/gspca/se401.c 		while (ahrc >= 20 && sd->resetlevel > 0) {
sd                428 drivers/media/usb/gspca/se401.c 			sd->resetlevel--;
sd                433 drivers/media/usb/gspca/se401.c 	if (sd->resetlevel > oldreset)
sd                437 drivers/media/usb/gspca/se401.c 	if (sd->resetlevel_adjust_dir &&
sd                438 drivers/media/usb/gspca/se401.c 	    sd->resetlevel_adjust_dir != adjust_dir)
sd                439 drivers/media/usb/gspca/se401.c 		sd->resetlevel = oldreset + (sd->resetlevel - oldreset) / 2;
sd                441 drivers/media/usb/gspca/se401.c 	if (sd->resetlevel != oldreset) {
sd                442 drivers/media/usb/gspca/se401.c 		sd->resetlevel_adjust_dir = adjust_dir;
sd                443 drivers/media/usb/gspca/se401.c 		se401_set_feature(gspca_dev, HV7131_REG_ARLV, sd->resetlevel);
sd                446 drivers/media/usb/gspca/se401.c 	sd->resetlevel_frame_count = 0;
sd                451 drivers/media/usb/gspca/se401.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                453 drivers/media/usb/gspca/se401.c 	switch (sd->expo_change_state) {
sd                457 drivers/media/usb/gspca/se401.c 		sd->expo_change_state = EXPO_DROP_FRAME;
sd                463 drivers/media/usb/gspca/se401.c 		sd->expo_change_state = EXPO_NO_CHANGE;
sd                473 drivers/media/usb/gspca/se401.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                477 drivers/media/usb/gspca/se401.c 	if (sd->restart_stream)
sd                489 drivers/media/usb/gspca/se401.c 		if (sd->packet_read < 4) {
sd                490 drivers/media/usb/gspca/se401.c 			count = 4 - sd->packet_read;
sd                493 drivers/media/usb/gspca/se401.c 			memcpy(&sd->packet[sd->packet_read], &data[i], count);
sd                494 drivers/media/usb/gspca/se401.c 			sd->packet_read += count;
sd                496 drivers/media/usb/gspca/se401.c 			if (sd->packet_read < 4)
sd                499 drivers/media/usb/gspca/se401.c 		bits   = sd->packet[3] + (sd->packet[2] << 8);
sd                500 drivers/media/usb/gspca/se401.c 		pixels = sd->packet[1] + ((sd->packet[0] & 0x3f) << 8);
sd                501 drivers/media/usb/gspca/se401.c 		info   = (sd->packet[0] & 0xc0) >> 6;
sd                515 drivers/media/usb/gspca/se401.c 		count = plen - sd->packet_read;
sd                518 drivers/media/usb/gspca/se401.c 		memcpy(&sd->packet[sd->packet_read], &data[i], count);
sd                519 drivers/media/usb/gspca/se401.c 		sd->packet_read += count;
sd                521 drivers/media/usb/gspca/se401.c 		if (sd->packet_read < plen)
sd                524 drivers/media/usb/gspca/se401.c 		sd->pixels_read += pixels;
sd                525 drivers/media/usb/gspca/se401.c 		sd->packet_read = 0;
sd                529 drivers/media/usb/gspca/se401.c 			gspca_frame_add(gspca_dev, INTER_PACKET, sd->packet,
sd                533 drivers/media/usb/gspca/se401.c 			if (sd->pixels_read != imagesize) {
sd                535 drivers/media/usb/gspca/se401.c 				       sd->pixels_read, imagesize);
sd                538 drivers/media/usb/gspca/se401.c 			sd_complete_frame(gspca_dev, sd->packet, plen);
sd                541 drivers/media/usb/gspca/se401.c 			gspca_frame_add(gspca_dev, FIRST_PACKET, sd->packet,
sd                543 drivers/media/usb/gspca/se401.c 			sd->pixels_read = pixels;
sd                550 drivers/media/usb/gspca/se401.c 	sd->restart_stream = 1;
sd                591 drivers/media/usb/gspca/se401.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                605 drivers/media/usb/gspca/se401.c 	if (sd->button_state != state) {
sd                608 drivers/media/usb/gspca/se401.c 		sd->button_state = state;
sd                619 drivers/media/usb/gspca/se401.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                634 drivers/media/usb/gspca/se401.c 		setexposure(gspca_dev, ctrl->val, sd->freq->val);
sd                646 drivers/media/usb/gspca/se401.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                651 drivers/media/usb/gspca/se401.c 	if (sd->has_brightness)
sd                657 drivers/media/usb/gspca/se401.c 	sd->exposure = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                659 drivers/media/usb/gspca/se401.c 	sd->freq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
sd                667 drivers/media/usb/gspca/se401.c 	v4l2_ctrl_cluster(2, &sd->exposure);
sd                702 drivers/media/usb/gspca/se401.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                168 drivers/media/usb/gspca/sn9c2028.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                174 drivers/media/usb/gspca/sn9c2028.c 	sd->model = id->idProduct;
sd                176 drivers/media/usb/gspca/sn9c2028.c 	switch (sd->model) {
sd                201 drivers/media/usb/gspca/sn9c2028.c 	switch (sd->model) {
sd                255 drivers/media/usb/gspca/sn9c2028.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                264 drivers/media/usb/gspca/sn9c2028.c 	switch (sd->model) {
sd                279 drivers/media/usb/gspca/sn9c2028.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                293 drivers/media/usb/gspca/sn9c2028.c 		set_gain(gspca_dev, sd->gain->val);
sd                307 drivers/media/usb/gspca/sn9c2028.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                312 drivers/media/usb/gspca/sn9c2028.c 	switch (sd->model) {
sd                314 drivers/media/usb/gspca/sn9c2028.c 		sd->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                316 drivers/media/usb/gspca/sn9c2028.c 		sd->autogain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                610 drivers/media/usb/gspca/sn9c2028.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                714 drivers/media/usb/gspca/sn9c2028.c 	if (sd->gain)
sd                715 drivers/media/usb/gspca/sn9c2028.c 		set_gain(gspca_dev, v4l2_ctrl_g_ctrl(sd->gain));
sd                804 drivers/media/usb/gspca/sn9c2028.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                807 drivers/media/usb/gspca/sn9c2028.c 	sd->sof_read = 0;
sd                809 drivers/media/usb/gspca/sn9c2028.c 	switch (sd->model) {
sd                833 drivers/media/usb/gspca/sn9c2028.c 	sd->avg_lum = -1;
sd                856 drivers/media/usb/gspca/sn9c2028.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                857 drivers/media/usb/gspca/sn9c2028.c 	s32 cur_gain = v4l2_ctrl_g_ctrl(sd->gain);
sd                863 drivers/media/usb/gspca/sn9c2028.c 		if (cur_gain == sd->gain->maximum)
sd                866 drivers/media/usb/gspca/sn9c2028.c 		v4l2_ctrl_s_ctrl(sd->gain, cur_gain);
sd                869 drivers/media/usb/gspca/sn9c2028.c 		if (cur_gain == sd->gain->minimum)
sd                872 drivers/media/usb/gspca/sn9c2028.c 		v4l2_ctrl_s_ctrl(sd->gain, cur_gain);
sd                879 drivers/media/usb/gspca/sn9c2028.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                881 drivers/media/usb/gspca/sn9c2028.c 	if (sd->autogain == NULL || !v4l2_ctrl_g_ctrl(sd->autogain))
sd                884 drivers/media/usb/gspca/sn9c2028.c 	do_autogain(gspca_dev, sd->avg_lum);
sd                947 drivers/media/usb/gspca/sn9c2028.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                 23 drivers/media/usb/gspca/sn9c2028.h 	struct sd *sd = (struct sd *) gspca_dev;
sd                 28 drivers/media/usb/gspca/sn9c2028.h 		if ((m[i] == sn9c2028_sof_marker[sd->sof_read]) ||
sd                 29 drivers/media/usb/gspca/sn9c2028.h 		    (sd->sof_read > 5)) {
sd                 30 drivers/media/usb/gspca/sn9c2028.h 			sd->sof_read++;
sd                 31 drivers/media/usb/gspca/sn9c2028.h 			if (sd->sof_read == 11)
sd                 32 drivers/media/usb/gspca/sn9c2028.h 				sd->avg_lum_l = m[i];
sd                 33 drivers/media/usb/gspca/sn9c2028.h 			if (sd->sof_read == 12)
sd                 34 drivers/media/usb/gspca/sn9c2028.h 				sd->avg_lum = (m[i] << 8) + sd->avg_lum_l;
sd                 35 drivers/media/usb/gspca/sn9c2028.h 			if (sd->sof_read == sizeof(sn9c2028_sof_marker)) {
sd                 39 drivers/media/usb/gspca/sn9c2028.h 				sd->sof_read = 0;
sd                 43 drivers/media/usb/gspca/sn9c2028.h 			sd->sof_read = 0;
sd                979 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                986 drivers/media/usb/gspca/sn9c20x.c 	row[0] = sd->i2c_intf | (2 << 4);
sd                987 drivers/media/usb/gspca/sn9c20x.c 	row[1] = sd->i2c_addr;
sd               1009 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1016 drivers/media/usb/gspca/sn9c20x.c 	row[0] = sd->i2c_intf | (3 << 4);
sd               1017 drivers/media/usb/gspca/sn9c20x.c 	row[1] = sd->i2c_addr;
sd               1039 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1042 drivers/media/usb/gspca/sn9c20x.c 	row[0] = sd->i2c_intf | (1 << 4);
sd               1043 drivers/media/usb/gspca/sn9c20x.c 	row[1] = sd->i2c_addr;
sd               1051 drivers/media/usb/gspca/sn9c20x.c 	row[0] = sd->i2c_intf | (1 << 4) | 0x02;
sd               1060 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1063 drivers/media/usb/gspca/sn9c20x.c 	row[0] = sd->i2c_intf | (1 << 4);
sd               1064 drivers/media/usb/gspca/sn9c20x.c 	row[1] = sd->i2c_addr;
sd               1072 drivers/media/usb/gspca/sn9c20x.c 	row[0] = sd->i2c_intf | (2 << 4) | 0x02;
sd               1082 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1099 drivers/media/usb/gspca/sn9c20x.c 	sd->hstart = 1;
sd               1100 drivers/media/usb/gspca/sn9c20x.c 	sd->vstart = 7;
sd               1105 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1113 drivers/media/usb/gspca/sn9c20x.c 	sd->hstart = 1;
sd               1114 drivers/media/usb/gspca/sn9c20x.c 	sd->vstart = 2;
sd               1119 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1127 drivers/media/usb/gspca/sn9c20x.c 	sd->hstart = 60;
sd               1128 drivers/media/usb/gspca/sn9c20x.c 	sd->vstart = 11;
sd               1133 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1140 drivers/media/usb/gspca/sn9c20x.c 	sd->hstart = 3;
sd               1141 drivers/media/usb/gspca/sn9c20x.c 	sd->vstart = 3;
sd               1146 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1154 drivers/media/usb/gspca/sn9c20x.c 	sd->hstart = 0;
sd               1155 drivers/media/usb/gspca/sn9c20x.c 	sd->vstart = 1;
sd               1160 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1163 drivers/media/usb/gspca/sn9c20x.c 	sd->i2c_addr = 0x5d;
sd               1172 drivers/media/usb/gspca/sn9c20x.c 		sd->hstart = 2;
sd               1173 drivers/media/usb/gspca/sn9c20x.c 		sd->vstart = 2;
sd               1174 drivers/media/usb/gspca/sn9c20x.c 		sd->sensor = SENSOR_MT9V011;
sd               1180 drivers/media/usb/gspca/sn9c20x.c 	sd->i2c_addr = 0x5c;
sd               1190 drivers/media/usb/gspca/sn9c20x.c 		sd->hstart = 2;
sd               1191 drivers/media/usb/gspca/sn9c20x.c 		sd->vstart = 2;
sd               1192 drivers/media/usb/gspca/sn9c20x.c 		sd->sensor = SENSOR_MT9V111;
sd               1198 drivers/media/usb/gspca/sn9c20x.c 	sd->i2c_addr = 0x5d;
sd               1202 drivers/media/usb/gspca/sn9c20x.c 		sd->i2c_addr = 0x48;
sd               1213 drivers/media/usb/gspca/sn9c20x.c 		sd->hstart = 6;
sd               1214 drivers/media/usb/gspca/sn9c20x.c 		sd->vstart = 2;
sd               1215 drivers/media/usb/gspca/sn9c20x.c 		sd->sensor = SENSOR_MT9V112;
sd               1225 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1231 drivers/media/usb/gspca/sn9c20x.c 	sd->hstart = 0;
sd               1232 drivers/media/usb/gspca/sn9c20x.c 	sd->vstart = 2;
sd               1237 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1243 drivers/media/usb/gspca/sn9c20x.c 	sd->hstart = 0;
sd               1244 drivers/media/usb/gspca/sn9c20x.c 	sd->vstart = 2;
sd               1249 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1275 drivers/media/usb/gspca/sn9c20x.c 	sd->hstart = 1;
sd               1276 drivers/media/usb/gspca/sn9c20x.c 	sd->vstart = 1;
sd               1281 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1287 drivers/media/usb/gspca/sn9c20x.c 	sd->hstart = 0;
sd               1288 drivers/media/usb/gspca/sn9c20x.c 	sd->vstart = 1;
sd               1366 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1368 drivers/media/usb/gspca/sn9c20x.c 	if ((sd->flags & FLIP_DETECT) && dmi_check_system(flip_dmi_table)) {
sd               1373 drivers/media/usb/gspca/sn9c20x.c 	switch (sd->sensor) {
sd               1380 drivers/media/usb/gspca/sn9c20x.c 			sd->vstart = 2;
sd               1382 drivers/media/usb/gspca/sn9c20x.c 			sd->vstart = 3;
sd               1384 drivers/media/usb/gspca/sn9c20x.c 		reg_w1(gspca_dev, 0x1182, sd->vstart);
sd               1435 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1436 drivers/media/usb/gspca/sn9c20x.c 	u8 exp[8] = {sd->i2c_intf, sd->i2c_addr,
sd               1443 drivers/media/usb/gspca/sn9c20x.c 	switch (sd->sensor) {
sd               1491 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1492 drivers/media/usb/gspca/sn9c20x.c 	u8 gain[8] = {sd->i2c_intf, sd->i2c_addr,
sd               1498 drivers/media/usb/gspca/sn9c20x.c 	switch (sd->sensor) {
sd               1538 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1540 drivers/media/usb/gspca/sn9c20x.c 	jpeg_set_qual(sd->jpeg_hdr, val);
sd               1542 drivers/media/usb/gspca/sn9c20x.c 	reg_w1(gspca_dev, 0x10e0, sd->fmt | 0x20); /* write QTAB */
sd               1543 drivers/media/usb/gspca/sn9c20x.c 	reg_w(gspca_dev, 0x1100, &sd->jpeg_hdr[JPEG_QT0_OFFSET], 64);
sd               1544 drivers/media/usb/gspca/sn9c20x.c 	reg_w(gspca_dev, 0x1140, &sd->jpeg_hdr[JPEG_QT1_OFFSET], 64);
sd               1546 drivers/media/usb/gspca/sn9c20x.c 	reg_w1(gspca_dev, 0x10e0, sd->fmt);
sd               1547 drivers/media/usb/gspca/sn9c20x.c 	sd->fmt ^= 0x0c;			/* invert QTAB use + write */
sd               1548 drivers/media/usb/gspca/sn9c20x.c 	reg_w1(gspca_dev, 0x10e0, sd->fmt);
sd               1555 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1566 drivers/media/usb/gspca/sn9c20x.c 		if (sd->sensor >= SENSOR_MT9V011 &&
sd               1567 drivers/media/usb/gspca/sn9c20x.c 		    sd->sensor <= SENSOR_MT9M112) {
sd               1581 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1590 drivers/media/usb/gspca/sn9c20x.c 		if (sd->sensor >= SENSOR_MT9V011 &&
sd               1591 drivers/media/usb/gspca/sn9c20x.c 		    sd->sensor <= SENSOR_MT9M112) {
sd               1615 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1621 drivers/media/usb/gspca/sn9c20x.c 	sd->sensor = id->driver_info >> 8;
sd               1622 drivers/media/usb/gspca/sn9c20x.c 	sd->i2c_addr = id->driver_info;
sd               1623 drivers/media/usb/gspca/sn9c20x.c 	sd->flags = id->driver_info >> 16;
sd               1624 drivers/media/usb/gspca/sn9c20x.c 	sd->i2c_intf = 0x80;			/* i2c 100 Kb/s */
sd               1626 drivers/media/usb/gspca/sn9c20x.c 	switch (sd->sensor) {
sd               1639 drivers/media/usb/gspca/sn9c20x.c 		sd->i2c_intf = 0x81;			/* i2c 400 Kb/s */
sd               1647 drivers/media/usb/gspca/sn9c20x.c 	sd->old_step = 0;
sd               1648 drivers/media/usb/gspca/sn9c20x.c 	sd->older_step = 0;
sd               1649 drivers/media/usb/gspca/sn9c20x.c 	sd->exposure_step = 16;
sd               1651 drivers/media/usb/gspca/sn9c20x.c 	INIT_WORK(&sd->work, qual_upd);
sd               1660 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               1670 drivers/media/usb/gspca/sn9c20x.c 		set_cmatrix(gspca_dev, sd->brightness->val,
sd               1671 drivers/media/usb/gspca/sn9c20x.c 			sd->contrast->val, sd->saturation->val, sd->hue->val);
sd               1678 drivers/media/usb/gspca/sn9c20x.c 		set_redblue(gspca_dev, sd->blue->val, sd->red->val);
sd               1682 drivers/media/usb/gspca/sn9c20x.c 		set_hvflip(gspca_dev, sd->hflip->val, sd->vflip->val);
sd               1694 drivers/media/usb/gspca/sn9c20x.c 		if (sd->sensor == SENSOR_SOI968)
sd               1695 drivers/media/usb/gspca/sn9c20x.c 			set_gain(gspca_dev, sd->gain->val);
sd               1697 drivers/media/usb/gspca/sn9c20x.c 			set_exposure(gspca_dev, sd->exposure->val);
sd               1712 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1718 drivers/media/usb/gspca/sn9c20x.c 	sd->brightness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1720 drivers/media/usb/gspca/sn9c20x.c 	sd->contrast = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1722 drivers/media/usb/gspca/sn9c20x.c 	sd->saturation = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1724 drivers/media/usb/gspca/sn9c20x.c 	sd->hue = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1727 drivers/media/usb/gspca/sn9c20x.c 	sd->gamma = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1730 drivers/media/usb/gspca/sn9c20x.c 	sd->blue = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1732 drivers/media/usb/gspca/sn9c20x.c 	sd->red = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1735 drivers/media/usb/gspca/sn9c20x.c 	if (sd->sensor != SENSOR_OV9655 && sd->sensor != SENSOR_SOI968 &&
sd               1736 drivers/media/usb/gspca/sn9c20x.c 	    sd->sensor != SENSOR_OV7670 && sd->sensor != SENSOR_MT9M001 &&
sd               1737 drivers/media/usb/gspca/sn9c20x.c 	    sd->sensor != SENSOR_MT9VPRB) {
sd               1738 drivers/media/usb/gspca/sn9c20x.c 		sd->hflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1740 drivers/media/usb/gspca/sn9c20x.c 		sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1744 drivers/media/usb/gspca/sn9c20x.c 	if (sd->sensor != SENSOR_SOI968 && sd->sensor != SENSOR_MT9VPRB &&
sd               1745 drivers/media/usb/gspca/sn9c20x.c 	    sd->sensor != SENSOR_MT9M112 && sd->sensor != SENSOR_MT9M111 &&
sd               1746 drivers/media/usb/gspca/sn9c20x.c 	    sd->sensor != SENSOR_MT9V111)
sd               1747 drivers/media/usb/gspca/sn9c20x.c 		sd->exposure = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1750 drivers/media/usb/gspca/sn9c20x.c 	if (sd->sensor != SENSOR_MT9VPRB && sd->sensor != SENSOR_MT9M112 &&
sd               1751 drivers/media/usb/gspca/sn9c20x.c 	    sd->sensor != SENSOR_MT9M111 && sd->sensor != SENSOR_MT9V111) {
sd               1752 drivers/media/usb/gspca/sn9c20x.c 		sd->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1754 drivers/media/usb/gspca/sn9c20x.c 		sd->autogain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1758 drivers/media/usb/gspca/sn9c20x.c 	sd->jpegqual = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1765 drivers/media/usb/gspca/sn9c20x.c 	v4l2_ctrl_cluster(4, &sd->brightness);
sd               1766 drivers/media/usb/gspca/sn9c20x.c 	v4l2_ctrl_cluster(2, &sd->blue);
sd               1767 drivers/media/usb/gspca/sn9c20x.c 	if (sd->hflip)
sd               1768 drivers/media/usb/gspca/sn9c20x.c 		v4l2_ctrl_cluster(2, &sd->hflip);
sd               1769 drivers/media/usb/gspca/sn9c20x.c 	if (sd->autogain) {
sd               1770 drivers/media/usb/gspca/sn9c20x.c 		if (sd->sensor == SENSOR_SOI968)
sd               1774 drivers/media/usb/gspca/sn9c20x.c 			v4l2_ctrl_auto_cluster(3, &sd->autogain, 0, false);
sd               1777 drivers/media/usb/gspca/sn9c20x.c 			v4l2_ctrl_auto_cluster(2, &sd->autogain, 0, false);
sd               1784 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1788 drivers/media/usb/gspca/sn9c20x.c 		0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03
sd               1800 drivers/media/usb/gspca/sn9c20x.c 	if (sd->flags & LED_REVERSE)
sd               1811 drivers/media/usb/gspca/sn9c20x.c 	switch (sd->sensor) {
sd               1880 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1883 drivers/media/usb/gspca/sn9c20x.c 	switch (sd->sensor) {
sd               1891 drivers/media/usb/gspca/sn9c20x.c 			sd->hstart = 140;
sd               1892 drivers/media/usb/gspca/sn9c20x.c 			sd->vstart = 19;
sd               1899 drivers/media/usb/gspca/sn9c20x.c 			sd->hstart = 60;
sd               1900 drivers/media/usb/gspca/sn9c20x.c 			sd->vstart = 11;
sd               1983 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1989 drivers/media/usb/gspca/sn9c20x.c 	jpeg_define(sd->jpeg_hdr, height, width,
sd               1991 drivers/media/usb/gspca/sn9c20x.c 	jpeg_set_qual(sd->jpeg_hdr, v4l2_ctrl_g_ctrl(sd->jpegqual));
sd               1999 drivers/media/usb/gspca/sn9c20x.c 	sd->fmt = fmt;
sd               2021 drivers/media/usb/gspca/sn9c20x.c 	reg_w(gspca_dev, 0x1100, &sd->jpeg_hdr[JPEG_QT0_OFFSET], 64);
sd               2022 drivers/media/usb/gspca/sn9c20x.c 	reg_w(gspca_dev, 0x1140, &sd->jpeg_hdr[JPEG_QT1_OFFSET], 64);
sd               2024 drivers/media/usb/gspca/sn9c20x.c 	reg_w(gspca_dev, 0x1180, HW_WIN(mode, sd->hstart, sd->vstart), 6);
sd               2028 drivers/media/usb/gspca/sn9c20x.c 	set_cmatrix(gspca_dev, v4l2_ctrl_g_ctrl(sd->brightness),
sd               2029 drivers/media/usb/gspca/sn9c20x.c 			v4l2_ctrl_g_ctrl(sd->contrast),
sd               2030 drivers/media/usb/gspca/sn9c20x.c 			v4l2_ctrl_g_ctrl(sd->saturation),
sd               2031 drivers/media/usb/gspca/sn9c20x.c 			v4l2_ctrl_g_ctrl(sd->hue));
sd               2032 drivers/media/usb/gspca/sn9c20x.c 	set_gamma(gspca_dev, v4l2_ctrl_g_ctrl(sd->gamma));
sd               2033 drivers/media/usb/gspca/sn9c20x.c 	set_redblue(gspca_dev, v4l2_ctrl_g_ctrl(sd->blue),
sd               2034 drivers/media/usb/gspca/sn9c20x.c 			v4l2_ctrl_g_ctrl(sd->red));
sd               2035 drivers/media/usb/gspca/sn9c20x.c 	if (sd->gain)
sd               2036 drivers/media/usb/gspca/sn9c20x.c 		set_gain(gspca_dev, v4l2_ctrl_g_ctrl(sd->gain));
sd               2037 drivers/media/usb/gspca/sn9c20x.c 	if (sd->exposure)
sd               2038 drivers/media/usb/gspca/sn9c20x.c 		set_exposure(gspca_dev, v4l2_ctrl_g_ctrl(sd->exposure));
sd               2039 drivers/media/usb/gspca/sn9c20x.c 	if (sd->hflip)
sd               2040 drivers/media/usb/gspca/sn9c20x.c 		set_hvflip(gspca_dev, v4l2_ctrl_g_ctrl(sd->hflip),
sd               2041 drivers/media/usb/gspca/sn9c20x.c 				v4l2_ctrl_g_ctrl(sd->vflip));
sd               2048 drivers/media/usb/gspca/sn9c20x.c 		sd->pktsz = sd->npkt = 0;
sd               2049 drivers/media/usb/gspca/sn9c20x.c 		sd->nchg = 0;
sd               2065 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2068 drivers/media/usb/gspca/sn9c20x.c 	flush_work(&sd->work);
sd               2074 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2075 drivers/media/usb/gspca/sn9c20x.c 	s32 cur_exp = v4l2_ctrl_g_ctrl(sd->exposure);
sd               2076 drivers/media/usb/gspca/sn9c20x.c 	s32 max = sd->exposure->maximum - sd->exposure_step;
sd               2077 drivers/media/usb/gspca/sn9c20x.c 	s32 min = sd->exposure->minimum + sd->exposure_step;
sd               2089 drivers/media/usb/gspca/sn9c20x.c 		new_exp = cur_exp + sd->exposure_step;
sd               2094 drivers/media/usb/gspca/sn9c20x.c 		v4l2_ctrl_s_ctrl(sd->exposure, new_exp);
sd               2096 drivers/media/usb/gspca/sn9c20x.c 		sd->older_step = sd->old_step;
sd               2097 drivers/media/usb/gspca/sn9c20x.c 		sd->old_step = 1;
sd               2099 drivers/media/usb/gspca/sn9c20x.c 		if (sd->old_step ^ sd->older_step)
sd               2100 drivers/media/usb/gspca/sn9c20x.c 			sd->exposure_step /= 2;
sd               2102 drivers/media/usb/gspca/sn9c20x.c 			sd->exposure_step += 2;
sd               2107 drivers/media/usb/gspca/sn9c20x.c 		new_exp = cur_exp - sd->exposure_step;
sd               2112 drivers/media/usb/gspca/sn9c20x.c 		v4l2_ctrl_s_ctrl(sd->exposure, new_exp);
sd               2113 drivers/media/usb/gspca/sn9c20x.c 		sd->older_step = sd->old_step;
sd               2114 drivers/media/usb/gspca/sn9c20x.c 		sd->old_step = 0;
sd               2116 drivers/media/usb/gspca/sn9c20x.c 		if (sd->old_step ^ sd->older_step)
sd               2117 drivers/media/usb/gspca/sn9c20x.c 			sd->exposure_step /= 2;
sd               2119 drivers/media/usb/gspca/sn9c20x.c 			sd->exposure_step += 2;
sd               2125 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2126 drivers/media/usb/gspca/sn9c20x.c 	s32 cur_gain = v4l2_ctrl_g_ctrl(sd->gain);
sd               2128 drivers/media/usb/gspca/sn9c20x.c 	if (avg_lum < MIN_AVG_LUM && cur_gain < sd->gain->maximum)
sd               2129 drivers/media/usb/gspca/sn9c20x.c 		v4l2_ctrl_s_ctrl(sd->gain, cur_gain + 1);
sd               2130 drivers/media/usb/gspca/sn9c20x.c 	if (avg_lum > MAX_AVG_LUM && cur_gain > sd->gain->minimum)
sd               2131 drivers/media/usb/gspca/sn9c20x.c 		v4l2_ctrl_s_ctrl(sd->gain, cur_gain - 1);
sd               2136 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2139 drivers/media/usb/gspca/sn9c20x.c 	if (sd->autogain == NULL || !v4l2_ctrl_g_ctrl(sd->autogain))
sd               2142 drivers/media/usb/gspca/sn9c20x.c 	avg_lum = atomic_read(&sd->avg_lum);
sd               2143 drivers/media/usb/gspca/sn9c20x.c 	if (sd->sensor == SENSOR_SOI968)
sd               2153 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = container_of(work, struct sd, work);
sd               2154 drivers/media/usb/gspca/sn9c20x.c 	struct gspca_dev *gspca_dev = &sd->gspca_dev;
sd               2155 drivers/media/usb/gspca/sn9c20x.c 	s32 qual = v4l2_ctrl_g_ctrl(sd->jpegqual);
sd               2170 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2172 drivers/media/usb/gspca/sn9c20x.c 	if (!(sd->flags & HAS_NO_BUTTON) && len == 1) {
sd               2187 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2199 drivers/media/usb/gspca/sn9c20x.c 		r = (sd->pktsz * 100) /
sd               2200 drivers/media/usb/gspca/sn9c20x.c 			(sd->npkt *
sd               2208 drivers/media/usb/gspca/sn9c20x.c 		sd->nchg += new_qual;
sd               2209 drivers/media/usb/gspca/sn9c20x.c 		if (sd->nchg < -6 || sd->nchg >= 12) {
sd               2213 drivers/media/usb/gspca/sn9c20x.c 			s32 curqual = sd->jpegqual->cur.val;
sd               2214 drivers/media/usb/gspca/sn9c20x.c 			sd->nchg = 0;
sd               2216 drivers/media/usb/gspca/sn9c20x.c 			if (new_qual < sd->jpegqual->minimum)
sd               2217 drivers/media/usb/gspca/sn9c20x.c 				new_qual = sd->jpegqual->minimum;
sd               2218 drivers/media/usb/gspca/sn9c20x.c 			else if (new_qual > sd->jpegqual->maximum)
sd               2219 drivers/media/usb/gspca/sn9c20x.c 				new_qual = sd->jpegqual->maximum;
sd               2221 drivers/media/usb/gspca/sn9c20x.c 				sd->jpegqual->cur.val = new_qual;
sd               2222 drivers/media/usb/gspca/sn9c20x.c 				schedule_work(&sd->work);
sd               2226 drivers/media/usb/gspca/sn9c20x.c 		sd->nchg = 0;
sd               2228 drivers/media/usb/gspca/sn9c20x.c 	sd->pktsz = sd->npkt = 0;
sd               2235 drivers/media/usb/gspca/sn9c20x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2241 drivers/media/usb/gspca/sn9c20x.c 	is_jpeg = (sd->fmt & 0x03) == 0;
sd               2268 drivers/media/usb/gspca/sn9c20x.c 		atomic_set(&sd->avg_lum, avg_lum);
sd               2282 drivers/media/usb/gspca/sn9c20x.c 				sd->jpeg_hdr, JPEG_HDR_SZ);
sd               2292 drivers/media/usb/gspca/sn9c20x.c 			sd->npkt++;
sd               2293 drivers/media/usb/gspca/sn9c20x.c 			sd->pktsz += len;
sd               2373 drivers/media/usb/gspca/sn9c20x.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                535 drivers/media/usb/gspca/sonixb.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                537 drivers/media/usb/gspca/sonixb.c 	switch (sd->sensor) {
sd                544 drivers/media/usb/gspca/sonixb.c 		i2cOV[1] = sensor_data[sd->sensor].sensor_addr;
sd                545 drivers/media/usb/gspca/sonixb.c 		i2cOV[3] = sd->brightness->val;
sd                557 drivers/media/usb/gspca/sonixb.c 		if (sd->sensor == SENSOR_PAS106) {
sd                562 drivers/media/usb/gspca/sonixb.c 		if (sd->brightness->val < 127) {
sd                566 drivers/media/usb/gspca/sonixb.c 			i2cpbright[4] = 127 - sd->brightness->val;
sd                568 drivers/media/usb/gspca/sonixb.c 			i2cpbright[4] = sd->brightness->val - 127;
sd                581 drivers/media/usb/gspca/sonixb.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                584 drivers/media/usb/gspca/sonixb.c 	switch (sd->sensor) {
sd                629 drivers/media/usb/gspca/sonixb.c 		if (sd->sensor == SENSOR_OV7630 && gain >= 32)
sd                632 drivers/media/usb/gspca/sonixb.c 		i2c[1] = sensor_data[sd->sensor].sensor_addr;
sd                647 drivers/media/usb/gspca/sonixb.c 		if (sd->sensor == SENSOR_PAS106) {
sd                666 drivers/media/usb/gspca/sonixb.c 		if (sd->bridge == BRIDGE_103) {
sd                680 drivers/media/usb/gspca/sonixb.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                682 drivers/media/usb/gspca/sonixb.c 	switch (sd->sensor) {
sd                730 drivers/media/usb/gspca/sonixb.c 		if (sd->sensor == SENSOR_OV6650) {
sd                764 drivers/media/usb/gspca/sonixb.c 		i2c[1] = sensor_data[sd->sensor].sensor_addr;
sd                769 drivers/media/usb/gspca/sonixb.c 		if (sd->reg11 == reg11)
sd                774 drivers/media/usb/gspca/sonixb.c 			sd->reg11 = reg11;
sd                851 drivers/media/usb/gspca/sonixb.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                853 drivers/media/usb/gspca/sonixb.c 	if (sd->sensor == SENSOR_OV6650 || sd->sensor == SENSOR_OV7630) {
sd                859 drivers/media/usb/gspca/sonixb.c 		switch (sd->plfreq->val) {
sd                866 drivers/media/usb/gspca/sonixb.c 			i2c[3] = (sd->sensor == SENSOR_OV6650)
sd                870 drivers/media/usb/gspca/sonixb.c 		i2c[1] = sensor_data[sd->sensor].sensor_addr;
sd                877 drivers/media/usb/gspca/sonixb.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                880 drivers/media/usb/gspca/sonixb.c 	avg_lum = atomic_read(&sd->avg_lum);
sd                884 drivers/media/usb/gspca/sonixb.c 	if (sd->autogain_ignore_frames > 0) {
sd                885 drivers/media/usb/gspca/sonixb.c 		sd->autogain_ignore_frames--;
sd                891 drivers/media/usb/gspca/sonixb.c 	if (sensor_data[sd->sensor].flags & F_SIF) {
sd                900 drivers/media/usb/gspca/sonixb.c 	if (sd->brightness)
sd                901 drivers/media/usb/gspca/sonixb.c 		desired_avg_lum = sd->brightness->val * desired_avg_lum / 127;
sd                906 drivers/media/usb/gspca/sonixb.c 			sd->autogain_ignore_frames = AUTOGAIN_IGNORE_FRAMES;
sd                910 drivers/media/usb/gspca/sonixb.c 				deadzone, gain_knee, sd->exposure_knee))
sd                911 drivers/media/usb/gspca/sonixb.c 			sd->autogain_ignore_frames = AUTOGAIN_IGNORE_FRAMES;
sd                919 drivers/media/usb/gspca/sonixb.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                927 drivers/media/usb/gspca/sonixb.c 	sd->sensor = id->driver_info >> 8;
sd                928 drivers/media/usb/gspca/sonixb.c 	sd->bridge = id->driver_info & 0xff;
sd                931 drivers/media/usb/gspca/sonixb.c 	if (!(sensor_data[sd->sensor].flags & F_SIF)) {
sd                957 drivers/media/usb/gspca/sonixb.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                968 drivers/media/usb/gspca/sonixb.c 		sd->autogain_ignore_frames = AUTOGAIN_IGNORE_FRAMES;
sd               1000 drivers/media/usb/gspca/sonixb.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1006 drivers/media/usb/gspca/sonixb.c 	if (sd->sensor == SENSOR_OV6650 || sd->sensor == SENSOR_OV7630 ||
sd               1007 drivers/media/usb/gspca/sonixb.c 	    sd->sensor == SENSOR_PAS106 || sd->sensor == SENSOR_PAS202)
sd               1008 drivers/media/usb/gspca/sonixb.c 		sd->brightness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1012 drivers/media/usb/gspca/sonixb.c 	switch (sd->sensor) {
sd               1034 drivers/media/usb/gspca/sonixb.c 		if (sd->bridge == BRIDGE_103) {
sd               1044 drivers/media/usb/gspca/sonixb.c 	switch (sd->sensor) {
sd               1048 drivers/media/usb/gspca/sonixb.c 		sd->exposure_knee = 964;
sd               1056 drivers/media/usb/gspca/sonixb.c 		sd->exposure_knee = 200;
sd               1070 drivers/media/usb/gspca/sonixb.c 	if (sd->sensor == SENSOR_OV6650 || sd->sensor == SENSOR_OV7630)
sd               1071 drivers/media/usb/gspca/sonixb.c 		sd->plfreq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
sd               1090 drivers/media/usb/gspca/sonixb.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1097 drivers/media/usb/gspca/sonixb.c 	memcpy(&regs[0x01], sensor_data[sd->sensor].bridge_init, 0x19);
sd               1102 drivers/media/usb/gspca/sonixb.c 	if (sd->bridge == BRIDGE_103) {
sd               1112 drivers/media/usb/gspca/sonixb.c 	if (sensor_data[sd->sensor].flags & F_SIF) {
sd               1134 drivers/media/usb/gspca/sonixb.c 	switch (sd->sensor) {
sd               1147 drivers/media/usb/gspca/sonixb.c 		if (sd->bridge == BRIDGE_103) {
sd               1155 drivers/media/usb/gspca/sonixb.c 		if (sd->bridge == BRIDGE_103)
sd               1177 drivers/media/usb/gspca/sonixb.c 	      (sd->bridge == BRIDGE_103) ? 0x30 : 0x1f);
sd               1180 drivers/media/usb/gspca/sonixb.c 	i2c_w_vector(gspca_dev, sensor_data[sd->sensor].sensor_init,
sd               1181 drivers/media/usb/gspca/sonixb.c 			sensor_data[sd->sensor].sensor_init_size);
sd               1184 drivers/media/usb/gspca/sonixb.c 	switch (sd->sensor) {
sd               1196 drivers/media/usb/gspca/sonixb.c 		if (sd->bridge == BRIDGE_103) {
sd               1224 drivers/media/usb/gspca/sonixb.c 	sd->reg11 = -1;
sd               1231 drivers/media/usb/gspca/sonixb.c 	sd->frames_to_drop = 0;
sd               1232 drivers/media/usb/gspca/sonixb.c 	sd->autogain_ignore_frames = 0;
sd               1235 drivers/media/usb/gspca/sonixb.c 	atomic_set(&sd->avg_lum, -1);
sd               1246 drivers/media/usb/gspca/sonixb.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1247 drivers/media/usb/gspca/sonixb.c 	int i, header_size = (sd->bridge == BRIDGE_103) ? 18 : 12;
sd               1259 drivers/media/usb/gspca/sonixb.c 		switch (sd->header_read) {
sd               1262 drivers/media/usb/gspca/sonixb.c 				sd->header_read++;
sd               1266 drivers/media/usb/gspca/sonixb.c 				sd->header_read++;
sd               1268 drivers/media/usb/gspca/sonixb.c 				sd->header_read = 0;
sd               1272 drivers/media/usb/gspca/sonixb.c 				sd->header_read++;
sd               1274 drivers/media/usb/gspca/sonixb.c 				sd->header_read = 0;
sd               1278 drivers/media/usb/gspca/sonixb.c 				sd->header_read++;
sd               1280 drivers/media/usb/gspca/sonixb.c 				sd->header_read = 1;
sd               1282 drivers/media/usb/gspca/sonixb.c 				sd->header_read = 0;
sd               1286 drivers/media/usb/gspca/sonixb.c 				sd->header_read++;
sd               1288 drivers/media/usb/gspca/sonixb.c 				sd->header_read = 1;
sd               1290 drivers/media/usb/gspca/sonixb.c 				sd->header_read = 0;
sd               1294 drivers/media/usb/gspca/sonixb.c 				sd->header_read++;
sd               1296 drivers/media/usb/gspca/sonixb.c 				sd->header_read = 1;
sd               1298 drivers/media/usb/gspca/sonixb.c 				sd->header_read = 0;
sd               1301 drivers/media/usb/gspca/sonixb.c 			sd->header[sd->header_read - 6] = data[i];
sd               1302 drivers/media/usb/gspca/sonixb.c 			sd->header_read++;
sd               1303 drivers/media/usb/gspca/sonixb.c 			if (sd->header_read == header_size) {
sd               1304 drivers/media/usb/gspca/sonixb.c 				sd->header_read = 0;
sd               1317 drivers/media/usb/gspca/sonixb.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1323 drivers/media/usb/gspca/sonixb.c 		if (sd->bridge == BRIDGE_103) {
sd               1351 drivers/media/usb/gspca/sonixb.c 		int  lum = sd->header[lum_offset] +
sd               1352 drivers/media/usb/gspca/sonixb.c 			  (sd->header[lum_offset + 1] << 8);
sd               1361 drivers/media/usb/gspca/sonixb.c 		if (lum == 0 && sd->prev_avg_lum != 0) {
sd               1363 drivers/media/usb/gspca/sonixb.c 			sd->frames_to_drop = 2;
sd               1364 drivers/media/usb/gspca/sonixb.c 			sd->prev_avg_lum = 0;
sd               1366 drivers/media/usb/gspca/sonixb.c 			sd->prev_avg_lum = lum;
sd               1367 drivers/media/usb/gspca/sonixb.c 		atomic_set(&sd->avg_lum, lum);
sd               1369 drivers/media/usb/gspca/sonixb.c 		if (sd->frames_to_drop)
sd               1370 drivers/media/usb/gspca/sonixb.c 			sd->frames_to_drop--;
sd               1453 drivers/media/usb/gspca/sonixb.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd               1230 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1236 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               1246 drivers/media/usb/gspca/sonixj.c 	gspca_dev->usb_buf[1] = sd->i2c_addr;
sd               1296 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1299 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               1309 drivers/media/usb/gspca/sonixj.c 	mode[1] = sd->i2c_addr;
sd               1359 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1397 drivers/media/usb/gspca/sonixj.c 		sd->sensor = SENSOR_MI0360B;
sd               1401 drivers/media/usb/gspca/sonixj.c 		sd->sensor = SENSOR_MT9V111;
sd               1415 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1421 drivers/media/usb/gspca/sonixj.c 	sd->i2c_addr = 0x21;
sd               1429 drivers/media/usb/gspca/sonixj.c 		sd->sensor = SENSOR_SOI768;
sd               1441 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1447 drivers/media/usb/gspca/sonixj.c 	sd->i2c_addr = 0x21;
sd               1460 drivers/media/usb/gspca/sonixj.c 	sd->i2c_addr = 0x6e;
sd               1469 drivers/media/usb/gspca/sonixj.c 		sd->sensor = SENSOR_PO1030;
sd               1478 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1485 drivers/media/usb/gspca/sonixj.c 	sd->i2c_addr = 0x21;
sd               1492 drivers/media/usb/gspca/sonixj.c 		sd->sensor = SENSOR_GC0307;
sd               1499 drivers/media/usb/gspca/sonixj.c 	sd->i2c_addr = 0x6e;
sd               1518 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1521 drivers/media/usb/gspca/sonixj.c 	sd->bridge = id->driver_info >> 16;
sd               1522 drivers/media/usb/gspca/sonixj.c 	sd->sensor = id->driver_info >> 8;
sd               1523 drivers/media/usb/gspca/sonixj.c 	sd->flags = id->driver_info;
sd               1526 drivers/media/usb/gspca/sonixj.c 	if (sd->sensor == SENSOR_ADCM1700) {
sd               1535 drivers/media/usb/gspca/sonixj.c 	sd->ag_cnt = -1;
sd               1536 drivers/media/usb/gspca/sonixj.c 	sd->quality = QUALITY_DEF;
sd               1538 drivers/media/usb/gspca/sonixj.c 	INIT_WORK(&sd->work, qual_upd);
sd               1546 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1562 drivers/media/usb/gspca/sonixj.c 	switch (sd->bridge) {
sd               1575 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               1590 drivers/media/usb/gspca/sonixj.c 	switch (sd->bridge) {
sd               1604 drivers/media/usb/gspca/sonixj.c 	sn9c1xx = sn_tb[sd->sensor];
sd               1605 drivers/media/usb/gspca/sonixj.c 	sd->i2c_addr = sn9c1xx[9];
sd               1619 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1625 drivers/media/usb/gspca/sonixj.c 	sd->brightness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1628 drivers/media/usb/gspca/sonixj.c 	sd->contrast = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1631 drivers/media/usb/gspca/sonixj.c 	sd->saturation = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1633 drivers/media/usb/gspca/sonixj.c 	sd->red_bal = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1635 drivers/media/usb/gspca/sonixj.c 	sd->blue_bal = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1638 drivers/media/usb/gspca/sonixj.c 	sd->gamma = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1641 drivers/media/usb/gspca/sonixj.c 	if (sd->sensor == SENSOR_OM6802)
sd               1642 drivers/media/usb/gspca/sonixj.c 		sd->sharpness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1645 drivers/media/usb/gspca/sonixj.c 		sd->sharpness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1648 drivers/media/usb/gspca/sonixj.c 	if (sd->flags & F_ILLUM)
sd               1649 drivers/media/usb/gspca/sonixj.c 		sd->illum = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1652 drivers/media/usb/gspca/sonixj.c 	if (sd->sensor == SENSOR_PO2030N) {
sd               1657 drivers/media/usb/gspca/sonixj.c 		sd->hflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1661 drivers/media/usb/gspca/sonixj.c 	if (sd->sensor != SENSOR_ADCM1700 && sd->sensor != SENSOR_OV7660 &&
sd               1662 drivers/media/usb/gspca/sonixj.c 	    sd->sensor != SENSOR_PO1030 && sd->sensor != SENSOR_SOI768 &&
sd               1663 drivers/media/usb/gspca/sonixj.c 	    sd->sensor != SENSOR_SP80708)
sd               1667 drivers/media/usb/gspca/sonixj.c 	if (sd->sensor == SENSOR_HV7131R || sd->sensor == SENSOR_OV7630 ||
sd               1668 drivers/media/usb/gspca/sonixj.c 	    sd->sensor == SENSOR_OV7648 || sd->sensor == SENSOR_PO2030N)
sd               1669 drivers/media/usb/gspca/sonixj.c 		sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1672 drivers/media/usb/gspca/sonixj.c 	if (sd->sensor == SENSOR_OV7630 || sd->sensor == SENSOR_OV7648 ||
sd               1673 drivers/media/usb/gspca/sonixj.c 	    sd->sensor == SENSOR_OV7660)
sd               1674 drivers/media/usb/gspca/sonixj.c 		sd->freq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
sd               1684 drivers/media/usb/gspca/sonixj.c 	v4l2_ctrl_cluster(2, &sd->red_bal);
sd               1685 drivers/media/usb/gspca/sonixj.c 	if (sd->sensor == SENSOR_PO2030N) {
sd               1686 drivers/media/usb/gspca/sonixj.c 		v4l2_ctrl_cluster(2, &sd->vflip);
sd               1696 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1698 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               1799 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1801 drivers/media/usb/gspca/sonixj.c 	int brightness = sd->brightness->val;
sd               1805 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               1816 drivers/media/usb/gspca/sonixj.c 		sd->exposure = expo_adjust(gspca_dev, expo);
sd               1821 drivers/media/usb/gspca/sonixj.c 		sd->exposure = expo_adjust(gspca_dev, expo);
sd               1825 drivers/media/usb/gspca/sonixj.c 		sd->exposure = expo_adjust(gspca_dev, expo);
sd               1829 drivers/media/usb/gspca/sonixj.c 		sd->exposure = expo_adjust(gspca_dev, expo);
sd               1833 drivers/media/usb/gspca/sonixj.c 		sd->exposure = expo_adjust(gspca_dev, expo);
sd               1837 drivers/media/usb/gspca/sonixj.c 		sd->exposure = expo_adjust(gspca_dev, expo);
sd               1846 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1850 drivers/media/usb/gspca/sonixj.c 	k2 = sd->contrast->val * 37 / (CONTRAST_MAX + 1)
sd               1863 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1876 drivers/media/usb/gspca/sonixj.c 	colors = sd->saturation->val;
sd               1877 drivers/media/usb/gspca/sonixj.c 	if (sd->sensor == SENSOR_MI0360B)
sd               1891 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1893 drivers/media/usb/gspca/sonixj.c 	if (sd->sensor == SENSOR_PO2030N) {
sd               1898 drivers/media/usb/gspca/sonixj.c 		rg1b[3] = sd->red_bal->val * 2;
sd               1899 drivers/media/usb/gspca/sonixj.c 		rg1b[5] = sd->blue_bal->val * 2;
sd               1903 drivers/media/usb/gspca/sonixj.c 	reg_w1(gspca_dev, 0x05, sd->red_bal->val);
sd               1905 drivers/media/usb/gspca/sonixj.c 	reg_w1(gspca_dev, 0x06, sd->blue_bal->val);
sd               1910 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1919 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               1939 drivers/media/usb/gspca/sonixj.c 	val = sd->gamma->val;
sd               1948 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1950 drivers/media/usb/gspca/sonixj.c 	if (sd->sensor == SENSOR_PO2030N) {
sd               1965 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1967 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               1972 drivers/media/usb/gspca/sonixj.c 		if (sd->sensor == SENSOR_OV7630)
sd               1978 drivers/media/usb/gspca/sonixj.c 		i2c_w1(&sd->gspca_dev, 0x13, comb);
sd               1983 drivers/media/usb/gspca/sonixj.c 		sd->ag_cnt = AG_CNT_START;
sd               1985 drivers/media/usb/gspca/sonixj.c 		sd->ag_cnt = -1;
sd               1990 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1992 drivers/media/usb/gspca/sonixj.c 	if (sd->sensor == SENSOR_PO2030N) {
sd               2003 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2006 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               2009 drivers/media/usb/gspca/sonixj.c 		if (sd->vflip->val)
sd               2015 drivers/media/usb/gspca/sonixj.c 		if (!sd->vflip->val)
sd               2021 drivers/media/usb/gspca/sonixj.c 		if (sd->vflip->val)
sd               2035 drivers/media/usb/gspca/sonixj.c 		if (sd->hflip->val)
sd               2037 drivers/media/usb/gspca/sonixj.c 		if (sd->vflip->val)
sd               2039 drivers/media/usb/gspca/sonixj.c 		i2c_w1(&sd->gspca_dev, 0x1e, comn);
sd               2046 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2048 drivers/media/usb/gspca/sonixj.c 	reg_w1(gspca_dev, 0x99, sd->sharpness->val);
sd               2053 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2055 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               2058 drivers/media/usb/gspca/sonixj.c 			sd->illum->val ? 0x64 : 0x60);
sd               2062 drivers/media/usb/gspca/sonixj.c 			sd->illum->val ? 0x77 : 0x74);
sd               2072 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2074 drivers/media/usb/gspca/sonixj.c 	if (sd->sensor == SENSOR_OV7660) {
sd               2078 drivers/media/usb/gspca/sonixj.c 		switch (sd->freq->val) {
sd               2095 drivers/media/usb/gspca/sonixj.c 		switch (sd->sensor) {
sd               2106 drivers/media/usb/gspca/sonixj.c 		switch (sd->freq->val) {
sd               2127 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2129 drivers/media/usb/gspca/sonixj.c 	jpeg_set_qual(sd->jpeg_hdr, sd->quality);
sd               2133 drivers/media/usb/gspca/sonixj.c 	memcpy(gspca_dev->usb_buf, &sd->jpeg_hdr[JPEG_QT0_OFFSET], 64);
sd               2141 drivers/media/usb/gspca/sonixj.c 	memcpy(gspca_dev->usb_buf, &sd->jpeg_hdr[JPEG_QT1_OFFSET], 64);
sd               2150 drivers/media/usb/gspca/sonixj.c 	sd->reg18 ^= 0x40;
sd               2151 drivers/media/usb/gspca/sonixj.c 	reg_w1(gspca_dev, 0x18, sd->reg18);
sd               2158 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = container_of(work, struct sd, work);
sd               2159 drivers/media/usb/gspca/sonixj.c 	struct gspca_dev *gspca_dev = &sd->gspca_dev;
sd               2163 drivers/media/usb/gspca/sonixj.c 	gspca_dbg(gspca_dev, D_STREAM, "qual_upd %d%%\n", sd->quality);
sd               2172 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2200 drivers/media/usb/gspca/sonixj.c 	jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
sd               2205 drivers/media/usb/gspca/sonixj.c 	sn9c1xx = sn_tb[sd->sensor];
sd               2210 drivers/media/usb/gspca/sonixj.c 	if (sd->flags & F_PDN_INV)
sd               2222 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               2242 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               2267 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               2287 drivers/media/usb/gspca/sonixj.c 	i2c_w_seq(gspca_dev, sensor_init[sd->sensor]);
sd               2294 drivers/media/usb/gspca/sonixj.c 	if (sd->sensor == SENSOR_ADCM1700) {
sd               2303 drivers/media/usb/gspca/sonixj.c 	if (sd->sensor == SENSOR_ADCM1700) {
sd               2311 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               2331 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               2366 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               2436 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               2449 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               2470 drivers/media/usb/gspca/sonixj.c 	sd->reg18 = sn9c1xx[0x18] | (mode << 4) | 0x40;
sd               2471 drivers/media/usb/gspca/sonixj.c 	reg_w1(gspca_dev, 0x18, sd->reg18);
sd               2476 drivers/media/usb/gspca/sonixj.c 	sd->reg01 = reg01;
sd               2477 drivers/media/usb/gspca/sonixj.c 	sd->reg17 = reg17;
sd               2479 drivers/media/usb/gspca/sonixj.c 	sd->pktsz = sd->npkt = 0;
sd               2480 drivers/media/usb/gspca/sonixj.c 	sd->nchg = sd->short_mark = 0;
sd               2487 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2499 drivers/media/usb/gspca/sonixj.c 	reg01 = sd->reg01;
sd               2500 drivers/media/usb/gspca/sonixj.c 	reg17 = sd->reg17 & ~SEN_CLK_EN;
sd               2501 drivers/media/usb/gspca/sonixj.c 	switch (sd->sensor) {
sd               2562 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2565 drivers/media/usb/gspca/sonixj.c 	flush_work(&sd->work);
sd               2571 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2578 drivers/media/usb/gspca/sonixj.c 	if (sd->ag_cnt < 0)
sd               2580 drivers/media/usb/gspca/sonixj.c 	if (--sd->ag_cnt >= 0)
sd               2582 drivers/media/usb/gspca/sonixj.c 	sd->ag_cnt = AG_CNT_START;
sd               2584 drivers/media/usb/gspca/sonixj.c 	delta = atomic_read(&sd->avg_lum);
sd               2587 drivers/media/usb/gspca/sonixj.c 	if (sd->sensor == SENSOR_PO2030N) {
sd               2595 drivers/media/usb/gspca/sonixj.c 		switch (sd->sensor) {
sd               2597 drivers/media/usb/gspca/sonixj.c 			expotimes = sd->exposure;
sd               2601 drivers/media/usb/gspca/sonixj.c 			sd->exposure = expo_adjust(gspca_dev,
sd               2605 drivers/media/usb/gspca/sonixj.c 			expotimes = sd->exposure >> 8;
sd               2609 drivers/media/usb/gspca/sonixj.c 			sd->exposure = expo_adjust(gspca_dev,
sd               2614 drivers/media/usb/gspca/sonixj.c 			expotimes = sd->exposure;
sd               2618 drivers/media/usb/gspca/sonixj.c 			sd->exposure = expo_adjust(gspca_dev,
sd               2626 drivers/media/usb/gspca/sonixj.c 			expotimes = sd->exposure;
sd               2630 drivers/media/usb/gspca/sonixj.c 			sd->exposure = expo_adjust(gspca_dev,
sd               2639 drivers/media/usb/gspca/sonixj.c static void set_lum(struct sd *sd,
sd               2658 drivers/media/usb/gspca/sonixj.c 	atomic_set(&sd->avg_lum, avg_lum);
sd               2667 drivers/media/usb/gspca/sonixj.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2687 drivers/media/usb/gspca/sonixj.c 	sd->npkt++;
sd               2688 drivers/media/usb/gspca/sonixj.c 	sd->pktsz += len;
sd               2695 drivers/media/usb/gspca/sonixj.c 	i = sd->short_mark;
sd               2697 drivers/media/usb/gspca/sonixj.c 		sd->short_mark = 0;
sd               2729 drivers/media/usb/gspca/sonixj.c 		sd->short_mark = -1;
sd               2732 drivers/media/usb/gspca/sonixj.c 				sd->jpeg_hdr, JPEG_HDR_SZ);
sd               2758 drivers/media/usb/gspca/sonixj.c 		r = (sd->pktsz * 100) /
sd               2759 drivers/media/usb/gspca/sonixj.c 			(sd->npkt *
sd               2767 drivers/media/usb/gspca/sonixj.c 		sd->nchg += new_qual;
sd               2768 drivers/media/usb/gspca/sonixj.c 		if (sd->nchg < -6 || sd->nchg >= 12) {
sd               2769 drivers/media/usb/gspca/sonixj.c 			sd->nchg = 0;
sd               2770 drivers/media/usb/gspca/sonixj.c 			new_qual += sd->quality;
sd               2775 drivers/media/usb/gspca/sonixj.c 			if (new_qual != sd->quality) {
sd               2776 drivers/media/usb/gspca/sonixj.c 				sd->quality = new_qual;
sd               2777 drivers/media/usb/gspca/sonixj.c 				schedule_work(&sd->work);
sd               2781 drivers/media/usb/gspca/sonixj.c 		sd->nchg = 0;
sd               2783 drivers/media/usb/gspca/sonixj.c 	sd->pktsz = sd->npkt = 0;
sd               2788 drivers/media/usb/gspca/sonixj.c 		sd->short_mark = i + 62 - len;
sd               2791 drivers/media/usb/gspca/sonixj.c 	if (sd->ag_cnt >= 0)
sd               2792 drivers/media/usb/gspca/sonixj.c 		set_lum(sd, data + i);
sd               2800 drivers/media/usb/gspca/sonixj.c 				sd->jpeg_hdr, JPEG_HDR_SZ);
sd               2965 drivers/media/usb/gspca/sonixj.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                248 drivers/media/usb/gspca/spca1528.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                251 drivers/media/usb/gspca/spca1528.c 	jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
sd                256 drivers/media/usb/gspca/spca1528.c 	jpeg_set_qual(sd->jpeg_hdr, 85);
sd                268 drivers/media/usb/gspca/spca1528.c 	sd->pkt_seq = 0;
sd                306 drivers/media/usb/gspca/spca1528.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                319 drivers/media/usb/gspca/spca1528.c 			sd->pkt_seq = !(data[1] & 1);
sd                325 drivers/media/usb/gspca/spca1528.c 		if ((data[1] & 1) != sd->pkt_seq)
sd                329 drivers/media/usb/gspca/spca1528.c 					sd->jpeg_hdr, JPEG_HDR_SZ);
sd                422 drivers/media/usb/gspca/spca1528.c 	return gspca_dev_probe2(intf, id, &sd_desc, sizeof(struct sd),
sd                561 drivers/media/usb/gspca/spca500.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                565 drivers/media/usb/gspca/spca500.c 	sd->subtype = id->driver_info;
sd                566 drivers/media/usb/gspca/spca500.c 	if (sd->subtype != LogitechClickSmart310) {
sd                579 drivers/media/usb/gspca/spca500.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                583 drivers/media/usb/gspca/spca500.c 	if (sd->subtype == LogitechClickSmart310)
sd                593 drivers/media/usb/gspca/spca500.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                599 drivers/media/usb/gspca/spca500.c 	jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
sd                602 drivers/media/usb/gspca/spca500.c 	jpeg_set_qual(sd->jpeg_hdr, QUALITY);
sd                604 drivers/media/usb/gspca/spca500.c 	if (sd->subtype == LogitechClickSmart310) {
sd                620 drivers/media/usb/gspca/spca500.c 	switch (sd->subtype) {
sd                823 drivers/media/usb/gspca/spca500.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                838 drivers/media/usb/gspca/spca500.c 			sd->jpeg_hdr, JPEG_HDR_SZ);
sd                963 drivers/media/usb/gspca/spca500.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd               1811 drivers/media/usb/gspca/spca501.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1817 drivers/media/usb/gspca/spca501.c 	sd->subtype = id->driver_info;
sd               1825 drivers/media/usb/gspca/spca501.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1827 drivers/media/usb/gspca/spca501.c 	switch (sd->subtype) {
sd               1853 drivers/media/usb/gspca/spca501.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1856 drivers/media/usb/gspca/spca501.c 	switch (sd->subtype) {
sd               2020 drivers/media/usb/gspca/spca501.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                590 drivers/media/usb/gspca/spca505.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                595 drivers/media/usb/gspca/spca505.c 	sd->subtype = id->driver_info;
sd                596 drivers/media/usb/gspca/spca505.c 	if (sd->subtype != IntelPCCameraPro)
sd                607 drivers/media/usb/gspca/spca505.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                610 drivers/media/usb/gspca/spca505.c 			 sd->subtype == Nxultra
sd                625 drivers/media/usb/gspca/spca505.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                636 drivers/media/usb/gspca/spca505.c 	if (sd->subtype == Nxultra)
sd                775 drivers/media/usb/gspca/spca505.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                114 drivers/media/usb/gspca/spca506.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                145 drivers/media/usb/gspca/spca506.c 	sd->norme = norme;
sd                146 drivers/media/usb/gspca/spca506.c 	sd->channel = channel;
sd                155 drivers/media/usb/gspca/spca506.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                159 drivers/media/usb/gspca/spca506.c 	*norme = sd->norme;
sd                160 drivers/media/usb/gspca/spca506.c 	*channel = sd->channel;
sd                583 drivers/media/usb/gspca/spca506.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd               1341 drivers/media/usb/gspca/spca508.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1376 drivers/media/usb/gspca/spca508.c 	sd->subtype = id->driver_info;
sd               1378 drivers/media/usb/gspca/spca508.c 	init_data = init_data_tb[sd->subtype];
sd               1510 drivers/media/usb/gspca/spca508.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                395 drivers/media/usb/gspca/spca561.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                422 drivers/media/usb/gspca/spca561.c 	sd->chip_revision = id->driver_info;
sd                423 drivers/media/usb/gspca/spca561.c 	if (sd->chip_revision == Rev012A) {
sd                430 drivers/media/usb/gspca/spca561.c 	sd->expo12a = EXPO12A_DEF;
sd                456 drivers/media/usb/gspca/spca561.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                459 drivers/media/usb/gspca/spca561.c 	if (sd->chip_revision == Rev012A)
sd                472 drivers/media/usb/gspca/spca561.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                479 drivers/media/usb/gspca/spca561.c 	if (sd->chip_revision == Rev012A) {
sd                549 drivers/media/usb/gspca/spca561.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                552 drivers/media/usb/gspca/spca561.c 		sd->ag_cnt = AG_CNT_START;
sd                554 drivers/media/usb/gspca/spca561.c 		sd->ag_cnt = -1;
sd                592 drivers/media/usb/gspca/spca561.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                621 drivers/media/usb/gspca/spca561.c 	setwhite(gspca_dev, v4l2_ctrl_g_ctrl(sd->hue),
sd                622 drivers/media/usb/gspca/spca561.c 			v4l2_ctrl_g_ctrl(sd->contrast));
sd                624 drivers/media/usb/gspca/spca561.c 	setautogain(gspca_dev, v4l2_ctrl_g_ctrl(sd->autogain));
sd                631 drivers/media/usb/gspca/spca561.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                633 drivers/media/usb/gspca/spca561.c 	if (sd->chip_revision == Rev012A) {
sd                645 drivers/media/usb/gspca/spca561.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                655 drivers/media/usb/gspca/spca561.c 	if (sd->ag_cnt < 0)
sd                657 drivers/media/usb/gspca/spca561.c 	if (--sd->ag_cnt >= 0)
sd                659 drivers/media/usb/gspca/spca561.c 	sd->ag_cnt = AG_CNT_START;
sd                661 drivers/media/usb/gspca/spca561.c 	switch (sd->chip_revision) {
sd                705 drivers/media/usb/gspca/spca561.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                733 drivers/media/usb/gspca/spca561.c 			if (sd->chip_revision == Rev012A) {
sd                753 drivers/media/usb/gspca/spca561.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                766 drivers/media/usb/gspca/spca561.c 		setwhite(gspca_dev, sd->hue->val, ctrl->val);
sd                813 drivers/media/usb/gspca/spca561.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                818 drivers/media/usb/gspca/spca561.c 	sd->contrast = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                820 drivers/media/usb/gspca/spca561.c 	sd->hue = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                824 drivers/media/usb/gspca/spca561.c 	sd->autogain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                831 drivers/media/usb/gspca/spca561.c 	v4l2_ctrl_cluster(2, &sd->contrast);
sd                895 drivers/media/usb/gspca/spca561.c 				sizeof(struct sd),
sd                200 drivers/media/usb/gspca/sq905.c 	struct sd *dev = container_of(work, struct sd, work_struct);
sd                289 drivers/media/usb/gspca/sq905.c 	struct sd *dev = (struct sd *) gspca_dev;
sd                304 drivers/media/usb/gspca/sq905.c 	struct sd *dev = (struct sd *) gspca_dev;
sd                356 drivers/media/usb/gspca/sq905.c 	struct sd *dev = (struct sd *) gspca_dev;
sd                409 drivers/media/usb/gspca/sq905.c 			sizeof(struct sd),
sd                123 drivers/media/usb/gspca/sq905c.c 	struct sd *dev = container_of(work, struct sd, work_struct);
sd                197 drivers/media/usb/gspca/sq905c.c 	struct sd *dev = (struct sd *) gspca_dev;
sd                235 drivers/media/usb/gspca/sq905c.c 	struct sd *dev = (struct sd *) gspca_dev;
sd                255 drivers/media/usb/gspca/sq905c.c 	struct sd *dev = (struct sd *) gspca_dev;
sd                311 drivers/media/usb/gspca/sq905c.c 			sizeof(struct sd),
sd                479 drivers/media/usb/gspca/sq930x.c static void i2c_write(struct sd *sd,
sd                483 drivers/media/usb/gspca/sq930x.c 	struct gspca_dev *gspca_dev = &sd->gspca_dev;
sd                492 drivers/media/usb/gspca/sq930x.c 	sensor = &sensor_tb[sd->sensor];
sd                584 drivers/media/usb/gspca/sq930x.c static void gpio_set(struct sd *sd, u16 val, u16 mask)
sd                586 drivers/media/usb/gspca/sq930x.c 	struct gspca_dev *gspca_dev = &sd->gspca_dev;
sd                589 drivers/media/usb/gspca/sq930x.c 		sd->gpio[0] &= ~mask;
sd                590 drivers/media/usb/gspca/sq930x.c 		sd->gpio[0] |= val;
sd                592 drivers/media/usb/gspca/sq930x.c 			~sd->gpio[0] << 8);
sd                597 drivers/media/usb/gspca/sq930x.c 		sd->gpio[1] &= ~mask;
sd                598 drivers/media/usb/gspca/sq930x.c 		sd->gpio[1] |= val;
sd                600 drivers/media/usb/gspca/sq930x.c 			~sd->gpio[1] << 8);
sd                604 drivers/media/usb/gspca/sq930x.c static void gpio_init(struct sd *sd,
sd                607 drivers/media/usb/gspca/sq930x.c 	gpio_set(sd, *gpio++, 0x000f);
sd                608 drivers/media/usb/gspca/sq930x.c 	gpio_set(sd, *gpio++, 0x000f);
sd                609 drivers/media/usb/gspca/sq930x.c 	gpio_set(sd, *gpio++, 0x000f);
sd                610 drivers/media/usb/gspca/sq930x.c 	gpio_set(sd, *gpio++, 0x000f);
sd                611 drivers/media/usb/gspca/sq930x.c 	gpio_set(sd, *gpio, 0x000f);
sd                614 drivers/media/usb/gspca/sq930x.c static void bridge_init(struct sd *sd)
sd                620 drivers/media/usb/gspca/sq930x.c 	ucbus_write(&sd->gspca_dev, &clkfreq_cmd, 1, 1);
sd                622 drivers/media/usb/gspca/sq930x.c 	gpio_set(sd, SQ930_GPIO_POWER, 0xff00);
sd                627 drivers/media/usb/gspca/sq930x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                640 drivers/media/usb/gspca/sq930x.c 		ucbus_write(&sd->gspca_dev, sensor->cmd, sensor->cmd_len, 8);
sd                641 drivers/media/usb/gspca/sq930x.c 		gpio_init(sd, sensor->gpio);
sd                653 drivers/media/usb/gspca/sq930x.c 	sd->sensor = probe_order[i];
sd                654 drivers/media/usb/gspca/sq930x.c 	switch (sd->sensor) {
sd                658 drivers/media/usb/gspca/sq930x.c 		       sensor_tb[sd->sensor].name);
sd                699 drivers/media/usb/gspca/sq930x.c static void global_init(struct sd *sd, int first_time)
sd                701 drivers/media/usb/gspca/sq930x.c 	switch (sd->sensor) {
sd                704 drivers/media/usb/gspca/sq930x.c 			ucbus_write(&sd->gspca_dev,
sd                707 drivers/media/usb/gspca/sq930x.c 		gpio_init(sd, sensor_tb[sd->sensor].gpio);
sd                710 drivers/media/usb/gspca/sq930x.c 		if (sd->type != Creative_live_motion)
sd                711 drivers/media/usb/gspca/sq930x.c 			gpio_set(sd, SQ930_GPIO_EXTRA1, 0x00ff);
sd                713 drivers/media/usb/gspca/sq930x.c 			gpio_set(sd, 0, 0x00ff);
sd                716 drivers/media/usb/gspca/sq930x.c 			ucbus_write(&sd->gspca_dev,
sd                719 drivers/media/usb/gspca/sq930x.c 		gpio_init(sd, sensor_tb[sd->sensor].gpio);
sd                723 drivers/media/usb/gspca/sq930x.c 			ucbus_write(&sd->gspca_dev,
sd                727 drivers/media/usb/gspca/sq930x.c 		gpio_init(sd, sensor_tb[sd->sensor].gpio);
sd                728 drivers/media/usb/gspca/sq930x.c 		gpio_set(sd, SQ930_GPIO_EXTRA2, SQ930_GPIO_EXTRA2);
sd                733 drivers/media/usb/gspca/sq930x.c 			mt9v111_init(&sd->gspca_dev);
sd                735 drivers/media/usb/gspca/sq930x.c 			gpio_init(sd, sensor_tb[sd->sensor].gpio);
sd                740 drivers/media/usb/gspca/sq930x.c static void lz24bp_ppl(struct sd *sd, u16 ppl)
sd                747 drivers/media/usb/gspca/sq930x.c 	ucbus_write(&sd->gspca_dev, cmds, ARRAY_SIZE(cmds), 2);
sd                752 drivers/media/usb/gspca/sq930x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                762 drivers/media/usb/gspca/sq930x.c 	switch (sd->sensor) {
sd                765 drivers/media/usb/gspca/sq930x.c 		min_frclk = sd->sensor == SENSOR_ICX098BQ ? 0x210 : 0x26f;
sd                783 drivers/media/usb/gspca/sq930x.c 		sensor = &sensor_tb[sd->sensor];
sd                808 drivers/media/usb/gspca/sq930x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                811 drivers/media/usb/gspca/sq930x.c 	sd->sensor = id->driver_info >> 8;
sd                812 drivers/media/usb/gspca/sq930x.c 	sd->type = id->driver_info;
sd                825 drivers/media/usb/gspca/sq930x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                827 drivers/media/usb/gspca/sq930x.c 	sd->gpio[0] = sd->gpio[1] = 0xff;	/* force gpio rewrite */
sd                858 drivers/media/usb/gspca/sq930x.c 	bridge_init(sd);
sd                860 drivers/media/usb/gspca/sq930x.c 	if (sd->sensor == SENSOR_MI0360) {
sd                864 drivers/media/usb/gspca/sq930x.c 			sd->sensor = SENSOR_ICX098BQ;
sd                870 drivers/media/usb/gspca/sq930x.c 			  sensor_tb[sd->sensor].name);
sd                871 drivers/media/usb/gspca/sq930x.c 		global_init(sd, 1);
sd                879 drivers/media/usb/gspca/sq930x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                884 drivers/media/usb/gspca/sq930x.c 	cap = &capconfig[sd->sensor][mode];
sd                898 drivers/media/usb/gspca/sq930x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                901 drivers/media/usb/gspca/sq930x.c 	sd->do_ctrl = 0;
sd                910 drivers/media/usb/gspca/sq930x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                913 drivers/media/usb/gspca/sq930x.c 	bridge_init(sd);
sd                914 drivers/media/usb/gspca/sq930x.c 	global_init(sd, 0);
sd                917 drivers/media/usb/gspca/sq930x.c 	switch (sd->sensor) {
sd                932 drivers/media/usb/gspca/sq930x.c 		gpio_set(sd, SQ930_GPIO_EXTRA2 | SQ930_GPIO_RSTBAR, 0x00ff);
sd                935 drivers/media/usb/gspca/sq930x.c 		gpio_set(sd, 0x7f, 0x00ff);
sd                939 drivers/media/usb/gspca/sq930x.c 		gpio_set(sd, SQ930_GPIO_EXTRA2 | SQ930_GPIO_RSTBAR, 0x00ff);
sd                945 drivers/media/usb/gspca/sq930x.c 		if (sd->type != Creative_live_motion)
sd                957 drivers/media/usb/gspca/sq930x.c 		lz24bp_ppl(sd, mode == 1 ? 0x0564 : 0x0310);
sd                964 drivers/media/usb/gspca/sq930x.c 		i2c_write(sd, mi0360_init_23,
sd                966 drivers/media/usb/gspca/sq930x.c 		i2c_write(sd, mi0360_init_24,
sd                968 drivers/media/usb/gspca/sq930x.c 		i2c_write(sd, mi0360_init_25,
sd                973 drivers/media/usb/gspca/sq930x.c 		i2c_write(sd, mi0360_start_2,
sd                975 drivers/media/usb/gspca/sq930x.c 		i2c_write(sd, mi0360_start_3,
sd                983 drivers/media/usb/gspca/sq930x.c 		i2c_write(sd,
sd                991 drivers/media/usb/gspca/sq930x.c 		i2c_write(sd, mt9v111_init_0,
sd                993 drivers/media/usb/gspca/sq930x.c 		i2c_write(sd, mt9v111_init_1,
sd                995 drivers/media/usb/gspca/sq930x.c 		i2c_write(sd, mt9v111_init_2,
sd               1000 drivers/media/usb/gspca/sq930x.c 		i2c_write(sd, mt9v111_init_3,
sd               1002 drivers/media/usb/gspca/sq930x.c 		i2c_write(sd, mt9v111_init_4,
sd               1011 drivers/media/usb/gspca/sq930x.c 	if (sd->sensor == SENSOR_MT9V111)
sd               1012 drivers/media/usb/gspca/sq930x.c 		gpio_set(sd, SQ930_GPIO_DFL_LED, SQ930_GPIO_DFL_LED);
sd               1014 drivers/media/usb/gspca/sq930x.c 	sd->do_ctrl = 1;	/* set the exposure */
sd               1021 drivers/media/usb/gspca/sq930x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1023 drivers/media/usb/gspca/sq930x.c 	if (sd->sensor == SENSOR_MT9V111)
sd               1024 drivers/media/usb/gspca/sq930x.c 		gpio_set(sd, 0, SQ930_GPIO_DFL_LED);
sd               1032 drivers/media/usb/gspca/sq930x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1035 drivers/media/usb/gspca/sq930x.c 	if (!sd->do_ctrl || gspca_dev->cam.bulk_nurbs != 0)
sd               1037 drivers/media/usb/gspca/sq930x.c 	sd->do_ctrl = 0;
sd               1039 drivers/media/usb/gspca/sq930x.c 	setexposure(gspca_dev, v4l2_ctrl_g_ctrl(sd->exposure),
sd               1040 drivers/media/usb/gspca/sq930x.c 			v4l2_ctrl_g_ctrl(sd->gain));
sd               1055 drivers/media/usb/gspca/sq930x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1057 drivers/media/usb/gspca/sq930x.c 	if (sd->do_ctrl)
sd               1068 drivers/media/usb/gspca/sq930x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1077 drivers/media/usb/gspca/sq930x.c 		setexposure(gspca_dev, ctrl->val, sd->gain->val);
sd               1090 drivers/media/usb/gspca/sq930x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1094 drivers/media/usb/gspca/sq930x.c 	sd->exposure = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1096 drivers/media/usb/gspca/sq930x.c 	sd->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               1103 drivers/media/usb/gspca/sq930x.c 	v4l2_ctrl_cluster(2, &sd->exposure);
sd               1140 drivers/media/usb/gspca/sq930x.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                236 drivers/media/usb/gspca/stk014.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                240 drivers/media/usb/gspca/stk014.c 	jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
sd                243 drivers/media/usb/gspca/stk014.c 	jpeg_set_qual(sd->jpeg_hdr, QUALITY);
sd                313 drivers/media/usb/gspca/stk014.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                331 drivers/media/usb/gspca/stk014.c 			sd->jpeg_hdr, JPEG_HDR_SZ);
sd                418 drivers/media/usb/gspca/stk014.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                169 drivers/media/usb/gspca/stk1135.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                171 drivers/media/usb/gspca/stk1135.c 	if (page != sd->sensor_page) {
sd                173 drivers/media/usb/gspca/stk1135.c 		sd->sensor_page = page;
sd                386 drivers/media/usb/gspca/stk1135.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                412 drivers/media/usb/gspca/stk1135.c 	sd->sensor_page = 0xff;
sd                432 drivers/media/usb/gspca/stk1135.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                466 drivers/media/usb/gspca/stk1135.c 	sd->pkt_seq = 0;
sd                486 drivers/media/usb/gspca/stk1135.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                501 drivers/media/usb/gspca/stk1135.c 	if (sd->flip_status != flip)
sd                502 drivers/media/usb/gspca/stk1135.c 		sd->flip_debounce++;
sd                504 drivers/media/usb/gspca/stk1135.c 		sd->flip_debounce = 0;
sd                509 drivers/media/usb/gspca/stk1135.c 		if (seq != sd->pkt_seq) {
sd                512 drivers/media/usb/gspca/stk1135.c 			sd->pkt_seq = seq;
sd                517 drivers/media/usb/gspca/stk1135.c 	sd->pkt_seq++;
sd                518 drivers/media/usb/gspca/stk1135.c 	if (sd->pkt_seq > STK1135_HDR_SEQ_MASK)
sd                519 drivers/media/usb/gspca/stk1135.c 		sd->pkt_seq = 0;
sd                534 drivers/media/usb/gspca/stk1135.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                536 drivers/media/usb/gspca/stk1135.c 	if (sd->flip_status)
sd                543 drivers/media/usb/gspca/stk1135.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                545 drivers/media/usb/gspca/stk1135.c 	if (sd->flip_status)
sd                552 drivers/media/usb/gspca/stk1135.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                554 drivers/media/usb/gspca/stk1135.c 	if (sd->flip_debounce > 100) {
sd                555 drivers/media/usb/gspca/stk1135.c 		sd->flip_status = !sd->flip_status;
sd                556 drivers/media/usb/gspca/stk1135.c 		sethflip(gspca_dev, v4l2_ctrl_g_ctrl(sd->hflip));
sd                557 drivers/media/usb/gspca/stk1135.c 		setvflip(gspca_dev, v4l2_ctrl_g_ctrl(sd->vflip));
sd                589 drivers/media/usb/gspca/stk1135.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                594 drivers/media/usb/gspca/stk1135.c 	sd->hflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                596 drivers/media/usb/gspca/stk1135.c 	sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                660 drivers/media/usb/gspca/stk1135.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                 96 drivers/media/usb/gspca/stv0680.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                 98 drivers/media/usb/gspca/stv0680.c 	if (sd->current_mode == mode)
sd                115 drivers/media/usb/gspca/stv0680.c 	sd->current_mode = mode;
sd                125 drivers/media/usb/gspca/stv0680.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                169 drivers/media/usb/gspca/stv0680.c 		sd->video_mode = 0x00; /* CIF */
sd                171 drivers/media/usb/gspca/stv0680.c 		sd->video_mode = 0x03; /* QVGA */
sd                185 drivers/media/usb/gspca/stv0680.c 	sd->current_mode = sd->orig_mode = ret;
sd                187 drivers/media/usb/gspca/stv0680.c 	ret = stv0680_set_video_mode(gspca_dev, sd->video_mode);
sd                201 drivers/media/usb/gspca/stv0680.c 	sd->mode.width = (gspca_dev->usb_buf[4] << 8) |
sd                203 drivers/media/usb/gspca/stv0680.c 	sd->mode.height = (gspca_dev->usb_buf[6] << 8) |
sd                205 drivers/media/usb/gspca/stv0680.c 	sd->mode.pixelformat = V4L2_PIX_FMT_STV0680;
sd                206 drivers/media/usb/gspca/stv0680.c 	sd->mode.field = V4L2_FIELD_NONE;
sd                207 drivers/media/usb/gspca/stv0680.c 	sd->mode.bytesperline = sd->mode.width;
sd                208 drivers/media/usb/gspca/stv0680.c 	sd->mode.sizeimage = cam->bulk_size;
sd                209 drivers/media/usb/gspca/stv0680.c 	sd->mode.colorspace = V4L2_COLORSPACE_SRGB;
sd                213 drivers/media/usb/gspca/stv0680.c 	cam->cam_mode = &sd->mode;
sd                217 drivers/media/usb/gspca/stv0680.c 	ret = stv0680_set_video_mode(gspca_dev, sd->orig_mode);
sd                240 drivers/media/usb/gspca/stv0680.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                242 drivers/media/usb/gspca/stv0680.c 	ret = stv0680_set_video_mode(gspca_dev, sd->video_mode);
sd                253 drivers/media/usb/gspca/stv0680.c 	if (stv_sndctrl(gspca_dev, 1, 0x09, sd->video_mode << 8, 0x0) != 0x0)
sd                268 drivers/media/usb/gspca/stv0680.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                270 drivers/media/usb/gspca/stv0680.c 	if (!sd->gspca_dev.present)
sd                273 drivers/media/usb/gspca/stv0680.c 	stv0680_set_video_mode(gspca_dev, sd->orig_mode);
sd                280 drivers/media/usb/gspca/stv0680.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                286 drivers/media/usb/gspca/stv0680.c 	if (len != sd->mode.sizeimage) {
sd                323 drivers/media/usb/gspca/stv0680.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                 29 drivers/media/usb/gspca/stv06xx/stv06xx.c int stv06xx_write_bridge(struct sd *sd, u16 address, u16 i2c_data)
sd                 32 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                 33 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct usb_device *udev = sd->gspca_dev.dev;
sd                 34 drivers/media/usb/gspca/stv06xx/stv06xx.c 	__u8 *buf = sd->gspca_dev.usb_buf;
sd                 51 drivers/media/usb/gspca/stv06xx/stv06xx.c int stv06xx_read_bridge(struct sd *sd, u16 address, u8 *i2c_data)
sd                 54 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                 55 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct usb_device *udev = sd->gspca_dev.dev;
sd                 56 drivers/media/usb/gspca/stv06xx/stv06xx.c 	__u8 *buf = sd->gspca_dev.usb_buf;
sd                 72 drivers/media/usb/gspca/stv06xx/stv06xx.c int stv06xx_write_sensor(struct sd *sd, u8 address, u16 value)
sd                 74 drivers/media/usb/gspca/stv06xx/stv06xx.c 	if (sd->sensor->i2c_len == 2) {
sd                 76 drivers/media/usb/gspca/stv06xx/stv06xx.c 		return stv06xx_write_sensor_words(sd, data, 1);
sd                 79 drivers/media/usb/gspca/stv06xx/stv06xx.c 		return stv06xx_write_sensor_bytes(sd, data, 1);
sd                 83 drivers/media/usb/gspca/stv06xx/stv06xx.c static int stv06xx_write_sensor_finish(struct sd *sd)
sd                 87 drivers/media/usb/gspca/stv06xx/stv06xx.c 	if (sd->bridge == BRIDGE_STV610) {
sd                 88 drivers/media/usb/gspca/stv06xx/stv06xx.c 		struct usb_device *udev = sd->gspca_dev.dev;
sd                 89 drivers/media/usb/gspca/stv06xx/stv06xx.c 		__u8 *buf = sd->gspca_dev.usb_buf;
sd                100 drivers/media/usb/gspca/stv06xx/stv06xx.c int stv06xx_write_sensor_bytes(struct sd *sd, const u8 *data, u8 len)
sd                103 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                104 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct usb_device *udev = sd->gspca_dev.dev;
sd                105 drivers/media/usb/gspca/stv06xx/stv06xx.c 	__u8 *buf = sd->gspca_dev.usb_buf;
sd                118 drivers/media/usb/gspca/stv06xx/stv06xx.c 		buf[0x20] = sd->sensor->i2c_addr;
sd                128 drivers/media/usb/gspca/stv06xx/stv06xx.c 	return stv06xx_write_sensor_finish(sd);
sd                131 drivers/media/usb/gspca/stv06xx/stv06xx.c int stv06xx_write_sensor_words(struct sd *sd, const u16 *data, u8 len)
sd                134 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                135 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct usb_device *udev = sd->gspca_dev.dev;
sd                136 drivers/media/usb/gspca/stv06xx/stv06xx.c 	__u8 *buf = sd->gspca_dev.usb_buf;
sd                151 drivers/media/usb/gspca/stv06xx/stv06xx.c 		buf[0x20] = sd->sensor->i2c_addr;
sd                161 drivers/media/usb/gspca/stv06xx/stv06xx.c 	return stv06xx_write_sensor_finish(sd);
sd                164 drivers/media/usb/gspca/stv06xx/stv06xx.c int stv06xx_read_sensor(struct sd *sd, const u8 address, u16 *value)
sd                167 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                168 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct usb_device *udev = sd->gspca_dev.dev;
sd                169 drivers/media/usb/gspca/stv06xx/stv06xx.c 	__u8 *buf = sd->gspca_dev.usb_buf;
sd                171 drivers/media/usb/gspca/stv06xx/stv06xx.c 	err = stv06xx_write_bridge(sd, STV_I2C_FLUSH, sd->sensor->i2c_flush);
sd                179 drivers/media/usb/gspca/stv06xx/stv06xx.c 	buf[0x20] = sd->sensor->i2c_addr;
sd                194 drivers/media/usb/gspca/stv06xx/stv06xx.c 			      0x04, 0xc0, 0x1410, 0, buf, sd->sensor->i2c_len,
sd                196 drivers/media/usb/gspca/stv06xx/stv06xx.c 	if (sd->sensor->i2c_len == 2)
sd                208 drivers/media/usb/gspca/stv06xx/stv06xx.c static void stv06xx_dump_bridge(struct sd *sd)
sd                215 drivers/media/usb/gspca/stv06xx/stv06xx.c 		stv06xx_read_bridge(sd, i, &data);
sd                222 drivers/media/usb/gspca/stv06xx/stv06xx.c 		stv06xx_read_bridge(sd, i, &data);
sd                225 drivers/media/usb/gspca/stv06xx/stv06xx.c 		stv06xx_write_bridge(sd, i, 0xff);
sd                226 drivers/media/usb/gspca/stv06xx/stv06xx.c 		stv06xx_read_bridge(sd, i, &data);
sd                235 drivers/media/usb/gspca/stv06xx/stv06xx.c 		stv06xx_write_bridge(sd, i, buf);
sd                242 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                251 drivers/media/usb/gspca/stv06xx/stv06xx.c 	err = sd->sensor->init(sd);
sd                253 drivers/media/usb/gspca/stv06xx/stv06xx.c 	if (dump_sensor && sd->sensor->dump)
sd                254 drivers/media/usb/gspca/stv06xx/stv06xx.c 		sd->sensor->dump(sd);
sd                262 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                267 drivers/media/usb/gspca/stv06xx/stv06xx.c 	return sd->sensor->init_controls(sd);
sd                273 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                278 drivers/media/usb/gspca/stv06xx/stv06xx.c 	intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
sd                279 drivers/media/usb/gspca/stv06xx/stv06xx.c 	alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt);
sd                289 drivers/media/usb/gspca/stv06xx/stv06xx.c 	err = stv06xx_write_bridge(sd, STV_ISO_SIZE_L, packet_size);
sd                294 drivers/media/usb/gspca/stv06xx/stv06xx.c 	err = sd->sensor->start(sd);
sd                299 drivers/media/usb/gspca/stv06xx/stv06xx.c 	err = stv06xx_write_bridge(sd, STV_ISO_ENABLE, 1);
sd                314 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                328 drivers/media/usb/gspca/stv06xx/stv06xx.c 		cpu_to_le16(sd->sensor->max_packet_size[gspca_dev->curr_mode]);
sd                337 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                345 drivers/media/usb/gspca/stv06xx/stv06xx.c 	min_packet_size = sd->sensor->min_packet_size[gspca_dev->curr_mode];
sd                364 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                367 drivers/media/usb/gspca/stv06xx/stv06xx.c 	err = stv06xx_write_bridge(sd, STV_ISO_ENABLE, 0);
sd                371 drivers/media/usb/gspca/stv06xx/stv06xx.c 	err = sd->sensor->stop(sd);
sd                396 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                428 drivers/media/usb/gspca/stv06xx/stv06xx.c 		if (sd->bridge == BRIDGE_ST6422 && (id & 0xff00) == 0x0200)
sd                437 drivers/media/usb/gspca/stv06xx/stv06xx.c 			if (sd->to_skip) {
sd                438 drivers/media/usb/gspca/stv06xx/stv06xx.c 				int skip = (sd->to_skip < chunk_len) ?
sd                439 drivers/media/usb/gspca/stv06xx/stv06xx.c 					    sd->to_skip : chunk_len;
sd                443 drivers/media/usb/gspca/stv06xx/stv06xx.c 				sd->to_skip -= skip;
sd                460 drivers/media/usb/gspca/stv06xx/stv06xx.c 			if (sd->bridge == BRIDGE_ST6422)
sd                461 drivers/media/usb/gspca/stv06xx/stv06xx.c 				sd->to_skip = gspca_dev->pixfmt.width * 4;
sd                552 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                556 drivers/media/usb/gspca/stv06xx/stv06xx.c 	sd->bridge = id->driver_info;
sd                560 drivers/media/usb/gspca/stv06xx/stv06xx.c 		stv06xx_dump_bridge(sd);
sd                562 drivers/media/usb/gspca/stv06xx/stv06xx.c 	sd->sensor = &stv06xx_sensor_st6422;
sd                563 drivers/media/usb/gspca/stv06xx/stv06xx.c 	if (!sd->sensor->probe(sd))
sd                566 drivers/media/usb/gspca/stv06xx/stv06xx.c 	sd->sensor = &stv06xx_sensor_vv6410;
sd                567 drivers/media/usb/gspca/stv06xx/stv06xx.c 	if (!sd->sensor->probe(sd))
sd                570 drivers/media/usb/gspca/stv06xx/stv06xx.c 	sd->sensor = &stv06xx_sensor_hdcs1x00;
sd                571 drivers/media/usb/gspca/stv06xx/stv06xx.c 	if (!sd->sensor->probe(sd))
sd                574 drivers/media/usb/gspca/stv06xx/stv06xx.c 	sd->sensor = &stv06xx_sensor_hdcs1020;
sd                575 drivers/media/usb/gspca/stv06xx/stv06xx.c 	if (!sd->sensor->probe(sd))
sd                578 drivers/media/usb/gspca/stv06xx/stv06xx.c 	sd->sensor = &stv06xx_sensor_pb0100;
sd                579 drivers/media/usb/gspca/stv06xx/stv06xx.c 	if (!sd->sensor->probe(sd))
sd                582 drivers/media/usb/gspca/stv06xx/stv06xx.c 	sd->sensor = NULL;
sd                604 drivers/media/usb/gspca/stv06xx/stv06xx.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                611 drivers/media/usb/gspca/stv06xx/stv06xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                612 drivers/media/usb/gspca/stv06xx/stv06xx.c 	void *priv = sd->sensor_priv;
sd                615 drivers/media/usb/gspca/stv06xx/stv06xx.c 	sd->sensor = NULL;
sd                 94 drivers/media/usb/gspca/stv06xx/stv06xx.h int stv06xx_write_bridge(struct sd *sd, u16 address, u16 i2c_data);
sd                 95 drivers/media/usb/gspca/stv06xx/stv06xx.h int stv06xx_read_bridge(struct sd *sd, u16 address, u8 *i2c_data);
sd                 97 drivers/media/usb/gspca/stv06xx/stv06xx.h int stv06xx_write_sensor_bytes(struct sd *sd, const u8 *data, u8 len);
sd                 98 drivers/media/usb/gspca/stv06xx/stv06xx.h int stv06xx_write_sensor_words(struct sd *sd, const u16 *data, u8 len);
sd                100 drivers/media/usb/gspca/stv06xx/stv06xx.h int stv06xx_read_sensor(struct sd *sd, const u8 address, u16 *value);
sd                101 drivers/media/usb/gspca/stv06xx/stv06xx.h int stv06xx_write_sensor(struct sd *sd, u8 address, u16 value);
sd                 82 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c static int hdcs_reg_write_seq(struct sd *sd, u8 reg, u8 *vals, u8 len)
sd                 99 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	return stv06xx_write_sensor_bytes(sd, regs, len);
sd                102 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c static int hdcs_set_state(struct sd *sd, enum hdcs_power_state state)
sd                104 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	struct hdcs *hdcs = sd->sensor_priv;
sd                113 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 		ret = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), 0);
sd                136 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	ret = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), val);
sd                145 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c static int hdcs_reset(struct sd *sd)
sd                147 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	struct hdcs *hdcs = sd->sensor_priv;
sd                150 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	err = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), 1);
sd                154 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	err = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), 0);
sd                163 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                164 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	struct hdcs *hdcs = sd->sensor_priv;
sd                193 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	if (IS_1020(sd)) {
sd                212 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	if (IS_1020(sd)) {
sd                225 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 		err = stv06xx_write_sensor_bytes(sd, exp, 6);
sd                241 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 		err = stv06xx_write_sensor_bytes(sd, exp, 7);
sd                250 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c static int hdcs_set_gains(struct sd *sd, u8 g)
sd                264 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	err = hdcs_reg_write_seq(sd, HDCS_ERECPGA, gains, 4);
sd                271 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	return hdcs_set_gains((struct sd *) gspca_dev,
sd                275 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c static int hdcs_set_size(struct sd *sd,
sd                278 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	struct hdcs *hdcs = sd->sensor_priv;
sd                290 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	if (IS_1020(sd)) {
sd                313 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	err = hdcs_reg_write_seq(sd, HDCS_FWROW, win, 4);
sd                344 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c static int hdcs_init_controls(struct sd *sd)
sd                346 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
sd                356 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c static int hdcs_probe_1x00(struct sd *sd)
sd                362 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	ret = stv06xx_read_sensor(sd, HDCS_IDENT, &sensor);
sd                368 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	sd->gspca_dev.cam.cam_mode = hdcs1x00_mode;
sd                369 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	sd->gspca_dev.cam.nmodes = ARRAY_SIZE(hdcs1x00_mode);
sd                406 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	hdcs->psmp = (sd->bridge == BRIDGE_STV602) ? 20 : 5;
sd                408 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	sd->sensor_priv = hdcs;
sd                413 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c static int hdcs_probe_1020(struct sd *sd)
sd                419 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	ret = stv06xx_read_sensor(sd, HDCS_IDENT, &sensor);
sd                425 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	sd->gspca_dev.cam.cam_mode = hdcs1020_mode;
sd                426 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	sd->gspca_dev.cam.nmodes = ARRAY_SIZE(hdcs1020_mode);
sd                450 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	sd->sensor_priv = hdcs;
sd                455 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c static int hdcs_start(struct sd *sd)
sd                457 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                461 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	return hdcs_set_state(sd, HDCS_STATE_RUN);
sd                464 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c static int hdcs_stop(struct sd *sd)
sd                466 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                470 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	return hdcs_set_state(sd, HDCS_STATE_SLEEP);
sd                473 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c static int hdcs_init(struct sd *sd)
sd                475 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	struct hdcs *hdcs = sd->sensor_priv;
sd                479 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	if (sd->bridge == BRIDGE_STV602)
sd                480 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 		stv06xx_write_bridge(sd, STV_STV0600_EMULATION, 1);
sd                484 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 		err = stv06xx_write_bridge(sd, stv_bridge_init[i][0],
sd                491 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	hdcs_reset(sd);
sd                495 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 		err = stv06xx_write_sensor(sd, stv_sensor_init[i][0],
sd                502 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	err = stv06xx_write_sensor(sd, HDCS_REG_CONFIG(sd), BIT(3));
sd                508 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	if (IS_1020(sd))
sd                509 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 		err = stv06xx_write_sensor(sd, HDCS_TCTRL,
sd                512 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 		err = stv06xx_write_sensor(sd, HDCS_TCTRL,
sd                517 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 	return hdcs_set_size(sd, hdcs->array.width, hdcs->array.height);
sd                520 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c static int hdcs_dump(struct sd *sd)
sd                527 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c 		stv06xx_read_sensor(sd, reg, &val);
sd                 23 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h #define HDCS_REG_CONFIG(sd)	(IS_1020(sd) ? HDCS20_CONFIG : HDCS00_CONFIG)
sd                 24 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h #define HDCS_REG_CONTROL(sd)	(IS_1020(sd) ? HDCS20_CONTROL : HDCS00_CONTROL)
sd                117 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h static int hdcs_probe_1x00(struct sd *sd);
sd                118 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h static int hdcs_probe_1020(struct sd *sd);
sd                119 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h static int hdcs_start(struct sd *sd);
sd                120 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h static int hdcs_init(struct sd *sd);
sd                121 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h static int hdcs_init_controls(struct sd *sd);
sd                122 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h static int hdcs_stop(struct sd *sd);
sd                123 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h static int hdcs_dump(struct sd *sd);
sd                 79 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                 80 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct pb0100_ctrls *ctrls = sd->sensor_priv;
sd                106 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c static int pb0100_init_controls(struct sd *sd)
sd                108 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
sd                150 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	sd->sensor_priv = ctrls;
sd                155 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c static int pb0100_probe(struct sd *sd)
sd                160 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	err = stv06xx_read_sensor(sd, PB_IDENT, &sensor);
sd                169 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	sd->gspca_dev.cam.cam_mode = pb0100_mode;
sd                170 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	sd->gspca_dev.cam.nmodes = ARRAY_SIZE(pb0100_mode);
sd                175 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c static int pb0100_start(struct sd *sd)
sd                180 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                181 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct cam *cam = &sd->gspca_dev.cam;
sd                182 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	u32 mode = cam->cam_mode[sd->gspca_dev.curr_mode].priv;
sd                184 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
sd                185 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt);
sd                195 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	max_packet_size = sd->sensor->max_packet_size[sd->gspca_dev.curr_mode];
sd                197 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_sensor(sd, PB_ROWSPEED, BIT(4)|BIT(3)|BIT(1));
sd                199 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_sensor(sd, PB_ROWSPEED, BIT(5)|BIT(3)|BIT(1));
sd                203 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_sensor(sd, PB_RSTART, 30);
sd                204 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_sensor(sd, PB_CSTART, 20);
sd                205 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_sensor(sd, PB_RWSIZE, 240 - 1);
sd                206 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_sensor(sd, PB_CWSIZE, 320 - 1);
sd                208 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_sensor(sd, PB_RSTART, 8);
sd                209 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_sensor(sd, PB_CSTART, 4);
sd                210 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_sensor(sd, PB_RWSIZE, 288 - 1);
sd                211 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_sensor(sd, PB_CWSIZE, 352 - 1);
sd                215 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_bridge(sd, STV_Y_CTRL, 0x02); /* Wrong, FIXME */
sd                216 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_bridge(sd, STV_X_CTRL, 0x06);
sd                218 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_bridge(sd, STV_SCAN_RATE, 0x10);
sd                220 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_bridge(sd, STV_Y_CTRL, 0x01);
sd                221 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_bridge(sd, STV_X_CTRL, 0x0a);
sd                223 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		stv06xx_write_bridge(sd, STV_SCAN_RATE, 0x20);
sd                226 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	err = stv06xx_write_sensor(sd, PB_CONTROL, BIT(5)|BIT(3)|BIT(1));
sd                232 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c static int pb0100_stop(struct sd *sd)
sd                234 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                237 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	err = stv06xx_write_sensor(sd, PB_ABORTFRAME, 1);
sd                243 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	err = stv06xx_write_sensor(sd, PB_CONTROL, BIT(5)|BIT(3));
sd                254 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c static int pb0100_init(struct sd *sd)
sd                256 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_bridge(sd, STV_REG00, 1);
sd                257 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_bridge(sd, STV_SCAN_RATE, 0);
sd                260 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_RESET, 1);
sd                261 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_RESET, 0);
sd                264 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_CONTROL, BIT(5)|BIT(3));
sd                267 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_PREADCTRL, BIT(12)|BIT(10)|BIT(6));
sd                268 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_ADCGLOBALGAIN, 12);
sd                273 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_R28, 12);
sd                275 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_ADCMAXGAIN, 180);
sd                277 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_ADCMINGAIN, 12);
sd                280 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_R54, 3);
sd                283 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_R55, 0);
sd                284 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_UPDATEINT, 1);
sd                286 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_R15, 800);
sd                288 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_R17, 10);
sd                290 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_EXPGAIN, 0);
sd                293 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_VOFFSET, 0);
sd                295 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_ADCGAINH, 11);
sd                297 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_ADCGAINL, 0);
sd                300 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_bridge(sd, STV_REG00, 0x11);
sd                301 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_bridge(sd, STV_REG03, 0x45);
sd                302 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_bridge(sd, STV_REG04, 0x07);
sd                305 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_ROWSPEED, BIT(4)|BIT(3)|BIT(1));
sd                306 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_CFILLIN, 14);
sd                307 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_VBL, 0);
sd                308 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_FINTTIME, 0);
sd                309 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_sensor(sd, PB_RINTTIME, 123);
sd                311 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_bridge(sd, STV_REG01, 0xc2);
sd                312 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	stv06xx_write_bridge(sd, STV_REG02, 0xb0);
sd                316 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c static int pb0100_dump(struct sd *sd)
sd                324 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                325 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct pb0100_ctrls *ctrls = sd->sensor_priv;
sd                327 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	err = stv06xx_write_sensor(sd, PB_G1GAIN, val);
sd                329 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		err = stv06xx_write_sensor(sd, PB_G2GAIN, val);
sd                344 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                345 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct pb0100_ctrls *ctrls = sd->sensor_priv;
sd                353 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	err = stv06xx_write_sensor(sd, PB_RGAIN, val);
sd                363 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                364 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct pb0100_ctrls *ctrls = sd->sensor_priv;
sd                372 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	err = stv06xx_write_sensor(sd, PB_BGAIN, val);
sd                381 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                384 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	err = stv06xx_write_sensor(sd, PB_RINTTIME, val);
sd                394 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                395 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct pb0100_ctrls *ctrls = sd->sensor_priv;
sd                405 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	err = stv06xx_write_sensor(sd, PB_EXPGAIN, val);
sd                415 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                424 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 	err = stv06xx_write_sensor(sd, PB_R21, brightpixels);
sd                426 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c 		err = stv06xx_write_sensor(sd, PB_R22, darkpixels);
sd                 99 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h static int pb0100_probe(struct sd *sd);
sd                100 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h static int pb0100_start(struct sd *sd);
sd                101 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h static int pb0100_init(struct sd *sd);
sd                102 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h static int pb0100_init_controls(struct sd *sd);
sd                103 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h static int pb0100_stop(struct sd *sd);
sd                104 drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h static int pb0100_dump(struct sd *sd);
sd                 22 drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h #define IS_1020(sd)	((sd)->sensor == &stv06xx_sensor_hdcs1020)
sd                 48 drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h 	int (*probe)(struct sd *sd);
sd                 51 drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h 	int (*init)(struct sd *sd);
sd                 54 drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h 	int (*init_controls)(struct sd *sd);
sd                 57 drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h 	int (*read_sensor)(struct sd *sd, const u8 address,
sd                 61 drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h 	int (*write_sensor)(struct sd *sd, const u8 address,
sd                 65 drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h 	int (*start)(struct sd *sd);
sd                 68 drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h 	int (*stop)(struct sd *sd);
sd                 71 drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h 	int (*dump)(struct sd *sd);
sd                 49 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c static int setbrightness(struct sd *sd, s32 val);
sd                 50 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c static int setcontrast(struct sd *sd, s32 val);
sd                 51 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c static int setgain(struct sd *sd, u8 gain);
sd                 52 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c static int setexposure(struct sd *sd, s16 expo);
sd                 58 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                 63 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 		err = setbrightness(sd, ctrl->val);
sd                 66 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 		err = setcontrast(sd, ctrl->val);
sd                 69 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 		err = setgain(sd, ctrl->val);
sd                 72 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 		err = setexposure(sd, ctrl->val);
sd                 78 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 		err = stv06xx_write_bridge(sd, 0x143f, 0x01);
sd                 79 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	sd->gspca_dev.usb_err = err;
sd                 87 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c static int st6422_init_controls(struct sd *sd)
sd                 89 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
sd                104 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c static int st6422_probe(struct sd *sd)
sd                106 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	if (sd->bridge != BRIDGE_ST6422)
sd                111 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	sd->gspca_dev.cam.cam_mode = st6422_mode;
sd                112 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	sd->gspca_dev.cam.nmodes = ARRAY_SIZE(st6422_mode);
sd                116 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c static int st6422_init(struct sd *sd)
sd                194 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 		err = stv06xx_write_bridge(sd, st6422_bridge_init[i][0],
sd                201 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c static int setbrightness(struct sd *sd, s32 val)
sd                204 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	return stv06xx_write_bridge(sd, 0x1432, val);
sd                207 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c static int setcontrast(struct sd *sd, s32 val)
sd                210 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	return stv06xx_write_bridge(sd, 0x143a, val | 0xf0);
sd                213 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c static int setgain(struct sd *sd, u8 gain)
sd                218 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	err = stv06xx_write_bridge(sd, 0x0509, gain);
sd                222 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	err = stv06xx_write_bridge(sd, 0x050a, gain);
sd                226 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	err = stv06xx_write_bridge(sd, 0x050b, gain);
sd                231 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	err = stv06xx_write_bridge(sd, 0x050c, 0x2a);
sd                235 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	return stv06xx_write_bridge(sd, 0x050d, 0x01);
sd                238 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c static int setexposure(struct sd *sd, s16 expo)
sd                242 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	err = stv06xx_write_bridge(sd, 0x143d, expo & 0xff);
sd                246 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	return stv06xx_write_bridge(sd, 0x143e, expo >> 8);
sd                249 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c static int st6422_start(struct sd *sd)
sd                252 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	struct cam *cam = &sd->gspca_dev.cam;
sd                254 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	if (cam->cam_mode[sd->gspca_dev.curr_mode].priv)
sd                255 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 		err = stv06xx_write_bridge(sd, 0x1505, 0x0f);
sd                257 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 		err = stv06xx_write_bridge(sd, 0x1505, 0x02);
sd                262 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	err = stv06xx_write_bridge(sd, 0x143f, 0x01);
sd                266 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c static int st6422_stop(struct sd *sd)
sd                268 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                 20 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h static int st6422_probe(struct sd *sd);
sd                 21 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h static int st6422_start(struct sd *sd);
sd                 22 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h static int st6422_init(struct sd *sd);
sd                 23 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h static int st6422_init_controls(struct sd *sd);
sd                 24 drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h static int st6422_stop(struct sd *sd);
sd                 65 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c static int vv6410_probe(struct sd *sd)
sd                 70 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	err = stv06xx_read_sensor(sd, VV6410_DEVICEH, &data);
sd                 79 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	sd->gspca_dev.cam.cam_mode = vv6410_mode;
sd                 80 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	sd->gspca_dev.cam.nmodes = ARRAY_SIZE(vv6410_mode);
sd                 84 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c static int vv6410_init_controls(struct sd *sd)
sd                 86 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
sd                103 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c static int vv6410_init(struct sd *sd)
sd                108 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 		stv06xx_write_bridge(sd, stv_bridge_init[i].addr, stv_bridge_init[i].data);
sd                110 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	err = stv06xx_write_sensor_bytes(sd, (u8 *) vv6410_sensor_init,
sd                115 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c static int vv6410_start(struct sd *sd)
sd                118 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                119 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	struct cam *cam = &sd->gspca_dev.cam;
sd                120 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	u32 priv = cam->cam_mode[sd->gspca_dev.curr_mode].priv;
sd                124 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 		stv06xx_write_bridge(sd, STV_Y_CTRL, 0x02);
sd                125 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 		stv06xx_write_bridge(sd, STV_X_CTRL, 0x06);
sd                127 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 		stv06xx_write_bridge(sd, STV_SCAN_RATE, 0x10);
sd                129 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 		stv06xx_write_bridge(sd, STV_Y_CTRL, 0x01);
sd                130 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 		stv06xx_write_bridge(sd, STV_X_CTRL, 0x0a);
sd                131 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 		stv06xx_write_bridge(sd, STV_SCAN_RATE, 0x00);
sd                136 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	err = stv06xx_write_bridge(sd, STV_LED_CTRL, LED_ON);
sd                140 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	err = stv06xx_write_sensor(sd, VV6410_SETUP0, 0);
sd                149 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c static int vv6410_stop(struct sd *sd)
sd                151 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                155 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	err = stv06xx_write_bridge(sd, STV_LED_CTRL, LED_OFF);
sd                159 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	err = stv06xx_write_sensor(sd, VV6410_SETUP0, VV6410_LOW_POWER_MODE);
sd                168 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c static int vv6410_dump(struct sd *sd)
sd                176 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 		err = stv06xx_read_sensor(sd, i, &data);
sd                186 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                188 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	err = stv06xx_read_sensor(sd, VV6410_DATAFORMAT, &i2c_data);
sd                198 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	err = stv06xx_write_sensor(sd, VV6410_DATAFORMAT, i2c_data);
sd                207 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                209 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	err = stv06xx_read_sensor(sd, VV6410_DATAFORMAT, &i2c_data);
sd                219 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	err = stv06xx_write_sensor(sd, VV6410_DATAFORMAT, i2c_data);
sd                227 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                230 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	err = stv06xx_write_sensor(sd, VV6410_ANALOGGAIN, 0xf0 | (val & 0xf));
sd                238 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                249 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	err = stv06xx_write_sensor(sd, VV6410_FINEH, fine >> 8);
sd                253 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	err = stv06xx_write_sensor(sd, VV6410_FINEL, fine & 0xff);
sd                257 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	err = stv06xx_write_sensor(sd, VV6410_COARSEH, coarse >> 8);
sd                261 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c 	err = stv06xx_write_sensor(sd, VV6410_COARSEL, coarse & 0xff);
sd                165 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h static int vv6410_probe(struct sd *sd);
sd                166 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h static int vv6410_start(struct sd *sd);
sd                167 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h static int vv6410_init(struct sd *sd);
sd                168 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h static int vv6410_init_controls(struct sd *sd);
sd                169 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h static int vv6410_stop(struct sd *sd);
sd                170 drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h static int vv6410_dump(struct sd *sd);
sd                444 drivers/media/usb/gspca/sunplus.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                448 drivers/media/usb/gspca/sunplus.c 	switch (sd->bridge) {
sd                478 drivers/media/usb/gspca/sunplus.c 		if (sd->subtype == AiptekMiniPenCam13) {
sd                520 drivers/media/usb/gspca/sunplus.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                523 drivers/media/usb/gspca/sunplus.c 	reg = sd->bridge == BRIDGE_SPCA536 ? 0x20f0 : 0x21a7;
sd                529 drivers/media/usb/gspca/sunplus.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                532 drivers/media/usb/gspca/sunplus.c 	reg = sd->bridge == BRIDGE_SPCA536 ? 0x20f1 : 0x21a8;
sd                538 drivers/media/usb/gspca/sunplus.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                541 drivers/media/usb/gspca/sunplus.c 	reg = sd->bridge == BRIDGE_SPCA536 ? 0x20f6 : 0x21ae;
sd                547 drivers/media/usb/gspca/sunplus.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                550 drivers/media/usb/gspca/sunplus.c 	switch (sd->bridge) {
sd                576 drivers/media/usb/gspca/sunplus.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                581 drivers/media/usb/gspca/sunplus.c 	sd->bridge = id->driver_info >> 8;
sd                582 drivers/media/usb/gspca/sunplus.c 	sd->subtype = id->driver_info;
sd                584 drivers/media/usb/gspca/sunplus.c 	if (sd->subtype == AiptekMiniPenCam13) {
sd                593 drivers/media/usb/gspca/sunplus.c 			sd->bridge = BRIDGE_SPCA504B;
sd                594 drivers/media/usb/gspca/sunplus.c 			sd->subtype = 0;
sd                601 drivers/media/usb/gspca/sunplus.c 	switch (sd->bridge) {
sd                611 drivers/media/usb/gspca/sunplus.c 		if (sd->subtype == MegaImageVI)		/* 320x240 only */
sd                627 drivers/media/usb/gspca/sunplus.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                629 drivers/media/usb/gspca/sunplus.c 	switch (sd->bridge) {
sd                656 drivers/media/usb/gspca/sunplus.c 		if (sd->subtype == LogitechClickSmart420)
sd                668 drivers/media/usb/gspca/sunplus.c 		if (sd->subtype == AiptekMiniPenCam13) {
sd                707 drivers/media/usb/gspca/sunplus.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                711 drivers/media/usb/gspca/sunplus.c 	jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
sd                714 drivers/media/usb/gspca/sunplus.c 	jpeg_set_qual(sd->jpeg_hdr, QUALITY);
sd                716 drivers/media/usb/gspca/sunplus.c 	if (sd->bridge == BRIDGE_SPCA504B)
sd                719 drivers/media/usb/gspca/sunplus.c 	switch (sd->bridge) {
sd                724 drivers/media/usb/gspca/sunplus.c 		switch (sd->subtype) {
sd                741 drivers/media/usb/gspca/sunplus.c 		if (sd->subtype == AiptekMiniPenCam13) {
sd                764 drivers/media/usb/gspca/sunplus.c 		if (sd->subtype == LogitechClickSmart420) {
sd                772 drivers/media/usb/gspca/sunplus.c 		enable = (sd->autogain ? 0x04 : 0x01);
sd                790 drivers/media/usb/gspca/sunplus.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                792 drivers/media/usb/gspca/sunplus.c 	switch (sd->bridge) {
sd                805 drivers/media/usb/gspca/sunplus.c 		if (sd->subtype == AiptekMiniPenCam13) {
sd                825 drivers/media/usb/gspca/sunplus.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                830 drivers/media/usb/gspca/sunplus.c 	switch (sd->bridge) {
sd                896 drivers/media/usb/gspca/sunplus.c 			sd->jpeg_hdr, JPEG_HDR_SZ);
sd                919 drivers/media/usb/gspca/sunplus.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                937 drivers/media/usb/gspca/sunplus.c 		sd->autogain = ctrl->val;
sd               1053 drivers/media/usb/gspca/sunplus.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                491 drivers/media/usb/gspca/t613.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                496 drivers/media/usb/gspca/t613.c 	green_gain = sd->gain->val;
sd                498 drivers/media/usb/gspca/t613.c 	red_gain = green_gain + sd->red_balance->val;
sd                504 drivers/media/usb/gspca/t613.c 	blue_gain = green_gain + sd->blue_balance->val;
sd                513 drivers/media/usb/gspca/t613.c 	all_gain_reg[7] = sensor_data[sd->sensor].reg80;
sd                514 drivers/media/usb/gspca/t613.c 	if (!sd->awb->val)
sd                531 drivers/media/usb/gspca/t613.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                535 drivers/media/usb/gspca/t613.c 	switch (sd->sensor) {
sd                568 drivers/media/usb/gspca/t613.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                587 drivers/media/usb/gspca/t613.c 		sd->sensor = SENSOR_TAS5130A;
sd                591 drivers/media/usb/gspca/t613.c 		sd->sensor = SENSOR_LT168G;
sd                595 drivers/media/usb/gspca/t613.c 		sd->sensor = SENSOR_OTHER;
sd                599 drivers/media/usb/gspca/t613.c 		sd->sensor = SENSOR_OM6802;
sd                606 drivers/media/usb/gspca/t613.c 	if (sd->sensor == SENSOR_OM6802) {
sd                631 drivers/media/usb/gspca/t613.c 	sensor = &sensor_data[sd->sensor];
sd                635 drivers/media/usb/gspca/t613.c 	if (sd->sensor == SENSOR_LT168G) {
sd                657 drivers/media/usb/gspca/t613.c 	if (sd->sensor == SENSOR_LT168G) {
sd                739 drivers/media/usb/gspca/t613.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                765 drivers/media/usb/gspca/t613.c 	switch (sd->sensor) {
sd                785 drivers/media/usb/gspca/t613.c 	sensor = &sensor_data[sd->sensor];
sd                786 drivers/media/usb/gspca/t613.c 	setfreq(gspca_dev, v4l2_ctrl_g_ctrl(sd->freq));
sd                795 drivers/media/usb/gspca/t613.c 	if (sd->sensor == SENSOR_OM6802)
sd                803 drivers/media/usb/gspca/t613.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                805 drivers/media/usb/gspca/t613.c 	reg_w_buf(gspca_dev, sensor_data[sd->sensor].stream,
sd                806 drivers/media/usb/gspca/t613.c 			sizeof sensor_data[sd->sensor].stream);
sd                807 drivers/media/usb/gspca/t613.c 	reg_w_buf(gspca_dev, sensor_data[sd->sensor].stream,
sd                808 drivers/media/usb/gspca/t613.c 			sizeof sensor_data[sd->sensor].stream);
sd                809 drivers/media/usb/gspca/t613.c 	if (sd->sensor == SENSOR_OM6802) {
sd                815 drivers/media/usb/gspca/t613.c 	if (sd->button_pressed) {
sd                818 drivers/media/usb/gspca/t613.c 		sd->button_pressed = 0;
sd                827 drivers/media/usb/gspca/t613.c 	struct sd *sd __maybe_unused = (struct sd *) gspca_dev;
sd                834 drivers/media/usb/gspca/t613.c 			if (sd->button_pressed != state) {
sd                838 drivers/media/usb/gspca/t613.c 				sd->button_pressed = state;
sd                862 drivers/media/usb/gspca/t613.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                887 drivers/media/usb/gspca/t613.c 		sd->gain->val = green_gain;
sd                888 drivers/media/usb/gspca/t613.c 		sd->red_balance->val = red_gain - green_gain;
sd                889 drivers/media/usb/gspca/t613.c 		sd->blue_balance->val = blue_gain - green_gain;
sd                947 drivers/media/usb/gspca/t613.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                964 drivers/media/usb/gspca/t613.c 	if (sd->sensor == SENSOR_TAS5130A)
sd                967 drivers/media/usb/gspca/t613.c 	sd->awb = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                969 drivers/media/usb/gspca/t613.c 	sd->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                971 drivers/media/usb/gspca/t613.c 	sd->blue_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                973 drivers/media/usb/gspca/t613.c 	sd->red_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                985 drivers/media/usb/gspca/t613.c 	sd->freq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
sd                995 drivers/media/usb/gspca/t613.c 	v4l2_ctrl_auto_cluster(4, &sd->awb, 0, true);
sd               1025 drivers/media/usb/gspca/t613.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd               1021 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1027 drivers/media/usb/gspca/topro.c 	if (sd->bridge == BRIDGE_TP6800)
sd               1048 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1056 drivers/media/usb/gspca/topro.c 	if (sd->bridge == BRIDGE_TP6800)
sd               1401 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1403 drivers/media/usb/gspca/topro.c 	if (sd->sensor == SENSOR_CX0342) {
sd               1407 drivers/media/usb/gspca/topro.c 		if (sd->bridge == BRIDGE_TP6800)
sd               1411 drivers/media/usb/gspca/topro.c 		if (sd->bridge == BRIDGE_TP6800)
sd               1415 drivers/media/usb/gspca/topro.c 		if (sd->sensor == SENSOR_CX0342) {
sd               1416 drivers/media/usb/gspca/topro.c 			if (sd->bridge == BRIDGE_TP6800)
sd               1420 drivers/media/usb/gspca/topro.c 			if (sd->bridge == BRIDGE_TP6800)
sd               1426 drivers/media/usb/gspca/topro.c 				sd->bridge == BRIDGE_TP6800 ? 0x80 : 0x81);
sd               1441 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1444 drivers/media/usb/gspca/topro.c 	gspca_dbg(gspca_dev, D_STREAM, "q %d -> %d\n", sd->quality, q);
sd               1445 drivers/media/usb/gspca/topro.c 	sd->quality = q;
sd               1448 drivers/media/usb/gspca/topro.c 	if (sd->sensor == SENSOR_SOI763A)
sd               1449 drivers/media/usb/gspca/topro.c 		jpeg_set_qual(sd->jpeg_hdr, jpeg_q[q]);
sd               1451 drivers/media/usb/gspca/topro.c 		memcpy(&sd->jpeg_hdr[JPEG_QT0_OFFSET - 1],
sd               1458 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1468 drivers/media/usb/gspca/topro.c 	if (q == 15 && sd->bridge == BRIDGE_TP6810) {
sd               1492 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3814 drivers/media/usb/gspca/topro.c 	if (sd->bridge == BRIDGE_TP6810)
sd               3820 drivers/media/usb/gspca/topro.c 	if (sd->bridge == BRIDGE_TP6810) {
sd               3846 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3848 drivers/media/usb/gspca/topro.c 	if (sd->bridge == BRIDGE_TP6800) {
sd               3863 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3865 drivers/media/usb/gspca/topro.c 	sd->ag_cnt = val ? AG_CNT_START : -1;
sd               3871 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3898 drivers/media/usb/gspca/topro.c 	setgamma(gspca_dev, v4l2_ctrl_g_ctrl(sd->gamma));
sd               3899 drivers/media/usb/gspca/topro.c 	if (sd->sensor == SENSOR_SOI763A)
sd               3900 drivers/media/usb/gspca/topro.c 		setquality(gspca_dev, v4l2_ctrl_g_ctrl(sd->jpegqual));
sd               3906 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3909 drivers/media/usb/gspca/topro.c 	if (sd->bridge == BRIDGE_TP6800) {
sd               3911 drivers/media/usb/gspca/topro.c 			if (sd->framerate >= rates[i])
sd               3922 drivers/media/usb/gspca/topro.c 			if (sd->framerate >= rates_6810[i])
sd               3938 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3943 drivers/media/usb/gspca/topro.c 	if (sd->bridge == BRIDGE_TP6810) {
sd               3946 drivers/media/usb/gspca/topro.c 			sd->sensor == SENSOR_CX0342 ? 0x10 : 0x90);
sd               3953 drivers/media/usb/gspca/topro.c 	if (sd->sensor == SENSOR_CX0342)
sd               3966 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3969 drivers/media/usb/gspca/topro.c 	if (sd->sensor == SENSOR_CX0342) {
sd               3973 drivers/media/usb/gspca/topro.c 		sd->blue->val = sd->blue->val * val / old;
sd               3974 drivers/media/usb/gspca/topro.c 		if (sd->blue->val > 4095)
sd               3975 drivers/media/usb/gspca/topro.c 			sd->blue->val = 4095;
sd               3976 drivers/media/usb/gspca/topro.c 		sd->red->val = sd->red->val * val / old;
sd               3977 drivers/media/usb/gspca/topro.c 		if (sd->red->val > 4095)
sd               3978 drivers/media/usb/gspca/topro.c 			sd->red->val = 4095;
sd               3981 drivers/media/usb/gspca/topro.c 		if (sd->sensor == SENSOR_CX0342)
sd               3984 drivers/media/usb/gspca/topro.c 					sd->blue->val, sd->red->val);
sd               4003 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4005 drivers/media/usb/gspca/topro.c 	sd->bridge = id->driver_info;
sd               4009 drivers/media/usb/gspca/topro.c 	gspca_dev->cam.mode_framerates = sd->bridge == BRIDGE_TP6800 ?
sd               4012 drivers/media/usb/gspca/topro.c 	sd->framerate = DEFAULT_FRAME_RATE;
sd               4019 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4036 drivers/media/usb/gspca/topro.c 	if (sd->bridge == BRIDGE_TP6800)
sd               4054 drivers/media/usb/gspca/topro.c 		sd->sensor = force_sensor;
sd               4056 drivers/media/usb/gspca/topro.c 		if (sd->bridge == BRIDGE_TP6800) {
sd               4060 drivers/media/usb/gspca/topro.c 				sd->sensor = SENSOR_SOI763A;
sd               4063 drivers/media/usb/gspca/topro.c 				sd->sensor = SENSOR_CX0342;
sd               4075 drivers/media/usb/gspca/topro.c 			sd->sensor = sensor;
sd               4078 drivers/media/usb/gspca/topro.c 	if (sd->sensor == SENSOR_SOI763A) {
sd               4080 drivers/media/usb/gspca/topro.c 		if (sd->bridge == BRIDGE_TP6810) {
sd               4085 drivers/media/usb/gspca/topro.c 		if (sd->bridge == BRIDGE_TP6810) {
sd               4097 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4124 drivers/media/usb/gspca/topro.c 	if (sd->bridge == BRIDGE_TP6800)
sd               4126 drivers/media/usb/gspca/topro.c 	if (sd->sensor == SENSOR_CX0342) {
sd               4163 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4236 drivers/media/usb/gspca/topro.c 	if (sd->sensor == SENSOR_CX0342)
sd               4239 drivers/media/usb/gspca/topro.c 			v4l2_ctrl_g_ctrl(sd->blue),
sd               4240 drivers/media/usb/gspca/topro.c 			v4l2_ctrl_g_ctrl(sd->red));
sd               4250 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4331 drivers/media/usb/gspca/topro.c 	setgamma(gspca_dev, v4l2_ctrl_g_ctrl(sd->gamma));
sd               4334 drivers/media/usb/gspca/topro.c 	setsharpness(gspca_dev, v4l2_ctrl_g_ctrl(sd->sharpness));
sd               4350 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4450 drivers/media/usb/gspca/topro.c 	setsharpness(gspca_dev, v4l2_ctrl_g_ctrl(sd->sharpness));
sd               4456 drivers/media/usb/gspca/topro.c 	if (sd->sensor == SENSOR_CX0342)
sd               4459 drivers/media/usb/gspca/topro.c 			v4l2_ctrl_g_ctrl(sd->blue),
sd               4460 drivers/media/usb/gspca/topro.c 			v4l2_ctrl_g_ctrl(sd->red));
sd               4464 drivers/media/usb/gspca/topro.c 	if (sd->sensor == SENSOR_SOI763A)
sd               4465 drivers/media/usb/gspca/topro.c 		setquality(gspca_dev, v4l2_ctrl_g_ctrl(sd->jpegqual));
sd               4466 drivers/media/usb/gspca/topro.c 	setgamma(gspca_dev, v4l2_ctrl_g_ctrl(sd->gamma));
sd               4471 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4495 drivers/media/usb/gspca/topro.c 	if (sd->sensor == SENSOR_CX0342)
sd               4498 drivers/media/usb/gspca/topro.c 			v4l2_ctrl_g_ctrl(sd->blue),
sd               4499 drivers/media/usb/gspca/topro.c 			v4l2_ctrl_g_ctrl(sd->red));
sd               4516 drivers/media/usb/gspca/topro.c 	setgamma(gspca_dev, v4l2_ctrl_g_ctrl(sd->gamma));
sd               4527 drivers/media/usb/gspca/topro.c 	setsharpness(gspca_dev, v4l2_ctrl_g_ctrl(sd->sharpness));
sd               4532 drivers/media/usb/gspca/topro.c 	if (sd->sensor == SENSOR_CX0342)
sd               4535 drivers/media/usb/gspca/topro.c 			v4l2_ctrl_g_ctrl(sd->blue),
sd               4536 drivers/media/usb/gspca/topro.c 			v4l2_ctrl_g_ctrl(sd->red));
sd               4546 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4548 drivers/media/usb/gspca/topro.c 	jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
sd               4550 drivers/media/usb/gspca/topro.c 	set_dqt(gspca_dev, sd->quality);
sd               4551 drivers/media/usb/gspca/topro.c 	if (sd->bridge == BRIDGE_TP6800) {
sd               4552 drivers/media/usb/gspca/topro.c 		if (sd->sensor == SENSOR_CX0342)
sd               4557 drivers/media/usb/gspca/topro.c 		if (sd->sensor == SENSOR_CX0342)
sd               4566 drivers/media/usb/gspca/topro.c 		if (sd->sensor == SENSOR_CX0342)
sd               4570 drivers/media/usb/gspca/topro.c 				v4l2_ctrl_g_ctrl(sd->blue),
sd               4571 drivers/media/usb/gspca/topro.c 				v4l2_ctrl_g_ctrl(sd->red));
sd               4576 drivers/media/usb/gspca/topro.c 		if (sd->sensor == SENSOR_SOI763A)
sd               4578 drivers/media/usb/gspca/topro.c 				   v4l2_ctrl_g_ctrl(sd->jpegqual));
sd               4579 drivers/media/usb/gspca/topro.c 		if (sd->bridge == BRIDGE_TP6810)
sd               4591 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4593 drivers/media/usb/gspca/topro.c 	if (sd->bridge == BRIDGE_TP6800)
sd               4603 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4612 drivers/media/usb/gspca/topro.c 	if (sd->bridge == BRIDGE_TP6810) {
sd               4635 drivers/media/usb/gspca/topro.c 			if ((data[6] & 0x0f) != sd->quality)
sd               4638 drivers/media/usb/gspca/topro.c 					sd->jpeg_hdr, JPEG_HDR_SZ);
sd               4663 drivers/media/usb/gspca/topro.c 		if (data[7] != sd->quality)
sd               4666 drivers/media/usb/gspca/topro.c 				sd->jpeg_hdr, JPEG_HDR_SZ);
sd               4685 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4689 drivers/media/usb/gspca/topro.c 	if (sd->ag_cnt < 0)
sd               4691 drivers/media/usb/gspca/topro.c 	if (--sd->ag_cnt > 5)
sd               4693 drivers/media/usb/gspca/topro.c 	switch (sd->ag_cnt) {
sd               4750 drivers/media/usb/gspca/topro.c 		sd->ag_cnt = AG_CNT_START;
sd               4751 drivers/media/usb/gspca/topro.c 		if (sd->bridge == BRIDGE_TP6810) {
sd               4766 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4774 drivers/media/usb/gspca/topro.c 		if (sd->bridge == BRIDGE_TP6800)
sd               4788 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4794 drivers/media/usb/gspca/topro.c 		sd->framerate = DEFAULT_FRAME_RATE;
sd               4796 drivers/media/usb/gspca/topro.c 		sd->framerate = tpf->denominator / tpf->numerator;
sd               4814 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4816 drivers/media/usb/gspca/topro.c 	if (sd->sensor != SENSOR_SOI763A)
sd               4818 drivers/media/usb/gspca/topro.c 	v4l2_ctrl_s_ctrl(sd->jpegqual, jcomp->quality);
sd               4825 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               4827 drivers/media/usb/gspca/topro.c 	if (sd->sensor != SENSOR_SOI763A)
sd               4830 drivers/media/usb/gspca/topro.c 	jcomp->quality = v4l2_ctrl_g_ctrl(sd->jpegqual);
sd               4840 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               4869 drivers/media/usb/gspca/topro.c 		jpeg_set_qual(sd->jpeg_hdr, ctrl->val);
sd               4881 drivers/media/usb/gspca/topro.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               4888 drivers/media/usb/gspca/topro.c 	if (sd->sensor == SENSOR_CX0342) {
sd               4889 drivers/media/usb/gspca/topro.c 		sd->red = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               4891 drivers/media/usb/gspca/topro.c 		sd->blue = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               4894 drivers/media/usb/gspca/topro.c 	if (sd->sensor == SENSOR_SOI763A)
sd               4900 drivers/media/usb/gspca/topro.c 	sd->sharpness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               4902 drivers/media/usb/gspca/topro.c 	sd->gamma = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               4904 drivers/media/usb/gspca/topro.c 			(sd->sensor == SENSOR_SOI763A &&
sd               4905 drivers/media/usb/gspca/topro.c 			 sd->bridge == BRIDGE_TP6800) ? 0 : 1);
sd               4906 drivers/media/usb/gspca/topro.c 	if (sd->bridge == BRIDGE_TP6810)
sd               4909 drivers/media/usb/gspca/topro.c 	if (sd->sensor == SENSOR_SOI763A)
sd               4910 drivers/media/usb/gspca/topro.c 		sd->jpegqual = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               4912 drivers/media/usb/gspca/topro.c 			0, 15, 1, (sd->bridge == BRIDGE_TP6810) ? 0 : 13);
sd               4952 drivers/media/usb/gspca/topro.c 	return gspca_dev_probe(interface, id, &sd_desc, sizeof(struct sd),
sd                537 drivers/media/usb/gspca/touptek.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                540 drivers/media/usb/gspca/touptek.c 	sd->this_f = 0;
sd                556 drivers/media/usb/gspca/touptek.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                560 drivers/media/usb/gspca/touptek.c 		if (sd->this_f + len == gspca_dev->pixfmt.sizeimage) {
sd                563 drivers/media/usb/gspca/touptek.c 				  sd->this_f, gspca_dev->pixfmt.sizeimage, len);
sd                568 drivers/media/usb/gspca/touptek.c 				  sd->this_f, gspca_dev->pixfmt.sizeimage, len);
sd                570 drivers/media/usb/gspca/touptek.c 		sd->this_f = 0;
sd                572 drivers/media/usb/gspca/touptek.c 		if (sd->this_f == 0)
sd                576 drivers/media/usb/gspca/touptek.c 		sd->this_f += len;
sd                589 drivers/media/usb/gspca/touptek.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                605 drivers/media/usb/gspca/touptek.c 		sd->blue->val = ctrl->val;
sd                606 drivers/media/usb/gspca/touptek.c 		setbgain(gspca_dev, sd->blue->val, gspca_dev->gain->val);
sd                609 drivers/media/usb/gspca/touptek.c 		sd->red->val = ctrl->val;
sd                610 drivers/media/usb/gspca/touptek.c 		setrgain(gspca_dev, sd->red->val, gspca_dev->gain->val);
sd                622 drivers/media/usb/gspca/touptek.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                634 drivers/media/usb/gspca/touptek.c 	sd->blue = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                636 drivers/media/usb/gspca/touptek.c 	sd->red = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd                697 drivers/media/usb/gspca/touptek.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                205 drivers/media/usb/gspca/tv8532.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                237 drivers/media/usb/gspca/tv8532.c 	sd->packet = 0;				/* ignore the first packets */
sd                251 drivers/media/usb/gspca/tv8532.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                257 drivers/media/usb/gspca/tv8532.c 		sd->packet = gspca_dev->pixfmt.height / 2;
sd                259 drivers/media/usb/gspca/tv8532.c 	} else if (sd->packet == 0)
sd                261 drivers/media/usb/gspca/tv8532.c 	sd->packet--;
sd                262 drivers/media/usb/gspca/tv8532.c 	if (sd->packet == 0)
sd                349 drivers/media/usb/gspca/tv8532.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd               3002 drivers/media/usb/gspca/vc032x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3008 drivers/media/usb/gspca/vc032x.c 	if (sd->flags & FL_SAMSUNG) {
sd               3016 drivers/media/usb/gspca/vc032x.c 		  sd->bridge == BRIDGE_VC0321 ? 1 : 3, gspca_dev->usb_buf[0]);
sd               3017 drivers/media/usb/gspca/vc032x.c 	if (sd->bridge == BRIDGE_VC0321) {
sd               3130 drivers/media/usb/gspca/vc032x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3132 drivers/media/usb/gspca/vc032x.c 	sd->bridge = id->driver_info >> 8;
sd               3133 drivers/media/usb/gspca/vc032x.c 	sd->flags = id->driver_info & 0xff;
sd               3137 drivers/media/usb/gspca/vc032x.c 		sd->sensor = SENSOR_POxxxx;	/* no probe */
sd               3145 drivers/media/usb/gspca/vc032x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3162 drivers/media/usb/gspca/vc032x.c 	if (sd->sensor != SENSOR_POxxxx)
sd               3165 drivers/media/usb/gspca/vc032x.c 		sensor = sd->sensor;
sd               3176 drivers/media/usb/gspca/vc032x.c 		sd->bridge = BRIDGE_VC0323;
sd               3203 drivers/media/usb/gspca/vc032x.c 	sd->sensor = sensor;
sd               3206 drivers/media/usb/gspca/vc032x.c 	if (sd->bridge == BRIDGE_VC0321) {
sd               3233 drivers/media/usb/gspca/vc032x.c 	cam->npkt = npkt[sd->sensor];
sd               3235 drivers/media/usb/gspca/vc032x.c 	if (sd->sensor == SENSOR_OV7670)
sd               3236 drivers/media/usb/gspca/vc032x.c 		sd->flags |= FL_HFLIP | FL_VFLIP;
sd               3238 drivers/media/usb/gspca/vc032x.c 	if (sd->bridge == BRIDGE_VC0321) {
sd               3243 drivers/media/usb/gspca/vc032x.c 		if (sd->sensor == SENSOR_POxxxx) {
sd               3283 drivers/media/usb/gspca/vc032x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3286 drivers/media/usb/gspca/vc032x.c 	if (sd->flags & FL_HFLIP)
sd               3288 drivers/media/usb/gspca/vc032x.c 	if (sd->flags & FL_VFLIP)
sd               3290 drivers/media/usb/gspca/vc032x.c 	switch (sd->sensor) {
sd               3296 drivers/media/usb/gspca/vc032x.c 		data[0] = sd->sensor == SENSOR_MI1310_SOC ? 0x03 : 0x01;
sd               3303 drivers/media/usb/gspca/vc032x.c 		data[0] = sd->sensor == SENSOR_OV7660 ? 0x01 : 0x07;
sd               3321 drivers/media/usb/gspca/vc032x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3325 drivers/media/usb/gspca/vc032x.c 	if (sd->sensor != SENSOR_OV7660)
sd               3332 drivers/media/usb/gspca/vc032x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3335 drivers/media/usb/gspca/vc032x.c 	switch (sd->sensor) {
sd               3422 drivers/media/usb/gspca/vc032x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3434 drivers/media/usb/gspca/vc032x.c 	if (sd->flags & FL_SAMSUNG) {
sd               3441 drivers/media/usb/gspca/vc032x.c 	if (sd->bridge == BRIDGE_VC0321) {
sd               3446 drivers/media/usb/gspca/vc032x.c 		sd->image_offset = 46;
sd               3450 drivers/media/usb/gspca/vc032x.c 			sd->image_offset = 0;
sd               3452 drivers/media/usb/gspca/vc032x.c 			sd->image_offset = 32;
sd               3456 drivers/media/usb/gspca/vc032x.c 	switch (sd->sensor) {
sd               3553 drivers/media/usb/gspca/vc032x.c 		switch (sd->sensor) {
sd               3564 drivers/media/usb/gspca/vc032x.c 	switch (sd->sensor) {
sd               3582 drivers/media/usb/gspca/vc032x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3584 drivers/media/usb/gspca/vc032x.c 	switch (sd->sensor) {
sd               3591 drivers/media/usb/gspca/vc032x.c 		if (!(sd->flags & FL_SAMSUNG))
sd               3602 drivers/media/usb/gspca/vc032x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3607 drivers/media/usb/gspca/vc032x.c 	if (sd->sensor == SENSOR_MI1310_SOC)
sd               3609 drivers/media/usb/gspca/vc032x.c 	else if (!(sd->flags & FL_SAMSUNG))
sd               3612 drivers/media/usb/gspca/vc032x.c 	if (sd->sensor == SENSOR_POxxxx) {
sd               3623 drivers/media/usb/gspca/vc032x.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               3629 drivers/media/usb/gspca/vc032x.c 		data += sd->image_offset;
sd               3630 drivers/media/usb/gspca/vc032x.c 		len -= sd->image_offset;
sd               3637 drivers/media/usb/gspca/vc032x.c 	if (sd->bridge == BRIDGE_VC0321) {
sd               3652 drivers/media/usb/gspca/vc032x.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               3670 drivers/media/usb/gspca/vc032x.c 		sethvflip(gspca_dev, sd->hflip->val, sd->vflip->val);
sd               3700 drivers/media/usb/gspca/vc032x.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               3713 drivers/media/usb/gspca/vc032x.c 	switch (sd->sensor) {
sd               3749 drivers/media/usb/gspca/vc032x.c 		sd->hflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               3751 drivers/media/usb/gspca/vc032x.c 		sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               3779 drivers/media/usb/gspca/vc032x.c 	if (sd->hflip)
sd               3780 drivers/media/usb/gspca/vc032x.c 		v4l2_ctrl_cluster(2, &sd->hflip);
sd               3822 drivers/media/usb/gspca/vc032x.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd                169 drivers/media/usb/gspca/vicam.c 	struct sd *sd = container_of(work, struct sd, work_struct);
sd                170 drivers/media/usb/gspca/vicam.c 	struct gspca_dev *gspca_dev = &sd->gspca_dev;
sd                210 drivers/media/usb/gspca/vicam.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                218 drivers/media/usb/gspca/vicam.c 	INIT_WORK(&sd->work_struct, vicam_dostream);
sd                260 drivers/media/usb/gspca/vicam.c 	struct sd *sd = (struct sd *)gspca_dev;
sd                267 drivers/media/usb/gspca/vicam.c 	schedule_work(&sd->work_struct);
sd                276 drivers/media/usb/gspca/vicam.c 	struct sd *dev = (struct sd *)gspca_dev;
sd                331 drivers/media/usb/gspca/vicam.c 			sizeof(struct sd),
sd                 24 drivers/media/usb/gspca/w996Xcf.c #define Y_QUANTABLE (&sd->jpeg_hdr[JPEG_QT0_OFFSET])
sd                 25 drivers/media/usb/gspca/w996Xcf.c #define UV_QUANTABLE (&sd->jpeg_hdr[JPEG_QT1_OFFSET])
sd                 50 drivers/media/usb/gspca/w996Xcf.c static void reg_w(struct sd *sd, u16 index, u16 value);
sd                 56 drivers/media/usb/gspca/w996Xcf.c static void w9968cf_write_fsb(struct sd *sd, u16* data)
sd                 58 drivers/media/usb/gspca/w996Xcf.c 	struct usb_device *udev = sd->gspca_dev.dev;
sd                 62 drivers/media/usb/gspca/w996Xcf.c 	if (sd->gspca_dev.usb_err < 0)
sd                 66 drivers/media/usb/gspca/w996Xcf.c 	memcpy(sd->gspca_dev.usb_buf, data, 6);
sd                 72 drivers/media/usb/gspca/w996Xcf.c 			      value, 0x06, sd->gspca_dev.usb_buf, 6, 500);
sd                 75 drivers/media/usb/gspca/w996Xcf.c 		sd->gspca_dev.usb_err = ret;
sd                 83 drivers/media/usb/gspca/w996Xcf.c static void w9968cf_write_sb(struct sd *sd, u16 value)
sd                 87 drivers/media/usb/gspca/w996Xcf.c 	if (sd->gspca_dev.usb_err < 0)
sd                 95 drivers/media/usb/gspca/w996Xcf.c 	ret = usb_control_msg(sd->gspca_dev.dev,
sd                 96 drivers/media/usb/gspca/w996Xcf.c 		usb_sndctrlpipe(sd->gspca_dev.dev, 0),
sd                105 drivers/media/usb/gspca/w996Xcf.c 		sd->gspca_dev.usb_err = ret;
sd                113 drivers/media/usb/gspca/w996Xcf.c static int w9968cf_read_sb(struct sd *sd)
sd                117 drivers/media/usb/gspca/w996Xcf.c 	if (sd->gspca_dev.usb_err < 0)
sd                125 drivers/media/usb/gspca/w996Xcf.c 	ret = usb_control_msg(sd->gspca_dev.dev,
sd                126 drivers/media/usb/gspca/w996Xcf.c 			usb_rcvctrlpipe(sd->gspca_dev.dev, 0),
sd                129 drivers/media/usb/gspca/w996Xcf.c 			0, 0x01, sd->gspca_dev.usb_buf, 2, 500);
sd                131 drivers/media/usb/gspca/w996Xcf.c 		ret = sd->gspca_dev.usb_buf[0] |
sd                132 drivers/media/usb/gspca/w996Xcf.c 		      (sd->gspca_dev.usb_buf[1] << 8);
sd                135 drivers/media/usb/gspca/w996Xcf.c 		sd->gspca_dev.usb_err = ret;
sd                140 drivers/media/usb/gspca/w996Xcf.c 		memset(sd->gspca_dev.usb_buf, 0, 2);
sd                153 drivers/media/usb/gspca/w996Xcf.c static void w9968cf_upload_quantizationtables(struct sd *sd)
sd                158 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x39, 0x0010); /* JPEG clock enable */
sd                163 drivers/media/usb/gspca/w996Xcf.c 		reg_w(sd, 0x40 + i, a);
sd                164 drivers/media/usb/gspca/w996Xcf.c 		reg_w(sd, 0x60 + i, b);
sd                166 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x39, 0x0012); /* JPEG encoder enable */
sd                177 drivers/media/usb/gspca/w996Xcf.c static void w9968cf_smbus_start(struct sd *sd)
sd                179 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_write_sb(sd, 0x0011); /* SDE=1, SDA=0, SCL=1 */
sd                180 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_write_sb(sd, 0x0010); /* SDE=1, SDA=0, SCL=0 */
sd                183 drivers/media/usb/gspca/w996Xcf.c static void w9968cf_smbus_stop(struct sd *sd)
sd                185 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_write_sb(sd, 0x0010); /* SDE=1, SDA=0, SCL=0 */
sd                186 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_write_sb(sd, 0x0011); /* SDE=1, SDA=0, SCL=1 */
sd                187 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_write_sb(sd, 0x0013); /* SDE=1, SDA=1, SCL=1 */
sd                190 drivers/media/usb/gspca/w996Xcf.c static void w9968cf_smbus_write_byte(struct sd *sd, u8 v)
sd                199 drivers/media/usb/gspca/w996Xcf.c 		w9968cf_write_sb(sd, 0x10 | sda);
sd                201 drivers/media/usb/gspca/w996Xcf.c 		w9968cf_write_sb(sd, 0x11 | sda);
sd                203 drivers/media/usb/gspca/w996Xcf.c 		w9968cf_write_sb(sd, 0x10 | sda);
sd                207 drivers/media/usb/gspca/w996Xcf.c static void w9968cf_smbus_read_byte(struct sd *sd, u8 *v)
sd                217 drivers/media/usb/gspca/w996Xcf.c 		w9968cf_write_sb(sd, 0x0013);
sd                218 drivers/media/usb/gspca/w996Xcf.c 		*v |= (w9968cf_read_sb(sd) & 0x0008) ? 1 : 0;
sd                220 drivers/media/usb/gspca/w996Xcf.c 		w9968cf_write_sb(sd, 0x0012);
sd                224 drivers/media/usb/gspca/w996Xcf.c static void w9968cf_smbus_write_nack(struct sd *sd)
sd                228 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_write_sb(sd, 0x0013); /* SDE=1, SDA=1, SCL=1 */
sd                229 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_write_sb(sd, 0x0012); /* SDE=1, SDA=1, SCL=0 */
sd                232 drivers/media/usb/gspca/w996Xcf.c static void w9968cf_smbus_read_ack(struct sd *sd)
sd                234 drivers/media/usb/gspca/w996Xcf.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                238 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_write_sb(sd, 0x0012); /* SDE=1, SDA=1, SCL=0 */
sd                239 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_write_sb(sd, 0x0013); /* SDE=1, SDA=1, SCL=1 */
sd                240 drivers/media/usb/gspca/w996Xcf.c 	sda = w9968cf_read_sb(sd);
sd                241 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_write_sb(sd, 0x0012); /* SDE=1, SDA=1, SCL=0 */
sd                244 drivers/media/usb/gspca/w996Xcf.c 		sd->gspca_dev.usb_err = -EIO;
sd                249 drivers/media/usb/gspca/w996Xcf.c static void w9968cf_i2c_w(struct sd *sd, u8 reg, u8 value)
sd                251 drivers/media/usb/gspca/w996Xcf.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                252 drivers/media/usb/gspca/w996Xcf.c 	u16* data = (u16 *)sd->gspca_dev.usb_buf;
sd                254 drivers/media/usb/gspca/w996Xcf.c 	data[0] = 0x082f | ((sd->sensor_addr & 0x80) ? 0x1500 : 0x0);
sd                255 drivers/media/usb/gspca/w996Xcf.c 	data[0] |= (sd->sensor_addr & 0x40) ? 0x4000 : 0x0;
sd                256 drivers/media/usb/gspca/w996Xcf.c 	data[1] = 0x2082 | ((sd->sensor_addr & 0x40) ? 0x0005 : 0x0);
sd                257 drivers/media/usb/gspca/w996Xcf.c 	data[1] |= (sd->sensor_addr & 0x20) ? 0x0150 : 0x0;
sd                258 drivers/media/usb/gspca/w996Xcf.c 	data[1] |= (sd->sensor_addr & 0x10) ? 0x5400 : 0x0;
sd                259 drivers/media/usb/gspca/w996Xcf.c 	data[2] = 0x8208 | ((sd->sensor_addr & 0x08) ? 0x0015 : 0x0);
sd                260 drivers/media/usb/gspca/w996Xcf.c 	data[2] |= (sd->sensor_addr & 0x04) ? 0x0540 : 0x0;
sd                261 drivers/media/usb/gspca/w996Xcf.c 	data[2] |= (sd->sensor_addr & 0x02) ? 0x5000 : 0x0;
sd                262 drivers/media/usb/gspca/w996Xcf.c 	data[3] = 0x1d20 | ((sd->sensor_addr & 0x02) ? 0x0001 : 0x0);
sd                263 drivers/media/usb/gspca/w996Xcf.c 	data[3] |= (sd->sensor_addr & 0x01) ? 0x0054 : 0x0;
sd                265 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_write_fsb(sd, data);
sd                279 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_write_fsb(sd, data);
sd                293 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_write_fsb(sd, data);
sd                299 drivers/media/usb/gspca/w996Xcf.c static int w9968cf_i2c_r(struct sd *sd, u8 reg)
sd                301 drivers/media/usb/gspca/w996Xcf.c 	struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
sd                306 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_write_sb(sd, 0x0013); /* don't change ! */
sd                308 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_smbus_start(sd);
sd                309 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_smbus_write_byte(sd, sd->sensor_addr);
sd                310 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_smbus_read_ack(sd);
sd                311 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_smbus_write_byte(sd, reg);
sd                312 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_smbus_read_ack(sd);
sd                313 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_smbus_stop(sd);
sd                314 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_smbus_start(sd);
sd                315 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_smbus_write_byte(sd, sd->sensor_addr + 1);
sd                316 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_smbus_read_ack(sd);
sd                317 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_smbus_read_byte(sd, &value);
sd                321 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_smbus_write_nack(sd);
sd                322 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_smbus_stop(sd);
sd                325 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_write_sb(sd, 0x0030);
sd                327 drivers/media/usb/gspca/w996Xcf.c 	if (sd->gspca_dev.usb_err >= 0) {
sd                341 drivers/media/usb/gspca/w996Xcf.c static void w9968cf_configure(struct sd *sd)
sd                343 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x00, 0xff00); /* power-down */
sd                344 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x00, 0xbf17); /* reset everything */
sd                345 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x00, 0xbf10); /* normal operation */
sd                346 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x01, 0x0010); /* serial bus, SDS high */
sd                347 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x01, 0x0000); /* serial bus, SDS low */
sd                348 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x01, 0x0010); /* ..high 'beep-beep' */
sd                349 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x01, 0x0030); /* Set sda scl to FSB mode */
sd                351 drivers/media/usb/gspca/w996Xcf.c 	sd->stopped = 1;
sd                354 drivers/media/usb/gspca/w996Xcf.c static void w9968cf_init(struct sd *sd)
sd                356 drivers/media/usb/gspca/w996Xcf.c 	unsigned long hw_bufsize = sd->sif ? (352 * 288 * 2) : (640 * 480 * 2),
sd                364 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x00, 0xff00); /* power off */
sd                365 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x00, 0xbf10); /* power on */
sd                367 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x03, 0x405d); /* DRAM timings */
sd                368 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x04, 0x0030); /* SDRAM timings */
sd                370 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x20, y0 & 0xffff); /* Y buf.0, low */
sd                371 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x21, y0 >> 16);    /* Y buf.0, high */
sd                372 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x24, u0 & 0xffff); /* U buf.0, low */
sd                373 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x25, u0 >> 16);    /* U buf.0, high */
sd                374 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x28, v0 & 0xffff); /* V buf.0, low */
sd                375 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x29, v0 >> 16);    /* V buf.0, high */
sd                377 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x22, y1 & 0xffff); /* Y buf.1, low */
sd                378 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x23, y1 >> 16);    /* Y buf.1, high */
sd                379 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x26, u1 & 0xffff); /* U buf.1, low */
sd                380 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x27, u1 >> 16);    /* U buf.1, high */
sd                381 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x2a, v1 & 0xffff); /* V buf.1, low */
sd                382 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x2b, v1 >> 16);    /* V buf.1, high */
sd                384 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x32, y1 & 0xffff); /* JPEG buf 0 low */
sd                385 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x33, y1 >> 16);    /* JPEG buf 0 high */
sd                387 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x34, y1 & 0xffff); /* JPEG buf 1 low */
sd                388 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x35, y1 >> 16);    /* JPEG bug 1 high */
sd                390 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x36, 0x0000);/* JPEG restart interval */
sd                391 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x37, 0x0804);/*JPEG VLE FIFO threshold*/
sd                392 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x38, 0x0000);/* disable hw up-scaling */
sd                393 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x3f, 0x0000); /* JPEG/MCTL test data */
sd                396 drivers/media/usb/gspca/w996Xcf.c static void w9968cf_set_crop_window(struct sd *sd)
sd                401 drivers/media/usb/gspca/w996Xcf.c 	if (sd->sif) {
sd                409 drivers/media/usb/gspca/w996Xcf.c 	if (sd->sensor == SEN_OV7620) {
sd                417 drivers/media/usb/gspca/w996Xcf.c 		if (sd->freq->val == 1) {
sd                433 drivers/media/usb/gspca/w996Xcf.c 	fw = SC(sd->gspca_dev.pixfmt.width) / max_width;
sd                434 drivers/media/usb/gspca/w996Xcf.c 	fh = SC(sd->gspca_dev.pixfmt.height) / max_height;
sd                436 drivers/media/usb/gspca/w996Xcf.c 	cw = (fw >= fh) ? max_width : SC(sd->gspca_dev.pixfmt.width) / fh;
sd                437 drivers/media/usb/gspca/w996Xcf.c 	ch = (fw >= fh) ? SC(sd->gspca_dev.pixfmt.height) / fw : max_height;
sd                439 drivers/media/usb/gspca/w996Xcf.c 	sd->sensor_width = max_width;
sd                440 drivers/media/usb/gspca/w996Xcf.c 	sd->sensor_height = max_height;
sd                445 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x10, start_cropx + x);
sd                446 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x11, start_cropy + y);
sd                447 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x12, start_cropx + x + cw);
sd                448 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x13, start_cropy + y + ch);
sd                451 drivers/media/usb/gspca/w996Xcf.c static void w9968cf_mode_init_regs(struct sd *sd)
sd                455 drivers/media/usb/gspca/w996Xcf.c 	w9968cf_set_crop_window(sd);
sd                457 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x14, sd->gspca_dev.pixfmt.width);
sd                458 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x15, sd->gspca_dev.pixfmt.height);
sd                461 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x30, sd->gspca_dev.pixfmt.width);
sd                462 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x31, sd->gspca_dev.pixfmt.height);
sd                465 drivers/media/usb/gspca/w996Xcf.c 	if (w9968cf_vga_mode[sd->gspca_dev.curr_mode].pixelformat ==
sd                467 drivers/media/usb/gspca/w996Xcf.c 		reg_w(sd, 0x2c, sd->gspca_dev.pixfmt.width / 2);
sd                468 drivers/media/usb/gspca/w996Xcf.c 		reg_w(sd, 0x2d, sd->gspca_dev.pixfmt.width / 4);
sd                470 drivers/media/usb/gspca/w996Xcf.c 		reg_w(sd, 0x2c, sd->gspca_dev.pixfmt.width);
sd                472 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x00, 0xbf17); /* reset everything */
sd                473 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x00, 0xbf10); /* normal operation */
sd                476 drivers/media/usb/gspca/w996Xcf.c 	val = sd->gspca_dev.pixfmt.width * sd->gspca_dev.pixfmt.height;
sd                477 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x3d, val & 0xffff); /* low bits */
sd                478 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x3e, val >> 16);    /* high bits */
sd                480 drivers/media/usb/gspca/w996Xcf.c 	if (w9968cf_vga_mode[sd->gspca_dev.curr_mode].pixelformat ==
sd                483 drivers/media/usb/gspca/w996Xcf.c 		jpeg_define(sd->jpeg_hdr, sd->gspca_dev.pixfmt.height,
sd                484 drivers/media/usb/gspca/w996Xcf.c 			    sd->gspca_dev.pixfmt.width, 0x22); /* JPEG 420 */
sd                485 drivers/media/usb/gspca/w996Xcf.c 		jpeg_set_qual(sd->jpeg_hdr, v4l2_ctrl_g_ctrl(sd->jpegqual));
sd                486 drivers/media/usb/gspca/w996Xcf.c 		w9968cf_upload_quantizationtables(sd);
sd                487 drivers/media/usb/gspca/w996Xcf.c 		v4l2_ctrl_grab(sd->jpegqual, true);
sd                491 drivers/media/usb/gspca/w996Xcf.c 	if (sd->sensor == SEN_OV7620) {
sd                506 drivers/media/usb/gspca/w996Xcf.c 	if (w9968cf_vga_mode[sd->gspca_dev.curr_mode].pixelformat ==
sd                519 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x16, val);
sd                521 drivers/media/usb/gspca/w996Xcf.c 	sd->gspca_dev.empty_packet = 0;
sd                524 drivers/media/usb/gspca/w996Xcf.c static void w9968cf_stop0(struct sd *sd)
sd                526 drivers/media/usb/gspca/w996Xcf.c 	v4l2_ctrl_grab(sd->jpegqual, false);
sd                527 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x39, 0x0000); /* disable JPEG encoder */
sd                528 drivers/media/usb/gspca/w996Xcf.c 	reg_w(sd, 0x16, 0x0000); /* stop video capture */
sd                543 drivers/media/usb/gspca/w996Xcf.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                553 drivers/media/usb/gspca/w996Xcf.c 					sd->jpeg_hdr, JPEG_HDR_SZ);
sd                857 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd                860 drivers/media/usb/gspca/xirlink_cit.c 	sd->model = id->driver_info;
sd                861 drivers/media/usb/gspca/xirlink_cit.c 	if (sd->model == CIT_MODEL3 && ibm_netcam_pro)
sd                862 drivers/media/usb/gspca/xirlink_cit.c 		sd->model = CIT_IBM_NETCAM_PRO;
sd                865 drivers/media/usb/gspca/xirlink_cit.c 	switch (sd->model) {
sd                869 drivers/media/usb/gspca/xirlink_cit.c 		sd->sof_len = 4;
sd                874 drivers/media/usb/gspca/xirlink_cit.c 		sd->sof_len = 4;
sd                883 drivers/media/usb/gspca/xirlink_cit.c 		sd->stop_on_control_change = 1;
sd                884 drivers/media/usb/gspca/xirlink_cit.c 		sd->sof_len = 4;
sd                894 drivers/media/usb/gspca/xirlink_cit.c 		sd->stop_on_control_change = 1;
sd                895 drivers/media/usb/gspca/xirlink_cit.c 		sd->sof_len = 4;
sd               1121 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1123 drivers/media/usb/gspca/xirlink_cit.c 	switch (sd->model) {
sd               1143 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1146 drivers/media/usb/gspca/xirlink_cit.c 	switch (sd->model) {
sd               1183 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1185 drivers/media/usb/gspca/xirlink_cit.c 	switch (sd->model) {
sd               1246 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1248 drivers/media/usb/gspca/xirlink_cit.c 	switch (sd->model) {
sd               1298 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1300 drivers/media/usb/gspca/xirlink_cit.c 	switch (sd->model) {
sd               1366 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1368 drivers/media/usb/gspca/xirlink_cit.c 	switch (sd->model) {
sd               1386 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1388 drivers/media/usb/gspca/xirlink_cit.c 	switch (sd->model) {
sd               1406 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1408 drivers/media/usb/gspca/xirlink_cit.c 	switch (sd->model) {
sd               1428 drivers/media/usb/gspca/xirlink_cit.c 	sd->sof_read = 0;
sd               1533 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1690 drivers/media/usb/gspca/xirlink_cit.c 				   v4l2_ctrl_g_ctrl(sd->lighting));
sd               1735 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               1756 drivers/media/usb/gspca/xirlink_cit.c 		sd->sof_len = 10;
sd               1764 drivers/media/usb/gspca/xirlink_cit.c 		sd->sof_len = 2;
sd               1773 drivers/media/usb/gspca/xirlink_cit.c 		sd->sof_len = 2;
sd               1782 drivers/media/usb/gspca/xirlink_cit.c 		sd->sof_len = 2;
sd               1914 drivers/media/usb/gspca/xirlink_cit.c 	cit_model2_Packet1(gspca_dev, 0x0028, v4l2_ctrl_g_ctrl(sd->lighting));
sd               1916 drivers/media/usb/gspca/xirlink_cit.c 	v4l2_ctrl_grab(sd->lighting, true);
sd               2173 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2265 drivers/media/usb/gspca/xirlink_cit.c 		sd->sof_len = 2;
sd               2320 drivers/media/usb/gspca/xirlink_cit.c 		sd->sof_len = 2;
sd               2377 drivers/media/usb/gspca/xirlink_cit.c 		sd->sof_len = 10;
sd               2432 drivers/media/usb/gspca/xirlink_cit.c 		sd->sof_len = 2;
sd               2487 drivers/media/usb/gspca/xirlink_cit.c 		sd->sof_len = 2;
sd               2593 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2600 drivers/media/usb/gspca/xirlink_cit.c 	switch (sd->model) {
sd               2708 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2713 drivers/media/usb/gspca/xirlink_cit.c 	switch (sd->model) {
sd               2727 drivers/media/usb/gspca/xirlink_cit.c 		v4l2_ctrl_grab(sd->lighting, false);
sd               2774 drivers/media/usb/gspca/xirlink_cit.c 	if (sd->button_state) {
sd               2777 drivers/media/usb/gspca/xirlink_cit.c 		sd->button_state = 0;
sd               2784 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2788 drivers/media/usb/gspca/xirlink_cit.c 	switch (sd->model) {
sd               2817 drivers/media/usb/gspca/xirlink_cit.c 		if (sd->model <= CIT_MODEL1)
sd               2823 drivers/media/usb/gspca/xirlink_cit.c 			if (sd->model == CIT_MODEL0 && sd->sof_read != i)
sd               2826 drivers/media/usb/gspca/xirlink_cit.c 			switch (sd->sof_read) {
sd               2829 drivers/media/usb/gspca/xirlink_cit.c 					sd->sof_read++;
sd               2833 drivers/media/usb/gspca/xirlink_cit.c 					sd->sof_read++;
sd               2835 drivers/media/usb/gspca/xirlink_cit.c 					sd->sof_read = 1;
sd               2837 drivers/media/usb/gspca/xirlink_cit.c 					sd->sof_read = 0;
sd               2841 drivers/media/usb/gspca/xirlink_cit.c 					sd->sof_read++;
sd               2843 drivers/media/usb/gspca/xirlink_cit.c 					sd->sof_read = 1;
sd               2845 drivers/media/usb/gspca/xirlink_cit.c 					sd->sof_read = 0;
sd               2849 drivers/media/usb/gspca/xirlink_cit.c 					sd->sof_read = 0;
sd               2850 drivers/media/usb/gspca/xirlink_cit.c 					return data + i + (sd->sof_len - 3);
sd               2853 drivers/media/usb/gspca/xirlink_cit.c 					sd->sof_read = 2;
sd               2855 drivers/media/usb/gspca/xirlink_cit.c 					sd->sof_read = 1;
sd               2857 drivers/media/usb/gspca/xirlink_cit.c 					sd->sof_read = 0;
sd               2867 drivers/media/usb/gspca/xirlink_cit.c 			switch (sd->sof_read) {
sd               2870 drivers/media/usb/gspca/xirlink_cit.c 					sd->sof_read++;
sd               2873 drivers/media/usb/gspca/xirlink_cit.c 				sd->sof_read = 0;
sd               2887 drivers/media/usb/gspca/xirlink_cit.c 					return data + i + (sd->sof_len - 1);
sd               2900 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               2909 drivers/media/usb/gspca/xirlink_cit.c 		if (n > sd->sof_len)
sd               2910 drivers/media/usb/gspca/xirlink_cit.c 			n -= sd->sof_len;
sd               2927 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               2929 drivers/media/usb/gspca/xirlink_cit.c 	switch (sd->model) {
sd               2947 drivers/media/usb/gspca/xirlink_cit.c 	if (sd->button_state != new_button_state) {
sd               2951 drivers/media/usb/gspca/xirlink_cit.c 		sd->button_state = new_button_state;
sd               2960 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               2967 drivers/media/usb/gspca/xirlink_cit.c 	if (sd->stop_on_control_change)
sd               2989 drivers/media/usb/gspca/xirlink_cit.c 	if (sd->stop_on_control_change)
sd               3000 drivers/media/usb/gspca/xirlink_cit.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               3011 drivers/media/usb/gspca/xirlink_cit.c 	switch (sd->model) {
sd               3048 drivers/media/usb/gspca/xirlink_cit.c 		sd->lighting = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
sd               3134 drivers/media/usb/gspca/xirlink_cit.c 	return gspca_dev_probe2(intf, id, desc, sizeof(struct sd), THIS_MODULE);
sd               5645 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               5686 drivers/media/usb/gspca/zc3xx.c 	matrix = matrix_tb[sd->sensor];
sd               5768 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               5770 drivers/media/usb/gspca/zc3xx.c 	switch (sd->sensor) {
sd               5784 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               5786 drivers/media/usb/gspca/zc3xx.c 	switch (sd->sensor) {
sd               5800 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               5801 drivers/media/usb/gspca/zc3xx.c 	jpeg_set_qual(sd->jpeg_hdr, jpeg_qual[sd->reg08 >> 1]);
sd               5802 drivers/media/usb/gspca/zc3xx.c 	reg_w(gspca_dev, sd->reg08, ZC3XX_R008_CLOCKSETTING);
sd               5813 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               5899 drivers/media/usb/gspca/zc3xx.c 	zc3_freq = freq_tb[sd->sensor][i];
sd               5903 drivers/media/usb/gspca/zc3xx.c 	switch (sd->sensor) {
sd               5926 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               5928 drivers/media/usb/gspca/zc3xx.c 	if (sd->sensor == SENSOR_OV7620)
sd               5940 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = container_of(work, struct sd, work);
sd               5941 drivers/media/usb/gspca/zc3xx.c 	struct gspca_dev *gspca_dev = &sd->gspca_dev;
sd               6172 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               6205 drivers/media/usb/gspca/zc3xx.c 			sd->chip_revision = retword;
sd               6296 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               6299 drivers/media/usb/gspca/zc3xx.c 	switch (sd->sensor) {
sd               6321 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               6324 drivers/media/usb/gspca/zc3xx.c 		sd->bridge = BRIDGE_ZC301;
sd               6326 drivers/media/usb/gspca/zc3xx.c 		sd->bridge = BRIDGE_ZC303;
sd               6329 drivers/media/usb/gspca/zc3xx.c 	sd->sensor = id->driver_info;
sd               6331 drivers/media/usb/gspca/zc3xx.c 	sd->reg08 = REG08_DEF;
sd               6333 drivers/media/usb/gspca/zc3xx.c 	INIT_WORK(&sd->work, transfer_update);
sd               6342 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               6347 drivers/media/usb/gspca/zc3xx.c 		if (ctrl->val && sd->exposure && gspca_dev->streaming)
sd               6348 drivers/media/usb/gspca/zc3xx.c 			sd->exposure->val = getexposure(gspca_dev);
sd               6358 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               6364 drivers/media/usb/gspca/zc3xx.c 		qual = sd->reg08 >> 1;
sd               6378 drivers/media/usb/gspca/zc3xx.c 		sd->reg08 = (i << 1) | 1;
sd               6388 drivers/media/usb/gspca/zc3xx.c 		setcontrast(gspca_dev, sd->gamma->val,
sd               6389 drivers/media/usb/gspca/zc3xx.c 				sd->brightness->val, sd->contrast->val);
sd               6394 drivers/media/usb/gspca/zc3xx.c 		if (!gspca_dev->usb_err && !ctrl->val && sd->exposure)
sd               6395 drivers/media/usb/gspca/zc3xx.c 			setexposure(gspca_dev, sd->exposure->val);
sd               6417 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *)gspca_dev;
sd               6443 drivers/media/usb/gspca/zc3xx.c 	sd->brightness = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
sd               6445 drivers/media/usb/gspca/zc3xx.c 	sd->contrast = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
sd               6447 drivers/media/usb/gspca/zc3xx.c 	sd->gamma = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
sd               6448 drivers/media/usb/gspca/zc3xx.c 			V4L2_CID_GAMMA, 1, 6, 1, gamma[sd->sensor]);
sd               6449 drivers/media/usb/gspca/zc3xx.c 	if (sd->sensor == SENSOR_HV7131R)
sd               6450 drivers/media/usb/gspca/zc3xx.c 		sd->exposure = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
sd               6452 drivers/media/usb/gspca/zc3xx.c 	else if (sd->sensor == SENSOR_OV7620)
sd               6453 drivers/media/usb/gspca/zc3xx.c 		sd->exposure = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
sd               6455 drivers/media/usb/gspca/zc3xx.c 	sd->autogain = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
sd               6457 drivers/media/usb/gspca/zc3xx.c 	if (sd->sensor != SENSOR_OV7630C)
sd               6458 drivers/media/usb/gspca/zc3xx.c 		sd->plfreq = v4l2_ctrl_new_std_menu(hdl, &zcxx_ctrl_ops,
sd               6462 drivers/media/usb/gspca/zc3xx.c 	sd->sharpness = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
sd               6464 drivers/media/usb/gspca/zc3xx.c 			sd->sensor == SENSOR_PO2030 ? 0 : 2);
sd               6465 drivers/media/usb/gspca/zc3xx.c 	sd->jpegqual = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
sd               6473 drivers/media/usb/gspca/zc3xx.c 	v4l2_ctrl_cluster(3, &sd->gamma);
sd               6474 drivers/media/usb/gspca/zc3xx.c 	if (sd->sensor == SENSOR_HV7131R || sd->sensor == SENSOR_OV7620)
sd               6475 drivers/media/usb/gspca/zc3xx.c 		v4l2_ctrl_auto_cluster(2, &sd->autogain, 0, true);
sd               6482 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               6511 drivers/media/usb/gspca/zc3xx.c 		sd->sensor = force_sensor;
sd               6517 drivers/media/usb/gspca/zc3xx.c 			switch (sd->sensor) {
sd               6526 drivers/media/usb/gspca/zc3xx.c 				sd->sensor = SENSOR_TAS5130C;
sd               6538 drivers/media/usb/gspca/zc3xx.c 				sd->sensor = SENSOR_HV7131B;
sd               6543 drivers/media/usb/gspca/zc3xx.c 				sd->sensor = SENSOR_HV7131R;
sd               6549 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_TAS5130C;
sd               6553 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_CS2102;
sd               6557 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_HDCS2020;
sd               6562 drivers/media/usb/gspca/zc3xx.c 				  sd->chip_revision);
sd               6563 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_PB0330;
sd               6567 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_ICM105A;
sd               6571 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_PAS202B;
sd               6575 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_PAS106;
sd               6580 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_TAS5130C;
sd               6584 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_HV7131R;
sd               6590 drivers/media/usb/gspca/zc3xx.c 				  sd->chip_revision);
sd               6591 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = sd->bridge == BRIDGE_ZC301
sd               6598 drivers/media/usb/gspca/zc3xx.c 				  sd->chip_revision);
sd               6599 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_CS2102K;
sd               6603 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_ADCM2700;
sd               6607 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_GC0305;
sd               6611 drivers/media/usb/gspca/zc3xx.c 			sd->sensor =  SENSOR_GC0303;
sd               6615 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_PO2030;
sd               6619 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_OV7620;
sd               6623 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_OV7630C;
sd               6627 drivers/media/usb/gspca/zc3xx.c 			sd->sensor = SENSOR_OV7620;	/* same sensor (?) */
sd               6641 drivers/media/usb/gspca/zc3xx.c 	switch (mode_tb[sd->sensor]) {
sd               6664 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               6665 drivers/media/usb/gspca/zc3xx.c 	gspca_dev->cam.needs_full_bandwidth = (sd->reg08 >= 4) ? 1 : 0;
sd               6671 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               6715 drivers/media/usb/gspca/zc3xx.c 	jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
sd               6720 drivers/media/usb/gspca/zc3xx.c 	switch (sd->sensor) {
sd               6728 drivers/media/usb/gspca/zc3xx.c 	usb_exchange(gspca_dev, init_tb[sd->sensor][mode]);
sd               6730 drivers/media/usb/gspca/zc3xx.c 	switch (sd->sensor) {
sd               6741 drivers/media/usb/gspca/zc3xx.c 		if (sd->sensor == SENSOR_TAS5130C)
sd               6752 drivers/media/usb/gspca/zc3xx.c 		if (sd->sensor == SENSOR_HV7131R)
sd               6758 drivers/media/usb/gspca/zc3xx.c 	switch (sd->sensor) {
sd               6774 drivers/media/usb/gspca/zc3xx.c 	setsharpness(gspca_dev, v4l2_ctrl_g_ctrl(sd->sharpness));
sd               6777 drivers/media/usb/gspca/zc3xx.c 	switch (sd->sensor) {
sd               6783 drivers/media/usb/gspca/zc3xx.c 		setcontrast(gspca_dev, v4l2_ctrl_g_ctrl(sd->gamma),
sd               6784 drivers/media/usb/gspca/zc3xx.c 				v4l2_ctrl_g_ctrl(sd->brightness),
sd               6785 drivers/media/usb/gspca/zc3xx.c 				v4l2_ctrl_g_ctrl(sd->contrast));
sd               6789 drivers/media/usb/gspca/zc3xx.c 	switch (sd->sensor) {
sd               6799 drivers/media/usb/gspca/zc3xx.c 	if (sd->plfreq)
sd               6800 drivers/media/usb/gspca/zc3xx.c 		setlightfreq(gspca_dev, v4l2_ctrl_g_ctrl(sd->plfreq));
sd               6802 drivers/media/usb/gspca/zc3xx.c 	switch (sd->sensor) {
sd               6811 drivers/media/usb/gspca/zc3xx.c 		setexposure(gspca_dev, v4l2_ctrl_g_ctrl(sd->exposure));
sd               6835 drivers/media/usb/gspca/zc3xx.c 	setautogain(gspca_dev, v4l2_ctrl_g_ctrl(sd->autogain));
sd               6841 drivers/media/usb/gspca/zc3xx.c 	schedule_work(&sd->work);
sd               6850 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               6853 drivers/media/usb/gspca/zc3xx.c 	flush_work(&sd->work);
sd               6857 drivers/media/usb/gspca/zc3xx.c 	send_unknown(gspca_dev, sd->sensor);
sd               6864 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               6879 drivers/media/usb/gspca/zc3xx.c 			sd->jpeg_hdr, JPEG_HDR_SZ);
sd               6896 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               6898 drivers/media/usb/gspca/zc3xx.c 	return v4l2_ctrl_s_ctrl(sd->jpegqual, jcomp->quality);
sd               6904 drivers/media/usb/gspca/zc3xx.c 	struct sd *sd = (struct sd *) gspca_dev;
sd               6907 drivers/media/usb/gspca/zc3xx.c 	jcomp->quality = v4l2_ctrl_g_ctrl(sd->jpegqual);
sd               7008 drivers/media/usb/gspca/zc3xx.c 	return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
sd               1168 drivers/media/usb/msi2500/msi2500.c 	struct v4l2_subdev *sd;
sd               1244 drivers/media/usb/msi2500/msi2500.c 	sd = v4l2_spi_new_subdev(&dev->v4l2_dev, master, &board_info);
sd               1245 drivers/media/usb/msi2500/msi2500.c 	dev->v4l2_subdev = sd;
sd               1246 drivers/media/usb/msi2500/msi2500.c 	if (sd == NULL) {
sd               1261 drivers/media/usb/msi2500/msi2500.c 	v4l2_ctrl_add_handler(&dev->hdl, sd->ctrl_handler, NULL, true);
sd                 46 drivers/media/usb/pvrusb2/pvrusb2-audio.c void pvr2_msp3400_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
sd                 67 drivers/media/usb/pvrusb2/pvrusb2-audio.c 		sd->ops->audio->s_routing(sd, input,
sd                 47 drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c void pvr2_cs53l32a_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
sd                 66 drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c 		sd->ops->audio->s_routing(sd, input, 0, 0);
sd                135 drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c void pvr2_cx25840_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
sd                159 drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c 		sd->ops->video->s_routing(sd, (u32)vid_input, 0, 0);
sd                160 drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c 		sd->ops->audio->s_routing(sd, (u32)aud_input, 0, 0);
sd                 25 drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.h void pvr2_cx25840_subdev_update(struct pvr2_hdw *, struct v4l2_subdev *sd);
sd               1978 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	struct v4l2_subdev *sd;
sd               2023 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 		sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap,
sd               2029 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 		sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap,
sd               2033 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	if (!sd) {
sd               2043 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	sd->grp_id = mid;
sd               2807 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	struct v4l2_subdev *sd;
sd               2814 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	v4l2_device_for_each_subdev(sd, &hdw->v4l2_dev)
sd               2815 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 		v4l2_s_ctrl(NULL, sd->ctrl_handler, &ctrl);
sd               2836 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	struct v4l2_subdev *sd;
sd               2953 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	v4l2_device_for_each_subdev(sd, &hdw->v4l2_dev) {
sd               2954 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 		id = sd->grp_id;
sd               2958 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 		(*fp)(hdw, sd);
sd               4811 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	struct v4l2_subdev *sd;
sd               4820 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	v4l2_device_for_each_subdev(sd, &hdw->v4l2_dev) {
sd               4821 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 		id = sd->grp_id;
sd               4832 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 		client = v4l2_get_subdevdata(sd);
sd                 64 drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c void pvr2_saa7115_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
sd                 85 drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c 		sd->ops->video->s_routing(sd, input, 0, 0);
sd                 24 drivers/media/usb/pvrusb2/pvrusb2-wm8775.c void pvr2_wm8775_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
sd                 41 drivers/media/usb/pvrusb2/pvrusb2-wm8775.c 		sd->ops->audio->s_routing(sd, input, 0, 0);
sd                 25 drivers/media/usb/pvrusb2/pvrusb2-wm8775.h void pvr2_wm8775_subdev_update(struct pvr2_hdw *, struct v4l2_subdev *sd);
sd                221 drivers/media/usb/usbvision/usbvision-i2c.c 		struct v4l2_subdev *sd;
sd                225 drivers/media/usb/usbvision/usbvision-i2c.c 		sd = v4l2_i2c_new_subdev(&usbvision->v4l2_dev,
sd                230 drivers/media/usb/usbvision/usbvision-i2c.c 		type = sd ? ADDRS_TV_WITH_DEMOD : ADDRS_TV;
sd                232 drivers/media/usb/usbvision/usbvision-i2c.c 		sd = v4l2_i2c_new_subdev(&usbvision->v4l2_dev,
sd                236 drivers/media/usb/usbvision/usbvision-i2c.c 		if (sd == NULL)
sd                241 drivers/media/usb/usbvision/usbvision-i2c.c 			tun_setup.addr = v4l2_i2c_subdev_addr(sd);
sd                152 drivers/media/v4l2-core/tuner-core.c 	struct v4l2_subdev  sd;
sd                227 drivers/media/v4l2-core/tuner-core.c static inline struct tuner *to_tuner(struct v4l2_subdev *sd)
sd                229 drivers/media/v4l2-core/tuner-core.c 	return container_of(sd, struct tuner, sd);
sd                474 drivers/media/v4l2-core/tuner-core.c 	t->sd.entity.name = t->name;
sd                520 drivers/media/v4l2-core/tuner-core.c static int tuner_s_type_addr(struct v4l2_subdev *sd,
sd                523 drivers/media/v4l2-core/tuner-core.c 	struct tuner *t = to_tuner(sd);
sd                524 drivers/media/v4l2-core/tuner-core.c 	struct i2c_client *c = v4l2_get_subdevdata(sd);
sd                554 drivers/media/v4l2-core/tuner-core.c static int tuner_s_config(struct v4l2_subdev *sd,
sd                557 drivers/media/v4l2-core/tuner-core.c 	struct tuner *t = to_tuner(sd);
sd                641 drivers/media/v4l2-core/tuner-core.c 	v4l2_i2c_subdev_init(&t->sd, client, &tuner_ops);
sd                728 drivers/media/v4l2-core/tuner-core.c 	t->sd.entity.name = t->name;
sd                739 drivers/media/v4l2-core/tuner-core.c 		ret = media_entity_pads_init(&t->sd.entity,
sd                742 drivers/media/v4l2-core/tuner-core.c 		t->sd.entity.function = MEDIA_ENT_F_IF_VID_DECODER;
sd                750 drivers/media/v4l2-core/tuner-core.c 		ret = media_entity_pads_init(&t->sd.entity, TUNER_NUM_PADS,
sd                752 drivers/media/v4l2-core/tuner-core.c 		t->sd.entity.function = MEDIA_ENT_F_TUNER;
sd                786 drivers/media/v4l2-core/tuner-core.c 	v4l2_device_unregister_subdev(&t->sd);
sd                868 drivers/media/v4l2-core/tuner-core.c 	struct i2c_client *client = v4l2_get_subdevdata(&t->sd);
sd               1141 drivers/media/v4l2-core/tuner-core.c static int tuner_s_radio(struct v4l2_subdev *sd)
sd               1143 drivers/media/v4l2-core/tuner-core.c 	struct tuner *t = to_tuner(sd);
sd               1158 drivers/media/v4l2-core/tuner-core.c static int tuner_standby(struct v4l2_subdev *sd)
sd               1160 drivers/media/v4l2-core/tuner-core.c 	struct tuner *t = to_tuner(sd);
sd               1170 drivers/media/v4l2-core/tuner-core.c static int tuner_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
sd               1172 drivers/media/v4l2-core/tuner-core.c 	struct tuner *t = to_tuner(sd);
sd               1184 drivers/media/v4l2-core/tuner-core.c static int tuner_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *f)
sd               1186 drivers/media/v4l2-core/tuner-core.c 	struct tuner *t = to_tuner(sd);
sd               1203 drivers/media/v4l2-core/tuner-core.c static int tuner_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
sd               1205 drivers/media/v4l2-core/tuner-core.c 	struct tuner *t = to_tuner(sd);
sd               1234 drivers/media/v4l2-core/tuner-core.c static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
sd               1236 drivers/media/v4l2-core/tuner-core.c 	struct tuner *t = to_tuner(sd);
sd               1287 drivers/media/v4l2-core/tuner-core.c static int tuner_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
sd               1289 drivers/media/v4l2-core/tuner-core.c 	struct tuner *t = to_tuner(sd);
sd               1311 drivers/media/v4l2-core/tuner-core.c static int tuner_log_status(struct v4l2_subdev *sd)
sd               1313 drivers/media/v4l2-core/tuner-core.c 	struct tuner *t = to_tuner(sd);
sd               1357 drivers/media/v4l2-core/tuner-core.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd               1364 drivers/media/v4l2-core/tuner-core.c 		return tuner_s_config(sd, arg);
sd                 53 drivers/media/v4l2-core/v4l2-async.c static bool match_i2c(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
sd                 56 drivers/media/v4l2-core/v4l2-async.c 	struct i2c_client *client = i2c_verify_client(sd->dev);
sd                 66 drivers/media/v4l2-core/v4l2-async.c static bool match_devname(struct v4l2_subdev *sd,
sd                 69 drivers/media/v4l2-core/v4l2-async.c 	return !strcmp(asd->match.device_name, dev_name(sd->dev));
sd                 72 drivers/media/v4l2-core/v4l2-async.c static bool match_fwnode(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
sd                 74 drivers/media/v4l2-core/v4l2-async.c 	return sd->fwnode == asd->match.fwnode;
sd                 77 drivers/media/v4l2-core/v4l2-async.c static bool match_custom(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd)
sd                 83 drivers/media/v4l2-core/v4l2-async.c 	return asd->match.custom.match(sd->dev, asd);
sd                 92 drivers/media/v4l2-core/v4l2-async.c 		      struct v4l2_subdev *sd)
sd                 94 drivers/media/v4l2-core/v4l2-async.c 	bool (*match)(struct v4l2_subdev *sd, struct v4l2_async_subdev *asd);
sd                119 drivers/media/v4l2-core/v4l2-async.c 		if (match(sd, asd))
sd                153 drivers/media/v4l2-core/v4l2-async.c v4l2_async_find_subdev_notifier(struct v4l2_subdev *sd)
sd                158 drivers/media/v4l2-core/v4l2-async.c 		if (n->sd == sd)
sd                180 drivers/media/v4l2-core/v4l2-async.c 	struct v4l2_subdev *sd;
sd                185 drivers/media/v4l2-core/v4l2-async.c 	list_for_each_entry(sd, &notifier->done, async_list) {
sd                187 drivers/media/v4l2-core/v4l2-async.c 			v4l2_async_find_subdev_notifier(sd);
sd                228 drivers/media/v4l2-core/v4l2-async.c 				   struct v4l2_subdev *sd,
sd                234 drivers/media/v4l2-core/v4l2-async.c 	ret = v4l2_device_register_subdev(v4l2_dev, sd);
sd                238 drivers/media/v4l2-core/v4l2-async.c 	ret = v4l2_async_notifier_call_bound(notifier, sd, asd);
sd                240 drivers/media/v4l2-core/v4l2-async.c 		v4l2_device_unregister_subdev(sd);
sd                246 drivers/media/v4l2-core/v4l2-async.c 	sd->asd = asd;
sd                247 drivers/media/v4l2-core/v4l2-async.c 	sd->notifier = notifier;
sd                250 drivers/media/v4l2-core/v4l2-async.c 	list_move(&sd->async_list, &notifier->done);
sd                255 drivers/media/v4l2-core/v4l2-async.c 	subdev_notifier = v4l2_async_find_subdev_notifier(sd);
sd                275 drivers/media/v4l2-core/v4l2-async.c 	struct v4l2_subdev *sd;
sd                281 drivers/media/v4l2-core/v4l2-async.c 	list_for_each_entry(sd, &subdev_list, async_list) {
sd                285 drivers/media/v4l2-core/v4l2-async.c 		asd = v4l2_async_find_match(notifier, sd);
sd                289 drivers/media/v4l2-core/v4l2-async.c 		ret = v4l2_async_match_notify(notifier, v4l2_dev, sd, asd);
sd                305 drivers/media/v4l2-core/v4l2-async.c static void v4l2_async_cleanup(struct v4l2_subdev *sd)
sd                307 drivers/media/v4l2-core/v4l2-async.c 	v4l2_device_unregister_subdev(sd);
sd                312 drivers/media/v4l2-core/v4l2-async.c 	list_del_init(&sd->async_list);
sd                313 drivers/media/v4l2-core/v4l2-async.c 	sd->asd = NULL;
sd                320 drivers/media/v4l2-core/v4l2-async.c 	struct v4l2_subdev *sd, *tmp;
sd                322 drivers/media/v4l2-core/v4l2-async.c 	list_for_each_entry_safe(sd, tmp, &notifier->done, async_list) {
sd                324 drivers/media/v4l2-core/v4l2-async.c 			v4l2_async_find_subdev_notifier(sd);
sd                329 drivers/media/v4l2-core/v4l2-async.c 		v4l2_async_notifier_call_unbind(notifier, sd, sd->asd);
sd                330 drivers/media/v4l2-core/v4l2-async.c 		v4l2_async_cleanup(sd);
sd                332 drivers/media/v4l2-core/v4l2-async.c 		list_move(&sd->async_list, &subdev_list);
sd                344 drivers/media/v4l2-core/v4l2-async.c 	struct v4l2_subdev *sd;
sd                350 drivers/media/v4l2-core/v4l2-async.c 	list_for_each_entry(sd, &notifier->done, async_list) {
sd                351 drivers/media/v4l2-core/v4l2-async.c 		if (WARN_ON(!sd->asd))
sd                354 drivers/media/v4l2-core/v4l2-async.c 		if (asd_equal(asd, sd->asd))
sd                478 drivers/media/v4l2-core/v4l2-async.c 	if (WARN_ON(!v4l2_dev || notifier->sd))
sd                491 drivers/media/v4l2-core/v4l2-async.c int v4l2_async_subdev_notifier_register(struct v4l2_subdev *sd,
sd                496 drivers/media/v4l2-core/v4l2-async.c 	if (WARN_ON(!sd || notifier->v4l2_dev))
sd                499 drivers/media/v4l2-core/v4l2-async.c 	notifier->sd = sd;
sd                503 drivers/media/v4l2-core/v4l2-async.c 		notifier->sd = NULL;
sd                512 drivers/media/v4l2-core/v4l2-async.c 	if (!notifier || (!notifier->v4l2_dev && !notifier->sd))
sd                517 drivers/media/v4l2-core/v4l2-async.c 	notifier->sd = NULL;
sd                683 drivers/media/v4l2-core/v4l2-async.c int v4l2_async_register_subdev(struct v4l2_subdev *sd)
sd                694 drivers/media/v4l2-core/v4l2-async.c 	if (!sd->fwnode && sd->dev)
sd                695 drivers/media/v4l2-core/v4l2-async.c 		sd->fwnode = dev_fwnode(sd->dev);
sd                699 drivers/media/v4l2-core/v4l2-async.c 	INIT_LIST_HEAD(&sd->async_list);
sd                709 drivers/media/v4l2-core/v4l2-async.c 		asd = v4l2_async_find_match(notifier, sd);
sd                713 drivers/media/v4l2-core/v4l2-async.c 		ret = v4l2_async_match_notify(notifier, v4l2_dev, sd, asd);
sd                725 drivers/media/v4l2-core/v4l2-async.c 	list_add(&sd->async_list, &subdev_list);
sd                737 drivers/media/v4l2-core/v4l2-async.c 	subdev_notifier = v4l2_async_find_subdev_notifier(sd);
sd                741 drivers/media/v4l2-core/v4l2-async.c 	if (sd->asd)
sd                742 drivers/media/v4l2-core/v4l2-async.c 		v4l2_async_notifier_call_unbind(notifier, sd, sd->asd);
sd                743 drivers/media/v4l2-core/v4l2-async.c 	v4l2_async_cleanup(sd);
sd                751 drivers/media/v4l2-core/v4l2-async.c void v4l2_async_unregister_subdev(struct v4l2_subdev *sd)
sd                755 drivers/media/v4l2-core/v4l2-async.c 	__v4l2_async_notifier_unregister(sd->subdev_notifier);
sd                756 drivers/media/v4l2-core/v4l2-async.c 	__v4l2_async_notifier_cleanup(sd->subdev_notifier);
sd                757 drivers/media/v4l2-core/v4l2-async.c 	kfree(sd->subdev_notifier);
sd                758 drivers/media/v4l2-core/v4l2-async.c 	sd->subdev_notifier = NULL;
sd                760 drivers/media/v4l2-core/v4l2-async.c 	if (sd->asd) {
sd                761 drivers/media/v4l2-core/v4l2-async.c 		struct v4l2_async_notifier *notifier = sd->notifier;
sd                763 drivers/media/v4l2-core/v4l2-async.c 		list_add(&sd->asd->list, &notifier->waiting);
sd                765 drivers/media/v4l2-core/v4l2-async.c 		v4l2_async_notifier_call_unbind(notifier, sd, sd->asd);
sd                768 drivers/media/v4l2-core/v4l2-async.c 	v4l2_async_cleanup(sd);
sd                188 drivers/media/v4l2-core/v4l2-common.c 		    struct v4l2_subdev *sd, struct v4l2_streamparm *a)
sd                199 drivers/media/v4l2-core/v4l2-common.c 	if (v4l2_subdev_has_op(sd, video, g_frame_interval))
sd                201 drivers/media/v4l2-core/v4l2-common.c 	ret = v4l2_subdev_call(sd, video, g_frame_interval, &ival);
sd                209 drivers/media/v4l2-core/v4l2-common.c 		    struct v4l2_subdev *sd, struct v4l2_streamparm *a)
sd                226 drivers/media/v4l2-core/v4l2-common.c 	if (v4l2_subdev_has_op(sd, video, g_frame_interval))
sd                228 drivers/media/v4l2-core/v4l2-common.c 	ret = v4l2_subdev_call(sd, video, s_frame_interval, &ival);
sd               2871 drivers/media/v4l2-core/v4l2-ctrls.c int v4l2_ctrl_subdev_log_status(struct v4l2_subdev *sd)
sd               2873 drivers/media/v4l2-core/v4l2-ctrls.c 	v4l2_ctrl_handler_log_status(sd->ctrl_handler, sd->name);
sd               4404 drivers/media/v4l2-core/v4l2-ctrls.c int v4l2_ctrl_subdev_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
sd               4407 drivers/media/v4l2-core/v4l2-ctrls.c 	if (!sd->ctrl_handler)
sd                 90 drivers/media/v4l2-core/v4l2-device.c 	struct v4l2_subdev *sd, *next;
sd                 99 drivers/media/v4l2-core/v4l2-device.c 	list_for_each_entry_safe(sd, next, &v4l2_dev->subdevs, list) {
sd                100 drivers/media/v4l2-core/v4l2-device.c 		v4l2_device_unregister_subdev(sd);
sd                101 drivers/media/v4l2-core/v4l2-device.c 		if (sd->flags & V4L2_SUBDEV_FL_IS_I2C)
sd                102 drivers/media/v4l2-core/v4l2-device.c 			v4l2_i2c_subdev_unregister(sd);
sd                103 drivers/media/v4l2-core/v4l2-device.c 		else if (sd->flags & V4L2_SUBDEV_FL_IS_SPI)
sd                104 drivers/media/v4l2-core/v4l2-device.c 			v4l2_spi_subdev_unregister(sd);
sd                112 drivers/media/v4l2-core/v4l2-device.c 				struct v4l2_subdev *sd)
sd                115 drivers/media/v4l2-core/v4l2-device.c 	struct media_entity *entity = &sd->entity;
sd                120 drivers/media/v4l2-core/v4l2-device.c 	if (!v4l2_dev || !sd || sd->v4l2_dev || !sd->name[0])
sd                130 drivers/media/v4l2-core/v4l2-device.c 	sd->owner_v4l2_dev = v4l2_dev->dev && v4l2_dev->dev->driver &&
sd                131 drivers/media/v4l2-core/v4l2-device.c 		sd->owner == v4l2_dev->dev->driver->owner;
sd                133 drivers/media/v4l2-core/v4l2-device.c 	if (!sd->owner_v4l2_dev && !try_module_get(sd->owner))
sd                136 drivers/media/v4l2-core/v4l2-device.c 	sd->v4l2_dev = v4l2_dev;
sd                138 drivers/media/v4l2-core/v4l2-device.c 	err = v4l2_ctrl_add_handler(v4l2_dev->ctrl_handler, sd->ctrl_handler,
sd                152 drivers/media/v4l2-core/v4l2-device.c 	if (sd->internal_ops && sd->internal_ops->registered) {
sd                153 drivers/media/v4l2-core/v4l2-device.c 		err = sd->internal_ops->registered(sd);
sd                159 drivers/media/v4l2-core/v4l2-device.c 	list_add_tail(&sd->list, &v4l2_dev->subdevs);
sd                169 drivers/media/v4l2-core/v4l2-device.c 	if (!sd->owner_v4l2_dev)
sd                170 drivers/media/v4l2-core/v4l2-device.c 		module_put(sd->owner);
sd                171 drivers/media/v4l2-core/v4l2-device.c 	sd->v4l2_dev = NULL;
sd                176 drivers/media/v4l2-core/v4l2-device.c static void v4l2_subdev_release(struct v4l2_subdev *sd)
sd                178 drivers/media/v4l2-core/v4l2-device.c 	struct module *owner = !sd->owner_v4l2_dev ? sd->owner : NULL;
sd                180 drivers/media/v4l2-core/v4l2-device.c 	if (sd->internal_ops && sd->internal_ops->release)
sd                181 drivers/media/v4l2-core/v4l2-device.c 		sd->internal_ops->release(sd);
sd                182 drivers/media/v4l2-core/v4l2-device.c 	sd->devnode = NULL;
sd                195 drivers/media/v4l2-core/v4l2-device.c 	struct v4l2_subdev *sd;
sd                201 drivers/media/v4l2-core/v4l2-device.c 	list_for_each_entry(sd, &v4l2_dev->subdevs, list) {
sd                202 drivers/media/v4l2-core/v4l2-device.c 		if (!(sd->flags & V4L2_SUBDEV_FL_HAS_DEVNODE))
sd                205 drivers/media/v4l2-core/v4l2-device.c 		if (sd->devnode)
sd                214 drivers/media/v4l2-core/v4l2-device.c 		video_set_drvdata(vdev, sd);
sd                215 drivers/media/v4l2-core/v4l2-device.c 		strscpy(vdev->name, sd->name, sizeof(vdev->name));
sd                216 drivers/media/v4l2-core/v4l2-device.c 		vdev->dev_parent = sd->dev;
sd                220 drivers/media/v4l2-core/v4l2-device.c 		vdev->ctrl_handler = sd->ctrl_handler;
sd                222 drivers/media/v4l2-core/v4l2-device.c 					      sd->owner);
sd                227 drivers/media/v4l2-core/v4l2-device.c 		sd->devnode = vdev;
sd                229 drivers/media/v4l2-core/v4l2-device.c 		sd->entity.info.dev.major = VIDEO_MAJOR;
sd                230 drivers/media/v4l2-core/v4l2-device.c 		sd->entity.info.dev.minor = vdev->minor;
sd                236 drivers/media/v4l2-core/v4l2-device.c 			link = media_create_intf_link(&sd->entity,
sd                250 drivers/media/v4l2-core/v4l2-device.c 	list_for_each_entry(sd, &v4l2_dev->subdevs, list) {
sd                251 drivers/media/v4l2-core/v4l2-device.c 		if (!sd->devnode)
sd                253 drivers/media/v4l2-core/v4l2-device.c 		video_unregister_device(sd->devnode);
sd                260 drivers/media/v4l2-core/v4l2-device.c void v4l2_device_unregister_subdev(struct v4l2_subdev *sd)
sd                265 drivers/media/v4l2-core/v4l2-device.c 	if (sd == NULL || sd->v4l2_dev == NULL)
sd                268 drivers/media/v4l2-core/v4l2-device.c 	v4l2_dev = sd->v4l2_dev;
sd                271 drivers/media/v4l2-core/v4l2-device.c 	list_del(&sd->list);
sd                274 drivers/media/v4l2-core/v4l2-device.c 	if (sd->internal_ops && sd->internal_ops->unregistered)
sd                275 drivers/media/v4l2-core/v4l2-device.c 		sd->internal_ops->unregistered(sd);
sd                276 drivers/media/v4l2-core/v4l2-device.c 	sd->v4l2_dev = NULL;
sd                284 drivers/media/v4l2-core/v4l2-device.c 		media_device_unregister_entity(&sd->entity);
sd                287 drivers/media/v4l2-core/v4l2-device.c 	if (sd->devnode)
sd                288 drivers/media/v4l2-core/v4l2-device.c 		video_unregister_device(sd->devnode);
sd                290 drivers/media/v4l2-core/v4l2-device.c 		v4l2_subdev_release(sd);
sd                312 drivers/media/v4l2-core/v4l2-event.c int v4l2_event_subdev_unsubscribe(struct v4l2_subdev *sd, struct v4l2_fh *fh,
sd                348 drivers/media/v4l2-core/v4l2-event.c int v4l2_src_change_event_subdev_subscribe(struct v4l2_subdev *sd,
sd                412 drivers/media/v4l2-core/v4l2-flash-led-class.c 	v4l2_flash->ctrls = devm_kcalloc(v4l2_flash->sd.dev,
sd                471 drivers/media/v4l2-core/v4l2-flash-led-class.c 	v4l2_flash->sd.ctrl_handler = &v4l2_flash->hdl;
sd                526 drivers/media/v4l2-core/v4l2-flash-led-class.c static int v4l2_flash_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                528 drivers/media/v4l2-core/v4l2-flash-led-class.c 	struct v4l2_flash *v4l2_flash = v4l2_subdev_to_v4l2_flash(sd);
sd                576 drivers/media/v4l2-core/v4l2-flash-led-class.c static int v4l2_flash_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                578 drivers/media/v4l2-core/v4l2-flash-led-class.c 	struct v4l2_flash *v4l2_flash = v4l2_subdev_to_v4l2_flash(sd);
sd                621 drivers/media/v4l2-core/v4l2-flash-led-class.c 	struct v4l2_subdev *sd;
sd                631 drivers/media/v4l2-core/v4l2-flash-led-class.c 	sd = &v4l2_flash->sd;
sd                635 drivers/media/v4l2-core/v4l2-flash-led-class.c 	sd->dev = dev;
sd                636 drivers/media/v4l2-core/v4l2-flash-led-class.c 	sd->fwnode = fwn ? fwn : dev_fwnode(dev);
sd                637 drivers/media/v4l2-core/v4l2-flash-led-class.c 	v4l2_subdev_init(sd, &v4l2_flash_subdev_ops);
sd                638 drivers/media/v4l2-core/v4l2-flash-led-class.c 	sd->internal_ops = &v4l2_flash_subdev_internal_ops;
sd                639 drivers/media/v4l2-core/v4l2-flash-led-class.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                640 drivers/media/v4l2-core/v4l2-flash-led-class.c 	strscpy(sd->name, config->dev_name, sizeof(sd->name));
sd                642 drivers/media/v4l2-core/v4l2-flash-led-class.c 	ret = media_entity_pads_init(&sd->entity, 0, NULL);
sd                646 drivers/media/v4l2-core/v4l2-flash-led-class.c 	sd->entity.function = MEDIA_ENT_F_FLASH;
sd                652 drivers/media/v4l2-core/v4l2-flash-led-class.c 	fwnode_handle_get(sd->fwnode);
sd                654 drivers/media/v4l2-core/v4l2-flash-led-class.c 	ret = v4l2_async_register_subdev(sd);
sd                661 drivers/media/v4l2-core/v4l2-flash-led-class.c 	fwnode_handle_put(sd->fwnode);
sd                662 drivers/media/v4l2-core/v4l2-flash-led-class.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                664 drivers/media/v4l2-core/v4l2-flash-led-class.c 	media_entity_cleanup(&sd->entity);
sd                690 drivers/media/v4l2-core/v4l2-flash-led-class.c 	struct v4l2_subdev *sd;
sd                695 drivers/media/v4l2-core/v4l2-flash-led-class.c 	sd = &v4l2_flash->sd;
sd                697 drivers/media/v4l2-core/v4l2-flash-led-class.c 	v4l2_async_unregister_subdev(sd);
sd                699 drivers/media/v4l2-core/v4l2-flash-led-class.c 	fwnode_handle_put(sd->fwnode);
sd                701 drivers/media/v4l2-core/v4l2-flash-led-class.c 	v4l2_ctrl_handler_free(sd->ctrl_handler);
sd                702 drivers/media/v4l2-core/v4l2-flash-led-class.c 	media_entity_cleanup(&sd->entity);
sd               1123 drivers/media/v4l2-core/v4l2-fwnode.c int v4l2_async_register_subdev_sensor_common(struct v4l2_subdev *sd)
sd               1128 drivers/media/v4l2-core/v4l2-fwnode.c 	if (WARN_ON(!sd->dev))
sd               1137 drivers/media/v4l2-core/v4l2-fwnode.c 	ret = v4l2_async_notifier_parse_fwnode_sensor_common(sd->dev,
sd               1142 drivers/media/v4l2-core/v4l2-fwnode.c 	ret = v4l2_async_subdev_notifier_register(sd, notifier);
sd               1146 drivers/media/v4l2-core/v4l2-fwnode.c 	ret = v4l2_async_register_subdev(sd);
sd               1150 drivers/media/v4l2-core/v4l2-fwnode.c 	sd->subdev_notifier = notifier;
sd               1165 drivers/media/v4l2-core/v4l2-fwnode.c int v4l2_async_register_fwnode_subdev(struct v4l2_subdev *sd,
sd               1172 drivers/media/v4l2-core/v4l2-fwnode.c 	struct device *dev = sd->dev;
sd               1205 drivers/media/v4l2-core/v4l2-fwnode.c 	ret = v4l2_async_subdev_notifier_register(sd, notifier);
sd               1209 drivers/media/v4l2-core/v4l2-fwnode.c 	ret = v4l2_async_register_subdev(sd);
sd               1213 drivers/media/v4l2-core/v4l2-fwnode.c 	sd->subdev_notifier = notifier;
sd                 11 drivers/media/v4l2-core/v4l2-i2c.c void v4l2_i2c_subdev_unregister(struct v4l2_subdev *sd)
sd                 13 drivers/media/v4l2-core/v4l2-i2c.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                 31 drivers/media/v4l2-core/v4l2-i2c.c void v4l2_i2c_subdev_set_name(struct v4l2_subdev *sd,
sd                 40 drivers/media/v4l2-core/v4l2-i2c.c 	snprintf(sd->name, sizeof(sd->name), "%s%s %d-%04x", devname, postfix,
sd                 45 drivers/media/v4l2-core/v4l2-i2c.c void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client,
sd                 48 drivers/media/v4l2-core/v4l2-i2c.c 	v4l2_subdev_init(sd, ops);
sd                 49 drivers/media/v4l2-core/v4l2-i2c.c 	sd->flags |= V4L2_SUBDEV_FL_IS_I2C;
sd                 51 drivers/media/v4l2-core/v4l2-i2c.c 	sd->owner = client->dev.driver->owner;
sd                 52 drivers/media/v4l2-core/v4l2-i2c.c 	sd->dev = &client->dev;
sd                 54 drivers/media/v4l2-core/v4l2-i2c.c 	v4l2_set_subdevdata(sd, client);
sd                 55 drivers/media/v4l2-core/v4l2-i2c.c 	i2c_set_clientdata(client, sd);
sd                 56 drivers/media/v4l2-core/v4l2-i2c.c 	v4l2_i2c_subdev_set_name(sd, client, NULL, NULL);
sd                 67 drivers/media/v4l2-core/v4l2-i2c.c 	struct v4l2_subdev *sd = NULL;
sd                 97 drivers/media/v4l2-core/v4l2-i2c.c 	sd = i2c_get_clientdata(client);
sd                103 drivers/media/v4l2-core/v4l2-i2c.c 	if (v4l2_device_register_subdev(v4l2_dev, sd))
sd                104 drivers/media/v4l2-core/v4l2-i2c.c 		sd = NULL;
sd                113 drivers/media/v4l2-core/v4l2-i2c.c 	if (client && !sd)
sd                115 drivers/media/v4l2-core/v4l2-i2c.c 	return sd;
sd                141 drivers/media/v4l2-core/v4l2-i2c.c unsigned short v4l2_i2c_subdev_addr(struct v4l2_subdev *sd)
sd                143 drivers/media/v4l2-core/v4l2-i2c.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               2434 drivers/media/v4l2-core/v4l2-ioctl.c 	struct v4l2_subdev *sd;
sd               2442 drivers/media/v4l2-core/v4l2-ioctl.c 		v4l2_device_for_each_subdev(sd, vfd->v4l2_dev)
sd               2444 drivers/media/v4l2-core/v4l2-ioctl.c 				return v4l2_subdev_call(sd, core, g_register, p);
sd               2462 drivers/media/v4l2-core/v4l2-ioctl.c 	struct v4l2_subdev *sd;
sd               2470 drivers/media/v4l2-core/v4l2-ioctl.c 		v4l2_device_for_each_subdev(sd, vfd->v4l2_dev)
sd               2472 drivers/media/v4l2-core/v4l2-ioctl.c 				return v4l2_subdev_call(sd, core, s_register, p);
sd               2490 drivers/media/v4l2-core/v4l2-ioctl.c 	struct v4l2_subdev *sd;
sd               2509 drivers/media/v4l2-core/v4l2-ioctl.c 		v4l2_device_for_each_subdev(sd, vfd->v4l2_dev) {
sd               2512 drivers/media/v4l2-core/v4l2-ioctl.c 			if (sd->ops->core && sd->ops->core->s_register)
sd               2514 drivers/media/v4l2-core/v4l2-ioctl.c 			if (sd->ops->core && sd->ops->core->g_register)
sd               2516 drivers/media/v4l2-core/v4l2-ioctl.c 			strscpy(p->name, sd->name, sizeof(p->name));
sd                 11 drivers/media/v4l2-core/v4l2-spi.c void v4l2_spi_subdev_unregister(struct v4l2_subdev *sd)
sd                 13 drivers/media/v4l2-core/v4l2-spi.c 	struct spi_device *spi = v4l2_get_subdevdata(sd);
sd                 19 drivers/media/v4l2-core/v4l2-spi.c void v4l2_spi_subdev_init(struct v4l2_subdev *sd, struct spi_device *spi,
sd                 22 drivers/media/v4l2-core/v4l2-spi.c 	v4l2_subdev_init(sd, ops);
sd                 23 drivers/media/v4l2-core/v4l2-spi.c 	sd->flags |= V4L2_SUBDEV_FL_IS_SPI;
sd                 25 drivers/media/v4l2-core/v4l2-spi.c 	sd->owner = spi->dev.driver->owner;
sd                 26 drivers/media/v4l2-core/v4l2-spi.c 	sd->dev = &spi->dev;
sd                 28 drivers/media/v4l2-core/v4l2-spi.c 	v4l2_set_subdevdata(sd, spi);
sd                 29 drivers/media/v4l2-core/v4l2-spi.c 	spi_set_drvdata(spi, sd);
sd                 31 drivers/media/v4l2-core/v4l2-spi.c 	snprintf(sd->name, sizeof(sd->name), "%s %s",
sd                 40 drivers/media/v4l2-core/v4l2-spi.c 	struct v4l2_subdev *sd = NULL;
sd                 56 drivers/media/v4l2-core/v4l2-spi.c 	sd = spi_get_drvdata(spi);
sd                 62 drivers/media/v4l2-core/v4l2-spi.c 	if (v4l2_device_register_subdev(v4l2_dev, sd))
sd                 63 drivers/media/v4l2-core/v4l2-spi.c 		sd = NULL;
sd                 73 drivers/media/v4l2-core/v4l2-spi.c 	if (!sd)
sd                 76 drivers/media/v4l2-core/v4l2-spi.c 	return sd;
sd                 25 drivers/media/v4l2-core/v4l2-subdev.c static int subdev_fh_init(struct v4l2_subdev_fh *fh, struct v4l2_subdev *sd)
sd                 28 drivers/media/v4l2-core/v4l2-subdev.c 	if (sd->entity.num_pads) {
sd                 29 drivers/media/v4l2-core/v4l2-subdev.c 		fh->pad = v4l2_subdev_alloc_pad_config(sd);
sd                 48 drivers/media/v4l2-core/v4l2-subdev.c 	struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
sd                 56 drivers/media/v4l2-core/v4l2-subdev.c 	ret = subdev_fh_init(subdev_fh, sd);
sd                 66 drivers/media/v4l2-core/v4l2-subdev.c 	if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
sd                 69 drivers/media/v4l2-core/v4l2-subdev.c 		owner = sd->entity.graph_obj.mdev->dev->driver->owner;
sd                 78 drivers/media/v4l2-core/v4l2-subdev.c 	if (sd->internal_ops && sd->internal_ops->open) {
sd                 79 drivers/media/v4l2-core/v4l2-subdev.c 		ret = sd->internal_ops->open(sd, subdev_fh);
sd                 99 drivers/media/v4l2-core/v4l2-subdev.c 	struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
sd                103 drivers/media/v4l2-core/v4l2-subdev.c 	if (sd->internal_ops && sd->internal_ops->close)
sd                104 drivers/media/v4l2-core/v4l2-subdev.c 		sd->internal_ops->close(sd, subdev_fh);
sd                124 drivers/media/v4l2-core/v4l2-subdev.c static inline int check_pad(struct v4l2_subdev *sd, __u32 pad)
sd                127 drivers/media/v4l2-core/v4l2-subdev.c 	if (sd->entity.num_pads) {
sd                128 drivers/media/v4l2-core/v4l2-subdev.c 		if (pad >= sd->entity.num_pads)
sd                147 drivers/media/v4l2-core/v4l2-subdev.c static inline int check_format(struct v4l2_subdev *sd,
sd                154 drivers/media/v4l2-core/v4l2-subdev.c 	return check_which(format->which) ? : check_pad(sd, format->pad) ? :
sd                158 drivers/media/v4l2-core/v4l2-subdev.c static int call_get_fmt(struct v4l2_subdev *sd,
sd                162 drivers/media/v4l2-core/v4l2-subdev.c 	return check_format(sd, cfg, format) ? :
sd                163 drivers/media/v4l2-core/v4l2-subdev.c 	       sd->ops->pad->get_fmt(sd, cfg, format);
sd                166 drivers/media/v4l2-core/v4l2-subdev.c static int call_set_fmt(struct v4l2_subdev *sd,
sd                170 drivers/media/v4l2-core/v4l2-subdev.c 	return check_format(sd, cfg, format) ? :
sd                171 drivers/media/v4l2-core/v4l2-subdev.c 	       sd->ops->pad->set_fmt(sd, cfg, format);
sd                174 drivers/media/v4l2-core/v4l2-subdev.c static int call_enum_mbus_code(struct v4l2_subdev *sd,
sd                181 drivers/media/v4l2-core/v4l2-subdev.c 	return check_which(code->which) ? : check_pad(sd, code->pad) ? :
sd                183 drivers/media/v4l2-core/v4l2-subdev.c 	       sd->ops->pad->enum_mbus_code(sd, cfg, code);
sd                186 drivers/media/v4l2-core/v4l2-subdev.c static int call_enum_frame_size(struct v4l2_subdev *sd,
sd                193 drivers/media/v4l2-core/v4l2-subdev.c 	return check_which(fse->which) ? : check_pad(sd, fse->pad) ? :
sd                195 drivers/media/v4l2-core/v4l2-subdev.c 	       sd->ops->pad->enum_frame_size(sd, cfg, fse);
sd                198 drivers/media/v4l2-core/v4l2-subdev.c static inline int check_frame_interval(struct v4l2_subdev *sd,
sd                204 drivers/media/v4l2-core/v4l2-subdev.c 	return check_pad(sd, fi->pad);
sd                207 drivers/media/v4l2-core/v4l2-subdev.c static int call_g_frame_interval(struct v4l2_subdev *sd,
sd                210 drivers/media/v4l2-core/v4l2-subdev.c 	return check_frame_interval(sd, fi) ? :
sd                211 drivers/media/v4l2-core/v4l2-subdev.c 	       sd->ops->video->g_frame_interval(sd, fi);
sd                214 drivers/media/v4l2-core/v4l2-subdev.c static int call_s_frame_interval(struct v4l2_subdev *sd,
sd                217 drivers/media/v4l2-core/v4l2-subdev.c 	return check_frame_interval(sd, fi) ? :
sd                218 drivers/media/v4l2-core/v4l2-subdev.c 	       sd->ops->video->s_frame_interval(sd, fi);
sd                221 drivers/media/v4l2-core/v4l2-subdev.c static int call_enum_frame_interval(struct v4l2_subdev *sd,
sd                228 drivers/media/v4l2-core/v4l2-subdev.c 	return check_which(fie->which) ? : check_pad(sd, fie->pad) ? :
sd                230 drivers/media/v4l2-core/v4l2-subdev.c 	       sd->ops->pad->enum_frame_interval(sd, cfg, fie);
sd                233 drivers/media/v4l2-core/v4l2-subdev.c static inline int check_selection(struct v4l2_subdev *sd,
sd                240 drivers/media/v4l2-core/v4l2-subdev.c 	return check_which(sel->which) ? : check_pad(sd, sel->pad) ? :
sd                244 drivers/media/v4l2-core/v4l2-subdev.c static int call_get_selection(struct v4l2_subdev *sd,
sd                248 drivers/media/v4l2-core/v4l2-subdev.c 	return check_selection(sd, cfg, sel) ? :
sd                249 drivers/media/v4l2-core/v4l2-subdev.c 	       sd->ops->pad->get_selection(sd, cfg, sel);
sd                252 drivers/media/v4l2-core/v4l2-subdev.c static int call_set_selection(struct v4l2_subdev *sd,
sd                256 drivers/media/v4l2-core/v4l2-subdev.c 	return check_selection(sd, cfg, sel) ? :
sd                257 drivers/media/v4l2-core/v4l2-subdev.c 	       sd->ops->pad->set_selection(sd, cfg, sel);
sd                260 drivers/media/v4l2-core/v4l2-subdev.c static inline int check_edid(struct v4l2_subdev *sd,
sd                269 drivers/media/v4l2-core/v4l2-subdev.c 	return check_pad(sd, edid->pad);
sd                272 drivers/media/v4l2-core/v4l2-subdev.c static int call_get_edid(struct v4l2_subdev *sd, struct v4l2_subdev_edid *edid)
sd                274 drivers/media/v4l2-core/v4l2-subdev.c 	return check_edid(sd, edid) ? : sd->ops->pad->get_edid(sd, edid);
sd                277 drivers/media/v4l2-core/v4l2-subdev.c static int call_set_edid(struct v4l2_subdev *sd, struct v4l2_subdev_edid *edid)
sd                279 drivers/media/v4l2-core/v4l2-subdev.c 	return check_edid(sd, edid) ? : sd->ops->pad->set_edid(sd, edid);
sd                282 drivers/media/v4l2-core/v4l2-subdev.c static int call_dv_timings_cap(struct v4l2_subdev *sd,
sd                288 drivers/media/v4l2-core/v4l2-subdev.c 	return check_pad(sd, cap->pad) ? :
sd                289 drivers/media/v4l2-core/v4l2-subdev.c 	       sd->ops->pad->dv_timings_cap(sd, cap);
sd                292 drivers/media/v4l2-core/v4l2-subdev.c static int call_enum_dv_timings(struct v4l2_subdev *sd,
sd                298 drivers/media/v4l2-core/v4l2-subdev.c 	return check_pad(sd, dvt->pad) ? :
sd                299 drivers/media/v4l2-core/v4l2-subdev.c 	       sd->ops->pad->enum_dv_timings(sd, dvt);
sd                330 drivers/media/v4l2-core/v4l2-subdev.c 	struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
sd                375 drivers/media/v4l2-core/v4l2-subdev.c 					vdev, sd->v4l2_dev->mdev, arg);
sd                381 drivers/media/v4l2-core/v4l2-subdev.c 					vdev, sd->v4l2_dev->mdev, arg);
sd                387 drivers/media/v4l2-core/v4l2-subdev.c 					  vdev, sd->v4l2_dev->mdev, arg);
sd                390 drivers/media/v4l2-core/v4l2-subdev.c 		if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS))
sd                396 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, core, subscribe_event, vfh, arg);
sd                399 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, core, unsubscribe_event, vfh, arg);
sd                408 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, core, g_register, p);
sd                416 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, core, s_register, p);
sd                424 drivers/media/v4l2-core/v4l2-subdev.c 		if (sd->ops->core && sd->ops->core->s_register)
sd                426 drivers/media/v4l2-core/v4l2-subdev.c 		if (sd->ops->core && sd->ops->core->g_register)
sd                428 drivers/media/v4l2-core/v4l2-subdev.c 		strscpy(p->name, sd->name, sizeof(p->name));
sd                437 drivers/media/v4l2-core/v4l2-subdev.c 			sd->name);
sd                438 drivers/media/v4l2-core/v4l2-subdev.c 		ret = v4l2_subdev_call(sd, core, log_status);
sd                440 drivers/media/v4l2-core/v4l2-subdev.c 			sd->name);
sd                450 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, pad, get_fmt, subdev_fh->pad, format);
sd                458 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, pad, set_fmt, subdev_fh->pad, format);
sd                472 drivers/media/v4l2-core/v4l2-subdev.c 			sd, pad, get_selection, subdev_fh->pad, &sel);
sd                491 drivers/media/v4l2-core/v4l2-subdev.c 			sd, pad, set_selection, subdev_fh->pad, &sel);
sd                502 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, pad, enum_mbus_code, subdev_fh->pad,
sd                510 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, pad, enum_frame_size, subdev_fh->pad,
sd                518 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, video, g_frame_interval, arg);
sd                525 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, video, s_frame_interval, arg);
sd                532 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, pad, enum_frame_interval, subdev_fh->pad,
sd                541 drivers/media/v4l2-core/v4l2-subdev.c 			sd, pad, get_selection, subdev_fh->pad, sel);
sd                549 drivers/media/v4l2-core/v4l2-subdev.c 			sd, pad, set_selection, subdev_fh->pad, sel);
sd                555 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, pad, get_edid, edid);
sd                561 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, pad, set_edid, edid);
sd                567 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, pad, dv_timings_cap, cap);
sd                573 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, pad, enum_dv_timings, dvt);
sd                577 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, video, query_dv_timings, arg);
sd                580 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, video, g_dv_timings, arg);
sd                583 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, video, s_dv_timings, arg);
sd                586 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, video, g_std, arg);
sd                591 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, video, s_std, *std);
sd                598 drivers/media/v4l2-core/v4l2-subdev.c 		if (v4l2_subdev_call(sd, video, g_tvnorms, &id))
sd                605 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, video, querystd, arg);
sd                608 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, core, ioctl, cmd, arg);
sd                640 drivers/media/v4l2-core/v4l2-subdev.c 	struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
sd                642 drivers/media/v4l2-core/v4l2-subdev.c 	return v4l2_subdev_call(sd, core, compat_ioctl32, cmd, arg);
sd                649 drivers/media/v4l2-core/v4l2-subdev.c 	struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
sd                652 drivers/media/v4l2-core/v4l2-subdev.c 	if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS))
sd                675 drivers/media/v4l2-core/v4l2-subdev.c int v4l2_subdev_link_validate_default(struct v4l2_subdev *sd,
sd                703 drivers/media/v4l2-core/v4l2-subdev.c 		struct v4l2_subdev *sd =
sd                708 drivers/media/v4l2-core/v4l2-subdev.c 		return v4l2_subdev_call(sd, pad, get_fmt, NULL, fmt);
sd                747 drivers/media/v4l2-core/v4l2-subdev.c v4l2_subdev_alloc_pad_config(struct v4l2_subdev *sd)
sd                752 drivers/media/v4l2-core/v4l2-subdev.c 	if (!sd->entity.num_pads)
sd                755 drivers/media/v4l2-core/v4l2-subdev.c 	cfg = kvmalloc_array(sd->entity.num_pads, sizeof(*cfg),
sd                760 drivers/media/v4l2-core/v4l2-subdev.c 	ret = v4l2_subdev_call(sd, pad, init_cfg, cfg);
sd                777 drivers/media/v4l2-core/v4l2-subdev.c void v4l2_subdev_init(struct v4l2_subdev *sd, const struct v4l2_subdev_ops *ops)
sd                779 drivers/media/v4l2-core/v4l2-subdev.c 	INIT_LIST_HEAD(&sd->list);
sd                781 drivers/media/v4l2-core/v4l2-subdev.c 	sd->ops = ops;
sd                782 drivers/media/v4l2-core/v4l2-subdev.c 	sd->v4l2_dev = NULL;
sd                783 drivers/media/v4l2-core/v4l2-subdev.c 	sd->flags = 0;
sd                784 drivers/media/v4l2-core/v4l2-subdev.c 	sd->name[0] = '\0';
sd                785 drivers/media/v4l2-core/v4l2-subdev.c 	sd->grp_id = 0;
sd                786 drivers/media/v4l2-core/v4l2-subdev.c 	sd->dev_priv = NULL;
sd                787 drivers/media/v4l2-core/v4l2-subdev.c 	sd->host_priv = NULL;
sd                789 drivers/media/v4l2-core/v4l2-subdev.c 	sd->entity.name = sd->name;
sd                790 drivers/media/v4l2-core/v4l2-subdev.c 	sd->entity.obj_type = MEDIA_ENTITY_TYPE_V4L2_SUBDEV;
sd                791 drivers/media/v4l2-core/v4l2-subdev.c 	sd->entity.function = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN;
sd                796 drivers/media/v4l2-core/v4l2-subdev.c void v4l2_subdev_notify_event(struct v4l2_subdev *sd,
sd                799 drivers/media/v4l2-core/v4l2-subdev.c 	v4l2_event_queue(sd->devnode, ev);
sd                800 drivers/media/v4l2-core/v4l2-subdev.c 	v4l2_subdev_notify(sd, V4L2_DEVICE_NOTIFY_EVENT, (void *)ev);
sd                556 drivers/mfd/sta2x11-mfd.c 			      struct sta2x11_mfd_setup_data *sd)
sd                559 drivers/mfd/sta2x11-mfd.c 	for (i = 0; i < ARRAY_SIZE(sd->bars); i++)
sd                560 drivers/mfd/sta2x11-mfd.c 		for (j = 0; j < sd->bars[i].ncells; j++) {
sd                561 drivers/mfd/sta2x11-mfd.c 			sd->bars[i].cells[j].pdata_size = sizeof(pdev);
sd                562 drivers/mfd/sta2x11-mfd.c 			sd->bars[i].cells[j].platform_data = &pdev;
sd                198 drivers/misc/enclosure.c 	if (cdev->dev->kobj.sd)
sd                201 drivers/misc/enclosure.c 	if (cdev->cdev.kobj.sd)
sd                266 drivers/misc/mic/cosm/cosm_main.c 	cdev->state_sysfs = sysfs_get_dirent(cdev->sdev->kobj.sd,
sd                412 drivers/net/ethernet/chelsio/cxgb3/sge.c 				 struct rx_desc *d, struct rx_sw_desc *sd,
sd                421 drivers/net/ethernet/chelsio/cxgb3/sge.c 	dma_unmap_addr_set(sd, dma_addr, mapping);
sd                443 drivers/net/ethernet/chelsio/cxgb3/sge.c 			  struct rx_sw_desc *sd, gfp_t gfp,
sd                465 drivers/net/ethernet/chelsio/cxgb3/sge.c 	sd->pg_chunk = q->pg_chunk;
sd                467 drivers/net/ethernet/chelsio/cxgb3/sge.c 	prefetch(sd->pg_chunk.p_cnt);
sd                477 drivers/net/ethernet/chelsio/cxgb3/sge.c 	if (sd->pg_chunk.offset == 0)
sd                478 drivers/net/ethernet/chelsio/cxgb3/sge.c 		*sd->pg_chunk.p_cnt = 1;
sd                480 drivers/net/ethernet/chelsio/cxgb3/sge.c 		*sd->pg_chunk.p_cnt += 1;
sd                507 drivers/net/ethernet/chelsio/cxgb3/sge.c 	struct rx_sw_desc *sd = &q->sdesc[q->pidx];
sd                516 drivers/net/ethernet/chelsio/cxgb3/sge.c 			if (unlikely(alloc_pg_chunk(adap, q, sd, gfp,
sd                521 drivers/net/ethernet/chelsio/cxgb3/sge.c 			mapping = sd->pg_chunk.mapping + sd->pg_chunk.offset;
sd                522 drivers/net/ethernet/chelsio/cxgb3/sge.c 			dma_unmap_addr_set(sd, dma_addr, mapping);
sd                535 drivers/net/ethernet/chelsio/cxgb3/sge.c 			sd->skb = skb;
sd                537 drivers/net/ethernet/chelsio/cxgb3/sge.c 			err = add_one_rx_buf(buf_start, q->buf_size, d, sd,
sd                540 drivers/net/ethernet/chelsio/cxgb3/sge.c 				clear_rx_desc(adap->pdev, q, sd);
sd                546 drivers/net/ethernet/chelsio/cxgb3/sge.c 		sd++;
sd                550 drivers/net/ethernet/chelsio/cxgb3/sge.c 			sd = q->sdesc;
sd                787 drivers/net/ethernet/chelsio/cxgb3/sge.c 	struct rx_sw_desc *sd = &fl->sdesc[fl->cidx];
sd                789 drivers/net/ethernet/chelsio/cxgb3/sge.c 	prefetch(sd->skb->data);
sd                797 drivers/net/ethernet/chelsio/cxgb3/sge.c 					    dma_unmap_addr(sd, dma_addr), len,
sd                799 drivers/net/ethernet/chelsio/cxgb3/sge.c 			memcpy(skb->data, sd->skb->data, len);
sd                801 drivers/net/ethernet/chelsio/cxgb3/sge.c 					    dma_unmap_addr(sd, dma_addr), len,
sd                816 drivers/net/ethernet/chelsio/cxgb3/sge.c 	pci_unmap_single(adap->pdev, dma_unmap_addr(sd, dma_addr),
sd                818 drivers/net/ethernet/chelsio/cxgb3/sge.c 	skb = sd->skb;
sd                847 drivers/net/ethernet/chelsio/cxgb3/sge.c 	struct rx_sw_desc *sd = &fl->sdesc[fl->cidx];
sd                849 drivers/net/ethernet/chelsio/cxgb3/sge.c 	dma_addr_t dma_addr = dma_unmap_addr(sd, dma_addr);
sd                858 drivers/net/ethernet/chelsio/cxgb3/sge.c 			memcpy(newskb->data, sd->pg_chunk.va, len);
sd                874 drivers/net/ethernet/chelsio/cxgb3/sge.c 	prefetch(sd->pg_chunk.p_cnt);
sd                887 drivers/net/ethernet/chelsio/cxgb3/sge.c 	(*sd->pg_chunk.p_cnt)--;
sd                888 drivers/net/ethernet/chelsio/cxgb3/sge.c 	if (!*sd->pg_chunk.p_cnt && sd->pg_chunk.page != fl->pg_chunk.page)
sd                890 drivers/net/ethernet/chelsio/cxgb3/sge.c 			       sd->pg_chunk.mapping,
sd                895 drivers/net/ethernet/chelsio/cxgb3/sge.c 		memcpy(newskb->data, sd->pg_chunk.va, SGE_RX_PULL_LEN);
sd                896 drivers/net/ethernet/chelsio/cxgb3/sge.c 		skb_fill_page_desc(newskb, 0, sd->pg_chunk.page,
sd                897 drivers/net/ethernet/chelsio/cxgb3/sge.c 				   sd->pg_chunk.offset + SGE_RX_PULL_LEN,
sd                904 drivers/net/ethernet/chelsio/cxgb3/sge.c 				   sd->pg_chunk.page,
sd                905 drivers/net/ethernet/chelsio/cxgb3/sge.c 				   sd->pg_chunk.offset, len);
sd               1100 drivers/net/ethernet/chelsio/cxgb3/sge.c 	struct tx_sw_desc *sd = &q->sdesc[pidx];
sd               1102 drivers/net/ethernet/chelsio/cxgb3/sge.c 	sd->skb = skb;
sd               1104 drivers/net/ethernet/chelsio/cxgb3/sge.c 		sd->fragidx = 0;
sd               1105 drivers/net/ethernet/chelsio/cxgb3/sge.c 		sd->addr_idx = 0;
sd               1106 drivers/net/ethernet/chelsio/cxgb3/sge.c 		sd->sflit = flits;
sd               1110 drivers/net/ethernet/chelsio/cxgb3/sge.c 		sd->eop = 1;
sd               1138 drivers/net/ethernet/chelsio/cxgb3/sge.c 			sd->eop = 0;
sd               1139 drivers/net/ethernet/chelsio/cxgb3/sge.c 			sd++;
sd               1144 drivers/net/ethernet/chelsio/cxgb3/sge.c 				sd = q->sdesc;
sd               1147 drivers/net/ethernet/chelsio/cxgb3/sge.c 			sd->skb = skb;
sd               1157 drivers/net/ethernet/chelsio/cxgb3/sge.c 		sd->eop = 1;
sd               2131 drivers/net/ethernet/chelsio/cxgb3/sge.c 	struct rx_sw_desc *sd = &fl->sdesc[fl->cidx];
sd               2147 drivers/net/ethernet/chelsio/cxgb3/sge.c 				    dma_unmap_addr(sd, dma_addr),
sd               2151 drivers/net/ethernet/chelsio/cxgb3/sge.c 	(*sd->pg_chunk.p_cnt)--;
sd               2152 drivers/net/ethernet/chelsio/cxgb3/sge.c 	if (!*sd->pg_chunk.p_cnt && sd->pg_chunk.page != fl->pg_chunk.page)
sd               2154 drivers/net/ethernet/chelsio/cxgb3/sge.c 			       sd->pg_chunk.mapping,
sd               2159 drivers/net/ethernet/chelsio/cxgb3/sge.c 		put_page(sd->pg_chunk.page);
sd               2170 drivers/net/ethernet/chelsio/cxgb3/sge.c 		cpl = qs->lro_va = sd->pg_chunk.va + 2;
sd               2184 drivers/net/ethernet/chelsio/cxgb3/sge.c 	__skb_frag_set_page(rx_frag, sd->pg_chunk.page);
sd               2185 drivers/net/ethernet/chelsio/cxgb3/sge.c 	skb_frag_off_set(rx_frag, sd->pg_chunk.offset + offset);
sd                570 drivers/net/ethernet/chelsio/cxgb4/sge.c static inline void set_rx_sw_desc(struct rx_sw_desc *sd, struct page *pg,
sd                573 drivers/net/ethernet/chelsio/cxgb4/sge.c 	sd->page = pg;
sd                574 drivers/net/ethernet/chelsio/cxgb4/sge.c 	sd->dma_addr = mapping;      /* includes size low bits */
sd                599 drivers/net/ethernet/chelsio/cxgb4/sge.c 	struct rx_sw_desc *sd = &q->sdesc[q->pidx];
sd                634 drivers/net/ethernet/chelsio/cxgb4/sge.c 		set_rx_sw_desc(sd, pg, mapping);
sd                635 drivers/net/ethernet/chelsio/cxgb4/sge.c 		sd++;
sd                640 drivers/net/ethernet/chelsio/cxgb4/sge.c 			sd = q->sdesc;
sd                663 drivers/net/ethernet/chelsio/cxgb4/sge.c 		set_rx_sw_desc(sd, pg, mapping);
sd                664 drivers/net/ethernet/chelsio/cxgb4/sge.c 		sd++;
sd                669 drivers/net/ethernet/chelsio/cxgb4/sge.c 			sd = q->sdesc;
sd               1215 drivers/net/ethernet/via/via-rhine.c 				     struct rhine_skb_dma *sd)
sd               1221 drivers/net/ethernet/via/via-rhine.c 	sd->skb = netdev_alloc_skb(dev, size);
sd               1222 drivers/net/ethernet/via/via-rhine.c 	if (!sd->skb)
sd               1225 drivers/net/ethernet/via/via-rhine.c 	sd->dma = dma_map_single(hwdev, sd->skb->data, size, DMA_FROM_DEVICE);
sd               1226 drivers/net/ethernet/via/via-rhine.c 	if (unlikely(dma_mapping_error(hwdev, sd->dma))) {
sd               1228 drivers/net/ethernet/via/via-rhine.c 		dev_kfree_skb_any(sd->skb);
sd               1246 drivers/net/ethernet/via/via-rhine.c 					   struct rhine_skb_dma *sd, int entry)
sd               1248 drivers/net/ethernet/via/via-rhine.c 	rp->rx_skbuff_dma[entry] = sd->dma;
sd               1249 drivers/net/ethernet/via/via-rhine.c 	rp->rx_skbuff[entry] = sd->skb;
sd               1251 drivers/net/ethernet/via/via-rhine.c 	rp->rx_ring[entry].addr = cpu_to_le32(sd->dma);
sd               1279 drivers/net/ethernet/via/via-rhine.c 		struct rhine_skb_dma sd;
sd               1281 drivers/net/ethernet/via/via-rhine.c 		rc = rhine_skb_dma_init(dev, &sd);
sd               1287 drivers/net/ethernet/via/via-rhine.c 		rhine_skb_dma_nic_store(rp, &sd, i);
sd               2116 drivers/net/ethernet/via/via-rhine.c 				struct rhine_skb_dma sd;
sd               2118 drivers/net/ethernet/via/via-rhine.c 				if (unlikely(rhine_skb_dma_init(dev, &sd) < 0))
sd               2127 drivers/net/ethernet/via/via-rhine.c 				rhine_skb_dma_nic_store(rp, &sd, entry);
sd                790 drivers/net/fddi/defza.h 	u8 sd;				/* starting delimiter */
sd                713 drivers/net/phy/mscc.c 	u32 vdd, sd;
sd                725 drivers/net/phy/mscc.c 	if (of_property_read_u32(of_node, "vsc8531,edge-slowdown", &sd))
sd                726 drivers/net/phy/mscc.c 		sd = 0;
sd                731 drivers/net/phy/mscc.c 				if (edge_table[i].slowdown[j] == sd)
sd               1315 drivers/net/wireless/intersil/orinoco/main.c 	struct orinoco_scan_data *sd;
sd               1318 drivers/net/wireless/intersil/orinoco/main.c 	sd = kmalloc(sizeof(*sd), GFP_ATOMIC);
sd               1319 drivers/net/wireless/intersil/orinoco/main.c 	if (!sd)
sd               1322 drivers/net/wireless/intersil/orinoco/main.c 	sd->buf = buf;
sd               1323 drivers/net/wireless/intersil/orinoco/main.c 	sd->len = len;
sd               1324 drivers/net/wireless/intersil/orinoco/main.c 	sd->type = type;
sd               1327 drivers/net/wireless/intersil/orinoco/main.c 	list_add_tail(&sd->list, &priv->scan_list);
sd               1335 drivers/net/wireless/intersil/orinoco/main.c 	struct orinoco_scan_data *sd;
sd               1338 drivers/net/wireless/intersil/orinoco/main.c 	sd = kmalloc(sizeof(*sd), GFP_ATOMIC);
sd               1339 drivers/net/wireless/intersil/orinoco/main.c 	if (!sd)
sd               1342 drivers/net/wireless/intersil/orinoco/main.c 	sd->len = -1; /* Abort */
sd               1345 drivers/net/wireless/intersil/orinoco/main.c 	list_add_tail(&sd->list, &priv->scan_list);
sd               1355 drivers/net/wireless/intersil/orinoco/main.c 	struct orinoco_scan_data *sd, *temp;
sd               1362 drivers/net/wireless/intersil/orinoco/main.c 	list_for_each_entry_safe(sd, temp, &priv->scan_list, list) {
sd               1364 drivers/net/wireless/intersil/orinoco/main.c 		buf = sd->buf;
sd               1365 drivers/net/wireless/intersil/orinoco/main.c 		len = sd->len;
sd               1366 drivers/net/wireless/intersil/orinoco/main.c 		type = sd->type;
sd               1368 drivers/net/wireless/intersil/orinoco/main.c 		list_del(&sd->list);
sd               1370 drivers/net/wireless/intersil/orinoco/main.c 		kfree(sd);
sd               2308 drivers/net/wireless/intersil/orinoco/main.c 	struct orinoco_scan_data *sd, *sdtemp;
sd               2326 drivers/net/wireless/intersil/orinoco/main.c 	list_for_each_entry_safe(sd, sdtemp, &priv->scan_list, list) {
sd               2327 drivers/net/wireless/intersil/orinoco/main.c 		list_del(&sd->list);
sd               2329 drivers/net/wireless/intersil/orinoco/main.c 		if (sd->len > 0)
sd               2330 drivers/net/wireless/intersil/orinoco/main.c 			kfree(sd->buf);
sd               2331 drivers/net/wireless/intersil/orinoco/main.c 		kfree(sd);
sd                522 drivers/nvdimm/dimm_devs.c 	nvdimm->sec.overwrite_state = sysfs_get_dirent(dev->kobj.sd, "security");
sd                483 drivers/nvdimm/pmem.c 	pmem->bb_state = sysfs_get_dirent(disk_to_dev(disk)->kobj.sd,
sd                 42 drivers/nvdimm/region.c 		nd_region->bb_state = sysfs_get_dirent(nd_region->dev.kobj.sd,
sd                 47 drivers/of/kobj.c 	while (i < 16 && (kn = sysfs_get_dirent(kobj->sd, name))) {
sd                564 drivers/pci/controller/vmd.c 	struct pci_sysdata *sd = &vmd->sysdata;
sd                668 drivers/pci/controller/vmd.c 	sd->vmd_domain = true;
sd                669 drivers/pci/controller/vmd.c 	sd->domain = vmd_find_free_domain();
sd                670 drivers/pci/controller/vmd.c 	if (sd->domain < 0)
sd                671 drivers/pci/controller/vmd.c 		return sd->domain;
sd                673 drivers/pci/controller/vmd.c 	sd->node = pcibus_to_node(vmd->dev->bus);
sd                690 drivers/pci/controller/vmd.c 				       &vmd_ops, sd, &resources);
sd                231 drivers/pci/iov.c 	if (virtfn->dev.kobj.sd)
sd                 57 drivers/pci/xen-pcifront.c 	struct pci_sysdata sd;
sd                 62 drivers/pci/xen-pcifront.c pcifront_get_pdev(struct pcifront_sd *sd)
sd                 64 drivers/pci/xen-pcifront.c 	return sd->pdev;
sd                 67 drivers/pci/xen-pcifront.c static inline void pcifront_init_sd(struct pcifront_sd *sd,
sd                 72 drivers/pci/xen-pcifront.c 	sd->sd.node = first_online_node;
sd                 73 drivers/pci/xen-pcifront.c 	sd->sd.domain = domain;
sd                 74 drivers/pci/xen-pcifront.c 	sd->pdev = pdev;
sd                190 drivers/pci/xen-pcifront.c 	struct pcifront_sd *sd = bus->sysdata;
sd                191 drivers/pci/xen-pcifront.c 	struct pcifront_device *pdev = pcifront_get_pdev(sd);
sd                229 drivers/pci/xen-pcifront.c 	struct pcifront_sd *sd = bus->sysdata;
sd                230 drivers/pci/xen-pcifront.c 	struct pcifront_device *pdev = pcifront_get_pdev(sd);
sd                260 drivers/pci/xen-pcifront.c 	struct pcifront_sd *sd = dev->bus->sysdata;
sd                261 drivers/pci/xen-pcifront.c 	struct pcifront_device *pdev = pcifront_get_pdev(sd);
sd                312 drivers/pci/xen-pcifront.c 	struct pcifront_sd *sd = dev->bus->sysdata;
sd                313 drivers/pci/xen-pcifront.c 	struct pcifront_device *pdev = pcifront_get_pdev(sd);
sd                331 drivers/pci/xen-pcifront.c 	struct pcifront_sd *sd = dev->bus->sysdata;
sd                332 drivers/pci/xen-pcifront.c 	struct pcifront_device *pdev = pcifront_get_pdev(sd);
sd                360 drivers/pci/xen-pcifront.c 	struct pcifront_sd *sd = dev->bus->sysdata;
sd                361 drivers/pci/xen-pcifront.c 	struct pcifront_device *pdev = pcifront_get_pdev(sd);
sd                450 drivers/pci/xen-pcifront.c 	struct pcifront_sd *sd = NULL;
sd                474 drivers/pci/xen-pcifront.c 	sd = kzalloc(sizeof(*sd), GFP_KERNEL);
sd                475 drivers/pci/xen-pcifront.c 	if (!bus_entry || !sd) {
sd                482 drivers/pci/xen-pcifront.c 	pcifront_init_sd(sd, domain, bus, pdev);
sd                487 drivers/pci/xen-pcifront.c 				  &pcifront_bus_ops, sd, &resources);
sd                516 drivers/pci/xen-pcifront.c 	kfree(sd);
sd                133 drivers/phy/ti/phy-ti-pipe3.c 	u8	sd;
sd                435 drivers/phy/ti/phy-ti-pipe3.c 	val |= dpll_params->sd << PLL_SD_SHIFT;
sd               1416 drivers/pinctrl/sh-pfc/pfc-emev2.c 	SH_PFC_FUNCTION(sd),
sd                694 drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c 	UNIPHIER_PINCTRL_GROUP(sd),
sd                772 drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c 	UNIPHIER_PINMUX_FUNCTION(sd),
sd                637 drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c 	UNIPHIER_PINCTRL_GROUP(sd),
sd                691 drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c 	UNIPHIER_PINMUX_FUNCTION(sd),
sd                850 drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c 	UNIPHIER_PINCTRL_GROUP(sd),
sd                912 drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c 	UNIPHIER_PINMUX_FUNCTION(sd),
sd               1135 drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c 	UNIPHIER_PINCTRL_GROUP(sd),
sd               1205 drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c 	UNIPHIER_PINMUX_FUNCTION(sd),
sd                908 drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c 	UNIPHIER_PINCTRL_GROUP(sd),
sd                975 drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c 	UNIPHIER_PINMUX_FUNCTION(sd),
sd                860 drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c 	UNIPHIER_PINCTRL_GROUP(sd),
sd                933 drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c 	UNIPHIER_PINMUX_FUNCTION(sd),
sd                885 drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c 	UNIPHIER_PINCTRL_GROUP(sd),
sd                941 drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c 	UNIPHIER_PINMUX_FUNCTION(sd),
sd                567 drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c 	UNIPHIER_PINCTRL_GROUP(sd),
sd                623 drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c 	UNIPHIER_PINMUX_FUNCTION(sd),
sd                139 drivers/regulator/as3711-regulator.c 	AS3711_REG(SD_1, SD_CONTROL, 0, 0x7f, sd),
sd                140 drivers/regulator/as3711-regulator.c 	AS3711_REG(SD_2, SD_CONTROL, 1, 0x7f, sd),
sd                141 drivers/regulator/as3711-regulator.c 	AS3711_REG(SD_3, SD_CONTROL, 2, 0x7f, sd),
sd                142 drivers/regulator/as3711-regulator.c 	AS3711_REG(SD_4, SD_CONTROL, 3, 0x7f, sd),
sd                271 drivers/scsi/aic7xxx/aic7770.c 	struct	seeprom_descriptor sd;
sd                276 drivers/scsi/aic7xxx/aic7770.c 	sd.sd_ahc = ahc;
sd                277 drivers/scsi/aic7xxx/aic7770.c 	sd.sd_control_offset = SEECTL_2840;
sd                278 drivers/scsi/aic7xxx/aic7770.c 	sd.sd_status_offset = STATUS_2840;
sd                279 drivers/scsi/aic7xxx/aic7770.c 	sd.sd_dataout_offset = STATUS_2840;		
sd                280 drivers/scsi/aic7xxx/aic7770.c 	sd.sd_chip = C46;
sd                281 drivers/scsi/aic7xxx/aic7770.c 	sd.sd_MS = 0;
sd                282 drivers/scsi/aic7xxx/aic7770.c 	sd.sd_RDY = EEPROM_TF;
sd                283 drivers/scsi/aic7xxx/aic7770.c 	sd.sd_CS = CS_2840;
sd                284 drivers/scsi/aic7xxx/aic7770.c 	sd.sd_CK = CK_2840;
sd                285 drivers/scsi/aic7xxx/aic7770.c 	sd.sd_DO = DO_2840;
sd                286 drivers/scsi/aic7xxx/aic7770.c 	sd.sd_DI = DI_2840;
sd                291 drivers/scsi/aic7xxx/aic7770.c 	have_seeprom = ahc_read_seeprom(&sd, (uint16_t *)sc,
sd               1277 drivers/scsi/aic7xxx/aic7xxx.h 				    struct seeprom_descriptor *sd);
sd               1278 drivers/scsi/aic7xxx/aic7xxx.h void		ahc_release_seeprom(struct seeprom_descriptor *sd);
sd                 95 drivers/scsi/aic7xxx/aic7xxx_93cx6.c #define CLOCK_PULSE(sd, rdy)				\
sd                 96 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	while ((SEEPROM_STATUS_INB(sd) & rdy) == 0) {	\
sd                 99 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	(void)SEEPROM_INB(sd);	/* Clear clock */
sd                105 drivers/scsi/aic7xxx/aic7xxx_93cx6.c send_seeprom_cmd(struct seeprom_descriptor *sd, const struct seeprom_cmd *cmd)
sd                111 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	temp = sd->sd_MS ^ sd->sd_CS;
sd                112 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sd                113 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	CLOCK_PULSE(sd, sd->sd_RDY);
sd                117 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			temp ^= sd->sd_DO;
sd                118 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		SEEPROM_OUTB(sd, temp);
sd                119 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		CLOCK_PULSE(sd, sd->sd_RDY);
sd                120 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sd                121 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		CLOCK_PULSE(sd, sd->sd_RDY);
sd                123 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			temp ^= sd->sd_DO;
sd                131 drivers/scsi/aic7xxx/aic7xxx_93cx6.c reset_seeprom(struct seeprom_descriptor *sd)
sd                135 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	temp = sd->sd_MS;
sd                136 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	SEEPROM_OUTB(sd, temp);
sd                137 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	CLOCK_PULSE(sd, sd->sd_RDY);
sd                138 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sd                139 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	CLOCK_PULSE(sd, sd->sd_RDY);
sd                140 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	SEEPROM_OUTB(sd, temp);
sd                141 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	CLOCK_PULSE(sd, sd->sd_RDY);
sd                149 drivers/scsi/aic7xxx/aic7xxx_93cx6.c ahc_read_seeprom(struct seeprom_descriptor *sd, uint16_t *buf,
sd                166 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		send_seeprom_cmd(sd, &seeprom_read);
sd                169 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		temp = sd->sd_MS ^ sd->sd_CS;
sd                170 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		for (i = (sd->sd_chip - 1); i >= 0; i--) {
sd                172 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 				temp ^= sd->sd_DO;
sd                173 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			SEEPROM_OUTB(sd, temp);
sd                174 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			CLOCK_PULSE(sd, sd->sd_RDY);
sd                175 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sd                176 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			CLOCK_PULSE(sd, sd->sd_RDY);
sd                178 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 				temp ^= sd->sd_DO;
sd                189 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			SEEPROM_OUTB(sd, temp);
sd                190 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			CLOCK_PULSE(sd, sd->sd_RDY);
sd                192 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			if (SEEPROM_DATA_INB(sd) & sd->sd_DI)
sd                194 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sd                195 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			CLOCK_PULSE(sd, sd->sd_RDY);
sd                201 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		reset_seeprom(sd);
sd                221 drivers/scsi/aic7xxx/aic7xxx_93cx6.c ahc_write_seeprom(struct seeprom_descriptor *sd, uint16_t *buf,
sd                230 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	if (sd->sd_chip == C46) {
sd                233 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	} else if (sd->sd_chip == C56_66) {
sd                238 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		       sd->sd_chip);
sd                242 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	send_seeprom_cmd(sd, ewen);
sd                243 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	reset_seeprom(sd);
sd                246 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	temp = sd->sd_MS ^ sd->sd_CS;
sd                249 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		send_seeprom_cmd(sd, &seeprom_write);
sd                252 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		for (i = (sd->sd_chip - 1); i >= 0; i--) {
sd                254 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 				temp ^= sd->sd_DO;
sd                255 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			SEEPROM_OUTB(sd, temp);
sd                256 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			CLOCK_PULSE(sd, sd->sd_RDY);
sd                257 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sd                258 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			CLOCK_PULSE(sd, sd->sd_RDY);
sd                260 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 				temp ^= sd->sd_DO;
sd                267 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 				temp ^= sd->sd_DO;
sd                268 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			SEEPROM_OUTB(sd, temp);
sd                269 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			CLOCK_PULSE(sd, sd->sd_RDY);
sd                270 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sd                271 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			CLOCK_PULSE(sd, sd->sd_RDY);
sd                273 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 				temp ^= sd->sd_DO;
sd                277 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		temp = sd->sd_MS;
sd                278 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		SEEPROM_OUTB(sd, temp);
sd                279 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		CLOCK_PULSE(sd, sd->sd_RDY);
sd                280 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		temp = sd->sd_MS ^ sd->sd_CS;
sd                282 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			SEEPROM_OUTB(sd, temp);
sd                283 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			CLOCK_PULSE(sd, sd->sd_RDY);
sd                284 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sd                285 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 			CLOCK_PULSE(sd, sd->sd_RDY);
sd                286 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		} while ((SEEPROM_DATA_INB(sd) & sd->sd_DI) == 0);
sd                288 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 		reset_seeprom(sd);
sd                292 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	send_seeprom_cmd(sd, ewds);
sd                293 drivers/scsi/aic7xxx/aic7xxx_93cx6.c 	reset_seeprom(sd);
sd                 83 drivers/scsi/aic7xxx/aic7xxx_93cx6.h #define	SEEPROM_INB(sd) \
sd                 84 drivers/scsi/aic7xxx/aic7xxx_93cx6.h 	ahc_inb(sd->sd_ahc, sd->sd_control_offset)
sd                 85 drivers/scsi/aic7xxx/aic7xxx_93cx6.h #define	SEEPROM_OUTB(sd, value)					\
sd                 87 drivers/scsi/aic7xxx/aic7xxx_93cx6.h 	ahc_outb(sd->sd_ahc, sd->sd_control_offset, value);	\
sd                 88 drivers/scsi/aic7xxx/aic7xxx_93cx6.h 	ahc_flush_device_writes(sd->sd_ahc);			\
sd                 91 drivers/scsi/aic7xxx/aic7xxx_93cx6.h #define	SEEPROM_STATUS_INB(sd) \
sd                 92 drivers/scsi/aic7xxx/aic7xxx_93cx6.h 	ahc_inb(sd->sd_ahc, sd->sd_status_offset)
sd                 93 drivers/scsi/aic7xxx/aic7xxx_93cx6.h #define	SEEPROM_DATA_INB(sd) \
sd                 94 drivers/scsi/aic7xxx/aic7xxx_93cx6.h 	ahc_inb(sd->sd_ahc, sd->sd_dataout_offset)
sd                 96 drivers/scsi/aic7xxx/aic7xxx_93cx6.h int ahc_read_seeprom(struct seeprom_descriptor *sd, uint16_t *buf,
sd                 98 drivers/scsi/aic7xxx/aic7xxx_93cx6.h int ahc_write_seeprom(struct seeprom_descriptor *sd, uint16_t *buf,
sd                607 drivers/scsi/aic7xxx/aic7xxx_pci.c 				  struct seeprom_descriptor *sd,
sd               1255 drivers/scsi/aic7xxx/aic7xxx_pci.c 	struct	seeprom_descriptor sd;
sd               1260 drivers/scsi/aic7xxx/aic7xxx_pci.c 	sd.sd_ahc = ahc;
sd               1261 drivers/scsi/aic7xxx/aic7xxx_pci.c 	sd.sd_control_offset = SEECTL;		
sd               1262 drivers/scsi/aic7xxx/aic7xxx_pci.c 	sd.sd_status_offset = SEECTL;		
sd               1263 drivers/scsi/aic7xxx/aic7xxx_pci.c 	sd.sd_dataout_offset = SEECTL;		
sd               1273 drivers/scsi/aic7xxx/aic7xxx_pci.c 		sd.sd_chip = C56_66;
sd               1275 drivers/scsi/aic7xxx/aic7xxx_pci.c 		sd.sd_chip = C46;
sd               1277 drivers/scsi/aic7xxx/aic7xxx_pci.c 	sd.sd_MS = SEEMS;
sd               1278 drivers/scsi/aic7xxx/aic7xxx_pci.c 	sd.sd_RDY = SEERDY;
sd               1279 drivers/scsi/aic7xxx/aic7xxx_pci.c 	sd.sd_CS = SEECS;
sd               1280 drivers/scsi/aic7xxx/aic7xxx_pci.c 	sd.sd_CK = SEECK;
sd               1281 drivers/scsi/aic7xxx/aic7xxx_pci.c 	sd.sd_DO = SEEDO;
sd               1282 drivers/scsi/aic7xxx/aic7xxx_pci.c 	sd.sd_DI = SEEDI;
sd               1284 drivers/scsi/aic7xxx/aic7xxx_pci.c 	have_seeprom = ahc_acquire_seeprom(ahc, &sd);
sd               1295 drivers/scsi/aic7xxx/aic7xxx_pci.c 			have_seeprom = ahc_read_seeprom(&sd, (uint16_t *)sc,
sd               1302 drivers/scsi/aic7xxx/aic7xxx_pci.c 			if (have_seeprom != 0 || sd.sd_chip == C56_66) {
sd               1311 drivers/scsi/aic7xxx/aic7xxx_pci.c 			sd.sd_chip = C56_66;
sd               1313 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_release_seeprom(&sd);
sd               1316 drivers/scsi/aic7xxx/aic7xxx_pci.c 		if (sd.sd_chip == C56_66)
sd               1387 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_acquire_seeprom(ahc, &sd);
sd               1388 drivers/scsi/aic7xxx/aic7xxx_pci.c 		configure_termination(ahc, &sd, sc->adapter_control, sxfrctl1);
sd               1389 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_release_seeprom(&sd);
sd               1521 drivers/scsi/aic7xxx/aic7xxx_pci.c 		      struct seeprom_descriptor *sd,
sd               1540 drivers/scsi/aic7xxx/aic7xxx_pci.c 	SEEPROM_OUTB(sd, sd->sd_MS | sd->sd_CS);
sd               1742 drivers/scsi/aic7xxx/aic7xxx_pci.c 	SEEPROM_OUTB(sd, sd->sd_MS); /* Clear CS */
sd               1832 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_acquire_seeprom(struct ahc_softc *ahc, struct seeprom_descriptor *sd)
sd               1847 drivers/scsi/aic7xxx/aic7xxx_pci.c 	SEEPROM_OUTB(sd, sd->sd_MS);
sd               1849 drivers/scsi/aic7xxx/aic7xxx_pci.c 	while (--wait && ((SEEPROM_STATUS_INB(sd) & sd->sd_RDY) == 0)) {
sd               1852 drivers/scsi/aic7xxx/aic7xxx_pci.c 	if ((SEEPROM_STATUS_INB(sd) & sd->sd_RDY) == 0) {
sd               1853 drivers/scsi/aic7xxx/aic7xxx_pci.c 		SEEPROM_OUTB(sd, 0); 
sd               1860 drivers/scsi/aic7xxx/aic7xxx_pci.c ahc_release_seeprom(struct seeprom_descriptor *sd)
sd               1863 drivers/scsi/aic7xxx/aic7xxx_pci.c 	SEEPROM_OUTB(sd, 0);
sd               2028 drivers/scsi/aic7xxx/aic7xxx_pci.c 		struct	seeprom_descriptor sd;
sd               2031 drivers/scsi/aic7xxx/aic7xxx_pci.c 		sd.sd_ahc = ahc;
sd               2032 drivers/scsi/aic7xxx/aic7xxx_pci.c 		sd.sd_control_offset = SEECTL;		
sd               2033 drivers/scsi/aic7xxx/aic7xxx_pci.c 		sd.sd_status_offset = SEECTL;		
sd               2034 drivers/scsi/aic7xxx/aic7xxx_pci.c 		sd.sd_dataout_offset = SEECTL;		
sd               2036 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_acquire_seeprom(ahc, &sd);
sd               2037 drivers/scsi/aic7xxx/aic7xxx_pci.c 		configure_termination(ahc, &sd,
sd               2040 drivers/scsi/aic7xxx/aic7xxx_pci.c 		ahc_release_seeprom(&sd);
sd                191 drivers/scsi/aic7xxx/aic7xxx_proc.c 	struct seeprom_descriptor sd;
sd                215 drivers/scsi/aic7xxx/aic7xxx_proc.c 	sd.sd_ahc = ahc;
sd                218 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_control_offset = SEECTL;
sd                219 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_status_offset = SEECTL;
sd                220 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_dataout_offset = SEECTL;
sd                222 drivers/scsi/aic7xxx/aic7xxx_proc.c 			sd.sd_chip = C56_66;
sd                224 drivers/scsi/aic7xxx/aic7xxx_proc.c 			sd.sd_chip = C46;
sd                225 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_MS = SEEMS;
sd                226 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_RDY = SEERDY;
sd                227 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_CS = SEECS;
sd                228 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_CK = SEECK;
sd                229 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_DO = SEEDO;
sd                230 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_DI = SEEDI;
sd                231 drivers/scsi/aic7xxx/aic7xxx_proc.c 		have_seeprom = ahc_acquire_seeprom(ahc, &sd);
sd                235 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_control_offset = SEECTL_2840;
sd                236 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_status_offset = STATUS_2840;
sd                237 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_dataout_offset = STATUS_2840;		
sd                238 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_chip = C46;
sd                239 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_MS = 0;
sd                240 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_RDY = EEPROM_TF;
sd                241 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_CS = CS_2840;
sd                242 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_CK = CK_2840;
sd                243 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_DO = DO_2840;
sd                244 drivers/scsi/aic7xxx/aic7xxx_proc.c 		sd.sd_DI = DI_2840;
sd                267 drivers/scsi/aic7xxx/aic7xxx_proc.c 		ahc_write_seeprom(&sd, (u_int16_t *)buffer, start_addr,
sd                269 drivers/scsi/aic7xxx/aic7xxx_proc.c 		ahc_read_seeprom(&sd, (uint16_t *)ahc->seep_config,
sd                273 drivers/scsi/aic7xxx/aic7xxx_proc.c 			ahc_release_seeprom(&sd);
sd                912 drivers/scsi/ch.c 	struct scsi_device *sd = to_scsi_device(dev);
sd                917 drivers/scsi/ch.c 	if (sd->type != TYPE_MEDIUM_CHANGER)
sd                943 drivers/scsi/ch.c 		sdev_printk(KERN_WARNING, sd, "ch%d: device_create failed\n",
sd                951 drivers/scsi/ch.c 	ch->device = sd;
sd                959 drivers/scsi/ch.c 	sdev_printk(KERN_INFO, sd, "Attached scsi changer %s\n", ch->name);
sd               1528 drivers/scsi/esas2r/esas2r_ioctl.c int esas2r_ioctl(struct scsi_device *sd, unsigned int cmd, void __user *arg)
sd               1530 drivers/scsi/esas2r/esas2r_ioctl.c 	return esas2r_ioctl_handler(sd->host->hostdata, cmd, arg);
sd               1876 drivers/scsi/gdth.c     gdth_sense_data sd;
sd               1915 drivers/scsi/gdth.c         sd.errorcode = 0x70;
sd               1916 drivers/scsi/gdth.c         sd.segno     = 0x00;
sd               1917 drivers/scsi/gdth.c         sd.key       = NO_SENSE;
sd               1918 drivers/scsi/gdth.c         sd.info      = 0;
sd               1919 drivers/scsi/gdth.c         sd.add_length= 0;
sd               1920 drivers/scsi/gdth.c         gdth_copy_internal_data(ha, scp, (char*)&sd, sizeof(gdth_sense_data));
sd               3363 drivers/scsi/gdth.c     struct scsi_device *sd;
sd               3366 drivers/scsi/gdth.c     sd = sdev;
sd               3368 drivers/scsi/gdth.c     b = sd->channel;
sd               3369 drivers/scsi/gdth.c     t = sd->id;
sd               1275 drivers/scsi/hpsa.c 	struct hpsa_scsi_dev_t *sd;
sd               1310 drivers/scsi/hpsa.c 		sd = h->dev[i];
sd               1311 drivers/scsi/hpsa.c 		memcpy(addr2, sd->scsi3addr, 8);
sd               1316 drivers/scsi/hpsa.c 			device->bus = sd->bus;
sd               1317 drivers/scsi/hpsa.c 			device->target = sd->target;
sd               1430 drivers/scsi/hpsa.c 	struct hpsa_scsi_dev_t *sd;
sd               1434 drivers/scsi/hpsa.c 	sd = h->dev[entry];
sd               1441 drivers/scsi/hpsa.c 	hpsa_show_dev_msg(KERN_INFO, h, sd, "removed");
sd               1601 drivers/scsi/hpsa.c 	struct hpsa_scsi_dev_t *sd)
sd               1603 drivers/scsi/hpsa.c 	if (sd->volume_offline == HPSA_VPD_LV_STATUS_UNSUPPORTED)
sd               1607 drivers/scsi/hpsa.c 			sd->bus, sd->target, sd->lun);
sd               1608 drivers/scsi/hpsa.c 	switch (sd->volume_offline) {
sd               1615 drivers/scsi/hpsa.c 			sd->bus, sd->target, sd->lun);
sd               1621 drivers/scsi/hpsa.c 			sd->bus, sd->target, sd->lun);
sd               1627 drivers/scsi/hpsa.c 			sd->bus, sd->target, sd->lun);
sd               1633 drivers/scsi/hpsa.c 			sd->bus, sd->target, sd->lun);
sd               1639 drivers/scsi/hpsa.c 			sd->bus, sd->target, sd->lun);
sd               1645 drivers/scsi/hpsa.c 			sd->bus, sd->target, sd->lun);
sd               1651 drivers/scsi/hpsa.c 			sd->bus, sd->target, sd->lun);
sd               1657 drivers/scsi/hpsa.c 			sd->bus, sd->target, sd->lun);
sd               1663 drivers/scsi/hpsa.c 			sd->bus, sd->target, sd->lun);
sd               1669 drivers/scsi/hpsa.c 			sd->bus, sd->target, sd->lun);
sd               1675 drivers/scsi/hpsa.c 			sd->bus, sd->target, sd->lun);
sd               1905 drivers/scsi/hpsa.c 	struct hpsa_scsi_dev_t *sd[], int nsds)
sd               1952 drivers/scsi/hpsa.c 		device_change = hpsa_scsi_find_entry(csd, sd, nsds, &entry);
sd               1959 drivers/scsi/hpsa.c 			hpsa_scsi_replace_entry(h, i, sd[entry],
sd               1964 drivers/scsi/hpsa.c 			sd[entry] = NULL;
sd               1966 drivers/scsi/hpsa.c 			hpsa_scsi_update_entry(h, i, sd[entry]);
sd               1976 drivers/scsi/hpsa.c 		if (!sd[i]) /* if already added above. */
sd               1984 drivers/scsi/hpsa.c 		if (sd[i]->volume_offline) {
sd               1985 drivers/scsi/hpsa.c 			hpsa_show_volume_status(h, sd[i]);
sd               1986 drivers/scsi/hpsa.c 			hpsa_show_dev_msg(KERN_INFO, h, sd[i], "offline");
sd               1990 drivers/scsi/hpsa.c 		device_change = hpsa_scsi_find_entry(sd[i], h->dev,
sd               1994 drivers/scsi/hpsa.c 			if (hpsa_scsi_add_entry(h, sd[i], added, &nadded) != 0)
sd               1996 drivers/scsi/hpsa.c 			sd[i] = NULL; /* prevent from being freed later. */
sd               2028 drivers/scsi/hpsa.c 		if (!sd[i]) /* if already added above. */
sd               2030 drivers/scsi/hpsa.c 		if (sd[i]->volume_offline)
sd               2031 drivers/scsi/hpsa.c 			hpsa_monitor_offline_device(h, sd[i]->scsi3addr);
sd               2084 drivers/scsi/hpsa.c 	struct hpsa_scsi_dev_t *sd;
sd               2087 drivers/scsi/hpsa.c 		sd = h->dev[i];
sd               2088 drivers/scsi/hpsa.c 		if (sd->bus == bus && sd->target == target && sd->lun == lun)
sd               2089 drivers/scsi/hpsa.c 			return sd;
sd               2096 drivers/scsi/hpsa.c 	struct hpsa_scsi_dev_t *sd = NULL;
sd               2108 drivers/scsi/hpsa.c 		sd = hpsa_find_device_by_sas_rphy(h, rphy);
sd               2109 drivers/scsi/hpsa.c 		if (sd) {
sd               2110 drivers/scsi/hpsa.c 			sd->target = sdev_id(sdev);
sd               2111 drivers/scsi/hpsa.c 			sd->lun = sdev->lun;
sd               2114 drivers/scsi/hpsa.c 	if (!sd)
sd               2115 drivers/scsi/hpsa.c 		sd = lookup_hpsa_scsi_dev(h, sdev_channel(sdev),
sd               2118 drivers/scsi/hpsa.c 	if (sd && sd->expose_device) {
sd               2119 drivers/scsi/hpsa.c 		atomic_set(&sd->ioaccel_cmds_out, 0);
sd               2120 drivers/scsi/hpsa.c 		sdev->hostdata = sd;
sd               2130 drivers/scsi/hpsa.c 	struct hpsa_scsi_dev_t *sd;
sd               2133 drivers/scsi/hpsa.c 	sd = sdev->hostdata;
sd               2134 drivers/scsi/hpsa.c 	sdev->no_uld_attach = !sd || !sd->expose_device;
sd               2136 drivers/scsi/hpsa.c 	if (sd) {
sd               2137 drivers/scsi/hpsa.c 		sd->was_removed = 0;
sd               2138 drivers/scsi/hpsa.c 		if (sd->external) {
sd               2144 drivers/scsi/hpsa.c 			queue_depth = sd->queue_depth != 0 ?
sd               2145 drivers/scsi/hpsa.c 					sd->queue_depth : sdev->host->can_queue;
sd               9796 drivers/scsi/hpsa.c 	struct hpsa_scsi_dev_t *sd;
sd               9806 drivers/scsi/hpsa.c 	sd = hpsa_find_device_by_sas_rphy(h, rphy);
sd               9807 drivers/scsi/hpsa.c 	if (!sd)
sd               9810 drivers/scsi/hpsa.c 	*identifier = sd->eli;
sd               3800 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c 	char *sd;
sd               3808 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c 		sd = se_cmd->sense_buffer;
sd                823 drivers/siox/siox-core.c 	sdevice->status_errors_kn = sysfs_get_dirent(sdevice->dev.kobj.sd,
sd                825 drivers/siox/siox-core.c 	sdevice->watchdog_kn = sysfs_get_dirent(sdevice->dev.kobj.sd,
sd                827 drivers/siox/siox-core.c 	sdevice->watchdog_errors_kn = sysfs_get_dirent(sdevice->dev.kobj.sd,
sd                829 drivers/siox/siox-core.c 	sdevice->connected_kn = sysfs_get_dirent(sdevice->dev.kobj.sd,
sd                130 drivers/soc/fsl/dpio/qbman-portal.c 				    u8 epm, int sd, int sp, int se,
sd                139 drivers/soc/fsl/dpio/qbman-portal.c 		sd << SWP_CFG_SD_SHIFT |
sd               1031 drivers/soc/mediatek/mtk-scpsys.c 	const struct scp_subdomain *sd;
sd               1048 drivers/soc/mediatek/mtk-scpsys.c 	for (i = 0, sd = soc->subdomains; i < soc->num_subdomains; i++, sd++) {
sd               1049 drivers/soc/mediatek/mtk-scpsys.c 		ret = pm_genpd_add_subdomain(pd_data->domains[sd->origin],
sd               1050 drivers/soc/mediatek/mtk-scpsys.c 					     pd_data->domains[sd->subdomain]);
sd                173 drivers/staging/iio/adc/ad7192.c 	struct ad_sigma_delta		sd;
sd                176 drivers/staging/iio/adc/ad7192.c static struct ad7192_state *ad_sigma_delta_to_ad7192(struct ad_sigma_delta *sd)
sd                178 drivers/staging/iio/adc/ad7192.c 	return container_of(sd, struct ad7192_state, sd);
sd                181 drivers/staging/iio/adc/ad7192.c static int ad7192_set_channel(struct ad_sigma_delta *sd, unsigned int channel)
sd                183 drivers/staging/iio/adc/ad7192.c 	struct ad7192_state *st = ad_sigma_delta_to_ad7192(sd);
sd                188 drivers/staging/iio/adc/ad7192.c 	return ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, st->conf);
sd                191 drivers/staging/iio/adc/ad7192.c static int ad7192_set_mode(struct ad_sigma_delta *sd,
sd                194 drivers/staging/iio/adc/ad7192.c 	struct ad7192_state *st = ad_sigma_delta_to_ad7192(sd);
sd                199 drivers/staging/iio/adc/ad7192.c 	return ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode);
sd                223 drivers/staging/iio/adc/ad7192.c 	return ad_sd_calibrate_all(&st->sd, ad7192_calib_arr,
sd                235 drivers/staging/iio/adc/ad7192.c 	struct device_node *np = st->sd.spi->dev.of_node;
sd                256 drivers/staging/iio/adc/ad7192.c 	struct iio_dev *indio_dev = spi_get_drvdata(st->sd.spi);
sd                263 drivers/staging/iio/adc/ad7192.c 	ret = ad_sd_reset(&st->sd, 48);
sd                269 drivers/staging/iio/adc/ad7192.c 	ret = ad_sd_read_reg(&st->sd, AD7192_REG_ID, 1, &id);
sd                276 drivers/staging/iio/adc/ad7192.c 		dev_warn(&st->sd.spi->dev, "device ID query failed (0x%X)\n",
sd                309 drivers/staging/iio/adc/ad7192.c 		dev_warn(&st->sd.spi->dev,
sd                313 drivers/staging/iio/adc/ad7192.c 	ret = ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode);
sd                317 drivers/staging/iio/adc/ad7192.c 	ret = ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, st->conf);
sd                385 drivers/staging/iio/adc/ad7192.c 		ad_sd_write_reg(&st->sd, AD7192_REG_GPOCON, 1, st->gpocon);
sd                393 drivers/staging/iio/adc/ad7192.c 		ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode);
sd                528 drivers/staging/iio/adc/ad7192.c 	ret = ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode);
sd                532 drivers/staging/iio/adc/ad7192.c 	return ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, st->conf);
sd                625 drivers/staging/iio/adc/ad7192.c 				ad_sd_write_reg(&st->sd, AD7192_REG_CONF,
sd                646 drivers/staging/iio/adc/ad7192.c 		ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode);
sd                845 drivers/staging/iio/adc/ad7192.c 	ad_sd_init(&st->sd, indio_dev, spi, &ad7192_sigma_delta_info);
sd                853 drivers/staging/iio/adc/ad7192.c 	st->mclk = devm_clk_get(&st->sd.spi->dev, "mclk");
sd                 51 drivers/staging/media/imx/imx-ic-common.c 	v4l2_subdev_init(&priv->sd, ic_ops[priv->task_id]->subdev_ops);
sd                 52 drivers/staging/media/imx/imx-ic-common.c 	v4l2_set_subdevdata(&priv->sd, priv);
sd                 53 drivers/staging/media/imx/imx-ic-common.c 	priv->sd.internal_ops = ic_ops[priv->task_id]->internal_ops;
sd                 54 drivers/staging/media/imx/imx-ic-common.c 	priv->sd.entity.ops = ic_ops[priv->task_id]->entity_ops;
sd                 55 drivers/staging/media/imx/imx-ic-common.c 	priv->sd.entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER;
sd                 56 drivers/staging/media/imx/imx-ic-common.c 	priv->sd.owner = ipu_dev->driver->owner;
sd                 57 drivers/staging/media/imx/imx-ic-common.c 	priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
sd                 58 drivers/staging/media/imx/imx-ic-common.c 	priv->sd.grp_id = grp_id;
sd                 59 drivers/staging/media/imx/imx-ic-common.c 	imx_media_grp_id_to_sd_name(priv->sd.name, sizeof(priv->sd.name),
sd                 60 drivers/staging/media/imx/imx-ic-common.c 				    priv->sd.grp_id, ipu_get_num(ipu));
sd                 66 drivers/staging/media/imx/imx-ic-common.c 	ret = v4l2_device_register_subdev(v4l2_dev, &priv->sd);
sd                 72 drivers/staging/media/imx/imx-ic-common.c 	return &priv->sd;
sd                 75 drivers/staging/media/imx/imx-ic-common.c int imx_media_ic_unregister(struct v4l2_subdev *sd)
sd                 77 drivers/staging/media/imx/imx-ic-common.c 	struct imx_ic_priv *priv = container_of(sd, struct imx_ic_priv, sd);
sd                 79 drivers/staging/media/imx/imx-ic-common.c 	v4l2_info(sd, "Removing\n");
sd                 83 drivers/staging/media/imx/imx-ic-common.c 	v4l2_device_unregister_subdev(sd);
sd                 84 drivers/staging/media/imx/imx-ic-common.c 	media_entity_cleanup(&sd->entity);
sd                 57 drivers/staging/media/imx/imx-ic-prp.c static inline struct prp_priv *sd_to_priv(struct v4l2_subdev *sd)
sd                 59 drivers/staging/media/imx/imx-ic-prp.c 	struct imx_ic_priv *ic_priv = v4l2_get_subdevdata(sd);
sd                 88 drivers/staging/media/imx/imx-ic-prp.c 		return v4l2_subdev_get_try_format(&ic_priv->sd, cfg, pad);
sd                 97 drivers/staging/media/imx/imx-ic-prp.c static int prp_enum_mbus_code(struct v4l2_subdev *sd,
sd                101 drivers/staging/media/imx/imx-ic-prp.c 	struct prp_priv *priv = sd_to_priv(sd);
sd                129 drivers/staging/media/imx/imx-ic-prp.c static int prp_get_fmt(struct v4l2_subdev *sd,
sd                133 drivers/staging/media/imx/imx-ic-prp.c 	struct prp_priv *priv = sd_to_priv(sd);
sd                154 drivers/staging/media/imx/imx-ic-prp.c static int prp_set_fmt(struct v4l2_subdev *sd,
sd                158 drivers/staging/media/imx/imx-ic-prp.c 	struct prp_priv *priv = sd_to_priv(sd);
sd                213 drivers/staging/media/imx/imx-ic-prp.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd                214 drivers/staging/media/imx/imx-ic-prp.c 	struct imx_ic_priv *ic_priv = v4l2_get_subdevdata(sd);
sd                220 drivers/staging/media/imx/imx-ic-prp.c 		ic_priv->sd.name, remote->entity->name, local->entity->name);
sd                288 drivers/staging/media/imx/imx-ic-prp.c static int prp_link_validate(struct v4l2_subdev *sd,
sd                293 drivers/staging/media/imx/imx-ic-prp.c 	struct imx_ic_priv *ic_priv = v4l2_get_subdevdata(sd);
sd                298 drivers/staging/media/imx/imx-ic-prp.c 	ret = v4l2_subdev_link_validate_default(sd, link,
sd                303 drivers/staging/media/imx/imx-ic-prp.c 	csi = imx_media_pipeline_subdev(&ic_priv->sd.entity,
sd                347 drivers/staging/media/imx/imx-ic-prp.c static int prp_s_stream(struct v4l2_subdev *sd, int enable)
sd                349 drivers/staging/media/imx/imx-ic-prp.c 	struct imx_ic_priv *ic_priv = v4l2_get_subdevdata(sd);
sd                367 drivers/staging/media/imx/imx-ic-prp.c 	dev_dbg(ic_priv->ipu_dev, "%s: stream %s\n", sd->name,
sd                395 drivers/staging/media/imx/imx-ic-prp.c static int prp_g_frame_interval(struct v4l2_subdev *sd,
sd                398 drivers/staging/media/imx/imx-ic-prp.c 	struct prp_priv *priv = sd_to_priv(sd);
sd                410 drivers/staging/media/imx/imx-ic-prp.c static int prp_s_frame_interval(struct v4l2_subdev *sd,
sd                413 drivers/staging/media/imx/imx-ic-prp.c 	struct prp_priv *priv = sd_to_priv(sd);
sd                434 drivers/staging/media/imx/imx-ic-prp.c static int prp_registered(struct v4l2_subdev *sd)
sd                436 drivers/staging/media/imx/imx-ic-prp.c 	struct prp_priv *priv = sd_to_priv(sd);
sd                456 drivers/staging/media/imx/imx-ic-prp.c 	return media_entity_pads_init(&sd->entity, PRP_NUM_PADS, priv->pad);
sd                124 drivers/staging/media/imx/imx-ic-prpencvf.c static inline struct prp_priv *sd_to_priv(struct v4l2_subdev *sd)
sd                126 drivers/staging/media/imx/imx-ic-prpencvf.c 	struct imx_ic_priv *ic_priv = v4l2_get_subdevdata(sd);
sd                159 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd, "failed to get IC\n");
sd                167 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd, "could not get IDMAC channel %u\n",
sd                176 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd, "could not get IDMAC channel %u\n",
sd                185 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd, "could not get IDMAC channel %u\n",
sd                282 drivers/staging/media/imx/imx-ic-prpencvf.c 	v4l2_err(&ic_priv->sd, "NFB4EOF\n");
sd                302 drivers/staging/media/imx/imx-ic-prpencvf.c 	v4l2_err(&ic_priv->sd, "EOF timeout\n");
sd                470 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd, "ipu_ic_calc_csc failed, %d\n",
sd                478 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd, "failed to alloc rot_buf[0], %d\n", ret);
sd                484 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd, "failed to alloc rot_buf[1], %d\n", ret);
sd                492 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd, "ipu_ic_task_init failed, %d\n", ret);
sd                501 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd,
sd                511 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd,
sd                523 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd,
sd                599 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd, "ipu_ic_calc_csc failed, %d\n",
sd                608 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd, "ipu_ic_task_init failed, %d\n", ret);
sd                618 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd,
sd                704 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd,
sd                720 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd,
sd                729 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd,
sd                771 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_warn(&ic_priv->sd, "wait last EOF timeout\n");
sd                776 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_warn(&ic_priv->sd,
sd                799 drivers/staging/media/imx/imx-ic-prpencvf.c 		return v4l2_subdev_get_try_format(&ic_priv->sd, cfg, pad);
sd                846 drivers/staging/media/imx/imx-ic-prpencvf.c static int prp_enum_mbus_code(struct v4l2_subdev *sd,
sd                856 drivers/staging/media/imx/imx-ic-prpencvf.c static int prp_get_fmt(struct v4l2_subdev *sd,
sd                860 drivers/staging/media/imx/imx-ic-prpencvf.c 	struct prp_priv *priv = sd_to_priv(sd);
sd                922 drivers/staging/media/imx/imx-ic-prpencvf.c static int prp_set_fmt(struct v4l2_subdev *sd,
sd                926 drivers/staging/media/imx/imx-ic-prpencvf.c 	struct prp_priv *priv = sd_to_priv(sd);
sd                972 drivers/staging/media/imx/imx-ic-prpencvf.c static int prp_enum_frame_size(struct v4l2_subdev *sd,
sd                976 drivers/staging/media/imx/imx-ic-prpencvf.c 	struct prp_priv *priv = sd_to_priv(sd);
sd               1015 drivers/staging/media/imx/imx-ic-prpencvf.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd               1016 drivers/staging/media/imx/imx-ic-prpencvf.c 	struct imx_ic_priv *ic_priv = v4l2_get_subdevdata(sd);
sd               1022 drivers/staging/media/imx/imx-ic-prpencvf.c 		ic_priv->sd.name, remote->entity->name, local->entity->name);
sd               1097 drivers/staging/media/imx/imx-ic-prpencvf.c 		v4l2_err(&ic_priv->sd, "Invalid control\n");
sd               1153 drivers/staging/media/imx/imx-ic-prpencvf.c 	ic_priv->sd.ctrl_handler = hdlr;
sd               1168 drivers/staging/media/imx/imx-ic-prpencvf.c static int prp_s_stream(struct v4l2_subdev *sd, int enable)
sd               1170 drivers/staging/media/imx/imx-ic-prpencvf.c 	struct imx_ic_priv *ic_priv = v4l2_get_subdevdata(sd);
sd               1188 drivers/staging/media/imx/imx-ic-prpencvf.c 	dev_dbg(ic_priv->ipu_dev, "%s: stream %s\n", sd->name,
sd               1207 drivers/staging/media/imx/imx-ic-prpencvf.c static int prp_g_frame_interval(struct v4l2_subdev *sd,
sd               1210 drivers/staging/media/imx/imx-ic-prpencvf.c 	struct prp_priv *priv = sd_to_priv(sd);
sd               1222 drivers/staging/media/imx/imx-ic-prpencvf.c static int prp_s_frame_interval(struct v4l2_subdev *sd,
sd               1225 drivers/staging/media/imx/imx-ic-prpencvf.c 	struct prp_priv *priv = sd_to_priv(sd);
sd               1246 drivers/staging/media/imx/imx-ic-prpencvf.c static int prp_registered(struct v4l2_subdev *sd)
sd               1248 drivers/staging/media/imx/imx-ic-prpencvf.c 	struct prp_priv *priv = sd_to_priv(sd);
sd               1269 drivers/staging/media/imx/imx-ic-prpencvf.c 	ret = media_entity_pads_init(&sd->entity, PRPENCVF_NUM_PADS,
sd               1288 drivers/staging/media/imx/imx-ic-prpencvf.c static void prp_unregistered(struct v4l2_subdev *sd)
sd               1290 drivers/staging/media/imx/imx-ic-prpencvf.c 	struct prp_priv *priv = sd_to_priv(sd);
sd               1340 drivers/staging/media/imx/imx-ic-prpencvf.c 						   &ic_priv->sd,
sd                 15 drivers/staging/media/imx/imx-ic.h 	struct v4l2_subdev sd;
sd                733 drivers/staging/media/imx/imx-media-capture.c 	struct v4l2_subdev *sd = priv->src_sd;
sd                734 drivers/staging/media/imx/imx-media-capture.c 	struct v4l2_device *v4l2_dev = sd->v4l2_dev;
sd                747 drivers/staging/media/imx/imx-media-capture.c 		v4l2_err(sd, "Failed to register video device\n");
sd                764 drivers/staging/media/imx/imx-media-capture.c 		v4l2_err(sd, "vb2_queue_init failed\n");
sd                773 drivers/staging/media/imx/imx-media-capture.c 		v4l2_err(sd, "failed to init dev pad\n");
sd                778 drivers/staging/media/imx/imx-media-capture.c 	ret = media_create_pad_link(&sd->entity, priv->src_sd_pad,
sd                781 drivers/staging/media/imx/imx-media-capture.c 		v4l2_err(sd, "failed to create link to device node\n");
sd                788 drivers/staging/media/imx/imx-media-capture.c 	v4l2_subdev_call(sd, pad, get_fmt, NULL, &fmt_src);
sd                790 drivers/staging/media/imx/imx-media-capture.c 		v4l2_err(sd, "failed to get src_sd format\n");
sd                802 drivers/staging/media/imx/imx-media-capture.c 	v4l2_info(sd, "Registered %s as /dev/%s\n", vfd->name,
sd                 59 drivers/staging/media/imx/imx-media-csi.c 	struct v4l2_subdev sd;
sd                118 drivers/staging/media/imx/imx-media-csi.c 	return container_of(sdev, struct csi_priv, sd);
sd                162 drivers/staging/media/imx/imx-media-csi.c 	struct v4l2_subdev *sd;
sd                171 drivers/staging/media/imx/imx-media-csi.c 	sd = priv->src_sd;
sd                172 drivers/staging/media/imx/imx-media-csi.c 	src = &sd->entity;
sd                180 drivers/staging/media/imx/imx-media-csi.c 		sd = imx_media_pipeline_subdev(src, IMX_MEDIA_GRP_ID_CSI2,
sd                182 drivers/staging/media/imx/imx-media-csi.c 		if (!IS_ERR(sd))
sd                183 drivers/staging/media/imx/imx-media-csi.c 			src = &sd->entity;
sd                191 drivers/staging/media/imx/imx-media-csi.c 	    sd->grp_id != IMX_MEDIA_GRP_ID_CSI2)
sd                192 drivers/staging/media/imx/imx-media-csi.c 		src = &priv->sd.entity;
sd                199 drivers/staging/media/imx/imx-media-csi.c 	sd = media_entity_to_v4l2_subdev(pad->entity);
sd                205 drivers/staging/media/imx/imx-media-csi.c 	port = of_graph_get_port_by_id(sd->dev->of_node, pad->index);
sd                241 drivers/staging/media/imx/imx-media-csi.c 		v4l2_err(&priv->sd, "failed to get SMFC\n");
sd                249 drivers/staging/media/imx/imx-media-csi.c 		v4l2_err(&priv->sd, "could not get IDMAC channel %u\n",
sd                345 drivers/staging/media/imx/imx-media-csi.c 	v4l2_err(&priv->sd, "NFB4EOF\n");
sd                361 drivers/staging/media/imx/imx-media-csi.c 	v4l2_err(&priv->sd, "EOF timeout\n");
sd                625 drivers/staging/media/imx/imx-media-csi.c 		v4l2_err(&priv->sd, "csi_idmac_setup failed: %d\n", ret);
sd                636 drivers/staging/media/imx/imx-media-csi.c 		v4l2_err(&priv->sd,
sd                648 drivers/staging/media/imx/imx-media-csi.c 		v4l2_err(&priv->sd,
sd                686 drivers/staging/media/imx/imx-media-csi.c 		v4l2_warn(&priv->sd, "wait last EOF timeout\n");
sd                786 drivers/staging/media/imx/imx-media-csi.c 		v4l2_err(&priv->sd, "CSI enable error: %d\n", ret);
sd                904 drivers/staging/media/imx/imx-media-csi.c static int csi_g_frame_interval(struct v4l2_subdev *sd,
sd                907 drivers/staging/media/imx/imx-media-csi.c 	struct csi_priv *priv = v4l2_get_subdevdata(sd);
sd                921 drivers/staging/media/imx/imx-media-csi.c static int csi_s_frame_interval(struct v4l2_subdev *sd,
sd                924 drivers/staging/media/imx/imx-media-csi.c 	struct csi_priv *priv = v4l2_get_subdevdata(sd);
sd                968 drivers/staging/media/imx/imx-media-csi.c static int csi_s_stream(struct v4l2_subdev *sd, int enable)
sd                970 drivers/staging/media/imx/imx-media-csi.c 	struct csi_priv *priv = v4l2_get_subdevdata(sd);
sd               1010 drivers/staging/media/imx/imx-media-csi.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd               1011 drivers/staging/media/imx/imx-media-csi.c 	struct csi_priv *priv = v4l2_get_subdevdata(sd);
sd               1100 drivers/staging/media/imx/imx-media-csi.c static int csi_link_validate(struct v4l2_subdev *sd,
sd               1105 drivers/staging/media/imx/imx-media-csi.c 	struct csi_priv *priv = v4l2_get_subdevdata(sd);
sd               1110 drivers/staging/media/imx/imx-media-csi.c 	ret = v4l2_subdev_link_validate_default(sd, link,
sd               1117 drivers/staging/media/imx/imx-media-csi.c 		v4l2_err(&priv->sd, "failed to find upstream endpoint\n");
sd               1136 drivers/staging/media/imx/imx-media-csi.c 		vc_num = imx_media_find_mipi_csi2_channel(&priv->sd.entity);
sd               1157 drivers/staging/media/imx/imx-media-csi.c 		return v4l2_subdev_get_try_format(&priv->sd, cfg, pad);
sd               1167 drivers/staging/media/imx/imx-media-csi.c 		return v4l2_subdev_get_try_crop(&priv->sd, cfg, CSI_SINK_PAD);
sd               1177 drivers/staging/media/imx/imx-media-csi.c 		return v4l2_subdev_get_try_compose(&priv->sd, cfg,
sd               1223 drivers/staging/media/imx/imx-media-csi.c static int csi_enum_mbus_code(struct v4l2_subdev *sd,
sd               1227 drivers/staging/media/imx/imx-media-csi.c 	struct csi_priv *priv = v4l2_get_subdevdata(sd);
sd               1247 drivers/staging/media/imx/imx-media-csi.c 			v4l2_err(&priv->sd, "failed to find upstream endpoint\n");
sd               1274 drivers/staging/media/imx/imx-media-csi.c static int csi_enum_frame_size(struct v4l2_subdev *sd,
sd               1278 drivers/staging/media/imx/imx-media-csi.c 	struct csi_priv *priv = v4l2_get_subdevdata(sd);
sd               1308 drivers/staging/media/imx/imx-media-csi.c static int csi_enum_frame_interval(struct v4l2_subdev *sd,
sd               1312 drivers/staging/media/imx/imx-media-csi.c 	struct csi_priv *priv = v4l2_get_subdevdata(sd);
sd               1344 drivers/staging/media/imx/imx-media-csi.c static int csi_get_fmt(struct v4l2_subdev *sd,
sd               1348 drivers/staging/media/imx/imx-media-csi.c 	struct csi_priv *priv = v4l2_get_subdevdata(sd);
sd               1501 drivers/staging/media/imx/imx-media-csi.c static int csi_set_fmt(struct v4l2_subdev *sd,
sd               1505 drivers/staging/media/imx/imx-media-csi.c 	struct csi_priv *priv = v4l2_get_subdevdata(sd);
sd               1517 drivers/staging/media/imx/imx-media-csi.c 		v4l2_err(&priv->sd, "failed to find upstream endpoint\n");
sd               1567 drivers/staging/media/imx/imx-media-csi.c static int csi_get_selection(struct v4l2_subdev *sd,
sd               1571 drivers/staging/media/imx/imx-media-csi.c 	struct csi_priv *priv = v4l2_get_subdevdata(sd);
sd               1631 drivers/staging/media/imx/imx-media-csi.c static int csi_set_selection(struct v4l2_subdev *sd,
sd               1635 drivers/staging/media/imx/imx-media-csi.c 	struct csi_priv *priv = v4l2_get_subdevdata(sd);
sd               1646 drivers/staging/media/imx/imx-media-csi.c 		v4l2_err(&priv->sd, "failed to find upstream endpoint\n");
sd               1726 drivers/staging/media/imx/imx-media-csi.c static int csi_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
sd               1737 drivers/staging/media/imx/imx-media-csi.c static int csi_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
sd               1746 drivers/staging/media/imx/imx-media-csi.c static int csi_registered(struct v4l2_subdev *sd)
sd               1748 drivers/staging/media/imx/imx-media-csi.c 	struct csi_priv *priv = v4l2_get_subdevdata(sd);
sd               1756 drivers/staging/media/imx/imx-media-csi.c 		v4l2_err(&priv->sd, "failed to get CSI%d\n", priv->csi_id);
sd               1790 drivers/staging/media/imx/imx-media-csi.c 	priv->fim = imx_media_fim_init(&priv->sd);
sd               1796 drivers/staging/media/imx/imx-media-csi.c 	ret = media_entity_pads_init(&sd->entity, CSI_NUM_PADS, priv->pad);
sd               1814 drivers/staging/media/imx/imx-media-csi.c static void csi_unregistered(struct v4l2_subdev *sd)
sd               1816 drivers/staging/media/imx/imx-media-csi.c 	struct csi_priv *priv = v4l2_get_subdevdata(sd);
sd               1899 drivers/staging/media/imx/imx-media-csi.c 	ret = v4l2_async_subdev_notifier_register(&priv->sd, notifier);
sd               1903 drivers/staging/media/imx/imx-media-csi.c 	ret = v4l2_async_register_subdev(&priv->sd);
sd               1907 drivers/staging/media/imx/imx-media-csi.c 	priv->sd.subdev_notifier = notifier;
sd               1932 drivers/staging/media/imx/imx-media-csi.c 	platform_set_drvdata(pdev, &priv->sd);
sd               1952 drivers/staging/media/imx/imx-media-csi.c 	v4l2_subdev_init(&priv->sd, &csi_subdev_ops);
sd               1953 drivers/staging/media/imx/imx-media-csi.c 	v4l2_set_subdevdata(&priv->sd, priv);
sd               1954 drivers/staging/media/imx/imx-media-csi.c 	priv->sd.internal_ops = &csi_internal_ops;
sd               1955 drivers/staging/media/imx/imx-media-csi.c 	priv->sd.entity.ops = &csi_entity_ops;
sd               1956 drivers/staging/media/imx/imx-media-csi.c 	priv->sd.entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
sd               1957 drivers/staging/media/imx/imx-media-csi.c 	priv->sd.dev = &pdev->dev;
sd               1958 drivers/staging/media/imx/imx-media-csi.c 	priv->sd.fwnode = of_fwnode_handle(pdata->of_node);
sd               1959 drivers/staging/media/imx/imx-media-csi.c 	priv->sd.owner = THIS_MODULE;
sd               1960 drivers/staging/media/imx/imx-media-csi.c 	priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
sd               1961 drivers/staging/media/imx/imx-media-csi.c 	priv->sd.grp_id = priv->csi_id ?
sd               1963 drivers/staging/media/imx/imx-media-csi.c 	imx_media_grp_id_to_sd_name(priv->sd.name, sizeof(priv->sd.name),
sd               1964 drivers/staging/media/imx/imx-media-csi.c 				    priv->sd.grp_id, ipu_get_num(priv->ipu));
sd               1966 drivers/staging/media/imx/imx-media-csi.c 	priv->vdev = imx_media_capture_device_init(priv->sd.dev, &priv->sd,
sd               1974 drivers/staging/media/imx/imx-media-csi.c 	priv->sd.ctrl_handler = &priv->ctrl_hdlr;
sd               2006 drivers/staging/media/imx/imx-media-csi.c 	struct v4l2_subdev *sd = platform_get_drvdata(pdev);
sd               2007 drivers/staging/media/imx/imx-media-csi.c 	struct csi_priv *priv = sd_to_dev(sd);
sd               2012 drivers/staging/media/imx/imx-media-csi.c 	v4l2_async_unregister_subdev(sd);
sd               2013 drivers/staging/media/imx/imx-media-csi.c 	media_entity_cleanup(&sd->entity);
sd                 24 drivers/staging/media/imx/imx-media-dev-common.c 				  struct v4l2_subdev *sd,
sd                 27 drivers/staging/media/imx/imx-media-dev-common.c 	v4l2_info(sd->v4l2_dev, "subdev %s bound\n", sd->name);
sd                 39 drivers/staging/media/imx/imx-media-dev-common.c 	struct v4l2_subdev *sd;
sd                 41 drivers/staging/media/imx/imx-media-dev-common.c 	list_for_each_entry(sd, &imxmd->v4l2_dev.subdevs, list) {
sd                 42 drivers/staging/media/imx/imx-media-dev-common.c 		switch (sd->grp_id) {
sd                 55 drivers/staging/media/imx/imx-media-dev-common.c 			imx_media_create_csi_of_links(imxmd, sd);
sd                 62 drivers/staging/media/imx/imx-media-dev-common.c 			imx_media_create_of_links(imxmd, sd);
sd                 82 drivers/staging/media/imx/imx-media-dev-common.c 	struct v4l2_subdev *sd;
sd                 89 drivers/staging/media/imx/imx-media-dev-common.c 	sd = media_entity_to_v4l2_subdev(entity);
sd                 91 drivers/staging/media/imx/imx-media-dev-common.c 	pad_vdev_list = to_pad_vdev_list(sd, srcpad->index);
sd                148 drivers/staging/media/imx/imx-media-dev-common.c 	struct v4l2_subdev *sd;
sd                151 drivers/staging/media/imx/imx-media-dev-common.c 	list_for_each_entry(sd, &imxmd->v4l2_dev.subdevs, list) {
sd                152 drivers/staging/media/imx/imx-media-dev-common.c 		entity = &sd->entity;
sd                160 drivers/staging/media/imx/imx-media-dev-common.c 		sd->host_priv = vdev_lists;
sd                163 drivers/staging/media/imx/imx-media-dev-common.c 			INIT_LIST_HEAD(to_pad_vdev_list(sd, i));
sd                228 drivers/staging/media/imx/imx-media-dev-common.c 		struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd                232 drivers/staging/media/imx/imx-media-dev-common.c 			vfd->entity.name, sd->entity.name);
sd                235 drivers/staging/media/imx/imx-media-dev-common.c 					    sd->ctrl_handler,
sd                269 drivers/staging/media/imx/imx-media-dev-common.c 	struct v4l2_subdev *sd;
sd                280 drivers/staging/media/imx/imx-media-dev-common.c 	sd = media_entity_to_v4l2_subdev(source);
sd                283 drivers/staging/media/imx/imx-media-dev-common.c 	pad_vdev_list = to_pad_vdev_list(sd, pad_idx);
sd                323 drivers/staging/media/imx/imx-media-dev-common.c static void imx_media_notify(struct v4l2_subdev *sd, unsigned int notification,
sd                326 drivers/staging/media/imx/imx-media-dev-common.c 	struct media_entity *entity = &sd->entity;
sd                337 drivers/staging/media/imx/imx-media-dev-common.c 		pad_vdev_list = to_pad_vdev_list(sd, pad->index);
sd                 22 drivers/staging/media/imx/imx-media-dev.c 				  struct v4l2_subdev *sd,
sd                 28 drivers/staging/media/imx/imx-media-dev.c 	if (sd->grp_id & IMX_MEDIA_GRP_ID_IPU_CSI) {
sd                 30 drivers/staging/media/imx/imx-media-dev.c 		ret = imx_media_register_ipu_internal_subdevs(imxmd, sd);
sd                 35 drivers/staging/media/imx/imx-media-dev.c 	v4l2_info(&imxmd->v4l2_dev, "subdev %s bound\n", sd->name);
sd                 41 drivers/staging/media/imx/imx-media-fim.c 	struct v4l2_subdev *sd;
sd                 77 drivers/staging/media/imx/imx-media-fim.c 		dev_dbg(fim->sd->dev, "no frame interval, FIM disabled\n");
sd                 85 drivers/staging/media/imx/imx-media-fim.c 	dev_dbg(fim->sd->dev, "FI=%lu usec\n", fim->nominal);
sd                134 drivers/staging/media/imx/imx-media-fim.c 	v4l2_subdev_notify_event(fim->sd, &ev);
sd                162 drivers/staging/media/imx/imx-media-fim.c 		dev_dbg(fim->sd->dev,
sd                177 drivers/staging/media/imx/imx-media-fim.c 		dev_dbg(fim->sd->dev, "FIM: error: %lu usec%s\n",
sd                257 drivers/staging/media/imx/imx-media-fim.c 		v4l2_warn(fim->sd, "wait first icap event timeout\n");
sd                457 drivers/staging/media/imx/imx-media-fim.c 	return v4l2_ctrl_add_handler(fim->sd->ctrl_handler,
sd                462 drivers/staging/media/imx/imx-media-fim.c struct imx_media_fim *imx_media_fim_init(struct v4l2_subdev *sd)
sd                467 drivers/staging/media/imx/imx-media-fim.c 	fim = devm_kzalloc(sd->dev, sizeof(*fim), GFP_KERNEL);
sd                471 drivers/staging/media/imx/imx-media-fim.c 	fim->sd = sd;
sd                 38 drivers/staging/media/imx/imx-media-internal-sd.c 	int (*sync_unregister)(struct v4l2_subdev *sd);
sd                159 drivers/staging/media/imx/imx-media-internal-sd.c 				     struct v4l2_subdev *sd,
sd                168 drivers/staging/media/imx/imx-media-internal-sd.c 	for (i = 0; i < sd->entity.num_pads; i++) {
sd                170 drivers/staging/media/imx/imx-media-internal-sd.c 		pad = &sd->entity.pads[i];
sd                181 drivers/staging/media/imx/imx-media-internal-sd.c 			ret = create_internal_link(imxmd, sd, sink, link);
sd                195 drivers/staging/media/imx/imx-media-internal-sd.c 	struct v4l2_subdev *sd;
sd                221 drivers/staging/media/imx/imx-media-internal-sd.c 		sd = imxmd->sync_sd[ipu_id][i];
sd                227 drivers/staging/media/imx/imx-media-internal-sd.c 		if (sd || !intsd->sync_register)
sd                231 drivers/staging/media/imx/imx-media-internal-sd.c 		sd = intsd->sync_register(&imxmd->v4l2_dev, ipu_dev, ipu,
sd                234 drivers/staging/media/imx/imx-media-internal-sd.c 		if (IS_ERR(sd)) {
sd                235 drivers/staging/media/imx/imx-media-internal-sd.c 			ret = PTR_ERR(sd);
sd                239 drivers/staging/media/imx/imx-media-internal-sd.c 		imxmd->sync_sd[ipu_id][i] = sd;
sd                250 drivers/staging/media/imx/imx-media-internal-sd.c 			sd = csi;
sd                252 drivers/staging/media/imx/imx-media-internal-sd.c 			sd = imxmd->sync_sd[ipu_id][i];
sd                253 drivers/staging/media/imx/imx-media-internal-sd.c 			if (!sd)
sd                257 drivers/staging/media/imx/imx-media-internal-sd.c 		ret = create_ipu_internal_links(imxmd, intsd, sd, ipu_id);
sd                271 drivers/staging/media/imx/imx-media-internal-sd.c 		sd = imxmd->sync_sd[ipu_id][i];
sd                272 drivers/staging/media/imx/imx-media-internal-sd.c 		if (!sd || !intsd->sync_unregister)
sd                275 drivers/staging/media/imx/imx-media-internal-sd.c 		intsd->sync_unregister(sd);
sd                286 drivers/staging/media/imx/imx-media-internal-sd.c 	struct v4l2_subdev *sd;
sd                294 drivers/staging/media/imx/imx-media-internal-sd.c 			sd = imxmd->sync_sd[i][j];
sd                296 drivers/staging/media/imx/imx-media-internal-sd.c 			if (!sd || !intsd->sync_unregister)
sd                300 drivers/staging/media/imx/imx-media-internal-sd.c 			intsd->sync_unregister(sd);
sd                 86 drivers/staging/media/imx/imx-media-of.c 			  struct v4l2_subdev *sd,
sd                 92 drivers/staging/media/imx/imx-media-of.c 	if (link->local_port >= sd->entity.num_pads)
sd                 99 drivers/staging/media/imx/imx-media-of.c 	if (sd->entity.pads[link->local_port].flags & MEDIA_PAD_FL_SINK) {
sd                102 drivers/staging/media/imx/imx-media-of.c 		sink = sd;
sd                105 drivers/staging/media/imx/imx-media-of.c 		src = sd;
sd                116 drivers/staging/media/imx/imx-media-of.c 	v4l2_info(sd->v4l2_dev, "%s:%d -> %s:%d\n",
sd                127 drivers/staging/media/imx/imx-media-of.c 			      struct v4l2_subdev *sd)
sd                133 drivers/staging/media/imx/imx-media-of.c 	for_each_endpoint_of_node(sd->dev->of_node, ep) {
sd                138 drivers/staging/media/imx/imx-media-of.c 		ret = create_of_link(imxmd, sd, &link);
sd                488 drivers/staging/media/imx/imx-media-utils.c int imx_media_init_cfg(struct v4l2_subdev *sd,
sd                496 drivers/staging/media/imx/imx-media-utils.c 	for (pad = 0; pad < sd->entity.num_pads; pad++) {
sd                501 drivers/staging/media/imx/imx-media-utils.c 		ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &format);
sd                505 drivers/staging/media/imx/imx-media-utils.c 		mf_try = v4l2_subdev_get_try_format(sd, cfg, pad);
sd                728 drivers/staging/media/imx/imx-media-utils.c 	struct v4l2_subdev *sd;
sd                730 drivers/staging/media/imx/imx-media-utils.c 	list_for_each_entry(sd, &imxmd->v4l2_dev.subdevs, list) {
sd                731 drivers/staging/media/imx/imx-media-utils.c 		if (sd->fwnode == fwnode)
sd                732 drivers/staging/media/imx/imx-media-utils.c 			return sd;
sd                743 drivers/staging/media/imx/imx-media-utils.c 	struct v4l2_subdev *sd;
sd                745 drivers/staging/media/imx/imx-media-utils.c 	list_for_each_entry(sd, &imxmd->v4l2_dev.subdevs, list) {
sd                746 drivers/staging/media/imx/imx-media-utils.c 		if (!strcmp(devname, dev_name(sd->dev)))
sd                747 drivers/staging/media/imx/imx-media-utils.c 			return sd;
sd                786 drivers/staging/media/imx/imx-media-utils.c 	struct v4l2_subdev *sd;
sd                802 drivers/staging/media/imx/imx-media-utils.c 				sd = media_entity_to_v4l2_subdev(pad->entity);
sd                803 drivers/staging/media/imx/imx-media-utils.c 				if (sd->grp_id & grp_id)
sd                837 drivers/staging/media/imx/imx-media-utils.c 	struct v4l2_subdev *sd;
sd                840 drivers/staging/media/imx/imx-media-utils.c 		sd = media_entity_to_v4l2_subdev(start);
sd                841 drivers/staging/media/imx/imx-media-utils.c 		if (sd->grp_id & grp_id)
sd                842 drivers/staging/media/imx/imx-media-utils.c 			return &sd->entity;
sd                918 drivers/staging/media/imx/imx-media-utils.c 	struct v4l2_subdev *sd;
sd                923 drivers/staging/media/imx/imx-media-utils.c 	sd = media_entity_to_v4l2_subdev(entity);
sd                931 drivers/staging/media/imx/imx-media-utils.c 		ret = v4l2_subdev_call(sd, video, s_stream, 1);
sd                935 drivers/staging/media/imx/imx-media-utils.c 		v4l2_subdev_call(sd, video, s_stream, 0);
sd                 64 drivers/staging/media/imx/imx-media-vdic.c 	struct v4l2_subdev   sd;
sd                142 drivers/staging/media/imx/imx-media-vdic.c 		v4l2_err(&priv->sd, "failed to get VDIC\n");
sd                177 drivers/staging/media/imx/imx-media-vdic.c 	v4l2_err(&priv->sd, "could not get IDMAC channel %u\n", err_chan);
sd                434 drivers/staging/media/imx/imx-media-vdic.c 		v4l2_err(&priv->sd, "Invalid control\n");
sd                466 drivers/staging/media/imx/imx-media-vdic.c 	priv->sd.ctrl_handler = hdlr;
sd                481 drivers/staging/media/imx/imx-media-vdic.c static int vdic_s_stream(struct v4l2_subdev *sd, int enable)
sd                483 drivers/staging/media/imx/imx-media-vdic.c 	struct vdic_priv *priv = v4l2_get_subdevdata(sd);
sd                504 drivers/staging/media/imx/imx-media-vdic.c 	dev_dbg(priv->ipu_dev, "%s: stream %s\n", sd->name,
sd                539 drivers/staging/media/imx/imx-media-vdic.c 		return v4l2_subdev_get_try_format(&priv->sd, cfg, pad);
sd                544 drivers/staging/media/imx/imx-media-vdic.c static int vdic_enum_mbus_code(struct v4l2_subdev *sd,
sd                554 drivers/staging/media/imx/imx-media-vdic.c static int vdic_get_fmt(struct v4l2_subdev *sd,
sd                558 drivers/staging/media/imx/imx-media-vdic.c 	struct vdic_priv *priv = v4l2_get_subdevdata(sd);
sd                620 drivers/staging/media/imx/imx-media-vdic.c static int vdic_set_fmt(struct v4l2_subdev *sd,
sd                624 drivers/staging/media/imx/imx-media-vdic.c 	struct vdic_priv *priv = v4l2_get_subdevdata(sd);
sd                674 drivers/staging/media/imx/imx-media-vdic.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd                675 drivers/staging/media/imx/imx-media-vdic.c 	struct vdic_priv *priv = v4l2_get_subdevdata(sd);
sd                680 drivers/staging/media/imx/imx-media-vdic.c 		sd->name, remote->entity->name, local->entity->name);
sd                756 drivers/staging/media/imx/imx-media-vdic.c static int vdic_link_validate(struct v4l2_subdev *sd,
sd                761 drivers/staging/media/imx/imx-media-vdic.c 	struct vdic_priv *priv = v4l2_get_subdevdata(sd);
sd                764 drivers/staging/media/imx/imx-media-vdic.c 	ret = v4l2_subdev_link_validate_default(sd, link,
sd                772 drivers/staging/media/imx/imx-media-vdic.c 		v4l2_err(&priv->sd,
sd                781 drivers/staging/media/imx/imx-media-vdic.c static int vdic_g_frame_interval(struct v4l2_subdev *sd,
sd                784 drivers/staging/media/imx/imx-media-vdic.c 	struct vdic_priv *priv = v4l2_get_subdevdata(sd);
sd                798 drivers/staging/media/imx/imx-media-vdic.c static int vdic_s_frame_interval(struct v4l2_subdev *sd,
sd                801 drivers/staging/media/imx/imx-media-vdic.c 	struct vdic_priv *priv = v4l2_get_subdevdata(sd);
sd                847 drivers/staging/media/imx/imx-media-vdic.c static int vdic_registered(struct v4l2_subdev *sd)
sd                849 drivers/staging/media/imx/imx-media-vdic.c 	struct vdic_priv *priv = v4l2_get_subdevdata(sd);
sd                881 drivers/staging/media/imx/imx-media-vdic.c 	ret = media_entity_pads_init(&sd->entity, VDIC_NUM_PADS, priv->pad);
sd                888 drivers/staging/media/imx/imx-media-vdic.c static void vdic_unregistered(struct v4l2_subdev *sd)
sd                890 drivers/staging/media/imx/imx-media-vdic.c 	struct vdic_priv *priv = v4l2_get_subdevdata(sd);
sd                939 drivers/staging/media/imx/imx-media-vdic.c 	v4l2_subdev_init(&priv->sd, &vdic_subdev_ops);
sd                940 drivers/staging/media/imx/imx-media-vdic.c 	v4l2_set_subdevdata(&priv->sd, priv);
sd                941 drivers/staging/media/imx/imx-media-vdic.c 	priv->sd.internal_ops = &vdic_internal_ops;
sd                942 drivers/staging/media/imx/imx-media-vdic.c 	priv->sd.entity.ops = &vdic_entity_ops;
sd                943 drivers/staging/media/imx/imx-media-vdic.c 	priv->sd.entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
sd                944 drivers/staging/media/imx/imx-media-vdic.c 	priv->sd.owner = ipu_dev->driver->owner;
sd                945 drivers/staging/media/imx/imx-media-vdic.c 	priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                946 drivers/staging/media/imx/imx-media-vdic.c 	priv->sd.grp_id = grp_id;
sd                947 drivers/staging/media/imx/imx-media-vdic.c 	imx_media_grp_id_to_sd_name(priv->sd.name, sizeof(priv->sd.name),
sd                948 drivers/staging/media/imx/imx-media-vdic.c 				    priv->sd.grp_id, ipu_get_num(ipu));
sd                952 drivers/staging/media/imx/imx-media-vdic.c 	ret = v4l2_device_register_subdev(v4l2_dev, &priv->sd);
sd                956 drivers/staging/media/imx/imx-media-vdic.c 	return &priv->sd;
sd                962 drivers/staging/media/imx/imx-media-vdic.c int imx_media_vdic_unregister(struct v4l2_subdev *sd)
sd                964 drivers/staging/media/imx/imx-media-vdic.c 	struct vdic_priv *priv = v4l2_get_subdevdata(sd);
sd                966 drivers/staging/media/imx/imx-media-vdic.c 	v4l2_info(sd, "Removing\n");
sd                968 drivers/staging/media/imx/imx-media-vdic.c 	v4l2_device_unregister_subdev(sd);
sd                970 drivers/staging/media/imx/imx-media-vdic.c 	media_entity_cleanup(&sd->entity);
sd                114 drivers/staging/media/imx/imx-media.h to_pad_vdev_list(struct v4l2_subdev *sd, int pad_index)
sd                116 drivers/staging/media/imx/imx-media.h 	struct list_head *vdev_list = sd->host_priv;
sd                173 drivers/staging/media/imx/imx-media.h int imx_media_init_cfg(struct v4l2_subdev *sd,
sd                235 drivers/staging/media/imx/imx-media.h struct imx_media_fim *imx_media_fim_init(struct v4l2_subdev *sd);
sd                247 drivers/staging/media/imx/imx-media.h 			      struct v4l2_subdev *sd);
sd                258 drivers/staging/media/imx/imx-media.h int imx_media_vdic_unregister(struct v4l2_subdev *sd);
sd                265 drivers/staging/media/imx/imx-media.h int imx_media_ic_unregister(struct v4l2_subdev *sd);
sd                 37 drivers/staging/media/imx/imx6-mipi-csi2.c 	struct v4l2_subdev      sd;
sd                 90 drivers/staging/media/imx/imx6-mipi-csi2.c 	return container_of(sdev, struct csi2_dev, sd);
sd                230 drivers/staging/media/imx/imx6-mipi-csi2.c 		v4l2_err(&csi2->sd, "ULP timeout, phy_state = 0x%08x\n", reg);
sd                238 drivers/staging/media/imx/imx6-mipi-csi2.c 		v4l2_err(&csi2->sd, "stable bus timeout, err1 = 0x%08x\n", reg);
sd                257 drivers/staging/media/imx/imx6-mipi-csi2.c 		v4l2_warn(&csi2->sd, "LP-11 wait timeout, likely a sensor driver bug, expect capture failures.\n");
sd                258 drivers/staging/media/imx/imx6-mipi-csi2.c 		v4l2_warn(&csi2->sd, "phy_state = 0x%08x\n", reg);
sd                271 drivers/staging/media/imx/imx6-mipi-csi2.c 		v4l2_err(&csi2->sd, "clock lane timeout, phy_state = 0x%08x\n",
sd                354 drivers/staging/media/imx/imx6-mipi-csi2.c static int csi2_s_stream(struct v4l2_subdev *sd, int enable)
sd                356 drivers/staging/media/imx/imx6-mipi-csi2.c 	struct csi2_dev *csi2 = sd_to_dev(sd);
sd                403 drivers/staging/media/imx/imx6-mipi-csi2.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd                404 drivers/staging/media/imx/imx6-mipi-csi2.c 	struct csi2_dev *csi2 = sd_to_dev(sd);
sd                447 drivers/staging/media/imx/imx6-mipi-csi2.c 		return v4l2_subdev_get_try_format(&csi2->sd, cfg, pad);
sd                452 drivers/staging/media/imx/imx6-mipi-csi2.c static int csi2_get_fmt(struct v4l2_subdev *sd,
sd                456 drivers/staging/media/imx/imx6-mipi-csi2.c 	struct csi2_dev *csi2 = sd_to_dev(sd);
sd                470 drivers/staging/media/imx/imx6-mipi-csi2.c static int csi2_set_fmt(struct v4l2_subdev *sd,
sd                474 drivers/staging/media/imx/imx6-mipi-csi2.c 	struct csi2_dev *csi2 = sd_to_dev(sd);
sd                503 drivers/staging/media/imx/imx6-mipi-csi2.c static int csi2_registered(struct v4l2_subdev *sd)
sd                505 drivers/staging/media/imx/imx6-mipi-csi2.c 	struct csi2_dev *csi2 = sd_to_dev(sd);
sd                519 drivers/staging/media/imx/imx6-mipi-csi2.c 	return media_entity_pads_init(&sd->entity, CSI2_NUM_PADS, csi2->pad);
sd                550 drivers/staging/media/imx/imx6-mipi-csi2.c 	struct v4l2_subdev *sd = dev_get_drvdata(dev);
sd                551 drivers/staging/media/imx/imx6-mipi-csi2.c 	struct csi2_dev *csi2 = sd_to_dev(sd);
sd                554 drivers/staging/media/imx/imx6-mipi-csi2.c 		v4l2_err(&csi2->sd, "remote is not available\n");
sd                559 drivers/staging/media/imx/imx6-mipi-csi2.c 		v4l2_err(&csi2->sd, "invalid bus type, must be MIPI CSI2\n");
sd                584 drivers/staging/media/imx/imx6-mipi-csi2.c 	v4l2_subdev_init(&csi2->sd, &csi2_subdev_ops);
sd                585 drivers/staging/media/imx/imx6-mipi-csi2.c 	v4l2_set_subdevdata(&csi2->sd, &pdev->dev);
sd                586 drivers/staging/media/imx/imx6-mipi-csi2.c 	csi2->sd.internal_ops = &csi2_internal_ops;
sd                587 drivers/staging/media/imx/imx6-mipi-csi2.c 	csi2->sd.entity.ops = &csi2_entity_ops;
sd                588 drivers/staging/media/imx/imx6-mipi-csi2.c 	csi2->sd.dev = &pdev->dev;
sd                589 drivers/staging/media/imx/imx6-mipi-csi2.c 	csi2->sd.owner = THIS_MODULE;
sd                590 drivers/staging/media/imx/imx6-mipi-csi2.c 	csi2->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                591 drivers/staging/media/imx/imx6-mipi-csi2.c 	strscpy(csi2->sd.name, DEVICE_NAME, sizeof(csi2->sd.name));
sd                592 drivers/staging/media/imx/imx6-mipi-csi2.c 	csi2->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
sd                593 drivers/staging/media/imx/imx6-mipi-csi2.c 	csi2->sd.grp_id = IMX_MEDIA_GRP_ID_CSI2;
sd                597 drivers/staging/media/imx/imx6-mipi-csi2.c 		v4l2_err(&csi2->sd, "failed to get pll reference clock\n");
sd                604 drivers/staging/media/imx/imx6-mipi-csi2.c 		v4l2_err(&csi2->sd, "failed to get dphy clock\n");
sd                611 drivers/staging/media/imx/imx6-mipi-csi2.c 		v4l2_err(&csi2->sd, "failed to get pixel clock\n");
sd                618 drivers/staging/media/imx/imx6-mipi-csi2.c 		v4l2_err(&csi2->sd, "failed to get platform resources\n");
sd                630 drivers/staging/media/imx/imx6-mipi-csi2.c 		v4l2_err(&csi2->sd, "failed to enable pllref_clk\n");
sd                636 drivers/staging/media/imx/imx6-mipi-csi2.c 		v4l2_err(&csi2->sd, "failed to enable dphy_clk\n");
sd                640 drivers/staging/media/imx/imx6-mipi-csi2.c 	platform_set_drvdata(pdev, &csi2->sd);
sd                643 drivers/staging/media/imx/imx6-mipi-csi2.c 		&csi2->sd, sizeof(struct v4l2_async_subdev),
sd                661 drivers/staging/media/imx/imx6-mipi-csi2.c 	struct v4l2_subdev *sd = platform_get_drvdata(pdev);
sd                662 drivers/staging/media/imx/imx6-mipi-csi2.c 	struct csi2_dev *csi2 = sd_to_dev(sd);
sd                664 drivers/staging/media/imx/imx6-mipi-csi2.c 	v4l2_async_unregister_subdev(sd);
sd                668 drivers/staging/media/imx/imx6-mipi-csi2.c 	media_entity_cleanup(&sd->entity);
sd                157 drivers/staging/media/imx/imx7-media-csi.c 	struct v4l2_subdev sd;
sd                437 drivers/staging/media/imx/imx7-media-csi.c 	struct v4l2_subdev *sd;
sd                451 drivers/staging/media/imx/imx7-media-csi.c 		src = &csi->sd.entity;
sd                459 drivers/staging/media/imx/imx7-media-csi.c 	sd = media_entity_to_v4l2_subdev(pad->entity);
sd                463 drivers/staging/media/imx/imx7-media-csi.c 		src = &sd->entity;
sd                471 drivers/staging/media/imx/imx7-media-csi.c 	port = of_graph_get_port_by_id(sd->dev->of_node, pad->index);
sd                490 drivers/staging/media/imx/imx7-media-csi.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd                491 drivers/staging/media/imx/imx7-media-csi.c 	struct imx7_csi *csi = v4l2_get_subdevdata(sd);
sd                546 drivers/staging/media/imx/imx7-media-csi.c static int imx7_csi_pad_link_validate(struct v4l2_subdev *sd,
sd                551 drivers/staging/media/imx/imx7-media-csi.c 	struct imx7_csi *csi = v4l2_get_subdevdata(sd);
sd                555 drivers/staging/media/imx/imx7-media-csi.c 	ret = v4l2_subdev_link_validate_default(sd, link, source_fmt, sink_fmt);
sd                561 drivers/staging/media/imx/imx7-media-csi.c 		v4l2_err(&csi->sd, "failed to find upstream endpoint\n");
sd                722 drivers/staging/media/imx/imx7-media-csi.c 		v4l2_warn(&csi->sd, "consider increasing the CMA area\n");
sd                753 drivers/staging/media/imx/imx7-media-csi.c 		v4l2_warn(&csi->sd, "wait last EOF timeout\n");
sd                880 drivers/staging/media/imx/imx7-media-csi.c static int imx7_csi_s_stream(struct v4l2_subdev *sd, int enable)
sd                882 drivers/staging/media/imx/imx7-media-csi.c 	struct imx7_csi *csi = v4l2_get_subdevdata(sd);
sd                926 drivers/staging/media/imx/imx7-media-csi.c 		return v4l2_subdev_get_try_format(&csi->sd, cfg, pad);
sd                931 drivers/staging/media/imx/imx7-media-csi.c static int imx7_csi_enum_mbus_code(struct v4l2_subdev *sd,
sd                935 drivers/staging/media/imx/imx7-media-csi.c 	struct imx7_csi *csi = v4l2_get_subdevdata(sd);
sd                966 drivers/staging/media/imx/imx7-media-csi.c static int imx7_csi_get_fmt(struct v4l2_subdev *sd,
sd                970 drivers/staging/media/imx/imx7-media-csi.c 	struct imx7_csi *csi = v4l2_get_subdevdata(sd);
sd               1040 drivers/staging/media/imx/imx7-media-csi.c static int imx7_csi_set_fmt(struct v4l2_subdev *sd,
sd               1044 drivers/staging/media/imx/imx7-media-csi.c 	struct imx7_csi *csi = v4l2_get_subdevdata(sd);
sd               1100 drivers/staging/media/imx/imx7-media-csi.c static int imx7_csi_registered(struct v4l2_subdev *sd)
sd               1102 drivers/staging/media/imx/imx7-media-csi.c 	struct imx7_csi *csi = v4l2_get_subdevdata(sd);
sd               1122 drivers/staging/media/imx/imx7-media-csi.c 	ret = media_entity_pads_init(&sd->entity, IMX7_CSI_PADS_NUM, csi->pad);
sd               1129 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_unregistered(struct v4l2_subdev *sd)
sd               1131 drivers/staging/media/imx/imx7-media-csi.c 	struct imx7_csi *csi = v4l2_get_subdevdata(sd);
sd               1136 drivers/staging/media/imx/imx7-media-csi.c static int imx7_csi_init_cfg(struct v4l2_subdev *sd,
sd               1139 drivers/staging/media/imx/imx7-media-csi.c 	struct imx7_csi *csi = v4l2_get_subdevdata(sd);
sd               1145 drivers/staging/media/imx/imx7-media-csi.c 		mf = v4l2_subdev_get_try_format(sd, cfg, i);
sd               1236 drivers/staging/media/imx/imx7-media-csi.c 	platform_set_drvdata(pdev, &csi->sd);
sd               1247 drivers/staging/media/imx/imx7-media-csi.c 	v4l2_subdev_init(&csi->sd, &imx7_csi_subdev_ops);
sd               1248 drivers/staging/media/imx/imx7-media-csi.c 	v4l2_set_subdevdata(&csi->sd, csi);
sd               1249 drivers/staging/media/imx/imx7-media-csi.c 	csi->sd.internal_ops = &imx7_csi_internal_ops;
sd               1250 drivers/staging/media/imx/imx7-media-csi.c 	csi->sd.entity.ops = &imx7_csi_entity_ops;
sd               1251 drivers/staging/media/imx/imx7-media-csi.c 	csi->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
sd               1252 drivers/staging/media/imx/imx7-media-csi.c 	csi->sd.dev = &pdev->dev;
sd               1253 drivers/staging/media/imx/imx7-media-csi.c 	csi->sd.owner = THIS_MODULE;
sd               1254 drivers/staging/media/imx/imx7-media-csi.c 	csi->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1255 drivers/staging/media/imx/imx7-media-csi.c 	csi->sd.grp_id = IMX_MEDIA_GRP_ID_CSI;
sd               1256 drivers/staging/media/imx/imx7-media-csi.c 	snprintf(csi->sd.name, sizeof(csi->sd.name), "csi");
sd               1258 drivers/staging/media/imx/imx7-media-csi.c 	csi->vdev = imx_media_capture_device_init(csi->sd.dev, &csi->sd,
sd               1264 drivers/staging/media/imx/imx7-media-csi.c 	csi->sd.ctrl_handler = &csi->ctrl_hdlr;
sd               1266 drivers/staging/media/imx/imx7-media-csi.c 	ret = v4l2_async_register_fwnode_subdev(&csi->sd,
sd               1294 drivers/staging/media/imx/imx7-media-csi.c 	struct v4l2_subdev *sd = platform_get_drvdata(pdev);
sd               1295 drivers/staging/media/imx/imx7-media-csi.c 	struct imx7_csi *csi = v4l2_get_subdevdata(sd);
sd               1308 drivers/staging/media/imx/imx7-media-csi.c 	v4l2_async_unregister_subdev(sd);
sd                 18 drivers/staging/media/ipu3/ipu3-v4l2.c static int imgu_subdev_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                 20 drivers/staging/media/ipu3/ipu3-v4l2.c 	struct imgu_v4l2_subdev *imgu_sd = container_of(sd,
sd                 23 drivers/staging/media/ipu3/ipu3-v4l2.c 	struct imgu_device *imgu = v4l2_get_subdevdata(sd);
sd                 39 drivers/staging/media/ipu3/ipu3-v4l2.c 			v4l2_subdev_get_try_format(sd, fh->pad, i);
sd                 47 drivers/staging/media/ipu3/ipu3-v4l2.c 	*v4l2_subdev_get_try_crop(sd, fh->pad, IMGU_NODE_IN) = try_crop;
sd                 48 drivers/staging/media/ipu3/ipu3-v4l2.c 	*v4l2_subdev_get_try_compose(sd, fh->pad, IMGU_NODE_IN) = try_crop;
sd                 53 drivers/staging/media/ipu3/ipu3-v4l2.c static int imgu_subdev_s_stream(struct v4l2_subdev *sd, int enable)
sd                 58 drivers/staging/media/ipu3/ipu3-v4l2.c 	struct imgu_device *imgu = v4l2_get_subdevdata(sd);
sd                 59 drivers/staging/media/ipu3/ipu3-v4l2.c 	struct imgu_v4l2_subdev *imgu_sd = container_of(sd,
sd                122 drivers/staging/media/ipu3/ipu3-v4l2.c static int imgu_subdev_get_fmt(struct v4l2_subdev *sd,
sd                126 drivers/staging/media/ipu3/ipu3-v4l2.c 	struct imgu_device *imgu = v4l2_get_subdevdata(sd);
sd                130 drivers/staging/media/ipu3/ipu3-v4l2.c 	struct imgu_v4l2_subdev *imgu_sd = container_of(sd,
sd                139 drivers/staging/media/ipu3/ipu3-v4l2.c 		mf = v4l2_subdev_get_try_format(sd, cfg, pad);
sd                146 drivers/staging/media/ipu3/ipu3-v4l2.c static int imgu_subdev_set_fmt(struct v4l2_subdev *sd,
sd                151 drivers/staging/media/ipu3/ipu3-v4l2.c 	struct imgu_device *imgu = v4l2_get_subdevdata(sd);
sd                152 drivers/staging/media/ipu3/ipu3-v4l2.c 	struct imgu_v4l2_subdev *imgu_sd = container_of(sd,
sd                165 drivers/staging/media/ipu3/ipu3-v4l2.c 		mf = v4l2_subdev_get_try_format(sd, cfg, pad);
sd                192 drivers/staging/media/ipu3/ipu3-v4l2.c static int imgu_subdev_get_selection(struct v4l2_subdev *sd,
sd                197 drivers/staging/media/ipu3/ipu3-v4l2.c 	struct imgu_v4l2_subdev *imgu_sd = container_of(sd,
sd                206 drivers/staging/media/ipu3/ipu3-v4l2.c 		try_sel = v4l2_subdev_get_try_crop(sd, cfg, sel->pad);
sd                210 drivers/staging/media/ipu3/ipu3-v4l2.c 		try_sel = v4l2_subdev_get_try_compose(sd, cfg, sel->pad);
sd                225 drivers/staging/media/ipu3/ipu3-v4l2.c static int imgu_subdev_set_selection(struct v4l2_subdev *sd,
sd                229 drivers/staging/media/ipu3/ipu3-v4l2.c 	struct imgu_device *imgu = v4l2_get_subdevdata(sd);
sd                230 drivers/staging/media/ipu3/ipu3-v4l2.c 	struct imgu_v4l2_subdev *imgu_sd = container_of(sd,
sd                245 drivers/staging/media/ipu3/ipu3-v4l2.c 		try_sel = v4l2_subdev_get_try_crop(sd, cfg, sel->pad);
sd                249 drivers/staging/media/ipu3/ipu3-v4l2.c 		try_sel = v4l2_subdev_get_try_compose(sd, cfg, sel->pad);
sd                271 drivers/staging/media/ipu3/ipu3-v4l2.c 	struct v4l2_subdev *sd = container_of(entity, struct v4l2_subdev,
sd                273 drivers/staging/media/ipu3/ipu3-v4l2.c 	struct imgu_device *imgu = v4l2_get_subdevdata(sd);
sd                274 drivers/staging/media/ipu3/ipu3-v4l2.c 	struct imgu_v4l2_subdev *imgu_sd = container_of(sd,
sd               1159 drivers/staging/media/ipu3/ipu3-v4l2.c 	struct v4l2_subdev *sd = &imgu_pipe->imgu_sd.subdev;
sd               1260 drivers/staging/media/ipu3/ipu3-v4l2.c 		r = media_create_pad_link(&vdev->entity, 0, &sd->entity,
sd               1263 drivers/staging/media/ipu3/ipu3-v4l2.c 		r = media_create_pad_link(&sd->entity, node_num, &vdev->entity,
sd                896 drivers/staging/media/omap4iss/iss_csi2.c static int csi2_enum_mbus_code(struct v4l2_subdev *sd,
sd                900 drivers/staging/media/omap4iss/iss_csi2.c 	struct iss_csi2_device *csi2 = v4l2_get_subdevdata(sd);
sd                933 drivers/staging/media/omap4iss/iss_csi2.c static int csi2_enum_frame_size(struct v4l2_subdev *sd,
sd                937 drivers/staging/media/omap4iss/iss_csi2.c 	struct iss_csi2_device *csi2 = v4l2_get_subdevdata(sd);
sd                970 drivers/staging/media/omap4iss/iss_csi2.c static int csi2_get_format(struct v4l2_subdev *sd,
sd                974 drivers/staging/media/omap4iss/iss_csi2.c 	struct iss_csi2_device *csi2 = v4l2_get_subdevdata(sd);
sd                992 drivers/staging/media/omap4iss/iss_csi2.c static int csi2_set_format(struct v4l2_subdev *sd,
sd                996 drivers/staging/media/omap4iss/iss_csi2.c 	struct iss_csi2_device *csi2 = v4l2_get_subdevdata(sd);
sd               1017 drivers/staging/media/omap4iss/iss_csi2.c static int csi2_link_validate(struct v4l2_subdev *sd, struct media_link *link,
sd               1021 drivers/staging/media/omap4iss/iss_csi2.c 	struct iss_csi2_device *csi2 = v4l2_get_subdevdata(sd);
sd               1030 drivers/staging/media/omap4iss/iss_csi2.c 	return v4l2_subdev_link_validate_default(sd, link, source_fmt,
sd               1043 drivers/staging/media/omap4iss/iss_csi2.c static int csi2_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd               1053 drivers/staging/media/omap4iss/iss_csi2.c 	csi2_set_format(sd, fh ? fh->pad : NULL, &format);
sd               1065 drivers/staging/media/omap4iss/iss_csi2.c static int csi2_set_stream(struct v4l2_subdev *sd, int enable)
sd               1067 drivers/staging/media/omap4iss/iss_csi2.c 	struct iss_csi2_device *csi2 = v4l2_get_subdevdata(sd);
sd               1081 drivers/staging/media/omap4iss/iss_csi2.c 		ret = omap4iss_csiphy_config(iss, sd);
sd               1109 drivers/staging/media/omap4iss/iss_csi2.c 		if (omap4iss_module_sync_idle(&sd->entity, &csi2->wait,
sd               1166 drivers/staging/media/omap4iss/iss_csi2.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd               1167 drivers/staging/media/omap4iss/iss_csi2.c 	struct iss_csi2_device *csi2 = v4l2_get_subdevdata(sd);
sd               1256 drivers/staging/media/omap4iss/iss_csi2.c 	struct v4l2_subdev *sd = &csi2->subdev;
sd               1258 drivers/staging/media/omap4iss/iss_csi2.c 	struct media_entity *me = &sd->entity;
sd               1262 drivers/staging/media/omap4iss/iss_csi2.c 	v4l2_subdev_init(sd, &csi2_ops);
sd               1263 drivers/staging/media/omap4iss/iss_csi2.c 	sd->internal_ops = &csi2_internal_ops;
sd               1265 drivers/staging/media/omap4iss/iss_csi2.c 	snprintf(sd->name, sizeof(sd->name), "OMAP4 ISS %s", name);
sd               1267 drivers/staging/media/omap4iss/iss_csi2.c 	sd->grp_id = BIT(16);	/* group ID for iss subdevs */
sd               1268 drivers/staging/media/omap4iss/iss_csi2.c 	v4l2_set_subdevdata(sd, csi2);
sd               1269 drivers/staging/media/omap4iss/iss_csi2.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd               1279 drivers/staging/media/omap4iss/iss_csi2.c 	csi2_init_formats(sd, NULL);
sd                128 drivers/staging/media/omap4iss/iss_ipipe.c static int ipipe_set_stream(struct v4l2_subdev *sd, int enable)
sd                130 drivers/staging/media/omap4iss/iss_ipipe.c 	struct iss_ipipe_device *ipipe = v4l2_get_subdevdata(sd);
sd                163 drivers/staging/media/omap4iss/iss_ipipe.c 		if (omap4iss_module_sync_idle(&sd->entity, &ipipe->wait,
sd                245 drivers/staging/media/omap4iss/iss_ipipe.c static int ipipe_enum_mbus_code(struct v4l2_subdev *sd,
sd                272 drivers/staging/media/omap4iss/iss_ipipe.c static int ipipe_enum_frame_size(struct v4l2_subdev *sd,
sd                276 drivers/staging/media/omap4iss/iss_ipipe.c 	struct iss_ipipe_device *ipipe = v4l2_get_subdevdata(sd);
sd                311 drivers/staging/media/omap4iss/iss_ipipe.c static int ipipe_get_format(struct v4l2_subdev *sd,
sd                315 drivers/staging/media/omap4iss/iss_ipipe.c 	struct iss_ipipe_device *ipipe = v4l2_get_subdevdata(sd);
sd                335 drivers/staging/media/omap4iss/iss_ipipe.c static int ipipe_set_format(struct v4l2_subdev *sd,
sd                339 drivers/staging/media/omap4iss/iss_ipipe.c 	struct iss_ipipe_device *ipipe = v4l2_get_subdevdata(sd);
sd                361 drivers/staging/media/omap4iss/iss_ipipe.c static int ipipe_link_validate(struct v4l2_subdev *sd, struct media_link *link,
sd                385 drivers/staging/media/omap4iss/iss_ipipe.c static int ipipe_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
sd                395 drivers/staging/media/omap4iss/iss_ipipe.c 	ipipe_set_format(sd, fh ? fh->pad : NULL, &format);
sd                442 drivers/staging/media/omap4iss/iss_ipipe.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd                443 drivers/staging/media/omap4iss/iss_ipipe.c 	struct iss_ipipe_device *ipipe = v4l2_get_subdevdata(sd);
sd                497 drivers/staging/media/omap4iss/iss_ipipe.c 	struct v4l2_subdev *sd = &ipipe->subdev;
sd                499 drivers/staging/media/omap4iss/iss_ipipe.c 	struct media_entity *me = &sd->entity;
sd                504 drivers/staging/media/omap4iss/iss_ipipe.c 	v4l2_subdev_init(sd, &ipipe_v4l2_ops);
sd                505 drivers/staging/media/omap4iss/iss_ipipe.c 	sd->internal_ops = &ipipe_v4l2_internal_ops;
sd                506 drivers/staging/media/omap4iss/iss_ipipe.c 	strscpy(sd->name, "OMAP4 ISS ISP IPIPE", sizeof(sd->name));
sd                507 drivers/staging/media/omap4iss/iss_ipipe.c 	sd->grp_id = BIT(16);	/* group ID for iss subdevs */
sd                508 drivers/staging/media/omap4iss/iss_ipipe.c 	v4l2_set_subdevdata(sd, ipipe);
sd                509 drivers/staging/media/omap4iss/iss_ipipe.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                519 drivers/staging/media/omap4iss/iss_ipipe.c 	ipipe_init_formats(sd, NULL);
sd                302 drivers/staging/media/omap4iss/iss_ipipeif.c static int ipipeif_set_stream(struct v4l2_subdev *sd, int enable)
sd                304 drivers/staging/media/omap4iss/iss_ipipeif.c 	struct iss_ipipeif_device *ipipeif = v4l2_get_subdevdata(sd);
sd                342 drivers/staging/media/omap4iss/iss_ipipeif.c 		if (omap4iss_module_sync_idle(&sd->entity, &ipipeif->wait,
sd                444 drivers/staging/media/omap4iss/iss_ipipeif.c static int ipipeif_enum_mbus_code(struct v4l2_subdev *sd,
sd                448 drivers/staging/media/omap4iss/iss_ipipeif.c 	struct iss_ipipeif_device *ipipeif = v4l2_get_subdevdata(sd);
sd                478 drivers/staging/media/omap4iss/iss_ipipeif.c static int ipipeif_enum_frame_size(struct v4l2_subdev *sd,
sd                482 drivers/staging/media/omap4iss/iss_ipipeif.c 	struct iss_ipipeif_device *ipipeif = v4l2_get_subdevdata(sd);
sd                517 drivers/staging/media/omap4iss/iss_ipipeif.c static int ipipeif_get_format(struct v4l2_subdev *sd,
sd                521 drivers/staging/media/omap4iss/iss_ipipeif.c 	struct iss_ipipeif_device *ipipeif = v4l2_get_subdevdata(sd);
sd                541 drivers/staging/media/omap4iss/iss_ipipeif.c static int ipipeif_set_format(struct v4l2_subdev *sd,
sd                545 drivers/staging/media/omap4iss/iss_ipipeif.c 	struct iss_ipipeif_device *ipipeif = v4l2_get_subdevdata(sd);
sd                575 drivers/staging/media/omap4iss/iss_ipipeif.c static int ipipeif_link_validate(struct v4l2_subdev *sd,
sd                600 drivers/staging/media/omap4iss/iss_ipipeif.c static int ipipeif_init_formats(struct v4l2_subdev *sd,
sd                611 drivers/staging/media/omap4iss/iss_ipipeif.c 	ipipeif_set_format(sd, fh ? fh->pad : NULL, &format);
sd                658 drivers/staging/media/omap4iss/iss_ipipeif.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd                659 drivers/staging/media/omap4iss/iss_ipipeif.c 	struct iss_ipipeif_device *ipipeif = v4l2_get_subdevdata(sd);
sd                728 drivers/staging/media/omap4iss/iss_ipipeif.c 	struct v4l2_subdev *sd = &ipipeif->subdev;
sd                730 drivers/staging/media/omap4iss/iss_ipipeif.c 	struct media_entity *me = &sd->entity;
sd                735 drivers/staging/media/omap4iss/iss_ipipeif.c 	v4l2_subdev_init(sd, &ipipeif_v4l2_ops);
sd                736 drivers/staging/media/omap4iss/iss_ipipeif.c 	sd->internal_ops = &ipipeif_v4l2_internal_ops;
sd                737 drivers/staging/media/omap4iss/iss_ipipeif.c 	strscpy(sd->name, "OMAP4 ISS ISP IPIPEIF", sizeof(sd->name));
sd                738 drivers/staging/media/omap4iss/iss_ipipeif.c 	sd->grp_id = BIT(16);	/* group ID for iss subdevs */
sd                739 drivers/staging/media/omap4iss/iss_ipipeif.c 	v4l2_set_subdevdata(sd, ipipeif);
sd                740 drivers/staging/media/omap4iss/iss_ipipeif.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                751 drivers/staging/media/omap4iss/iss_ipipeif.c 	ipipeif_init_formats(sd, NULL);
sd                350 drivers/staging/media/omap4iss/iss_resizer.c static int resizer_set_stream(struct v4l2_subdev *sd, int enable)
sd                352 drivers/staging/media/omap4iss/iss_resizer.c 	struct iss_resizer_device *resizer = v4l2_get_subdevdata(sd);
sd                397 drivers/staging/media/omap4iss/iss_resizer.c 		if (omap4iss_module_sync_idle(&sd->entity, &resizer->wait,
sd                494 drivers/staging/media/omap4iss/iss_resizer.c static int resizer_enum_mbus_code(struct v4l2_subdev *sd,
sd                498 drivers/staging/media/omap4iss/iss_resizer.c 	struct iss_resizer_device *resizer = v4l2_get_subdevdata(sd);
sd                539 drivers/staging/media/omap4iss/iss_resizer.c static int resizer_enum_frame_size(struct v4l2_subdev *sd,
sd                543 drivers/staging/media/omap4iss/iss_resizer.c 	struct iss_resizer_device *resizer = v4l2_get_subdevdata(sd);
sd                578 drivers/staging/media/omap4iss/iss_resizer.c static int resizer_get_format(struct v4l2_subdev *sd,
sd                582 drivers/staging/media/omap4iss/iss_resizer.c 	struct iss_resizer_device *resizer = v4l2_get_subdevdata(sd);
sd                602 drivers/staging/media/omap4iss/iss_resizer.c static int resizer_set_format(struct v4l2_subdev *sd,
sd                606 drivers/staging/media/omap4iss/iss_resizer.c 	struct iss_resizer_device *resizer = v4l2_get_subdevdata(sd);
sd                629 drivers/staging/media/omap4iss/iss_resizer.c static int resizer_link_validate(struct v4l2_subdev *sd,
sd                654 drivers/staging/media/omap4iss/iss_resizer.c static int resizer_init_formats(struct v4l2_subdev *sd,
sd                665 drivers/staging/media/omap4iss/iss_resizer.c 	resizer_set_format(sd, fh ? fh->pad : NULL, &format);
sd                712 drivers/staging/media/omap4iss/iss_resizer.c 	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
sd                713 drivers/staging/media/omap4iss/iss_resizer.c 	struct iss_resizer_device *resizer = v4l2_get_subdevdata(sd);
sd                771 drivers/staging/media/omap4iss/iss_resizer.c 	struct v4l2_subdev *sd = &resizer->subdev;
sd                773 drivers/staging/media/omap4iss/iss_resizer.c 	struct media_entity *me = &sd->entity;
sd                778 drivers/staging/media/omap4iss/iss_resizer.c 	v4l2_subdev_init(sd, &resizer_v4l2_ops);
sd                779 drivers/staging/media/omap4iss/iss_resizer.c 	sd->internal_ops = &resizer_v4l2_internal_ops;
sd                780 drivers/staging/media/omap4iss/iss_resizer.c 	strscpy(sd->name, "OMAP4 ISS ISP resizer", sizeof(sd->name));
sd                781 drivers/staging/media/omap4iss/iss_resizer.c 	sd->grp_id = BIT(16);	/* group ID for iss subdevs */
sd                782 drivers/staging/media/omap4iss/iss_resizer.c 	v4l2_set_subdevdata(sd, resizer);
sd                783 drivers/staging/media/omap4iss/iss_resizer.c 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
sd                793 drivers/staging/media/omap4iss/iss_resizer.c 	resizer_init_formats(sd, NULL);
sd                152 drivers/staging/media/soc_camera/imx074.c static int imx074_set_fmt(struct v4l2_subdev *sd,
sd                158 drivers/staging/media/soc_camera/imx074.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                164 drivers/staging/media/soc_camera/imx074.c 	dev_dbg(sd->v4l2_dev->dev, "%s(%u)\n", __func__, mf->code);
sd                186 drivers/staging/media/soc_camera/imx074.c static int imx074_get_fmt(struct v4l2_subdev *sd,
sd                191 drivers/staging/media/soc_camera/imx074.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                208 drivers/staging/media/soc_camera/imx074.c static int imx074_get_selection(struct v4l2_subdev *sd,
sd                229 drivers/staging/media/soc_camera/imx074.c static int imx074_enum_mbus_code(struct v4l2_subdev *sd,
sd                241 drivers/staging/media/soc_camera/imx074.c static int imx074_s_stream(struct v4l2_subdev *sd, int enable)
sd                243 drivers/staging/media/soc_camera/imx074.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                249 drivers/staging/media/soc_camera/imx074.c static int imx074_s_power(struct v4l2_subdev *sd, int on)
sd                251 drivers/staging/media/soc_camera/imx074.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                258 drivers/staging/media/soc_camera/imx074.c static int imx074_g_mbus_config(struct v4l2_subdev *sd,
sd                160 drivers/staging/media/soc_camera/mt9t031.c static int mt9t031_s_stream(struct v4l2_subdev *sd, int enable)
sd                162 drivers/staging/media/soc_camera/mt9t031.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                293 drivers/staging/media/soc_camera/mt9t031.c static int mt9t031_set_selection(struct v4l2_subdev *sd,
sd                297 drivers/staging/media/soc_camera/mt9t031.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                317 drivers/staging/media/soc_camera/mt9t031.c static int mt9t031_get_selection(struct v4l2_subdev *sd,
sd                321 drivers/staging/media/soc_camera/mt9t031.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                342 drivers/staging/media/soc_camera/mt9t031.c static int mt9t031_get_fmt(struct v4l2_subdev *sd,
sd                347 drivers/staging/media/soc_camera/mt9t031.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                366 drivers/staging/media/soc_camera/mt9t031.c static int mt9t031_set_fmt(struct v4l2_subdev *sd,
sd                371 drivers/staging/media/soc_camera/mt9t031.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                405 drivers/staging/media/soc_camera/mt9t031.c static int mt9t031_g_register(struct v4l2_subdev *sd,
sd                408 drivers/staging/media/soc_camera/mt9t031.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                422 drivers/staging/media/soc_camera/mt9t031.c static int mt9t031_s_register(struct v4l2_subdev *sd,
sd                425 drivers/staging/media/soc_camera/mt9t031.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                460 drivers/staging/media/soc_camera/mt9t031.c 	struct v4l2_subdev *sd = &mt9t031->subdev;
sd                461 drivers/staging/media/soc_camera/mt9t031.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                562 drivers/staging/media/soc_camera/mt9t031.c 	struct v4l2_subdev *sd = soc_camera_vdev_to_subdev(vdev);
sd                563 drivers/staging/media/soc_camera/mt9t031.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                595 drivers/staging/media/soc_camera/mt9t031.c static int mt9t031_s_power(struct v4l2_subdev *sd, int on)
sd                597 drivers/staging/media/soc_camera/mt9t031.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                662 drivers/staging/media/soc_camera/mt9t031.c static int mt9t031_g_skip_top_lines(struct v4l2_subdev *sd, u32 *lines)
sd                664 drivers/staging/media/soc_camera/mt9t031.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                685 drivers/staging/media/soc_camera/mt9t031.c static int mt9t031_enum_mbus_code(struct v4l2_subdev *sd,
sd                696 drivers/staging/media/soc_camera/mt9t031.c static int mt9t031_g_mbus_config(struct v4l2_subdev *sd,
sd                699 drivers/staging/media/soc_camera/mt9t031.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                711 drivers/staging/media/soc_camera/mt9t031.c static int mt9t031_s_mbus_config(struct v4l2_subdev *sd,
sd                714 drivers/staging/media/soc_camera/mt9t031.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                149 drivers/staging/media/soc_camera/soc_camera.c 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
sd                152 drivers/staging/media/soc_camera/soc_camera.c 	ret = v4l2_subdev_call(sd, core, s_power, 1);
sd                161 drivers/staging/media/soc_camera/soc_camera.c 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
sd                164 drivers/staging/media/soc_camera/soc_camera.c 	ret = v4l2_subdev_call(sd, core, s_power, 0);
sd                334 drivers/staging/media/soc_camera/soc_camera.c 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
sd                336 drivers/staging/media/soc_camera/soc_camera.c 	return v4l2_subdev_call(sd, video, s_std, a);
sd                342 drivers/staging/media/soc_camera/soc_camera.c 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
sd                344 drivers/staging/media/soc_camera/soc_camera.c 	return v4l2_subdev_call(sd, video, g_std, a);
sd                445 drivers/staging/media/soc_camera/soc_camera.c 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
sd                453 drivers/staging/media/soc_camera/soc_camera.c 	while (!v4l2_subdev_call(sd, pad, enum_mbus_code, NULL, &code)) {
sd                492 drivers/staging/media/soc_camera/soc_camera.c 			v4l2_subdev_call(sd, pad, enum_mbus_code, NULL, &code);
sd                915 drivers/staging/media/soc_camera/soc_camera.c 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
sd                929 drivers/staging/media/soc_camera/soc_camera.c 		v4l2_subdev_call(sd, video, s_stream, 1);
sd                938 drivers/staging/media/soc_camera/soc_camera.c 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
sd                955 drivers/staging/media/soc_camera/soc_camera.c 	v4l2_subdev_call(sd, video, s_stream, 0);
sd               1166 drivers/staging/media/soc_camera/soc_camera.c 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
sd               1173 drivers/staging/media/soc_camera/soc_camera.c 	sd->grp_id = soc_camera_grp_id(icd);
sd               1174 drivers/staging/media/soc_camera/soc_camera.c 	v4l2_set_subdev_hostdata(sd, icd);
sd               1176 drivers/staging/media/soc_camera/soc_camera.c 	v4l2_subdev_call(sd, video, g_tvnorms, &icd->vdev->tvnorms);
sd               1178 drivers/staging/media/soc_camera/soc_camera.c 	ret = v4l2_ctrl_add_handler(&icd->ctrl_handler, sd->ctrl_handler,
sd               1201 drivers/staging/media/soc_camera/soc_camera.c 	if (!v4l2_subdev_call(sd, pad, get_fmt, NULL, &fmt)) {
sd               1322 drivers/staging/media/soc_camera/soc_camera.c 				  struct v4l2_subdev *sd,
sd               1330 drivers/staging/media/soc_camera/soc_camera.c 		struct i2c_client *client = v4l2_get_subdevdata(sd);
sd               1355 drivers/staging/media/soc_camera/soc_camera.c 				    struct v4l2_subdev *sd,
sd               1767 drivers/staging/media/soc_camera/soc_camera.c 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
sd               1774 drivers/staging/media/soc_camera/soc_camera.c 	ret = v4l2_subdev_call(sd, pad, get_selection, NULL, &sdsel);
sd               1784 drivers/staging/media/soc_camera/soc_camera.c 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
sd               1793 drivers/staging/media/soc_camera/soc_camera.c 	ret = v4l2_subdev_call(sd, pad, set_selection, NULL, &sdsel);
sd               1803 drivers/staging/media/soc_camera/soc_camera.c 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
sd               1805 drivers/staging/media/soc_camera/soc_camera.c 	return v4l2_g_parm_cap(icd->vdev, sd, a);
sd               1811 drivers/staging/media/soc_camera/soc_camera.c 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
sd               1813 drivers/staging/media/soc_camera/soc_camera.c 	return v4l2_s_parm_cap(icd->vdev, sd, a);
sd               1820 drivers/staging/media/soc_camera/soc_camera.c 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
sd               1832 drivers/staging/media/soc_camera/soc_camera.c 	ret = v4l2_subdev_call(sd, pad, enum_frame_size, NULL, &fse);
sd                238 drivers/staging/media/soc_camera/soc_mt9v022.c static int mt9v022_s_stream(struct v4l2_subdev *sd, int enable)
sd                240 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                275 drivers/staging/media/soc_camera/soc_mt9v022.c static int mt9v022_set_selection(struct v4l2_subdev *sd,
sd                279 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                355 drivers/staging/media/soc_camera/soc_mt9v022.c static int mt9v022_get_selection(struct v4l2_subdev *sd,
sd                359 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                380 drivers/staging/media/soc_camera/soc_mt9v022.c static int mt9v022_get_fmt(struct v4l2_subdev *sd,
sd                385 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                400 drivers/staging/media/soc_camera/soc_mt9v022.c static int mt9v022_s_fmt(struct v4l2_subdev *sd,
sd                404 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                436 drivers/staging/media/soc_camera/soc_mt9v022.c 	ret = mt9v022_set_selection(sd, NULL, &sel);
sd                447 drivers/staging/media/soc_camera/soc_mt9v022.c static int mt9v022_set_fmt(struct v4l2_subdev *sd,
sd                452 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                476 drivers/staging/media/soc_camera/soc_mt9v022.c 		return mt9v022_s_fmt(sd, fmt, mf);
sd                482 drivers/staging/media/soc_camera/soc_mt9v022.c static int mt9v022_g_register(struct v4l2_subdev *sd,
sd                485 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                499 drivers/staging/media/soc_camera/soc_mt9v022.c static int mt9v022_s_register(struct v4l2_subdev *sd,
sd                502 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                514 drivers/staging/media/soc_camera/soc_mt9v022.c static int mt9v022_s_power(struct v4l2_subdev *sd, int on)
sd                516 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                527 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct v4l2_subdev *sd = &mt9v022->subdev;
sd                528 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                571 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct v4l2_subdev *sd = &mt9v022->subdev;
sd                572 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                753 drivers/staging/media/soc_camera/soc_mt9v022.c static int mt9v022_g_skip_top_lines(struct v4l2_subdev *sd, u32 *lines)
sd                755 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                776 drivers/staging/media/soc_camera/soc_mt9v022.c static int mt9v022_enum_mbus_code(struct v4l2_subdev *sd,
sd                780 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                790 drivers/staging/media/soc_camera/soc_mt9v022.c static int mt9v022_g_mbus_config(struct v4l2_subdev *sd,
sd                793 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                807 drivers/staging/media/soc_camera/soc_mt9v022.c static int mt9v022_s_mbus_config(struct v4l2_subdev *sd,
sd                810 drivers/staging/media/soc_camera/soc_mt9v022.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                690 drivers/staging/media/soc_camera/soc_ov5642.c static int ov5642_get_register(struct v4l2_subdev *sd,
sd                693 drivers/staging/media/soc_camera/soc_ov5642.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                709 drivers/staging/media/soc_camera/soc_ov5642.c static int ov5642_set_register(struct v4l2_subdev *sd,
sd                712 drivers/staging/media/soc_camera/soc_ov5642.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                734 drivers/staging/media/soc_camera/soc_ov5642.c static int ov5642_set_resolution(struct v4l2_subdev *sd)
sd                736 drivers/staging/media/soc_camera/soc_ov5642.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                787 drivers/staging/media/soc_camera/soc_ov5642.c static int ov5642_set_fmt(struct v4l2_subdev *sd,
sd                792 drivers/staging/media/soc_camera/soc_ov5642.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                818 drivers/staging/media/soc_camera/soc_ov5642.c static int ov5642_get_fmt(struct v4l2_subdev *sd,
sd                823 drivers/staging/media/soc_camera/soc_ov5642.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                840 drivers/staging/media/soc_camera/soc_ov5642.c static int ov5642_enum_mbus_code(struct v4l2_subdev *sd,
sd                851 drivers/staging/media/soc_camera/soc_ov5642.c static int ov5642_set_selection(struct v4l2_subdev *sd,
sd                855 drivers/staging/media/soc_camera/soc_ov5642.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                878 drivers/staging/media/soc_camera/soc_ov5642.c 		ret = ov5642_set_resolution(sd);
sd                885 drivers/staging/media/soc_camera/soc_ov5642.c static int ov5642_get_selection(struct v4l2_subdev *sd,
sd                889 drivers/staging/media/soc_camera/soc_ov5642.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                910 drivers/staging/media/soc_camera/soc_ov5642.c static int ov5642_g_mbus_config(struct v4l2_subdev *sd,
sd                920 drivers/staging/media/soc_camera/soc_ov5642.c static int ov5642_s_power(struct v4l2_subdev *sd, int on)
sd                922 drivers/staging/media/soc_camera/soc_ov5642.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                936 drivers/staging/media/soc_camera/soc_ov5642.c 		ret = ov5642_set_resolution(sd);
sd                 19 drivers/staging/media/soc_camera/soc_ov9740.c #define to_ov9740(sd)		container_of(sd, struct ov9740_priv, subdev)
sd                501 drivers/staging/media/soc_camera/soc_ov9740.c static int ov9740_s_stream(struct v4l2_subdev *sd, int enable)
sd                503 drivers/staging/media/soc_camera/soc_ov9740.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                504 drivers/staging/media/soc_camera/soc_ov9740.c 	struct ov9740_priv *priv = to_ov9740(sd);
sd                667 drivers/staging/media/soc_camera/soc_ov9740.c static int ov9740_s_fmt(struct v4l2_subdev *sd,
sd                670 drivers/staging/media/soc_camera/soc_ov9740.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                671 drivers/staging/media/soc_camera/soc_ov9740.c 	struct ov9740_priv *priv = to_ov9740(sd);
sd                687 drivers/staging/media/soc_camera/soc_ov9740.c static int ov9740_set_fmt(struct v4l2_subdev *sd,
sd                703 drivers/staging/media/soc_camera/soc_ov9740.c 		return ov9740_s_fmt(sd, mf);
sd                708 drivers/staging/media/soc_camera/soc_ov9740.c static int ov9740_enum_mbus_code(struct v4l2_subdev *sd,
sd                720 drivers/staging/media/soc_camera/soc_ov9740.c static int ov9740_get_selection(struct v4l2_subdev *sd,
sd                760 drivers/staging/media/soc_camera/soc_ov9740.c static int ov9740_s_power(struct v4l2_subdev *sd, int on)
sd                762 drivers/staging/media/soc_camera/soc_ov9740.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                764 drivers/staging/media/soc_camera/soc_ov9740.c 	struct ov9740_priv *priv = to_ov9740(sd);
sd                773 drivers/staging/media/soc_camera/soc_ov9740.c 			ov9740_s_fmt(sd, &priv->current_mf);
sd                774 drivers/staging/media/soc_camera/soc_ov9740.c 			ov9740_s_stream(sd, 1);
sd                778 drivers/staging/media/soc_camera/soc_ov9740.c 			ov9740_s_stream(sd, 0);
sd                789 drivers/staging/media/soc_camera/soc_ov9740.c static int ov9740_get_register(struct v4l2_subdev *sd,
sd                792 drivers/staging/media/soc_camera/soc_ov9740.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                810 drivers/staging/media/soc_camera/soc_ov9740.c static int ov9740_set_register(struct v4l2_subdev *sd,
sd                813 drivers/staging/media/soc_camera/soc_ov9740.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                824 drivers/staging/media/soc_camera/soc_ov9740.c 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                825 drivers/staging/media/soc_camera/soc_ov9740.c 	struct ov9740_priv *priv = to_ov9740(sd);
sd                874 drivers/staging/media/soc_camera/soc_ov9740.c static int ov9740_g_mbus_config(struct v4l2_subdev *sd,
sd                877 drivers/staging/media/soc_camera/soc_ov9740.c 	struct i2c_client *client = v4l2_get_subdevdata(sd);
sd                648 drivers/target/loopback/tcm_loop.c 	struct scsi_device *sd;
sd                655 drivers/target/loopback/tcm_loop.c 	sd = scsi_device_lookup(tl_hba->sh, 0, tl_tpg->tl_tpgt,
sd                657 drivers/target/loopback/tcm_loop.c 	if (!sd) {
sd                665 drivers/target/loopback/tcm_loop.c 	scsi_remove_device(sd);
sd                666 drivers/target/loopback/tcm_loop.c 	scsi_device_put(sd);
sd                288 drivers/target/target_core_pscsi.c 		struct scsi_device *sd)
sd                291 drivers/target/target_core_pscsi.c 	struct request_queue *q = sd->request_queue;
sd                293 drivers/target/target_core_pscsi.c 	pdv->pdv_sd = sd;
sd                295 drivers/target/target_core_pscsi.c 	if (!sd->queue_depth) {
sd                296 drivers/target/target_core_pscsi.c 		sd->queue_depth = PSCSI_DEFAULT_QUEUEDEPTH;
sd                299 drivers/target/target_core_pscsi.c 			" queue_depth to %d\n", sd->channel, sd->id,
sd                300 drivers/target/target_core_pscsi.c 				sd->lun, sd->queue_depth);
sd                304 drivers/target/target_core_pscsi.c 		min_not_zero((int)sd->sector_size, 512);
sd                306 drivers/target/target_core_pscsi.c 		min_not_zero(sd->host->max_sectors, queue_max_hw_sectors(q));
sd                307 drivers/target/target_core_pscsi.c 	dev->dev_attrib.hw_queue_depth = sd->queue_depth;
sd                312 drivers/target/target_core_pscsi.c 	pscsi_set_inquiry_info(sd, &dev->t10_wwn);
sd                318 drivers/target/target_core_pscsi.c 	if (!pscsi_get_inquiry_vpd_serial(sd, &dev->t10_wwn)) {
sd                323 drivers/target/target_core_pscsi.c 		pscsi_get_inquiry_vpd_device_ident(sd, &dev->t10_wwn);
sd                329 drivers/target/target_core_pscsi.c 	if (sd->type == TYPE_TAPE) {
sd                330 drivers/target/target_core_pscsi.c 		pscsi_tape_read_blocksize(dev, sd);
sd                331 drivers/target/target_core_pscsi.c 		dev->dev_attrib.hw_block_size = sd->sector_size;
sd                354 drivers/target/target_core_pscsi.c static int pscsi_create_type_disk(struct se_device *dev, struct scsi_device *sd)
sd                359 drivers/target/target_core_pscsi.c 	struct Scsi_Host *sh = sd->host;
sd                363 drivers/target/target_core_pscsi.c 	if (scsi_device_get(sd)) {
sd                365 drivers/target/target_core_pscsi.c 			sh->host_no, sd->channel, sd->id, sd->lun);
sd                378 drivers/target/target_core_pscsi.c 		scsi_device_put(sd);
sd                383 drivers/target/target_core_pscsi.c 	ret = pscsi_add_device_to_list(dev, sd);
sd                386 drivers/target/target_core_pscsi.c 		scsi_device_put(sd);
sd                391 drivers/target/target_core_pscsi.c 		phv->phv_host_id, sd->type == TYPE_DISK ? "DISK" : "ZBC",
sd                392 drivers/target/target_core_pscsi.c 		sh->host_no, sd->channel, sd->id, sd->lun);
sd                399 drivers/target/target_core_pscsi.c static int pscsi_create_type_nondisk(struct se_device *dev, struct scsi_device *sd)
sd                403 drivers/target/target_core_pscsi.c 	struct Scsi_Host *sh = sd->host;
sd                406 drivers/target/target_core_pscsi.c 	if (scsi_device_get(sd)) {
sd                408 drivers/target/target_core_pscsi.c 			sh->host_no, sd->channel, sd->id, sd->lun);
sd                414 drivers/target/target_core_pscsi.c 	ret = pscsi_add_device_to_list(dev, sd);
sd                416 drivers/target/target_core_pscsi.c 		scsi_device_put(sd);
sd                420 drivers/target/target_core_pscsi.c 		phv->phv_host_id, scsi_device_type(sd->type), sh->host_no,
sd                421 drivers/target/target_core_pscsi.c 		sd->channel, sd->id, sd->lun);
sd                430 drivers/target/target_core_pscsi.c 	struct scsi_device *sd;
sd                499 drivers/target/target_core_pscsi.c 	list_for_each_entry(sd, &sh->__devices, siblings) {
sd                500 drivers/target/target_core_pscsi.c 		if ((pdv->pdv_channel_id != sd->channel) ||
sd                501 drivers/target/target_core_pscsi.c 		    (pdv->pdv_target_id != sd->id) ||
sd                502 drivers/target/target_core_pscsi.c 		    (pdv->pdv_lun_id != sd->lun))
sd                509 drivers/target/target_core_pscsi.c 		switch (sd->type) {
sd                512 drivers/target/target_core_pscsi.c 			ret = pscsi_create_type_disk(dev, sd);
sd                515 drivers/target/target_core_pscsi.c 			ret = pscsi_create_type_nondisk(dev, sd);
sd                563 drivers/target/target_core_pscsi.c 	struct scsi_device *sd = pdv->pdv_sd;
sd                565 drivers/target/target_core_pscsi.c 	if (sd) {
sd                571 drivers/target/target_core_pscsi.c 		if ((sd->type == TYPE_DISK || sd->type == TYPE_ZBC) &&
sd                587 drivers/target/target_core_pscsi.c 		scsi_device_put(sd);
sd                597 drivers/target/target_core_pscsi.c 	struct scsi_device *sd = pdv->pdv_sd;
sd                639 drivers/target/target_core_pscsi.c 	if (sd->type != TYPE_TAPE || !cmd->data_length)
sd                675 drivers/target/target_core_pscsi.c 		sd->sector_size = blocksize;
sd                688 drivers/target/target_core_pscsi.c 		if (sd->type == TYPE_TAPE &&
sd                798 drivers/target/target_core_pscsi.c 	struct scsi_device *sd = pdv->pdv_sd;
sd                812 drivers/target/target_core_pscsi.c 	if (sd) {
sd                814 drivers/target/target_core_pscsi.c 			__stringify(INQUIRY_VENDOR_LEN) "s", sd->vendor);
sd                816 drivers/target/target_core_pscsi.c 			__stringify(INQUIRY_MODEL_LEN) "s", sd->model);
sd                818 drivers/target/target_core_pscsi.c 			__stringify(INQUIRY_REVISION_LEN) "s\n", sd->rev);
sd               1023 drivers/target/target_core_pscsi.c 	struct scsi_device *sd = pdv->pdv_sd;
sd               1025 drivers/target/target_core_pscsi.c 	return (sd) ? sd->type : TYPE_NO_LUN;
sd               1094 drivers/usb/gadget/function/f_mass_storage.c 	u32		sd, sdinfo;
sd               1121 drivers/usb/gadget/function/f_mass_storage.c 		sd = SS_LOGICAL_UNIT_NOT_SUPPORTED;
sd               1125 drivers/usb/gadget/function/f_mass_storage.c 		sd = curlun->sense_data;
sd               1135 drivers/usb/gadget/function/f_mass_storage.c 	buf[2] = SK(sd);
sd               1138 drivers/usb/gadget/function/f_mass_storage.c 	buf[12] = ASC(sd);
sd               1139 drivers/usb/gadget/function/f_mass_storage.c 	buf[13] = ASCQ(sd);
sd               1604 drivers/usb/gadget/function/f_mass_storage.c 	u32			sd, sdinfo = 0;
sd               1613 drivers/usb/gadget/function/f_mass_storage.c 		sd = curlun->sense_data;
sd               1616 drivers/usb/gadget/function/f_mass_storage.c 		sd = SS_NO_SENSE;
sd               1618 drivers/usb/gadget/function/f_mass_storage.c 		sd = SS_LOGICAL_UNIT_NOT_SUPPORTED;
sd               1623 drivers/usb/gadget/function/f_mass_storage.c 		sd = SS_INVALID_COMMAND;
sd               1624 drivers/usb/gadget/function/f_mass_storage.c 	} else if (sd != SS_NO_SENSE) {
sd               1629 drivers/usb/gadget/function/f_mass_storage.c 				SK(sd), ASC(sd), ASCQ(sd), sdinfo);
sd               1366 drivers/usb/serial/usb-serial.c 	struct usb_serial_driver * const *sd;
sd               1394 drivers/usb/serial/usb-serial.c 	for (sd = serial_drivers; *sd; ++sd) {
sd               1395 drivers/usb/serial/usb-serial.c 		if ((*sd)->reset_resume) {
sd               1405 drivers/usb/serial/usb-serial.c 	for (sd = serial_drivers; *sd; ++sd) {
sd               1406 drivers/usb/serial/usb-serial.c 		(*sd)->usb_driver = udriver;
sd               1407 drivers/usb/serial/usb-serial.c 		rc = usb_serial_register(*sd);
sd               1418 drivers/usb/serial/usb-serial.c 	while (sd-- > serial_drivers)
sd               1419 drivers/usb/serial/usb-serial.c 		usb_serial_deregister(*sd);
sd                 51 drivers/video/fbdev/aty/radeon_pm.c #define BUGFIX(model, sv, sd, pm, fn) { \
sd                 54 drivers/video/fbdev/aty/radeon_pm.c 	.subsystem_device = sd, \
sd                130 drivers/video/fbdev/omap2/omapfb/dss/dss.h 	u16 sd;
sd                 45 drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c 	unsigned n, m, mf, m2, sd;
sd                 82 drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c 	sd = DIV_ROUND_UP(fint * m, 250000000);
sd                 85 drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c 		n, m, mf, m2, sd);
sd                 92 drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c 	pi->sd = sd;
sd                357 drivers/video/fbdev/omap2/omapfb/dss/pll.c 	l = FLD_MOD(l, cinfo->sd, 17, 10);	/* PLL_REGSD */
sd                207 fs/befs/debug.c befs_dump_small_data(const struct super_block *sb, befs_small_data *sd)
sd                953 fs/cifs/netmisc.c 	SMB_DATE *sd = (SMB_DATE *)&date;
sd                965 fs/cifs/netmisc.c 	day = sd->Day;
sd                966 fs/cifs/netmisc.c 	month = sd->Month;
sd                975 fs/cifs/netmisc.c 	year = sd->Year;
sd                 80 fs/configfs/configfs_internal.h extern const unsigned char * configfs_get_name(struct configfs_dirent *sd);
sd                 81 fs/configfs/configfs_internal.h extern void configfs_drop_dentry(struct configfs_dirent *sd, struct dentry *parent);
sd                104 fs/configfs/configfs_internal.h 	struct configfs_dirent * sd = dentry->d_fsdata;
sd                105 fs/configfs/configfs_internal.h 	return ((struct config_item *) sd->s_element);
sd                110 fs/configfs/configfs_internal.h 	struct configfs_dirent * sd = dentry->d_fsdata;
sd                111 fs/configfs/configfs_internal.h 	return ((struct configfs_attribute *) sd->s_element);
sd                127 fs/configfs/configfs_internal.h 		struct configfs_dirent * sd = dentry->d_fsdata;
sd                128 fs/configfs/configfs_internal.h 		item = config_item_get(sd->s_element);
sd                135 fs/configfs/configfs_internal.h static inline void release_configfs_dirent(struct configfs_dirent * sd)
sd                137 fs/configfs/configfs_internal.h 	if (!(sd->s_type & CONFIGFS_ROOT)) {
sd                138 fs/configfs/configfs_internal.h 		kfree(sd->s_iattr);
sd                139 fs/configfs/configfs_internal.h 		put_fragment(sd->s_frag);
sd                140 fs/configfs/configfs_internal.h 		kmem_cache_free(configfs_dir_cachep, sd);
sd                144 fs/configfs/configfs_internal.h static inline struct configfs_dirent * configfs_get(struct configfs_dirent * sd)
sd                146 fs/configfs/configfs_internal.h 	if (sd) {
sd                147 fs/configfs/configfs_internal.h 		WARN_ON(!atomic_read(&sd->s_count));
sd                148 fs/configfs/configfs_internal.h 		atomic_inc(&sd->s_count);
sd                150 fs/configfs/configfs_internal.h 	return sd;
sd                153 fs/configfs/configfs_internal.h static inline void configfs_put(struct configfs_dirent * sd)
sd                155 fs/configfs/configfs_internal.h 	WARN_ON(!atomic_read(&sd->s_count));
sd                156 fs/configfs/configfs_internal.h 	if (atomic_dec_and_test(&sd->s_count))
sd                157 fs/configfs/configfs_internal.h 		release_configfs_dirent(sd);
sd                 42 fs/configfs/dir.c 	struct configfs_dirent *sd = dentry->d_fsdata;
sd                 44 fs/configfs/dir.c 	if (sd) {
sd                 53 fs/configfs/dir.c 		if (sd->s_dentry == dentry)
sd                 54 fs/configfs/dir.c 			sd->s_dentry = NULL;
sd                 57 fs/configfs/dir.c 		configfs_put(sd);
sd                 88 fs/configfs/dir.c static void configfs_init_dirent_depth(struct configfs_dirent *sd)
sd                 90 fs/configfs/dir.c 	sd->s_depth = -1;
sd                 94 fs/configfs/dir.c 					  struct configfs_dirent *sd)
sd                 99 fs/configfs/dir.c 		sd->s_depth = parent_depth + 1;
sd                103 fs/configfs/dir.c configfs_adjust_dir_dirent_depth_before_populate(struct configfs_dirent *sd)
sd                115 fs/configfs/dir.c 	if (sd->s_depth == -1)
sd                120 fs/configfs/dir.c 		sd->s_depth = 0;
sd                124 fs/configfs/dir.c configfs_adjust_dir_dirent_depth_after_populate(struct configfs_dirent *sd)
sd                127 fs/configfs/dir.c 	sd->s_depth = -1;
sd                132 fs/configfs/dir.c static void configfs_init_dirent_depth(struct configfs_dirent *sd)
sd                137 fs/configfs/dir.c 					  struct configfs_dirent *sd)
sd                142 fs/configfs/dir.c configfs_adjust_dir_dirent_depth_before_populate(struct configfs_dirent *sd)
sd                147 fs/configfs/dir.c configfs_adjust_dir_dirent_depth_after_populate(struct configfs_dirent *sd)
sd                186 fs/configfs/dir.c 	struct configfs_dirent * sd;
sd                188 fs/configfs/dir.c 	sd = kmem_cache_zalloc(configfs_dir_cachep, GFP_KERNEL);
sd                189 fs/configfs/dir.c 	if (!sd)
sd                192 fs/configfs/dir.c 	atomic_set(&sd->s_count, 1);
sd                193 fs/configfs/dir.c 	INIT_LIST_HEAD(&sd->s_children);
sd                194 fs/configfs/dir.c 	sd->s_element = element;
sd                195 fs/configfs/dir.c 	sd->s_type = type;
sd                196 fs/configfs/dir.c 	configfs_init_dirent_depth(sd);
sd                200 fs/configfs/dir.c 		kmem_cache_free(configfs_dir_cachep, sd);
sd                203 fs/configfs/dir.c 	sd->s_frag = get_fragment(frag);
sd                204 fs/configfs/dir.c 	list_add(&sd->s_sibling, &parent_sd->s_children);
sd                207 fs/configfs/dir.c 	return sd;
sd                220 fs/configfs/dir.c 	struct configfs_dirent * sd;
sd                222 fs/configfs/dir.c 	list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
sd                223 fs/configfs/dir.c 		if (sd->s_element) {
sd                224 fs/configfs/dir.c 			const unsigned char *existing = configfs_get_name(sd);
sd                240 fs/configfs/dir.c 	struct configfs_dirent * sd;
sd                242 fs/configfs/dir.c 	sd = configfs_new_dirent(parent_sd, element, type, frag);
sd                243 fs/configfs/dir.c 	if (IS_ERR(sd))
sd                244 fs/configfs/dir.c 		return PTR_ERR(sd);
sd                246 fs/configfs/dir.c 	sd->s_mode = mode;
sd                247 fs/configfs/dir.c 	sd->s_dentry = dentry;
sd                249 fs/configfs/dir.c 		dentry->d_fsdata = configfs_get(sd);
sd                256 fs/configfs/dir.c 	struct configfs_dirent *sd = dentry->d_fsdata;
sd                258 fs/configfs/dir.c 	if (!sd)
sd                261 fs/configfs/dir.c 	list_del_init(&sd->s_sibling);
sd                263 fs/configfs/dir.c 	configfs_put(sd);
sd                323 fs/configfs/dir.c static void configfs_dir_set_ready(struct configfs_dirent *sd)
sd                327 fs/configfs/dir.c 	sd->s_type &= ~CONFIGFS_USET_CREATING;
sd                328 fs/configfs/dir.c 	list_for_each_entry(child_sd, &sd->s_children, s_sibling)
sd                343 fs/configfs/dir.c int configfs_dirent_is_ready(struct configfs_dirent *sd)
sd                348 fs/configfs/dir.c 	ret = !(sd->s_type & CONFIGFS_USET_CREATING);
sd                425 fs/configfs/dir.c static int configfs_attach_attr(struct configfs_dirent * sd, struct dentry * dentry)
sd                427 fs/configfs/dir.c 	struct configfs_attribute * attr = sd->s_element;
sd                431 fs/configfs/dir.c 	dentry->d_fsdata = configfs_get(sd);
sd                432 fs/configfs/dir.c 	sd->s_dentry = dentry;
sd                437 fs/configfs/dir.c 		configfs_put(sd);
sd                440 fs/configfs/dir.c 	if (sd->s_type & CONFIGFS_ITEM_BIN_ATTR) {
sd                456 fs/configfs/dir.c 	struct configfs_dirent * sd;
sd                472 fs/configfs/dir.c 	list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
sd                473 fs/configfs/dir.c 		if (sd->s_type & CONFIGFS_NOT_PINNED) {
sd                474 fs/configfs/dir.c 			const unsigned char * name = configfs_get_name(sd);
sd                480 fs/configfs/dir.c 			err = configfs_attach_attr(sd, dentry);
sd                511 fs/configfs/dir.c 	struct configfs_dirent *sd;
sd                522 fs/configfs/dir.c 	list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
sd                523 fs/configfs/dir.c 		if (!sd->s_element ||
sd                524 fs/configfs/dir.c 		    (sd->s_type & CONFIGFS_NOT_PINNED))
sd                526 fs/configfs/dir.c 		if (sd->s_type & CONFIGFS_USET_DEFAULT) {
sd                528 fs/configfs/dir.c 			if (sd->s_type & CONFIGFS_USET_IN_MKDIR) {
sd                530 fs/configfs/dir.c 					*wait= dget(sd->s_dentry);
sd                538 fs/configfs/dir.c 			ret = configfs_detach_prep(sd->s_dentry, wait);
sd                558 fs/configfs/dir.c 	struct configfs_dirent *sd;
sd                562 fs/configfs/dir.c 	list_for_each_entry(sd, &parent_sd->s_children, s_sibling)
sd                563 fs/configfs/dir.c 		if (sd->s_type & CONFIGFS_USET_DEFAULT)
sd                564 fs/configfs/dir.c 			configfs_detach_rollback(sd->s_dentry);
sd                571 fs/configfs/dir.c 	struct configfs_dirent * sd, * tmp;
sd                580 fs/configfs/dir.c 	list_for_each_entry_safe(sd, tmp, &parent_sd->s_children, s_sibling) {
sd                581 fs/configfs/dir.c 		if (!sd->s_element || !(sd->s_type & CONFIGFS_NOT_PINNED))
sd                584 fs/configfs/dir.c 		list_del_init(&sd->s_sibling);
sd                586 fs/configfs/dir.c 		configfs_drop_dentry(sd, dentry);
sd                587 fs/configfs/dir.c 		configfs_put(sd);
sd                637 fs/configfs/dir.c 	struct configfs_dirent *sd, *tmp;
sd                643 fs/configfs/dir.c 	list_for_each_entry_safe(sd, tmp, &parent_sd->s_children, s_sibling) {
sd                644 fs/configfs/dir.c 		if (!sd->s_element ||
sd                645 fs/configfs/dir.c 		    !(sd->s_type & CONFIGFS_USET_DEFAULT))
sd                648 fs/configfs/dir.c 		child = sd->s_dentry;
sd                652 fs/configfs/dir.c 		configfs_detach_group(sd->s_element);
sd                681 fs/configfs/dir.c 	struct configfs_dirent *sd;
sd                696 fs/configfs/dir.c 			sd = child->d_fsdata;
sd                697 fs/configfs/dir.c 			sd->s_type |= CONFIGFS_USET_DEFAULT;
sd                868 fs/configfs/dir.c 	struct configfs_dirent *sd;
sd                872 fs/configfs/dir.c 		sd = dentry->d_fsdata;
sd                873 fs/configfs/dir.c 		sd->s_type |= CONFIGFS_USET_DIR;
sd                885 fs/configfs/dir.c 		configfs_adjust_dir_dirent_depth_before_populate(sd);
sd                892 fs/configfs/dir.c 		configfs_adjust_dir_dirent_depth_after_populate(sd);
sd                956 fs/configfs/dir.c static void configfs_dump_one(struct configfs_dirent *sd, int level)
sd                958 fs/configfs/dir.c 	pr_info("%*s\"%s\":\n", level, " ", configfs_get_name(sd));
sd                960 fs/configfs/dir.c #define type_print(_type) if (sd->s_type & _type) pr_info("%*s %s\n", level, " ", #_type);
sd                971 fs/configfs/dir.c static int configfs_dump(struct configfs_dirent *sd, int level)
sd                976 fs/configfs/dir.c 	configfs_dump_one(sd, level);
sd                978 fs/configfs/dir.c 	if (!(sd->s_type & (CONFIGFS_DIR|CONFIGFS_ROOT)))
sd                981 fs/configfs/dir.c 	list_for_each_entry(child_sd, &sd->s_children, s_sibling) {
sd               1053 fs/configfs/dir.c 	struct configfs_dirent *child_sd, *sd;
sd               1057 fs/configfs/dir.c 	sd = origin->d_fsdata;
sd               1059 fs/configfs/dir.c 	if (sd->s_element == target)  /* Boo-yah */
sd               1062 fs/configfs/dir.c 	list_for_each_entry(child_sd, &sd->s_children, s_sibling) {
sd               1176 fs/configfs/dir.c 	struct configfs_dirent *sd;
sd               1184 fs/configfs/dir.c 	sd = target->ci_dentry->d_fsdata;
sd               1185 fs/configfs/dir.c 	BUG_ON(sd->s_dependent_count < 1);
sd               1187 fs/configfs/dir.c 	sd->s_dependent_count -= 1;
sd               1278 fs/configfs/dir.c 	struct configfs_dirent *sd;
sd               1284 fs/configfs/dir.c 	sd = dentry->d_parent->d_fsdata;
sd               1290 fs/configfs/dir.c 	if (!configfs_dirent_is_ready(sd)) {
sd               1295 fs/configfs/dir.c 	if (!(sd->s_type & CONFIGFS_USET_DIR)) {
sd               1404 fs/configfs/dir.c 	sd->s_type |= CONFIGFS_USET_IN_MKDIR;
sd               1413 fs/configfs/dir.c 	sd->s_type &= ~CONFIGFS_USET_IN_MKDIR;
sd               1458 fs/configfs/dir.c 	struct configfs_dirent *sd;
sd               1463 fs/configfs/dir.c 	sd = dentry->d_fsdata;
sd               1464 fs/configfs/dir.c 	if (sd->s_type & CONFIGFS_USET_DEFAULT)
sd               1495 fs/configfs/dir.c 		ret = sd->s_dependent_count ? -EBUSY : 0;
sd               1517 fs/configfs/dir.c 	frag = sd->s_frag;
sd               1537 fs/configfs/dir.c 	if (sd->s_type & CONFIGFS_USET_DIR) {
sd               1618 fs/configfs/dir.c static inline unsigned char dt_type(struct configfs_dirent *sd)
sd               1620 fs/configfs/dir.c 	return (sd->s_mode >> 12) & 15;
sd               1702 fs/configfs/dir.c 			struct configfs_dirent *sd = dentry->d_fsdata;
sd               1709 fs/configfs/dir.c 			p = sd->s_children.next;
sd               1710 fs/configfs/dir.c 			while (n && p != &sd->s_children) {
sd               1793 fs/configfs/dir.c 	struct configfs_dirent *sd = dentry->d_fsdata;
sd               1794 fs/configfs/dir.c 	struct configfs_fragment *frag = sd->s_frag;
sd               1870 fs/configfs/dir.c 	struct configfs_dirent *sd;
sd               1886 fs/configfs/dir.c 	sd = root->d_fsdata;
sd               1887 fs/configfs/dir.c 	link_group(to_config_group(sd->s_element), group);
sd               1896 fs/configfs/dir.c 		err = configfs_attach_group(sd->s_element, &group->cg_item,
sd               1925 fs/configfs/dir.c 	struct configfs_dirent *sd = dentry->d_fsdata;
sd               1926 fs/configfs/dir.c 	struct configfs_fragment *frag = sd->s_frag;
sd                 53 fs/configfs/file.c 	struct configfs_dirent *sd = file->f_path.dentry->d_fsdata;
sd                 55 fs/configfs/file.c 	return sd->s_frag;
sd                 46 fs/configfs/inode.c 	struct configfs_dirent * sd = dentry->d_fsdata;
sd                 51 fs/configfs/inode.c 	if (!sd)
sd                 54 fs/configfs/inode.c 	sd_iattr = sd->s_iattr;
sd                 61 fs/configfs/inode.c 		sd_iattr->ia_mode = sd->s_mode;
sd                 66 fs/configfs/inode.c 		sd->s_iattr = sd_iattr;
sd                 89 fs/configfs/inode.c 		sd_iattr->ia_mode = sd->s_mode = mode;
sd                112 fs/configfs/inode.c struct inode *configfs_new_inode(umode_t mode, struct configfs_dirent *sd,
sd                121 fs/configfs/inode.c 		if (sd->s_iattr) {
sd                126 fs/configfs/inode.c 			set_inode_attr(inode, sd->s_iattr);
sd                135 fs/configfs/inode.c static void configfs_set_inode_lock_class(struct configfs_dirent *sd,
sd                138 fs/configfs/inode.c 	int depth = sd->s_depth;
sd                157 fs/configfs/inode.c static void configfs_set_inode_lock_class(struct configfs_dirent *sd,
sd                167 fs/configfs/inode.c 	struct configfs_dirent *sd;
sd                176 fs/configfs/inode.c 	sd = dentry->d_fsdata;
sd                177 fs/configfs/inode.c 	inode = configfs_new_inode(mode, sd, dentry->d_sb);
sd                183 fs/configfs/inode.c 	configfs_set_inode_lock_class(sd, inode);
sd                190 fs/configfs/inode.c const unsigned char * configfs_get_name(struct configfs_dirent *sd)
sd                194 fs/configfs/inode.c 	BUG_ON(!sd || !sd->s_element);
sd                197 fs/configfs/inode.c 	if (sd->s_type & (CONFIGFS_DIR | CONFIGFS_ITEM_LINK))
sd                198 fs/configfs/inode.c 		return sd->s_dentry->d_name.name;
sd                200 fs/configfs/inode.c 	if (sd->s_type & (CONFIGFS_ITEM_ATTR | CONFIGFS_ITEM_BIN_ATTR)) {
sd                201 fs/configfs/inode.c 		attr = sd->s_element;
sd                212 fs/configfs/inode.c void configfs_drop_dentry(struct configfs_dirent * sd, struct dentry * parent)
sd                214 fs/configfs/inode.c 	struct dentry * dentry = sd->s_dentry;
sd                230 fs/configfs/inode.c 	struct configfs_dirent * sd;
sd                238 fs/configfs/inode.c 	list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
sd                239 fs/configfs/inode.c 		if (!sd->s_element)
sd                241 fs/configfs/inode.c 		if (!strcmp(configfs_get_name(sd), name)) {
sd                243 fs/configfs/inode.c 			list_del_init(&sd->s_sibling);
sd                245 fs/configfs/inode.c 			configfs_drop_dentry(sd, dir);
sd                246 fs/configfs/inode.c 			configfs_put(sd);
sd                146 fs/configfs/symlink.c 	struct configfs_dirent *sd;
sd                151 fs/configfs/symlink.c 	sd = dentry->d_parent->d_fsdata;
sd                156 fs/configfs/symlink.c 	if (!configfs_dirent_is_ready(sd))
sd                222 fs/configfs/symlink.c 	struct configfs_dirent *sd = dentry->d_fsdata, *target_sd;
sd                228 fs/configfs/symlink.c 	if (!(sd->s_type & CONFIGFS_ITEM_LINK))
sd                231 fs/configfs/symlink.c 	target_sd = sd->s_element;
sd                237 fs/configfs/symlink.c 	list_del_init(&sd->s_sibling);
sd                239 fs/configfs/symlink.c 	configfs_drop_dentry(sd, dentry->d_parent);
sd                241 fs/configfs/symlink.c 	configfs_put(sd);
sd                173 fs/crypto/hooks.c 	struct fscrypt_symlink_data *sd;
sd                182 fs/crypto/hooks.c 		sd = (struct fscrypt_symlink_data *)disk_link->name;
sd                184 fs/crypto/hooks.c 		sd = kmalloc(disk_link->len, GFP_NOFS);
sd                185 fs/crypto/hooks.c 		if (!sd)
sd                188 fs/crypto/hooks.c 	ciphertext_len = disk_link->len - sizeof(*sd);
sd                189 fs/crypto/hooks.c 	sd->len = cpu_to_le16(ciphertext_len);
sd                191 fs/crypto/hooks.c 	err = fname_encrypt(inode, &iname, sd->encrypted_path, ciphertext_len);
sd                200 fs/crypto/hooks.c 	sd->encrypted_path[ciphertext_len] = '\0';
sd                209 fs/crypto/hooks.c 		disk_link->name = (unsigned char *)sd;
sd                214 fs/crypto/hooks.c 		kfree(sd);
sd                237 fs/crypto/hooks.c 	const struct fscrypt_symlink_data *sd;
sd                265 fs/crypto/hooks.c 	if (max_size < sizeof(*sd))
sd                267 fs/crypto/hooks.c 	sd = caddr;
sd                268 fs/crypto/hooks.c 	cstr.name = (unsigned char *)sd->encrypted_path;
sd                269 fs/crypto/hooks.c 	cstr.len = le16_to_cpu(sd->len);
sd                274 fs/crypto/hooks.c 	if (cstr.len + sizeof(*sd) - 1 > max_size)
sd                819 fs/nfsd/vfs.c  		  struct splice_desc *sd)
sd                821 fs/nfsd/vfs.c  	struct svc_rqst *rqstp = sd->u.data;
sd                826 fs/nfsd/vfs.c  	size = sd->len;
sd                847 fs/nfsd/vfs.c  				    struct splice_desc *sd)
sd                849 fs/nfsd/vfs.c  	return __splice_from_pipe(pipe, sd, nfsd_splice_actor);
sd                883 fs/nfsd/vfs.c  	struct splice_desc sd = {
sd                893 fs/nfsd/vfs.c  	host_err = splice_direct_to_actor(file, &sd, nfsd_direct_splice_actor);
sd               1193 fs/nilfs2/super.c 				       struct nilfs_super_data *sd)
sd               1199 fs/nilfs2/super.c 	if (!(sd->flags & SB_RDONLY)) {
sd               1215 fs/nilfs2/super.c 	sd->cno = val;
sd               1228 fs/nilfs2/super.c static int nilfs_identify(char *data, struct nilfs_super_data *sd)
sd               1241 fs/nilfs2/super.c 								  sd);
sd               1267 fs/nilfs2/super.c 	struct nilfs_super_data sd;
sd               1276 fs/nilfs2/super.c 	sd.bdev = blkdev_get_by_path(dev_name, mode, fs_type);
sd               1277 fs/nilfs2/super.c 	if (IS_ERR(sd.bdev))
sd               1278 fs/nilfs2/super.c 		return ERR_CAST(sd.bdev);
sd               1280 fs/nilfs2/super.c 	sd.cno = 0;
sd               1281 fs/nilfs2/super.c 	sd.flags = flags;
sd               1282 fs/nilfs2/super.c 	if (nilfs_identify((char *)data, &sd)) {
sd               1292 fs/nilfs2/super.c 	mutex_lock(&sd.bdev->bd_fsfreeze_mutex);
sd               1293 fs/nilfs2/super.c 	if (sd.bdev->bd_fsfreeze_count > 0) {
sd               1294 fs/nilfs2/super.c 		mutex_unlock(&sd.bdev->bd_fsfreeze_mutex);
sd               1299 fs/nilfs2/super.c 		 sd.bdev);
sd               1300 fs/nilfs2/super.c 	mutex_unlock(&sd.bdev->bd_fsfreeze_mutex);
sd               1311 fs/nilfs2/super.c 		snprintf(s->s_id, sizeof(s->s_id), "%pg", sd.bdev);
sd               1312 fs/nilfs2/super.c 		sb_set_blocksize(s, block_size(sd.bdev));
sd               1319 fs/nilfs2/super.c 	} else if (!sd.cno) {
sd               1339 fs/nilfs2/super.c 	if (sd.cno) {
sd               1340 fs/nilfs2/super.c 		err = nilfs_attach_snapshot(s, sd.cno, &root_dentry);
sd               1348 fs/nilfs2/super.c 		blkdev_put(sd.bdev, mode);
sd               1357 fs/nilfs2/super.c 		blkdev_put(sd.bdev, mode);
sd                238 fs/ocfs2/cluster/netdebug.c 	struct o2net_sock_debug *sd = seq->private;
sd                239 fs/ocfs2/cluster/netdebug.c 	struct o2net_sock_container *sc, *dummy_sc = sd->dbg_sock;
sd                250 fs/ocfs2/cluster/netdebug.c 	struct o2net_sock_debug *sd = seq->private;
sd                251 fs/ocfs2/cluster/netdebug.c 	struct o2net_sock_container *sc, *dummy_sc = sd->dbg_sock;
sd                351 fs/ocfs2/cluster/netdebug.c 	struct o2net_sock_debug *sd = seq->private;
sd                352 fs/ocfs2/cluster/netdebug.c 	struct o2net_sock_container *sc, *dummy_sc = sd->dbg_sock;
sd                358 fs/ocfs2/cluster/netdebug.c 		if (sd->dbg_ctxt == SHOW_SOCK_CONTAINERS)
sd                382 fs/ocfs2/cluster/netdebug.c 	struct o2net_sock_debug *sd;
sd                389 fs/ocfs2/cluster/netdebug.c 	sd = __seq_open_private(file, &sc_seq_ops, sizeof(*sd));
sd                390 fs/ocfs2/cluster/netdebug.c 	if (!sd) {
sd                395 fs/ocfs2/cluster/netdebug.c 	sd->dbg_ctxt = ctxt;
sd                396 fs/ocfs2/cluster/netdebug.c 	sd->dbg_sock = dummy_sc;
sd                406 fs/ocfs2/cluster/netdebug.c 	struct o2net_sock_debug *sd = seq->private;
sd                407 fs/ocfs2/cluster/netdebug.c 	struct o2net_sock_container *dummy_sc = sd->dbg_sock;
sd               1259 fs/reiserfs/inode.c 		struct stat_data_v1 *sd =
sd               1265 fs/reiserfs/inode.c 		inode->i_mode = sd_v1_mode(sd);
sd               1266 fs/reiserfs/inode.c 		set_nlink(inode, sd_v1_nlink(sd));
sd               1267 fs/reiserfs/inode.c 		i_uid_write(inode, sd_v1_uid(sd));
sd               1268 fs/reiserfs/inode.c 		i_gid_write(inode, sd_v1_gid(sd));
sd               1269 fs/reiserfs/inode.c 		inode->i_size = sd_v1_size(sd);
sd               1270 fs/reiserfs/inode.c 		inode->i_atime.tv_sec = sd_v1_atime(sd);
sd               1271 fs/reiserfs/inode.c 		inode->i_mtime.tv_sec = sd_v1_mtime(sd);
sd               1272 fs/reiserfs/inode.c 		inode->i_ctime.tv_sec = sd_v1_ctime(sd);
sd               1277 fs/reiserfs/inode.c 		inode->i_blocks = sd_v1_blocks(sd);
sd               1294 fs/reiserfs/inode.c 		rdev = sd_v1_rdev(sd);
sd               1296 fs/reiserfs/inode.c 		    sd_v1_first_direct_byte(sd);
sd               1318 fs/reiserfs/inode.c 		struct stat_data *sd = (struct stat_data *)ih_item_body(bh, ih);
sd               1320 fs/reiserfs/inode.c 		inode->i_mode = sd_v2_mode(sd);
sd               1321 fs/reiserfs/inode.c 		set_nlink(inode, sd_v2_nlink(sd));
sd               1322 fs/reiserfs/inode.c 		i_uid_write(inode, sd_v2_uid(sd));
sd               1323 fs/reiserfs/inode.c 		inode->i_size = sd_v2_size(sd);
sd               1324 fs/reiserfs/inode.c 		i_gid_write(inode, sd_v2_gid(sd));
sd               1325 fs/reiserfs/inode.c 		inode->i_mtime.tv_sec = sd_v2_mtime(sd);
sd               1326 fs/reiserfs/inode.c 		inode->i_atime.tv_sec = sd_v2_atime(sd);
sd               1327 fs/reiserfs/inode.c 		inode->i_ctime.tv_sec = sd_v2_ctime(sd);
sd               1331 fs/reiserfs/inode.c 		inode->i_blocks = sd_v2_blocks(sd);
sd               1332 fs/reiserfs/inode.c 		rdev = sd_v2_rdev(sd);
sd               1337 fs/reiserfs/inode.c 			inode->i_generation = sd_v2_generation(sd);
sd               1352 fs/reiserfs/inode.c 		REISERFS_I(inode)->i_attrs = sd_v2_attrs(sd);
sd               1353 fs/reiserfs/inode.c 		sd_attrs_to_i_attrs(sd_v2_attrs(sd), inode);
sd               1376 fs/reiserfs/inode.c static void inode2sd(void *sd, struct inode *inode, loff_t size)
sd               1378 fs/reiserfs/inode.c 	struct stat_data *sd_v2 = (struct stat_data *)sd;
sd               1397 fs/reiserfs/inode.c static void inode2sd_v1(void *sd, struct inode *inode, loff_t size)
sd               1399 fs/reiserfs/inode.c 	struct stat_data_v1 *sd_v1 = (struct stat_data_v1 *)sd;
sd               1939 fs/reiserfs/inode.c 	struct stat_data sd;
sd               2044 fs/reiserfs/inode.c 		inode2sd_v1(&sd, inode, inode->i_size);
sd               2046 fs/reiserfs/inode.c 		inode2sd(&sd, inode, inode->i_size);
sd               2069 fs/reiserfs/inode.c 				 (char *)(&sd));
sd                 40 fs/reiserfs/item_ops.c 		struct stat_data_v1 *sd = (struct stat_data_v1 *)item;
sd                 42 fs/reiserfs/item_ops.c 		printk("\t0%-6o | %6u | %2u | %d | %u\n", sd_v1_mode(sd),
sd                 43 fs/reiserfs/item_ops.c 		       sd_v1_size(sd), sd_v1_nlink(sd),
sd                 44 fs/reiserfs/item_ops.c 		       sd_v1_first_direct_byte(sd),
sd                 45 fs/reiserfs/item_ops.c 		       sd_v1_mtime(sd));
sd                 47 fs/reiserfs/item_ops.c 		struct stat_data *sd = (struct stat_data *)item;
sd                 49 fs/reiserfs/item_ops.c 		printk("\t0%-6o | %6llu | %2u | %d | %u\n", sd_v2_mode(sd),
sd                 50 fs/reiserfs/item_ops.c 		       (unsigned long long)sd_v2_size(sd), sd_v2_nlink(sd),
sd                 51 fs/reiserfs/item_ops.c 		       sd_v2_rdev(sd), sd_v2_mtime(sd));
sd                435 fs/splice.c    			    struct pipe_buffer *buf, struct splice_desc *sd)
sd                437 fs/splice.c    	struct file *file = sd->u.file;
sd                438 fs/splice.c    	loff_t pos = sd->pos;
sd                444 fs/splice.c    	more = (sd->flags & SPLICE_F_MORE) ? MSG_MORE : 0;
sd                446 fs/splice.c    	if (sd->len < sd->total_len && pipe->nrbufs > 1)
sd                450 fs/splice.c    				    sd->len, &pos, more);
sd                481 fs/splice.c    static int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_desc *sd,
sd                489 fs/splice.c    		sd->len = buf->len;
sd                490 fs/splice.c    		if (sd->len > sd->total_len)
sd                491 fs/splice.c    			sd->len = sd->total_len;
sd                500 fs/splice.c    		ret = actor(pipe, buf, sd);
sd                507 fs/splice.c    		sd->num_spliced += ret;
sd                508 fs/splice.c    		sd->len -= ret;
sd                509 fs/splice.c    		sd->pos += ret;
sd                510 fs/splice.c    		sd->total_len -= ret;
sd                517 fs/splice.c    				sd->need_wakeup = true;
sd                520 fs/splice.c    		if (!sd->total_len)
sd                537 fs/splice.c    static int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_desc *sd)
sd                550 fs/splice.c    		if (!pipe->waiting_writers && sd->num_spliced)
sd                553 fs/splice.c    		if (sd->flags & SPLICE_F_NONBLOCK)
sd                559 fs/splice.c    		if (sd->need_wakeup) {
sd                561 fs/splice.c    			sd->need_wakeup = false;
sd                579 fs/splice.c    static void splice_from_pipe_begin(struct splice_desc *sd)
sd                581 fs/splice.c    	sd->num_spliced = 0;
sd                582 fs/splice.c    	sd->need_wakeup = false;
sd                595 fs/splice.c    static void splice_from_pipe_end(struct pipe_inode_info *pipe, struct splice_desc *sd)
sd                597 fs/splice.c    	if (sd->need_wakeup)
sd                614 fs/splice.c    ssize_t __splice_from_pipe(struct pipe_inode_info *pipe, struct splice_desc *sd,
sd                619 fs/splice.c    	splice_from_pipe_begin(sd);
sd                622 fs/splice.c    		ret = splice_from_pipe_next(pipe, sd);
sd                624 fs/splice.c    			ret = splice_from_pipe_feed(pipe, sd, actor);
sd                626 fs/splice.c    	splice_from_pipe_end(pipe, sd);
sd                628 fs/splice.c    	return sd->num_spliced ? sd->num_spliced : ret;
sd                651 fs/splice.c    	struct splice_desc sd = {
sd                659 fs/splice.c    	ret = __splice_from_pipe(pipe, &sd, actor);
sd                683 fs/splice.c    	struct splice_desc sd = {
sd                699 fs/splice.c    	splice_from_pipe_begin(&sd);
sd                700 fs/splice.c    	while (sd.total_len) {
sd                705 fs/splice.c    		ret = splice_from_pipe_next(pipe, &sd);
sd                721 fs/splice.c    		left = sd.total_len;
sd                745 fs/splice.c    		iov_iter_bvec(&from, WRITE, array, n, sd.total_len - left);
sd                746 fs/splice.c    		ret = vfs_iter_write(out, &from, &sd.pos, 0);
sd                750 fs/splice.c    		sd.num_spliced += ret;
sd                751 fs/splice.c    		sd.total_len -= ret;
sd                752 fs/splice.c    		*ppos = sd.pos;
sd                764 fs/splice.c    					sd.need_wakeup = true;
sd                774 fs/splice.c    	splice_from_pipe_end(pipe, &sd);
sd                778 fs/splice.c    	if (sd.num_spliced)
sd                779 fs/splice.c    		ret = sd.num_spliced;
sd                787 fs/splice.c    			  struct splice_desc *sd)
sd                791 fs/splice.c    	loff_t tmp = sd->pos;
sd                794 fs/splice.c    	ret = __kernel_write(sd->u.file, data + buf->offset, sd->len, &tmp);
sd                893 fs/splice.c    ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
sd                936 fs/splice.c    	len = sd->total_len;
sd                937 fs/splice.c    	flags = sd->flags;
sd                942 fs/splice.c    	sd->flags &= ~SPLICE_F_NONBLOCK;
sd                943 fs/splice.c    	more = sd->flags & SPLICE_F_MORE;
sd                950 fs/splice.c    		loff_t pos = sd->pos, prev_pos = pos;
sd                960 fs/splice.c    		sd->total_len = read_len;
sd                968 fs/splice.c    			sd->flags |= SPLICE_F_MORE;
sd                970 fs/splice.c    			sd->flags &= ~SPLICE_F_MORE;
sd                976 fs/splice.c    		ret = actor(pipe, sd);
sd                978 fs/splice.c    			sd->pos = prev_pos;
sd                984 fs/splice.c    		sd->pos = pos;
sd                987 fs/splice.c    			sd->pos = prev_pos + ret;
sd               1017 fs/splice.c    			       struct splice_desc *sd)
sd               1019 fs/splice.c    	struct file *file = sd->u.file;
sd               1021 fs/splice.c    	return do_splice_from(pipe, file, sd->opos, sd->total_len,
sd               1022 fs/splice.c    			      sd->flags);
sd               1044 fs/splice.c    	struct splice_desc sd = {
sd               1064 fs/splice.c    	ret = splice_direct_to_actor(in, &sd, direct_splice_actor);
sd               1066 fs/splice.c    		*ppos = sd.pos;
sd               1254 fs/splice.c    			struct splice_desc *sd)
sd               1256 fs/splice.c    	int n = copy_page_to_iter(buf->page, buf->offset, sd->len, sd->u.data);
sd               1257 fs/splice.c    	return n == sd->len ? n : -EFAULT;
sd               1268 fs/splice.c    	struct splice_desc sd = {
sd               1278 fs/splice.c    	if (sd.total_len) {
sd               1280 fs/splice.c    		ret = __splice_from_pipe(pipe, &sd, pipe_to_user);
sd                 50 fs/sysfs/dir.c 		parent = kobj->parent->sd;
sd                 68 fs/sysfs/dir.c 	kobj->sd = kn;
sd                 82 fs/sysfs/dir.c 	struct kernfs_node *kn = kobj->sd;
sd                 97 fs/sysfs/dir.c 	kobj->sd = NULL;
sd                112 fs/sysfs/dir.c 	parent = kernfs_get_parent(kobj->sd);
sd                113 fs/sysfs/dir.c 	ret = kernfs_rename_ns(kobj->sd, parent, new_name, new_ns);
sd                121 fs/sysfs/dir.c 	struct kernfs_node *kn = kobj->sd;
sd                124 fs/sysfs/dir.c 	new_parent = new_parent_kobj && new_parent_kobj->sd ?
sd                125 fs/sysfs/dir.c 		new_parent_kobj->sd : sysfs_root_kn;
sd                137 fs/sysfs/dir.c 	struct kernfs_node *kn, *parent = parent_kobj->sd;
sd                158 fs/sysfs/dir.c 	struct kernfs_node *parent = parent_kobj->sd;
sd                174 fs/sysfs/file.c 	struct kernfs_node *kn = kobj->sd, *tmp;
sd                327 fs/sysfs/file.c 	if (WARN_ON(!kobj || !kobj->sd || !attr))
sd                331 fs/sysfs/file.c 	return sysfs_add_file_mode_ns(kobj->sd, attr, false, attr->mode,
sd                366 fs/sysfs/file.c 		parent = kernfs_find_and_get(kobj->sd, group);
sd                368 fs/sysfs/file.c 		parent = kobj->sd;
sd                398 fs/sysfs/file.c 	kn = kernfs_find_and_get(kobj->sd, attr->name);
sd                428 fs/sysfs/file.c 	kn = kernfs_find_and_get(kobj->sd, attr->name);
sd                467 fs/sysfs/file.c 	struct kernfs_node *parent = kobj->sd;
sd                482 fs/sysfs/file.c 	struct kernfs_node *parent = kobj->sd;
sd                517 fs/sysfs/file.c 		parent = kernfs_find_and_get(kobj->sd, group);
sd                519 fs/sysfs/file.c 		parent = kobj->sd;
sd                541 fs/sysfs/file.c 	if (WARN_ON(!kobj || !kobj->sd || !attr))
sd                545 fs/sysfs/file.c 	return sysfs_add_file_mode_ns(kobj->sd, &attr->attr, true,
sd                558 fs/sysfs/file.c 	kernfs_remove_by_name(kobj->sd, attr->attr.name);
sd                115 fs/sysfs/group.c 	if (WARN_ON(!kobj || (!update && !kobj->sd)))
sd                119 fs/sysfs/group.c 	if (unlikely(update && !kobj->sd))
sd                129 fs/sysfs/group.c 			kn = kernfs_find_and_get(kobj->sd, grp->name);
sd                136 fs/sysfs/group.c 			kn = kernfs_create_dir_ns(kobj->sd, grp->name,
sd                141 fs/sysfs/group.c 					sysfs_warn_dup(kobj->sd, grp->name);
sd                146 fs/sysfs/group.c 		kn = kobj->sd;
sd                272 fs/sysfs/group.c 	struct kernfs_node *parent = kobj->sd;
sd                335 fs/sysfs/group.c 	parent = kernfs_find_and_get(kobj->sd, grp->name);
sd                365 fs/sysfs/group.c 	parent = kernfs_find_and_get(kobj->sd, grp->name);
sd                387 fs/sysfs/group.c 	parent = kernfs_find_and_get(kobj->sd, group_name);
sd                409 fs/sysfs/group.c 	parent = kernfs_find_and_get(kobj->sd, group_name);
sd                438 fs/sysfs/group.c 	target = target_kobj->sd;
sd                445 fs/sysfs/group.c 	entry = kernfs_find_and_get(target_kobj->sd, target_name);
sd                451 fs/sysfs/group.c 	link = kernfs_create_link(kobj->sd, target_name, entry);
sd                453 fs/sysfs/group.c 		sysfs_warn_dup(kobj->sd, target_name);
sd                 35 fs/sysfs/symlink.c 	if (target_kobj->sd) {
sd                 36 fs/sysfs/symlink.c 		target = target_kobj->sd;
sd                 75 fs/sysfs/symlink.c 		parent = kobj->sd;
sd                132 fs/sysfs/symlink.c 	if (targ->sd && kernfs_ns_enabled(kobj->sd))
sd                133 fs/sysfs/symlink.c 		ns = targ->sd->ns;
sd                135 fs/sysfs/symlink.c 	kernfs_remove_by_name_ns(kobj->sd, name, ns);
sd                150 fs/sysfs/symlink.c 		parent = kobj->sd;
sd                176 fs/sysfs/symlink.c 		parent = kobj->sd;
sd                178 fs/sysfs/symlink.c 	if (targ->sd)
sd                179 fs/sysfs/symlink.c 		old_ns = targ->sd->ns;
sd                 84 include/linux/iio/adc/ad_sigma_delta.h static inline int ad_sigma_delta_set_channel(struct ad_sigma_delta *sd,
sd                 87 include/linux/iio/adc/ad_sigma_delta.h 	if (sd->info->set_channel)
sd                 88 include/linux/iio/adc/ad_sigma_delta.h 		return sd->info->set_channel(sd, channel);
sd                 93 include/linux/iio/adc/ad_sigma_delta.h static inline int ad_sigma_delta_set_mode(struct ad_sigma_delta *sd,
sd                 96 include/linux/iio/adc/ad_sigma_delta.h 	if (sd->info->set_mode)
sd                 97 include/linux/iio/adc/ad_sigma_delta.h 		return sd->info->set_mode(sd, mode);
sd                102 include/linux/iio/adc/ad_sigma_delta.h static inline int ad_sigma_delta_postprocess_sample(struct ad_sigma_delta *sd,
sd                105 include/linux/iio/adc/ad_sigma_delta.h 	if (sd->info->postprocess_sample)
sd                106 include/linux/iio/adc/ad_sigma_delta.h 		return sd->info->postprocess_sample(sd, raw_sample);
sd                 71 include/linux/kobject.h 	struct kernfs_node	*sd; /* sysfs directory entry */
sd                136 include/linux/kobject.h 	return kobj->sd && kobj->sd->dir.subdirs;
sd               3024 include/linux/netdevice.h static inline void input_queue_head_incr(struct softnet_data *sd)
sd               3027 include/linux/netdevice.h 	sd->input_queue_head++;
sd               3031 include/linux/netdevice.h static inline void input_queue_tail_incr_save(struct softnet_data *sd,
sd               3035 include/linux/netdevice.h 	*qtail = ++sd->input_queue_tail;
sd                 82 include/linux/pci-acpi.h 					    void *sd);
sd                 19 include/linux/phy/omap_usb.h 	u8	sd;
sd                148 include/linux/sched/topology.h static inline struct cpumask *sched_domain_span(struct sched_domain *sd)
sd                150 include/linux/sched/topology.h 	return to_cpumask(sd->span);
sd                172 include/linux/sched/topology.h 	struct sched_domain *__percpu *sd;
sd                 35 include/linux/seccomp.h extern int __secure_computing(const struct seccomp_data *sd);
sd                 36 include/linux/seccomp.h static inline int secure_computing(const struct seccomp_data *sd)
sd                 39 include/linux/seccomp.h 		return  __secure_computing(sd);
sd                 62 include/linux/seccomp.h static inline int secure_computing(struct seccomp_data *sd) { return 0; }
sd                317 include/media/davinci/vpbe_osd.h 	int (*initialize)(struct osd_state *sd);
sd                318 include/media/davinci/vpbe_osd.h 	int (*request_layer)(struct osd_state *sd, enum osd_layer layer);
sd                319 include/media/davinci/vpbe_osd.h 	void (*release_layer)(struct osd_state *sd, enum osd_layer layer);
sd                320 include/media/davinci/vpbe_osd.h 	int (*enable_layer)(struct osd_state *sd, enum osd_layer layer,
sd                322 include/media/davinci/vpbe_osd.h 	void (*disable_layer)(struct osd_state *sd, enum osd_layer layer);
sd                323 include/media/davinci/vpbe_osd.h 	int (*set_layer_config)(struct osd_state *sd, enum osd_layer layer,
sd                325 include/media/davinci/vpbe_osd.h 	void (*get_layer_config)(struct osd_state *sd, enum osd_layer layer,
sd                327 include/media/davinci/vpbe_osd.h 	void (*start_layer)(struct osd_state *sd, enum osd_layer layer,
sd                330 include/media/davinci/vpbe_osd.h 	void (*set_left_margin)(struct osd_state *sd, u32 val);
sd                331 include/media/davinci/vpbe_osd.h 	void (*set_top_margin)(struct osd_state *sd, u32 val);
sd                332 include/media/davinci/vpbe_osd.h 	void (*set_interpolation_filter)(struct osd_state *sd, int filter);
sd                333 include/media/davinci/vpbe_osd.h 	int (*set_vid_expansion)(struct osd_state *sd,
sd                336 include/media/davinci/vpbe_osd.h 	void (*get_vid_expansion)(struct osd_state *sd,
sd                339 include/media/davinci/vpbe_osd.h 	void (*set_zoom)(struct osd_state *sd, enum osd_layer layer,
sd                 94 include/media/davinci/vpfe_capture.h 	struct v4l2_subdev **sd;
sd                 86 include/media/i2c/adp1653.h 	int (*power)(struct v4l2_subdev *sd, int on);
sd                 96 include/media/i2c/adp1653.h #define to_adp1653_flash(sd)	container_of(sd, struct adp1653_flash, subdev)
sd                368 include/media/soc_camera.h 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
sd                369 include/media/soc_camera.h 	struct soc_camera_device *icd = v4l2_get_subdev_hostdata(sd);
sd                 90 include/media/v4l2-async.h 				      struct v4l2_async_subdev *sd);
sd                132 include/media/v4l2-async.h 	struct v4l2_subdev *sd;
sd                264 include/media/v4l2-async.h int v4l2_async_subdev_notifier_register(struct v4l2_subdev *sd,
sd                299 include/media/v4l2-async.h int v4l2_async_register_subdev(struct v4l2_subdev *sd);
sd                321 include/media/v4l2-async.h v4l2_async_register_subdev_sensor_common(struct v4l2_subdev *sd);
sd                329 include/media/v4l2-async.h void v4l2_async_unregister_subdev(struct v4l2_subdev *sd);
sd                181 include/media/v4l2-common.h void v4l2_i2c_subdev_set_name(struct v4l2_subdev *sd, struct i2c_client *client,
sd                192 include/media/v4l2-common.h void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client,
sd                202 include/media/v4l2-common.h unsigned short v4l2_i2c_subdev_addr(struct v4l2_subdev *sd);
sd                219 include/media/v4l2-common.h void v4l2_i2c_subdev_unregister(struct v4l2_subdev *sd);
sd                240 include/media/v4l2-common.h v4l2_i2c_subdev_set_name(struct v4l2_subdev *sd, struct i2c_client *client,
sd                245 include/media/v4l2-common.h v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client,
sd                249 include/media/v4l2-common.h static inline unsigned short v4l2_i2c_subdev_addr(struct v4l2_subdev *sd)
sd                260 include/media/v4l2-common.h static inline void v4l2_i2c_subdev_unregister(struct v4l2_subdev *sd)
sd                295 include/media/v4l2-common.h void v4l2_spi_subdev_init(struct v4l2_subdev *sd, struct spi_device *spi,
sd                303 include/media/v4l2-common.h void v4l2_spi_subdev_unregister(struct v4l2_subdev *sd);
sd                315 include/media/v4l2-common.h v4l2_spi_subdev_init(struct v4l2_subdev *sd, struct spi_device *spi,
sd                319 include/media/v4l2-common.h static inline void v4l2_spi_subdev_unregister(struct v4l2_subdev *sd)
sd                435 include/media/v4l2-common.h 		    struct v4l2_subdev *sd, struct v4l2_streamparm *a);
sd                448 include/media/v4l2-common.h 		    struct v4l2_subdev *sd, struct v4l2_streamparm *a);
sd               1322 include/media/v4l2-ctrls.h int v4l2_ctrl_subdev_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
sd               1331 include/media/v4l2-ctrls.h int v4l2_ctrl_subdev_log_status(struct v4l2_subdev *sd);
sd                 53 include/media/v4l2-device.h 	void (*notify)(struct v4l2_subdev *sd,
sd                162 include/media/v4l2-device.h 					     struct v4l2_subdev *sd);
sd                174 include/media/v4l2-device.h void v4l2_device_unregister_subdev(struct v4l2_subdev *sd);
sd                195 include/media/v4l2-device.h static inline void v4l2_subdev_notify(struct v4l2_subdev *sd,
sd                198 include/media/v4l2-device.h 	if (sd && sd->v4l2_dev && sd->v4l2_dev->notify)
sd                199 include/media/v4l2-device.h 		sd->v4l2_dev->notify(sd, notification, arg);
sd                227 include/media/v4l2-device.h #define v4l2_device_for_each_subdev(sd, v4l2_dev)			\
sd                228 include/media/v4l2-device.h 	list_for_each_entry(sd, &(v4l2_dev)->subdevs, list)
sd                250 include/media/v4l2-device.h #define __v4l2_device_call_subdevs_p(v4l2_dev, sd, cond, o, f, args...)	\
sd                252 include/media/v4l2-device.h 		list_for_each_entry((sd), &(v4l2_dev)->subdevs, list)	\
sd                253 include/media/v4l2-device.h 			if ((cond) && (sd)->ops->o && (sd)->ops->o->f)	\
sd                254 include/media/v4l2-device.h 				(sd)->ops->o->f((sd) , ##args);		\
sd                307 include/media/v4l2-device.h #define __v4l2_device_call_subdevs_until_err_p(v4l2_dev, sd, cond, o, f, args...) \
sd                311 include/media/v4l2-device.h 	list_for_each_entry((sd), &(v4l2_dev)->subdevs, list) {		\
sd                312 include/media/v4l2-device.h 		if ((cond) && (sd)->ops->o && (sd)->ops->o->f)		\
sd                313 include/media/v4l2-device.h 			__err = (sd)->ops->o->f((sd) , ##args);		\
sd                176 include/media/v4l2-event.h int v4l2_event_subdev_unsubscribe(struct v4l2_subdev *sd,
sd                196 include/media/v4l2-event.h int v4l2_src_change_event_subdev_subscribe(struct v4l2_subdev *sd,
sd                 86 include/media/v4l2-flash-led-class.h 	struct v4l2_subdev sd;
sd                 98 include/media/v4l2-flash-led-class.h 							struct v4l2_subdev *sd)
sd                100 include/media/v4l2-flash-led-class.h 	return container_of(sd, struct v4l2_flash, sd);
sd                403 include/media/v4l2-fwnode.h v4l2_async_register_fwnode_subdev(struct v4l2_subdev *sd,
sd                189 include/media/v4l2-subdev.h 	int (*log_status)(struct v4l2_subdev *sd);
sd                190 include/media/v4l2-subdev.h 	int (*s_io_pin_config)(struct v4l2_subdev *sd, size_t n,
sd                192 include/media/v4l2-subdev.h 	int (*init)(struct v4l2_subdev *sd, u32 val);
sd                193 include/media/v4l2-subdev.h 	int (*load_fw)(struct v4l2_subdev *sd);
sd                194 include/media/v4l2-subdev.h 	int (*reset)(struct v4l2_subdev *sd, u32 val);
sd                195 include/media/v4l2-subdev.h 	int (*s_gpio)(struct v4l2_subdev *sd, u32 val);
sd                196 include/media/v4l2-subdev.h 	long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg);
sd                198 include/media/v4l2-subdev.h 	long (*compat_ioctl32)(struct v4l2_subdev *sd, unsigned int cmd,
sd                202 include/media/v4l2-subdev.h 	int (*g_register)(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg);
sd                203 include/media/v4l2-subdev.h 	int (*s_register)(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg);
sd                205 include/media/v4l2-subdev.h 	int (*s_power)(struct v4l2_subdev *sd, int on);
sd                206 include/media/v4l2-subdev.h 	int (*interrupt_service_routine)(struct v4l2_subdev *sd,
sd                208 include/media/v4l2-subdev.h 	int (*subscribe_event)(struct v4l2_subdev *sd, struct v4l2_fh *fh,
sd                210 include/media/v4l2-subdev.h 	int (*unsubscribe_event)(struct v4l2_subdev *sd, struct v4l2_fh *fh,
sd                265 include/media/v4l2-subdev.h 	int (*standby)(struct v4l2_subdev *sd);
sd                266 include/media/v4l2-subdev.h 	int (*s_radio)(struct v4l2_subdev *sd);
sd                267 include/media/v4l2-subdev.h 	int (*s_frequency)(struct v4l2_subdev *sd, const struct v4l2_frequency *freq);
sd                268 include/media/v4l2-subdev.h 	int (*g_frequency)(struct v4l2_subdev *sd, struct v4l2_frequency *freq);
sd                269 include/media/v4l2-subdev.h 	int (*enum_freq_bands)(struct v4l2_subdev *sd, struct v4l2_frequency_band *band);
sd                270 include/media/v4l2-subdev.h 	int (*g_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
sd                271 include/media/v4l2-subdev.h 	int (*s_tuner)(struct v4l2_subdev *sd, const struct v4l2_tuner *vt);
sd                272 include/media/v4l2-subdev.h 	int (*g_modulator)(struct v4l2_subdev *sd, struct v4l2_modulator *vm);
sd                273 include/media/v4l2-subdev.h 	int (*s_modulator)(struct v4l2_subdev *sd, const struct v4l2_modulator *vm);
sd                274 include/media/v4l2-subdev.h 	int (*s_type_addr)(struct v4l2_subdev *sd, struct tuner_setup *type);
sd                275 include/media/v4l2-subdev.h 	int (*s_config)(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *config);
sd                305 include/media/v4l2-subdev.h 	int (*s_clock_freq)(struct v4l2_subdev *sd, u32 freq);
sd                306 include/media/v4l2-subdev.h 	int (*s_i2s_clock_freq)(struct v4l2_subdev *sd, u32 freq);
sd                307 include/media/v4l2-subdev.h 	int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config);
sd                308 include/media/v4l2-subdev.h 	int (*s_stream)(struct v4l2_subdev *sd, int enable);
sd                416 include/media/v4l2-subdev.h 	int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config);
sd                417 include/media/v4l2-subdev.h 	int (*s_crystal_freq)(struct v4l2_subdev *sd, u32 freq, u32 flags);
sd                418 include/media/v4l2-subdev.h 	int (*g_std)(struct v4l2_subdev *sd, v4l2_std_id *norm);
sd                419 include/media/v4l2-subdev.h 	int (*s_std)(struct v4l2_subdev *sd, v4l2_std_id norm);
sd                420 include/media/v4l2-subdev.h 	int (*s_std_output)(struct v4l2_subdev *sd, v4l2_std_id std);
sd                421 include/media/v4l2-subdev.h 	int (*g_std_output)(struct v4l2_subdev *sd, v4l2_std_id *std);
sd                422 include/media/v4l2-subdev.h 	int (*querystd)(struct v4l2_subdev *sd, v4l2_std_id *std);
sd                423 include/media/v4l2-subdev.h 	int (*g_tvnorms)(struct v4l2_subdev *sd, v4l2_std_id *std);
sd                424 include/media/v4l2-subdev.h 	int (*g_tvnorms_output)(struct v4l2_subdev *sd, v4l2_std_id *std);
sd                425 include/media/v4l2-subdev.h 	int (*g_input_status)(struct v4l2_subdev *sd, u32 *status);
sd                426 include/media/v4l2-subdev.h 	int (*s_stream)(struct v4l2_subdev *sd, int enable);
sd                427 include/media/v4l2-subdev.h 	int (*g_pixelaspect)(struct v4l2_subdev *sd, struct v4l2_fract *aspect);
sd                428 include/media/v4l2-subdev.h 	int (*g_frame_interval)(struct v4l2_subdev *sd,
sd                430 include/media/v4l2-subdev.h 	int (*s_frame_interval)(struct v4l2_subdev *sd,
sd                432 include/media/v4l2-subdev.h 	int (*s_dv_timings)(struct v4l2_subdev *sd,
sd                434 include/media/v4l2-subdev.h 	int (*g_dv_timings)(struct v4l2_subdev *sd,
sd                436 include/media/v4l2-subdev.h 	int (*query_dv_timings)(struct v4l2_subdev *sd,
sd                438 include/media/v4l2-subdev.h 	int (*g_mbus_config)(struct v4l2_subdev *sd,
sd                440 include/media/v4l2-subdev.h 	int (*s_mbus_config)(struct v4l2_subdev *sd,
sd                442 include/media/v4l2-subdev.h 	int (*s_rx_buffer)(struct v4l2_subdev *sd, void *buf,
sd                482 include/media/v4l2-subdev.h 	int (*decode_vbi_line)(struct v4l2_subdev *sd, struct v4l2_decode_vbi_line *vbi_line);
sd                483 include/media/v4l2-subdev.h 	int (*s_vbi_data)(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *vbi_data);
sd                484 include/media/v4l2-subdev.h 	int (*g_vbi_data)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_data *vbi_data);
sd                485 include/media/v4l2-subdev.h 	int (*g_sliced_vbi_cap)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_cap *cap);
sd                486 include/media/v4l2-subdev.h 	int (*s_raw_fmt)(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt);
sd                487 include/media/v4l2-subdev.h 	int (*g_sliced_fmt)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt);
sd                488 include/media/v4l2-subdev.h 	int (*s_sliced_fmt)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt);
sd                502 include/media/v4l2-subdev.h 	int (*g_skip_top_lines)(struct v4l2_subdev *sd, u32 *lines);
sd                503 include/media/v4l2-subdev.h 	int (*g_skip_frames)(struct v4l2_subdev *sd, u32 *frames);
sd                601 include/media/v4l2-subdev.h 	int (*rx_read)(struct v4l2_subdev *sd, u8 *buf, size_t count,
sd                604 include/media/v4l2-subdev.h 	int (*rx_g_parameters)(struct v4l2_subdev *sd,
sd                606 include/media/v4l2-subdev.h 	int (*rx_s_parameters)(struct v4l2_subdev *sd,
sd                610 include/media/v4l2-subdev.h 	int (*tx_write)(struct v4l2_subdev *sd, u8 *buf, size_t count,
sd                613 include/media/v4l2-subdev.h 	int (*tx_g_parameters)(struct v4l2_subdev *sd,
sd                615 include/media/v4l2-subdev.h 	int (*tx_s_parameters)(struct v4l2_subdev *sd,
sd                675 include/media/v4l2-subdev.h 	int (*init_cfg)(struct v4l2_subdev *sd,
sd                677 include/media/v4l2-subdev.h 	int (*enum_mbus_code)(struct v4l2_subdev *sd,
sd                680 include/media/v4l2-subdev.h 	int (*enum_frame_size)(struct v4l2_subdev *sd,
sd                683 include/media/v4l2-subdev.h 	int (*enum_frame_interval)(struct v4l2_subdev *sd,
sd                686 include/media/v4l2-subdev.h 	int (*get_fmt)(struct v4l2_subdev *sd,
sd                689 include/media/v4l2-subdev.h 	int (*set_fmt)(struct v4l2_subdev *sd,
sd                692 include/media/v4l2-subdev.h 	int (*get_selection)(struct v4l2_subdev *sd,
sd                695 include/media/v4l2-subdev.h 	int (*set_selection)(struct v4l2_subdev *sd,
sd                698 include/media/v4l2-subdev.h 	int (*get_edid)(struct v4l2_subdev *sd, struct v4l2_edid *edid);
sd                699 include/media/v4l2-subdev.h 	int (*set_edid)(struct v4l2_subdev *sd, struct v4l2_edid *edid);
sd                700 include/media/v4l2-subdev.h 	int (*dv_timings_cap)(struct v4l2_subdev *sd,
sd                702 include/media/v4l2-subdev.h 	int (*enum_dv_timings)(struct v4l2_subdev *sd,
sd                705 include/media/v4l2-subdev.h 	int (*link_validate)(struct v4l2_subdev *sd, struct media_link *link,
sd                709 include/media/v4l2-subdev.h 	int (*get_frame_desc)(struct v4l2_subdev *sd, unsigned int pad,
sd                711 include/media/v4l2-subdev.h 	int (*set_frame_desc)(struct v4l2_subdev *sd, unsigned int pad,
sd                766 include/media/v4l2-subdev.h 	int (*registered)(struct v4l2_subdev *sd);
sd                767 include/media/v4l2-subdev.h 	void (*unregistered)(struct v4l2_subdev *sd);
sd                768 include/media/v4l2-subdev.h 	int (*open)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh);
sd                769 include/media/v4l2-subdev.h 	int (*close)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh);
sd                770 include/media/v4l2-subdev.h 	void (*release)(struct v4l2_subdev *sd);
sd                934 include/media/v4l2-subdev.h *v4l2_subdev_get_try_format(struct v4l2_subdev *sd,
sd                938 include/media/v4l2-subdev.h 	if (WARN_ON(pad >= sd->entity.num_pads))
sd                952 include/media/v4l2-subdev.h *v4l2_subdev_get_try_crop(struct v4l2_subdev *sd,
sd                956 include/media/v4l2-subdev.h 	if (WARN_ON(pad >= sd->entity.num_pads))
sd                970 include/media/v4l2-subdev.h *v4l2_subdev_get_try_compose(struct v4l2_subdev *sd,
sd                974 include/media/v4l2-subdev.h 	if (WARN_ON(pad >= sd->entity.num_pads))
sd                988 include/media/v4l2-subdev.h static inline void v4l2_set_subdevdata(struct v4l2_subdev *sd, void *p)
sd                990 include/media/v4l2-subdev.h 	sd->dev_priv = p;
sd               1000 include/media/v4l2-subdev.h static inline void *v4l2_get_subdevdata(const struct v4l2_subdev *sd)
sd               1002 include/media/v4l2-subdev.h 	return sd->dev_priv;
sd               1011 include/media/v4l2-subdev.h static inline void v4l2_set_subdev_hostdata(struct v4l2_subdev *sd, void *p)
sd               1013 include/media/v4l2-subdev.h 	sd->host_priv = p;
sd               1023 include/media/v4l2-subdev.h static inline void *v4l2_get_subdev_hostdata(const struct v4l2_subdev *sd)
sd               1025 include/media/v4l2-subdev.h 	return sd->host_priv;
sd               1041 include/media/v4l2-subdev.h int v4l2_subdev_link_validate_default(struct v4l2_subdev *sd,
sd               1065 include/media/v4l2-subdev.h v4l2_subdev_pad_config *v4l2_subdev_alloc_pad_config(struct v4l2_subdev *sd);
sd               1082 include/media/v4l2-subdev.h void v4l2_subdev_init(struct v4l2_subdev *sd,
sd               1100 include/media/v4l2-subdev.h #define v4l2_subdev_call(sd, o, f, args...)				\
sd               1102 include/media/v4l2-subdev.h 		struct v4l2_subdev *__sd = (sd);			\
sd               1125 include/media/v4l2-subdev.h #define v4l2_subdev_has_op(sd, o, f) \
sd               1126 include/media/v4l2-subdev.h 	((sd)->ops->o && (sd)->ops->o->f)
sd               1138 include/media/v4l2-subdev.h void v4l2_subdev_notify_event(struct v4l2_subdev *sd,
sd               1849 include/net/xfrm.h void xfrm_dev_backlog(struct softnet_data *sd);
sd               1906 include/net/xfrm.h static inline void xfrm_dev_backlog(struct softnet_data *sd)
sd               1053 include/uapi/linux/sctp.h 	int sd;
sd               2841 kernel/events/core.c 	struct stop_event_data *sd = info;
sd               2842 kernel/events/core.c 	struct perf_event *event = sd->event;
sd               2869 kernel/events/core.c 	if (sd->restart)
sd               2877 kernel/events/core.c 	struct stop_event_data sd = {
sd               2896 kernel/events/core.c 					__perf_event_stop, &sd);
sd               6939 kernel/events/core.c 	struct stop_event_data sd = {
sd               6960 kernel/events/core.c 		ro->err = __perf_event_stop(&sd);
sd                 19 kernel/irq/debugfs.c 				const struct irq_bit_descr *sd, int size)
sd                 23 kernel/irq/debugfs.c 	for (i = 0; i < size; i++, sd++) {
sd                 24 kernel/irq/debugfs.c 		if (state & sd->mask)
sd                 25 kernel/irq/debugfs.c 			seq_printf(m, "%*s%s\n", ind + 12, "", sd->name);
sd               1774 kernel/rcu/rcutorture.c 	int sd;
sd               1794 kernel/rcu/rcutorture.c 	sd = cur_ops->stall_dur() + 1;
sd               1795 kernel/rcu/rcutorture.c 	sd4 = (sd + fwd_progress_div - 1) / fwd_progress_div;
sd               1796 kernel/rcu/rcutorture.c 	dur = sd4 + torture_random(&trs) % (sd - sd4);
sd                555 kernel/sched/core.c 	struct sched_domain *sd;
sd                561 kernel/sched/core.c 	for_each_domain(cpu, sd) {
sd                562 kernel/sched/core.c 		for_each_cpu(i, sched_domain_span(sd)) {
sd               2185 kernel/sched/core.c 		struct sched_domain *sd;
sd               2189 kernel/sched/core.c 		for_each_domain(rq->cpu, sd) {
sd               2190 kernel/sched/core.c 			if (cpumask_test_cpu(cpu, sched_domain_span(sd))) {
sd               2191 kernel/sched/core.c 				__schedstat_inc(sd->ttwu_wake_remote);
sd               6662 kernel/sched/core.c 		rq->sd = NULL;
sd               1878 kernel/sched/deadline.c 	struct sched_domain *sd;
sd               1919 kernel/sched/deadline.c 	for_each_domain(cpu, sd) {
sd               1920 kernel/sched/deadline.c 		if (sd->flags & SD_WAKE_AFFINE) {
sd               1928 kernel/sched/deadline.c 			    cpumask_test_cpu(this_cpu, sched_domain_span(sd))) {
sd               1934 kernel/sched/deadline.c 							sched_domain_span(sd));
sd                249 kernel/sched/debug.c sd_alloc_ctl_domain_table(struct sched_domain *sd)
sd                256 kernel/sched/debug.c 	set_table_entry(&table[0], "min_interval",	  &sd->min_interval,	    sizeof(long), 0644, proc_doulongvec_minmax);
sd                257 kernel/sched/debug.c 	set_table_entry(&table[1], "max_interval",	  &sd->max_interval,	    sizeof(long), 0644, proc_doulongvec_minmax);
sd                258 kernel/sched/debug.c 	set_table_entry(&table[2], "busy_factor",	  &sd->busy_factor,	    sizeof(int),  0644, proc_dointvec_minmax);
sd                259 kernel/sched/debug.c 	set_table_entry(&table[3], "imbalance_pct",	  &sd->imbalance_pct,	    sizeof(int),  0644, proc_dointvec_minmax);
sd                260 kernel/sched/debug.c 	set_table_entry(&table[4], "cache_nice_tries",	  &sd->cache_nice_tries,    sizeof(int),  0644, proc_dointvec_minmax);
sd                261 kernel/sched/debug.c 	set_table_entry(&table[5], "flags",		  &sd->flags,		    sizeof(int),  0644, proc_dointvec_minmax);
sd                262 kernel/sched/debug.c 	set_table_entry(&table[6], "max_newidle_lb_cost", &sd->max_newidle_lb_cost, sizeof(long), 0644, proc_doulongvec_minmax);
sd                263 kernel/sched/debug.c 	set_table_entry(&table[7], "name",		  sd->name,	       CORENAME_MAX_SIZE, 0444, proc_dostring);
sd                272 kernel/sched/debug.c 	struct sched_domain *sd;
sd                276 kernel/sched/debug.c 	for_each_domain(cpu, sd)
sd                283 kernel/sched/debug.c 	for_each_domain(cpu, sd) {
sd                287 kernel/sched/debug.c 		entry->child = sd_alloc_ctl_domain_table(sd);
sd               1752 kernel/sched/fair.c 	struct sched_domain *sd;
sd               1767 kernel/sched/fair.c 	sd = rcu_dereference(per_cpu(sd_numa, env.src_cpu));
sd               1768 kernel/sched/fair.c 	if (sd)
sd               1769 kernel/sched/fair.c 		env.imbalance_pct = 100 + (sd->imbalance_pct - 100) / 2;
sd               1778 kernel/sched/fair.c 	if (unlikely(!sd)) {
sd               5504 kernel/sched/fair.c wake_affine_weight(struct sched_domain *sd, struct task_struct *p,
sd               5531 kernel/sched/fair.c 		prev_eff_load *= 100 + (sd->imbalance_pct - 100) / 2;
sd               5546 kernel/sched/fair.c static int wake_affine(struct sched_domain *sd, struct task_struct *p,
sd               5555 kernel/sched/fair.c 		target = wake_affine_weight(sd, p, this_cpu, prev_cpu, sync);
sd               5561 kernel/sched/fair.c 	schedstat_inc(sd->ttwu_move_affine);
sd               5580 kernel/sched/fair.c find_idlest_group(struct sched_domain *sd, struct task_struct *p,
sd               5583 kernel/sched/fair.c 	struct sched_group *idlest = NULL, *group = sd->groups;
sd               5589 kernel/sched/fair.c 	int imbalance_scale = 100 + (sd->imbalance_pct-100)/2;
sd               5591 kernel/sched/fair.c 				(sd->imbalance_pct-100) / 100;
sd               5661 kernel/sched/fair.c 	} while (group = group->next, group != sd->groups);
sd               5696 kernel/sched/fair.c 	if ((sd->flags & SD_NUMA) &&
sd               5772 kernel/sched/fair.c static inline int find_idlest_cpu(struct sched_domain *sd, struct task_struct *p,
sd               5777 kernel/sched/fair.c 	if (!cpumask_intersects(sched_domain_span(sd), p->cpus_ptr))
sd               5787 kernel/sched/fair.c 	while (sd) {
sd               5792 kernel/sched/fair.c 		if (!(sd->flags & sd_flag)) {
sd               5793 kernel/sched/fair.c 			sd = sd->child;
sd               5797 kernel/sched/fair.c 		group = find_idlest_group(sd, p, cpu, sd_flag);
sd               5799 kernel/sched/fair.c 			sd = sd->child;
sd               5806 kernel/sched/fair.c 			sd = sd->child;
sd               5812 kernel/sched/fair.c 		weight = sd->span_weight;
sd               5813 kernel/sched/fair.c 		sd = NULL;
sd               5818 kernel/sched/fair.c 				sd = tmp;
sd               5883 kernel/sched/fair.c static int select_idle_core(struct task_struct *p, struct sched_domain *sd, int target)
sd               5894 kernel/sched/fair.c 	cpumask_and(cpus, sched_domain_span(sd), p->cpus_ptr);
sd               5941 kernel/sched/fair.c static inline int select_idle_core(struct task_struct *p, struct sched_domain *sd, int target)
sd               5958 kernel/sched/fair.c static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int target)
sd               5983 kernel/sched/fair.c 		u64 span_avg = sd->span_weight * avg_idle;
sd               5992 kernel/sched/fair.c 	cpumask_and(cpus, sched_domain_span(sd), p->cpus_ptr);
sd               6016 kernel/sched/fair.c 	struct sched_domain *sd;
sd               6044 kernel/sched/fair.c 	sd = rcu_dereference(per_cpu(sd_llc, target));
sd               6045 kernel/sched/fair.c 	if (!sd)
sd               6048 kernel/sched/fair.c 	i = select_idle_core(p, sd, target);
sd               6052 kernel/sched/fair.c 	i = select_idle_cpu(p, sd, target);
sd               6366 kernel/sched/fair.c 	struct sched_domain *sd;
sd               6378 kernel/sched/fair.c 	sd = rcu_dereference(*this_cpu_ptr(&sd_asym_cpucapacity));
sd               6379 kernel/sched/fair.c 	while (sd && !cpumask_test_cpu(prev_cpu, sched_domain_span(sd)))
sd               6380 kernel/sched/fair.c 		sd = sd->parent;
sd               6381 kernel/sched/fair.c 	if (!sd)
sd               6397 kernel/sched/fair.c 		for_each_cpu_and(cpu, perf_domain_span(pd), sched_domain_span(sd)) {
sd               6471 kernel/sched/fair.c 	struct sched_domain *tmp, *sd = NULL;
sd               6505 kernel/sched/fair.c 			sd = NULL; /* Prefer wake_affine over balance flags */
sd               6510 kernel/sched/fair.c 			sd = tmp;
sd               6515 kernel/sched/fair.c 	if (unlikely(sd)) {
sd               6517 kernel/sched/fair.c 		new_cpu = find_idlest_cpu(sd, p, cpu, prev_cpu, sd_flag);
sd               7123 kernel/sched/fair.c 	struct sched_domain	*sd;
sd               7197 kernel/sched/fair.c 	if (!p->numa_faults || !(env->sd->flags & SD_NUMA))
sd               7311 kernel/sched/fair.c 	    env->sd->nr_balance_failed > env->sd->cache_nice_tries) {
sd               7313 kernel/sched/fair.c 			schedstat_inc(env->sd->lb_hot_gained[env->idle]);
sd               7359 kernel/sched/fair.c 		schedstat_inc(env->sd->lb_gained[env->idle]);
sd               7412 kernel/sched/fair.c 		if (sched_feat(LB_MIN) && load < 16 && !env->sd->nr_balance_failed)
sd               7451 kernel/sched/fair.c 	schedstat_add(env->sd->lb_gained[env->idle], detached);
sd               7771 kernel/sched/fair.c static unsigned long scale_rt_capacity(struct sched_domain *sd, int cpu)
sd               7794 kernel/sched/fair.c static void update_cpu_capacity(struct sched_domain *sd, int cpu)
sd               7796 kernel/sched/fair.c 	unsigned long capacity = scale_rt_capacity(sd, cpu);
sd               7797 kernel/sched/fair.c 	struct sched_group *sdg = sd->groups;
sd               7810 kernel/sched/fair.c void update_group_capacity(struct sched_domain *sd, int cpu)
sd               7812 kernel/sched/fair.c 	struct sched_domain *child = sd->child;
sd               7813 kernel/sched/fair.c 	struct sched_group *group, *sdg = sd->groups;
sd               7817 kernel/sched/fair.c 	interval = msecs_to_jiffies(sd->balance_interval);
sd               7822 kernel/sched/fair.c 		update_cpu_capacity(sd, cpu);
sd               7851 kernel/sched/fair.c 			if (unlikely(!rq->sd)) {
sd               7854 kernel/sched/fair.c 				sgc = rq->sd->groups->sgc;
sd               7889 kernel/sched/fair.c check_cpu_capacity(struct rq *rq, struct sched_domain *sd)
sd               7891 kernel/sched/fair.c 	return ((rq->cpu_capacity * sd->imbalance_pct) <
sd               7900 kernel/sched/fair.c static inline int check_misfit_status(struct rq *rq, struct sched_domain *sd)
sd               7904 kernel/sched/fair.c 		 check_cpu_capacity(rq, sd));
sd               7960 kernel/sched/fair.c 			(sgs->group_util * env->sd->imbalance_pct))
sd               7981 kernel/sched/fair.c 			(sgs->group_util * env->sd->imbalance_pct))
sd               8088 kernel/sched/fair.c 		if (env->sd->flags & SD_ASYM_CPUCAPACITY &&
sd               8148 kernel/sched/fair.c 	if (!(env->sd->flags & SD_ASYM_CPUCAPACITY))
sd               8170 kernel/sched/fair.c 	if (!(env->sd->flags & SD_ASYM_PACKING))
sd               8232 kernel/sched/fair.c 	struct sched_domain *child = env->sd->child;
sd               8233 kernel/sched/fair.c 	struct sched_group *sg = env->sd->groups;
sd               8255 kernel/sched/fair.c 				update_group_capacity(env->sd, env->dst_cpu);
sd               8292 kernel/sched/fair.c 	} while (sg != env->sd->groups);
sd               8296 kernel/sched/fair.c 	    cpumask_subset(nohz.idle_cpus_mask, sched_domain_span(env->sd))) {
sd               8303 kernel/sched/fair.c 	if (env->sd->flags & SD_NUMA)
sd               8306 kernel/sched/fair.c 	if (!env->sd->parent) {
sd               8350 kernel/sched/fair.c 	if (!(env->sd->flags & SD_ASYM_PACKING))
sd               8618 kernel/sched/fair.c 				env->sd->imbalance_pct * local->avg_load)
sd               8693 kernel/sched/fair.c 		if (env->sd->flags & SD_ASYM_CPUCAPACITY &&
sd               8706 kernel/sched/fair.c 		    !check_cpu_capacity(rq, env->sd))
sd               8744 kernel/sched/fair.c 	return env->idle != CPU_NOT_IDLE && (env->sd->flags & SD_ASYM_PACKING) &&
sd               8751 kernel/sched/fair.c 	struct sched_domain *sd = env->sd;
sd               8764 kernel/sched/fair.c 		if ((check_cpu_capacity(env->src_rq, sd)) &&
sd               8765 kernel/sched/fair.c 		    (capacity_of(env->src_cpu)*sd->imbalance_pct < capacity_of(env->dst_cpu)*100))
sd               8777 kernel/sched/fair.c 	struct sched_domain *sd = env->sd;
sd               8782 kernel/sched/fair.c 	return unlikely(sd->nr_balance_failed > sd->cache_nice_tries+2);
sd               8789 kernel/sched/fair.c 	struct sched_group *sg = env->sd->groups;
sd               8830 kernel/sched/fair.c 			struct sched_domain *sd, enum cpu_idle_type idle,
sd               8834 kernel/sched/fair.c 	struct sched_domain *sd_parent = sd->parent;
sd               8841 kernel/sched/fair.c 		.sd		= sd,
sd               8844 kernel/sched/fair.c 		.dst_grpmask    = sched_group_span(sd->groups),
sd               8852 kernel/sched/fair.c 	cpumask_and(cpus, sched_domain_span(sd), cpu_active_mask);
sd               8854 kernel/sched/fair.c 	schedstat_inc(sd->lb_count[idle]);
sd               8864 kernel/sched/fair.c 		schedstat_inc(sd->lb_nobusyg[idle]);
sd               8870 kernel/sched/fair.c 		schedstat_inc(sd->lb_nobusyq[idle]);
sd               8876 kernel/sched/fair.c 	schedstat_add(sd->lb_imbalance[idle], env.imbalance);
sd               8992 kernel/sched/fair.c 		schedstat_inc(sd->lb_failed[idle]);
sd               9000 kernel/sched/fair.c 			sd->nr_balance_failed++;
sd               9038 kernel/sched/fair.c 			sd->nr_balance_failed = sd->cache_nice_tries+1;
sd               9041 kernel/sched/fair.c 		sd->nr_balance_failed = 0;
sd               9045 kernel/sched/fair.c 		sd->balance_interval = sd->min_interval;
sd               9053 kernel/sched/fair.c 		if (sd->balance_interval < sd->max_interval)
sd               9054 kernel/sched/fair.c 			sd->balance_interval *= 2;
sd               9078 kernel/sched/fair.c 	schedstat_inc(sd->lb_balanced[idle]);
sd               9080 kernel/sched/fair.c 	sd->nr_balance_failed = 0;
sd               9096 kernel/sched/fair.c 	     sd->balance_interval < MAX_PINNED_INTERVAL) ||
sd               9097 kernel/sched/fair.c 	    sd->balance_interval < sd->max_interval)
sd               9098 kernel/sched/fair.c 		sd->balance_interval *= 2;
sd               9104 kernel/sched/fair.c get_sd_balance_interval(struct sched_domain *sd, int cpu_busy)
sd               9106 kernel/sched/fair.c 	unsigned long interval = sd->balance_interval;
sd               9109 kernel/sched/fair.c 		interval *= sd->busy_factor;
sd               9119 kernel/sched/fair.c update_next_balance(struct sched_domain *sd, unsigned long *next_balance)
sd               9124 kernel/sched/fair.c 	interval = get_sd_balance_interval(sd, 0);
sd               9125 kernel/sched/fair.c 	next = sd->last_balance + interval;
sd               9143 kernel/sched/fair.c 	struct sched_domain *sd;
sd               9174 kernel/sched/fair.c 	for_each_domain(target_cpu, sd) {
sd               9175 kernel/sched/fair.c 		if ((sd->flags & SD_LOAD_BALANCE) &&
sd               9176 kernel/sched/fair.c 		    cpumask_test_cpu(busiest_cpu, sched_domain_span(sd)))
sd               9180 kernel/sched/fair.c 	if (likely(sd)) {
sd               9182 kernel/sched/fair.c 			.sd		= sd,
sd               9197 kernel/sched/fair.c 		schedstat_inc(sd->alb_count);
sd               9202 kernel/sched/fair.c 			schedstat_inc(sd->alb_pushed);
sd               9204 kernel/sched/fair.c 			sd->nr_balance_failed = 0;
sd               9206 kernel/sched/fair.c 			schedstat_inc(sd->alb_failed);
sd               9244 kernel/sched/fair.c 	struct sched_domain *sd;
sd               9252 kernel/sched/fair.c 	for_each_domain(cpu, sd) {
sd               9257 kernel/sched/fair.c 		if (time_after(jiffies, sd->next_decay_max_lb_cost)) {
sd               9258 kernel/sched/fair.c 			sd->max_newidle_lb_cost =
sd               9259 kernel/sched/fair.c 				(sd->max_newidle_lb_cost * 253) / 256;
sd               9260 kernel/sched/fair.c 			sd->next_decay_max_lb_cost = jiffies + HZ;
sd               9263 kernel/sched/fair.c 		max_cost += sd->max_newidle_lb_cost;
sd               9265 kernel/sched/fair.c 		if (!(sd->flags & SD_LOAD_BALANCE))
sd               9279 kernel/sched/fair.c 		interval = get_sd_balance_interval(sd, idle != CPU_IDLE);
sd               9281 kernel/sched/fair.c 		need_serialize = sd->flags & SD_SERIALIZE;
sd               9287 kernel/sched/fair.c 		if (time_after_eq(jiffies, sd->last_balance + interval)) {
sd               9288 kernel/sched/fair.c 			if (load_balance(cpu, rq, sd, idle, &continue_balancing)) {
sd               9296 kernel/sched/fair.c 			sd->last_balance = jiffies;
sd               9297 kernel/sched/fair.c 			interval = get_sd_balance_interval(sd, idle != CPU_IDLE);
sd               9302 kernel/sched/fair.c 		if (time_after(next_balance, sd->last_balance + interval)) {
sd               9303 kernel/sched/fair.c 			next_balance = sd->last_balance + interval;
sd               9342 kernel/sched/fair.c 	return unlikely(!rcu_dereference_sched(rq->sd));
sd               9404 kernel/sched/fair.c 	struct sched_domain *sd;
sd               9438 kernel/sched/fair.c 	sd = rcu_dereference(rq->sd);
sd               9439 kernel/sched/fair.c 	if (sd) {
sd               9445 kernel/sched/fair.c 		if (rq->cfs.h_nr_running >= 1 && check_cpu_capacity(rq, sd)) {
sd               9451 kernel/sched/fair.c 	sd = rcu_dereference(per_cpu(sd_asym_packing, cpu));
sd               9452 kernel/sched/fair.c 	if (sd) {
sd               9458 kernel/sched/fair.c 		for_each_cpu_and(i, sched_domain_span(sd), nohz.idle_cpus_mask) {
sd               9466 kernel/sched/fair.c 	sd = rcu_dereference(per_cpu(sd_asym_cpucapacity, cpu));
sd               9467 kernel/sched/fair.c 	if (sd) {
sd               9472 kernel/sched/fair.c 		if (check_misfit_status(rq, sd)) {
sd               9513 kernel/sched/fair.c 	struct sched_domain *sd;
sd               9516 kernel/sched/fair.c 	sd = rcu_dereference(per_cpu(sd_llc, cpu));
sd               9518 kernel/sched/fair.c 	if (!sd || !sd->nohz_idle)
sd               9520 kernel/sched/fair.c 	sd->nohz_idle = 0;
sd               9522 kernel/sched/fair.c 	atomic_inc(&sd->shared->nr_busy_cpus);
sd               9543 kernel/sched/fair.c 	struct sched_domain *sd;
sd               9546 kernel/sched/fair.c 	sd = rcu_dereference(per_cpu(sd_llc, cpu));
sd               9548 kernel/sched/fair.c 	if (!sd || sd->nohz_idle)
sd               9550 kernel/sched/fair.c 	sd->nohz_idle = 1;
sd               9552 kernel/sched/fair.c 	atomic_dec(&sd->shared->nr_busy_cpus);
sd               9803 kernel/sched/fair.c 	struct sched_domain *sd;
sd               9832 kernel/sched/fair.c 		sd = rcu_dereference_check_sched_domain(this_rq->sd);
sd               9833 kernel/sched/fair.c 		if (sd)
sd               9834 kernel/sched/fair.c 			update_next_balance(sd, &next_balance);
sd               9846 kernel/sched/fair.c 	for_each_domain(this_cpu, sd) {
sd               9850 kernel/sched/fair.c 		if (!(sd->flags & SD_LOAD_BALANCE))
sd               9853 kernel/sched/fair.c 		if (this_rq->avg_idle < curr_cost + sd->max_newidle_lb_cost) {
sd               9854 kernel/sched/fair.c 			update_next_balance(sd, &next_balance);
sd               9858 kernel/sched/fair.c 		if (sd->flags & SD_BALANCE_NEWIDLE) {
sd               9862 kernel/sched/fair.c 						   sd, CPU_NEWLY_IDLE,
sd               9866 kernel/sched/fair.c 			if (domain_cost > sd->max_newidle_lb_cost)
sd               9867 kernel/sched/fair.c 				sd->max_newidle_lb_cost = domain_cost;
sd               9872 kernel/sched/fair.c 		update_next_balance(sd, &next_balance);
sd               1637 kernel/sched/rt.c 	struct sched_domain *sd;
sd               1671 kernel/sched/rt.c 	for_each_domain(cpu, sd) {
sd               1672 kernel/sched/rt.c 		if (sd->flags & SD_WAKE_AFFINE) {
sd               1680 kernel/sched/rt.c 			    cpumask_test_cpu(this_cpu, sched_domain_span(sd))) {
sd               1686 kernel/sched/rt.c 						     sched_domain_span(sd));
sd                926 kernel/sched/sched.h 	struct sched_domain __rcu	*sd;
sd               1343 kernel/sched/sched.h 	for (__sd = rcu_dereference_check_sched_domain(cpu_rq(cpu)->sd); \
sd               1346 kernel/sched/sched.h #define for_each_lower_domain(sd) for (; sd; sd = sd->child)
sd               1359 kernel/sched/sched.h 	struct sched_domain *sd, *hsd = NULL;
sd               1361 kernel/sched/sched.h 	for_each_domain(cpu, sd) {
sd               1362 kernel/sched/sched.h 		if (!(sd->flags & flag))
sd               1364 kernel/sched/sched.h 		hsd = sd;
sd               1372 kernel/sched/sched.h 	struct sched_domain *sd;
sd               1374 kernel/sched/sched.h 	for_each_domain(cpu, sd) {
sd               1375 kernel/sched/sched.h 		if (sd->flags & flag)
sd               1379 kernel/sched/sched.h 	return sd;
sd               1832 kernel/sched/sched.h extern void update_group_capacity(struct sched_domain *sd, int cpu);
sd                 25 kernel/sched/stats.c 		struct sched_domain *sd;
sd                 45 kernel/sched/stats.c 		for_each_domain(cpu, sd) {
sd                 49 kernel/sched/stats.c 				   cpumask_pr_args(sched_domain_span(sd)));
sd                 53 kernel/sched/stats.c 				    sd->lb_count[itype],
sd                 54 kernel/sched/stats.c 				    sd->lb_balanced[itype],
sd                 55 kernel/sched/stats.c 				    sd->lb_failed[itype],
sd                 56 kernel/sched/stats.c 				    sd->lb_imbalance[itype],
sd                 57 kernel/sched/stats.c 				    sd->lb_gained[itype],
sd                 58 kernel/sched/stats.c 				    sd->lb_hot_gained[itype],
sd                 59 kernel/sched/stats.c 				    sd->lb_nobusyq[itype],
sd                 60 kernel/sched/stats.c 				    sd->lb_nobusyg[itype]);
sd                 64 kernel/sched/stats.c 			    sd->alb_count, sd->alb_failed, sd->alb_pushed,
sd                 65 kernel/sched/stats.c 			    sd->sbe_count, sd->sbe_balanced, sd->sbe_pushed,
sd                 66 kernel/sched/stats.c 			    sd->sbf_count, sd->sbf_balanced, sd->sbf_pushed,
sd                 67 kernel/sched/stats.c 			    sd->ttwu_wake_remote, sd->ttwu_move_affine,
sd                 68 kernel/sched/stats.c 			    sd->ttwu_move_balance);
sd                 28 kernel/sched/topology.c static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
sd                 31 kernel/sched/topology.c 	struct sched_group *group = sd->groups;
sd                 37 kernel/sched/topology.c 	if (!(sd->flags & SD_LOAD_BALANCE)) {
sd                 39 kernel/sched/topology.c 		if (sd->parent)
sd                 45 kernel/sched/topology.c 	       cpumask_pr_args(sched_domain_span(sd)), sd->name);
sd                 47 kernel/sched/topology.c 	if (!cpumask_test_cpu(cpu, sched_domain_span(sd))) {
sd                 68 kernel/sched/topology.c 		if (!(sd->flags & SD_OVERLAP) &&
sd                 81 kernel/sched/topology.c 		if ((sd->flags & SD_OVERLAP) &&
sd                 90 kernel/sched/topology.c 		if (group == sd->groups && sd->child &&
sd                 91 kernel/sched/topology.c 		    !cpumask_equal(sched_domain_span(sd->child),
sd                100 kernel/sched/topology.c 		if (group != sd->groups)
sd                103 kernel/sched/topology.c 	} while (group != sd->groups);
sd                106 kernel/sched/topology.c 	if (!cpumask_equal(sched_domain_span(sd), groupmask))
sd                109 kernel/sched/topology.c 	if (sd->parent &&
sd                110 kernel/sched/topology.c 	    !cpumask_subset(groupmask, sched_domain_span(sd->parent)))
sd                115 kernel/sched/topology.c static void sched_domain_debug(struct sched_domain *sd, int cpu)
sd                122 kernel/sched/topology.c 	if (!sd) {
sd                130 kernel/sched/topology.c 		if (sched_domain_debug_one(sd, cpu, level, sched_domains_tmpmask))
sd                133 kernel/sched/topology.c 		sd = sd->parent;
sd                134 kernel/sched/topology.c 		if (!sd)
sd                141 kernel/sched/topology.c # define sched_domain_debug(sd, cpu) do { } while (0)
sd                148 kernel/sched/topology.c static int sd_degenerate(struct sched_domain *sd)
sd                150 kernel/sched/topology.c 	if (cpumask_weight(sched_domain_span(sd)) == 1)
sd                154 kernel/sched/topology.c 	if (sd->flags & (SD_LOAD_BALANCE |
sd                162 kernel/sched/topology.c 		if (sd->groups != sd->groups->next)
sd                167 kernel/sched/topology.c 	if (sd->flags & (SD_WAKE_AFFINE))
sd                174 kernel/sched/topology.c sd_parent_degenerate(struct sched_domain *sd, struct sched_domain *parent)
sd                176 kernel/sched/topology.c 	unsigned long cflags = sd->flags, pflags = parent->flags;
sd                181 kernel/sched/topology.c 	if (!cpumask_equal(sched_domain_span(sd), sched_domain_span(parent)))
sd                578 kernel/sched/topology.c static void destroy_sched_domain(struct sched_domain *sd)
sd                585 kernel/sched/topology.c 	free_sched_groups(sd->groups, 1);
sd                587 kernel/sched/topology.c 	if (sd->shared && atomic_dec_and_test(&sd->shared->ref))
sd                588 kernel/sched/topology.c 		kfree(sd->shared);
sd                589 kernel/sched/topology.c 	kfree(sd);
sd                594 kernel/sched/topology.c 	struct sched_domain *sd = container_of(rcu, struct sched_domain, rcu);
sd                596 kernel/sched/topology.c 	while (sd) {
sd                597 kernel/sched/topology.c 		struct sched_domain *parent = sd->parent;
sd                598 kernel/sched/topology.c 		destroy_sched_domain(sd);
sd                599 kernel/sched/topology.c 		sd = parent;
sd                603 kernel/sched/topology.c static void destroy_sched_domains(struct sched_domain *sd)
sd                605 kernel/sched/topology.c 	if (sd)
sd                606 kernel/sched/topology.c 		call_rcu(&sd->rcu, destroy_sched_domains_rcu);
sd                630 kernel/sched/topology.c 	struct sched_domain *sd;
sd                634 kernel/sched/topology.c 	sd = highest_flag_domain(cpu, SD_SHARE_PKG_RESOURCES);
sd                635 kernel/sched/topology.c 	if (sd) {
sd                636 kernel/sched/topology.c 		id = cpumask_first(sched_domain_span(sd));
sd                637 kernel/sched/topology.c 		size = cpumask_weight(sched_domain_span(sd));
sd                638 kernel/sched/topology.c 		sds = sd->shared;
sd                641 kernel/sched/topology.c 	rcu_assign_pointer(per_cpu(sd_llc, cpu), sd);
sd                646 kernel/sched/topology.c 	sd = lowest_flag_domain(cpu, SD_NUMA);
sd                647 kernel/sched/topology.c 	rcu_assign_pointer(per_cpu(sd_numa, cpu), sd);
sd                649 kernel/sched/topology.c 	sd = highest_flag_domain(cpu, SD_ASYM_PACKING);
sd                650 kernel/sched/topology.c 	rcu_assign_pointer(per_cpu(sd_asym_packing, cpu), sd);
sd                652 kernel/sched/topology.c 	sd = lowest_flag_domain(cpu, SD_ASYM_CPUCAPACITY);
sd                653 kernel/sched/topology.c 	rcu_assign_pointer(per_cpu(sd_asym_cpucapacity, cpu), sd);
sd                661 kernel/sched/topology.c cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)
sd                667 kernel/sched/topology.c 	for (tmp = sd; tmp; ) {
sd                688 kernel/sched/topology.c 	if (sd && sd_degenerate(sd)) {
sd                689 kernel/sched/topology.c 		tmp = sd;
sd                690 kernel/sched/topology.c 		sd = sd->parent;
sd                692 kernel/sched/topology.c 		if (sd)
sd                693 kernel/sched/topology.c 			sd->child = NULL;
sd                696 kernel/sched/topology.c 	sched_domain_debug(sd, cpu);
sd                699 kernel/sched/topology.c 	tmp = rq->sd;
sd                700 kernel/sched/topology.c 	rcu_assign_pointer(rq->sd, sd);
sd                708 kernel/sched/topology.c 	struct sched_domain * __percpu *sd;
sd                840 kernel/sched/topology.c build_balance_mask(struct sched_domain *sd, struct sched_group *sg, struct cpumask *mask)
sd                843 kernel/sched/topology.c 	struct sd_data *sdd = sd->private;
sd                850 kernel/sched/topology.c 		sibling = *per_cpu_ptr(sdd->sd, i);
sd                877 kernel/sched/topology.c build_group_from_child_sched_domain(struct sched_domain *sd, int cpu)
sd                889 kernel/sched/topology.c 	if (sd->child)
sd                890 kernel/sched/topology.c 		cpumask_copy(sg_span, sched_domain_span(sd->child));
sd                892 kernel/sched/topology.c 		cpumask_copy(sg_span, sched_domain_span(sd));
sd                898 kernel/sched/topology.c static void init_overlap_sched_group(struct sched_domain *sd,
sd                902 kernel/sched/topology.c 	struct sd_data *sdd = sd->private;
sd                906 kernel/sched/topology.c 	build_balance_mask(sd, sg, mask);
sd                927 kernel/sched/topology.c build_overlap_sched_groups(struct sched_domain *sd, int cpu)
sd                930 kernel/sched/topology.c 	const struct cpumask *span = sched_domain_span(sd);
sd                932 kernel/sched/topology.c 	struct sd_data *sdd = sd->private;
sd                944 kernel/sched/topology.c 		sibling = *per_cpu_ptr(sdd->sd, i);
sd                966 kernel/sched/topology.c 		init_overlap_sched_group(sd, sg);
sd                975 kernel/sched/topology.c 	sd->groups = first;
sd               1059 kernel/sched/topology.c 	struct sched_domain *sd = *per_cpu_ptr(sdd->sd, cpu);
sd               1060 kernel/sched/topology.c 	struct sched_domain *child = sd->child;
sd               1102 kernel/sched/topology.c build_sched_groups(struct sched_domain *sd, int cpu)
sd               1105 kernel/sched/topology.c 	struct sd_data *sdd = sd->private;
sd               1106 kernel/sched/topology.c 	const struct cpumask *span = sched_domain_span(sd);
sd               1132 kernel/sched/topology.c 	sd->groups = first;
sd               1147 kernel/sched/topology.c static void init_sched_groups_capacity(int cpu, struct sched_domain *sd)
sd               1149 kernel/sched/topology.c 	struct sched_group *sg = sd->groups;
sd               1158 kernel/sched/topology.c 		if (!(sd->flags & SD_ASYM_PACKING))
sd               1171 kernel/sched/topology.c 	} while (sg != sd->groups);
sd               1176 kernel/sched/topology.c 	update_group_capacity(sd, cpu);
sd               1196 kernel/sched/topology.c static void set_domain_attribute(struct sched_domain *sd,
sd               1208 kernel/sched/topology.c 	if (request < sd->level) {
sd               1210 kernel/sched/topology.c 		sd->flags &= ~(SD_BALANCE_WAKE|SD_BALANCE_NEWIDLE);
sd               1213 kernel/sched/topology.c 		sd->flags |= (SD_BALANCE_WAKE|SD_BALANCE_NEWIDLE);
sd               1229 kernel/sched/topology.c 		free_percpu(d->sd);
sd               1246 kernel/sched/topology.c 	d->sd = alloc_percpu(struct sched_domain *);
sd               1247 kernel/sched/topology.c 	if (!d->sd)
sd               1261 kernel/sched/topology.c static void claim_allocations(int cpu, struct sched_domain *sd)
sd               1263 kernel/sched/topology.c 	struct sd_data *sdd = sd->private;
sd               1265 kernel/sched/topology.c 	WARN_ON_ONCE(*per_cpu_ptr(sdd->sd, cpu) != sd);
sd               1266 kernel/sched/topology.c 	*per_cpu_ptr(sdd->sd, cpu) = NULL;
sd               1320 kernel/sched/topology.c 	struct sched_domain *sd = *per_cpu_ptr(sdd->sd, cpu);
sd               1341 kernel/sched/topology.c 	*sd = (struct sched_domain){
sd               1373 kernel/sched/topology.c 	cpumask_and(sched_domain_span(sd), cpu_map, tl->mask(cpu));
sd               1374 kernel/sched/topology.c 	sd_id = cpumask_first(sched_domain_span(sd));
sd               1380 kernel/sched/topology.c 	if (sd->flags & SD_ASYM_CPUCAPACITY) {
sd               1381 kernel/sched/topology.c 		struct sched_domain *t = sd;
sd               1386 kernel/sched/topology.c 		if (sd->child)
sd               1387 kernel/sched/topology.c 			sd->child->flags &= ~SD_PREFER_SIBLING;
sd               1393 kernel/sched/topology.c 	if (sd->flags & SD_SHARE_CPUCAPACITY) {
sd               1394 kernel/sched/topology.c 		sd->imbalance_pct = 110;
sd               1396 kernel/sched/topology.c 	} else if (sd->flags & SD_SHARE_PKG_RESOURCES) {
sd               1397 kernel/sched/topology.c 		sd->imbalance_pct = 117;
sd               1398 kernel/sched/topology.c 		sd->cache_nice_tries = 1;
sd               1401 kernel/sched/topology.c 	} else if (sd->flags & SD_NUMA) {
sd               1402 kernel/sched/topology.c 		sd->cache_nice_tries = 2;
sd               1404 kernel/sched/topology.c 		sd->flags &= ~SD_PREFER_SIBLING;
sd               1405 kernel/sched/topology.c 		sd->flags |= SD_SERIALIZE;
sd               1407 kernel/sched/topology.c 			sd->flags &= ~(SD_BALANCE_EXEC |
sd               1414 kernel/sched/topology.c 		sd->cache_nice_tries = 1;
sd               1421 kernel/sched/topology.c 	if (sd->flags & SD_SHARE_PKG_RESOURCES) {
sd               1422 kernel/sched/topology.c 		sd->shared = *per_cpu_ptr(sdd->sds, sd_id);
sd               1423 kernel/sched/topology.c 		atomic_inc(&sd->shared->ref);
sd               1424 kernel/sched/topology.c 		atomic_set(&sd->shared->nr_busy_cpus, sd_weight);
sd               1427 kernel/sched/topology.c 	sd->private = sdd;
sd               1429 kernel/sched/topology.c 	return sd;
sd               1758 kernel/sched/topology.c 		sdd->sd = alloc_percpu(struct sched_domain *);
sd               1759 kernel/sched/topology.c 		if (!sdd->sd)
sd               1775 kernel/sched/topology.c 			struct sched_domain *sd;
sd               1780 kernel/sched/topology.c 			sd = kzalloc_node(sizeof(struct sched_domain) + cpumask_size(),
sd               1782 kernel/sched/topology.c 			if (!sd)
sd               1785 kernel/sched/topology.c 			*per_cpu_ptr(sdd->sd, j) = sd;
sd               1828 kernel/sched/topology.c 			struct sched_domain *sd;
sd               1830 kernel/sched/topology.c 			if (sdd->sd) {
sd               1831 kernel/sched/topology.c 				sd = *per_cpu_ptr(sdd->sd, j);
sd               1832 kernel/sched/topology.c 				if (sd && (sd->flags & SD_OVERLAP))
sd               1833 kernel/sched/topology.c 					free_sched_groups(sd->groups, 0);
sd               1834 kernel/sched/topology.c 				kfree(*per_cpu_ptr(sdd->sd, j));
sd               1844 kernel/sched/topology.c 		free_percpu(sdd->sd);
sd               1845 kernel/sched/topology.c 		sdd->sd = NULL;
sd               1859 kernel/sched/topology.c 	struct sched_domain *sd = sd_init(tl, cpu_map, child, dflags, cpu);
sd               1862 kernel/sched/topology.c 		sd->level = child->level + 1;
sd               1863 kernel/sched/topology.c 		sched_domain_level_max = max(sched_domain_level_max, sd->level);
sd               1864 kernel/sched/topology.c 		child->parent = sd;
sd               1867 kernel/sched/topology.c 				    sched_domain_span(sd))) {
sd               1871 kernel/sched/topology.c 					child->name, sd->name);
sd               1874 kernel/sched/topology.c 			cpumask_or(sched_domain_span(sd),
sd               1875 kernel/sched/topology.c 				   sched_domain_span(sd),
sd               1880 kernel/sched/topology.c 	set_domain_attribute(sd, attr);
sd               1882 kernel/sched/topology.c 	return sd;
sd               1988 kernel/sched/topology.c 	struct sched_domain *sd;
sd               2008 kernel/sched/topology.c 		sd = NULL;
sd               2020 kernel/sched/topology.c 			sd = build_sched_domain(tl, cpu_map, attr, sd, dflags, i);
sd               2023 kernel/sched/topology.c 				*per_cpu_ptr(d.sd, i) = sd;
sd               2025 kernel/sched/topology.c 				sd->flags |= SD_OVERLAP;
sd               2026 kernel/sched/topology.c 			if (cpumask_equal(cpu_map, sched_domain_span(sd)))
sd               2033 kernel/sched/topology.c 		for (sd = *per_cpu_ptr(d.sd, i); sd; sd = sd->parent) {
sd               2034 kernel/sched/topology.c 			sd->span_weight = cpumask_weight(sched_domain_span(sd));
sd               2035 kernel/sched/topology.c 			if (sd->flags & SD_OVERLAP) {
sd               2036 kernel/sched/topology.c 				if (build_overlap_sched_groups(sd, i))
sd               2039 kernel/sched/topology.c 				if (build_sched_groups(sd, i))
sd               2050 kernel/sched/topology.c 		for (sd = *per_cpu_ptr(d.sd, i); sd; sd = sd->parent) {
sd               2051 kernel/sched/topology.c 			claim_allocations(i, sd);
sd               2052 kernel/sched/topology.c 			init_sched_groups_capacity(i, sd);
sd               2060 kernel/sched/topology.c 		sd = *per_cpu_ptr(d.sd, i);
sd               2066 kernel/sched/topology.c 		cpu_attach_domain(sd, d.rd, i);
sd                144 kernel/seccomp.c static void populate_seccomp_data(struct seccomp_data *sd)
sd                150 kernel/seccomp.c 	sd->nr = syscall_get_nr(task, regs);
sd                151 kernel/seccomp.c 	sd->arch = syscall_get_arch(task);
sd                153 kernel/seccomp.c 	sd->args[0] = args[0];
sd                154 kernel/seccomp.c 	sd->args[1] = args[1];
sd                155 kernel/seccomp.c 	sd->args[2] = args[2];
sd                156 kernel/seccomp.c 	sd->args[3] = args[3];
sd                157 kernel/seccomp.c 	sd->args[4] = args[4];
sd                158 kernel/seccomp.c 	sd->args[5] = args[5];
sd                159 kernel/seccomp.c 	sd->instruction_pointer = KSTK_EIP(task);
sd                254 kernel/seccomp.c static u32 seccomp_run_filters(const struct seccomp_data *sd,
sd                272 kernel/seccomp.c 		u32 cur_ret = BPF_PROG_RUN(f->prog, sd);
sd                737 kernel/seccomp.c 					 const struct seccomp_data *sd)
sd                750 kernel/seccomp.c 	n.data = sd;
sd                787 kernel/seccomp.c static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
sd                801 kernel/seccomp.c 	if (!sd) {
sd                803 kernel/seccomp.c 		sd = &sd_local;
sd                806 kernel/seccomp.c 	filter_ret = seccomp_run_filters(sd, &match);
sd                870 kernel/seccomp.c 		seccomp_do_user_notification(this_syscall, match, sd);
sd                913 kernel/seccomp.c static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
sd                920 kernel/seccomp.c int __secure_computing(const struct seccomp_data *sd)
sd                929 kernel/seccomp.c 	this_syscall = sd ? sd->nr :
sd                937 kernel/seccomp.c 		return __seccomp_filter(this_syscall, sd, false);
sd                421 kernel/trace/bpf_trace.c 			u64 flags, struct perf_sample_data *sd)
sd                446 kernel/trace/bpf_trace.c 	return perf_event_output(event, sd, regs);
sd                470 kernel/trace/bpf_trace.c 	struct perf_sample_data *sd;
sd                478 kernel/trace/bpf_trace.c 	sd = &sds->sds[nest_level - 1];
sd                485 kernel/trace/bpf_trace.c 	perf_sample_data_init(sd, 0, 0);
sd                486 kernel/trace/bpf_trace.c 	sd->raw = &raw;
sd                488 kernel/trace/bpf_trace.c 	err = __bpf_perf_event_output(regs, map, flags, sd);
sd                531 kernel/trace/bpf_trace.c 	struct perf_sample_data *sd;
sd                539 kernel/trace/bpf_trace.c 	sd = this_cpu_ptr(&bpf_misc_sds.sds[nest_level - 1]);
sd                543 kernel/trace/bpf_trace.c 	perf_sample_data_init(sd, 0, 0);
sd                544 kernel/trace/bpf_trace.c 	sd->raw = &raw;
sd                546 kernel/trace/bpf_trace.c 	ret = __bpf_perf_event_output(regs, map, flags, sd);
sd                111 lib/kobject.c  	sysfs_get(kobj->sd);
sd                123 lib/kobject.c  		sysfs_enable_ns(kobj->sd);
sd                611 lib/kobject.c  	struct kernfs_node *sd;
sd                617 lib/kobject.c  	sd = kobj->sd;
sd                624 lib/kobject.c  	sysfs_put(sd);
sd                217 net/core/dev.c static inline void rps_lock(struct softnet_data *sd)
sd                220 net/core/dev.c 	spin_lock(&sd->input_pkt_queue.lock);
sd                224 net/core/dev.c static inline void rps_unlock(struct softnet_data *sd)
sd                227 net/core/dev.c 	spin_unlock(&sd->input_pkt_queue.lock);
sd               2661 net/core/dev.c 	struct softnet_data *sd;
sd               2665 net/core/dev.c 	sd = this_cpu_ptr(&softnet_data);
sd               2667 net/core/dev.c 	*sd->output_queue_tailp = q;
sd               2668 net/core/dev.c 	sd->output_queue_tailp = &q->next_sched;
sd               3877 net/core/dev.c static inline void ____napi_schedule(struct softnet_data *sd,
sd               3880 net/core/dev.c 	list_add_tail(&napi->poll_list, &sd->poll_list);
sd               4085 net/core/dev.c 	struct softnet_data *sd = data;
sd               4087 net/core/dev.c 	____napi_schedule(sd, &sd->backlog);
sd               4088 net/core/dev.c 	sd->received_rps++;
sd               4098 net/core/dev.c static int rps_ipi_queued(struct softnet_data *sd)
sd               4103 net/core/dev.c 	if (sd != mysd) {
sd               4104 net/core/dev.c 		sd->rps_ipi_next = mysd->rps_ipi_list;
sd               4105 net/core/dev.c 		mysd->rps_ipi_list = sd;
sd               4122 net/core/dev.c 	struct softnet_data *sd;
sd               4128 net/core/dev.c 	sd = this_cpu_ptr(&softnet_data);
sd               4131 net/core/dev.c 	fl = rcu_dereference(sd->flow_limit);
sd               4161 net/core/dev.c 	struct softnet_data *sd;
sd               4165 net/core/dev.c 	sd = &per_cpu(softnet_data, cpu);
sd               4169 net/core/dev.c 	rps_lock(sd);
sd               4172 net/core/dev.c 	qlen = skb_queue_len(&sd->input_pkt_queue);
sd               4176 net/core/dev.c 			__skb_queue_tail(&sd->input_pkt_queue, skb);
sd               4177 net/core/dev.c 			input_queue_tail_incr_save(sd, qtail);
sd               4178 net/core/dev.c 			rps_unlock(sd);
sd               4186 net/core/dev.c 		if (!__test_and_set_bit(NAPI_STATE_SCHED, &sd->backlog.state)) {
sd               4187 net/core/dev.c 			if (!rps_ipi_queued(sd))
sd               4188 net/core/dev.c 				____napi_schedule(sd, &sd->backlog);
sd               4194 net/core/dev.c 	sd->dropped++;
sd               4195 net/core/dev.c 	rps_unlock(sd);
sd               4481 net/core/dev.c 	struct softnet_data *sd = this_cpu_ptr(&softnet_data);
sd               4483 net/core/dev.c 	if (sd->completion_queue) {
sd               4487 net/core/dev.c 		clist = sd->completion_queue;
sd               4488 net/core/dev.c 		sd->completion_queue = NULL;
sd               4511 net/core/dev.c 	if (sd->output_queue) {
sd               4515 net/core/dev.c 		head = sd->output_queue;
sd               4516 net/core/dev.c 		sd->output_queue = NULL;
sd               4517 net/core/dev.c 		sd->output_queue_tailp = &sd->output_queue;
sd               4541 net/core/dev.c 	xfrm_dev_backlog(sd);
sd               5224 net/core/dev.c 	struct softnet_data *sd;
sd               5227 net/core/dev.c 	sd = this_cpu_ptr(&softnet_data);
sd               5230 net/core/dev.c 	rps_lock(sd);
sd               5231 net/core/dev.c 	skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) {
sd               5233 net/core/dev.c 			__skb_unlink(skb, &sd->input_pkt_queue);
sd               5235 net/core/dev.c 			input_queue_head_incr(sd);
sd               5238 net/core/dev.c 	rps_unlock(sd);
sd               5241 net/core/dev.c 	skb_queue_walk_safe(&sd->process_queue, skb, tmp) {
sd               5243 net/core/dev.c 			__skb_unlink(skb, &sd->process_queue);
sd               5245 net/core/dev.c 			input_queue_head_incr(sd);
sd               5823 net/core/dev.c static void net_rps_action_and_irq_enable(struct softnet_data *sd)
sd               5826 net/core/dev.c 	struct softnet_data *remsd = sd->rps_ipi_list;
sd               5829 net/core/dev.c 		sd->rps_ipi_list = NULL;
sd               5840 net/core/dev.c static bool sd_has_rps_ipi_waiting(struct softnet_data *sd)
sd               5843 net/core/dev.c 	return sd->rps_ipi_list != NULL;
sd               5851 net/core/dev.c 	struct softnet_data *sd = container_of(napi, struct softnet_data, backlog);
sd               5858 net/core/dev.c 	if (sd_has_rps_ipi_waiting(sd)) {
sd               5860 net/core/dev.c 		net_rps_action_and_irq_enable(sd);
sd               5867 net/core/dev.c 		while ((skb = __skb_dequeue(&sd->process_queue))) {
sd               5871 net/core/dev.c 			input_queue_head_incr(sd);
sd               5878 net/core/dev.c 		rps_lock(sd);
sd               5879 net/core/dev.c 		if (skb_queue_empty(&sd->input_pkt_queue)) {
sd               5891 net/core/dev.c 			skb_queue_splice_tail_init(&sd->input_pkt_queue,
sd               5892 net/core/dev.c 						   &sd->process_queue);
sd               5894 net/core/dev.c 		rps_unlock(sd);
sd               6354 net/core/dev.c 	struct softnet_data *sd = this_cpu_ptr(&softnet_data);
sd               6362 net/core/dev.c 	list_splice_init(&sd->poll_list, &list);
sd               6369 net/core/dev.c 			if (!sd_has_rps_ipi_waiting(sd) && list_empty(&repoll))
sd               6383 net/core/dev.c 			sd->time_squeeze++;
sd               6390 net/core/dev.c 	list_splice_tail_init(&sd->poll_list, &list);
sd               6392 net/core/dev.c 	list_splice(&list, &sd->poll_list);
sd               6393 net/core/dev.c 	if (!list_empty(&sd->poll_list))
sd               6396 net/core/dev.c 	net_rps_action_and_irq_enable(sd);
sd               9829 net/core/dev.c 	struct softnet_data *sd, *oldsd, *remsd = NULL;
sd               9833 net/core/dev.c 	sd = &per_cpu(softnet_data, cpu);
sd               9837 net/core/dev.c 	list_skb = &sd->completion_queue;
sd               9846 net/core/dev.c 		*sd->output_queue_tailp = oldsd->output_queue;
sd               9847 net/core/dev.c 		sd->output_queue_tailp = oldsd->output_queue_tailp;
sd               9864 net/core/dev.c 			____napi_schedule(sd, napi);
sd               10192 net/core/dev.c 		struct softnet_data *sd = &per_cpu(softnet_data, i);
sd               10196 net/core/dev.c 		skb_queue_head_init(&sd->input_pkt_queue);
sd               10197 net/core/dev.c 		skb_queue_head_init(&sd->process_queue);
sd               10199 net/core/dev.c 		skb_queue_head_init(&sd->xfrm_backlog);
sd               10201 net/core/dev.c 		INIT_LIST_HEAD(&sd->poll_list);
sd               10202 net/core/dev.c 		sd->output_queue_tailp = &sd->output_queue;
sd               10204 net/core/dev.c 		sd->csd.func = rps_trigger_softirq;
sd               10205 net/core/dev.c 		sd->csd.info = sd;
sd               10206 net/core/dev.c 		sd->cpu = i;
sd               10209 net/core/dev.c 		init_gro_hash(&sd->backlog);
sd               10210 net/core/dev.c 		sd->backlog.poll = process_backlog;
sd               10211 net/core/dev.c 		sd->backlog.weight = weight_p;
sd                121 net/core/net-procfs.c 	struct softnet_data *sd = NULL;
sd                125 net/core/net-procfs.c 			sd = &per_cpu(softnet_data, *pos);
sd                129 net/core/net-procfs.c 	return sd;
sd                149 net/core/net-procfs.c 	struct softnet_data *sd = v;
sd                156 net/core/net-procfs.c 	fl = rcu_dereference(sd->flow_limit);
sd                164 net/core/net-procfs.c 		   sd->processed, sd->dropped, sd->time_squeeze, 0,
sd                167 net/core/net-procfs.c 		   sd->received_rps, flow_limit_count);
sd                244 net/core/netpoll.c 	struct softnet_data *sd = &get_cpu_var(softnet_data);
sd                246 net/core/netpoll.c 	if (sd->completion_queue) {
sd                250 net/core/netpoll.c 		clist = sd->completion_queue;
sd                251 net/core/netpoll.c 		sd->completion_queue = NULL;
sd                122 net/core/sysctl_net_core.c 	struct softnet_data *sd;
sd                137 net/core/sysctl_net_core.c 			sd = &per_cpu(softnet_data, i);
sd                138 net/core/sysctl_net_core.c 			cur = rcu_dereference_protected(sd->flow_limit,
sd                141 net/core/sysctl_net_core.c 				RCU_INIT_POINTER(sd->flow_limit, NULL);
sd                153 net/core/sysctl_net_core.c 				rcu_assign_pointer(sd->flow_limit, cur);
sd                169 net/core/sysctl_net_core.c 			sd = &per_cpu(softnet_data, i);
sd                170 net/core/sysctl_net_core.c 			if (rcu_dereference(sd->flow_limit))
sd               5724 net/sctp/socket.c 	peeloff->sd = retval;
sd                609 net/sunrpc/auth_gss/svcauth_gss.c 	struct gss_svc_seq_data *sd = &rsci->seqdata;
sd                611 net/sunrpc/auth_gss/svcauth_gss.c 	spin_lock(&sd->sd_lock);
sd                612 net/sunrpc/auth_gss/svcauth_gss.c 	if (seq_num > sd->sd_max) {
sd                613 net/sunrpc/auth_gss/svcauth_gss.c 		if (seq_num >= sd->sd_max + GSS_SEQ_WIN) {
sd                614 net/sunrpc/auth_gss/svcauth_gss.c 			memset(sd->sd_win,0,sizeof(sd->sd_win));
sd                615 net/sunrpc/auth_gss/svcauth_gss.c 			sd->sd_max = seq_num;
sd                616 net/sunrpc/auth_gss/svcauth_gss.c 		} else while (sd->sd_max < seq_num) {
sd                617 net/sunrpc/auth_gss/svcauth_gss.c 			sd->sd_max++;
sd                618 net/sunrpc/auth_gss/svcauth_gss.c 			__clear_bit(sd->sd_max % GSS_SEQ_WIN, sd->sd_win);
sd                620 net/sunrpc/auth_gss/svcauth_gss.c 		__set_bit(seq_num % GSS_SEQ_WIN, sd->sd_win);
sd                622 net/sunrpc/auth_gss/svcauth_gss.c 	} else if (seq_num <= sd->sd_max - GSS_SEQ_WIN) {
sd                626 net/sunrpc/auth_gss/svcauth_gss.c 	if (__test_and_set_bit(seq_num % GSS_SEQ_WIN, sd->sd_win))
sd                629 net/sunrpc/auth_gss/svcauth_gss.c 	spin_unlock(&sd->sd_lock);
sd                632 net/sunrpc/auth_gss/svcauth_gss.c 	spin_unlock(&sd->sd_lock);
sd                 80 net/xfrm/xfrm_device.c 	struct softnet_data *sd;
sd                 97 net/xfrm/xfrm_device.c 	sd = this_cpu_ptr(&softnet_data);
sd                 98 net/xfrm/xfrm_device.c 	err = !skb_queue_empty(&sd->xfrm_backlog);
sd                296 net/xfrm/xfrm_device.c 	struct softnet_data *sd;
sd                309 net/xfrm/xfrm_device.c 		sd = this_cpu_ptr(&softnet_data);
sd                310 net/xfrm/xfrm_device.c 		skb_queue_tail(&sd->xfrm_backlog, skb);
sd                318 net/xfrm/xfrm_device.c void xfrm_dev_backlog(struct softnet_data *sd)
sd                320 net/xfrm/xfrm_device.c 	struct sk_buff_head *xfrm_backlog = &sd->xfrm_backlog;
sd                126 samples/bpf/test_cgrp2_sock.c static int get_bind_to_device(int sd, char *name, size_t len)
sd                132 samples/bpf/test_cgrp2_sock.c 	rc = getsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, &optlen);
sd                139 samples/bpf/test_cgrp2_sock.c static unsigned int get_somark(int sd)
sd                145 samples/bpf/test_cgrp2_sock.c 	rc = getsockopt(sd, SOL_SOCKET, SO_MARK, &mark, &optlen);
sd                152 samples/bpf/test_cgrp2_sock.c static unsigned int get_priority(int sd)
sd                158 samples/bpf/test_cgrp2_sock.c 	rc = getsockopt(sd, SOL_SOCKET, SO_PRIORITY, &prio, &optlen);
sd                169 samples/bpf/test_cgrp2_sock.c 	int sd;
sd                171 samples/bpf/test_cgrp2_sock.c 	sd = socket(family, SOCK_DGRAM, 17);
sd                172 samples/bpf/test_cgrp2_sock.c 	if (sd < 0) {
sd                177 samples/bpf/test_cgrp2_sock.c 	if (get_bind_to_device(sd, name, sizeof(name)) < 0)
sd                180 samples/bpf/test_cgrp2_sock.c 	mark = get_somark(sd);
sd                181 samples/bpf/test_cgrp2_sock.c 	prio = get_priority(sd);
sd                183 samples/bpf/test_cgrp2_sock.c 	close(sd);
sd                185 samples/bpf/test_cgrp2_sock.c 	printf("sd %d: dev %s, mark %u, priority %u\n", sd, name, mark, prio);
sd                 47 samples/bpf/tracex5_kern.c 	struct seccomp_data sd;
sd                 49 samples/bpf/tracex5_kern.c 	bpf_probe_read(&sd, sizeof(sd), (void *)PT_REGS_PARM2(ctx));
sd                 50 samples/bpf/tracex5_kern.c 	if (sd.args[2] == 512) {
sd                 53 samples/bpf/tracex5_kern.c 				 sd.args[0], sd.args[1], sd.args[2]);
sd                 60 samples/bpf/tracex5_kern.c 	struct seccomp_data sd;
sd                 62 samples/bpf/tracex5_kern.c 	bpf_probe_read(&sd, sizeof(sd), (void *)PT_REGS_PARM2(ctx));
sd                 63 samples/bpf/tracex5_kern.c 	if (sd.args[2] > 128 && sd.args[2] <= 1024) {
sd                 66 samples/bpf/tracex5_kern.c 				 sd.args[0], sd.args[1], sd.args[2]);
sd                709 sound/core/oss/pcm_oss.c 		int sd;
sd                717 sound/core/oss/pcm_oss.c 			sd = 4;
sd                718 sound/core/oss/pcm_oss.c 			if (oss_period_size / sd > 4096)
sd                719 sound/core/oss/pcm_oss.c 				sd *= 2;
sd                720 sound/core/oss/pcm_oss.c 			if (oss_period_size / sd < 4096)
sd                721 sound/core/oss/pcm_oss.c 				sd = 1;
sd                723 sound/core/oss/pcm_oss.c 			sd = runtime->oss.subdivision;
sd                724 sound/core/oss/pcm_oss.c 		oss_period_size /= sd;
sd                 55 sound/pci/oxygen/oxygen.h #define OXYGEN_PCI_SUBID(sv, sd) \
sd                 59 sound/pci/oxygen/oxygen.h 	.subdevice = sd
sd                119 tools/accounting/getdelays.c static int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
sd                147 tools/accounting/getdelays.c 	while ((r = sendto(sd, buf, buflen, 0, (struct sockaddr *) &nladdr,
sd                163 tools/accounting/getdelays.c static int get_family_id(int sd)
sd                176 tools/accounting/getdelays.c 	rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY,
sd                182 tools/accounting/getdelays.c 	rep_len = recv(sd, &ans, sizeof(ans), 0);
sd               1879 tools/perf/util/sort.c __sort_dimension__alloc_hpp(struct sort_dimension *sd, int level)
sd               1889 tools/perf/util/sort.c 	hse->se = sd->entry;
sd               1890 tools/perf/util/sort.c 	hse->hpp.name = sd->entry->se_header;
sd               1963 tools/perf/util/sort.c static int __sort_dimension__add_hpp_sort(struct sort_dimension *sd,
sd               1967 tools/perf/util/sort.c 	struct hpp_sort_entry *hse = __sort_dimension__alloc_hpp(sd, level);
sd               1976 tools/perf/util/sort.c static int __sort_dimension__add_hpp_output(struct sort_dimension *sd,
sd               1979 tools/perf/util/sort.c 	struct hpp_sort_entry *hse = __sort_dimension__alloc_hpp(sd, 0);
sd               2500 tools/perf/util/sort.c static int __sort_dimension__add(struct sort_dimension *sd,
sd               2504 tools/perf/util/sort.c 	if (sd->taken)
sd               2507 tools/perf/util/sort.c 	if (__sort_dimension__add_hpp_sort(sd, list, level) < 0)
sd               2510 tools/perf/util/sort.c 	if (sd->entry->se_collapse)
sd               2513 tools/perf/util/sort.c 	sd->taken = 1;
sd               2537 tools/perf/util/sort.c 					struct sort_dimension *sd)
sd               2539 tools/perf/util/sort.c 	if (sd->taken)
sd               2542 tools/perf/util/sort.c 	if (__sort_dimension__add_hpp_output(sd, list) < 0)
sd               2545 tools/perf/util/sort.c 	sd->taken = 1;
sd               2579 tools/perf/util/sort.c 		struct sort_dimension *sd = &common_sort_dimensions[i];
sd               2581 tools/perf/util/sort.c 		if (strncasecmp(tok, sd->name, strlen(tok)))
sd               2584 tools/perf/util/sort.c 		if (sd->entry == &sort_parent) {
sd               2594 tools/perf/util/sort.c 		} else if (sd->entry == &sort_sym) {
sd               2603 tools/perf/util/sort.c 				sd->entry->se_collapse = sort__sym_sort;
sd               2605 tools/perf/util/sort.c 		} else if (sd->entry == &sort_dso) {
sd               2607 tools/perf/util/sort.c 		} else if (sd->entry == &sort_socket) {
sd               2609 tools/perf/util/sort.c 		} else if (sd->entry == &sort_thread) {
sd               2611 tools/perf/util/sort.c 		} else if (sd->entry == &sort_comm) {
sd               2615 tools/perf/util/sort.c 		return __sort_dimension__add(sd, list, level);
sd               2628 tools/perf/util/sort.c 		struct sort_dimension *sd = &bstack_sort_dimensions[i];
sd               2630 tools/perf/util/sort.c 		if (strncasecmp(tok, sd->name, strlen(tok)))
sd               2636 tools/perf/util/sort.c 		if (sd->entry == &sort_sym_from || sd->entry == &sort_sym_to)
sd               2639 tools/perf/util/sort.c 		__sort_dimension__add(sd, list, level);
sd               2644 tools/perf/util/sort.c 		struct sort_dimension *sd = &memory_sort_dimensions[i];
sd               2646 tools/perf/util/sort.c 		if (strncasecmp(tok, sd->name, strlen(tok)))
sd               2652 tools/perf/util/sort.c 		if (sd->entry == &sort_mem_dcacheline && cacheline_size() == 0)
sd               2655 tools/perf/util/sort.c 		if (sd->entry == &sort_mem_daddr_sym)
sd               2658 tools/perf/util/sort.c 		__sort_dimension__add(sd, list, level);
sd               2954 tools/perf/util/sort.c 		struct sort_dimension *sd = &common_sort_dimensions[i];
sd               2956 tools/perf/util/sort.c 		if (strncasecmp(tok, sd->name, strlen(tok)))
sd               2959 tools/perf/util/sort.c 		return __sort_dimension__add_output(list, sd);
sd               2972 tools/perf/util/sort.c 		struct sort_dimension *sd = &bstack_sort_dimensions[i];
sd               2974 tools/perf/util/sort.c 		if (strncasecmp(tok, sd->name, strlen(tok)))
sd               2977 tools/perf/util/sort.c 		return __sort_dimension__add_output(list, sd);
sd               2981 tools/perf/util/sort.c 		struct sort_dimension *sd = &memory_sort_dimensions[i];
sd               2983 tools/perf/util/sort.c 		if (strncasecmp(tok, sd->name, strlen(tok)))
sd               2986 tools/perf/util/sort.c 		return __sort_dimension__add_output(list, sd);
sd               1103 tools/perf/util/stat-display.c 		double sd = stddev_stats(config->walltime_nsecs_stats) / NSEC_PER_SEC;
sd               1108 tools/perf/util/stat-display.c 		int precision = get_precision(sd) + 2;
sd               1114 tools/perf/util/stat-display.c 			precision, avg, precision, sd);
sd               1116 tools/perf/util/stat-display.c 		print_noise_pct(config, sd, avg);
sd                203 tools/testing/selftests/net/nettest.c static int tcp_md5sig(int sd, void *addr, socklen_t alen, const char *password)
sd                216 tools/testing/selftests/net/nettest.c 	rc = setsockopt(sd, IPPROTO_TCP, TCP_MD5SIG, &md5sig, sizeof(md5sig));
sd                228 tools/testing/selftests/net/nettest.c static int tcp_md5_remote(int sd, struct sock_args *args)
sd                257 tools/testing/selftests/net/nettest.c 	if (tcp_md5sig(sd, addr, alen, args->password))
sd                266 tools/testing/selftests/net/nettest.c 	int sd, rc;
sd                275 tools/testing/selftests/net/nettest.c 	sd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
sd                276 tools/testing/selftests/net/nettest.c 	if (sd < 0) {
sd                281 tools/testing/selftests/net/nettest.c 	rc = ioctl(sd, SIOCGIFINDEX, (char *)&ifdata);
sd                282 tools/testing/selftests/net/nettest.c 	close(sd);
sd                291 tools/testing/selftests/net/nettest.c static int bind_to_device(int sd, const char *name)
sd                295 tools/testing/selftests/net/nettest.c 	rc = setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, strlen(name)+1);
sd                302 tools/testing/selftests/net/nettest.c static int get_bind_to_device(int sd, char *name, size_t len)
sd                308 tools/testing/selftests/net/nettest.c 	rc = getsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, &optlen);
sd                315 tools/testing/selftests/net/nettest.c static int check_device(int sd, struct sock_args *args)
sd                320 tools/testing/selftests/net/nettest.c 	if (get_bind_to_device(sd, name, sizeof(name)))
sd                343 tools/testing/selftests/net/nettest.c static int set_pktinfo_v4(int sd)
sd                348 tools/testing/selftests/net/nettest.c 	rc = setsockopt(sd, SOL_IP, IP_PKTINFO, &one, sizeof(one));
sd                355 tools/testing/selftests/net/nettest.c static int set_recvpktinfo_v6(int sd)
sd                360 tools/testing/selftests/net/nettest.c 	rc = setsockopt(sd, SOL_IPV6, IPV6_RECVPKTINFO, &one, sizeof(one));
sd                367 tools/testing/selftests/net/nettest.c static int set_recverr_v4(int sd)
sd                372 tools/testing/selftests/net/nettest.c 	rc = setsockopt(sd, SOL_IP, IP_RECVERR, &one, sizeof(one));
sd                379 tools/testing/selftests/net/nettest.c static int set_recverr_v6(int sd)
sd                384 tools/testing/selftests/net/nettest.c 	rc = setsockopt(sd, SOL_IPV6, IPV6_RECVERR, &one, sizeof(one));
sd                391 tools/testing/selftests/net/nettest.c static int set_unicast_if(int sd, int ifindex, int version)
sd                403 tools/testing/selftests/net/nettest.c 	rc = setsockopt(sd, level, opt, &ifindex, sizeof(ifindex));
sd                410 tools/testing/selftests/net/nettest.c static int set_multicast_if(int sd, int ifindex)
sd                415 tools/testing/selftests/net/nettest.c 	rc = setsockopt(sd, SOL_IP, IP_MULTICAST_IF, &mreq, sizeof(mreq));
sd                422 tools/testing/selftests/net/nettest.c static int set_membership(int sd, uint32_t grp, uint32_t addr, int ifindex)
sd                437 tools/testing/selftests/net/nettest.c 	rc = setsockopt(sd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));
sd                446 tools/testing/selftests/net/nettest.c static int set_broadcast(int sd)
sd                451 tools/testing/selftests/net/nettest.c 	if (setsockopt(sd, SOL_SOCKET, SO_BROADCAST, &one, sizeof(one)) != 0) {
sd                459 tools/testing/selftests/net/nettest.c static int set_reuseport(int sd)
sd                464 tools/testing/selftests/net/nettest.c 	if (setsockopt(sd, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)) != 0) {
sd                472 tools/testing/selftests/net/nettest.c static int set_reuseaddr(int sd)
sd                477 tools/testing/selftests/net/nettest.c 	if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) != 0) {
sd                545 tools/testing/selftests/net/nettest.c static int show_sockstat(int sd, struct sock_args *args)
sd                555 tools/testing/selftests/net/nettest.c 	if (getsockname(sd, sa, &alen) == 0) {
sd                568 tools/testing/selftests/net/nettest.c 	if (getpeername(sd, sa, &alen) == 0) {
sd                616 tools/testing/selftests/net/nettest.c static int send_msg_no_cmsg(int sd, void *addr, socklen_t alen)
sd                621 tools/testing/selftests/net/nettest.c 	err = sendto(sd, msg, msglen, 0, addr, alen);
sd                625 tools/testing/selftests/net/nettest.c 			if (!set_broadcast(sd))
sd                637 tools/testing/selftests/net/nettest.c static int send_msg_cmsg(int sd, void *addr, socklen_t alen,
sd                682 tools/testing/selftests/net/nettest.c 	err = sendmsg(sd, &m, 0);
sd                686 tools/testing/selftests/net/nettest.c 			if (!set_broadcast(sd))
sd                699 tools/testing/selftests/net/nettest.c static int send_msg(int sd, void *addr, socklen_t alen, struct sock_args *args)
sd                702 tools/testing/selftests/net/nettest.c 		if (write(sd, msg, msglen) < 0) {
sd                707 tools/testing/selftests/net/nettest.c 		if (send_msg_cmsg(sd, addr, alen, args->ifindex, args->version))
sd                710 tools/testing/selftests/net/nettest.c 		if (send_msg_no_cmsg(sd, addr, alen))
sd                720 tools/testing/selftests/net/nettest.c static int socket_read_dgram(int sd, struct sock_args *args)
sd                745 tools/testing/selftests/net/nettest.c 	len = recvmsg(sd, &m, 0);
sd                786 tools/testing/selftests/net/nettest.c 				if (send_msg_cmsg(sd, addr, alen,
sd                799 tools/testing/selftests/net/nettest.c 				if (sendto(sd, buf, len, 0,
sd                808 tools/testing/selftests/net/nettest.c 				if (sendmsg(sd, &m, 0) < 0)
sd                814 tools/testing/selftests/net/nettest.c 			err = sendmsg(sd, &m, 0);
sd                818 tools/testing/selftests/net/nettest.c 					if (!set_broadcast(sd))
sd                835 tools/testing/selftests/net/nettest.c static int socket_read_stream(int sd)
sd                840 tools/testing/selftests/net/nettest.c 	len = read(sd, buf, sizeof(buf)-1);
sd                854 tools/testing/selftests/net/nettest.c 		if (write(sd, buf, len) < 0) {
sd                865 tools/testing/selftests/net/nettest.c static int socket_read(int sd, struct sock_args *args)
sd                868 tools/testing/selftests/net/nettest.c 		return socket_read_stream(sd);
sd                870 tools/testing/selftests/net/nettest.c 	return socket_read_dgram(sd, args);
sd                873 tools/testing/selftests/net/nettest.c static int stdin_to_socket(int sd, int type, void *addr, socklen_t alen)
sd                883 tools/testing/selftests/net/nettest.c 		if (write(sd, buf, len) < 0) {
sd                891 tools/testing/selftests/net/nettest.c 		err = sendto(sd, buf, len, 0, addr, alen);
sd                895 tools/testing/selftests/net/nettest.c 				if (!set_broadcast(sd))
sd                909 tools/testing/selftests/net/nettest.c static void set_recv_attr(int sd, int version)
sd                912 tools/testing/selftests/net/nettest.c 		set_recvpktinfo_v6(sd);
sd                913 tools/testing/selftests/net/nettest.c 		set_recverr_v6(sd);
sd                915 tools/testing/selftests/net/nettest.c 		set_pktinfo_v4(sd);
sd                916 tools/testing/selftests/net/nettest.c 		set_recverr_v4(sd);
sd                920 tools/testing/selftests/net/nettest.c static int msg_loop(int client, int sd, void *addr, socklen_t alen,
sd                929 tools/testing/selftests/net/nettest.c 		set_recv_attr(sd, args->version);
sd                936 tools/testing/selftests/net/nettest.c 			if (send_msg(sd, addr, alen, args))
sd                946 tools/testing/selftests/net/nettest.c 	nfds = interactive ? MAX(fileno(stdin), sd)  + 1 : sd + 1;
sd                949 tools/testing/selftests/net/nettest.c 		FD_SET(sd, &rfds);
sd                967 tools/testing/selftests/net/nettest.c 		if (FD_ISSET(sd, &rfds)) {
sd                968 tools/testing/selftests/net/nettest.c 			rc = socket_read(sd, args);
sd                980 tools/testing/selftests/net/nettest.c 			if (stdin_to_socket(sd, args->type, addr, alen) <= 0)
sd                997 tools/testing/selftests/net/nettest.c 			if (send_msg(sd, addr, alen, args)) {
sd               1015 tools/testing/selftests/net/nettest.c 	int sd;
sd               1020 tools/testing/selftests/net/nettest.c 	sd = socket(PF_INET, SOCK_DGRAM, 0);
sd               1021 tools/testing/selftests/net/nettest.c 	if (sd < 0) {
sd               1026 tools/testing/selftests/net/nettest.c 	if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR,
sd               1032 tools/testing/selftests/net/nettest.c 	if (setsockopt(sd, SOL_SOCKET, SO_BROADCAST,
sd               1036 tools/testing/selftests/net/nettest.c 	if (args->dev && bind_to_device(sd, args->dev) != 0)
sd               1039 tools/testing/selftests/net/nettest.c 		 set_multicast_if(sd, args->ifindex))
sd               1044 tools/testing/selftests/net/nettest.c 	if (bind(sd, (struct sockaddr *) &laddr, sizeof(laddr)) < 0) {
sd               1050 tools/testing/selftests/net/nettest.c 	    set_membership(sd, args->grp.s_addr,
sd               1054 tools/testing/selftests/net/nettest.c 	return sd;
sd               1056 tools/testing/selftests/net/nettest.c 	close(sd);
sd               1070 tools/testing/selftests/net/nettest.c static int bind_socket(int sd, struct sock_args *args)
sd               1104 tools/testing/selftests/net/nettest.c 	if (bind(sd, addr, alen) < 0) {
sd               1115 tools/testing/selftests/net/nettest.c 	int sd;
sd               1117 tools/testing/selftests/net/nettest.c 	sd = socket(args->version, args->type, args->protocol);
sd               1118 tools/testing/selftests/net/nettest.c 	if (sd < 0) {
sd               1123 tools/testing/selftests/net/nettest.c 	if (set_reuseaddr(sd) != 0)
sd               1126 tools/testing/selftests/net/nettest.c 	if (set_reuseport(sd) != 0)
sd               1129 tools/testing/selftests/net/nettest.c 	if (args->dev && bind_to_device(sd, args->dev) != 0)
sd               1132 tools/testing/selftests/net/nettest.c 		 set_unicast_if(sd, args->ifindex, args->version))
sd               1135 tools/testing/selftests/net/nettest.c 	if (bind_socket(sd, args))
sd               1141 tools/testing/selftests/net/nettest.c 	if (args->type == SOCK_STREAM && listen(sd, 1) < 0) {
sd               1146 tools/testing/selftests/net/nettest.c 	flags = fcntl(sd, F_GETFL);
sd               1147 tools/testing/selftests/net/nettest.c 	if ((flags < 0) || (fcntl(sd, F_SETFL, flags|O_NONBLOCK) < 0)) {
sd               1152 tools/testing/selftests/net/nettest.c 	if (fcntl(sd, F_SETFD, FD_CLOEXEC) < 0)
sd               1156 tools/testing/selftests/net/nettest.c 	return sd;
sd               1159 tools/testing/selftests/net/nettest.c 	close(sd);
sd               1249 tools/testing/selftests/net/nettest.c static int wait_for_connect(int sd)
sd               1257 tools/testing/selftests/net/nettest.c 	FD_SET(sd, &wfd);
sd               1271 tools/testing/selftests/net/nettest.c 	if (getsockopt(sd, SOL_SOCKET, SO_ERROR, &val, (socklen_t *)&sz) < 0) {
sd               1286 tools/testing/selftests/net/nettest.c 	int sd, rc = -1;
sd               1289 tools/testing/selftests/net/nettest.c 	sd = socket(args->version, args->type, args->protocol);
sd               1290 tools/testing/selftests/net/nettest.c 	if (sd < 0) {
sd               1295 tools/testing/selftests/net/nettest.c 	flags = fcntl(sd, F_GETFL);
sd               1296 tools/testing/selftests/net/nettest.c 	if ((flags < 0) || (fcntl(sd, F_SETFL, flags|O_NONBLOCK) < 0)) {
sd               1301 tools/testing/selftests/net/nettest.c 	if (set_reuseport(sd) != 0)
sd               1304 tools/testing/selftests/net/nettest.c 	if (args->dev && bind_to_device(sd, args->dev) != 0)
sd               1307 tools/testing/selftests/net/nettest.c 		 set_unicast_if(sd, args->ifindex, args->version))
sd               1310 tools/testing/selftests/net/nettest.c 	if (args->has_local_ip && bind_socket(sd, args))
sd               1316 tools/testing/selftests/net/nettest.c 	if (args->password && tcp_md5sig(sd, addr, alen, args->password))
sd               1322 tools/testing/selftests/net/nettest.c 	if (connect(sd, addr, alen) < 0) {
sd               1328 tools/testing/selftests/net/nettest.c 		rc = wait_for_connect(sd);
sd               1333 tools/testing/selftests/net/nettest.c 	return sd;
sd               1336 tools/testing/selftests/net/nettest.c 	close(sd);
sd               1351 tools/testing/selftests/net/nettest.c 	int sd;
sd               1378 tools/testing/selftests/net/nettest.c 		sd = msock_client(args);
sd               1380 tools/testing/selftests/net/nettest.c 		sd = connectsock(addr, alen, args);
sd               1382 tools/testing/selftests/net/nettest.c 	if (sd < 0)
sd               1383 tools/testing/selftests/net/nettest.c 		return -sd;
sd               1389 tools/testing/selftests/net/nettest.c 		rc = show_sockstat(sd, args);
sd               1394 tools/testing/selftests/net/nettest.c 	rc = msg_loop(1, sd, addr, alen, args);
sd               1397 tools/testing/selftests/net/nettest.c 	close(sd);