Symbol: sd
arch/arm/vfp/vfp.h
245
#define vfp_single_normaliseround(sd,vsd,fpscr,except,func) __vfp_single_normaliseround(sd,vsd,fpscr,except)
arch/arm/vfp/vfp.h
246
u32 __vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exceptions);
arch/arm/vfp/vfp.h
248
u32 vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exceptions, const char *func);
arch/arm/vfp/vfpdouble.c
439
static u32 vfp_double_fcvts(int sd, int unused, int dm, u32 fpscr)
arch/arm/vfp/vfpdouble.c
475
return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fcvts");
arch/arm/vfp/vfpdouble.c
478
vfp_put_float(vfp_single_pack(&vsd), sd);
arch/arm/vfp/vfpdouble.c
506
static u32 vfp_double_ftoui(int sd, int unused, int dm, u32 fpscr)
arch/arm/vfp/vfpdouble.c
573
pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
arch/arm/vfp/vfpdouble.c
575
vfp_put_float(d, sd);
arch/arm/vfp/vfpdouble.c
580
static u32 vfp_double_ftouiz(int sd, int unused, int dm, u32 fpscr)
arch/arm/vfp/vfpdouble.c
582
return vfp_double_ftoui(sd, unused, dm, FPSCR_ROUND_TOZERO);
arch/arm/vfp/vfpdouble.c
585
static u32 vfp_double_ftosi(int sd, int unused, int dm, u32 fpscr)
arch/arm/vfp/vfpdouble.c
648
pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
arch/arm/vfp/vfpdouble.c
650
vfp_put_float((s32)d, sd);
arch/arm/vfp/vfpsingle.c
1008
return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fnmul");
arch/arm/vfp/vfpsingle.c
1014
static u32 vfp_single_fadd(int sd, int sn, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
1035
return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fadd");
arch/arm/vfp/vfpsingle.c
1041
static u32 vfp_single_fsub(int sd, int sn, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
1046
return vfp_single_fadd(sd, sn, vfp_single_packed_negate(m), fpscr);
arch/arm/vfp/vfpsingle.c
1052
static u32 vfp_single_fdiv(int sd, int sn, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
1128
return vfp_single_normaliseround(sd, &vsd, fpscr, 0, "fdiv");
arch/arm/vfp/vfpsingle.c
1133
vfp_put_float(vfp_single_pack(&vsd), sd);
arch/arm/vfp/vfpsingle.c
1153
vfp_put_float(vfp_single_pack(&vfp_single_default_qnan), sd);
arch/arm/vfp/vfpsingle.c
202
sd, d, exceptions);
arch/arm/vfp/vfpsingle.c
204
vfp_put_float(d, sd);
arch/arm/vfp/vfpsingle.c
259
static u32 vfp_single_fabs(int sd, int unused, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
261
vfp_put_float(vfp_single_packed_abs(m), sd);
arch/arm/vfp/vfpsingle.c
265
static u32 vfp_single_fcpy(int sd, int unused, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
267
vfp_put_float(m, sd);
arch/arm/vfp/vfpsingle.c
271
static u32 vfp_single_fneg(int sd, int unused, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
273
vfp_put_float(vfp_single_packed_negate(m), sd);
arch/arm/vfp/vfpsingle.c
316
static u32 vfp_single_fsqrt(int sd, int unused, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
337
vfp_put_float(vfp_single_pack(vsp), sd);
arch/arm/vfp/vfpsingle.c
394
return vfp_single_normaliseround(sd, &vsd, fpscr, 0, "fsqrt");
arch/arm/vfp/vfpsingle.c
403
static u32 vfp_compare(int sd, int signal_on_qnan, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
408
d = vfp_get_float(sd);
arch/arm/vfp/vfpsingle.c
462
static u32 vfp_single_fcmp(int sd, int unused, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
464
return vfp_compare(sd, 0, m, fpscr);
arch/arm/vfp/vfpsingle.c
467
static u32 vfp_single_fcmpe(int sd, int unused, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
469
return vfp_compare(sd, 1, m, fpscr);
arch/arm/vfp/vfpsingle.c
472
static u32 vfp_single_fcmpz(int sd, int unused, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
474
return vfp_compare(sd, 0, 0, fpscr);
arch/arm/vfp/vfpsingle.c
477
static u32 vfp_single_fcmpez(int sd, int unused, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
479
return vfp_compare(sd, 1, 0, fpscr);
arch/arm/vfp/vfpsingle.c
525
static u32 vfp_single_fuito(int sd, int unused, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
533
return vfp_single_normaliseround(sd, &vs, fpscr, 0, "fuito");
arch/arm/vfp/vfpsingle.c
536
static u32 vfp_single_fsito(int sd, int unused, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
544
return vfp_single_normaliseround(sd, &vs, fpscr, 0, "fsito");
arch/arm/vfp/vfpsingle.c
547
static u32 vfp_single_ftoui(int sd, int unused, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
615
pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
arch/arm/vfp/vfpsingle.c
617
vfp_put_float(d, sd);
arch/arm/vfp/vfpsingle.c
622
static u32 vfp_single_ftouiz(int sd, int unused, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
624
return vfp_single_ftoui(sd, unused, m, FPSCR_ROUND_TOZERO);
arch/arm/vfp/vfpsingle.c
627
static u32 vfp_single_ftosi(int sd, int unused, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
69
#define vfp_single_normaliseround(sd,vsd,fpscr,except,func) __vfp_single_normaliseround(sd,vsd,fpscr,except)
arch/arm/vfp/vfpsingle.c
694
pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
arch/arm/vfp/vfpsingle.c
696
vfp_put_float((s32)d, sd);
arch/arm/vfp/vfpsingle.c
70
u32 __vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exceptions)
arch/arm/vfp/vfpsingle.c
701
static u32 vfp_single_ftosiz(int sd, int unused, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
703
return vfp_single_ftosi(sd, unused, m, FPSCR_ROUND_TOZERO);
arch/arm/vfp/vfpsingle.c
72
u32 vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exceptions, const char *func)
arch/arm/vfp/vfpsingle.c
895
vfp_single_multiply_accumulate(int sd, int sn, s32 m, u32 fpscr, u32 negate, char *func)
arch/arm/vfp/vfpsingle.c
915
v = vfp_get_float(sd);
arch/arm/vfp/vfpsingle.c
916
pr_debug("VFP: s%u = %08x\n", sd, v);
arch/arm/vfp/vfpsingle.c
925
return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, func);
arch/arm/vfp/vfpsingle.c
935
static u32 vfp_single_fmac(int sd, int sn, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
937
return vfp_single_multiply_accumulate(sd, sn, m, fpscr, 0, "fmac");
arch/arm/vfp/vfpsingle.c
943
static u32 vfp_single_fnmac(int sd, int sn, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
945
return vfp_single_multiply_accumulate(sd, sn, m, fpscr, NEG_MULTIPLY, "fnmac");
arch/arm/vfp/vfpsingle.c
951
static u32 vfp_single_fmsc(int sd, int sn, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
953
return vfp_single_multiply_accumulate(sd, sn, m, fpscr, NEG_SUBTRACT, "fmsc");
arch/arm/vfp/vfpsingle.c
959
static u32 vfp_single_fnmsc(int sd, int sn, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
961
return vfp_single_multiply_accumulate(sd, sn, m, fpscr, NEG_SUBTRACT | NEG_MULTIPLY, "fnmsc");
arch/arm/vfp/vfpsingle.c
967
static u32 vfp_single_fmul(int sd, int sn, s32 m, u32 fpscr)
arch/arm/vfp/vfpsingle.c
984
return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fmul");
arch/arm/vfp/vfpsingle.c
990
static u32 vfp_single_fnmul(int sd, int sn, s32 m, u32 fpscr)
arch/mips/include/asm/asm-eva.h
128
#define kernel_sd(reg, addr) sd reg, addr
arch/mips/include/asm/asm.h
164
#define REG_S sd
arch/mips/include/asm/asm.h
198
#define INT_S sd
arch/mips/include/asm/asm.h
249
#define LONG_S sd
arch/mips/include/asm/asm.h
304
#define PTR_S sd
arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h
77
sd $0, -32768(v0)
arch/mips/include/asm/octeon/cvmx-pciercx-defs.h
322
__BITFIELD_FIELD(uint32_t sd:1,
arch/mips/net/bpf_jit_comp.c
137
emit(ctx, sd, reg, depth, MIPS_R_SP);
arch/mips/net/bpf_jit_comp64.c
375
emit(ctx, sd, src, off, dst);
arch/powerpc/kernel/eeh_sysfs.c
174
if (!pdev->dev.kobj.sd)
arch/riscv/include/asm/asm.h
30
#define REG_S __REG_SEL(sd, sw)
arch/s390/include/asm/nmi.h
41
u64 sd : 1; /* 00 system damage */
arch/s390/kvm/dat.c
261
init.s.sd = old.s.fc1.sd;
arch/s390/kvm/dat.h
172
unsigned long sd : 1; /* Soft-Dirty */
arch/s390/kvm/dat.h
195
unsigned long sd : 1; /* Soft-Dirty */
arch/s390/kvm/dat.h
266
unsigned long sd : 1; /* Soft-Dirty */
arch/s390/kvm/dat.h
402
res.s.sd = dirty;
arch/s390/kvm/dat.h
442
res.s.fc1.sd = dirty;
arch/s390/kvm/dat.h
82
unsigned long sd: 1; /* Soft dirty */
arch/s390/kvm/gaccess.c
1441
newpte.s.sd |= ptep_h->s.sd;
arch/s390/kvm/gaccess.c
1487
newcrste.s.fc1.sd |= oldcrste.s.fc1.sd;
arch/s390/kvm/gmap.c
446
if (!pte.s.pr || (pte.h.p && !pte.s.sd))
arch/s390/kvm/gmap.c
455
pte.s.sd = 0;
arch/s390/kvm/gmap.c
488
if (crste.h.p && !crste.s.fc1.sd)
arch/s390/kvm/gmap.c
500
new.s.fc1.sd = 0;
arch/s390/kvm/gmap.c
545
newcrste.s.fc1.sd = 1;
arch/s390/kvm/gmap.c
575
newpte.s.sd = 1;
arch/s390/kvm/gmap.c
653
newpte.s.sd = oldpte.s.sd;
arch/s390/kvm/gmap.c
654
oldpte.s.sd = 0;
arch/s390/kvm/gmap.c
669
newval.s.fc1.sd = oldval.s.fc1.sd;
arch/sparc/kernel/of_device_32.c
345
struct dev_archdata *sd;
arch/sparc/kernel/of_device_32.c
351
sd = &op->dev.archdata;
arch/sparc/kernel/of_device_32.c
352
sd->op = op;
arch/sparc/kernel/of_device_64.c
638
struct dev_archdata *sd;
arch/sparc/kernel/of_device_64.c
644
sd = &op->dev.archdata;
arch/sparc/kernel/of_device_64.c
645
sd->op = op;
arch/sparc/kernel/pci.c
275
static void pci_init_dev_archdata(struct dev_archdata *sd, void *iommu,
arch/sparc/kernel/pci.c
280
sd->iommu = iommu;
arch/sparc/kernel/pci.c
281
sd->stc = stc;
arch/sparc/kernel/pci.c
282
sd->host_controller = host_controller;
arch/sparc/kernel/pci.c
283
sd->op = op;
arch/sparc/kernel/pci.c
284
sd->numa_node = numa_node;
arch/sparc/kernel/pci.c
291
struct dev_archdata *sd;
arch/sparc/kernel/pci.c
301
sd = &dev->dev.archdata;
arch/sparc/kernel/pci.c
302
pci_init_dev_archdata(sd, pbm->iommu, &pbm->stc, pbm, op,
arch/sparc/kernel/pci.c
304
sd = &op->dev.archdata;
arch/sparc/kernel/pci.c
305
sd->iommu = pbm->iommu;
arch/sparc/kernel/pci.c
306
sd->stc = &pbm->stc;
arch/sparc/kernel/pci.c
307
sd->numa_node = pbm->numa_node;
arch/sparc/kernel/pci.c
375
dev->irq = sd->op->archdata.irqs[0];
arch/sparc/kernel/pci.c
383
pci_parse_of_addrs(sd->op, node, dev);
arch/x86/boot/compressed/ident_map_64.c
113
struct setup_data *sd;
arch/x86/boot/compressed/ident_map_64.c
172
sd = (struct setup_data *)boot_params_ptr->hdr.setup_data;
arch/x86/boot/compressed/ident_map_64.c
173
while (sd) {
arch/x86/boot/compressed/ident_map_64.c
174
unsigned long sd_addr = (unsigned long)sd;
arch/x86/boot/compressed/ident_map_64.c
176
kernel_add_identity_map(sd_addr, sd_addr + sizeof(*sd) + sd->len);
arch/x86/boot/compressed/ident_map_64.c
177
sd = (struct setup_data *)sd->next;
arch/x86/boot/startup/sev-shared.c
532
struct cc_setup_data *sd = NULL;
arch/x86/boot/startup/sev-shared.c
539
sd = (struct cc_setup_data *)hdr;
arch/x86/boot/startup/sev-shared.c
540
return (struct cc_blob_sev_info *)(unsigned long)sd->cc_blob_address;
arch/x86/kernel/kexec-bzimage64.c
128
struct setup_data *sd = (void *)params + rng_seed_setup_data_offset;
arch/x86/kernel/kexec-bzimage64.c
134
sd->type = SETUP_RNG_SEED;
arch/x86/kernel/kexec-bzimage64.c
135
sd->len = RNG_SEED_LENGTH;
arch/x86/kernel/kexec-bzimage64.c
136
get_random_bytes(sd->data, RNG_SEED_LENGTH);
arch/x86/kernel/kexec-bzimage64.c
138
sd->next = params->hdr.setup_data;
arch/x86/kernel/kexec-bzimage64.c
170
struct setup_data *sd = (void *)params + efi_setup_data_offset;
arch/x86/kernel/kexec-bzimage64.c
171
struct efi_setup_data *esd = (void *)sd + sizeof(struct setup_data);
arch/x86/kernel/kexec-bzimage64.c
177
sd->type = SETUP_EFI;
arch/x86/kernel/kexec-bzimage64.c
178
sd->len = sizeof(struct efi_setup_data);
arch/x86/kernel/kexec-bzimage64.c
182
sd->next = params->hdr.setup_data;
arch/x86/kernel/kexec-bzimage64.c
230
struct setup_data *sd = (void *)params + dtb_setup_data_offset;
arch/x86/kernel/kexec-bzimage64.c
234
sd->type = SETUP_DTB;
arch/x86/kernel/kexec-bzimage64.c
235
sd->len = dtb_len;
arch/x86/kernel/kexec-bzimage64.c
238
memcpy(sd->data, initial_boot_params, dtb_len);
arch/x86/kernel/kexec-bzimage64.c
242
sd->next = params->hdr.setup_data;
arch/x86/kernel/kexec-bzimage64.c
253
struct setup_data *sd = (void *)params + ima_setup_data_offset;
arch/x86/kernel/kexec-bzimage64.c
260
sd->type = SETUP_IMA;
arch/x86/kernel/kexec-bzimage64.c
261
sd->len = sizeof(*ima);
arch/x86/kernel/kexec-bzimage64.c
263
ima = (void *)sd + sizeof(struct setup_data);
arch/x86/kernel/kexec-bzimage64.c
269
sd->next = params->hdr.setup_data;
arch/x86/kernel/kexec-bzimage64.c
278
struct setup_data *sd = (void *)params + setup_data_offset;
arch/x86/kernel/kexec-bzimage64.c
279
struct kho_data *kho = (void *)sd + sizeof(*sd);
arch/x86/kernel/kexec-bzimage64.c
284
sd->type = SETUP_KEXEC_KHO;
arch/x86/kernel/kexec-bzimage64.c
285
sd->len = sizeof(struct kho_data);
arch/x86/kernel/kexec-bzimage64.c
296
sd->next = params->hdr.setup_data;
arch/x86/kvm/svm/sev.c
275
struct svm_cpu_data *sd;
arch/x86/kvm/svm/sev.c
283
sd = per_cpu_ptr(&svm_data, cpu);
arch/x86/kvm/svm/sev.c
284
sd->sev_vmcbs[sev->asid] = NULL;
arch/x86/kvm/svm/sev.c
3189
int sev_cpu_init(struct svm_cpu_data *sd)
arch/x86/kvm/svm/sev.c
3194
sd->sev_vmcbs = kcalloc(nr_asids, sizeof(void *), GFP_KERNEL);
arch/x86/kvm/svm/sev.c
3195
if (!sd->sev_vmcbs)
arch/x86/kvm/svm/sev.c
3561
struct svm_cpu_data *sd = per_cpu_ptr(&svm_data, cpu);
arch/x86/kvm/svm/sev.c
3591
if (sd->sev_vmcbs[asid] == svm->vmcb &&
arch/x86/kvm/svm/sev.c
3595
sd->sev_vmcbs[asid] = svm->vmcb;
arch/x86/kvm/svm/svm.c
1327
struct svm_cpu_data *sd = this_cpu_ptr(&svm_data);
arch/x86/kvm/svm/svm.c
1329
if (!sd->bp_spec_reduce_set)
arch/x86/kvm/svm/svm.c
1333
sd->bp_spec_reduce_set = false;
arch/x86/kvm/svm/svm.c
1381
struct svm_cpu_data *sd = per_cpu_ptr(&svm_data, vcpu->cpu);
arch/x86/kvm/svm/svm.c
1393
vmsave(sd->save_area_pa);
arch/x86/kvm/svm/svm.c
1395
sev_es_prepare_switch_to_guest(svm, sev_es_host_save_area(sd));
arch/x86/kvm/svm/svm.c
1411
!sd->bp_spec_reduce_set) {
arch/x86/kvm/svm/svm.c
1412
sd->bp_spec_reduce_set = true;
arch/x86/kvm/svm/svm.c
1844
static void new_asid(struct vcpu_svm *svm, struct svm_cpu_data *sd)
arch/x86/kvm/svm/svm.c
1846
if (sd->next_asid > sd->max_asid) {
arch/x86/kvm/svm/svm.c
1847
++sd->asid_generation;
arch/x86/kvm/svm/svm.c
1848
sd->next_asid = sd->min_asid;
arch/x86/kvm/svm/svm.c
1853
svm->current_vmcb->asid_generation = sd->asid_generation;
arch/x86/kvm/svm/svm.c
1854
svm->asid = sd->next_asid++;
arch/x86/kvm/svm/svm.c
3643
struct svm_cpu_data *sd = per_cpu_ptr(&svm_data, vcpu->cpu);
arch/x86/kvm/svm/svm.c
3661
if (svm->current_vmcb->asid_generation != sd->asid_generation)
arch/x86/kvm/svm/svm.c
3662
new_asid(svm, sd);
arch/x86/kvm/svm/svm.c
4258
struct svm_cpu_data *sd = per_cpu_ptr(&svm_data, vcpu->cpu);
arch/x86/kvm/svm/svm.c
4279
sev_es_host_save_area(sd));
arch/x86/kvm/svm/svm.c
475
static __always_inline struct sev_es_save_area *sev_es_host_save_area(struct svm_cpu_data *sd)
arch/x86/kvm/svm/svm.c
477
return &sd->save_area->host_sev_es_save;
arch/x86/kvm/svm/svm.c
517
struct svm_cpu_data *sd;
arch/x86/kvm/svm/svm.c
525
sd = per_cpu_ptr(&svm_data, me);
arch/x86/kvm/svm/svm.c
526
sd->asid_generation = 1;
arch/x86/kvm/svm/svm.c
527
sd->max_asid = cpuid_ebx(SVM_CPUID_FUNC) - 1;
arch/x86/kvm/svm/svm.c
528
sd->next_asid = sd->max_asid + 1;
arch/x86/kvm/svm/svm.c
529
sd->min_asid = max_sev_asid + 1;
arch/x86/kvm/svm/svm.c
533
wrmsrq(MSR_VM_HSAVE_PA, sd->save_area_pa);
arch/x86/kvm/svm/svm.c
581
struct svm_cpu_data *sd = per_cpu_ptr(&svm_data, cpu);
arch/x86/kvm/svm/svm.c
583
if (!sd->save_area)
arch/x86/kvm/svm/svm.c
586
kfree(sd->sev_vmcbs);
arch/x86/kvm/svm/svm.c
587
__free_page(__sme_pa_to_page(sd->save_area_pa));
arch/x86/kvm/svm/svm.c
588
sd->save_area_pa = 0;
arch/x86/kvm/svm/svm.c
589
sd->save_area = NULL;
arch/x86/kvm/svm/svm.c
594
struct svm_cpu_data *sd = per_cpu_ptr(&svm_data, cpu);
arch/x86/kvm/svm/svm.c
598
memset(sd, 0, sizeof(struct svm_cpu_data));
arch/x86/kvm/svm/svm.c
603
ret = sev_cpu_init(sd);
arch/x86/kvm/svm/svm.c
607
sd->save_area = page_address(save_area_page);
arch/x86/kvm/svm/svm.c
608
sd->save_area_pa = __sme_page_pa(save_area_page);
arch/x86/kvm/svm/svm.h
893
int sev_cpu_init(struct svm_cpu_data *sd);
arch/x86/kvm/svm/svm.h
919
static inline int sev_cpu_init(struct svm_cpu_data *sd) { return 0; }
arch/x86/pci/acpi.c
17
struct pci_sysdata sd;
arch/x86/pci/acpi.c
403
seg = info->sd.domain;
arch/x86/pci/acpi.c
435
pci_mmconfig_delete(info->sd.domain,
arch/x86/pci/acpi.c
555
struct pci_sysdata sd = {
arch/x86/pci/acpi.c
561
memcpy(bus->sysdata, &sd, sizeof(sd));
arch/x86/pci/acpi.c
571
info->sd.domain = domain;
arch/x86/pci/acpi.c
572
info->sd.node = node;
arch/x86/pci/acpi.c
573
info->sd.companion = root->device;
arch/x86/pci/acpi.c
575
&info->common, &info->sd);
arch/x86/pci/acpi.c
600
struct pci_sysdata *sd = bridge->bus->sysdata;
arch/x86/pci/acpi.c
601
ACPI_COMPANION_SET(&bridge->dev, sd->companion);
arch/x86/pci/common.c
461
struct pci_sysdata *sd;
arch/x86/pci/common.c
464
sd = kzalloc_obj(*sd);
arch/x86/pci/common.c
465
if (!sd) {
arch/x86/pci/common.c
469
sd->node = x86_pci_root_bus_node(busnum);
arch/x86/pci/common.c
472
bus = pci_scan_root_bus(NULL, busnum, &pci_root_ops, sd, &resources);
arch/x86/pci/common.c
475
kfree(sd);
block/bfq-wf2q.c
111
sd->service_tree + new_entity_class_idx;
block/bfq-wf2q.c
1110
struct bfq_sched_data *sd = entity->sched_data;
block/bfq-wf2q.c
1127
is_in_service = entity == sd->in_service_entity;
block/bfq-wf2q.c
1132
sd->in_service_entity = NULL;
block/bfq-wf2q.c
1165
struct bfq_sched_data *sd;
block/bfq-wf2q.c
1169
sd = entity->sched_data;
block/bfq-wf2q.c
1182
if (sd->next_in_service == entity)
block/bfq-wf2q.c
1188
bfq_update_next_in_service(sd, NULL, expiration);
block/bfq-wf2q.c
1190
if (sd->next_in_service || sd->in_service_entity) {
block/bfq-wf2q.c
1246
sd = entity->sched_data;
block/bfq-wf2q.c
1247
if (!bfq_update_next_in_service(sd, entity, expiration) &&
block/bfq-wf2q.c
128
next_in_service = bfq_lookup_next_entity(sd, expiration);
block/bfq-wf2q.c
134
parent_sched_may_change = !sd->next_in_service ||
block/bfq-wf2q.c
138
sd->next_in_service = next_in_service;
block/bfq-wf2q.c
1390
static struct bfq_entity *bfq_lookup_next_entity(struct bfq_sched_data *sd,
block/bfq-wf2q.c
1393
struct bfq_service_tree *st = sd->service_tree;
block/bfq-wf2q.c
1405
if (time_is_before_jiffies(sd->bfq_class_idle_last_service +
block/bfq-wf2q.c
1410
sd->bfq_class_idle_last_service = jiffies;
block/bfq-wf2q.c
1434
sd->in_service_entity &&
block/bfq-wf2q.c
1446
struct bfq_sched_data *sd = &bfqd->root_group->sched_data;
block/bfq-wf2q.c
1448
return sd->next_in_service != sd->in_service_entity;
block/bfq-wf2q.c
1457
struct bfq_sched_data *sd;
block/bfq-wf2q.c
1468
sd = &bfqd->root_group->sched_data;
block/bfq-wf2q.c
1469
for (; sd ; sd = entity->my_sched_data) {
block/bfq-wf2q.c
1495
entity = sd->next_in_service;
block/bfq-wf2q.c
1496
sd->in_service_entity = entity;
block/bfq-wf2q.c
1537
struct bfq_sched_data *sd = entity->sched_data;
block/bfq-wf2q.c
1539
if (!bfq_update_next_in_service(sd, NULL, false))
block/bfq-wf2q.c
223
struct bfq_sched_data *sd = entity->sched_data;
block/bfq-wf2q.c
224
struct bfq_group *bfqg = container_of(sd, struct bfq_group, sched_data);
block/bfq-wf2q.c
232
struct bfq_sched_data *sd = entity->sched_data;
block/bfq-wf2q.c
233
struct bfq_group *bfqg = container_of(sd, struct bfq_group, sched_data);
block/bfq-wf2q.c
44
static struct bfq_entity *bfq_lookup_next_entity(struct bfq_sched_data *sd,
block/bfq-wf2q.c
74
static bool bfq_update_next_in_service(struct bfq_sched_data *sd,
block/bfq-wf2q.c
78
struct bfq_entity *next_in_service = sd->next_in_service;
block/bfq-wf2q.c
93
if (new_entity && new_entity != sd->next_in_service) {
block/bfq-wf2q.c
988
struct bfq_sched_data *sd = entity->sched_data;
block/bfq-wf2q.c
991
if (entity == sd->in_service_entity) {
block/bsg.c
182
if (disk && disk->queue_kobj.sd)
block/bsg.c
223
if (q->disk && q->disk->queue_kobj.sd) {
crypto/twofish_common.c
487
ctx->s[3][i] = mds[3][q1[(b) ^ sd] ^ sh]
crypto/twofish_common.c
495
ctx->s[3][i] = mds[3][q1[q1[(a) ^ sd] ^ sh] ^ sl];
crypto/twofish_common.c
503
ctx->s[3][i] = mds[3][q1[q1[q0[(b) ^ sd] ^ sh] ^ sl] ^ sp];
crypto/twofish_common.c
579
u8 sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0, sg = 0, sh = 0;
crypto/twofish_common.c
593
CALC_S (sa, sb, sc, sd, 0, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */
crypto/twofish_common.c
594
CALC_S (sa, sb, sc, sd, 1, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */
crypto/twofish_common.c
595
CALC_S (sa, sb, sc, sd, 2, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */
crypto/twofish_common.c
596
CALC_S (sa, sb, sc, sd, 3, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */
crypto/twofish_common.c
597
CALC_S (sa, sb, sc, sd, 4, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */
crypto/twofish_common.c
598
CALC_S (sa, sb, sc, sd, 5, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */
crypto/twofish_common.c
599
CALC_S (sa, sb, sc, sd, 6, 0xED, 0x37, 0x4F, 0xE0); /* DB 68 3D 9E */
crypto/twofish_common.c
600
CALC_S (sa, sb, sc, sd, 7, 0xE0, 0xD0, 0x8C, 0x17); /* 9E E5 19 03 */
drivers/acpi/nfit/core.c
2100
nfit_kernfs = sysfs_get_dirent(nvdimm_kobj(nvdimm)->sd, "nfit");
drivers/acpi/nfit/core.c
3052
nfit = sysfs_get_dirent(bus_dev->kobj.sd, "nfit");
drivers/acpi/scan.c
2257
struct acpi_scan_system_dev *sd;
drivers/acpi/scan.c
2266
sd = kmalloc_obj(*sd);
drivers/acpi/scan.c
2267
if (sd) {
drivers/acpi/scan.c
2268
sd->adev = device;
drivers/acpi/scan.c
2269
list_add_tail(&sd->node, &acpi_scan_system_dev_list);
drivers/acpi/scan.c
2688
struct acpi_scan_system_dev *sd, *tmp;
drivers/acpi/scan.c
2692
list_for_each_entry_safe(sd, tmp, &acpi_scan_system_dev_list, node) {
drivers/acpi/scan.c
2693
acpi_scan_claim_resources(sd->adev);
drivers/acpi/scan.c
2694
list_del(&sd->node);
drivers/acpi/scan.c
2695
kfree(sd);
drivers/base/core.c
3349
return kobj->sd && kobj->sd->dir.subdirs;
drivers/base/devcoredump.c
86
if (devcd->failing_dev->kobj.sd)
drivers/char/mem.c
440
struct splice_desc *sd)
drivers/char/mem.c
442
return sd->len;
drivers/char/virtio_console.c
857
struct splice_desc *sd)
drivers/char/virtio_console.c
859
struct sg_list *sgl = sd->u.data;
drivers/char/virtio_console.c
871
len = min(buf->len, sd->len);
drivers/char/virtio_console.c
881
offset = sd->pos & ~PAGE_MASK;
drivers/char/virtio_console.c
883
len = sd->len;
drivers/char/virtio_console.c
908
struct splice_desc sd = {
drivers/char/virtio_console.c
947
ret = __splice_from_pipe(pipe, &sd, pipe_to_sg);
drivers/clk/clk-versaclock5.c
954
unsigned int oe, sd, src_mask = 0, src_val = 0;
drivers/clk/clk-versaclock5.c
982
ret = of_property_read_u32(client->dev.of_node, "idt,shutdown", &sd);
drivers/clk/clk-versaclock5.c
985
if (sd)
drivers/clk/ti/dpll3xxx.c
274
unsigned long clkinp, sd; /* watch out for overflow */
drivers/clk/ti/dpll3xxx.c
285
sd = (clkinp * m) / (250 * n);
drivers/clk/ti/dpll3xxx.c
286
mod2 = sd % 10;
drivers/clk/ti/dpll3xxx.c
287
sd /= 10;
drivers/clk/ti/dpll3xxx.c
290
sd++;
drivers/clk/ti/dpll3xxx.c
291
*sd_div = sd;
drivers/cpufreq/powernv-cpufreq.c
839
kn = kernfs_find_and_get(policy->kobj.sd, throttle_attr_grp.name);
drivers/cpufreq/sa1110-cpufreq.c
143
sdram_calculate_timing(struct sdram_info *sd, u_int cpu_khz,
drivers/cpufreq/sa1110-cpufreq.c
162
sd->mdcnfg = MDCNFG & 0x007f007f;
drivers/cpufreq/sa1110-cpufreq.c
171
sd->mdcnfg |= trp << 8;
drivers/cpufreq/sa1110-cpufreq.c
172
sd->mdcnfg |= trp << 24;
drivers/cpufreq/sa1110-cpufreq.c
173
sd->mdcnfg |= sdram->cas_latency << 12;
drivers/cpufreq/sa1110-cpufreq.c
174
sd->mdcnfg |= sdram->cas_latency << 28;
drivers/cpufreq/sa1110-cpufreq.c
175
sd->mdcnfg |= twr << 14;
drivers/cpufreq/sa1110-cpufreq.c
176
sd->mdcnfg |= twr << 30;
drivers/cpufreq/sa1110-cpufreq.c
178
sd->mdrefr = MDREFR & 0xffbffff0;
drivers/cpufreq/sa1110-cpufreq.c
179
sd->mdrefr |= 7;
drivers/cpufreq/sa1110-cpufreq.c
182
sd->mdrefr |= MDREFR_K1DB2;
drivers/cpufreq/sa1110-cpufreq.c
185
set_mdcas(sd->mdcas, sd_khz >= 62000,
drivers/cpufreq/sa1110-cpufreq.c
190
sd->mdcnfg, sd->mdrefr, sd->mdcas[0], sd->mdcas[1],
drivers/cpufreq/sa1110-cpufreq.c
191
sd->mdcas[2]);
drivers/cpufreq/sa1110-cpufreq.c
232
struct sdram_info sd;
drivers/cpufreq/sa1110-cpufreq.c
236
sdram_calculate_timing(&sd, sa11x0_freq_table[ppcr].frequency, sdram);
drivers/cpufreq/sa1110-cpufreq.c
245
sd.mdrefr |= MDREFR_K1DB2;
drivers/cpufreq/sa1110-cpufreq.c
246
sd.mdcas[0] = 0xaaaaaa7f;
drivers/cpufreq/sa1110-cpufreq.c
248
sd.mdrefr &= ~MDREFR_K1DB2;
drivers/cpufreq/sa1110-cpufreq.c
249
sd.mdcas[0] = 0xaaaaaa9f;
drivers/cpufreq/sa1110-cpufreq.c
251
sd.mdcas[1] = 0xaaaaaaaa;
drivers/cpufreq/sa1110-cpufreq.c
252
sd.mdcas[2] = 0xaaaaaaaa;
drivers/cpufreq/sa1110-cpufreq.c
291
: "r" (&MDCNFG), "r" (&PPCR), "0" (sd.mdcnfg),
drivers/cpufreq/sa1110-cpufreq.c
292
"r" (sd.mdrefr), "r" (sd.mdcas[0]),
drivers/cpufreq/sa1110-cpufreq.c
293
"r" (sd.mdcas[1]), "r" (sd.mdcas[2]), "r" (ppcr));
drivers/crypto/amcc/crypto4xx_core.c
847
struct ce_sd *sd = NULL;
drivers/crypto/amcc/crypto4xx_core.c
853
sd = crypto4xx_get_sdp(dev, &sd_dma, sd_idx);
drivers/crypto/amcc/crypto4xx_core.c
856
sd->ctl.done = 0;
drivers/crypto/amcc/crypto4xx_core.c
857
sd->ctl.rdy = 1;
drivers/crypto/amcc/crypto4xx_core.c
865
sd = crypto4xx_get_sdp(dev, &sd_dma, sd_idx);
drivers/crypto/amcc/crypto4xx_core.c
867
sd->ctl.done = 0;
drivers/crypto/amcc/crypto4xx_core.c
868
sd->ctl.rdy = 1;
drivers/crypto/intel/qat/qat_6xxx/adf_6xxx_hw_data.c
479
hw_comp_lower_csr.sd = ICP_QAT_HW_COMP_51_SEARCH_DEPTH_LEVEL_1;
drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.c
515
hw_comp_lower_csr.sd = ICP_QAT_HW_COMP_20_SEARCH_DEPTH_LEVEL_1;
drivers/crypto/intel/qat/qat_common/icp_qat_hw_20_comp.h
12
enum icp_qat_hw_comp_20_search_depth sd;
drivers/crypto/intel/qat/qat_common/icp_qat_hw_20_comp.h
30
QAT_FIELD_SET(val32, csr.sd,
drivers/crypto/intel/qat/qat_common/icp_qat_hw_51_comp.h
14
enum icp_qat_hw_comp_51_search_depth sd;
drivers/crypto/intel/qat/qat_common/icp_qat_hw_51_comp.h
30
QAT_FIELD_SET(val32, csr.sd,
drivers/cxl/core/memdev.c
1182
sec = sysfs_get_dirent(cxlmd->dev.kobj.sd, "security");
drivers/devfreq/governor_userspace.c
110
if (devfreq->dev.kobj.sd)
drivers/extcon/extcon.c
883
struct extcon_dev *sd;
drivers/extcon/extcon.c
889
list_for_each_entry(sd, &extcon_dev_list, entry) {
drivers/extcon/extcon.c
890
if (!strcmp(sd->name, extcon_name))
drivers/extcon/extcon.c
893
sd = ERR_PTR(-EPROBE_DEFER);
drivers/extcon/extcon.c
896
return sd;
drivers/gpio/gpio-sodaville.c
126
static int sdv_register_irqsupport(struct sdv_gpio_chip_data *sd,
drivers/gpio/gpio-sodaville.c
132
sd->irq_base = devm_irq_alloc_descs(&pdev->dev, -1, 0,
drivers/gpio/gpio-sodaville.c
134
if (sd->irq_base < 0)
drivers/gpio/gpio-sodaville.c
135
return sd->irq_base;
drivers/gpio/gpio-sodaville.c
138
writel(0, sd->gpio_pub_base + GPIO_INT);
drivers/gpio/gpio-sodaville.c
139
writel((1 << 11) - 1, sd->gpio_pub_base + GPSTR);
drivers/gpio/gpio-sodaville.c
143
"sdv_gpio", sd);
drivers/gpio/gpio-sodaville.c
152
sd->gc = devm_irq_alloc_generic_chip(&pdev->dev, "sdv-gpio", 1,
drivers/gpio/gpio-sodaville.c
153
sd->irq_base,
drivers/gpio/gpio-sodaville.c
154
sd->gpio_pub_base,
drivers/gpio/gpio-sodaville.c
156
if (!sd->gc)
drivers/gpio/gpio-sodaville.c
159
sd->gc->private = sd;
drivers/gpio/gpio-sodaville.c
160
ct = sd->gc->chip_types;
drivers/gpio/gpio-sodaville.c
169
irq_setup_generic_chip(sd->gc, IRQ_MSK(SDV_NUM_PUB_GPIOS),
drivers/gpio/gpio-sodaville.c
173
sd->id = irq_domain_create_legacy(dev_fwnode(&pdev->dev), SDV_NUM_PUB_GPIOS, sd->irq_base,
drivers/gpio/gpio-sodaville.c
174
0, &irq_domain_sdv_ops, sd);
drivers/gpio/gpio-sodaville.c
175
if (!sd->id)
drivers/gpio/gpio-sodaville.c
185
struct sdv_gpio_chip_data *sd;
drivers/gpio/gpio-sodaville.c
189
sd = devm_kzalloc(&pdev->dev, sizeof(*sd), GFP_KERNEL);
drivers/gpio/gpio-sodaville.c
190
if (!sd)
drivers/gpio/gpio-sodaville.c
205
sd->gpio_pub_base = pcim_iomap_table(pdev)[GPIO_BAR];
drivers/gpio/gpio-sodaville.c
209
writel(mux_val, sd->gpio_pub_base + GPMUXCTL);
drivers/gpio/gpio-sodaville.c
214
.dat = sd->gpio_pub_base + GPINR,
drivers/gpio/gpio-sodaville.c
215
.set = sd->gpio_pub_base + GPOUTR,
drivers/gpio/gpio-sodaville.c
216
.dirout = sd->gpio_pub_base + GPOER,
drivers/gpio/gpio-sodaville.c
219
ret = gpio_generic_chip_init(&sd->gen_gc, &config);
drivers/gpio/gpio-sodaville.c
223
sd->gen_gc.gc.ngpio = SDV_NUM_PUB_GPIOS;
drivers/gpio/gpio-sodaville.c
225
ret = devm_gpiochip_add_data(&pdev->dev, &sd->gen_gc.gc, sd);
drivers/gpio/gpio-sodaville.c
231
ret = sdv_register_irqsupport(sd, pdev);
drivers/gpio/gpio-sodaville.c
235
pci_set_drvdata(pdev, sd);
drivers/gpio/gpio-sodaville.c
49
struct sdv_gpio_chip_data *sd = gc->private;
drivers/gpio/gpio-sodaville.c
54
type_reg = sd->gpio_pub_base + GPIT1R0;
drivers/gpio/gpio-sodaville.c
56
type_reg = sd->gpio_pub_base + GPIT1R1;
drivers/gpio/gpio-sodaville.c
79
struct sdv_gpio_chip_data *sd = data;
drivers/gpio/gpio-sodaville.c
80
unsigned long irq_stat = readl(sd->gpio_pub_base + GPSTR);
drivers/gpio/gpio-sodaville.c
83
irq_stat &= readl(sd->gpio_pub_base + GPIO_INT);
drivers/gpio/gpio-sodaville.c
88
generic_handle_domain_irq(sd->id, irq_bit);
drivers/gpio/gpiolib-sysfs.c
811
desc_data->value_kn = sysfs_get_dirent(desc_data->dev->kobj.sd,
drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
733
if (adev->dev->kobj.sd)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.h
38
#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))
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
2010
if (adev->dev->kobj.sd) {
drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c
457
if (adev->dev->kobj.sd) {
drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c
140
if (adev->dev->kobj.sd)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
2045
if (adev->dev->kobj.sd)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
2066
if (adev->dev->kobj.sd)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
2123
if (adev->dev->kobj.sd)
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
495
if (adev->dev->kobj.sd) {
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
1386
if (adev->dev->kobj.sd) {
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
954
if (adev->dev->kobj.sd) {
drivers/gpu/drm/amd/amdgpu/df_v3_6.c
257
if (adev->dev->kobj.sd)
drivers/gpu/drm/omapdrm/dss/dss.h
140
u16 sd;
drivers/gpu/drm/omapdrm/dss/pll.c
278
unsigned int n, m, mf, m2, sd;
drivers/gpu/drm/omapdrm/dss/pll.c
310
sd = DIV_ROUND_UP(fint * m, 250000000);
drivers/gpu/drm/omapdrm/dss/pll.c
313
n, m, mf, m2, sd);
drivers/gpu/drm/omapdrm/dss/pll.c
320
cinfo->sd = sd;
drivers/gpu/drm/omapdrm/dss/pll.c
551
l = FLD_MOD(l, cinfo->sd, 17, 10); /* PLL_REGSD */
drivers/gpu/drm/radeon/radeon.h
1576
unsigned sd;
drivers/gpu/drm/radeon/radeon_pm.c
1192
enable |= rdev->pm.dpm.sd > 0;
drivers/gpu/drm/radeon/radeon_pm.c
1203
if ((rdev->pm.dpm.sd == 1) && (rdev->pm.dpm.hd == 0))
drivers/gpu/drm/radeon/radeon_pm.c
1205
else if ((rdev->pm.dpm.sd == 2) && (rdev->pm.dpm.hd == 0))
drivers/gpu/drm/radeon/radeon_pm.c
1207
else if ((rdev->pm.dpm.sd == 0) && (rdev->pm.dpm.hd == 1))
drivers/gpu/drm/radeon/radeon_pm.c
1209
else if ((rdev->pm.dpm.sd == 0) && (rdev->pm.dpm.hd == 2))
drivers/gpu/drm/radeon/radeon_uvd.c
841
unsigned *sd, unsigned *hd)
drivers/gpu/drm/radeon/radeon_uvd.c
845
*sd = 0;
drivers/gpu/drm/radeon/radeon_uvd.c
855
++(*sd);
drivers/gpu/drm/radeon/radeon_uvd.c
866
radeon_uvd_count_handles(rdev, &rdev->pm.dpm.sd,
drivers/gpu/drm/radeon/radeon_uvd.c
886
unsigned hd = 0, sd = 0;
drivers/gpu/drm/radeon/radeon_uvd.c
887
radeon_uvd_count_handles(rdev, &sd, &hd);
drivers/gpu/drm/radeon/radeon_uvd.c
888
if ((rdev->pm.dpm.sd != sd) ||
drivers/gpu/drm/radeon/radeon_uvd.c
890
rdev->pm.dpm.sd = sd;
drivers/gpu/host1x/bus.c
400
struct host1x_subdev *subdev, *sd;
drivers/gpu/host1x/bus.c
406
list_for_each_entry_safe(subdev, sd, &device->active, list) {
drivers/gpu/host1x/bus.c
427
list_for_each_entry_safe(subdev, sd, &device->subdevs, list)
drivers/greybus/gb-beagleplay.c
1008
dev_info(&bg->sd->dev, "CC1352 Bootloader Cancel");
drivers/greybus/gb-beagleplay.c
1015
serdev_device_close(bg->sd);
drivers/greybus/gb-beagleplay.c
1022
serdev_device_set_drvdata(bg->sd, bg);
drivers/greybus/gb-beagleplay.c
1023
serdev_device_set_client_ops(bg->sd, &gb_beagleplay_ops);
drivers/greybus/gb-beagleplay.c
1024
ret = serdev_device_open(bg->sd);
drivers/greybus/gb-beagleplay.c
1026
return dev_err_probe(&bg->sd->dev, ret, "Unable to open serial device");
drivers/greybus/gb-beagleplay.c
1028
serdev_device_set_baudrate(bg->sd, 115200);
drivers/greybus/gb-beagleplay.c
1029
serdev_device_set_flow_control(bg->sd, false);
drivers/greybus/gb-beagleplay.c
1060
desc = devm_gpiod_get(&bg->sd->dev, "bootloader-backdoor", GPIOD_IN);
drivers/greybus/gb-beagleplay.c
1065
desc = devm_gpiod_get(&bg->sd->dev, "reset", GPIOD_IN);
drivers/greybus/gb-beagleplay.c
1070
fwl = firmware_upload_register(THIS_MODULE, &bg->sd->dev, "cc1352p7",
drivers/greybus/gb-beagleplay.c
1093
bg->sd = serdev;
drivers/greybus/gb-beagleplay.c
210
dev_dbg(&bg->sd->dev, "Greybus Operation %u type %X cport %u status %u received",
drivers/greybus/gb-beagleplay.c
218
dev_dbg(&bg->sd->dev, "CC1352 Log: %.*s", (int)len, buf);
drivers/greybus/gb-beagleplay.c
237
written = serdev_device_write_buf(bg->sd, buf, count);
drivers/greybus/gb-beagleplay.c
266
dev_warn(&bg->sd->dev, "Tx circ buf full");
drivers/greybus/gb-beagleplay.c
351
dev_warn_ratelimited(&bg->sd->dev, "CRC failed from %02x: 0x%04x", address, crc);
drivers/greybus/gb-beagleplay.c
371
dev_warn_ratelimited(&bg->sd->dev, "unknown frame %u", address);
drivers/greybus/gb-beagleplay.c
403
dev_err_ratelimited(&bg->sd->dev, "RX Buffer Overflow");
drivers/greybus/gb-beagleplay.c
420
bg->tx_circ_buf.buf = devm_kmalloc(&bg->sd->dev, TX_CIRC_BUF_SIZE, GFP_KERNEL);
drivers/greybus/gb-beagleplay.c
457
serdev_device_write_buf(bg->sd, ack, sizeof(ack));
drivers/greybus/gb-beagleplay.c
464
serdev_device_write_buf(bg->sd, nack, sizeof(nack));
drivers/greybus/gb-beagleplay.c
524
dev_warn(&bg->sd->dev,
drivers/greybus/gb-beagleplay.c
545
return dev_err_probe(&bg->sd->dev, ret,
drivers/greybus/gb-beagleplay.c
556
static size_t gb_tty_receive(struct serdev_device *sd, const u8 *data,
drivers/greybus/gb-beagleplay.c
559
struct gb_beagleplay *bg = serdev_device_get_drvdata(sd);
drivers/greybus/gb-beagleplay.c
648
return dev_err_probe(&bg->sd->dev, -ETIMEDOUT,
drivers/greybus/gb-beagleplay.c
665
serdev_device_write_buf(bg->sd, sync_bytes, sizeof(sync_bytes));
drivers/greybus/gb-beagleplay.c
678
serdev_device_write_buf(bg->sd, (const u8 *)&pkt, sizeof(pkt));
drivers/greybus/gb-beagleplay.c
687
return dev_err_probe(&bg->sd->dev, -ETIMEDOUT,
drivers/greybus/gb-beagleplay.c
709
serdev_device_write_buf(bg->sd, (const u8 *)&pkt, sizeof(pkt));
drivers/greybus/gb-beagleplay.c
71
struct serdev_device *sd;
drivers/greybus/gb-beagleplay.c
726
serdev_device_write_buf(bg->sd, (const u8 *)&pkt, sizeof(pkt));
drivers/greybus/gb-beagleplay.c
760
serdev_device_write_buf(bg->sd, (const u8 *)&pkt, sizeof(pkt));
drivers/greybus/gb-beagleplay.c
761
serdev_device_write_buf(bg->sd, (const u8 *)&cmd_data,
drivers/greybus/gb-beagleplay.c
772
return dev_err_probe(&bg->sd->dev, -ETIMEDOUT,
drivers/greybus/gb-beagleplay.c
795
serdev_device_write_buf(bg->sd, (const u8 *)&pkt, sizeof(pkt));
drivers/greybus/gb-beagleplay.c
796
serdev_device_write_buf(bg->sd, (const u8 *)&cmd_data,
drivers/greybus/gb-beagleplay.c
816
serdev_device_write_buf(bg->sd, (const u8 *)&pkt, sizeof(pkt));
drivers/greybus/gb-beagleplay.c
817
serdev_device_write_buf(bg->sd, data, rem);
drivers/greybus/gb-beagleplay.c
840
bg->gb_hd = gb_hd_create(&gb_hdlc_driver, &bg->sd->dev, TX_CIRC_BUF_SIZE, GB_MAX_CPORTS);
drivers/greybus/gb-beagleplay.c
842
dev_err(&bg->sd->dev, "Failed to create greybus host device");
drivers/greybus/gb-beagleplay.c
848
dev_err(&bg->sd->dev, "Failed to add greybus host device");
drivers/greybus/gb-beagleplay.c
867
dev_info(&bg->sd->dev, "CC1352 Start Flashing...");
drivers/greybus/gb-beagleplay.c
880
serdev_device_wait_until_sent(bg->sd, CC1352_BOOTLOADER_TIMEOUT);
drivers/greybus/gb-beagleplay.c
899
return dev_err_probe(&bg->sd->dev, FW_UPLOAD_ERR_HW_ERROR,
drivers/greybus/gb-beagleplay.c
904
return dev_err_probe(&bg->sd->dev, FW_UPLOAD_ERR_HW_ERROR,
drivers/greybus/gb-beagleplay.c
911
dev_warn(&bg->sd->dev, "Skipping reflashing same image");
drivers/greybus/gb-beagleplay.c
916
return dev_err_probe(&bg->sd->dev, FW_UPLOAD_ERR_RW_ERROR,
drivers/greybus/gb-beagleplay.c
924
return dev_err_probe(&bg->sd->dev, FW_UPLOAD_ERR_HW_ERROR,
drivers/greybus/gb-beagleplay.c
958
return dev_err_probe(&bg->sd->dev,
drivers/greybus/gb-beagleplay.c
967
return dev_err_probe(&bg->sd->dev, FW_UPLOAD_ERR_HW_ERROR,
drivers/greybus/gb-beagleplay.c
980
return dev_err_probe(&bg->sd->dev, FW_UPLOAD_ERR_HW_ERROR,
drivers/greybus/gb-beagleplay.c
984
return dev_err_probe(&bg->sd->dev, FW_UPLOAD_ERR_FW_INVALID,
drivers/greybus/gb-beagleplay.c
988
return dev_err_probe(&bg->sd->dev, FW_UPLOAD_ERR_HW_ERROR,
drivers/greybus/gb-beagleplay.c
991
dev_info(&bg->sd->dev, "CC1352 Flashing Successful");
drivers/greybus/gb-beagleplay.c
996
return dev_err_probe(&bg->sd->dev, FW_UPLOAD_ERR_RW_ERROR,
drivers/hid/hid-sensor-hub.c
607
struct sensor_hub_data *sd;
drivers/hid/hid-sensor-hub.c
615
sd = devm_kzalloc(&hdev->dev, sizeof(*sd), GFP_KERNEL);
drivers/hid/hid-sensor-hub.c
616
if (!sd) {
drivers/hid/hid-sensor-hub.c
621
hid_set_drvdata(hdev, sd);
drivers/hid/hid-sensor-hub.c
623
spin_lock_init(&sd->lock);
drivers/hid/hid-sensor-hub.c
624
spin_lock_init(&sd->dyn_callback_lock);
drivers/hid/hid-sensor-hub.c
625
mutex_init(&sd->mutex);
drivers/hid/hid-sensor-hub.c
638
INIT_LIST_HEAD(&sd->dyn_callback_list);
drivers/hid/hid-sensor-hub.c
639
sd->hid_sensor_client_cnt = 0;
drivers/hid/hid-sensor-hub.c
647
sd->hid_sensor_hub_client_devs = devm_kcalloc(&hdev->dev,
drivers/hid/hid-sensor-hub.c
651
if (sd->hid_sensor_hub_client_devs == NULL) {
drivers/hid/hid-sensor-hub.c
694
sd->hid_sensor_hub_client_devs[
drivers/hid/hid-sensor-hub.c
695
sd->hid_sensor_client_cnt].name = name;
drivers/hid/hid-sensor-hub.c
696
sd->hid_sensor_hub_client_devs[
drivers/hid/hid-sensor-hub.c
697
sd->hid_sensor_client_cnt].platform_data =
drivers/hid/hid-sensor-hub.c
699
sd->hid_sensor_hub_client_devs[
drivers/hid/hid-sensor-hub.c
700
sd->hid_sensor_client_cnt].pdata_size =
drivers/hid/hid-sensor-hub.c
704
sd->hid_sensor_client_cnt++;
drivers/hid/hid-sensor-hub.c
718
sd->hid_sensor_hub_client_devs,
drivers/hid/hid-sensor-hub.c
719
sd->hid_sensor_client_cnt);
drivers/hid/hid-steelseries.c
400
struct steelseries_device *sd = container_of(work,
drivers/hid/hid-steelseries.c
402
struct hid_device *hdev = sd->hdev;
drivers/hid/hid-steelseries.c
414
struct steelseries_device *sd = power_supply_get_drvdata(psy);
drivers/hid/hid-steelseries.c
419
val->strval = sd->hdev->name;
drivers/hid/hid-steelseries.c
430
if (sd->headset_connected) {
drivers/hid/hid-steelseries.c
431
val->intval = sd->battery_charging ?
drivers/hid/hid-steelseries.c
441
val->intval = sd->battery_capacity;
drivers/hid/hid-steelseries.c
444
val->intval = battery_capacity_to_level(sd->battery_capacity);
drivers/hid/hid-steelseries.c
478
static int steelseries_headset_battery_register(struct steelseries_device *sd)
drivers/hid/hid-steelseries.c
481
struct power_supply_config battery_cfg = { .drv_data = sd, };
drivers/hid/hid-steelseries.c
485
sd->battery_desc.type = POWER_SUPPLY_TYPE_BATTERY;
drivers/hid/hid-steelseries.c
486
sd->battery_desc.properties = steelseries_headset_battery_props;
drivers/hid/hid-steelseries.c
487
sd->battery_desc.num_properties = ARRAY_SIZE(steelseries_headset_battery_props);
drivers/hid/hid-steelseries.c
488
sd->battery_desc.get_property = steelseries_headset_battery_get_property;
drivers/hid/hid-steelseries.c
489
sd->battery_desc.use_for_apm = 0;
drivers/hid/hid-steelseries.c
491
sd->battery_desc.name = devm_kasprintf(&sd->hdev->dev, GFP_KERNEL,
drivers/hid/hid-steelseries.c
493
if (!sd->battery_desc.name)
drivers/hid/hid-steelseries.c
497
steelseries_headset_set_wireless_status(sd->hdev, false);
drivers/hid/hid-steelseries.c
498
sd->battery_capacity = 100;
drivers/hid/hid-steelseries.c
499
sd->battery_charging = false;
drivers/hid/hid-steelseries.c
501
sd->battery = devm_power_supply_register(&sd->hdev->dev,
drivers/hid/hid-steelseries.c
502
&sd->battery_desc, &battery_cfg);
drivers/hid/hid-steelseries.c
503
if (IS_ERR(sd->battery)) {
drivers/hid/hid-steelseries.c
504
ret = PTR_ERR(sd->battery);
drivers/hid/hid-steelseries.c
505
hid_err(sd->hdev,
drivers/hid/hid-steelseries.c
510
power_supply_powers(sd->battery, &sd->hdev->dev);
drivers/hid/hid-steelseries.c
512
INIT_DELAYED_WORK(&sd->battery_work, steelseries_headset_battery_timer_tick);
drivers/hid/hid-steelseries.c
513
steelseries_headset_fetch_battery(sd->hdev);
drivers/hid/hid-steelseries.c
515
if (sd->quirks & STEELSERIES_ARCTIS_9) {
drivers/hid/hid-steelseries.c
517
schedule_delayed_work(&sd->battery_work,
drivers/hid/hid-steelseries.c
533
struct steelseries_device *sd;
drivers/hid/hid-steelseries.c
545
sd = devm_kzalloc(&hdev->dev, sizeof(*sd), GFP_KERNEL);
drivers/hid/hid-steelseries.c
546
if (!sd)
drivers/hid/hid-steelseries.c
548
hid_set_drvdata(hdev, sd);
drivers/hid/hid-steelseries.c
549
sd->hdev = hdev;
drivers/hid/hid-steelseries.c
550
sd->quirks = id->driver_data;
drivers/hid/hid-steelseries.c
556
if (sd->quirks & STEELSERIES_ARCTIS_9 &&
drivers/hid/hid-steelseries.c
560
spin_lock_init(&sd->lock);
drivers/hid/hid-steelseries.c
570
if (steelseries_headset_battery_register(sd) < 0)
drivers/hid/hid-steelseries.c
571
hid_err(sd->hdev,
drivers/hid/hid-steelseries.c
579
struct steelseries_device *sd;
drivers/hid/hid-steelseries.c
590
sd = hid_get_drvdata(hdev);
drivers/hid/hid-steelseries.c
592
spin_lock_irqsave(&sd->lock, flags);
drivers/hid/hid-steelseries.c
593
sd->removed = true;
drivers/hid/hid-steelseries.c
594
spin_unlock_irqrestore(&sd->lock, flags);
drivers/hid/hid-steelseries.c
596
cancel_delayed_work_sync(&sd->battery_work);
drivers/hid/hid-steelseries.c
631
struct steelseries_device *sd = hid_get_drvdata(hdev);
drivers/hid/hid-steelseries.c
632
int capacity = sd->battery_capacity;
drivers/hid/hid-steelseries.c
633
bool connected = sd->headset_connected;
drivers/hid/hid-steelseries.c
634
bool charging = sd->battery_charging;
drivers/hid/hid-steelseries.c
642
hid_dbg(sd->hdev,
drivers/hid/hid-steelseries.c
646
if (!delayed_work_pending(&sd->battery_work))
drivers/hid/hid-steelseries.c
660
hid_dbg(sd->hdev,
drivers/hid/hid-steelseries.c
663
if (!delayed_work_pending(&sd->battery_work))
drivers/hid/hid-steelseries.c
687
if (connected != sd->headset_connected) {
drivers/hid/hid-steelseries.c
688
hid_dbg(sd->hdev,
drivers/hid/hid-steelseries.c
690
sd->headset_connected ? "" : "not ",
drivers/hid/hid-steelseries.c
692
sd->headset_connected = connected;
drivers/hid/hid-steelseries.c
696
if (capacity != sd->battery_capacity) {
drivers/hid/hid-steelseries.c
697
hid_dbg(sd->hdev,
drivers/hid/hid-steelseries.c
699
sd->battery_capacity, capacity);
drivers/hid/hid-steelseries.c
700
sd->battery_capacity = capacity;
drivers/hid/hid-steelseries.c
701
power_supply_changed(sd->battery);
drivers/hid/hid-steelseries.c
704
if (charging != sd->battery_charging) {
drivers/hid/hid-steelseries.c
705
hid_dbg(sd->hdev,
drivers/hid/hid-steelseries.c
707
sd->battery_charging ? "" : "not ",
drivers/hid/hid-steelseries.c
709
sd->battery_charging = charging;
drivers/hid/hid-steelseries.c
710
power_supply_changed(sd->battery);
drivers/hid/hid-steelseries.c
714
spin_lock_irqsave(&sd->lock, flags);
drivers/hid/hid-steelseries.c
715
if (!sd->removed)
drivers/hid/hid-steelseries.c
716
schedule_delayed_work(&sd->battery_work,
drivers/hid/hid-steelseries.c
718
spin_unlock_irqrestore(&sd->lock, flags);
drivers/iio/adc/ad7124.c
1013
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7124.c
1020
ret = ad_sd_calibrate(&st->sd, AD7124_ADC_CONTROL_MODE_SYS_OFFSET_CALIB,
drivers/iio/adc/ad7124.c
1029
ret = ad_sd_read_reg(&st->sd, AD7124_OFFSET(0), 3,
drivers/iio/adc/ad7124.c
1039
ret = ad_sd_calibrate(&st->sd, AD7124_ADC_CONTROL_MODE_SYS_GAIN_CALIB,
drivers/iio/adc/ad7124.c
1044
ret = ad_sd_read_reg(&st->sd, AD7124_GAIN(0), 3,
drivers/iio/adc/ad7124.c
1327
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7124.c
1475
ad7124_disable_all(&st->sd);
drivers/iio/adc/ad7124.c
1477
ret = ad_sd_write_reg(&st->sd, AD7124_ADC_CONTROL, 2, st->adc_control);
drivers/iio/adc/ad7124.c
1486
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7124.c
1515
ret = ad_sd_calibrate(&st->sd, AD7124_ADC_CONTROL_MODE_INT_GAIN_CALIB, i);
drivers/iio/adc/ad7124.c
1526
ret = ad_sd_read_reg(&st->sd, AD7124_GAIN(0), 3,
drivers/iio/adc/ad7124.c
1532
ret = ad_sd_calibrate(&st->sd, AD7124_ADC_CONTROL_MODE_INT_OFFSET_CALIB, i);
drivers/iio/adc/ad7124.c
1540
ret = ad_sd_read_reg(&st->sd, AD7124_OFFSET(0), 3,
drivers/iio/adc/ad7124.c
1621
ret = ad_sd_init(&st->sd, indio_dev, spi, &ad7124_sigma_delta_info);
drivers/iio/adc/ad7124.c
212
struct ad_sigma_delta sd;
drivers/iio/adc/ad7124.c
270
ret = ad_sd_read_reg(&st->sd, addr, bytes, &readval);
drivers/iio/adc/ad7124.c
277
return ad_sd_write_reg(&st->sd, addr, bytes, readval);
drivers/iio/adc/ad7124.c
280
static int ad7124_set_mode(struct ad_sigma_delta *sd,
drivers/iio/adc/ad7124.c
283
struct ad7124_state *st = container_of(sd, struct ad7124_state, sd);
drivers/iio/adc/ad7124.c
288
return ad_sd_write_reg(&st->sd, AD7124_ADC_CONTROL, 2, st->adc_control);
drivers/iio/adc/ad7124.c
407
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7124.c
455
ret = ad_sd_write_reg(&st->sd, AD7124_OFFSET(cfg_slot), 3,
drivers/iio/adc/ad7124.c
460
ret = ad_sd_write_reg(&st->sd, AD7124_GAIN(cfg_slot), 3,
drivers/iio/adc/ad7124.c
471
ret = ad_sd_write_reg(&st->sd, AD7124_CONFIG(cfg_slot), 2, val);
drivers/iio/adc/ad7124.c
524
return ad_sd_write_reg(&st->sd, AD7124_FILTER(cfg_slot), 3,
drivers/iio/adc/ad7124.c
618
return ad_sd_write_reg(&st->sd, AD7124_CHANNEL(address), 2,
drivers/iio/adc/ad7124.c
624
static int ad7124_set_channel(struct ad_sigma_delta *sd, unsigned int channel)
drivers/iio/adc/ad7124.c
626
struct ad7124_state *st = container_of(sd, struct ad7124_state, sd);
drivers/iio/adc/ad7124.c
636
static int ad7124_append_status(struct ad_sigma_delta *sd, bool append)
drivers/iio/adc/ad7124.c
638
struct ad7124_state *st = container_of(sd, struct ad7124_state, sd);
drivers/iio/adc/ad7124.c
647
ret = ad_sd_write_reg(&st->sd, AD7124_ADC_CONTROL, 2, adc_control);
drivers/iio/adc/ad7124.c
656
static int ad7124_disable_one(struct ad_sigma_delta *sd, unsigned int chan)
drivers/iio/adc/ad7124.c
658
struct ad7124_state *st = container_of(sd, struct ad7124_state, sd);
drivers/iio/adc/ad7124.c
663
return ad_sd_write_reg(&st->sd, AD7124_CHANNEL(chan), 2, 0);
drivers/iio/adc/ad7124.c
666
static int ad7124_disable_all(struct ad_sigma_delta *sd)
drivers/iio/adc/ad7124.c
672
ret = ad7124_disable_one(sd, i);
drivers/iio/adc/ad7124.c
902
ret = ad_sd_read_reg(&st->sd, reg, ad7124_reg_size[reg],
drivers/iio/adc/ad7124.c
905
ret = ad_sd_write_reg(&st->sd, reg, ad7124_reg_size[reg],
drivers/iio/adc/ad7124.c
947
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7124.c
951
ret = ad_sd_reset(&st->sd);
drivers/iio/adc/ad7124.c
958
ret = ad_sd_read_reg(&st->sd, AD7124_STATUS, 1, &readval);
drivers/iio/adc/ad7124.c
972
ret = ad_sd_read_reg(&st->sd, AD7124_GAIN(0), 3, &st->gain_default);
drivers/iio/adc/ad7124.c
983
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7124.c
987
ret = ad_sd_read_reg(&st->sd, AD7124_ID, 1, &readval);
drivers/iio/adc/ad7173.c
1178
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7173.c
1185
ret = spi_write_then_read(st->sd.spi, buf, sizeof(buf), NULL, 0);
drivers/iio/adc/ad7173.c
1192
ret = ad_sd_read_reg(&st->sd, AD7173_REG_ID, 2, &id);
drivers/iio/adc/ad7173.c
1215
return ad7173_disable_all(&st->sd);
drivers/iio/adc/ad7173.c
1407
dev_err(&st->sd.spi->dev,
drivers/iio/adc/ad7173.c
1413
ret = ad7173_set_channel(&st->sd, i);
drivers/iio/adc/ad7173.c
1415
ret = ad_sd_write_reg(&st->sd, AD7173_REG_CH(i), 2, 0);
drivers/iio/adc/ad7173.c
1422
dev_err(&st->sd.spi->dev,
drivers/iio/adc/ad7173.c
1468
dev_err(&st->sd.spi->dev,
drivers/iio/adc/ad7173.c
1493
return ad_sd_read_reg(&st->sd, reg, reg_size, readval);
drivers/iio/adc/ad7173.c
1495
return ad_sd_write_reg(&st->sd, reg, reg_size, writeval);
drivers/iio/adc/ad7173.c
1602
ret = ad_sd_write_reg(&st->sd, AD7173_REG_ADC_MODE, 0x2, st->adc_mode);
drivers/iio/adc/ad7173.c
1671
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7173.c
1688
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7173.c
1729
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7173.c
1836
if (ad_sigma_delta_has_spi_offload(&st->sd)) {
drivers/iio/adc/ad7173.c
1936
if (ad_sigma_delta_has_spi_offload(&st->sd)) {
drivers/iio/adc/ad7173.c
2026
ret = ad_sd_init(&st->sd, indio_dev, spi, st->info->sd_info);
drivers/iio/adc/ad7173.c
238
struct ad_sigma_delta sd;
drivers/iio/adc/ad7173.c
388
ret = ad_sd_calibrate(&st->sd, AD7173_MODE_CAL_SYS_ZERO,
drivers/iio/adc/ad7173.c
391
ret = ad_sd_calibrate(&st->sd, AD7173_MODE_CAL_SYS_FULL,
drivers/iio/adc/ad7173.c
480
ret = ad_sd_calibrate(&st->sd, AD7173_MODE_CAL_INT_ZERO, i);
drivers/iio/adc/ad7173.c
485
ret = ad_sd_calibrate(&st->sd, AD7173_MODE_CAL_INT_FULL, i);
drivers/iio/adc/ad7173.c
594
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7173.c
598
st->reg_gpiocon_regmap = devm_regmap_init_spi(st->sd.spi, &ad7173_regmap_config);
drivers/iio/adc/ad7173.c
627
static struct ad7173_state *ad_sigma_delta_to_ad7173(struct ad_sigma_delta *sd)
drivers/iio/adc/ad7173.c
629
return container_of(sd, struct ad7173_state, sd);
drivers/iio/adc/ad7173.c
739
ret = ad_sd_write_reg(&st->sd, AD7173_REG_SETUP(free_cfg_slot), 2, config);
drivers/iio/adc/ad7173.c
749
return ad_sd_write_reg(&st->sd, AD7173_REG_FILTER(free_cfg_slot), 2,
drivers/iio/adc/ad7173.c
777
return ad_sd_write_reg(&st->sd, AD7173_REG_FILTER(free_cfg_slot), 2,
drivers/iio/adc/ad7173.c
815
static int ad7173_set_channel(struct ad_sigma_delta *sd, unsigned int channel)
drivers/iio/adc/ad7173.c
817
struct ad7173_state *st = ad_sigma_delta_to_ad7173(sd);
drivers/iio/adc/ad7173.c
832
return ad_sd_write_reg(&st->sd, AD7173_REG_CH(channel), 2, val);
drivers/iio/adc/ad7173.c
835
static int ad7173_set_mode(struct ad_sigma_delta *sd,
drivers/iio/adc/ad7173.c
838
struct ad7173_state *st = ad_sigma_delta_to_ad7173(sd);
drivers/iio/adc/ad7173.c
843
return ad_sd_write_reg(&st->sd, AD7173_REG_ADC_MODE, 2, st->adc_mode);
drivers/iio/adc/ad7173.c
846
static int ad7173_append_status(struct ad_sigma_delta *sd, bool append)
drivers/iio/adc/ad7173.c
848
struct ad7173_state *st = ad_sigma_delta_to_ad7173(sd);
drivers/iio/adc/ad7173.c
854
ret = ad_sd_write_reg(&st->sd, AD7173_REG_INTERFACE_MODE, 2, interface_mode);
drivers/iio/adc/ad7173.c
863
static int ad7173_disable_all(struct ad_sigma_delta *sd)
drivers/iio/adc/ad7173.c
865
struct ad7173_state *st = ad_sigma_delta_to_ad7173(sd);
drivers/iio/adc/ad7173.c
870
ret = ad_sd_write_reg(sd, AD7173_REG_CH(i), 2, 0);
drivers/iio/adc/ad7173.c
878
static int ad7173_disable_one(struct ad_sigma_delta *sd, unsigned int chan)
drivers/iio/adc/ad7173.c
880
struct ad7173_state *st = ad_sigma_delta_to_ad7173(sd);
drivers/iio/adc/ad7173.c
885
return ad_sd_write_reg(sd, AD7173_REG_CH(chan), 2, 0);
drivers/iio/adc/ad7191.c
102
static int ad7191_set_mode(struct ad_sigma_delta *sd,
drivers/iio/adc/ad7191.c
105
struct ad7191_state *st = ad_sigma_delta_to_ad7191(sd);
drivers/iio/adc/ad7191.c
110
return ad7191_set_cs(&st->sd, 1);
drivers/iio/adc/ad7191.c
112
return ad7191_set_cs(&st->sd, 0);
drivers/iio/adc/ad7191.c
127
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7191.c
150
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7191.c
247
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7191.c
26
container_of((sigmad), struct ad7191_state, sd)
drivers/iio/adc/ad7191.c
514
ret = ad_sd_init(&st->sd, indio_dev, spi, &ad7191_sigma_delta_info);
drivers/iio/adc/ad7191.c
53
struct ad_sigma_delta sd;
drivers/iio/adc/ad7191.c
72
static int ad7191_set_channel(struct ad_sigma_delta *sd, unsigned int address)
drivers/iio/adc/ad7191.c
74
struct ad7191_state *st = ad_sigma_delta_to_ad7191(sd);
drivers/iio/adc/ad7192.c
1006
ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode);
drivers/iio/adc/ad7192.c
1095
ret = ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, conf);
drivers/iio/adc/ad7192.c
1420
ret = ad_sd_init(&st->sd, indio_dev, spi, st->chip_info->sigma_delta_info);
drivers/iio/adc/ad7192.c
220
struct ad_sigma_delta sd;
drivers/iio/adc/ad7192.c
266
ret = ad_sd_calibrate(&st->sd, AD7192_MODE_CAL_SYS_ZERO,
drivers/iio/adc/ad7192.c
269
ret = ad_sd_calibrate(&st->sd, AD7192_MODE_CAL_SYS_FULL,
drivers/iio/adc/ad7192.c
298
static struct ad7192_state *ad_sigma_delta_to_ad7192(struct ad_sigma_delta *sd)
drivers/iio/adc/ad7192.c
300
return container_of(sd, struct ad7192_state, sd);
drivers/iio/adc/ad7192.c
303
static int ad7192_set_channel(struct ad_sigma_delta *sd, unsigned int channel)
drivers/iio/adc/ad7192.c
305
struct ad7192_state *st = ad_sigma_delta_to_ad7192(sd);
drivers/iio/adc/ad7192.c
310
return ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, st->conf);
drivers/iio/adc/ad7192.c
313
static int ad7192_set_mode(struct ad_sigma_delta *sd,
drivers/iio/adc/ad7192.c
316
struct ad7192_state *st = ad_sigma_delta_to_ad7192(sd);
drivers/iio/adc/ad7192.c
321
return ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode);
drivers/iio/adc/ad7192.c
324
static int ad7192_append_status(struct ad_sigma_delta *sd, bool append)
drivers/iio/adc/ad7192.c
326
struct ad7192_state *st = ad_sigma_delta_to_ad7192(sd);
drivers/iio/adc/ad7192.c
333
ret = ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, mode);
drivers/iio/adc/ad7192.c
342
static int ad7192_disable_all(struct ad_sigma_delta *sd)
drivers/iio/adc/ad7192.c
344
struct ad7192_state *st = ad_sigma_delta_to_ad7192(sd);
drivers/iio/adc/ad7192.c
350
ret = ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, conf);
drivers/iio/adc/ad7192.c
399
return ad_sd_calibrate_all(&st->sd, ad7192_calib_arr,
drivers/iio/adc/ad7192.c
445
ret = ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode);
drivers/iio/adc/ad7192.c
462
ret = ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode);
drivers/iio/adc/ad7192.c
478
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7192.c
506
struct device *dev = &st->sd.spi->dev;
drivers/iio/adc/ad7192.c
576
ret = ad_sd_reset(&st->sd);
drivers/iio/adc/ad7192.c
582
ret = ad_sd_read_reg(&st->sd, AD7192_REG_ID, 1, &id);
drivers/iio/adc/ad7192.c
625
ret = ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode);
drivers/iio/adc/ad7192.c
629
ret = ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, st->conf);
drivers/iio/adc/ad7192.c
712
ad_sd_write_reg(&st->sd, AD7192_REG_GPOCON, 1, st->gpocon);
drivers/iio/adc/ad7192.c
720
ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, st->conf);
drivers/iio/adc/ad7192.c
866
ret = ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode);
drivers/iio/adc/ad7192.c
870
return ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, st->conf);
drivers/iio/adc/ad7192.c
976
ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, st->conf);
drivers/iio/adc/ad7192.c
991
ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode);
drivers/iio/adc/ad7780.c
321
ad_sd_init(&st->sd, indio_dev, spi, &ad7780_sigma_delta_info);
drivers/iio/adc/ad7780.c
69
struct ad_sigma_delta sd;
drivers/iio/adc/ad7780.c
79
static struct ad7780_state *ad_sigma_delta_to_ad7780(struct ad_sigma_delta *sd)
drivers/iio/adc/ad7780.c
81
return container_of(sd, struct ad7780_state, sd);
drivers/iio/adc/ad7791.c
195
struct ad_sigma_delta sd;
drivers/iio/adc/ad7791.c
214
static struct ad7791_state *ad_sigma_delta_to_ad7791(struct ad_sigma_delta *sd)
drivers/iio/adc/ad7791.c
216
return container_of(sd, struct ad7791_state, sd);
drivers/iio/adc/ad7791.c
219
static int ad7791_set_channel(struct ad_sigma_delta *sd, unsigned int channel)
drivers/iio/adc/ad7791.c
221
ad_sd_set_comm(sd, channel);
drivers/iio/adc/ad7791.c
226
static int ad7791_set_mode(struct ad_sigma_delta *sd,
drivers/iio/adc/ad7791.c
229
struct ad7791_state *st = ad_sigma_delta_to_ad7791(sd);
drivers/iio/adc/ad7791.c
247
return ad_sd_write_reg(sd, AD7791_REG_MODE, sizeof(st->mode), st->mode);
drivers/iio/adc/ad7791.c
332
ad_sd_write_reg(&st->sd, AD7791_REG_FILTER,
drivers/iio/adc/ad7791.c
399
return ad_sd_write_reg(&st->sd, AD7791_REG_MODE, sizeof(st->mode),
drivers/iio/adc/ad7791.c
439
ad_sd_init(&st->sd, indio_dev, spi, &ad7791_sigma_delta_info);
drivers/iio/adc/ad7793.c
160
struct ad_sigma_delta sd;
drivers/iio/adc/ad7793.c
176
static struct ad7793_state *ad_sigma_delta_to_ad7793(struct ad_sigma_delta *sd)
drivers/iio/adc/ad7793.c
178
return container_of(sd, struct ad7793_state, sd);
drivers/iio/adc/ad7793.c
181
static int ad7793_set_channel(struct ad_sigma_delta *sd, unsigned int channel)
drivers/iio/adc/ad7793.c
183
struct ad7793_state *st = ad_sigma_delta_to_ad7793(sd);
drivers/iio/adc/ad7793.c
188
return ad_sd_write_reg(&st->sd, AD7793_REG_CONF, 2, st->conf);
drivers/iio/adc/ad7793.c
191
static int ad7793_set_mode(struct ad_sigma_delta *sd,
drivers/iio/adc/ad7793.c
194
struct ad7793_state *st = ad_sigma_delta_to_ad7793(sd);
drivers/iio/adc/ad7793.c
199
return ad_sd_write_reg(&st->sd, AD7793_REG_MODE, 2, st->mode);
drivers/iio/adc/ad7793.c
223
return ad_sd_calibrate_all(&st->sd, ad7793_calib_arr,
drivers/iio/adc/ad7793.c
269
ret = ad_sd_reset(&st->sd);
drivers/iio/adc/ad7793.c
275
ret = ad_sd_read_reg(&st->sd, AD7793_REG_ID, 1, &id);
drivers/iio/adc/ad7793.c
283
dev_err(&st->sd.spi->dev, "device ID query failed\n");
drivers/iio/adc/ad7793.c
309
ret = ad7793_set_mode(&st->sd, AD_SD_MODE_IDLE);
drivers/iio/adc/ad7793.c
313
ret = ad7793_set_channel(&st->sd, 0);
drivers/iio/adc/ad7793.c
318
ret = ad_sd_write_reg(&st->sd, AD7793_REG_IO, 1,
drivers/iio/adc/ad7793.c
342
dev_err(&st->sd.spi->dev, "setup failed\n");
drivers/iio/adc/ad7793.c
486
ad_sd_write_reg(&st->sd, AD7793_REG_CONF,
drivers/iio/adc/ad7793.c
506
ad_sd_write_reg(&st->sd, AD7793_REG_MODE, sizeof(st->mode),
drivers/iio/adc/ad7793.c
799
ad_sd_init(&st->sd, indio_dev, spi, &ad7793_sigma_delta_info);
drivers/iio/adc/max11205.c
117
ad_sd_init(&st->sd, indio_dev, spi, &max11205_sigma_delta_info);
drivers/iio/adc/max11205.c
35
struct ad_sigma_delta sd;
drivers/iio/common/ssp_sensors/ssp_spi.c
269
int idx, sd;
drivers/iio/common/ssp_sensors/ssp_spi.c
278
sd = dataframe[idx++];
drivers/iio/common/ssp_sensors/ssp_spi.c
279
if (sd < 0 || sd >= SSP_SENSOR_MAX) {
drivers/iio/common/ssp_sensors/ssp_spi.c
281
"Mcu data frame1 error %d\n", sd);
drivers/iio/common/ssp_sensors/ssp_spi.c
285
if (indio_devs[sd]) {
drivers/iio/common/ssp_sensors/ssp_spi.c
286
spd = iio_priv(indio_devs[sd]);
drivers/iio/common/ssp_sensors/ssp_spi.c
290
spd->process_data(indio_devs[sd],
drivers/iio/common/ssp_sensors/ssp_spi.c
298
idx += ssp_offset_map[sd];
drivers/iio/common/ssp_sensors/ssp_spi.c
303
sd = ssp_print_mcu_debug(dataframe, &idx, len);
drivers/iio/common/ssp_sensors/ssp_spi.c
304
if (sd) {
drivers/iio/common/ssp_sensors/ssp_spi.c
306
"Mcu data frame3 error %d\n", sd);
drivers/iio/common/ssp_sensors/ssp_spi.c
307
return sd;
drivers/infiniband/hw/irdma/ctrl.c
3343
struct irdma_hmc_obj_info *info, u32 *sd)
drivers/infiniband/hw/irdma/ctrl.c
3410
*sd = (u32)((size >> 21) + 1); /* add 1 for remainder */
drivers/infiniband/hw/irdma/ctrl.c
3412
*sd = (u32)(size >> 21);
drivers/infiniband/hw/irdma/ctrl.c
5307
u64 sd;
drivers/infiniband/hw/irdma/ctrl.c
5318
sd = (size >> 21) + 1; /* add 1 for remainder */
drivers/infiniband/hw/irdma/ctrl.c
5320
sd = size >> 21;
drivers/infiniband/hw/irdma/ctrl.c
5325
sd += (size >> 21) + 1; /* add 1 for remainder */
drivers/infiniband/hw/irdma/ctrl.c
5327
sd += size >> 21;
drivers/infiniband/hw/irdma/ctrl.c
5329
if (sd > 0xFFFFFFFF) {
drivers/infiniband/hw/irdma/ctrl.c
5330
ibdev_dbg(to_ibdev(dev), "HMC: sd overflow[%lld]\n", sd);
drivers/infiniband/hw/irdma/ctrl.c
5331
sd = 0xFFFFFFFF - 1;
drivers/infiniband/hw/irdma/ctrl.c
5334
return (u32)sd;
drivers/leds/led-class.c
142
sysfs_get_dirent(dev->kobj.sd, "brightness_hw_changed");
drivers/leds/leds-turris-omnia.c
377
leds->brightness_knode = sysfs_get_dirent(leds->client->dev.kobj.sd, "brightness");
drivers/md/md-bitmap.c
2136
if (mddev->kobj.sd)
drivers/md/md-bitmap.c
2137
bm = sysfs_get_dirent(mddev->kobj.sd, "bitmap");
drivers/md/md.c
2612
rdev->sysfs_state = sysfs_get_dirent_safe(rdev->kobj.sd, "state");
drivers/md/md.c
2614
sysfs_get_dirent_safe(rdev->kobj.sd, "unacknowledged_bad_blocks");
drivers/md/md.c
2616
sysfs_get_dirent_safe(rdev->kobj.sd, "bad_blocks");
drivers/md/md.c
4170
mddev->sysfs_action = sysfs_get_dirent(mddev->kobj.sd, "sync_action");
drivers/md/md.c
4171
mddev->sysfs_completed = sysfs_get_dirent_safe(mddev->kobj.sd, "sync_completed");
drivers/md/md.c
4172
mddev->sysfs_degraded = sysfs_get_dirent_safe(mddev->kobj.sd, "degraded");
drivers/md/md.c
6373
mddev->sysfs_state = sysfs_get_dirent_safe(mddev->kobj.sd, "array_state");
drivers/md/md.c
6374
mddev->sysfs_level = sysfs_get_dirent_safe(mddev->kobj.sd, "level");
drivers/md/md.c
6643
if (mddev->kobj.sd &&
drivers/md/md.c
6647
mddev->sysfs_action = sysfs_get_dirent_safe(mddev->kobj.sd, "sync_action");
drivers/md/md.c
6648
mddev->sysfs_completed = sysfs_get_dirent_safe(mddev->kobj.sd, "sync_completed");
drivers/md/md.c
6649
mddev->sysfs_degraded = sysfs_get_dirent_safe(mddev->kobj.sd, "degraded");
drivers/md/md.c
935
if (mddev->kobj.sd) {
drivers/md/md.c
9925
if (removed && mddev->kobj.sd)
drivers/md/md.h
804
static inline struct kernfs_node *sysfs_get_dirent_safe(struct kernfs_node *sd, char *name)
drivers/md/md.h
806
if (sd)
drivers/md/md.h
807
return sysfs_get_dirent(sd, name);
drivers/md/md.h
808
return sd;
drivers/md/md.h
810
static inline void sysfs_notify_dirent_safe(struct kernfs_node *sd)
drivers/md/md.h
812
if (sd)
drivers/md/md.h
813
sysfs_notify_dirent(sd);
drivers/md/md.h
826
mddev->kobj.sd) {
drivers/md/md.h
838
mddev->kobj.sd) {
drivers/md/raid5.c
8078
else if (mddev->kobj.sd &&
drivers/media/dvb-frontends/au8522_decoder.c
168
static inline struct au8522_state *to_state(struct v4l2_subdev *sd)
drivers/media/dvb-frontends/au8522_decoder.c
170
return container_of(sd, struct au8522_state, sd);
drivers/media/dvb-frontends/au8522_decoder.c
473
static int au8522_g_register(struct v4l2_subdev *sd,
drivers/media/dvb-frontends/au8522_decoder.c
476
struct au8522_state *state = to_state(sd);
drivers/media/dvb-frontends/au8522_decoder.c
482
static int au8522_s_register(struct v4l2_subdev *sd,
drivers/media/dvb-frontends/au8522_decoder.c
485
struct au8522_state *state = to_state(sd);
drivers/media/dvb-frontends/au8522_decoder.c
531
static int au8522_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/dvb-frontends/au8522_decoder.c
533
struct au8522_state *state = to_state(sd);
drivers/media/dvb-frontends/au8522_decoder.c
561
static int au8522_s_video_routing(struct v4l2_subdev *sd,
drivers/media/dvb-frontends/au8522_decoder.c
564
struct au8522_state *state = to_state(sd);
drivers/media/dvb-frontends/au8522_decoder.c
583
static int au8522_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/dvb-frontends/au8522_decoder.c
585
struct au8522_state *state = to_state(sd);
drivers/media/dvb-frontends/au8522_decoder.c
598
static int au8522_s_audio_routing(struct v4l2_subdev *sd,
drivers/media/dvb-frontends/au8522_decoder.c
601
struct au8522_state *state = to_state(sd);
drivers/media/dvb-frontends/au8522_decoder.c
611
static int au8522_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
drivers/media/dvb-frontends/au8522_decoder.c
614
struct au8522_state *state = to_state(sd);
drivers/media/dvb-frontends/au8522_decoder.c
677
struct v4l2_subdev *sd;
drivers/media/dvb-frontends/au8522_decoder.c
708
sd = &state->sd;
drivers/media/dvb-frontends/au8522_decoder.c
709
v4l2_i2c_subdev_init(sd, client, &au8522_ops);
drivers/media/dvb-frontends/au8522_decoder.c
718
sd->entity.function = MEDIA_ENT_F_ATV_DECODER;
drivers/media/dvb-frontends/au8522_decoder.c
720
ret = media_entity_pads_init(&sd->entity, ARRAY_SIZE(state->pads),
drivers/media/dvb-frontends/au8522_decoder.c
739
sd->ctrl_handler = hdl;
drivers/media/dvb-frontends/au8522_decoder.c
763
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/dvb-frontends/au8522_decoder.c
764
v4l2_device_unregister_subdev(sd);
drivers/media/dvb-frontends/au8522_decoder.c
765
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/dvb-frontends/au8522_decoder.c
766
au8522_release_state(to_state(sd));
drivers/media/dvb-frontends/au8522_priv.h
60
struct v4l2_subdev sd;
drivers/media/dvb-frontends/rtl2832_sdr.c
31
#define V4L2_SUBDEV_HAS_OP(sd, o, f) \
drivers/media/dvb-frontends/rtl2832_sdr.c
32
((sd) && (sd)->ops && (sd)->ops->o && (sd)->ops->o->f)
drivers/media/i2c/ad5820.c
244
static int ad5820_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ad5820.c
246
return ad5820_set_power(sd, 1);
drivers/media/i2c/ad5820.c
249
static int ad5820_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ad5820.c
251
return ad5820_set_power(sd, 0);
drivers/media/i2c/ad5820.c
37
#define to_ad5820_device(sd) container_of(sd, struct ad5820_device, subdev)
drivers/media/i2c/adp1653.c
352
static int adp1653_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/adp1653.c
354
return adp1653_set_power(sd, 1);
drivers/media/i2c/adp1653.c
357
static int adp1653_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/adp1653.c
359
return adp1653_set_power(sd, 0);
drivers/media/i2c/adv7170.c
108
ret = adv7170_write(sd, reg, *data++);
drivers/media/i2c/adv7170.c
184
static int adv7170_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/adv7170.c
186
struct adv7170 *encoder = to_adv7170(sd);
drivers/media/i2c/adv7170.c
188
v4l2_dbg(1, debug, sd, "set norm %llx\n", (unsigned long long)std);
drivers/media/i2c/adv7170.c
191
adv7170_write_block(sd, init_NTSC, sizeof(init_NTSC));
drivers/media/i2c/adv7170.c
193
adv7170_write(sd, 0x02, 0x0e); /* Enable genlock */
drivers/media/i2c/adv7170.c
194
adv7170_write(sd, 0x07, TR0MODE | TR0RST);
drivers/media/i2c/adv7170.c
195
adv7170_write(sd, 0x07, TR0MODE);
drivers/media/i2c/adv7170.c
197
adv7170_write_block(sd, init_PAL, sizeof(init_PAL));
drivers/media/i2c/adv7170.c
199
adv7170_write(sd, 0x02, 0x0e); /* Enable genlock */
drivers/media/i2c/adv7170.c
200
adv7170_write(sd, 0x07, TR0MODE | TR0RST);
drivers/media/i2c/adv7170.c
201
adv7170_write(sd, 0x07, TR0MODE);
drivers/media/i2c/adv7170.c
203
v4l2_dbg(1, debug, sd, "illegal norm: %llx\n",
drivers/media/i2c/adv7170.c
207
v4l2_dbg(1, debug, sd, "switched to %llx\n", (unsigned long long)std);
drivers/media/i2c/adv7170.c
212
static int adv7170_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/adv7170.c
215
struct adv7170 *encoder = to_adv7170(sd);
drivers/media/i2c/adv7170.c
221
v4l2_dbg(1, debug, sd, "set input from %s\n",
drivers/media/i2c/adv7170.c
226
adv7170_write(sd, 0x01, 0x20);
drivers/media/i2c/adv7170.c
227
adv7170_write(sd, 0x08, TR1CAPT); /* TR1 */
drivers/media/i2c/adv7170.c
228
adv7170_write(sd, 0x02, 0x0e); /* Enable genlock */
drivers/media/i2c/adv7170.c
229
adv7170_write(sd, 0x07, TR0MODE | TR0RST);
drivers/media/i2c/adv7170.c
230
adv7170_write(sd, 0x07, TR0MODE);
drivers/media/i2c/adv7170.c
235
adv7170_write(sd, 0x01, 0x00);
drivers/media/i2c/adv7170.c
236
adv7170_write(sd, 0x08, TR1PLAY); /* TR1 */
drivers/media/i2c/adv7170.c
237
adv7170_write(sd, 0x02, 0x08);
drivers/media/i2c/adv7170.c
238
adv7170_write(sd, 0x07, TR0MODE | TR0RST);
drivers/media/i2c/adv7170.c
239
adv7170_write(sd, 0x07, TR0MODE);
drivers/media/i2c/adv7170.c
244
v4l2_dbg(1, debug, sd, "illegal input: %d\n", input);
drivers/media/i2c/adv7170.c
247
v4l2_dbg(1, debug, sd, "switched to %s\n", inputs[input]);
drivers/media/i2c/adv7170.c
252
static int adv7170_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/adv7170.c
263
static int adv7170_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/adv7170.c
268
u8 val = adv7170_read(sd, 0x7);
drivers/media/i2c/adv7170.c
286
static int adv7170_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/adv7170.c
291
u8 val = adv7170_read(sd, 0x7);
drivers/media/i2c/adv7170.c
306
v4l2_dbg(1, debug, sd,
drivers/media/i2c/adv7170.c
312
return adv7170_write(sd, 0x7, val);
drivers/media/i2c/adv7170.c
340
struct v4l2_subdev *sd;
drivers/media/i2c/adv7170.c
353
sd = &encoder->sd;
drivers/media/i2c/adv7170.c
354
v4l2_i2c_subdev_init(sd, client, &adv7170_ops);
drivers/media/i2c/adv7170.c
358
i = adv7170_write_block(sd, init_NTSC, sizeof(init_NTSC));
drivers/media/i2c/adv7170.c
360
i = adv7170_write(sd, 0x07, TR0MODE | TR0RST);
drivers/media/i2c/adv7170.c
361
i = adv7170_write(sd, 0x07, TR0MODE);
drivers/media/i2c/adv7170.c
362
i = adv7170_read(sd, 0x12);
drivers/media/i2c/adv7170.c
363
v4l2_dbg(1, debug, sd, "revision %d\n", i & 1);
drivers/media/i2c/adv7170.c
366
v4l2_dbg(1, debug, sd, "init error 0x%x\n", i);
drivers/media/i2c/adv7170.c
372
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/adv7170.c
374
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/adv7170.c
39
struct v4l2_subdev sd;
drivers/media/i2c/adv7170.c
46
static inline struct adv7170 *to_adv7170(struct v4l2_subdev *sd)
drivers/media/i2c/adv7170.c
48
return container_of(sd, struct adv7170, sd);
drivers/media/i2c/adv7170.c
60
static inline int adv7170_write(struct v4l2_subdev *sd, u8 reg, u8 value)
drivers/media/i2c/adv7170.c
62
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7170.c
63
struct adv7170 *encoder = to_adv7170(sd);
drivers/media/i2c/adv7170.c
69
static inline int adv7170_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7170.c
71
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7170.c
76
static int adv7170_write_block(struct v4l2_subdev *sd,
drivers/media/i2c/adv7170.c
79
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7170.c
80
struct adv7170 *encoder = to_adv7170(sd);
drivers/media/i2c/adv7175.c
102
ret = adv7175_write(sd, reg, *data++);
drivers/media/i2c/adv7175.c
112
static void set_subcarrier_freq(struct v4l2_subdev *sd, int pass_through)
drivers/media/i2c/adv7175.c
117
adv7175_write(sd, 0x02, 0x00);
drivers/media/i2c/adv7175.c
119
adv7175_write(sd, 0x02, 0x55);
drivers/media/i2c/adv7175.c
121
adv7175_write(sd, 0x03, 0x55);
drivers/media/i2c/adv7175.c
122
adv7175_write(sd, 0x04, 0x55);
drivers/media/i2c/adv7175.c
123
adv7175_write(sd, 0x05, 0x25);
drivers/media/i2c/adv7175.c
183
static int adv7175_init(struct v4l2_subdev *sd, u32 val)
drivers/media/i2c/adv7175.c
186
adv7175_write_block(sd, init_common, sizeof(init_common));
drivers/media/i2c/adv7175.c
187
adv7175_write(sd, 0x07, TR0MODE | TR0RST);
drivers/media/i2c/adv7175.c
188
adv7175_write(sd, 0x07, TR0MODE);
drivers/media/i2c/adv7175.c
192
static int adv7175_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/adv7175.c
194
struct adv7175 *encoder = to_adv7175(sd);
drivers/media/i2c/adv7175.c
197
adv7175_write_block(sd, init_ntsc, sizeof(init_ntsc));
drivers/media/i2c/adv7175.c
199
adv7175_write(sd, 0x0d, 0x4f); /* Enable genlock */
drivers/media/i2c/adv7175.c
200
adv7175_write(sd, 0x07, TR0MODE | TR0RST);
drivers/media/i2c/adv7175.c
201
adv7175_write(sd, 0x07, TR0MODE);
drivers/media/i2c/adv7175.c
203
adv7175_write_block(sd, init_pal, sizeof(init_pal));
drivers/media/i2c/adv7175.c
205
adv7175_write(sd, 0x0d, 0x4f); /* Enable genlock */
drivers/media/i2c/adv7175.c
206
adv7175_write(sd, 0x07, TR0MODE | TR0RST);
drivers/media/i2c/adv7175.c
207
adv7175_write(sd, 0x07, TR0MODE);
drivers/media/i2c/adv7175.c
215
adv7175_write_block(sd, init_pal, sizeof(init_pal));
drivers/media/i2c/adv7175.c
217
adv7175_write(sd, 0x0d, 0x49); /* Disable genlock */
drivers/media/i2c/adv7175.c
218
adv7175_write(sd, 0x07, TR0MODE | TR0RST);
drivers/media/i2c/adv7175.c
219
adv7175_write(sd, 0x07, TR0MODE);
drivers/media/i2c/adv7175.c
221
v4l2_dbg(1, debug, sd, "illegal norm: %llx\n",
drivers/media/i2c/adv7175.c
225
v4l2_dbg(1, debug, sd, "switched to %llx\n", (unsigned long long)std);
drivers/media/i2c/adv7175.c
230
static int adv7175_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/adv7175.c
233
struct adv7175 *encoder = to_adv7175(sd);
drivers/media/i2c/adv7175.c
241
adv7175_write(sd, 0x01, 0x00);
drivers/media/i2c/adv7175.c
244
set_subcarrier_freq(sd, 1);
drivers/media/i2c/adv7175.c
246
adv7175_write(sd, 0x0c, TR1CAPT); /* TR1 */
drivers/media/i2c/adv7175.c
248
adv7175_write(sd, 0x0d, 0x49); /* Disable genlock */
drivers/media/i2c/adv7175.c
250
adv7175_write(sd, 0x0d, 0x4f); /* Enable genlock */
drivers/media/i2c/adv7175.c
251
adv7175_write(sd, 0x07, TR0MODE | TR0RST);
drivers/media/i2c/adv7175.c
252
adv7175_write(sd, 0x07, TR0MODE);
drivers/media/i2c/adv7175.c
257
adv7175_write(sd, 0x01, 0x00);
drivers/media/i2c/adv7175.c
260
set_subcarrier_freq(sd, 0);
drivers/media/i2c/adv7175.c
262
adv7175_write(sd, 0x0c, TR1PLAY); /* TR1 */
drivers/media/i2c/adv7175.c
263
adv7175_write(sd, 0x0d, 0x49);
drivers/media/i2c/adv7175.c
264
adv7175_write(sd, 0x07, TR0MODE | TR0RST);
drivers/media/i2c/adv7175.c
265
adv7175_write(sd, 0x07, TR0MODE);
drivers/media/i2c/adv7175.c
270
adv7175_write(sd, 0x01, 0x80);
drivers/media/i2c/adv7175.c
273
set_subcarrier_freq(sd, 0);
drivers/media/i2c/adv7175.c
275
adv7175_write(sd, 0x0d, 0x49);
drivers/media/i2c/adv7175.c
276
adv7175_write(sd, 0x07, TR0MODE | TR0RST);
drivers/media/i2c/adv7175.c
277
adv7175_write(sd, 0x07, TR0MODE);
drivers/media/i2c/adv7175.c
282
v4l2_dbg(1, debug, sd, "illegal input: %d\n", input);
drivers/media/i2c/adv7175.c
285
v4l2_dbg(1, debug, sd, "switched to %s\n", inputs[input]);
drivers/media/i2c/adv7175.c
290
static int adv7175_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/adv7175.c
301
static int adv7175_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/adv7175.c
306
u8 val = adv7175_read(sd, 0x7);
drivers/media/i2c/adv7175.c
324
static int adv7175_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/adv7175.c
329
u8 val = adv7175_read(sd, 0x7);
drivers/media/i2c/adv7175.c
345
v4l2_dbg(1, debug, sd,
drivers/media/i2c/adv7175.c
351
ret = adv7175_write(sd, 0x7, val);
drivers/media/i2c/adv7175.c
356
static int adv7175_s_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/adv7175.c
359
adv7175_write(sd, 0x01, 0x00);
drivers/media/i2c/adv7175.c
361
adv7175_write(sd, 0x01, 0x78);
drivers/media/i2c/adv7175.c
38
struct v4l2_subdev sd;
drivers/media/i2c/adv7175.c
396
struct v4l2_subdev *sd;
drivers/media/i2c/adv7175.c
408
sd = &encoder->sd;
drivers/media/i2c/adv7175.c
409
v4l2_i2c_subdev_init(sd, client, &adv7175_ops);
drivers/media/i2c/adv7175.c
413
i = adv7175_write_block(sd, init_common, sizeof(init_common));
drivers/media/i2c/adv7175.c
415
i = adv7175_write(sd, 0x07, TR0MODE | TR0RST);
drivers/media/i2c/adv7175.c
416
i = adv7175_write(sd, 0x07, TR0MODE);
drivers/media/i2c/adv7175.c
417
i = adv7175_read(sd, 0x12);
drivers/media/i2c/adv7175.c
418
v4l2_dbg(1, debug, sd, "revision %d\n", i & 1);
drivers/media/i2c/adv7175.c
421
v4l2_dbg(1, debug, sd, "init error 0x%x\n", i);
drivers/media/i2c/adv7175.c
427
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/adv7175.c
429
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/adv7175.c
43
static inline struct adv7175 *to_adv7175(struct v4l2_subdev *sd)
drivers/media/i2c/adv7175.c
45
return container_of(sd, struct adv7175, sd);
drivers/media/i2c/adv7175.c
57
static inline int adv7175_write(struct v4l2_subdev *sd, u8 reg, u8 value)
drivers/media/i2c/adv7175.c
59
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7175.c
64
static inline int adv7175_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7175.c
66
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7175.c
71
static int adv7175_write_block(struct v4l2_subdev *sd,
drivers/media/i2c/adv7175.c
74
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7180.c
1063
v4l2_subdev_notify_event(&state->sd, &src_ch);
drivers/media/i2c/adv7180.c
1447
struct v4l2_subdev *sd;
drivers/media/i2c/adv7180.c
1505
sd = &state->sd;
drivers/media/i2c/adv7180.c
1506
v4l2_i2c_subdev_init(sd, client, &adv7180_ops);
drivers/media/i2c/adv7180.c
1507
sd->internal_ops = &adv7180_internal_ops;
drivers/media/i2c/adv7180.c
1508
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/i2c/adv7180.c
1515
sd->entity.function = MEDIA_ENT_F_ATV_DECODER;
drivers/media/i2c/adv7180.c
1516
ret = media_entity_pads_init(&sd->entity, 1, &state->pad);
drivers/media/i2c/adv7180.c
1534
ret = v4l2_async_register_subdev(sd);
drivers/media/i2c/adv7180.c
1550
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/adv7180.c
1555
media_entity_cleanup(&sd->entity);
drivers/media/i2c/adv7180.c
1568
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/adv7180.c
1569
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
1571
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/adv7180.c
1576
media_entity_cleanup(&sd->entity);
drivers/media/i2c/adv7180.c
1591
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/adv7180.c
1592
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
1601
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/adv7180.c
1602
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
210
struct v4l2_subdev sd;
drivers/media/i2c/adv7180.c
230
ctrl_hdl)->sd)
drivers/media/i2c/adv7180.c
383
static inline struct adv7180_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/adv7180.c
385
return container_of(sd, struct adv7180_state, sd);
drivers/media/i2c/adv7180.c
388
static int adv7180_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/adv7180.c
390
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
414
static int adv7180_s_routing(struct v4l2_subdev *sd, u32 input,
drivers/media/i2c/adv7180.c
417
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
437
static int adv7180_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/adv7180.c
439
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
463
static int adv7180_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/adv7180.c
465
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
480
static int adv7180_g_std(struct v4l2_subdev *sd, v4l2_std_id *norm)
drivers/media/i2c/adv7180.c
482
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
489
static int adv7180_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/adv7180.c
493
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
582
struct v4l2_subdev *sd = to_adv7180_sd(ctrl);
drivers/media/i2c/adv7180.c
583
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
676
state->sd.ctrl_handler = &state->ctrl_hdl;
drivers/media/i2c/adv7180.c
691
static int adv7180_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/adv7180.c
703
static int adv7180_mbus_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/adv7180.c
706
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
757
static int adv7180_get_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/adv7180.c
761
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
766
adv7180_mbus_fmt(sd, &format->format);
drivers/media/i2c/adv7180.c
773
static int adv7180_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/adv7180.c
777
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
791
ret = adv7180_mbus_fmt(sd, &format->format);
drivers/media/i2c/adv7180.c
803
static int adv7180_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/adv7180.c
811
return adv7180_set_pad_format(sd, sd_state, &fmt);
drivers/media/i2c/adv7180.c
814
static int adv7180_get_mbus_config(struct v4l2_subdev *sd,
drivers/media/i2c/adv7180.c
818
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
838
static int adv7180_get_skip_frames(struct v4l2_subdev *sd, u32 *frames)
drivers/media/i2c/adv7180.c
845
static int adv7180_g_tvnorms(struct v4l2_subdev *sd, v4l2_std_id *norm)
drivers/media/i2c/adv7180.c
934
static int adv7180_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/adv7180.c
936
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
965
static int adv7180_subscribe_event(struct v4l2_subdev *sd,
drivers/media/i2c/adv7180.c
971
return v4l2_src_change_event_subdev_subscribe(sd, fh, sub);
drivers/media/i2c/adv7180.c
973
return v4l2_ctrl_subdev_subscribe_event(sd, fh, sub);
drivers/media/i2c/adv7180.c
980
static int adv7180_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/adv7180.c
983
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7180.c
996
static int adv7180_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/adv7180.c
999
struct adv7180_state *state = to_state(sd);
drivers/media/i2c/adv7183.c
103
adv7183_write(sd, reg, data);
drivers/media/i2c/adv7183.c
108
static int adv7183_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/adv7183.c
110
struct adv7183 *decoder = to_adv7183(sd);
drivers/media/i2c/adv7183.c
112
v4l2_info(sd, "adv7183: Input control = 0x%02x\n",
drivers/media/i2c/adv7183.c
113
adv7183_read(sd, ADV7183_IN_CTRL));
drivers/media/i2c/adv7183.c
114
v4l2_info(sd, "adv7183: Video selection = 0x%02x\n",
drivers/media/i2c/adv7183.c
115
adv7183_read(sd, ADV7183_VD_SEL));
drivers/media/i2c/adv7183.c
116
v4l2_info(sd, "adv7183: Output control = 0x%02x\n",
drivers/media/i2c/adv7183.c
117
adv7183_read(sd, ADV7183_OUT_CTRL));
drivers/media/i2c/adv7183.c
118
v4l2_info(sd, "adv7183: Extended output control = 0x%02x\n",
drivers/media/i2c/adv7183.c
119
adv7183_read(sd, ADV7183_EXT_OUT_CTRL));
drivers/media/i2c/adv7183.c
120
v4l2_info(sd, "adv7183: Autodetect enable = 0x%02x\n",
drivers/media/i2c/adv7183.c
121
adv7183_read(sd, ADV7183_AUTO_DET_EN));
drivers/media/i2c/adv7183.c
122
v4l2_info(sd, "adv7183: Contrast = 0x%02x\n",
drivers/media/i2c/adv7183.c
123
adv7183_read(sd, ADV7183_CONTRAST));
drivers/media/i2c/adv7183.c
124
v4l2_info(sd, "adv7183: Brightness = 0x%02x\n",
drivers/media/i2c/adv7183.c
125
adv7183_read(sd, ADV7183_BRIGHTNESS));
drivers/media/i2c/adv7183.c
126
v4l2_info(sd, "adv7183: Hue = 0x%02x\n",
drivers/media/i2c/adv7183.c
127
adv7183_read(sd, ADV7183_HUE));
drivers/media/i2c/adv7183.c
128
v4l2_info(sd, "adv7183: Default value Y = 0x%02x\n",
drivers/media/i2c/adv7183.c
129
adv7183_read(sd, ADV7183_DEF_Y));
drivers/media/i2c/adv7183.c
130
v4l2_info(sd, "adv7183: Default value C = 0x%02x\n",
drivers/media/i2c/adv7183.c
131
adv7183_read(sd, ADV7183_DEF_C));
drivers/media/i2c/adv7183.c
132
v4l2_info(sd, "adv7183: ADI control = 0x%02x\n",
drivers/media/i2c/adv7183.c
133
adv7183_read(sd, ADV7183_ADI_CTRL));
drivers/media/i2c/adv7183.c
134
v4l2_info(sd, "adv7183: Power Management = 0x%02x\n",
drivers/media/i2c/adv7183.c
135
adv7183_read(sd, ADV7183_POW_MANAGE));
drivers/media/i2c/adv7183.c
136
v4l2_info(sd, "adv7183: Status 1 2 and 3 = 0x%02x 0x%02x 0x%02x\n",
drivers/media/i2c/adv7183.c
137
adv7183_read(sd, ADV7183_STATUS_1),
drivers/media/i2c/adv7183.c
138
adv7183_read(sd, ADV7183_STATUS_2),
drivers/media/i2c/adv7183.c
139
adv7183_read(sd, ADV7183_STATUS_3));
drivers/media/i2c/adv7183.c
140
v4l2_info(sd, "adv7183: Ident = 0x%02x\n",
drivers/media/i2c/adv7183.c
141
adv7183_read(sd, ADV7183_IDENT));
drivers/media/i2c/adv7183.c
142
v4l2_info(sd, "adv7183: Analog clamp control = 0x%02x\n",
drivers/media/i2c/adv7183.c
143
adv7183_read(sd, ADV7183_ANAL_CLAMP_CTRL));
drivers/media/i2c/adv7183.c
144
v4l2_info(sd, "adv7183: Digital clamp control 1 = 0x%02x\n",
drivers/media/i2c/adv7183.c
145
adv7183_read(sd, ADV7183_DIGI_CLAMP_CTRL_1));
drivers/media/i2c/adv7183.c
146
v4l2_info(sd, "adv7183: Shaping filter control 1 and 2 = 0x%02x 0x%02x\n",
drivers/media/i2c/adv7183.c
147
adv7183_read(sd, ADV7183_SHAP_FILT_CTRL),
drivers/media/i2c/adv7183.c
148
adv7183_read(sd, ADV7183_SHAP_FILT_CTRL_2));
drivers/media/i2c/adv7183.c
149
v4l2_info(sd, "adv7183: Comb filter control = 0x%02x\n",
drivers/media/i2c/adv7183.c
150
adv7183_read(sd, ADV7183_COMB_FILT_CTRL));
drivers/media/i2c/adv7183.c
151
v4l2_info(sd, "adv7183: ADI control 2 = 0x%02x\n",
drivers/media/i2c/adv7183.c
152
adv7183_read(sd, ADV7183_ADI_CTRL_2));
drivers/media/i2c/adv7183.c
153
v4l2_info(sd, "adv7183: Pixel delay control = 0x%02x\n",
drivers/media/i2c/adv7183.c
154
adv7183_read(sd, ADV7183_PIX_DELAY_CTRL));
drivers/media/i2c/adv7183.c
155
v4l2_info(sd, "adv7183: Misc gain control = 0x%02x\n",
drivers/media/i2c/adv7183.c
156
adv7183_read(sd, ADV7183_MISC_GAIN_CTRL));
drivers/media/i2c/adv7183.c
157
v4l2_info(sd, "adv7183: AGC mode control = 0x%02x\n",
drivers/media/i2c/adv7183.c
158
adv7183_read(sd, ADV7183_AGC_MODE_CTRL));
drivers/media/i2c/adv7183.c
159
v4l2_info(sd, "adv7183: Chroma gain control 1 and 2 = 0x%02x 0x%02x\n",
drivers/media/i2c/adv7183.c
160
adv7183_read(sd, ADV7183_CHRO_GAIN_CTRL_1),
drivers/media/i2c/adv7183.c
161
adv7183_read(sd, ADV7183_CHRO_GAIN_CTRL_2));
drivers/media/i2c/adv7183.c
162
v4l2_info(sd, "adv7183: Luma gain control 1 and 2 = 0x%02x 0x%02x\n",
drivers/media/i2c/adv7183.c
163
adv7183_read(sd, ADV7183_LUMA_GAIN_CTRL_1),
drivers/media/i2c/adv7183.c
164
adv7183_read(sd, ADV7183_LUMA_GAIN_CTRL_2));
drivers/media/i2c/adv7183.c
165
v4l2_info(sd, "adv7183: Vsync field control 1 2 and 3 = 0x%02x 0x%02x 0x%02x\n",
drivers/media/i2c/adv7183.c
166
adv7183_read(sd, ADV7183_VS_FIELD_CTRL_1),
drivers/media/i2c/adv7183.c
167
adv7183_read(sd, ADV7183_VS_FIELD_CTRL_2),
drivers/media/i2c/adv7183.c
168
adv7183_read(sd, ADV7183_VS_FIELD_CTRL_3));
drivers/media/i2c/adv7183.c
169
v4l2_info(sd, "adv7183: Hsync position control 1 2 and 3 = 0x%02x 0x%02x 0x%02x\n",
drivers/media/i2c/adv7183.c
170
adv7183_read(sd, ADV7183_HS_POS_CTRL_1),
drivers/media/i2c/adv7183.c
171
adv7183_read(sd, ADV7183_HS_POS_CTRL_2),
drivers/media/i2c/adv7183.c
172
adv7183_read(sd, ADV7183_HS_POS_CTRL_3));
drivers/media/i2c/adv7183.c
173
v4l2_info(sd, "adv7183: Polarity = 0x%02x\n",
drivers/media/i2c/adv7183.c
174
adv7183_read(sd, ADV7183_POLARITY));
drivers/media/i2c/adv7183.c
175
v4l2_info(sd, "adv7183: ADC control = 0x%02x\n",
drivers/media/i2c/adv7183.c
176
adv7183_read(sd, ADV7183_ADC_CTRL));
drivers/media/i2c/adv7183.c
177
v4l2_info(sd, "adv7183: SD offset Cb and Cr = 0x%02x 0x%02x\n",
drivers/media/i2c/adv7183.c
178
adv7183_read(sd, ADV7183_SD_OFFSET_CB),
drivers/media/i2c/adv7183.c
179
adv7183_read(sd, ADV7183_SD_OFFSET_CR));
drivers/media/i2c/adv7183.c
180
v4l2_info(sd, "adv7183: SD saturation Cb and Cr = 0x%02x 0x%02x\n",
drivers/media/i2c/adv7183.c
181
adv7183_read(sd, ADV7183_SD_SATURATION_CB),
drivers/media/i2c/adv7183.c
182
adv7183_read(sd, ADV7183_SD_SATURATION_CR));
drivers/media/i2c/adv7183.c
183
v4l2_info(sd, "adv7183: Drive strength = 0x%02x\n",
drivers/media/i2c/adv7183.c
184
adv7183_read(sd, ADV7183_DRIVE_STR));
drivers/media/i2c/adv7183.c
185
v4l2_ctrl_handler_log_status(&decoder->hdl, sd->name);
drivers/media/i2c/adv7183.c
189
static int adv7183_g_std(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/adv7183.c
191
struct adv7183 *decoder = to_adv7183(sd);
drivers/media/i2c/adv7183.c
197
static int adv7183_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/adv7183.c
199
struct adv7183 *decoder = to_adv7183(sd);
drivers/media/i2c/adv7183.c
202
reg = adv7183_read(sd, ADV7183_IN_CTRL) & 0xF;
drivers/media/i2c/adv7183.c
221
adv7183_write(sd, ADV7183_IN_CTRL, reg);
drivers/media/i2c/adv7183.c
228
static int adv7183_reset(struct v4l2_subdev *sd, u32 val)
drivers/media/i2c/adv7183.c
232
reg = adv7183_read(sd, ADV7183_POW_MANAGE) | 0x80;
drivers/media/i2c/adv7183.c
233
adv7183_write(sd, ADV7183_POW_MANAGE, reg);
drivers/media/i2c/adv7183.c
239
static int adv7183_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/adv7183.c
242
struct adv7183 *decoder = to_adv7183(sd);
drivers/media/i2c/adv7183.c
25
struct v4l2_subdev sd;
drivers/media/i2c/adv7183.c
250
reg = adv7183_read(sd, ADV7183_IN_CTRL) & 0xF0;
drivers/media/i2c/adv7183.c
300
adv7183_write(sd, ADV7183_IN_CTRL, reg);
drivers/media/i2c/adv7183.c
305
reg = adv7183_read(sd, ADV7183_OUT_CTRL) & 0xC0;
drivers/media/i2c/adv7183.c
314
adv7183_write(sd, ADV7183_OUT_CTRL, reg);
drivers/media/i2c/adv7183.c
322
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/adv7183.c
329
adv7183_write(sd, ADV7183_BRIGHTNESS, val);
drivers/media/i2c/adv7183.c
332
adv7183_write(sd, ADV7183_CONTRAST, val);
drivers/media/i2c/adv7183.c
335
adv7183_write(sd, ADV7183_SD_SATURATION_CB, val >> 8);
drivers/media/i2c/adv7183.c
336
adv7183_write(sd, ADV7183_SD_SATURATION_CR, (val & 0xFF));
drivers/media/i2c/adv7183.c
339
adv7183_write(sd, ADV7183_SD_OFFSET_CB, val >> 8);
drivers/media/i2c/adv7183.c
340
adv7183_write(sd, ADV7183_SD_OFFSET_CR, (val & 0xFF));
drivers/media/i2c/adv7183.c
349
static int adv7183_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/adv7183.c
351
struct adv7183 *decoder = to_adv7183(sd);
drivers/media/i2c/adv7183.c
355
reg = adv7183_read(sd, ADV7183_IN_CTRL) & 0xF;
drivers/media/i2c/adv7183.c
356
adv7183_write(sd, ADV7183_IN_CTRL, reg);
drivers/media/i2c/adv7183.c
362
reg = adv7183_read(sd, ADV7183_STATUS_1);
drivers/media/i2c/adv7183.c
394
adv7183_s_std(sd, decoder->std);
drivers/media/i2c/adv7183.c
398
static int adv7183_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/adv7183.c
403
reg = adv7183_read(sd, ADV7183_STATUS_1);
drivers/media/i2c/adv7183.c
411
static int adv7183_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/adv7183.c
422
static int adv7183_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/adv7183.c
426
struct adv7183 *decoder = to_adv7183(sd);
drivers/media/i2c/adv7183.c
448
static int adv7183_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/adv7183.c
452
struct adv7183 *decoder = to_adv7183(sd);
drivers/media/i2c/adv7183.c
461
static int adv7183_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/adv7183.c
463
struct adv7183 *decoder = to_adv7183(sd);
drivers/media/i2c/adv7183.c
474
static int adv7183_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
drivers/media/i2c/adv7183.c
476
reg->val = adv7183_read(sd, reg->reg & 0xff);
drivers/media/i2c/adv7183.c
481
static int adv7183_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
drivers/media/i2c/adv7183.c
483
adv7183_write(sd, reg->reg & 0xff, reg->val & 0xff);
drivers/media/i2c/adv7183.c
525
struct v4l2_subdev *sd;
drivers/media/i2c/adv7183.c
562
sd = &decoder->sd;
drivers/media/i2c/adv7183.c
563
v4l2_i2c_subdev_init(sd, client, &adv7183_ops);
drivers/media/i2c/adv7183.c
576
sd->ctrl_handler = hdl;
drivers/media/i2c/adv7183.c
597
adv7183_writeregs(sd, adv7183_init_regs, ARRAY_SIZE(adv7183_init_regs));
drivers/media/i2c/adv7183.c
598
adv7183_s_std(sd, decoder->std);
drivers/media/i2c/adv7183.c
601
adv7183_set_fmt(sd, NULL, &fmt);
drivers/media/i2c/adv7183.c
615
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/adv7183.c
617
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/adv7183.c
618
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/adv7183.c
63
static inline struct adv7183 *to_adv7183(struct v4l2_subdev *sd)
drivers/media/i2c/adv7183.c
65
return container_of(sd, struct adv7183, sd);
drivers/media/i2c/adv7183.c
69
return &container_of(ctrl->handler, struct adv7183, hdl)->sd;
drivers/media/i2c/adv7183.c
72
static inline int adv7183_read(struct v4l2_subdev *sd, unsigned char reg)
drivers/media/i2c/adv7183.c
74
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7183.c
79
static inline int adv7183_write(struct v4l2_subdev *sd, unsigned char reg,
drivers/media/i2c/adv7183.c
82
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7183.c
87
static int adv7183_writeregs(struct v4l2_subdev *sd,
drivers/media/i2c/adv7183.c
94
v4l2_err(sd, "invalid regs array\n");
drivers/media/i2c/adv7343.c
132
static int adv7343_setstd(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/adv7343.c
134
struct adv7343_state *state = to_state(sd);
drivers/media/i2c/adv7343.c
151
v4l2_dbg(1, debug, sd,
drivers/media/i2c/adv7343.c
160
err = adv7343_write(sd, ADV7343_SD_MODE_REG1, val);
drivers/media/i2c/adv7343.c
169
err = adv7343_write(sd, ADV7343_MODE_SELECT_REG, val);
drivers/media/i2c/adv7343.c
179
err = adv7343_write(sd, reg, *fsc_ptr);
drivers/media/i2c/adv7343.c
192
err = adv7343_write(sd, ADV7343_SD_MODE_REG1, val);
drivers/media/i2c/adv7343.c
200
v4l2_err(sd, "Error setting std, write failed\n");
drivers/media/i2c/adv7343.c
205
static int adv7343_setoutput(struct v4l2_subdev *sd, u32 output_type)
drivers/media/i2c/adv7343.c
207
struct adv7343_state *state = to_state(sd);
drivers/media/i2c/adv7343.c
212
v4l2_dbg(1, debug, sd,
drivers/media/i2c/adv7343.c
239
err = adv7343_write(sd, ADV7343_POWER_MODE_REG, val);
drivers/media/i2c/adv7343.c
247
err = adv7343_write(sd, ADV7343_MODE_REG0, val);
drivers/media/i2c/adv7343.c
266
err = adv7343_write(sd, ADV7343_SD_MODE_REG2, val);
drivers/media/i2c/adv7343.c
275
err = adv7343_write(sd, ADV7343_HD_MODE_REG6, val);
drivers/media/i2c/adv7343.c
283
v4l2_err(sd, "Error setting output, write failed\n");
drivers/media/i2c/adv7343.c
288
static int adv7343_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/adv7343.c
290
struct adv7343_state *state = to_state(sd);
drivers/media/i2c/adv7343.c
292
v4l2_info(sd, "Standard: %llx\n", (unsigned long long)state->std);
drivers/media/i2c/adv7343.c
293
v4l2_info(sd, "Output: %s\n", (state->output == 0) ? "Composite" :
drivers/media/i2c/adv7343.c
300
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/adv7343.c
304
return adv7343_write(sd, ADV7343_SD_BRIGHTNESS_WSS,
drivers/media/i2c/adv7343.c
308
return adv7343_write(sd, ADV7343_SD_HUE_REG, ctrl->val);
drivers/media/i2c/adv7343.c
311
return adv7343_write(sd, ADV7343_DAC2_OUTPUT_LEVEL, ctrl->val);
drivers/media/i2c/adv7343.c
324
static int adv7343_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/adv7343.c
326
struct adv7343_state *state = to_state(sd);
drivers/media/i2c/adv7343.c
332
err = adv7343_setstd(sd, std);
drivers/media/i2c/adv7343.c
339
static int adv7343_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/adv7343.c
342
struct adv7343_state *state = to_state(sd);
drivers/media/i2c/adv7343.c
348
err = adv7343_setoutput(sd, output);
drivers/media/i2c/adv7343.c
365
static int adv7343_initialize(struct v4l2_subdev *sd)
drivers/media/i2c/adv7343.c
367
struct adv7343_state *state = to_state(sd);
drivers/media/i2c/adv7343.c
373
err = adv7343_write(sd, adv7343_init_reg_val[i],
drivers/media/i2c/adv7343.c
376
v4l2_err(sd, "Error initializing\n");
drivers/media/i2c/adv7343.c
382
err = adv7343_setoutput(sd, state->output);
drivers/media/i2c/adv7343.c
384
v4l2_err(sd, "Error setting output during init\n");
drivers/media/i2c/adv7343.c
388
err = adv7343_setstd(sd, state->std);
drivers/media/i2c/adv7343.c
390
v4l2_err(sd, "Error setting std during init\n");
drivers/media/i2c/adv7343.c
46
struct v4l2_subdev sd;
drivers/media/i2c/adv7343.c
460
v4l2_i2c_subdev_init(&state->sd, client, &adv7343_ops);
drivers/media/i2c/adv7343.c
475
state->sd.ctrl_handler = &state->hdl;
drivers/media/i2c/adv7343.c
482
err = adv7343_initialize(&state->sd);
drivers/media/i2c/adv7343.c
486
err = v4l2_async_register_subdev(&state->sd);
drivers/media/i2c/adv7343.c
497
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/adv7343.c
498
struct adv7343_state *state = to_state(sd);
drivers/media/i2c/adv7343.c
500
v4l2_async_unregister_subdev(&state->sd);
drivers/media/i2c/adv7343.c
59
static inline struct adv7343_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/adv7343.c
61
return container_of(sd, struct adv7343_state, sd);
drivers/media/i2c/adv7343.c
66
return &container_of(ctrl->handler, struct adv7343_state, hdl)->sd;
drivers/media/i2c/adv7343.c
69
static inline int adv7343_write(struct v4l2_subdev *sd, u8 reg, u8 value)
drivers/media/i2c/adv7343.c
71
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7393.c
135
static int adv7393_setstd(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/adv7393.c
137
struct adv7393_state *state = to_state(sd);
drivers/media/i2c/adv7393.c
153
v4l2_dbg(1, debug, sd,
drivers/media/i2c/adv7393.c
164
err = adv7393_write(sd, ADV7393_SD_MODE_REG1, val);
drivers/media/i2c/adv7393.c
173
err = adv7393_write(sd, ADV7393_MODE_SELECT_REG, val);
drivers/media/i2c/adv7393.c
182
err = adv7393_write(sd, reg, val);
drivers/media/i2c/adv7393.c
196
err = adv7393_write(sd, ADV7393_SD_MODE_REG2, val);
drivers/media/i2c/adv7393.c
204
v4l2_err(sd, "Error setting std, write failed\n");
drivers/media/i2c/adv7393.c
209
static int adv7393_setoutput(struct v4l2_subdev *sd, u32 output_type)
drivers/media/i2c/adv7393.c
211
struct adv7393_state *state = to_state(sd);
drivers/media/i2c/adv7393.c
216
v4l2_dbg(1, debug, sd,
drivers/media/i2c/adv7393.c
232
err = adv7393_write(sd, ADV7393_POWER_MODE_REG, val);
drivers/media/i2c/adv7393.c
240
err = adv7393_write(sd, ADV7393_MODE_REG0, val);
drivers/media/i2c/adv7393.c
252
err = adv7393_write(sd, ADV7393_SD_MODE_REG2, val);
drivers/media/i2c/adv7393.c
260
err = adv7393_write(sd, ADV7393_HD_MODE_REG6, val);
drivers/media/i2c/adv7393.c
268
v4l2_err(sd, "Error setting output, write failed\n");
drivers/media/i2c/adv7393.c
273
static int adv7393_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/adv7393.c
275
struct adv7393_state *state = to_state(sd);
drivers/media/i2c/adv7393.c
277
v4l2_info(sd, "Standard: %llx\n", (unsigned long long)state->std);
drivers/media/i2c/adv7393.c
278
v4l2_info(sd, "Output: %s\n", (state->output == 0) ? "Composite" :
drivers/media/i2c/adv7393.c
285
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/adv7393.c
289
return adv7393_write(sd, ADV7393_SD_BRIGHTNESS_WSS,
drivers/media/i2c/adv7393.c
293
return adv7393_write(sd, ADV7393_SD_HUE_ADJUST,
drivers/media/i2c/adv7393.c
297
return adv7393_write(sd, ADV7393_DAC123_OUTPUT_LEVEL,
drivers/media/i2c/adv7393.c
311
static int adv7393_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/adv7393.c
313
struct adv7393_state *state = to_state(sd);
drivers/media/i2c/adv7393.c
319
err = adv7393_setstd(sd, std);
drivers/media/i2c/adv7393.c
326
static int adv7393_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/adv7393.c
329
struct adv7393_state *state = to_state(sd);
drivers/media/i2c/adv7393.c
335
err = adv7393_setoutput(sd, output);
drivers/media/i2c/adv7393.c
352
static int adv7393_initialize(struct v4l2_subdev *sd)
drivers/media/i2c/adv7393.c
354
struct adv7393_state *state = to_state(sd);
drivers/media/i2c/adv7393.c
360
err = adv7393_write(sd, adv7393_init_reg_val[i],
drivers/media/i2c/adv7393.c
363
v4l2_err(sd, "Error initializing\n");
drivers/media/i2c/adv7393.c
369
err = adv7393_setoutput(sd, state->output);
drivers/media/i2c/adv7393.c
371
v4l2_err(sd, "Error setting output during init\n");
drivers/media/i2c/adv7393.c
375
err = adv7393_setstd(sd, state->std);
drivers/media/i2c/adv7393.c
377
v4l2_err(sd, "Error setting std during init\n");
drivers/media/i2c/adv7393.c
409
v4l2_i2c_subdev_init(&state->sd, client, &adv7393_ops);
drivers/media/i2c/adv7393.c
424
state->sd.ctrl_handler = &state->hdl;
drivers/media/i2c/adv7393.c
433
err = adv7393_initialize(&state->sd);
drivers/media/i2c/adv7393.c
441
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/adv7393.c
442
struct adv7393_state *state = to_state(sd);
drivers/media/i2c/adv7393.c
444
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/adv7393.c
48
struct v4l2_subdev sd;
drivers/media/i2c/adv7393.c
60
static inline struct adv7393_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/adv7393.c
62
return container_of(sd, struct adv7393_state, sd);
drivers/media/i2c/adv7393.c
67
return &container_of(ctrl->handler, struct adv7393_state, hdl)->sd;
drivers/media/i2c/adv7393.c
70
static inline int adv7393_write(struct v4l2_subdev *sd, u8 reg, u8 value)
drivers/media/i2c/adv7393.c
72
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv748x/adv748x-afe.c
168
static int adv748x_afe_g_std(struct v4l2_subdev *sd, v4l2_std_id *norm)
drivers/media/i2c/adv748x/adv748x-afe.c
170
struct adv748x_afe *afe = adv748x_sd_to_afe(sd);
drivers/media/i2c/adv748x/adv748x-afe.c
177
static int adv748x_afe_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/adv748x/adv748x-afe.c
179
struct adv748x_afe *afe = adv748x_sd_to_afe(sd);
drivers/media/i2c/adv748x/adv748x-afe.c
196
static int adv748x_afe_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/adv748x/adv748x-afe.c
198
struct adv748x_afe *afe = adv748x_sd_to_afe(sd);
drivers/media/i2c/adv748x/adv748x-afe.c
232
static int adv748x_afe_g_tvnorms(struct v4l2_subdev *sd, v4l2_std_id *norm)
drivers/media/i2c/adv748x/adv748x-afe.c
239
static int adv748x_afe_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/adv748x/adv748x-afe.c
241
struct adv748x_afe *afe = adv748x_sd_to_afe(sd);
drivers/media/i2c/adv748x/adv748x-afe.c
254
static int adv748x_afe_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/adv748x/adv748x-afe.c
256
struct adv748x_afe *afe = adv748x_sd_to_afe(sd);
drivers/media/i2c/adv748x/adv748x-afe.c
316
static int adv748x_afe_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/adv748x/adv748x-afe.c
328
static int adv748x_afe_get_format(struct v4l2_subdev *sd,
drivers/media/i2c/adv748x/adv748x-afe.c
332
struct adv748x_afe *afe = adv748x_sd_to_afe(sd);
drivers/media/i2c/adv748x/adv748x-afe.c
351
static int adv748x_afe_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/adv748x/adv748x-afe.c
362
return adv748x_afe_get_format(sd, sd_state, sdformat);
drivers/media/i2c/adv748x/adv748x-afe.c
476
afe->sd.ctrl_handler = &afe->ctrl_hdl;
drivers/media/i2c/adv748x/adv748x-afe.c
495
adv748x_subdev_init(&afe->sd, state, &adv748x_afe_ops,
drivers/media/i2c/adv748x/adv748x-afe.c
517
ret = media_entity_pads_init(&afe->sd.entity, ADV748X_AFE_NR_PADS,
drivers/media/i2c/adv748x/adv748x-afe.c
529
media_entity_cleanup(&afe->sd.entity);
drivers/media/i2c/adv748x/adv748x-afe.c
536
v4l2_device_unregister_subdev(&afe->sd);
drivers/media/i2c/adv748x/adv748x-afe.c
537
media_entity_cleanup(&afe->sd.entity);
drivers/media/i2c/adv748x/adv748x-core.c
250
if (tx->src == &state->hdmi.sd) {
drivers/media/i2c/adv748x/adv748x-core.c
336
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/media/i2c/adv748x/adv748x-core.c
337
struct adv748x_state *state = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv748x/adv748x-core.c
338
struct adv748x_csi2 *tx = adv748x_sd_to_csi2(sd);
drivers/media/i2c/adv748x/adv748x-core.c
350
if (rsd == &state->afe.sd)
drivers/media/i2c/adv748x/adv748x-core.c
584
void adv748x_subdev_init(struct v4l2_subdev *sd, struct adv748x_state *state,
drivers/media/i2c/adv748x/adv748x-core.c
588
v4l2_subdev_init(sd, ops);
drivers/media/i2c/adv748x/adv748x-core.c
589
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/adv748x/adv748x-core.c
592
sd->owner = state->dev->driver->owner;
drivers/media/i2c/adv748x/adv748x-core.c
593
sd->dev = state->dev;
drivers/media/i2c/adv748x/adv748x-core.c
595
v4l2_set_subdevdata(sd, state);
drivers/media/i2c/adv748x/adv748x-core.c
598
snprintf(sd->name, sizeof(sd->name), "%s %d-%04x %s",
drivers/media/i2c/adv748x/adv748x-core.c
603
sd->entity.function = function;
drivers/media/i2c/adv748x/adv748x-core.c
604
sd->entity.ops = is_tx(adv748x_sd_to_csi2(sd)) ?
drivers/media/i2c/adv748x/adv748x-csi2.c
102
static int adv748x_csi2_registered(struct v4l2_subdev *sd)
drivers/media/i2c/adv748x/adv748x-csi2.c
104
struct adv748x_csi2 *tx = adv748x_sd_to_csi2(sd);
drivers/media/i2c/adv748x/adv748x-csi2.c
109
sd->name);
drivers/media/i2c/adv748x/adv748x-csi2.c
118
ret = adv748x_csi2_register_link(tx, sd->v4l2_dev,
drivers/media/i2c/adv748x/adv748x-csi2.c
119
&state->afe.sd,
drivers/media/i2c/adv748x/adv748x-csi2.c
134
ret = adv748x_csi2_register_link(tx, sd->v4l2_dev, &state->hdmi.sd,
drivers/media/i2c/adv748x/adv748x-csi2.c
154
static int adv748x_csi2_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/adv748x/adv748x-csi2.c
156
struct adv748x_csi2 *tx = adv748x_sd_to_csi2(sd);
drivers/media/i2c/adv748x/adv748x-csi2.c
177
static int adv748x_csi2_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/adv748x/adv748x-csi2.c
181
struct adv748x_csi2 *tx = adv748x_sd_to_csi2(sd);
drivers/media/i2c/adv748x/adv748x-csi2.c
228
static int adv748x_csi2_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/adv748x/adv748x-csi2.c
232
struct adv748x_csi2 *tx = adv748x_sd_to_csi2(sd);
drivers/media/i2c/adv748x/adv748x-csi2.c
236
return v4l2_subdev_get_fmt(sd, sd_state, sdformat);
drivers/media/i2c/adv748x/adv748x-csi2.c
255
static int adv748x_csi2_get_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/adv748x/adv748x-csi2.c
258
struct adv748x_csi2 *tx = adv748x_sd_to_csi2(sd);
drivers/media/i2c/adv748x/adv748x-csi2.c
289
int adv748x_csi2_set_pixelrate(struct v4l2_subdev *sd, s64 rate)
drivers/media/i2c/adv748x/adv748x-csi2.c
291
struct adv748x_csi2 *tx = adv748x_sd_to_csi2(sd);
drivers/media/i2c/adv748x/adv748x-csi2.c
323
tx->sd.ctrl_handler = &tx->ctrl_hdl;
drivers/media/i2c/adv748x/adv748x-csi2.c
339
adv748x_subdev_init(&tx->sd, state, &adv748x_csi2_ops,
drivers/media/i2c/adv748x/adv748x-csi2.c
344
tx->sd.internal_ops = &adv748x_csi2_internal_ops;
drivers/media/i2c/adv748x/adv748x-csi2.c
349
ret = media_entity_pads_init(&tx->sd.entity, ADV748X_CSI2_NR_PADS,
drivers/media/i2c/adv748x/adv748x-csi2.c
354
ret = v4l2_async_subdev_endpoint_add(&tx->sd,
drivers/media/i2c/adv748x/adv748x-csi2.c
363
tx->sd.state_lock = &state->mutex;
drivers/media/i2c/adv748x/adv748x-csi2.c
364
ret = v4l2_subdev_init_finalize(&tx->sd);
drivers/media/i2c/adv748x/adv748x-csi2.c
368
ret = v4l2_async_register_subdev(&tx->sd);
drivers/media/i2c/adv748x/adv748x-csi2.c
377
v4l2_subdev_cleanup(&tx->sd);
drivers/media/i2c/adv748x/adv748x-csi2.c
379
media_entity_cleanup(&tx->sd.entity);
drivers/media/i2c/adv748x/adv748x-csi2.c
389
v4l2_async_unregister_subdev(&tx->sd);
drivers/media/i2c/adv748x/adv748x-csi2.c
390
media_entity_cleanup(&tx->sd.entity);
drivers/media/i2c/adv748x/adv748x-csi2.c
392
v4l2_subdev_cleanup(&tx->sd);
drivers/media/i2c/adv748x/adv748x-csi2.c
57
&tx->sd.entity, ADV748X_CSI2_SINK,
drivers/media/i2c/adv748x/adv748x-csi2.c
72
static int adv748x_csi2_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/adv748x/adv748x-hdmi.c
217
static int adv748x_hdmi_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/adv748x/adv748x-hdmi.c
220
struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
drivers/media/i2c/adv748x/adv748x-hdmi.c
257
static int adv748x_hdmi_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/adv748x/adv748x-hdmi.c
260
struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
drivers/media/i2c/adv748x/adv748x-hdmi.c
272
static int adv748x_hdmi_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/adv748x/adv748x-hdmi.c
275
struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
drivers/media/i2c/adv748x/adv748x-hdmi.c
349
static int adv748x_hdmi_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/adv748x/adv748x-hdmi.c
351
struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
drivers/media/i2c/adv748x/adv748x-hdmi.c
363
static int adv748x_hdmi_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/adv748x/adv748x-hdmi.c
365
struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
drivers/media/i2c/adv748x/adv748x-hdmi.c
403
adv748x_hdmi_query_dv_timings(&hdmi->sd, 0, &timings);
drivers/media/i2c/adv748x/adv748x-hdmi.c
408
static int adv748x_hdmi_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/adv748x/adv748x-hdmi.c
420
static int adv748x_hdmi_get_format(struct v4l2_subdev *sd,
drivers/media/i2c/adv748x/adv748x-hdmi.c
424
struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
drivers/media/i2c/adv748x/adv748x-hdmi.c
442
static int adv748x_hdmi_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/adv748x/adv748x-hdmi.c
452
return adv748x_hdmi_get_format(sd, sd_state, sdformat);
drivers/media/i2c/adv748x/adv748x-hdmi.c
460
static int adv748x_hdmi_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
drivers/media/i2c/adv748x/adv748x-hdmi.c
462
struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
drivers/media/i2c/adv748x/adv748x-hdmi.c
510
static int adv748x_hdmi_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
drivers/media/i2c/adv748x/adv748x-hdmi.c
512
struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
drivers/media/i2c/adv748x/adv748x-hdmi.c
553
v4l2_err(sd, "error %d writing edid pad %d\n", err, edid->pad);
drivers/media/i2c/adv748x/adv748x-hdmi.c
580
static int adv748x_hdmi_enum_dv_timings(struct v4l2_subdev *sd,
drivers/media/i2c/adv748x/adv748x-hdmi.c
587
static int adv748x_hdmi_dv_timings_cap(struct v4l2_subdev *sd,
drivers/media/i2c/adv748x/adv748x-hdmi.c
712
hdmi->sd.ctrl_handler = &hdmi->ctrl_hdl;
drivers/media/i2c/adv748x/adv748x-hdmi.c
727
adv748x_hdmi_s_dv_timings(&hdmi->sd, 0, &cea1280x720);
drivers/media/i2c/adv748x/adv748x-hdmi.c
733
adv748x_subdev_init(&hdmi->sd, state, &adv748x_ops_hdmi,
drivers/media/i2c/adv748x/adv748x-hdmi.c
739
ret = media_entity_pads_init(&hdmi->sd.entity,
drivers/media/i2c/adv748x/adv748x-hdmi.c
751
media_entity_cleanup(&hdmi->sd.entity);
drivers/media/i2c/adv748x/adv748x-hdmi.c
758
v4l2_device_unregister_subdev(&hdmi->sd);
drivers/media/i2c/adv748x/adv748x-hdmi.c
759
media_entity_cleanup(&hdmi->sd.entity);
drivers/media/i2c/adv748x/adv748x.h
118
struct v4l2_subdev sd;
drivers/media/i2c/adv748x/adv748x.h
135
#define adv748x_sd_to_hdmi(sd) container_of(sd, struct adv748x_hdmi, sd)
drivers/media/i2c/adv748x/adv748x.h
153
struct v4l2_subdev sd;
drivers/media/i2c/adv748x/adv748x.h
165
#define adv748x_sd_to_afe(sd) container_of(sd, struct adv748x_afe, sd)
drivers/media/i2c/adv748x/adv748x.h
425
void adv748x_subdev_init(struct v4l2_subdev *sd, struct adv748x_state *state,
drivers/media/i2c/adv748x/adv748x.h
438
int adv748x_csi2_set_pixelrate(struct v4l2_subdev *sd, s64 rate);
drivers/media/i2c/adv748x/adv748x.h
87
struct v4l2_subdev sd;
drivers/media/i2c/adv748x/adv748x.h
91
#define adv748x_sd_to_csi2(sd) container_of(sd, struct adv748x_csi2, sd)
drivers/media/i2c/adv7511-v4l2.c
1000
v4l2_dbg(1, debug, sd, "%s: %sable\n", __func__, (enable ? "en" : "dis"));
drivers/media/i2c/adv7511-v4l2.c
1001
adv7511_wr_and_or(sd, 0xa1, ~0x3c, (enable ? 0 : 0x3c));
drivers/media/i2c/adv7511-v4l2.c
1003
adv7511_check_monitor_present_status(sd);
drivers/media/i2c/adv7511-v4l2.c
1005
adv7511_s_power(sd, 0);
drivers/media/i2c/adv7511-v4l2.c
1011
static int adv7511_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/adv7511-v4l2.c
1014
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
1018
v4l2_dbg(1, debug, sd, "%s:\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
1035
adv7511_wr_and_or(sd, 0x17, 0x9f,
drivers/media/i2c/adv7511-v4l2.c
1042
adv7511_wr_and_or(sd, 0xfb, 0xf9, 1 << 1);
drivers/media/i2c/adv7511-v4l2.c
1045
adv7511_wr_and_or(sd, 0xfb, 0xf9, 2 << 1);
drivers/media/i2c/adv7511-v4l2.c
1048
adv7511_wr_and_or(sd, 0xfb, 0xf9, 3 << 1);
drivers/media/i2c/adv7511-v4l2.c
1051
adv7511_wr_and_or(sd, 0xfb, 0xf9, 0);
drivers/media/i2c/adv7511-v4l2.c
1056
adv7511_set_rgb_quantization_mode(sd, state->rgb_quantization_range_ctrl);
drivers/media/i2c/adv7511-v4l2.c
1061
static int adv7511_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/adv7511-v4l2.c
1064
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
1066
v4l2_dbg(1, debug, sd, "%s:\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
1079
static int adv7511_enum_dv_timings(struct v4l2_subdev *sd,
drivers/media/i2c/adv7511-v4l2.c
1088
static int adv7511_dv_timings_cap(struct v4l2_subdev *sd,
drivers/media/i2c/adv7511-v4l2.c
1103
static int adv7511_s_audio_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/adv7511-v4l2.c
1105
v4l2_dbg(1, debug, sd, "%s: %sable\n", __func__, (enable ? "en" : "dis"));
drivers/media/i2c/adv7511-v4l2.c
1108
adv7511_wr_and_or(sd, 0x4b, 0x3f, 0x80);
drivers/media/i2c/adv7511-v4l2.c
1110
adv7511_wr_and_or(sd, 0x4b, 0x3f, 0x40);
drivers/media/i2c/adv7511-v4l2.c
1115
static int adv7511_s_clock_freq(struct v4l2_subdev *sd, u32 freq)
drivers/media/i2c/adv7511-v4l2.c
1132
adv7511_wr(sd, 0x01, (N >> 16) & 0xf);
drivers/media/i2c/adv7511-v4l2.c
1133
adv7511_wr(sd, 0x02, (N >> 8) & 0xff);
drivers/media/i2c/adv7511-v4l2.c
1134
adv7511_wr(sd, 0x03, N & 0xff);
drivers/media/i2c/adv7511-v4l2.c
1139
static int adv7511_s_i2s_clock_freq(struct v4l2_subdev *sd, u32 freq)
drivers/media/i2c/adv7511-v4l2.c
1156
adv7511_wr_and_or(sd, 0x15, 0xf, i2s_sf);
drivers/media/i2c/adv7511-v4l2.c
1161
static int adv7511_s_routing(struct v4l2_subdev *sd, u32 input, u32 output, u32 config)
drivers/media/i2c/adv7511-v4l2.c
1164
adv7511_wr_and_or(sd, 0x73, 0xf8, 0x1);
drivers/media/i2c/adv7511-v4l2.c
1166
adv7511_wr(sd, 0x76, 0x00);
drivers/media/i2c/adv7511-v4l2.c
1169
adv7511_wr_and_or(sd, 0x14, 0xf0, 0x02);
drivers/media/i2c/adv7511-v4l2.c
1183
static int adv7511_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
drivers/media/i2c/adv7511-v4l2.c
1185
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
1212
static int adv7511_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/adv7511-v4l2.c
124
static void adv7511_check_monitor_present_status(struct v4l2_subdev *sd);
drivers/media/i2c/adv7511-v4l2.c
1243
static int adv7511_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/adv7511-v4l2.c
1247
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
125
static bool adv7511_check_edid_status(struct v4l2_subdev *sd);
drivers/media/i2c/adv7511-v4l2.c
126
static void adv7511_setup(struct v4l2_subdev *sd);
drivers/media/i2c/adv7511-v4l2.c
127
static int adv7511_s_i2s_clock_freq(struct v4l2_subdev *sd, u32 freq);
drivers/media/i2c/adv7511-v4l2.c
1275
static int adv7511_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/adv7511-v4l2.c
1279
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
128
static int adv7511_s_clock_freq(struct v4l2_subdev *sd, u32 freq);
drivers/media/i2c/adv7511-v4l2.c
1324
adv7511_wr_and_or(sd, 0x15, 0xf0, 0x01);
drivers/media/i2c/adv7511-v4l2.c
1325
adv7511_wr_and_or(sd, 0x16, 0x03, 0xb8);
drivers/media/i2c/adv7511-v4l2.c
1329
adv7511_wr_and_or(sd, 0x15, 0xf0, 0x01);
drivers/media/i2c/adv7511-v4l2.c
1330
adv7511_wr_and_or(sd, 0x16, 0x03, 0xbc);
drivers/media/i2c/adv7511-v4l2.c
1335
adv7511_wr_and_or(sd, 0x15, 0xf0, 0x00);
drivers/media/i2c/adv7511-v4l2.c
1336
adv7511_wr_and_or(sd, 0x16, 0x03, 0x00);
drivers/media/i2c/adv7511-v4l2.c
1407
adv7511_wr_and_or(sd, 0x4a, 0xbf, 0);
drivers/media/i2c/adv7511-v4l2.c
1408
adv7511_wr_and_or(sd, 0x55, 0x9f, y << 5);
drivers/media/i2c/adv7511-v4l2.c
1409
adv7511_wr_and_or(sd, 0x56, 0x3f, c << 6);
drivers/media/i2c/adv7511-v4l2.c
1410
adv7511_wr_and_or(sd, 0x57, 0x83, (ec << 4) | (q << 2) | (itc << 7));
drivers/media/i2c/adv7511-v4l2.c
1411
adv7511_wr_and_or(sd, 0x59, 0x0f, (yq << 6) | (cn << 4));
drivers/media/i2c/adv7511-v4l2.c
1412
adv7511_wr_and_or(sd, 0x4a, 0xff, 1);
drivers/media/i2c/adv7511-v4l2.c
1413
adv7511_set_rgb_quantization_mode(sd, state->rgb_quantization_range_ctrl);
drivers/media/i2c/adv7511-v4l2.c
143
static inline struct adv7511_state *get_adv7511_state(struct v4l2_subdev *sd)
drivers/media/i2c/adv7511-v4l2.c
1439
static void adv7511_dbg_dump_edid(int lvl, int debug, struct v4l2_subdev *sd, int segment, u8 *buf)
drivers/media/i2c/adv7511-v4l2.c
1443
v4l2_dbg(lvl, debug, sd, "edid segment %d\n", segment);
drivers/media/i2c/adv7511-v4l2.c
1448
v4l2_dbg(lvl, debug, sd, "\n");
drivers/media/i2c/adv7511-v4l2.c
145
return container_of(sd, struct adv7511_state, sd);
drivers/media/i2c/adv7511-v4l2.c
1454
v4l2_dbg(lvl, debug, sd, "%s\n", b);
drivers/media/i2c/adv7511-v4l2.c
1459
static void adv7511_notify_no_edid(struct v4l2_subdev *sd)
drivers/media/i2c/adv7511-v4l2.c
1461
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
1466
ed.segment = adv7511_rd(sd, 0xc4);
drivers/media/i2c/adv7511-v4l2.c
1469
v4l2_subdev_notify(sd, ADV7511_EDID_DETECT, (void *)&ed);
drivers/media/i2c/adv7511-v4l2.c
1477
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/adv7511-v4l2.c
1479
v4l2_dbg(1, debug, sd, "%s:\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
1481
if (adv7511_check_edid_status(sd)) {
drivers/media/i2c/adv7511-v4l2.c
1486
if (adv7511_have_hotplug(sd)) {
drivers/media/i2c/adv7511-v4l2.c
1492
v4l2_dbg(1, debug, sd, "%s: edid read failed\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
1494
adv7511_s_power(sd, false);
drivers/media/i2c/adv7511-v4l2.c
1495
adv7511_s_power(sd, true);
drivers/media/i2c/adv7511-v4l2.c
150
return &container_of(ctrl->handler, struct adv7511_state, hdl)->sd;
drivers/media/i2c/adv7511-v4l2.c
1502
adv7511_notify_no_edid(sd);
drivers/media/i2c/adv7511-v4l2.c
1503
v4l2_dbg(1, debug, sd, "%s: no edid found\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
1506
static void adv7511_audio_setup(struct v4l2_subdev *sd)
drivers/media/i2c/adv7511-v4l2.c
1508
v4l2_dbg(1, debug, sd, "%s\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
1510
adv7511_s_i2s_clock_freq(sd, 48000);
drivers/media/i2c/adv7511-v4l2.c
1511
adv7511_s_clock_freq(sd, 48000);
drivers/media/i2c/adv7511-v4l2.c
1512
adv7511_s_routing(sd, 0, 0, 0);
drivers/media/i2c/adv7511-v4l2.c
1516
static void adv7511_setup(struct v4l2_subdev *sd)
drivers/media/i2c/adv7511-v4l2.c
1518
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
1519
v4l2_dbg(1, debug, sd, "%s\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
1522
adv7511_wr_and_or(sd, 0x15, 0xf0, 0x0);
drivers/media/i2c/adv7511-v4l2.c
1524
adv7511_wr_and_or(sd, 0x16, 0x7f, 0x0);
drivers/media/i2c/adv7511-v4l2.c
1526
adv7511_wr_and_or(sd, 0x17, 0xf9, 0x06);
drivers/media/i2c/adv7511-v4l2.c
1528
adv7511_wr_and_or(sd, 0x3b, 0x9f, 0x0);
drivers/media/i2c/adv7511-v4l2.c
1530
adv7511_wr_and_or(sd, 0x18, 0x7f, 0x0);
drivers/media/i2c/adv7511-v4l2.c
1533
adv7511_wr_and_or(sd, 0x55, 0x9c, 0x12);
drivers/media/i2c/adv7511-v4l2.c
1535
adv7511_wr_and_or(sd, 0x44, 0xe7, 0x10);
drivers/media/i2c/adv7511-v4l2.c
1537
adv7511_wr(sd, 0x56, 0xa8);
drivers/media/i2c/adv7511-v4l2.c
1539
adv7511_wr_and_or(sd, 0xaf, 0xed, 0x0);
drivers/media/i2c/adv7511-v4l2.c
1542
adv7511_wr_and_or(sd, 0xba, 0x1f, 0x60);
drivers/media/i2c/adv7511-v4l2.c
1544
adv7511_audio_setup(sd);
drivers/media/i2c/adv7511-v4l2.c
1549
static void adv7511_notify_monitor_detect(struct v4l2_subdev *sd)
drivers/media/i2c/adv7511-v4l2.c
1552
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
1555
v4l2_subdev_notify(sd, ADV7511_MONITOR_DETECT, (void *)&mdt);
drivers/media/i2c/adv7511-v4l2.c
1558
static void adv7511_check_monitor_present_status(struct v4l2_subdev *sd)
drivers/media/i2c/adv7511-v4l2.c
1560
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
1562
u8 status = adv7511_rd(sd, 0x42);
drivers/media/i2c/adv7511-v4l2.c
1564
v4l2_dbg(1, debug, sd, "%s: status: 0x%x%s%s\n",
drivers/media/i2c/adv7511-v4l2.c
1571
v4l2_ctrl_s_ctrl(state->hotplug_ctrl, adv7511_have_hotplug(sd) ? 0x1 : 0x0);
drivers/media/i2c/adv7511-v4l2.c
1572
v4l2_ctrl_s_ctrl(state->rx_sense_ctrl, adv7511_have_rx_sense(sd) ? 0x1 : 0x0);
drivers/media/i2c/adv7511-v4l2.c
1575
v4l2_dbg(1, debug, sd, "%s: hotplug and (rx-sense or edid)\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
1577
v4l2_dbg(1, debug, sd, "%s: monitor detected\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
1579
adv7511_set_isr(sd, true);
drivers/media/i2c/adv7511-v4l2.c
1580
if (!adv7511_s_power(sd, true)) {
drivers/media/i2c/adv7511-v4l2.c
1581
v4l2_dbg(1, debug, sd, "%s: monitor detected, powerup failed\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
1584
adv7511_setup(sd);
drivers/media/i2c/adv7511-v4l2.c
1585
adv7511_notify_monitor_detect(sd);
drivers/media/i2c/adv7511-v4l2.c
1590
v4l2_dbg(1, debug, sd, "%s: hotplug detected\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
1594
v4l2_dbg(1, debug, sd, "%s: hotplug not detected\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
1596
v4l2_dbg(1, debug, sd, "%s: monitor not detected\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
1598
adv7511_notify_monitor_detect(sd);
drivers/media/i2c/adv7511-v4l2.c
1600
adv7511_s_power(sd, false);
drivers/media/i2c/adv7511-v4l2.c
1602
adv7511_notify_no_edid(sd);
drivers/media/i2c/adv7511-v4l2.c
1616
static bool edid_verify_crc(struct v4l2_subdev *sd, u32 segment)
drivers/media/i2c/adv7511-v4l2.c
1618
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
1629
static bool edid_verify_header(struct v4l2_subdev *sd, u32 segment)
drivers/media/i2c/adv7511-v4l2.c
1634
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
1642
static bool adv7511_check_edid_status(struct v4l2_subdev *sd)
drivers/media/i2c/adv7511-v4l2.c
1644
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
1645
u8 edidRdy = adv7511_rd(sd, 0xc5);
drivers/media/i2c/adv7511-v4l2.c
1647
v4l2_dbg(1, debug, sd, "%s: edid ready (retries: %d)\n",
drivers/media/i2c/adv7511-v4l2.c
1654
int segment = adv7511_rd(sd, 0xc4);
drivers/media/i2c/adv7511-v4l2.c
1659
v4l2_err(sd, "edid segment number too big\n");
drivers/media/i2c/adv7511-v4l2.c
1662
v4l2_dbg(1, debug, sd, "%s: got segment %d\n", __func__, segment);
drivers/media/i2c/adv7511-v4l2.c
1663
err = adv7511_edid_rd(sd, 256, &state->edid.data[segment * 256]);
drivers/media/i2c/adv7511-v4l2.c
1665
adv7511_dbg_dump_edid(2, debug, sd, segment, &state->edid.data[segment * 256]);
drivers/media/i2c/adv7511-v4l2.c
1670
v4l2_dbg(1, debug, sd, "%s: %d blocks in total\n",
drivers/media/i2c/adv7511-v4l2.c
1675
if (err || !edid_verify_crc(sd, segment) || !edid_verify_header(sd, segment)) {
drivers/media/i2c/adv7511-v4l2.c
1678
v4l2_err(sd, "%s: edid crc or header error\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
1680
adv7511_s_power(sd, false);
drivers/media/i2c/adv7511-v4l2.c
1681
adv7511_s_power(sd, true);
drivers/media/i2c/adv7511-v4l2.c
1689
v4l2_dbg(1, debug, sd, "%s: request segment %d\n", __func__, state->edid.segments);
drivers/media/i2c/adv7511-v4l2.c
1690
adv7511_wr(sd, 0xc9, 0xf);
drivers/media/i2c/adv7511-v4l2.c
1691
adv7511_wr(sd, 0xc4, state->edid.segments);
drivers/media/i2c/adv7511-v4l2.c
1697
v4l2_dbg(1, debug, sd, "%s: edid complete with %d segment(s)\n", __func__, state->edid.segments);
drivers/media/i2c/adv7511-v4l2.c
1709
v4l2_subdev_notify(sd, ADV7511_EDID_DETECT, (void *)&ed);
drivers/media/i2c/adv7511-v4l2.c
1721
struct v4l2_subdev *sd = priv;
drivers/media/i2c/adv7511-v4l2.c
1738
len = read_infoframe(sd, &cri[index], buf);
drivers/media/i2c/adv7511-v4l2.c
1744
static int adv7511_registered(struct v4l2_subdev *sd)
drivers/media/i2c/adv7511-v4l2.c
1746
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
1747
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7511-v4l2.c
1756
state->debugfs_dir = debugfs_create_dir(sd->name, v4l2_debugfs_root());
drivers/media/i2c/adv7511-v4l2.c
1759
V4L2_DEBUGFS_IF_SPD, sd, adv7511_debugfs_if_read);
drivers/media/i2c/adv7511-v4l2.c
1763
static void adv7511_unregistered(struct v4l2_subdev *sd)
drivers/media/i2c/adv7511-v4l2.c
1765
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
1781
static void adv7511_init_setup(struct v4l2_subdev *sd)
drivers/media/i2c/adv7511-v4l2.c
1783
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
1788
v4l2_dbg(1, debug, sd, "%s\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
1791
adv7511_wr(sd, 0x96, 0xff);
drivers/media/i2c/adv7511-v4l2.c
1792
adv7511_wr(sd, 0x97, 0xff);
drivers/media/i2c/adv7511-v4l2.c
1798
adv7511_wr_and_or(sd, 0xd6, 0x3f, 0xc0);
drivers/media/i2c/adv7511-v4l2.c
1801
adv7511_set_isr(sd, false);
drivers/media/i2c/adv7511-v4l2.c
1802
adv7511_s_stream(sd, false);
drivers/media/i2c/adv7511-v4l2.c
1803
adv7511_s_audio_stream(sd, false);
drivers/media/i2c/adv7511-v4l2.c
1808
v4l2_dbg(1, debug, sd, "%s: cec_clk %d\n", __func__, cec_clk);
drivers/media/i2c/adv7511-v4l2.c
1811
adv7511_cec_write(sd, 0x50, 0x01);
drivers/media/i2c/adv7511-v4l2.c
1812
adv7511_cec_write(sd, 0x50, 0x00);
drivers/media/i2c/adv7511-v4l2.c
1815
adv7511_cec_write(sd, 0x4a, 0x00);
drivers/media/i2c/adv7511-v4l2.c
1816
adv7511_cec_write(sd, 0x4a, 0x07);
drivers/media/i2c/adv7511-v4l2.c
1819
v4l2_err(sd, "%s: cec_clk %d, not multiple of 750 Khz\n",
drivers/media/i2c/adv7511-v4l2.c
1823
adv7511_cec_write(sd, 0x4e, ratio << 2);
drivers/media/i2c/adv7511-v4l2.c
1831
struct v4l2_subdev *sd;
drivers/media/i2c/adv7511-v4l2.c
185
static int adv7511_rd(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7511-v4l2.c
1852
sd = &state->sd;
drivers/media/i2c/adv7511-v4l2.c
1854
v4l2_dbg(1, debug, sd, "detecting adv7511 client on address 0x%x\n",
drivers/media/i2c/adv7511-v4l2.c
1857
v4l2_i2c_subdev_init(sd, client, &adv7511_ops);
drivers/media/i2c/adv7511-v4l2.c
1858
sd->internal_ops = &adv7511_int_ops;
drivers/media/i2c/adv7511-v4l2.c
187
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7511-v4l2.c
1880
sd->ctrl_handler = hdl;
drivers/media/i2c/adv7511-v4l2.c
1886
sd->entity.function = MEDIA_ENT_F_DV_ENCODER;
drivers/media/i2c/adv7511-v4l2.c
1887
err = media_entity_pads_init(&sd->entity, 1, &state->pad);
drivers/media/i2c/adv7511-v4l2.c
1896
state->chip_revision = adv7511_rd(sd, 0x0);
drivers/media/i2c/adv7511-v4l2.c
1897
chip_id[0] = adv7511_rd(sd, 0xf5);
drivers/media/i2c/adv7511-v4l2.c
1898
chip_id[1] = adv7511_rd(sd, 0xf6);
drivers/media/i2c/adv7511-v4l2.c
1900
v4l2_err(sd, "chip_id != 0x7511, read 0x%02x%02x\n", chip_id[0],
drivers/media/i2c/adv7511-v4l2.c
1909
v4l2_err(sd, "failed to register edid i2c client\n");
drivers/media/i2c/adv7511-v4l2.c
1914
adv7511_wr(sd, 0xe1, state->i2c_cec_addr);
drivers/media/i2c/adv7511-v4l2.c
1917
v4l2_err(sd, "%s: cec_clk %u outside range, disabling cec\n",
drivers/media/i2c/adv7511-v4l2.c
192
static int adv7511_wr(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7511-v4l2.c
1926
v4l2_err(sd, "failed to register cec i2c client\n");
drivers/media/i2c/adv7511-v4l2.c
1930
adv7511_wr(sd, 0xe2, 0x00); /* power up cec section */
drivers/media/i2c/adv7511-v4l2.c
1932
adv7511_wr(sd, 0xe2, 0x01); /* power down cec section */
drivers/media/i2c/adv7511-v4l2.c
1937
v4l2_err(sd, "failed to register pktmem i2c client\n");
drivers/media/i2c/adv7511-v4l2.c
194
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7511-v4l2.c
1942
state->work_queue = create_singlethread_workqueue(sd->name);
drivers/media/i2c/adv7511-v4l2.c
1944
v4l2_err(sd, "could not create workqueue\n");
drivers/media/i2c/adv7511-v4l2.c
1951
adv7511_init_setup(sd);
drivers/media/i2c/adv7511-v4l2.c
1964
adv7511_set_isr(sd, true);
drivers/media/i2c/adv7511-v4l2.c
1965
adv7511_check_monitor_present_status(sd);
drivers/media/i2c/adv7511-v4l2.c
1967
v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
drivers/media/i2c/adv7511-v4l2.c
1978
media_entity_cleanup(&sd->entity);
drivers/media/i2c/adv7511-v4l2.c
1988
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/adv7511-v4l2.c
1989
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
1993
v4l2_dbg(1, debug, sd, "%s removed @ 0x%x (%s)\n", client->name,
drivers/media/i2c/adv7511-v4l2.c
1996
adv7511_set_isr(sd, false);
drivers/media/i2c/adv7511-v4l2.c
1997
adv7511_init_setup(sd);
drivers/media/i2c/adv7511-v4l2.c
2003
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/adv7511-v4l2.c
2004
media_entity_cleanup(&sd->entity);
drivers/media/i2c/adv7511-v4l2.c
2005
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/adv7511-v4l2.c
203
v4l2_err(sd, "%s: i2c write error\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
209
static inline void adv7511_wr_and_or(struct v4l2_subdev *sd, u8 reg, u8 clr_mask, u8 val_mask)
drivers/media/i2c/adv7511-v4l2.c
211
adv7511_wr(sd, reg, (adv7511_rd(sd, reg) & clr_mask) | val_mask);
drivers/media/i2c/adv7511-v4l2.c
214
static int adv7511_edid_rd(struct v4l2_subdev *sd, uint16_t len, uint8_t *buf)
drivers/media/i2c/adv7511-v4l2.c
216
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
219
v4l2_dbg(1, debug, sd, "%s:\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
227
v4l2_err(sd, "%s: i2c read error\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
235
static inline int adv7511_cec_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7511-v4l2.c
237
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
242
static int adv7511_cec_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7511-v4l2.c
244
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
253
v4l2_err(sd, "%s: I2C Write Problem\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
257
static inline int adv7511_cec_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask,
drivers/media/i2c/adv7511-v4l2.c
260
return adv7511_cec_write(sd, reg, (adv7511_cec_read(sd, reg) & mask) | val);
drivers/media/i2c/adv7511-v4l2.c
263
static int adv7511_pktmem_rd(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7511-v4l2.c
265
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
270
static inline bool adv7511_have_hotplug(struct v4l2_subdev *sd)
drivers/media/i2c/adv7511-v4l2.c
272
return adv7511_rd(sd, 0x42) & MASK_ADV7511_HPD_DETECT;
drivers/media/i2c/adv7511-v4l2.c
275
static inline bool adv7511_have_rx_sense(struct v4l2_subdev *sd)
drivers/media/i2c/adv7511-v4l2.c
277
return adv7511_rd(sd, 0x42) & MASK_ADV7511_MSEN_DETECT;
drivers/media/i2c/adv7511-v4l2.c
280
static void adv7511_csc_conversion_mode(struct v4l2_subdev *sd, u8 mode)
drivers/media/i2c/adv7511-v4l2.c
282
adv7511_wr_and_or(sd, 0x18, 0x9f, (mode & 0x3)<<5);
drivers/media/i2c/adv7511-v4l2.c
285
static void adv7511_csc_coeff(struct v4l2_subdev *sd,
drivers/media/i2c/adv7511-v4l2.c
291
adv7511_wr_and_or(sd, 0x18, 0xe0, A1>>8);
drivers/media/i2c/adv7511-v4l2.c
292
adv7511_wr(sd, 0x19, A1);
drivers/media/i2c/adv7511-v4l2.c
293
adv7511_wr_and_or(sd, 0x1A, 0xe0, A2>>8);
drivers/media/i2c/adv7511-v4l2.c
294
adv7511_wr(sd, 0x1B, A2);
drivers/media/i2c/adv7511-v4l2.c
295
adv7511_wr_and_or(sd, 0x1c, 0xe0, A3>>8);
drivers/media/i2c/adv7511-v4l2.c
296
adv7511_wr(sd, 0x1d, A3);
drivers/media/i2c/adv7511-v4l2.c
297
adv7511_wr_and_or(sd, 0x1e, 0xe0, A4>>8);
drivers/media/i2c/adv7511-v4l2.c
298
adv7511_wr(sd, 0x1f, A4);
drivers/media/i2c/adv7511-v4l2.c
301
adv7511_wr_and_or(sd, 0x20, 0xe0, B1>>8);
drivers/media/i2c/adv7511-v4l2.c
302
adv7511_wr(sd, 0x21, B1);
drivers/media/i2c/adv7511-v4l2.c
303
adv7511_wr_and_or(sd, 0x22, 0xe0, B2>>8);
drivers/media/i2c/adv7511-v4l2.c
304
adv7511_wr(sd, 0x23, B2);
drivers/media/i2c/adv7511-v4l2.c
305
adv7511_wr_and_or(sd, 0x24, 0xe0, B3>>8);
drivers/media/i2c/adv7511-v4l2.c
306
adv7511_wr(sd, 0x25, B3);
drivers/media/i2c/adv7511-v4l2.c
307
adv7511_wr_and_or(sd, 0x26, 0xe0, B4>>8);
drivers/media/i2c/adv7511-v4l2.c
308
adv7511_wr(sd, 0x27, B4);
drivers/media/i2c/adv7511-v4l2.c
311
adv7511_wr_and_or(sd, 0x28, 0xe0, C1>>8);
drivers/media/i2c/adv7511-v4l2.c
312
adv7511_wr(sd, 0x29, C1);
drivers/media/i2c/adv7511-v4l2.c
313
adv7511_wr_and_or(sd, 0x2A, 0xe0, C2>>8);
drivers/media/i2c/adv7511-v4l2.c
314
adv7511_wr(sd, 0x2B, C2);
drivers/media/i2c/adv7511-v4l2.c
315
adv7511_wr_and_or(sd, 0x2C, 0xe0, C3>>8);
drivers/media/i2c/adv7511-v4l2.c
316
adv7511_wr(sd, 0x2D, C3);
drivers/media/i2c/adv7511-v4l2.c
317
adv7511_wr_and_or(sd, 0x2E, 0xe0, C4>>8);
drivers/media/i2c/adv7511-v4l2.c
318
adv7511_wr(sd, 0x2F, C4);
drivers/media/i2c/adv7511-v4l2.c
321
static void adv7511_csc_rgb_full2limit(struct v4l2_subdev *sd, bool enable)
drivers/media/i2c/adv7511-v4l2.c
325
adv7511_csc_conversion_mode(sd, csc_mode);
drivers/media/i2c/adv7511-v4l2.c
326
adv7511_csc_coeff(sd,
drivers/media/i2c/adv7511-v4l2.c
331
adv7511_wr_and_or(sd, 0x18, 0x7f, 0x80);
drivers/media/i2c/adv7511-v4l2.c
333
adv7511_wr_and_or(sd, 0x57, 0xf3, 0x04);
drivers/media/i2c/adv7511-v4l2.c
336
adv7511_wr_and_or(sd, 0x18, 0x7f, 0x0);
drivers/media/i2c/adv7511-v4l2.c
338
adv7511_wr_and_or(sd, 0x57, 0xf3, 0x08);
drivers/media/i2c/adv7511-v4l2.c
342
static void adv7511_set_rgb_quantization_mode(struct v4l2_subdev *sd, struct v4l2_ctrl *ctrl)
drivers/media/i2c/adv7511-v4l2.c
344
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
349
adv7511_csc_rgb_full2limit(sd, false);
drivers/media/i2c/adv7511-v4l2.c
358
adv7511_csc_rgb_full2limit(sd, true);
drivers/media/i2c/adv7511-v4l2.c
361
adv7511_csc_rgb_full2limit(sd, false);
drivers/media/i2c/adv7511-v4l2.c
366
adv7511_csc_rgb_full2limit(sd, true);
drivers/media/i2c/adv7511-v4l2.c
370
adv7511_csc_rgb_full2limit(sd, false);
drivers/media/i2c/adv7511-v4l2.c
379
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/adv7511-v4l2.c
380
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
382
v4l2_dbg(1, debug, sd, "%s: ctrl id: %d, ctrl->val %d\n", __func__, ctrl->id, ctrl->val);
drivers/media/i2c/adv7511-v4l2.c
386
adv7511_wr_and_or(sd, 0xaf, 0xfd, ctrl->val == V4L2_DV_TX_MODE_HDMI ? 0x02 : 0x00);
drivers/media/i2c/adv7511-v4l2.c
390
adv7511_set_rgb_quantization_mode(sd, ctrl);
drivers/media/i2c/adv7511-v4l2.c
399
adv7511_wr_and_or(sd, 0x57, 0x7f, itc << 7);
drivers/media/i2c/adv7511-v4l2.c
400
adv7511_wr_and_or(sd, 0x59, 0xcf, cn << 4);
drivers/media/i2c/adv7511-v4l2.c
414
static void adv7511_inv_register(struct v4l2_subdev *sd)
drivers/media/i2c/adv7511-v4l2.c
416
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
418
v4l2_info(sd, "0x000-0x0ff: Main Map\n");
drivers/media/i2c/adv7511-v4l2.c
420
v4l2_info(sd, "0x100-0x1ff: CEC Map\n");
drivers/media/i2c/adv7511-v4l2.c
423
static int adv7511_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
drivers/media/i2c/adv7511-v4l2.c
425
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
430
reg->val = adv7511_rd(sd, reg->reg & 0xff);
drivers/media/i2c/adv7511-v4l2.c
434
reg->val = adv7511_cec_read(sd, reg->reg & 0xff);
drivers/media/i2c/adv7511-v4l2.c
439
v4l2_info(sd, "Register %03llx not supported\n", reg->reg);
drivers/media/i2c/adv7511-v4l2.c
440
adv7511_inv_register(sd);
drivers/media/i2c/adv7511-v4l2.c
446
static int adv7511_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
drivers/media/i2c/adv7511-v4l2.c
448
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
452
adv7511_wr(sd, reg->reg & 0xff, reg->val & 0xff);
drivers/media/i2c/adv7511-v4l2.c
456
adv7511_cec_write(sd, reg->reg & 0xff, reg->val & 0xff);
drivers/media/i2c/adv7511-v4l2.c
461
v4l2_info(sd, "Register %03llx not supported\n", reg->reg);
drivers/media/i2c/adv7511-v4l2.c
462
adv7511_inv_register(sd);
drivers/media/i2c/adv7511-v4l2.c
489
static int read_infoframe(struct v4l2_subdev *sd,
drivers/media/i2c/adv7511-v4l2.c
496
if (!(adv7511_rd(sd, cri->present_reg) & cri->present_mask)) {
drivers/media/i2c/adv7511-v4l2.c
497
v4l2_info(sd, "%s infoframe not transmitted\n", cri->desc);
drivers/media/i2c/adv7511-v4l2.c
506
v4l2_err(sd, "%s: invalid %s infoframe length %d\n", __func__, cri->desc, len);
drivers/media/i2c/adv7511-v4l2.c
512
buffer[i + 4] = adv7511_pktmem_rd(sd, cri->payload_addr + i - 0x100);
drivers/media/i2c/adv7511-v4l2.c
515
buffer[i + 4] = adv7511_rd(sd, cri->payload_addr + i);
drivers/media/i2c/adv7511-v4l2.c
523
static void log_infoframe(struct v4l2_subdev *sd,
drivers/media/i2c/adv7511-v4l2.c
527
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7511-v4l2.c
530
int len = read_infoframe(sd, cri, buffer);
drivers/media/i2c/adv7511-v4l2.c
536
v4l2_err(sd, "%s: unpack of %s infoframe failed\n",
drivers/media/i2c/adv7511-v4l2.c
550
static void adv7511_log_infoframes(struct v4l2_subdev *sd)
drivers/media/i2c/adv7511-v4l2.c
555
log_infoframe(sd, &cri[i]);
drivers/media/i2c/adv7511-v4l2.c
558
static int adv7511_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/adv7511-v4l2.c
560
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
586
v4l2_info(sd, "power %s\n", state->power_on ? "on" : "off");
drivers/media/i2c/adv7511-v4l2.c
587
v4l2_info(sd, "%s hotplug, %s Rx Sense, %s EDID (%d block(s))\n",
drivers/media/i2c/adv7511-v4l2.c
588
(adv7511_rd(sd, 0x42) & MASK_ADV7511_HPD_DETECT) ? "detected" : "no",
drivers/media/i2c/adv7511-v4l2.c
589
(adv7511_rd(sd, 0x42) & MASK_ADV7511_MSEN_DETECT) ? "detected" : "no",
drivers/media/i2c/adv7511-v4l2.c
592
v4l2_info(sd, "%s output %s\n",
drivers/media/i2c/adv7511-v4l2.c
593
(adv7511_rd(sd, 0xaf) & 0x02) ?
drivers/media/i2c/adv7511-v4l2.c
595
(adv7511_rd(sd, 0xa1) & 0x3c) ?
drivers/media/i2c/adv7511-v4l2.c
597
v4l2_info(sd, "state: %s, error: %s, detect count: %u, msk/irq: %02x/%02x\n",
drivers/media/i2c/adv7511-v4l2.c
598
states[adv7511_rd(sd, 0xc8) & 0xf],
drivers/media/i2c/adv7511-v4l2.c
599
errors[adv7511_rd(sd, 0xc8) >> 4], state->edid_detect_counter,
drivers/media/i2c/adv7511-v4l2.c
600
adv7511_rd(sd, 0x94), adv7511_rd(sd, 0x96));
drivers/media/i2c/adv7511-v4l2.c
601
v4l2_info(sd, "RGB quantization: %s range\n", adv7511_rd(sd, 0x18) & 0x80 ? "limited" : "full");
drivers/media/i2c/adv7511-v4l2.c
602
if (adv7511_rd(sd, 0xaf) & 0x02) {
drivers/media/i2c/adv7511-v4l2.c
604
u8 manual_cts = adv7511_rd(sd, 0x0a) & 0x80;
drivers/media/i2c/adv7511-v4l2.c
605
u32 N = (adv7511_rd(sd, 0x01) & 0xf) << 16 |
drivers/media/i2c/adv7511-v4l2.c
606
adv7511_rd(sd, 0x02) << 8 |
drivers/media/i2c/adv7511-v4l2.c
607
adv7511_rd(sd, 0x03);
drivers/media/i2c/adv7511-v4l2.c
608
u8 vic_detect = adv7511_rd(sd, 0x3e) >> 2;
drivers/media/i2c/adv7511-v4l2.c
609
u8 vic_sent = adv7511_rd(sd, 0x3d) & 0x3f;
drivers/media/i2c/adv7511-v4l2.c
613
CTS = (adv7511_rd(sd, 0x07) & 0xf) << 16 |
drivers/media/i2c/adv7511-v4l2.c
614
adv7511_rd(sd, 0x08) << 8 |
drivers/media/i2c/adv7511-v4l2.c
615
adv7511_rd(sd, 0x09);
drivers/media/i2c/adv7511-v4l2.c
617
CTS = (adv7511_rd(sd, 0x04) & 0xf) << 16 |
drivers/media/i2c/adv7511-v4l2.c
618
adv7511_rd(sd, 0x05) << 8 |
drivers/media/i2c/adv7511-v4l2.c
619
adv7511_rd(sd, 0x06);
drivers/media/i2c/adv7511-v4l2.c
620
v4l2_info(sd, "CTS %s mode: N %d, CTS %d\n",
drivers/media/i2c/adv7511-v4l2.c
622
v4l2_info(sd, "VIC: detected %d, sent %d\n",
drivers/media/i2c/adv7511-v4l2.c
624
adv7511_log_infoframes(sd);
drivers/media/i2c/adv7511-v4l2.c
627
v4l2_print_dv_timings(sd->name, "timings: ",
drivers/media/i2c/adv7511-v4l2.c
630
v4l2_info(sd, "no timings set\n");
drivers/media/i2c/adv7511-v4l2.c
631
v4l2_info(sd, "i2c edid addr: 0x%x\n", state->i2c_edid_addr);
drivers/media/i2c/adv7511-v4l2.c
636
v4l2_info(sd, "i2c cec addr: 0x%x\n", state->i2c_cec_addr);
drivers/media/i2c/adv7511-v4l2.c
638
v4l2_info(sd, "CEC: %s\n", state->cec_enabled_adap ?
drivers/media/i2c/adv7511-v4l2.c
645
v4l2_info(sd, "CEC Logical Address: 0x%x\n",
drivers/media/i2c/adv7511-v4l2.c
649
v4l2_info(sd, "i2c pktmem addr: 0x%x\n", state->i2c_pktmem_addr);
drivers/media/i2c/adv7511-v4l2.c
654
static int adv7511_s_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/adv7511-v4l2.c
656
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
660
v4l2_dbg(1, debug, sd, "%s: power %s\n", __func__, on ? "on" : "off");
drivers/media/i2c/adv7511-v4l2.c
666
adv7511_wr_and_or(sd, 0x41, 0xbf, 0x40);
drivers/media/i2c/adv7511-v4l2.c
674
adv7511_wr_and_or(sd, 0x41, 0xbf, 0x0);
drivers/media/i2c/adv7511-v4l2.c
675
if ((adv7511_rd(sd, 0x41) & 0x40) == 0)
drivers/media/i2c/adv7511-v4l2.c
677
adv7511_wr_and_or(sd, 0x41, 0xbf, 0x40);
drivers/media/i2c/adv7511-v4l2.c
681
v4l2_dbg(1, debug, sd, "%s: failed to powerup the adv7511!\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
682
adv7511_s_power(sd, 0);
drivers/media/i2c/adv7511-v4l2.c
686
v4l2_dbg(1, debug, sd, "%s: needed %d retries to powerup the adv7511\n", __func__, i);
drivers/media/i2c/adv7511-v4l2.c
689
adv7511_wr(sd, 0x98, 0x03);
drivers/media/i2c/adv7511-v4l2.c
690
adv7511_wr_and_or(sd, 0x9a, 0xfe, 0x70);
drivers/media/i2c/adv7511-v4l2.c
691
adv7511_wr(sd, 0x9c, 0x30);
drivers/media/i2c/adv7511-v4l2.c
692
adv7511_wr_and_or(sd, 0x9d, 0xfc, 0x01);
drivers/media/i2c/adv7511-v4l2.c
693
adv7511_wr(sd, 0xa2, 0xa4);
drivers/media/i2c/adv7511-v4l2.c
694
adv7511_wr(sd, 0xa3, 0xa4);
drivers/media/i2c/adv7511-v4l2.c
695
adv7511_wr(sd, 0xe0, 0xd0);
drivers/media/i2c/adv7511-v4l2.c
696
adv7511_wr(sd, 0xf9, 0x00);
drivers/media/i2c/adv7511-v4l2.c
698
adv7511_wr(sd, 0x43, state->i2c_edid_addr);
drivers/media/i2c/adv7511-v4l2.c
699
adv7511_wr(sd, 0x45, state->i2c_pktmem_addr);
drivers/media/i2c/adv7511-v4l2.c
702
adv7511_wr(sd, 0xc9, 0xf);
drivers/media/i2c/adv7511-v4l2.c
710
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/adv7511-v4l2.c
717
adv7511_cec_write_and_or(sd, 0x4e, 0xfc, 0x01);
drivers/media/i2c/adv7511-v4l2.c
719
adv7511_cec_write(sd, 0x4a, 0x00);
drivers/media/i2c/adv7511-v4l2.c
720
adv7511_cec_write(sd, 0x4a, 0x07);
drivers/media/i2c/adv7511-v4l2.c
721
adv7511_cec_write_and_or(sd, 0x11, 0xfe, 0); /* initially disable tx */
drivers/media/i2c/adv7511-v4l2.c
728
adv7511_wr_and_or(sd, 0x95, 0xc0, 0x39);
drivers/media/i2c/adv7511-v4l2.c
731
adv7511_wr_and_or(sd, 0x95, 0xc0, 0x00);
drivers/media/i2c/adv7511-v4l2.c
733
adv7511_cec_write_and_or(sd, 0x4b, 0x8f, 0x00);
drivers/media/i2c/adv7511-v4l2.c
735
adv7511_cec_write_and_or(sd, 0x4e, 0xfc, 0x00);
drivers/media/i2c/adv7511-v4l2.c
745
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/adv7511-v4l2.c
752
adv7511_cec_write_and_or(sd, 0x4b, 0x8f, 0);
drivers/media/i2c/adv7511-v4l2.c
776
adv7511_cec_write_and_or(sd, 0x4b, 0xef, 0x10);
drivers/media/i2c/adv7511-v4l2.c
778
adv7511_cec_write_and_or(sd, 0x4c, 0xf0, addr);
drivers/media/i2c/adv7511-v4l2.c
78
struct v4l2_subdev sd;
drivers/media/i2c/adv7511-v4l2.c
782
adv7511_cec_write_and_or(sd, 0x4b, 0xdf, 0x20);
drivers/media/i2c/adv7511-v4l2.c
784
adv7511_cec_write_and_or(sd, 0x4c, 0x0f, addr << 4);
drivers/media/i2c/adv7511-v4l2.c
788
adv7511_cec_write_and_or(sd, 0x4b, 0xbf, 0x40);
drivers/media/i2c/adv7511-v4l2.c
790
adv7511_cec_write_and_or(sd, 0x4d, 0xf0, addr);
drivers/media/i2c/adv7511-v4l2.c
800
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/adv7511-v4l2.c
804
v4l2_dbg(1, debug, sd, "%s: len %d\n", __func__, len);
drivers/media/i2c/adv7511-v4l2.c
807
v4l2_err(sd, "%s: len exceeded 16 (%d)\n", __func__, len);
drivers/media/i2c/adv7511-v4l2.c
816
adv7511_cec_write_and_or(sd, 0x12, ~0x70, max(1, attempts - 1) << 4);
drivers/media/i2c/adv7511-v4l2.c
819
adv7511_wr(sd, 0x97, 0x38);
drivers/media/i2c/adv7511-v4l2.c
823
adv7511_cec_write(sd, i, msg->msg[i]);
drivers/media/i2c/adv7511-v4l2.c
826
adv7511_cec_write(sd, 0x10, len);
drivers/media/i2c/adv7511-v4l2.c
828
adv7511_cec_write(sd, 0x11, 0x01);
drivers/media/i2c/adv7511-v4l2.c
832
static void adv_cec_tx_raw_status(struct v4l2_subdev *sd, u8 tx_raw_status)
drivers/media/i2c/adv7511-v4l2.c
834
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
836
if ((adv7511_cec_read(sd, 0x11) & 0x01) == 0) {
drivers/media/i2c/adv7511-v4l2.c
837
v4l2_dbg(1, debug, sd, "%s: tx raw: tx disabled\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
842
v4l2_dbg(1, debug, sd,
drivers/media/i2c/adv7511-v4l2.c
853
v4l2_dbg(1, debug, sd, "%s: tx raw: retry failed\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
859
nack_cnt = adv7511_cec_read(sd, 0x14) & 0xf;
drivers/media/i2c/adv7511-v4l2.c
862
low_drive_cnt = adv7511_cec_read(sd, 0x14) >> 4;
drivers/media/i2c/adv7511-v4l2.c
870
v4l2_dbg(1, debug, sd, "%s: tx raw: ready ok\n", __func__);
drivers/media/i2c/adv7511-v4l2.c
884
static void adv7511_set_isr(struct v4l2_subdev *sd, bool enable)
drivers/media/i2c/adv7511-v4l2.c
886
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
891
v4l2_dbg(2, debug, sd, "%s: %s\n", __func__, enable ? "enable" : "disable");
drivers/media/i2c/adv7511-v4l2.c
901
else if (adv7511_have_hotplug(sd))
drivers/media/i2c/adv7511-v4l2.c
913
adv7511_wr(sd, 0x94, irqs);
drivers/media/i2c/adv7511-v4l2.c
914
irqs_rd = adv7511_rd(sd, 0x94);
drivers/media/i2c/adv7511-v4l2.c
918
v4l2_err(sd, "Could not set interrupts: hw failure?\n");
drivers/media/i2c/adv7511-v4l2.c
920
adv7511_wr_and_or(sd, 0x95, 0xc0,
drivers/media/i2c/adv7511-v4l2.c
925
static int adv7511_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
drivers/media/i2c/adv7511-v4l2.c
931
adv7511_set_isr(sd, false);
drivers/media/i2c/adv7511-v4l2.c
932
irq_status = adv7511_rd(sd, 0x96);
drivers/media/i2c/adv7511-v4l2.c
933
cec_irq = adv7511_rd(sd, 0x97);
drivers/media/i2c/adv7511-v4l2.c
935
adv7511_wr(sd, 0x96, irq_status);
drivers/media/i2c/adv7511-v4l2.c
936
adv7511_wr(sd, 0x97, cec_irq);
drivers/media/i2c/adv7511-v4l2.c
938
v4l2_dbg(1, debug, sd, "%s: irq 0x%x, cec-irq 0x%x\n", __func__,
drivers/media/i2c/adv7511-v4l2.c
942
adv7511_check_monitor_present_status(sd);
drivers/media/i2c/adv7511-v4l2.c
944
adv7511_check_edid_status(sd);
drivers/media/i2c/adv7511-v4l2.c
948
adv_cec_tx_raw_status(sd, cec_irq);
drivers/media/i2c/adv7511-v4l2.c
951
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7511-v4l2.c
954
msg.len = adv7511_cec_read(sd, 0x25) & 0x1f;
drivers/media/i2c/adv7511-v4l2.c
956
v4l2_dbg(1, debug, sd, "%s: cec msg len %d\n", __func__,
drivers/media/i2c/adv7511-v4l2.c
966
msg.msg[i] = adv7511_cec_read(sd, i + 0x15);
drivers/media/i2c/adv7511-v4l2.c
968
adv7511_cec_write(sd, 0x4a, 0); /* toggle to re-enable rx 1 */
drivers/media/i2c/adv7511-v4l2.c
969
adv7511_cec_write(sd, 0x4a, 1);
drivers/media/i2c/adv7511-v4l2.c
976
adv7511_set_isr(sd, true);
drivers/media/i2c/adv7511-v4l2.c
996
static int adv7511_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/adv7511-v4l2.c
998
struct adv7511_state *state = get_adv7511_state(sd);
drivers/media/i2c/adv7604.c
1013
v4l2_dbg(2, debug, sd, "%s\n", __func__);
drivers/media/i2c/adv7604.c
1015
if (is_analog_input(sd)) {
drivers/media/i2c/adv7604.c
1017
io_write(sd, 0x00, 0x07); /* video std */
drivers/media/i2c/adv7604.c
1018
io_write(sd, 0x01, 0x02); /* prim mode */
drivers/media/i2c/adv7604.c
1020
cp_write_clr_set(sd, 0x81, 0x10, 0x10);
drivers/media/i2c/adv7604.c
1027
v4l2_err(sd, "writing to reg 0x16 and 0x17 failed\n");
drivers/media/i2c/adv7604.c
1030
cp_write(sd, 0xa2, (cp_start_sav >> 4) & 0xff);
drivers/media/i2c/adv7604.c
1031
cp_write(sd, 0xa3, ((cp_start_sav & 0x0f) << 4) |
drivers/media/i2c/adv7604.c
1033
cp_write(sd, 0xa4, cp_start_eav & 0xff);
drivers/media/i2c/adv7604.c
1036
cp_write(sd, 0xa5, (cp_start_vbi >> 4) & 0xff);
drivers/media/i2c/adv7604.c
1037
cp_write(sd, 0xa6, ((cp_start_vbi & 0xf) << 4) |
drivers/media/i2c/adv7604.c
1039
cp_write(sd, 0xa7, cp_end_vbi & 0xff);
drivers/media/i2c/adv7604.c
1040
} else if (is_digital_input(sd)) {
drivers/media/i2c/adv7604.c
1043
io_write(sd, 0x00, 0x02); /* video std */
drivers/media/i2c/adv7604.c
1044
io_write(sd, 0x01, 0x06); /* prim mode */
drivers/media/i2c/adv7604.c
1046
v4l2_dbg(2, debug, sd, "%s: Unknown port %d selected\n",
drivers/media/i2c/adv7604.c
1050
cp_write(sd, 0x8f, (ch1_fr_ll >> 8) & 0x7);
drivers/media/i2c/adv7604.c
1051
cp_write(sd, 0x90, ch1_fr_ll & 0xff);
drivers/media/i2c/adv7604.c
1052
cp_write(sd, 0xab, (height >> 4) & 0xff);
drivers/media/i2c/adv7604.c
1053
cp_write(sd, 0xac, (height & 0x0f) << 4);
drivers/media/i2c/adv7604.c
1056
static void adv76xx_set_offset(struct v4l2_subdev *sd, bool auto_offset, u16 offset_a, u16 offset_b, u16 offset_c)
drivers/media/i2c/adv7604.c
1058
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1067
v4l2_dbg(2, debug, sd, "%s: %s offset: a = 0x%x, b = 0x%x, c = 0x%x\n",
drivers/media/i2c/adv7604.c
1071
offset_buf[0] = (cp_read(sd, 0x77) & 0xc0) | ((offset_a & 0x3f0) >> 4);
drivers/media/i2c/adv7604.c
1079
v4l2_err(sd, "%s: i2c error writing to CP reg 0x77, 0x78, 0x79, 0x7a\n", __func__);
drivers/media/i2c/adv7604.c
1082
static void adv76xx_set_gain(struct v4l2_subdev *sd, bool auto_gain, u16 gain_a, u16 gain_b, u16 gain_c)
drivers/media/i2c/adv7604.c
1084
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1097
v4l2_dbg(2, debug, sd, "%s: %s gain: a = 0x%x, b = 0x%x, c = 0x%x\n",
drivers/media/i2c/adv7604.c
1109
v4l2_err(sd, "%s: i2c error writing to CP reg 0x73, 0x74, 0x75, 0x76\n", __func__);
drivers/media/i2c/adv7604.c
1112
static void set_rgb_quantization_range(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
1114
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1115
bool rgb_output = io_read(sd, 0x02) & 0x02;
drivers/media/i2c/adv7604.c
1116
bool hdmi_signal = hdmi_read(sd, 0x05) & 0x80;
drivers/media/i2c/adv7604.c
1119
if (hdmi_signal && (io_read(sd, 0x60) & 1))
drivers/media/i2c/adv7604.c
1120
y = infoframe_read(sd, 0x01) >> 5;
drivers/media/i2c/adv7604.c
1122
v4l2_dbg(2, debug, sd, "%s: RGB quantization range: %d, RGB out: %d, HDMI: %d\n",
drivers/media/i2c/adv7604.c
1126
adv76xx_set_gain(sd, true, 0x0, 0x0, 0x0);
drivers/media/i2c/adv7604.c
1127
adv76xx_set_offset(sd, true, 0x0, 0x0, 0x0);
drivers/media/i2c/adv7604.c
1128
io_write_clr_set(sd, 0x02, 0x04, rgb_output ? 0 : 4);
drivers/media/i2c/adv7604.c
1135
io_write_clr_set(sd, 0x02, 0xf0, 0x10);
drivers/media/i2c/adv7604.c
1142
io_write_clr_set(sd, 0x02, 0xf0, 0xf0);
drivers/media/i2c/adv7604.c
1149
io_write_clr_set(sd, 0x02, 0xf0, 0xf0);
drivers/media/i2c/adv7604.c
1158
io_write_clr_set(sd, 0x02, 0xf0, 0x00);
drivers/media/i2c/adv7604.c
1161
io_write_clr_set(sd, 0x02, 0xf0, 0x10);
drivers/media/i2c/adv7604.c
1163
if (is_digital_input(sd) && rgb_output) {
drivers/media/i2c/adv7604.c
1164
adv76xx_set_offset(sd, false, 0x40, 0x40, 0x40);
drivers/media/i2c/adv7604.c
1166
adv76xx_set_gain(sd, false, 0xe0, 0xe0, 0xe0);
drivers/media/i2c/adv7604.c
1167
adv76xx_set_offset(sd, false, 0x70, 0x70, 0x70);
drivers/media/i2c/adv7604.c
1174
io_write_clr_set(sd, 0x02, 0xf0, 0x20);
drivers/media/i2c/adv7604.c
1182
io_write_clr_set(sd, 0x02, 0xf0, 0x00);
drivers/media/i2c/adv7604.c
1188
io_write_clr_set(sd, 0x02, 0xf0, 0x60);
drivers/media/i2c/adv7604.c
1196
io_write_clr_set(sd, 0x02, 0xf0, 0x10);
drivers/media/i2c/adv7604.c
1198
if (is_analog_input(sd) || hdmi_signal)
drivers/media/i2c/adv7604.c
1203
adv76xx_set_offset(sd, false, 0x40, 0x40, 0x40);
drivers/media/i2c/adv7604.c
1205
adv76xx_set_gain(sd, false, 0xe0, 0xe0, 0xe0);
drivers/media/i2c/adv7604.c
1206
adv76xx_set_offset(sd, false, 0x70, 0x70, 0x70);
drivers/media/i2c/adv7604.c
1214
struct v4l2_subdev *sd =
drivers/media/i2c/adv7604.c
1215
&container_of(ctrl->handler, struct adv76xx_state, hdl)->sd;
drivers/media/i2c/adv7604.c
1217
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1221
cp_write(sd, 0x3c, ctrl->val);
drivers/media/i2c/adv7604.c
1224
cp_write(sd, 0x3a, ctrl->val);
drivers/media/i2c/adv7604.c
1227
cp_write(sd, 0x3b, ctrl->val);
drivers/media/i2c/adv7604.c
1230
cp_write(sd, 0x3d, ctrl->val);
drivers/media/i2c/adv7604.c
1234
set_rgb_quantization_range(sd);
drivers/media/i2c/adv7604.c
1243
afe_write(sd, 0xc8, ctrl->val);
drivers/media/i2c/adv7604.c
1248
cp_write_clr_set(sd, 0xbf, 0x04, ctrl->val << 2);
drivers/media/i2c/adv7604.c
1251
cp_write(sd, 0xc0, (ctrl->val & 0xff0000) >> 16);
drivers/media/i2c/adv7604.c
1252
cp_write(sd, 0xc1, (ctrl->val & 0x00ff00) >> 8);
drivers/media/i2c/adv7604.c
1253
cp_write(sd, 0xc2, (u8)(ctrl->val & 0x0000ff));
drivers/media/i2c/adv7604.c
1261
struct v4l2_subdev *sd =
drivers/media/i2c/adv7604.c
1262
&container_of(ctrl->handler, struct adv76xx_state, hdl)->sd;
drivers/media/i2c/adv7604.c
1266
if ((io_read(sd, 0x60) & 1) && (infoframe_read(sd, 0x03) & 0x80))
drivers/media/i2c/adv7604.c
1267
ctrl->val = (infoframe_read(sd, 0x05) >> 4) & 3;
drivers/media/i2c/adv7604.c
1275
static inline bool no_power(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
1278
return io_read(sd, 0x0c) & 0x24;
drivers/media/i2c/adv7604.c
1281
static inline bool no_signal_tmds(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
1283
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1285
return !(io_read(sd, 0x6a) & (0x10 >> state->selected_input));
drivers/media/i2c/adv7604.c
1288
static inline bool no_lock_tmds(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
1290
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1293
return (io_read(sd, 0x6a) & info->tdms_lock_mask) != info->tdms_lock_mask;
drivers/media/i2c/adv7604.c
1296
static inline bool is_hdmi(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
1298
return hdmi_read(sd, 0x05) & 0x80;
drivers/media/i2c/adv7604.c
1301
static inline bool no_lock_sspd(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
1303
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1313
return ((cp_read(sd, 0xb5) & 0xd0) != 0xd0);
drivers/media/i2c/adv7604.c
1316
static inline bool no_lock_stdi(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
1319
return !(cp_read(sd, 0xb1) & 0x80);
drivers/media/i2c/adv7604.c
1322
static inline bool no_signal(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
1326
ret = no_power(sd);
drivers/media/i2c/adv7604.c
1328
ret |= no_lock_stdi(sd);
drivers/media/i2c/adv7604.c
1329
ret |= no_lock_sspd(sd);
drivers/media/i2c/adv7604.c
133
void (*set_termination)(struct v4l2_subdev *sd, bool enable);
drivers/media/i2c/adv7604.c
1331
if (is_digital_input(sd)) {
drivers/media/i2c/adv7604.c
1332
ret |= no_lock_tmds(sd);
drivers/media/i2c/adv7604.c
1333
ret |= no_signal_tmds(sd);
drivers/media/i2c/adv7604.c
1339
static inline bool no_lock_cp(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
134
void (*setup_irqs)(struct v4l2_subdev *sd);
drivers/media/i2c/adv7604.c
1341
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1348
return io_read(sd, 0x12) & 0x01;
drivers/media/i2c/adv7604.c
135
unsigned int (*read_hdmi_pixelclock)(struct v4l2_subdev *sd);
drivers/media/i2c/adv7604.c
1351
static inline bool in_free_run(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
1353
return cp_read(sd, 0xff) & 0x10;
drivers/media/i2c/adv7604.c
1356
static int adv76xx_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/adv7604.c
1359
*status |= no_power(sd) ? V4L2_IN_ST_NO_POWER : 0;
drivers/media/i2c/adv7604.c
136
unsigned int (*read_cable_det)(struct v4l2_subdev *sd);
drivers/media/i2c/adv7604.c
1360
*status |= no_signal(sd) ? V4L2_IN_ST_NO_SIGNAL : 0;
drivers/media/i2c/adv7604.c
1361
if (!in_free_run(sd) && no_lock_cp(sd))
drivers/media/i2c/adv7604.c
1362
*status |= is_digital_input(sd) ?
drivers/media/i2c/adv7604.c
1365
v4l2_dbg(1, debug, sd, "%s: status = 0x%x\n", __func__, *status);
drivers/media/i2c/adv7604.c
1378
static int stdi2dv_timings(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
1382
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1391
adv76xx_get_dv_timings_cap(sd, -1),
drivers/media/i2c/adv7604.c
1411
false, adv76xx_get_dv_timings_cap(sd, -1), timings))
drivers/media/i2c/adv7604.c
1417
adv76xx_get_dv_timings_cap(sd, -1), timings))
drivers/media/i2c/adv7604.c
1420
v4l2_dbg(2, debug, sd,
drivers/media/i2c/adv7604.c
1428
static int read_stdi(struct v4l2_subdev *sd, struct stdi_readback *stdi)
drivers/media/i2c/adv7604.c
1430
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1434
if (no_lock_stdi(sd) || no_lock_sspd(sd)) {
drivers/media/i2c/adv7604.c
1435
v4l2_dbg(2, debug, sd, "%s: STDI and/or SSPD not locked\n", __func__);
drivers/media/i2c/adv7604.c
1440
stdi->bl = cp_read16(sd, 0xb1, 0x3fff);
drivers/media/i2c/adv7604.c
1441
stdi->lcf = cp_read16(sd, info->lcf_reg, 0x7ff);
drivers/media/i2c/adv7604.c
1442
stdi->lcvs = cp_read(sd, 0xb3) >> 3;
drivers/media/i2c/adv7604.c
1443
stdi->interlaced = io_read(sd, 0x12) & 0x10;
drivers/media/i2c/adv7604.c
1447
polarity = cp_read(sd, 0xb5);
drivers/media/i2c/adv7604.c
1458
polarity = hdmi_read(sd, 0x05);
drivers/media/i2c/adv7604.c
1463
if (no_lock_stdi(sd) || no_lock_sspd(sd)) {
drivers/media/i2c/adv7604.c
1464
v4l2_dbg(2, debug, sd,
drivers/media/i2c/adv7604.c
1470
v4l2_dbg(2, debug, sd, "%s: invalid signal\n", __func__);
drivers/media/i2c/adv7604.c
1475
v4l2_dbg(2, debug, sd,
drivers/media/i2c/adv7604.c
1484
static int adv76xx_enum_dv_timings(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
1487
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1493
adv76xx_get_dv_timings_cap(sd, timings->pad),
drivers/media/i2c/adv7604.c
1497
static int adv76xx_dv_timings_cap(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
1500
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1506
*cap = *adv76xx_get_dv_timings_cap(sd, pad);
drivers/media/i2c/adv7604.c
1514
static void adv76xx_fill_optional_dv_timings_fields(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
1517
v4l2_find_dv_timings_cap(timings, adv76xx_get_dv_timings_cap(sd, -1),
drivers/media/i2c/adv7604.c
1518
is_digital_input(sd) ? 250000 : 1000000,
drivers/media/i2c/adv7604.c
1522
static unsigned int adv7604_read_hdmi_pixelclock(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
1526
a = hdmi_read(sd, 0x06);
drivers/media/i2c/adv7604.c
1527
b = hdmi_read(sd, 0x3b);
drivers/media/i2c/adv7604.c
1534
static unsigned int adv7611_read_hdmi_pixelclock(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
1538
a = hdmi_read(sd, 0x51);
drivers/media/i2c/adv7604.c
1539
b = hdmi_read(sd, 0x52);
drivers/media/i2c/adv7604.c
1546
static unsigned int adv76xx_read_hdmi_pixelclock(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
1548
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1552
freq = info->read_hdmi_pixelclock(sd);
drivers/media/i2c/adv7604.c
1553
if (is_hdmi(sd)) {
drivers/media/i2c/adv7604.c
1555
bits_per_channel = ((hdmi_read(sd, 0x0b) & 0x60) >> 4) + 8;
drivers/media/i2c/adv7604.c
1556
pixelrepetition = (hdmi_read(sd, 0x05) & 0x0f) + 1;
drivers/media/i2c/adv7604.c
1564
static int adv76xx_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/adv7604.c
1567
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1577
if (no_signal(sd)) {
drivers/media/i2c/adv7604.c
1579
v4l2_dbg(1, debug, sd, "%s: no valid signal\n", __func__);
drivers/media/i2c/adv7604.c
1584
if (read_stdi(sd, &stdi)) {
drivers/media/i2c/adv7604.c
1585
v4l2_dbg(1, debug, sd, "%s: STDI/SSPD not locked\n", __func__);
drivers/media/i2c/adv7604.c
1591
if (is_digital_input(sd)) {
drivers/media/i2c/adv7604.c
1592
bool hdmi_signal = hdmi_read(sd, 0x05) & 0x80;
drivers/media/i2c/adv7604.c
1596
w = hdmi_read16(sd, 0x07, info->linewidth_mask);
drivers/media/i2c/adv7604.c
1597
h = hdmi_read16(sd, 0x09, info->field0_height_mask);
drivers/media/i2c/adv7604.c
1599
if (hdmi_signal && (io_read(sd, 0x60) & 1))
drivers/media/i2c/adv7604.c
1600
vic = infoframe_read(sd, 0x04);
drivers/media/i2c/adv7604.c
1610
bt->pixelclock = adv76xx_read_hdmi_pixelclock(sd);
drivers/media/i2c/adv7604.c
1611
bt->hfrontporch = hdmi_read16(sd, 0x20, info->hfrontporch_mask);
drivers/media/i2c/adv7604.c
1612
bt->hsync = hdmi_read16(sd, 0x22, info->hsync_mask);
drivers/media/i2c/adv7604.c
1613
bt->hbackporch = hdmi_read16(sd, 0x24, info->hbackporch_mask);
drivers/media/i2c/adv7604.c
1614
bt->vfrontporch = hdmi_read16(sd, 0x2a,
drivers/media/i2c/adv7604.c
1616
bt->vsync = hdmi_read16(sd, 0x2e, info->field0_vsync_mask) / 2;
drivers/media/i2c/adv7604.c
1617
bt->vbackporch = hdmi_read16(sd, 0x32,
drivers/media/i2c/adv7604.c
1619
bt->polarities = ((hdmi_read(sd, 0x05) & 0x10) ? V4L2_DV_VSYNC_POS_POL : 0) |
drivers/media/i2c/adv7604.c
1620
((hdmi_read(sd, 0x05) & 0x20) ? V4L2_DV_HSYNC_POS_POL : 0);
drivers/media/i2c/adv7604.c
1622
bt->height += hdmi_read16(sd, 0x0b,
drivers/media/i2c/adv7604.c
1624
bt->il_vfrontporch = hdmi_read16(sd, 0x2c,
drivers/media/i2c/adv7604.c
1626
bt->il_vsync = hdmi_read16(sd, 0x30,
drivers/media/i2c/adv7604.c
1628
bt->il_vbackporch = hdmi_read16(sd, 0x34,
drivers/media/i2c/adv7604.c
1631
adv76xx_fill_optional_dv_timings_fields(sd, timings);
drivers/media/i2c/adv7604.c
1637
if (!stdi2dv_timings(sd, &stdi, timings))
drivers/media/i2c/adv7604.c
1640
v4l2_dbg(1, debug, sd, "%s: lcvs + 1 = %d\n", __func__, stdi.lcvs);
drivers/media/i2c/adv7604.c
1641
if (!stdi2dv_timings(sd, &stdi, timings))
drivers/media/i2c/adv7604.c
1644
v4l2_dbg(1, debug, sd, "%s: lcvs - 1 = %d\n", __func__, stdi.lcvs);
drivers/media/i2c/adv7604.c
1645
if (stdi2dv_timings(sd, &stdi, timings)) {
drivers/media/i2c/adv7604.c
1656
v4l2_dbg(1, debug, sd, "%s: restart STDI\n", __func__);
drivers/media/i2c/adv7604.c
1659
cp_write_clr_set(sd, 0x86, 0x06, 0x00);
drivers/media/i2c/adv7604.c
1661
cp_write_clr_set(sd, 0x86, 0x06, 0x04);
drivers/media/i2c/adv7604.c
1663
cp_write_clr_set(sd, 0x86, 0x06, 0x02);
drivers/media/i2c/adv7604.c
1667
v4l2_dbg(1, debug, sd, "%s: format not supported\n", __func__);
drivers/media/i2c/adv7604.c
1674
if (no_signal(sd)) {
drivers/media/i2c/adv7604.c
1675
v4l2_dbg(1, debug, sd, "%s: signal lost during readout\n", __func__);
drivers/media/i2c/adv7604.c
1680
if ((is_analog_input(sd) && bt->pixelclock > 170000000) ||
drivers/media/i2c/adv7604.c
1681
(is_digital_input(sd) && bt->pixelclock > 225000000)) {
drivers/media/i2c/adv7604.c
1682
v4l2_dbg(1, debug, sd, "%s: pixelclock out of range %d\n",
drivers/media/i2c/adv7604.c
1688
v4l2_print_dv_timings(sd->name, "adv76xx_query_dv_timings: ",
drivers/media/i2c/adv7604.c
1694
static int adv76xx_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/adv7604.c
1697
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1705
v4l2_dbg(1, debug, sd, "%s: no change\n", __func__);
drivers/media/i2c/adv7604.c
1711
if (!v4l2_valid_dv_timings(timings, adv76xx_get_dv_timings_cap(sd, -1),
drivers/media/i2c/adv7604.c
1715
adv76xx_fill_optional_dv_timings_fields(sd, timings);
drivers/media/i2c/adv7604.c
1719
cp_write_clr_set(sd, 0x91, 0x40, bt->interlaced ? 0x40 : 0x00);
drivers/media/i2c/adv7604.c
1722
err = configure_predefined_video_timings(sd, timings);
drivers/media/i2c/adv7604.c
1726
configure_custom_video_timings(sd, bt);
drivers/media/i2c/adv7604.c
1729
set_rgb_quantization_range(sd);
drivers/media/i2c/adv7604.c
1732
v4l2_print_dv_timings(sd->name, "adv76xx_s_dv_timings: ",
drivers/media/i2c/adv7604.c
1737
static int adv76xx_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/adv7604.c
174
struct v4l2_subdev sd;
drivers/media/i2c/adv7604.c
1740
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1746
static void adv7604_set_termination(struct v4l2_subdev *sd, bool enable)
drivers/media/i2c/adv7604.c
1748
hdmi_write(sd, 0x01, enable ? 0x00 : 0x78);
drivers/media/i2c/adv7604.c
1751
static void adv7611_set_termination(struct v4l2_subdev *sd, bool enable)
drivers/media/i2c/adv7604.c
1753
hdmi_write(sd, 0x83, enable ? 0xfe : 0xff);
drivers/media/i2c/adv7604.c
1756
static void enable_input(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
1758
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1760
if (is_analog_input(sd)) {
drivers/media/i2c/adv7604.c
1761
io_write(sd, 0x15, 0xb0); /* Disable Tristate of Pins (no audio) */
drivers/media/i2c/adv7604.c
1762
} else if (is_digital_input(sd)) {
drivers/media/i2c/adv7604.c
1763
hdmi_write_clr_set(sd, 0x00, 0x03, state->selected_input);
drivers/media/i2c/adv7604.c
1764
state->info->set_termination(sd, true);
drivers/media/i2c/adv7604.c
1765
io_write(sd, 0x15, 0xa0); /* Disable Tristate of Pins */
drivers/media/i2c/adv7604.c
1766
hdmi_write_clr_set(sd, 0x1a, 0x10, 0x00); /* Unmute audio */
drivers/media/i2c/adv7604.c
1768
v4l2_dbg(2, debug, sd, "%s: Unknown port %d selected\n",
drivers/media/i2c/adv7604.c
1773
static void disable_input(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
1775
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1777
hdmi_write_clr_set(sd, 0x1a, 0x10, 0x10); /* Mute audio */
drivers/media/i2c/adv7604.c
1779
io_write(sd, 0x15, 0xbe); /* Tristate all outputs from video core */
drivers/media/i2c/adv7604.c
1780
state->info->set_termination(sd, false);
drivers/media/i2c/adv7604.c
1783
static void select_input(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
1785
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1788
if (is_analog_input(sd)) {
drivers/media/i2c/adv7604.c
1789
adv76xx_write_reg_seq(sd, info->recommended_settings[0]);
drivers/media/i2c/adv7604.c
1791
afe_write(sd, 0x00, 0x08); /* power up ADC */
drivers/media/i2c/adv7604.c
1792
afe_write(sd, 0x01, 0x06); /* power up Analog Front End */
drivers/media/i2c/adv7604.c
1793
afe_write(sd, 0xc8, 0x00); /* phase control */
drivers/media/i2c/adv7604.c
1794
} else if (is_digital_input(sd)) {
drivers/media/i2c/adv7604.c
1795
hdmi_write(sd, 0x00, state->selected_input & 0x03);
drivers/media/i2c/adv7604.c
1797
adv76xx_write_reg_seq(sd, info->recommended_settings[1]);
drivers/media/i2c/adv7604.c
1800
afe_write(sd, 0x00, 0xff); /* power down ADC */
drivers/media/i2c/adv7604.c
1801
afe_write(sd, 0x01, 0xfe); /* power down Analog Front End */
drivers/media/i2c/adv7604.c
1802
afe_write(sd, 0xc8, 0x40); /* phase control */
drivers/media/i2c/adv7604.c
1805
cp_write(sd, 0x3e, 0x00); /* CP core pre-gain control */
drivers/media/i2c/adv7604.c
1806
cp_write(sd, 0xc3, 0x39); /* CP coast control. Graphics mode */
drivers/media/i2c/adv7604.c
1807
cp_write(sd, 0x40, 0x80); /* CP core pre-gain control. Graphics mode */
drivers/media/i2c/adv7604.c
1809
v4l2_dbg(2, debug, sd, "%s: Unknown port %d selected\n",
drivers/media/i2c/adv7604.c
1814
cp_write_clr_set(sd, 0x3e, 0x80, 0x80);
drivers/media/i2c/adv7604.c
1817
static int adv76xx_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
1820
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1822
v4l2_dbg(2, debug, sd, "%s: input %d, selected input %d",
drivers/media/i2c/adv7604.c
1833
disable_input(sd);
drivers/media/i2c/adv7604.c
1834
select_input(sd);
drivers/media/i2c/adv7604.c
1835
enable_input(sd);
drivers/media/i2c/adv7604.c
1837
v4l2_subdev_notify_event(sd, &adv76xx_ev_fmt);
drivers/media/i2c/adv7604.c
1842
static int adv76xx_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
1846
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1910
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/adv7604.c
1912
io_write_clr_set(sd, 0x02, 0x02,
drivers/media/i2c/adv7604.c
1914
io_write(sd, 0x03, state->format->op_format_sel |
drivers/media/i2c/adv7604.c
1916
io_write_clr_set(sd, 0x04, 0xe0, adv76xx_op_ch_sel(state));
drivers/media/i2c/adv7604.c
1917
io_write_clr_set(sd, 0x05, 0x01,
drivers/media/i2c/adv7604.c
1919
set_rgb_quantization_range(sd);
drivers/media/i2c/adv7604.c
1922
static int adv76xx_get_format(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
1926
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1945
static int adv76xx_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
1949
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1965
static int adv76xx_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
1969
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
1996
static void adv76xx_cec_tx_raw_status(struct v4l2_subdev *sd, u8 tx_raw_status)
drivers/media/i2c/adv7604.c
1998
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
2000
if ((cec_read(sd, 0x11) & 0x01) == 0) {
drivers/media/i2c/adv7604.c
2001
v4l2_dbg(1, debug, sd, "%s: tx raw: tx disabled\n", __func__);
drivers/media/i2c/adv7604.c
2006
v4l2_dbg(1, debug, sd, "%s: tx raw: arbitration lost\n",
drivers/media/i2c/adv7604.c
2017
v4l2_dbg(1, debug, sd, "%s: tx raw: retry failed\n", __func__);
drivers/media/i2c/adv7604.c
2023
nack_cnt = cec_read(sd, 0x14) & 0xf;
drivers/media/i2c/adv7604.c
2026
low_drive_cnt = cec_read(sd, 0x14) >> 4;
drivers/media/i2c/adv7604.c
2034
v4l2_dbg(1, debug, sd, "%s: tx raw: ready ok\n", __func__);
drivers/media/i2c/adv7604.c
2040
static void adv76xx_cec_isr(struct v4l2_subdev *sd, bool *handled)
drivers/media/i2c/adv7604.c
2042
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
2047
cec_irq = io_read(sd, info->cec_irq_status) & 0x0f;
drivers/media/i2c/adv7604.c
2051
v4l2_dbg(1, debug, sd, "%s: cec: irq 0x%x\n", __func__, cec_irq);
drivers/media/i2c/adv7604.c
2052
adv76xx_cec_tx_raw_status(sd, cec_irq);
drivers/media/i2c/adv7604.c
2056
msg.len = cec_read(sd, 0x25) & 0x1f;
drivers/media/i2c/adv7604.c
2064
msg.msg[i] = cec_read(sd, i + 0x15);
drivers/media/i2c/adv7604.c
2065
cec_write(sd, info->cec_rx_enable,
drivers/media/i2c/adv7604.c
2079
io_write(sd, info->cec_irq_status + 1, cec_irq);
drivers/media/i2c/adv7604.c
2089
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/adv7604.c
2092
cec_write_clr_set(sd, 0x2a, 0x01, 0x01); /* power up cec */
drivers/media/i2c/adv7604.c
2093
cec_write(sd, 0x2c, 0x01); /* cec soft reset */
drivers/media/i2c/adv7604.c
2094
cec_write_clr_set(sd, 0x11, 0x01, 0); /* initially disable tx */
drivers/media/i2c/adv7604.c
2100
io_write_clr_set(sd, info->cec_irq_status + 3, 0x0f, 0x0f);
drivers/media/i2c/adv7604.c
2101
cec_write(sd, info->cec_rx_enable, info->cec_rx_enable_mask);
drivers/media/i2c/adv7604.c
2104
io_write_clr_set(sd, info->cec_irq_status + 3, 0x0f, 0x00);
drivers/media/i2c/adv7604.c
2106
cec_write_clr_set(sd, 0x27, 0x70, 0x00);
drivers/media/i2c/adv7604.c
2108
cec_write_clr_set(sd, 0x2a, 0x01, 0x00);
drivers/media/i2c/adv7604.c
2112
adv76xx_s_detect_tx_5v_ctrl(sd);
drivers/media/i2c/adv7604.c
2119
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/adv7604.c
2126
cec_write_clr_set(sd, 0x27, 0x70, 0);
drivers/media/i2c/adv7604.c
2150
cec_write_clr_set(sd, 0x27, 0x10, 0x10);
drivers/media/i2c/adv7604.c
2152
cec_write_clr_set(sd, 0x28, 0x0f, addr);
drivers/media/i2c/adv7604.c
2156
cec_write_clr_set(sd, 0x27, 0x20, 0x20);
drivers/media/i2c/adv7604.c
2158
cec_write_clr_set(sd, 0x28, 0xf0, addr << 4);
drivers/media/i2c/adv7604.c
2162
cec_write_clr_set(sd, 0x27, 0x40, 0x40);
drivers/media/i2c/adv7604.c
2164
cec_write_clr_set(sd, 0x29, 0x0f, addr);
drivers/media/i2c/adv7604.c
2174
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/adv7604.c
2183
cec_write_clr_set(sd, 0x12, 0x70, max(1, attempts - 1) << 4);
drivers/media/i2c/adv7604.c
2186
v4l2_err(sd, "%s: len exceeded 16 (%d)\n", __func__, len);
drivers/media/i2c/adv7604.c
2192
cec_write(sd, i, msg->msg[i]);
drivers/media/i2c/adv7604.c
2195
cec_write(sd, 0x10, len);
drivers/media/i2c/adv7604.c
2197
cec_write(sd, 0x11, 0x01);
drivers/media/i2c/adv7604.c
2208
static int adv76xx_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
drivers/media/i2c/adv7604.c
2210
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
2212
const u8 irq_reg_0x43 = io_read(sd, 0x43);
drivers/media/i2c/adv7604.c
2213
const u8 irq_reg_0x6b = io_read(sd, 0x6b);
drivers/media/i2c/adv7604.c
2214
const u8 irq_reg_0x70 = io_read(sd, 0x70);
drivers/media/i2c/adv7604.c
2220
io_write(sd, 0x44, irq_reg_0x43);
drivers/media/i2c/adv7604.c
2222
io_write(sd, 0x71, irq_reg_0x70);
drivers/media/i2c/adv7604.c
2224
io_write(sd, 0x6c, irq_reg_0x6b);
drivers/media/i2c/adv7604.c
2226
v4l2_dbg(2, debug, sd, "%s: ", __func__);
drivers/media/i2c/adv7604.c
2230
fmt_change_digital = is_digital_input(sd)
drivers/media/i2c/adv7604.c
2235
v4l2_dbg(1, debug, sd,
drivers/media/i2c/adv7604.c
2239
v4l2_subdev_notify_event(sd, &adv76xx_ev_fmt);
drivers/media/i2c/adv7604.c
2246
v4l2_dbg(1, debug, sd, "%s: irq %s mode\n", __func__,
drivers/media/i2c/adv7604.c
2247
(io_read(sd, 0x6a) & 0x01) ? "HDMI" : "DVI");
drivers/media/i2c/adv7604.c
2248
set_rgb_quantization_range(sd);
drivers/media/i2c/adv7604.c
2255
adv76xx_cec_isr(sd, handled);
drivers/media/i2c/adv7604.c
2261
v4l2_dbg(1, debug, sd, "%s: tx_5v: 0x%x\n", __func__, tx_5v);
drivers/media/i2c/adv7604.c
2262
adv76xx_s_detect_tx_5v_ctrl(sd);
drivers/media/i2c/adv7604.c
2274
adv76xx_isr(&state->sd, 0, &handled);
drivers/media/i2c/adv7604.c
2279
static int adv76xx_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
drivers/media/i2c/adv7604.c
2281
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
2317
static int adv76xx_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
drivers/media/i2c/adv7604.c
2319
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
2336
rep_write_clr_set(sd, info->edid_enable_reg, 0x0f, state->edid.present);
drivers/media/i2c/adv7604.c
2347
v4l2_dbg(2, debug, sd, "%s: clear EDID pad %d, edid.present = 0x%x\n",
drivers/media/i2c/adv7604.c
2370
v4l2_dbg(2, debug, sd, "%s: write EDID pad %d, edid.present = 0x%x\n",
drivers/media/i2c/adv7604.c
2376
rep_write_clr_set(sd, info->edid_enable_reg, 0x0f, 0x00);
drivers/media/i2c/adv7604.c
2384
rep_write(sd, info->edid_spa_port_b_reg, pa >> 8);
drivers/media/i2c/adv7604.c
2385
rep_write(sd, info->edid_spa_port_b_reg + 1, pa & 0xff);
drivers/media/i2c/adv7604.c
2388
rep_write(sd, info->edid_spa_port_b_reg + 2, pa >> 8);
drivers/media/i2c/adv7604.c
2389
rep_write(sd, info->edid_spa_port_b_reg + 3, pa & 0xff);
drivers/media/i2c/adv7604.c
2392
rep_write(sd, info->edid_spa_port_b_reg + 4, pa >> 8);
drivers/media/i2c/adv7604.c
2393
rep_write(sd, info->edid_spa_port_b_reg + 5, pa & 0xff);
drivers/media/i2c/adv7604.c
2402
rep_write(sd, info->edid_spa_loc_reg, spa_loc & 0xff);
drivers/media/i2c/adv7604.c
2403
rep_write_clr_set(sd, info->edid_spa_loc_reg + 1,
drivers/media/i2c/adv7604.c
2416
rep_write_clr_set(sd, info->edid_segment_reg,
drivers/media/i2c/adv7604.c
2418
err = edid_write_block(sd, 128 * min(edid->blocks, 2U), state->edid.edid);
drivers/media/i2c/adv7604.c
2420
v4l2_err(sd, "error %d writing edid pad %d\n", err, edid->pad);
drivers/media/i2c/adv7604.c
2424
rep_write_clr_set(sd, info->edid_segment_reg,
drivers/media/i2c/adv7604.c
2427
err = edid_write_block(sd, 128 * (edid->blocks - 2),
drivers/media/i2c/adv7604.c
2430
v4l2_err(sd, "error %d writing edid pad %d\n",
drivers/media/i2c/adv7604.c
2438
rep_write_clr_set(sd, info->edid_enable_reg, 0x0f, state->edid.present);
drivers/media/i2c/adv7604.c
2441
if (rep_read(sd, info->edid_status_reg) & state->edid.present)
drivers/media/i2c/adv7604.c
2446
v4l2_err(sd, "error enabling edid (0x%x)\n", state->edid.present);
drivers/media/i2c/adv7604.c
2465
static int adv76xx_read_infoframe_buf(struct v4l2_subdev *sd, int index,
drivers/media/i2c/adv7604.c
2471
if (!(io_read(sd, 0x60) & adv76xx_cri[index].present_mask)) {
drivers/media/i2c/adv7604.c
2472
v4l2_info(sd, "%s infoframe not received\n",
drivers/media/i2c/adv7604.c
2478
buf[i] = infoframe_read(sd, adv76xx_cri[index].head_addr + i);
drivers/media/i2c/adv7604.c
2483
v4l2_err(sd, "%s: invalid %s infoframe length %d\n", __func__,
drivers/media/i2c/adv7604.c
2489
buf[i + 3] = infoframe_read(sd,
drivers/media/i2c/adv7604.c
2494
static void adv76xx_log_infoframes(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
2498
if (!is_hdmi(sd)) {
drivers/media/i2c/adv7604.c
2499
v4l2_info(sd, "receive DVI-D signal, no infoframes\n");
drivers/media/i2c/adv7604.c
2504
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7604.c
2509
len = adv76xx_read_infoframe_buf(sd, i, buffer);
drivers/media/i2c/adv7604.c
2514
v4l2_err(sd, "%s: unpack of %s infoframe failed\n",
drivers/media/i2c/adv7604.c
2521
static int adv76xx_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
2523
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
2565
v4l2_info(sd, "-----Chip status-----\n");
drivers/media/i2c/adv7604.c
2566
v4l2_info(sd, "Chip power: %s\n", no_power(sd) ? "off" : "on");
drivers/media/i2c/adv7604.c
2567
edid_enabled = rep_read(sd, info->edid_status_reg);
drivers/media/i2c/adv7604.c
2568
v4l2_info(sd, "EDID enabled port A: %s, B: %s, C: %s, D: %s\n",
drivers/media/i2c/adv7604.c
2573
v4l2_info(sd, "CEC: %s\n", state->cec_enabled_adap ?
drivers/media/i2c/adv7604.c
2582
v4l2_info(sd, "CEC Logical Address: 0x%x\n",
drivers/media/i2c/adv7604.c
2587
v4l2_info(sd, "-----Signal status-----\n");
drivers/media/i2c/adv7604.c
2588
cable_det = info->read_cable_det(sd);
drivers/media/i2c/adv7604.c
2589
v4l2_info(sd, "Cable detected (+5V power) port A: %s, B: %s, C: %s, D: %s\n",
drivers/media/i2c/adv7604.c
2594
v4l2_info(sd, "TMDS signal detected: %s\n",
drivers/media/i2c/adv7604.c
2595
no_signal_tmds(sd) ? "false" : "true");
drivers/media/i2c/adv7604.c
2596
v4l2_info(sd, "TMDS signal locked: %s\n",
drivers/media/i2c/adv7604.c
2597
no_lock_tmds(sd) ? "false" : "true");
drivers/media/i2c/adv7604.c
2598
v4l2_info(sd, "SSPD locked: %s\n", no_lock_sspd(sd) ? "false" : "true");
drivers/media/i2c/adv7604.c
2599
v4l2_info(sd, "STDI locked: %s\n", no_lock_stdi(sd) ? "false" : "true");
drivers/media/i2c/adv7604.c
2600
v4l2_info(sd, "CP locked: %s\n", no_lock_cp(sd) ? "false" : "true");
drivers/media/i2c/adv7604.c
2601
v4l2_info(sd, "CP free run: %s\n",
drivers/media/i2c/adv7604.c
2602
(in_free_run(sd)) ? "on" : "off");
drivers/media/i2c/adv7604.c
2603
v4l2_info(sd, "Prim-mode = 0x%x, video std = 0x%x, v_freq = 0x%x\n",
drivers/media/i2c/adv7604.c
2604
io_read(sd, 0x01) & 0x0f, io_read(sd, 0x00) & 0x3f,
drivers/media/i2c/adv7604.c
2605
(io_read(sd, 0x01) & 0x70) >> 4);
drivers/media/i2c/adv7604.c
2607
v4l2_info(sd, "-----Video Timings-----\n");
drivers/media/i2c/adv7604.c
2608
if (read_stdi(sd, &stdi))
drivers/media/i2c/adv7604.c
2609
v4l2_info(sd, "STDI: not locked\n");
drivers/media/i2c/adv7604.c
2611
v4l2_info(sd, "STDI: lcf (frame height - 1) = %d, bl = %d, lcvs (vsync) = %d, %s, %chsync, %cvsync\n",
drivers/media/i2c/adv7604.c
2615
if (adv76xx_query_dv_timings(sd, 0, &timings))
drivers/media/i2c/adv7604.c
2616
v4l2_info(sd, "No video detected\n");
drivers/media/i2c/adv7604.c
2618
v4l2_print_dv_timings(sd->name, "Detected format: ",
drivers/media/i2c/adv7604.c
2620
v4l2_print_dv_timings(sd->name, "Configured format: ",
drivers/media/i2c/adv7604.c
2623
if (no_signal(sd))
drivers/media/i2c/adv7604.c
2626
v4l2_info(sd, "-----Color space-----\n");
drivers/media/i2c/adv7604.c
2627
v4l2_info(sd, "RGB quantization range ctrl: %s\n",
drivers/media/i2c/adv7604.c
2630
ret = io_read(sd, 0x02);
drivers/media/i2c/adv7604.c
2632
v4l2_info(sd, "Can't read Input/Output color space\n");
drivers/media/i2c/adv7604.c
2636
v4l2_info(sd, "Input color space: %s\n",
drivers/media/i2c/adv7604.c
2638
v4l2_info(sd, "Output color space: %s %s, alt-gamma %s\n",
drivers/media/i2c/adv7604.c
2644
v4l2_info(sd, "Color space conversion: %s\n",
drivers/media/i2c/adv7604.c
2645
csc_coeff_sel_rb[cp_read(sd, info->cp_csc) >> 4]);
drivers/media/i2c/adv7604.c
2647
if (!is_digital_input(sd))
drivers/media/i2c/adv7604.c
2650
v4l2_info(sd, "-----%s status-----\n", is_hdmi(sd) ? "HDMI" : "DVI-D");
drivers/media/i2c/adv7604.c
2651
v4l2_info(sd, "Digital video port selected: %c\n",
drivers/media/i2c/adv7604.c
2652
(hdmi_read(sd, 0x00) & 0x03) + 'A');
drivers/media/i2c/adv7604.c
2653
v4l2_info(sd, "HDCP encrypted content: %s\n",
drivers/media/i2c/adv7604.c
2654
(hdmi_read(sd, 0x05) & 0x40) ? "true" : "false");
drivers/media/i2c/adv7604.c
2655
v4l2_info(sd, "HDCP keys read: %s%s\n",
drivers/media/i2c/adv7604.c
2656
(hdmi_read(sd, 0x04) & 0x20) ? "yes" : "no",
drivers/media/i2c/adv7604.c
2657
(hdmi_read(sd, 0x04) & 0x10) ? "ERROR" : "");
drivers/media/i2c/adv7604.c
2658
if (is_hdmi(sd)) {
drivers/media/i2c/adv7604.c
2659
bool audio_pll_locked = hdmi_read(sd, 0x04) & 0x01;
drivers/media/i2c/adv7604.c
2660
bool audio_sample_packet_detect = hdmi_read(sd, 0x18) & 0x01;
drivers/media/i2c/adv7604.c
2661
bool audio_mute = io_read(sd, 0x65) & 0x40;
drivers/media/i2c/adv7604.c
2663
v4l2_info(sd, "Audio: pll %s, samples %s, %s\n",
drivers/media/i2c/adv7604.c
2668
v4l2_info(sd, "Audio format: %s\n",
drivers/media/i2c/adv7604.c
2669
(hdmi_read(sd, 0x07) & 0x20) ? "multi-channel" : "stereo");
drivers/media/i2c/adv7604.c
2671
v4l2_info(sd, "Audio CTS: %u\n", (hdmi_read(sd, 0x5b) << 12) +
drivers/media/i2c/adv7604.c
2672
(hdmi_read(sd, 0x5c) << 8) +
drivers/media/i2c/adv7604.c
2673
(hdmi_read(sd, 0x5d) & 0xf0));
drivers/media/i2c/adv7604.c
2674
v4l2_info(sd, "Audio N: %u\n", ((hdmi_read(sd, 0x5d) & 0x0f) << 16) +
drivers/media/i2c/adv7604.c
2675
(hdmi_read(sd, 0x5e) << 8) +
drivers/media/i2c/adv7604.c
2676
hdmi_read(sd, 0x5f));
drivers/media/i2c/adv7604.c
2677
v4l2_info(sd, "AV Mute: %s\n", (hdmi_read(sd, 0x04) & 0x40) ? "on" : "off");
drivers/media/i2c/adv7604.c
2679
v4l2_info(sd, "Deep color mode: %s\n", deep_color_mode_txt[(hdmi_read(sd, 0x0b) & 0x60) >> 5]);
drivers/media/i2c/adv7604.c
2680
v4l2_info(sd, "HDMI colorspace: %s\n", hdmi_color_space_txt[hdmi_read(sd, 0x53) & 0xf]);
drivers/media/i2c/adv7604.c
2682
adv76xx_log_infoframes(sd);
drivers/media/i2c/adv7604.c
2688
static int adv76xx_subscribe_event(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
2694
return v4l2_src_change_event_subdev_subscribe(sd, fh, sub);
drivers/media/i2c/adv7604.c
2696
return v4l2_ctrl_subdev_subscribe_event(sd, fh, sub);
drivers/media/i2c/adv7604.c
2707
struct v4l2_subdev *sd = priv;
drivers/media/i2c/adv7604.c
2711
if (!is_hdmi(sd))
drivers/media/i2c/adv7604.c
2731
len = adv76xx_read_infoframe_buf(sd, index, buf);
drivers/media/i2c/adv7604.c
2737
static int adv76xx_registered(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
2739
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
2740
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7604.c
2748
state->debugfs_dir = debugfs_create_dir(sd->name, v4l2_debugfs_root());
drivers/media/i2c/adv7604.c
2751
V4L2_DEBUGFS_IF_SPD | V4L2_DEBUGFS_IF_HDMI, sd,
drivers/media/i2c/adv7604.c
2756
static void adv76xx_unregistered(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
2758
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
2873
static int adv76xx_core_init(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
2875
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
2879
hdmi_write(sd, 0x48,
drivers/media/i2c/adv7604.c
2883
disable_input(sd);
drivers/media/i2c/adv7604.c
2888
select_input(sd);
drivers/media/i2c/adv7604.c
2889
enable_input(sd);
drivers/media/i2c/adv7604.c
2893
io_write(sd, 0x0c, 0x42); /* Power up part and power down VDP */
drivers/media/i2c/adv7604.c
2894
io_write(sd, 0x0b, 0x44); /* Power down ESDP block */
drivers/media/i2c/adv7604.c
2895
cp_write(sd, 0xcf, 0x01); /* Power down macrovision */
drivers/media/i2c/adv7604.c
2900
io_write_clr_set(sd, 0x20, 0xc0, 0);
drivers/media/i2c/adv7604.c
2906
hdmi_write_clr_set(sd, 0x6c, 0xf6, 0x26);
drivers/media/i2c/adv7604.c
2910
io_write_clr_set(sd, 0x02, 0x0f, pdata->alt_gamma << 3);
drivers/media/i2c/adv7604.c
2911
io_write_clr_set(sd, 0x05, 0x0e, pdata->blank_data << 3 |
drivers/media/i2c/adv7604.c
2916
cp_write(sd, 0x69, 0x30); /* Enable CP CSC */
drivers/media/i2c/adv7604.c
2919
io_write(sd, 0x06, 0xa0 | pdata->inv_vs_pol << 2 |
drivers/media/i2c/adv7604.c
2923
io_write(sd, 0x14, 0x40 | pdata->dr_str_data << 4 |
drivers/media/i2c/adv7604.c
2927
cp_write(sd, 0xba, (pdata->hdmi_free_run_mode << 1) | 0x01); /* HDMI free run */
drivers/media/i2c/adv7604.c
2928
cp_write(sd, 0xf3, 0xdc); /* Low threshold to enter/exit free run mode */
drivers/media/i2c/adv7604.c
2929
cp_write(sd, 0xf9, 0x23); /* STDI ch. 1 - LCVS change threshold -
drivers/media/i2c/adv7604.c
2931
cp_write(sd, 0x45, 0x23); /* STDI ch. 2 - LCVS change threshold -
drivers/media/i2c/adv7604.c
2933
cp_write(sd, 0xc9, 0x2d); /* use prim_mode and vid_std as free run resolution
drivers/media/i2c/adv7604.c
2937
hdmi_write_clr_set(sd, 0x15, 0x03, 0x03); /* Mute on FIFO over-/underflow [REF_01, c. 1.2.18] */
drivers/media/i2c/adv7604.c
2938
hdmi_write_clr_set(sd, 0x1a, 0x0e, 0x08); /* Wait 1 s before unmute */
drivers/media/i2c/adv7604.c
2939
hdmi_write_clr_set(sd, 0x68, 0x06, 0x06); /* FIFO reset on over-/underflow [REF_01, c. 1.2.19] */
drivers/media/i2c/adv7604.c
2942
afe_write(sd, 0xb5, 0x01); /* Setting MCLK to 256Fs */
drivers/media/i2c/adv7604.c
2945
afe_write(sd, 0x02, pdata->ain_sel); /* Select analog input muxing mode */
drivers/media/i2c/adv7604.c
2946
io_write_clr_set(sd, 0x30, 1 << 4, pdata->output_bus_lsb_to_msb << 4);
drivers/media/i2c/adv7604.c
2950
io_write(sd, 0x40, 0xc0 | pdata->int1_config); /* Configure INT1 */
drivers/media/i2c/adv7604.c
2951
io_write(sd, 0x46, 0x98); /* Enable SSPD, STDI and CP unlocked interrupts */
drivers/media/i2c/adv7604.c
2952
io_write(sd, 0x6e, info->fmt_change_digital_mask); /* Enable V_LOCKED and DE_REGEN_LCK interrupts */
drivers/media/i2c/adv7604.c
2953
io_write(sd, 0x73, info->cable_det_mask); /* Enable cable detection (+5v) interrupts */
drivers/media/i2c/adv7604.c
2954
info->setup_irqs(sd);
drivers/media/i2c/adv7604.c
2956
return v4l2_ctrl_handler_setup(sd->ctrl_handler);
drivers/media/i2c/adv7604.c
2959
static void adv7604_setup_irqs(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
2961
io_write(sd, 0x41, 0xd7); /* STDI irq for any change, disable INT2 */
drivers/media/i2c/adv7604.c
2964
static void adv7611_setup_irqs(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
2966
io_write(sd, 0x41, 0xd0); /* STDI irq for any change, disable INT2 */
drivers/media/i2c/adv7604.c
2969
static void adv7612_setup_irqs(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
2971
io_write(sd, 0x41, 0xd0); /* disable INT2 */
drivers/media/i2c/adv7604.c
2982
static struct i2c_client *adv76xx_dummy_client(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
2985
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7604.c
2986
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
3000
io_write(sd, io_reg, new_client->addr << 1);
drivers/media/i2c/adv7604.c
330
static inline struct adv76xx_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
332
return container_of(sd, struct adv76xx_state, sd);
drivers/media/i2c/adv7604.c
3480
struct v4l2_subdev *sd;
drivers/media/i2c/adv7604.c
3543
sd = &state->sd;
drivers/media/i2c/adv7604.c
3544
v4l2_i2c_subdev_init(sd, client, &adv76xx_ops);
drivers/media/i2c/adv7604.c
3545
snprintf(sd->name, sizeof(sd->name), "%s %d-%04x",
drivers/media/i2c/adv7604.c
3548
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/i2c/adv7604.c
3549
sd->internal_ops = &adv76xx_int_ops;
drivers/media/i2c/adv7604.c
3555
v4l2_err(sd, "Error configuring IO regmap region\n");
drivers/media/i2c/adv7604.c
3568
v4l2_err(sd, "Error %d reading IO Regmap\n", err);
drivers/media/i2c/adv7604.c
3572
v4l2_err(sd, "not an ADV7604 on address 0x%x\n",
drivers/media/i2c/adv7604.c
3583
v4l2_err(sd, "Error %d reading IO Regmap\n", err);
drivers/media/i2c/adv7604.c
3591
v4l2_err(sd, "Error %d reading IO Regmap\n", err);
drivers/media/i2c/adv7604.c
3597
v4l2_err(sd, "not an %s on address 0x%x\n",
drivers/media/i2c/adv7604.c
3640
sd->ctrl_handler = hdl;
drivers/media/i2c/adv7604.c
3645
if (adv76xx_s_detect_tx_5v_ctrl(sd)) {
drivers/media/i2c/adv7604.c
3656
dummy_client = adv76xx_dummy_client(sd, i);
drivers/media/i2c/adv7604.c
3659
v4l2_err(sd, "failed to create i2c client %u\n", i);
drivers/media/i2c/adv7604.c
3674
sd->entity.function = MEDIA_ENT_F_DV_DECODER;
drivers/media/i2c/adv7604.c
3676
err = media_entity_pads_init(&sd->entity, state->source_pad + 1,
drivers/media/i2c/adv7604.c
3686
err = adv76xx_core_init(sd);
drivers/media/i2c/adv7604.c
3709
v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
drivers/media/i2c/adv7604.c
3712
err = v4l2_async_register_subdev(sd);
drivers/media/i2c/adv7604.c
3719
media_entity_cleanup(&sd->entity);
drivers/media/i2c/adv7604.c
3731
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/adv7604.c
3732
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
3735
io_write(sd, 0x40, 0);
drivers/media/i2c/adv7604.c
3736
io_write(sd, 0x41, 0);
drivers/media/i2c/adv7604.c
3737
io_write(sd, 0x46, 0);
drivers/media/i2c/adv7604.c
3738
io_write(sd, 0x6e, 0);
drivers/media/i2c/adv7604.c
3739
io_write(sd, 0x73, 0);
drivers/media/i2c/adv7604.c
3742
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/adv7604.c
3743
media_entity_cleanup(&sd->entity);
drivers/media/i2c/adv7604.c
3744
adv76xx_unregister_clients(to_state(sd));
drivers/media/i2c/adv7604.c
3745
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/adv7604.c
384
static inline int io_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7604.c
386
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
391
static inline int io_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7604.c
393
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
398
static inline int io_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask,
drivers/media/i2c/adv7604.c
401
return io_write(sd, reg, (io_read(sd, reg) & ~mask) | val);
drivers/media/i2c/adv7604.c
404
static inline int __always_unused avlink_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7604.c
406
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
411
static inline int __always_unused avlink_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7604.c
413
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
418
static inline int cec_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7604.c
420
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
425
static inline int cec_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7604.c
427
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
432
static inline int cec_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask,
drivers/media/i2c/adv7604.c
435
return cec_write(sd, reg, (cec_read(sd, reg) & ~mask) | val);
drivers/media/i2c/adv7604.c
438
static inline int infoframe_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7604.c
440
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
445
static inline int __always_unused infoframe_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7604.c
447
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
452
static inline int __always_unused afe_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7604.c
454
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
459
static inline int afe_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7604.c
461
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
466
static inline int rep_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7604.c
468
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
473
static inline int rep_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7604.c
475
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
480
static inline int rep_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
drivers/media/i2c/adv7604.c
482
return rep_write(sd, reg, (rep_read(sd, reg) & ~mask) | val);
drivers/media/i2c/adv7604.c
485
static inline int __always_unused edid_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7604.c
487
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
492
static inline int __always_unused edid_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7604.c
494
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
499
static inline int edid_write_block(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
502
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
507
v4l2_dbg(2, debug, sd, "%s: write EDID block (%d byte)\n",
drivers/media/i2c/adv7604.c
533
io_write_clr_set(&state->sd, 0x20, 0x80 >> i,
drivers/media/i2c/adv7604.c
537
v4l2_subdev_notify(&state->sd, ADV76XX_HOTPLUG, &hpd);
drivers/media/i2c/adv7604.c
545
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/adv7604.c
547
v4l2_dbg(2, debug, sd, "%s: enable hotplug\n", __func__);
drivers/media/i2c/adv7604.c
552
static inline int hdmi_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7604.c
554
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
559
static u16 hdmi_read16(struct v4l2_subdev *sd, u8 reg, u16 mask)
drivers/media/i2c/adv7604.c
561
return ((hdmi_read(sd, reg) << 8) | hdmi_read(sd, reg + 1)) & mask;
drivers/media/i2c/adv7604.c
564
static inline int hdmi_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7604.c
566
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
571
static inline int hdmi_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
drivers/media/i2c/adv7604.c
573
return hdmi_write(sd, reg, (hdmi_read(sd, reg) & ~mask) | val);
drivers/media/i2c/adv7604.c
576
static inline int __always_unused test_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7604.c
578
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
583
static inline int cp_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7604.c
585
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
590
static u16 cp_read16(struct v4l2_subdev *sd, u8 reg, u16 mask)
drivers/media/i2c/adv7604.c
592
return ((cp_read(sd, reg) << 8) | cp_read(sd, reg + 1)) & mask;
drivers/media/i2c/adv7604.c
595
static inline int cp_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7604.c
597
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
602
static inline int cp_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
drivers/media/i2c/adv7604.c
604
return cp_write(sd, reg, (cp_read(sd, reg) & ~mask) | val);
drivers/media/i2c/adv7604.c
607
static inline int __always_unused vdp_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7604.c
609
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
614
static inline int __always_unused vdp_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7604.c
616
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
625
static int adv76xx_read_reg(struct v4l2_subdev *sd, unsigned int reg)
drivers/media/i2c/adv7604.c
627
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
642
static int adv76xx_write_reg(struct v4l2_subdev *sd, unsigned int reg, u8 val)
drivers/media/i2c/adv7604.c
644
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
655
static void adv76xx_write_reg_seq(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
661
adv76xx_write_reg(sd, reg_seq[i].reg, reg_seq[i].val);
drivers/media/i2c/adv7604.c
770
static inline bool is_analog_input(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
772
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
778
static inline bool is_digital_input(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
780
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
815
adv76xx_get_dv_timings_cap(struct v4l2_subdev *sd, int pad)
drivers/media/i2c/adv7604.c
818
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
841
static void adv76xx_inv_register(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
843
v4l2_info(sd, "0x000-0x0ff: IO Map\n");
drivers/media/i2c/adv7604.c
844
v4l2_info(sd, "0x100-0x1ff: AVLink Map\n");
drivers/media/i2c/adv7604.c
845
v4l2_info(sd, "0x200-0x2ff: CEC Map\n");
drivers/media/i2c/adv7604.c
846
v4l2_info(sd, "0x300-0x3ff: InfoFrame Map\n");
drivers/media/i2c/adv7604.c
847
v4l2_info(sd, "0x400-0x4ff: ESDP Map\n");
drivers/media/i2c/adv7604.c
848
v4l2_info(sd, "0x500-0x5ff: DPP Map\n");
drivers/media/i2c/adv7604.c
849
v4l2_info(sd, "0x600-0x6ff: AFE Map\n");
drivers/media/i2c/adv7604.c
850
v4l2_info(sd, "0x700-0x7ff: Repeater Map\n");
drivers/media/i2c/adv7604.c
851
v4l2_info(sd, "0x800-0x8ff: EDID Map\n");
drivers/media/i2c/adv7604.c
852
v4l2_info(sd, "0x900-0x9ff: HDMI Map\n");
drivers/media/i2c/adv7604.c
853
v4l2_info(sd, "0xa00-0xaff: Test Map\n");
drivers/media/i2c/adv7604.c
854
v4l2_info(sd, "0xb00-0xbff: CP Map\n");
drivers/media/i2c/adv7604.c
855
v4l2_info(sd, "0xc00-0xcff: VDP Map\n");
drivers/media/i2c/adv7604.c
858
static int adv76xx_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
863
ret = adv76xx_read_reg(sd, reg->reg);
drivers/media/i2c/adv7604.c
865
v4l2_info(sd, "Register %03llx not supported\n", reg->reg);
drivers/media/i2c/adv7604.c
866
adv76xx_inv_register(sd);
drivers/media/i2c/adv7604.c
876
static int adv76xx_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
881
ret = adv76xx_write_reg(sd, reg->reg, reg->val);
drivers/media/i2c/adv7604.c
883
v4l2_info(sd, "Register %03llx not supported\n", reg->reg);
drivers/media/i2c/adv7604.c
884
adv76xx_inv_register(sd);
drivers/media/i2c/adv7604.c
892
static unsigned int adv7604_read_cable_det(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
894
u8 value = io_read(sd, 0x6f);
drivers/media/i2c/adv7604.c
902
static unsigned int adv7611_read_cable_det(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
904
u8 value = io_read(sd, 0x6f);
drivers/media/i2c/adv7604.c
909
static unsigned int adv7612_read_cable_det(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
914
u8 value = io_read(sd, 0x6f);
drivers/media/i2c/adv7604.c
919
static int adv76xx_s_detect_tx_5v_ctrl(struct v4l2_subdev *sd)
drivers/media/i2c/adv7604.c
921
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
923
u16 cable_det = info->read_cable_det(sd);
drivers/media/i2c/adv7604.c
928
static int find_and_set_predefined_video_timings(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
937
is_digital_input(sd) ? 250000 : 1000000, false))
drivers/media/i2c/adv7604.c
939
io_write(sd, 0x00, predef_vid_timings[i].vid_std); /* video std */
drivers/media/i2c/adv7604.c
940
io_write(sd, 0x01, (predef_vid_timings[i].v_freq << 4) +
drivers/media/i2c/adv7604.c
948
static int configure_predefined_video_timings(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
951
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7604.c
954
v4l2_dbg(1, debug, sd, "%s", __func__);
drivers/media/i2c/adv7604.c
958
io_write(sd, 0x16, 0x43);
drivers/media/i2c/adv7604.c
959
io_write(sd, 0x17, 0x5a);
drivers/media/i2c/adv7604.c
962
cp_write_clr_set(sd, 0x81, 0x10, 0x00);
drivers/media/i2c/adv7604.c
963
cp_write(sd, 0x8f, 0x00);
drivers/media/i2c/adv7604.c
964
cp_write(sd, 0x90, 0x00);
drivers/media/i2c/adv7604.c
965
cp_write(sd, 0xa2, 0x00);
drivers/media/i2c/adv7604.c
966
cp_write(sd, 0xa3, 0x00);
drivers/media/i2c/adv7604.c
967
cp_write(sd, 0xa4, 0x00);
drivers/media/i2c/adv7604.c
968
cp_write(sd, 0xa5, 0x00);
drivers/media/i2c/adv7604.c
969
cp_write(sd, 0xa6, 0x00);
drivers/media/i2c/adv7604.c
970
cp_write(sd, 0xa7, 0x00);
drivers/media/i2c/adv7604.c
971
cp_write(sd, 0xab, 0x00);
drivers/media/i2c/adv7604.c
972
cp_write(sd, 0xac, 0x00);
drivers/media/i2c/adv7604.c
974
if (is_analog_input(sd)) {
drivers/media/i2c/adv7604.c
975
err = find_and_set_predefined_video_timings(sd,
drivers/media/i2c/adv7604.c
978
err = find_and_set_predefined_video_timings(sd,
drivers/media/i2c/adv7604.c
980
} else if (is_digital_input(sd)) {
drivers/media/i2c/adv7604.c
981
err = find_and_set_predefined_video_timings(sd,
drivers/media/i2c/adv7604.c
984
err = find_and_set_predefined_video_timings(sd,
drivers/media/i2c/adv7604.c
987
v4l2_dbg(2, debug, sd, "%s: Unknown port %d selected\n",
drivers/media/i2c/adv7604.c
996
static void configure_custom_video_timings(struct v4l2_subdev *sd,
drivers/media/i2c/adv7604.c
999
struct adv76xx_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
1001
cp_write_and_or(sd, 0x81, 0xef, 0x00);
drivers/media/i2c/adv7842.c
1002
cp_write(sd, 0x26, 0x00);
drivers/media/i2c/adv7842.c
1003
cp_write(sd, 0x27, 0x00);
drivers/media/i2c/adv7842.c
1004
cp_write(sd, 0x28, 0x00);
drivers/media/i2c/adv7842.c
1005
cp_write(sd, 0x29, 0x00);
drivers/media/i2c/adv7842.c
1006
cp_write(sd, 0x8f, 0x40);
drivers/media/i2c/adv7842.c
1007
cp_write(sd, 0x90, 0x00);
drivers/media/i2c/adv7842.c
1008
cp_write(sd, 0xa5, 0x00);
drivers/media/i2c/adv7842.c
1009
cp_write(sd, 0xa6, 0x00);
drivers/media/i2c/adv7842.c
1010
cp_write(sd, 0xa7, 0x00);
drivers/media/i2c/adv7842.c
1011
cp_write(sd, 0xab, 0x00);
drivers/media/i2c/adv7842.c
1012
cp_write(sd, 0xac, 0x00);
drivers/media/i2c/adv7842.c
1017
err = find_and_set_predefined_video_timings(sd,
drivers/media/i2c/adv7842.c
1020
err = find_and_set_predefined_video_timings(sd,
drivers/media/i2c/adv7842.c
1024
err = find_and_set_predefined_video_timings(sd,
drivers/media/i2c/adv7842.c
1027
err = find_and_set_predefined_video_timings(sd,
drivers/media/i2c/adv7842.c
1031
v4l2_dbg(2, debug, sd, "%s: Unknown mode %d\n",
drivers/media/i2c/adv7842.c
1041
static void configure_custom_video_timings(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
1044
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
1045
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7842.c
1059
v4l2_dbg(2, debug, sd, "%s\n", __func__);
drivers/media/i2c/adv7842.c
1065
io_write(sd, 0x00, 0x07); /* video std */
drivers/media/i2c/adv7842.c
1066
io_write(sd, 0x01, 0x02); /* prim mode */
drivers/media/i2c/adv7842.c
1068
cp_write_and_or(sd, 0x81, 0xef, 0x10);
drivers/media/i2c/adv7842.c
1074
v4l2_err(sd, "writing to reg 0x16 and 0x17 failed\n");
drivers/media/i2c/adv7842.c
1079
cp_write(sd, 0x26, (cp_start_sav >> 8) & 0xf);
drivers/media/i2c/adv7842.c
1080
cp_write(sd, 0x27, (cp_start_sav & 0xff));
drivers/media/i2c/adv7842.c
1081
cp_write(sd, 0x28, (cp_start_eav >> 8) & 0xf);
drivers/media/i2c/adv7842.c
1082
cp_write(sd, 0x29, (cp_start_eav & 0xff));
drivers/media/i2c/adv7842.c
1085
cp_write(sd, 0xa5, (cp_start_vbi >> 4) & 0xff);
drivers/media/i2c/adv7842.c
1086
cp_write(sd, 0xa6, ((cp_start_vbi & 0xf) << 4) |
drivers/media/i2c/adv7842.c
1088
cp_write(sd, 0xa7, cp_end_vbi & 0xff);
drivers/media/i2c/adv7842.c
1093
io_write(sd, 0x00, 0x02); /* video std */
drivers/media/i2c/adv7842.c
1094
io_write(sd, 0x01, 0x06); /* prim mode */
drivers/media/i2c/adv7842.c
1097
v4l2_dbg(2, debug, sd, "%s: Unknown mode %d\n",
drivers/media/i2c/adv7842.c
1102
cp_write(sd, 0x8f, (ch1_fr_ll >> 8) & 0x7);
drivers/media/i2c/adv7842.c
1103
cp_write(sd, 0x90, ch1_fr_ll & 0xff);
drivers/media/i2c/adv7842.c
1104
cp_write(sd, 0xab, (height >> 4) & 0xff);
drivers/media/i2c/adv7842.c
1105
cp_write(sd, 0xac, (height & 0x0f) << 4);
drivers/media/i2c/adv7842.c
1108
static void adv7842_set_offset(struct v4l2_subdev *sd, bool auto_offset, u16 offset_a, u16 offset_b, u16 offset_c)
drivers/media/i2c/adv7842.c
1110
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
1119
v4l2_dbg(2, debug, sd, "%s: %s offset: a = 0x%x, b = 0x%x, c = 0x%x\n",
drivers/media/i2c/adv7842.c
1123
offset_buf[0]= (cp_read(sd, 0x77) & 0xc0) | ((offset_a & 0x3f0) >> 4);
drivers/media/i2c/adv7842.c
1130
v4l2_err(sd, "%s: i2c error writing to CP reg 0x77, 0x78, 0x79, 0x7a\n", __func__);
drivers/media/i2c/adv7842.c
1133
static void adv7842_set_gain(struct v4l2_subdev *sd, bool auto_gain, u16 gain_a, u16 gain_b, u16 gain_c)
drivers/media/i2c/adv7842.c
1135
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
1148
v4l2_dbg(2, debug, sd, "%s: %s gain: a = 0x%x, b = 0x%x, c = 0x%x\n",
drivers/media/i2c/adv7842.c
1159
v4l2_err(sd, "%s: i2c error writing to CP reg 0x73, 0x74, 0x75, 0x76\n", __func__);
drivers/media/i2c/adv7842.c
1162
static void set_rgb_quantization_range(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
1164
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
1165
bool rgb_output = io_read(sd, 0x02) & 0x02;
drivers/media/i2c/adv7842.c
1166
bool hdmi_signal = hdmi_read(sd, 0x05) & 0x80;
drivers/media/i2c/adv7842.c
1169
if (hdmi_signal && (io_read(sd, 0x60) & 1))
drivers/media/i2c/adv7842.c
1170
y = infoframe_read(sd, 0x01) >> 5;
drivers/media/i2c/adv7842.c
1172
v4l2_dbg(2, debug, sd, "%s: RGB quantization range: %d, RGB out: %d, HDMI: %d\n",
drivers/media/i2c/adv7842.c
1176
adv7842_set_gain(sd, true, 0x0, 0x0, 0x0);
drivers/media/i2c/adv7842.c
1177
adv7842_set_offset(sd, true, 0x0, 0x0, 0x0);
drivers/media/i2c/adv7842.c
1178
io_write_clr_set(sd, 0x02, 0x04, rgb_output ? 0 : 4);
drivers/media/i2c/adv7842.c
1185
io_write_and_or(sd, 0x02, 0x0f, 0x10);
drivers/media/i2c/adv7842.c
1192
io_write_and_or(sd, 0x02, 0x0f, 0xf0);
drivers/media/i2c/adv7842.c
1199
io_write_and_or(sd, 0x02, 0x0f, 0xf0);
drivers/media/i2c/adv7842.c
1208
io_write_and_or(sd, 0x02, 0x0f, 0x00);
drivers/media/i2c/adv7842.c
1211
io_write_and_or(sd, 0x02, 0x0f, 0x10);
drivers/media/i2c/adv7842.c
1213
if (is_digital_input(sd) && rgb_output) {
drivers/media/i2c/adv7842.c
1214
adv7842_set_offset(sd, false, 0x40, 0x40, 0x40);
drivers/media/i2c/adv7842.c
1216
adv7842_set_gain(sd, false, 0xe0, 0xe0, 0xe0);
drivers/media/i2c/adv7842.c
1217
adv7842_set_offset(sd, false, 0x70, 0x70, 0x70);
drivers/media/i2c/adv7842.c
1224
io_write_and_or(sd, 0x02, 0x0f, 0x20);
drivers/media/i2c/adv7842.c
1232
io_write_and_or(sd, 0x02, 0x0f, 0x00);
drivers/media/i2c/adv7842.c
1238
io_write_and_or(sd, 0x02, 0x0f, 0x60);
drivers/media/i2c/adv7842.c
1246
io_write_and_or(sd, 0x02, 0x0f, 0x10);
drivers/media/i2c/adv7842.c
1248
if (is_analog_input(sd) || hdmi_signal)
drivers/media/i2c/adv7842.c
1253
adv7842_set_offset(sd, false, 0x40, 0x40, 0x40);
drivers/media/i2c/adv7842.c
1255
adv7842_set_gain(sd, false, 0xe0, 0xe0, 0xe0);
drivers/media/i2c/adv7842.c
1256
adv7842_set_offset(sd, false, 0x70, 0x70, 0x70);
drivers/media/i2c/adv7842.c
1264
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/adv7842.c
1265
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
1274
cp_write(sd, 0x3c, ctrl->val);
drivers/media/i2c/adv7842.c
1275
sdp_write(sd, 0x14, ctrl->val);
drivers/media/i2c/adv7842.c
1279
cp_write(sd, 0x3a, ctrl->val);
drivers/media/i2c/adv7842.c
1280
sdp_write(sd, 0x13, ctrl->val);
drivers/media/i2c/adv7842.c
1284
cp_write(sd, 0x3b, ctrl->val);
drivers/media/i2c/adv7842.c
1285
sdp_write(sd, 0x15, ctrl->val);
drivers/media/i2c/adv7842.c
1289
cp_write(sd, 0x3d, ctrl->val);
drivers/media/i2c/adv7842.c
1290
sdp_write(sd, 0x16, ctrl->val);
drivers/media/i2c/adv7842.c
1295
afe_write(sd, 0xc8, ctrl->val);
drivers/media/i2c/adv7842.c
1298
cp_write_and_or(sd, 0xbf, ~0x04, (ctrl->val << 2));
drivers/media/i2c/adv7842.c
1299
sdp_write_and_or(sd, 0xdd, ~0x04, (ctrl->val << 2));
drivers/media/i2c/adv7842.c
1319
v4l2_dbg(1, debug, sd, "R %x, G %x, B %x\n", R, G, B);
drivers/media/i2c/adv7842.c
1320
v4l2_dbg(1, debug, sd, "Y %x, U %x, V %x\n", Y, U, V);
drivers/media/i2c/adv7842.c
1323
cp_write(sd, 0xc1, R);
drivers/media/i2c/adv7842.c
1324
cp_write(sd, 0xc0, G);
drivers/media/i2c/adv7842.c
1325
cp_write(sd, 0xc2, B);
drivers/media/i2c/adv7842.c
1327
sdp_write(sd, 0xde, Y);
drivers/media/i2c/adv7842.c
1328
sdp_write(sd, 0xdf, (V & 0xf0) | ((U >> 4) & 0x0f));
drivers/media/i2c/adv7842.c
1333
set_rgb_quantization_range(sd);
drivers/media/i2c/adv7842.c
1341
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/adv7842.c
1345
if ((io_read(sd, 0x60) & 1) && (infoframe_read(sd, 0x03) & 0x80))
drivers/media/i2c/adv7842.c
1346
ctrl->val = (infoframe_read(sd, 0x05) >> 4) & 3;
drivers/media/i2c/adv7842.c
1352
static inline bool no_power(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
1354
return io_read(sd, 0x0c) & 0x24;
drivers/media/i2c/adv7842.c
1357
static inline bool no_cp_signal(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
1359
return ((cp_read(sd, 0xb5) & 0xd0) != 0xd0) || !(cp_read(sd, 0xb1) & 0x80);
drivers/media/i2c/adv7842.c
1362
static inline bool is_hdmi(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
1364
return hdmi_read(sd, 0x05) & 0x80;
drivers/media/i2c/adv7842.c
1367
static int adv7842_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/adv7842.c
1369
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
1373
if (io_read(sd, 0x0c) & 0x24)
drivers/media/i2c/adv7842.c
1378
if (!(sdp_read(sd, 0x5A) & 0x01))
drivers/media/i2c/adv7842.c
1381
v4l2_dbg(1, debug, sd, "%s: SDP status = 0x%x\n",
drivers/media/i2c/adv7842.c
1386
if ((cp_read(sd, 0xb5) & 0xd0) != 0xd0 ||
drivers/media/i2c/adv7842.c
1387
!(cp_read(sd, 0xb1) & 0x80))
drivers/media/i2c/adv7842.c
1391
if (is_digital_input(sd) && ((io_read(sd, 0x74) & 0x03) != 0x03))
drivers/media/i2c/adv7842.c
1394
v4l2_dbg(1, debug, sd, "%s: CP status = 0x%x\n",
drivers/media/i2c/adv7842.c
1406
static int stdi2dv_timings(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
1410
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
1419
adv7842_get_dv_timings_cap(sd),
drivers/media/i2c/adv7842.c
1439
false, adv7842_get_dv_timings_cap(sd), timings))
drivers/media/i2c/adv7842.c
1445
adv7842_get_dv_timings_cap(sd), timings))
drivers/media/i2c/adv7842.c
1448
v4l2_dbg(2, debug, sd,
drivers/media/i2c/adv7842.c
1455
static int read_stdi(struct v4l2_subdev *sd, struct stdi_readback *stdi)
drivers/media/i2c/adv7842.c
1459
adv7842_g_input_status(sd, &status);
drivers/media/i2c/adv7842.c
1461
v4l2_dbg(2, debug, sd, "%s: no signal\n", __func__);
drivers/media/i2c/adv7842.c
1465
stdi->bl = ((cp_read(sd, 0xb1) & 0x3f) << 8) | cp_read(sd, 0xb2);
drivers/media/i2c/adv7842.c
1466
stdi->lcf = ((cp_read(sd, 0xb3) & 0x7) << 8) | cp_read(sd, 0xb4);
drivers/media/i2c/adv7842.c
1467
stdi->lcvs = cp_read(sd, 0xb3) >> 3;
drivers/media/i2c/adv7842.c
1469
if ((cp_read(sd, 0xb5) & 0x80) && ((cp_read(sd, 0xb5) & 0x03) == 0x01)) {
drivers/media/i2c/adv7842.c
1470
stdi->hs_pol = ((cp_read(sd, 0xb5) & 0x10) ?
drivers/media/i2c/adv7842.c
1471
((cp_read(sd, 0xb5) & 0x08) ? '+' : '-') : 'x');
drivers/media/i2c/adv7842.c
1472
stdi->vs_pol = ((cp_read(sd, 0xb5) & 0x40) ?
drivers/media/i2c/adv7842.c
1473
((cp_read(sd, 0xb5) & 0x20) ? '+' : '-') : 'x');
drivers/media/i2c/adv7842.c
1478
stdi->interlaced = (cp_read(sd, 0xb1) & 0x40) ? true : false;
drivers/media/i2c/adv7842.c
1481
v4l2_dbg(2, debug, sd, "%s: invalid signal\n", __func__);
drivers/media/i2c/adv7842.c
1485
v4l2_dbg(2, debug, sd,
drivers/media/i2c/adv7842.c
1494
static int adv7842_enum_dv_timings(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
1501
adv7842_get_dv_timings_cap(sd), adv7842_check_dv_timings, NULL);
drivers/media/i2c/adv7842.c
1504
static int adv7842_dv_timings_cap(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
1510
*cap = *adv7842_get_dv_timings_cap(sd);
drivers/media/i2c/adv7842.c
1516
static void adv7842_fill_optional_dv_timings_fields(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
1519
v4l2_find_dv_timings_cap(timings, adv7842_get_dv_timings_cap(sd),
drivers/media/i2c/adv7842.c
1520
is_digital_input(sd) ? 250000 : 1000000,
drivers/media/i2c/adv7842.c
1525
static int adv7842_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/adv7842.c
1528
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
1532
v4l2_dbg(1, debug, sd, "%s:\n", __func__);
drivers/media/i2c/adv7842.c
1544
if (read_stdi(sd, &stdi)) {
drivers/media/i2c/adv7842.c
1546
v4l2_dbg(1, debug, sd, "%s: no valid signal\n", __func__);
drivers/media/i2c/adv7842.c
1554
if (is_digital_input(sd)) {
drivers/media/i2c/adv7842.c
1559
bt->width = (hdmi_read(sd, 0x07) & 0x0f) * 256 + hdmi_read(sd, 0x08);
drivers/media/i2c/adv7842.c
1560
bt->height = (hdmi_read(sd, 0x09) & 0x0f) * 256 + hdmi_read(sd, 0x0a);
drivers/media/i2c/adv7842.c
1561
freq = ((hdmi_read(sd, 0x51) << 1) + (hdmi_read(sd, 0x52) >> 7)) * 1000000;
drivers/media/i2c/adv7842.c
1562
freq += ((hdmi_read(sd, 0x52) & 0x7f) * 7813);
drivers/media/i2c/adv7842.c
1563
if (is_hdmi(sd)) {
drivers/media/i2c/adv7842.c
1565
freq = freq * 8 / (((hdmi_read(sd, 0x0b) & 0xc0) >> 6) * 2 + 8);
drivers/media/i2c/adv7842.c
1568
bt->hfrontporch = (hdmi_read(sd, 0x20) & 0x03) * 256 +
drivers/media/i2c/adv7842.c
1569
hdmi_read(sd, 0x21);
drivers/media/i2c/adv7842.c
1570
bt->hsync = (hdmi_read(sd, 0x22) & 0x03) * 256 +
drivers/media/i2c/adv7842.c
1571
hdmi_read(sd, 0x23);
drivers/media/i2c/adv7842.c
1572
bt->hbackporch = (hdmi_read(sd, 0x24) & 0x03) * 256 +
drivers/media/i2c/adv7842.c
1573
hdmi_read(sd, 0x25);
drivers/media/i2c/adv7842.c
1574
bt->vfrontporch = ((hdmi_read(sd, 0x2a) & 0x1f) * 256 +
drivers/media/i2c/adv7842.c
1575
hdmi_read(sd, 0x2b)) / 2;
drivers/media/i2c/adv7842.c
1576
bt->vsync = ((hdmi_read(sd, 0x2e) & 0x1f) * 256 +
drivers/media/i2c/adv7842.c
1577
hdmi_read(sd, 0x2f)) / 2;
drivers/media/i2c/adv7842.c
1578
bt->vbackporch = ((hdmi_read(sd, 0x32) & 0x1f) * 256 +
drivers/media/i2c/adv7842.c
1579
hdmi_read(sd, 0x33)) / 2;
drivers/media/i2c/adv7842.c
1580
bt->polarities = ((hdmi_read(sd, 0x05) & 0x10) ? V4L2_DV_VSYNC_POS_POL : 0) |
drivers/media/i2c/adv7842.c
1581
((hdmi_read(sd, 0x05) & 0x20) ? V4L2_DV_HSYNC_POS_POL : 0);
drivers/media/i2c/adv7842.c
1583
bt->height += (hdmi_read(sd, 0x0b) & 0x0f) * 256 +
drivers/media/i2c/adv7842.c
1584
hdmi_read(sd, 0x0c);
drivers/media/i2c/adv7842.c
1585
bt->il_vfrontporch = ((hdmi_read(sd, 0x2c) & 0x1f) * 256 +
drivers/media/i2c/adv7842.c
1586
hdmi_read(sd, 0x2d)) / 2;
drivers/media/i2c/adv7842.c
1587
bt->il_vsync = ((hdmi_read(sd, 0x30) & 0x1f) * 256 +
drivers/media/i2c/adv7842.c
1588
hdmi_read(sd, 0x31)) / 2;
drivers/media/i2c/adv7842.c
1589
bt->il_vbackporch = ((hdmi_read(sd, 0x34) & 0x1f) * 256 +
drivers/media/i2c/adv7842.c
1590
hdmi_read(sd, 0x35)) / 2;
drivers/media/i2c/adv7842.c
1596
adv7842_fill_optional_dv_timings_fields(sd, timings);
drivers/media/i2c/adv7842.c
1610
if (!stdi2dv_timings(sd, &stdi, timings))
drivers/media/i2c/adv7842.c
1613
v4l2_dbg(1, debug, sd, "%s: lcvs + 1 = %d\n", __func__, stdi.lcvs);
drivers/media/i2c/adv7842.c
1614
if (!stdi2dv_timings(sd, &stdi, timings))
drivers/media/i2c/adv7842.c
1617
v4l2_dbg(1, debug, sd, "%s: lcvs - 1 = %d\n", __func__, stdi.lcvs);
drivers/media/i2c/adv7842.c
1618
if (stdi2dv_timings(sd, &stdi, timings)) {
drivers/media/i2c/adv7842.c
1629
v4l2_dbg(1, debug, sd, "%s: restart STDI\n", __func__);
drivers/media/i2c/adv7842.c
1632
cp_write_and_or(sd, 0x86, 0xf9, 0x00);
drivers/media/i2c/adv7842.c
1634
cp_write_and_or(sd, 0x86, 0xf9, 0x04);
drivers/media/i2c/adv7842.c
1636
cp_write_and_or(sd, 0x86, 0xf9, 0x02);
drivers/media/i2c/adv7842.c
1640
v4l2_dbg(1, debug, sd, "%s: format not supported\n", __func__);
drivers/media/i2c/adv7842.c
1648
v4l2_print_dv_timings(sd->name, "adv7842_query_dv_timings:",
drivers/media/i2c/adv7842.c
1653
static int adv7842_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/adv7842.c
1656
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
1660
v4l2_dbg(1, debug, sd, "%s:\n", __func__);
drivers/media/i2c/adv7842.c
1669
v4l2_dbg(1, debug, sd, "%s: no change\n", __func__);
drivers/media/i2c/adv7842.c
1675
if (!v4l2_valid_dv_timings(timings, adv7842_get_dv_timings_cap(sd),
drivers/media/i2c/adv7842.c
1679
adv7842_fill_optional_dv_timings_fields(sd, timings);
drivers/media/i2c/adv7842.c
1683
cp_write(sd, 0x91, bt->interlaced ? 0x40 : 0x00);
drivers/media/i2c/adv7842.c
1686
err = configure_predefined_video_timings(sd, timings);
drivers/media/i2c/adv7842.c
1690
configure_custom_video_timings(sd, bt);
drivers/media/i2c/adv7842.c
1693
set_rgb_quantization_range(sd);
drivers/media/i2c/adv7842.c
1697
v4l2_print_dv_timings(sd->name, "adv7842_s_dv_timings: ",
drivers/media/i2c/adv7842.c
1702
static int adv7842_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/adv7842.c
1705
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
1716
static void enable_input(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
1718
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
1720
set_rgb_quantization_range(sd);
drivers/media/i2c/adv7842.c
1725
io_write(sd, 0x15, 0xb0); /* Disable Tristate of Pins (no audio) */
drivers/media/i2c/adv7842.c
1728
hdmi_write(sd, 0x01, 0x00); /* Enable HDMI clock terminators */
drivers/media/i2c/adv7842.c
1729
io_write(sd, 0x15, 0xa0); /* Disable Tristate of Pins */
drivers/media/i2c/adv7842.c
1730
hdmi_write_and_or(sd, 0x1a, 0xef, 0x00); /* Unmute audio */
drivers/media/i2c/adv7842.c
1733
v4l2_dbg(2, debug, sd, "%s: Unknown mode %d\n",
drivers/media/i2c/adv7842.c
1739
static void disable_input(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
1741
hdmi_write_and_or(sd, 0x1a, 0xef, 0x10); /* Mute audio [REF_01, c. 2.2.2] */
drivers/media/i2c/adv7842.c
1743
io_write(sd, 0x15, 0xbe); /* Tristate all outputs from video core */
drivers/media/i2c/adv7842.c
1744
hdmi_write(sd, 0x01, 0x78); /* Disable HDMI clock terminators */
drivers/media/i2c/adv7842.c
1747
static void sdp_csc_coeff(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
1751
sdp_io_write_and_or(sd, 0xe0, 0xbf, c->manual ? 0x00 : 0x40);
drivers/media/i2c/adv7842.c
1757
sdp_io_write_and_or(sd, 0xe0, 0x7f, c->scaling == 2 ? 0x80 : 0x00);
drivers/media/i2c/adv7842.c
1760
sdp_io_write_and_or(sd, 0xe0, 0xe0, c->A1 >> 8);
drivers/media/i2c/adv7842.c
1761
sdp_io_write(sd, 0xe1, c->A1);
drivers/media/i2c/adv7842.c
1762
sdp_io_write_and_or(sd, 0xe2, 0xe0, c->A2 >> 8);
drivers/media/i2c/adv7842.c
1763
sdp_io_write(sd, 0xe3, c->A2);
drivers/media/i2c/adv7842.c
1764
sdp_io_write_and_or(sd, 0xe4, 0xe0, c->A3 >> 8);
drivers/media/i2c/adv7842.c
1765
sdp_io_write(sd, 0xe5, c->A3);
drivers/media/i2c/adv7842.c
1768
sdp_io_write_and_or(sd, 0xe6, 0x80, c->A4 >> 8);
drivers/media/i2c/adv7842.c
1769
sdp_io_write(sd, 0xe7, c->A4);
drivers/media/i2c/adv7842.c
1772
sdp_io_write_and_or(sd, 0xe8, 0xe0, c->B1 >> 8);
drivers/media/i2c/adv7842.c
1773
sdp_io_write(sd, 0xe9, c->B1);
drivers/media/i2c/adv7842.c
1774
sdp_io_write_and_or(sd, 0xea, 0xe0, c->B2 >> 8);
drivers/media/i2c/adv7842.c
1775
sdp_io_write(sd, 0xeb, c->B2);
drivers/media/i2c/adv7842.c
1776
sdp_io_write_and_or(sd, 0xec, 0xe0, c->B3 >> 8);
drivers/media/i2c/adv7842.c
1777
sdp_io_write(sd, 0xed, c->B3);
drivers/media/i2c/adv7842.c
1780
sdp_io_write_and_or(sd, 0xee, 0x80, c->B4 >> 8);
drivers/media/i2c/adv7842.c
1781
sdp_io_write(sd, 0xef, c->B4);
drivers/media/i2c/adv7842.c
1784
sdp_io_write_and_or(sd, 0xf0, 0xe0, c->C1 >> 8);
drivers/media/i2c/adv7842.c
1785
sdp_io_write(sd, 0xf1, c->C1);
drivers/media/i2c/adv7842.c
1786
sdp_io_write_and_or(sd, 0xf2, 0xe0, c->C2 >> 8);
drivers/media/i2c/adv7842.c
1787
sdp_io_write(sd, 0xf3, c->C2);
drivers/media/i2c/adv7842.c
1788
sdp_io_write_and_or(sd, 0xf4, 0xe0, c->C3 >> 8);
drivers/media/i2c/adv7842.c
1789
sdp_io_write(sd, 0xf5, c->C3);
drivers/media/i2c/adv7842.c
1792
sdp_io_write_and_or(sd, 0xf6, 0x80, c->C4 >> 8);
drivers/media/i2c/adv7842.c
1793
sdp_io_write(sd, 0xf7, c->C4);
drivers/media/i2c/adv7842.c
1796
static void select_input(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
1799
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
1803
io_write(sd, 0x00, vid_std_select); /* video std: CVBS or YC mode */
drivers/media/i2c/adv7842.c
1804
io_write(sd, 0x01, 0); /* prim mode */
drivers/media/i2c/adv7842.c
1806
cp_write_and_or(sd, 0x81, 0xef, 0x10);
drivers/media/i2c/adv7842.c
1808
afe_write(sd, 0x00, 0x00); /* power up ADC */
drivers/media/i2c/adv7842.c
1809
afe_write(sd, 0xc8, 0x00); /* phase control */
drivers/media/i2c/adv7842.c
1811
io_write(sd, 0xdd, 0x90); /* Manual 2x output clock */
drivers/media/i2c/adv7842.c
1815
afe_write_and_or(sd, 0x02, 0x7f, 0x80);
drivers/media/i2c/adv7842.c
1817
afe_write(sd, 0x03, 0xa0); /* ADC0 to AIN10 (CVBS), ADC1 N/C*/
drivers/media/i2c/adv7842.c
1818
afe_write(sd, 0x04, 0x00); /* ADC2 N/C,ADC3 N/C*/
drivers/media/i2c/adv7842.c
1820
afe_write(sd, 0x03, 0xa0); /* ADC0 to AIN10 (CVBS), ADC1 N/C*/
drivers/media/i2c/adv7842.c
1821
afe_write(sd, 0x04, 0xc0); /* ADC2 to AIN12, ADC3 N/C*/
drivers/media/i2c/adv7842.c
1823
afe_write(sd, 0x0c, 0x1f); /* ADI recommend write */
drivers/media/i2c/adv7842.c
1824
afe_write(sd, 0x12, 0x63); /* ADI recommend write */
drivers/media/i2c/adv7842.c
1826
sdp_io_write(sd, 0xb2, 0x60); /* Disable AV codes */
drivers/media/i2c/adv7842.c
1827
sdp_io_write(sd, 0xc8, 0xe3); /* Disable Ancillary data */
drivers/media/i2c/adv7842.c
1830
sdp_write(sd, 0x00, 0x3F); /* Autodetect PAL NTSC (not SECAM) */
drivers/media/i2c/adv7842.c
1831
sdp_write(sd, 0x01, 0x00); /* Pedestal Off */
drivers/media/i2c/adv7842.c
1833
sdp_write(sd, 0x03, 0xE4); /* Manual VCR Gain Luma 0x40B */
drivers/media/i2c/adv7842.c
1834
sdp_write(sd, 0x04, 0x0B); /* Manual Luma setting */
drivers/media/i2c/adv7842.c
1835
sdp_write(sd, 0x05, 0xC3); /* Manual Chroma setting 0x3FE */
drivers/media/i2c/adv7842.c
1836
sdp_write(sd, 0x06, 0xFE); /* Manual Chroma setting */
drivers/media/i2c/adv7842.c
1837
sdp_write(sd, 0x12, 0x0D); /* Frame TBC,I_P, 3D comb enabled */
drivers/media/i2c/adv7842.c
1838
sdp_write(sd, 0xA7, 0x00); /* ADI Recommended Write */
drivers/media/i2c/adv7842.c
1839
sdp_io_write(sd, 0xB0, 0x00); /* Disable H and v blanking */
drivers/media/i2c/adv7842.c
1842
sdp_write_and_or(sd, 0x12, 0xf6, 0x09);
drivers/media/i2c/adv7842.c
1849
afe_write_and_or(sd, 0x02, 0x7f, 0x00);
drivers/media/i2c/adv7842.c
1851
io_write(sd, 0x00, vid_std_select); /* video std */
drivers/media/i2c/adv7842.c
1852
io_write(sd, 0x01, 0x02); /* prim mode */
drivers/media/i2c/adv7842.c
1853
cp_write_and_or(sd, 0x81, 0xef, 0x10); /* enable embedded syncs
drivers/media/i2c/adv7842.c
1856
afe_write(sd, 0x00, 0x00); /* power up ADC */
drivers/media/i2c/adv7842.c
1857
afe_write(sd, 0xc8, 0x00); /* phase control */
drivers/media/i2c/adv7842.c
1860
io_write_and_or(sd, 0x02, 0x0f, 0x60);
drivers/media/i2c/adv7842.c
1863
io_write_and_or(sd, 0x02, 0x0f, 0x10);
drivers/media/i2c/adv7842.c
1869
afe_write(sd, 0x0c, 0x1f); /* ADC Range improvement */
drivers/media/i2c/adv7842.c
1870
afe_write(sd, 0x12, 0x63); /* ADC Range improvement */
drivers/media/i2c/adv7842.c
1873
cp_write(sd, 0x73, 0x10);
drivers/media/i2c/adv7842.c
1874
cp_write(sd, 0x74, 0x04);
drivers/media/i2c/adv7842.c
1875
cp_write(sd, 0x75, 0x01);
drivers/media/i2c/adv7842.c
1876
cp_write(sd, 0x76, 0x00);
drivers/media/i2c/adv7842.c
1878
cp_write(sd, 0x3e, 0x04); /* CP core pre-gain control */
drivers/media/i2c/adv7842.c
1879
cp_write(sd, 0xc3, 0x39); /* CP coast control. Graphics mode */
drivers/media/i2c/adv7842.c
1880
cp_write(sd, 0x40, 0x5c); /* CP core pre-gain control. Graphics mode */
drivers/media/i2c/adv7842.c
1885
afe_write_and_or(sd, 0x02, 0x7f, 0x00);
drivers/media/i2c/adv7842.c
1888
hdmi_write(sd, 0x00, 0x02); /* select port A */
drivers/media/i2c/adv7842.c
1890
hdmi_write(sd, 0x00, 0x03); /* select port B */
drivers/media/i2c/adv7842.c
1891
io_write(sd, 0x00, vid_std_select); /* video std */
drivers/media/i2c/adv7842.c
1892
io_write(sd, 0x01, 5); /* prim mode */
drivers/media/i2c/adv7842.c
1893
cp_write_and_or(sd, 0x81, 0xef, 0x00); /* disable embedded syncs
drivers/media/i2c/adv7842.c
1899
hdmi_write(sd, 0xc0, 0x00);
drivers/media/i2c/adv7842.c
1900
hdmi_write(sd, 0x0d, 0x34); /* ADI recommended write */
drivers/media/i2c/adv7842.c
1901
hdmi_write(sd, 0x3d, 0x10); /* ADI recommended write */
drivers/media/i2c/adv7842.c
1902
hdmi_write(sd, 0x44, 0x85); /* TMDS PLL optimization */
drivers/media/i2c/adv7842.c
1903
hdmi_write(sd, 0x46, 0x1f); /* ADI recommended write */
drivers/media/i2c/adv7842.c
1904
hdmi_write(sd, 0x57, 0xb6); /* TMDS PLL optimization */
drivers/media/i2c/adv7842.c
1905
hdmi_write(sd, 0x58, 0x03); /* TMDS PLL optimization */
drivers/media/i2c/adv7842.c
1906
hdmi_write(sd, 0x60, 0x88); /* TMDS PLL optimization */
drivers/media/i2c/adv7842.c
1907
hdmi_write(sd, 0x61, 0x88); /* TMDS PLL optimization */
drivers/media/i2c/adv7842.c
1908
hdmi_write(sd, 0x6c, 0x18); /* Disable ISRC clearing bit,
drivers/media/i2c/adv7842.c
1910
hdmi_write(sd, 0x75, 0x10); /* DDC drive strength */
drivers/media/i2c/adv7842.c
1911
hdmi_write(sd, 0x85, 0x1f); /* equaliser */
drivers/media/i2c/adv7842.c
1912
hdmi_write(sd, 0x87, 0x70); /* ADI recommended write */
drivers/media/i2c/adv7842.c
1913
hdmi_write(sd, 0x89, 0x04); /* equaliser */
drivers/media/i2c/adv7842.c
1914
hdmi_write(sd, 0x8a, 0x1e); /* equaliser */
drivers/media/i2c/adv7842.c
1915
hdmi_write(sd, 0x93, 0x04); /* equaliser */
drivers/media/i2c/adv7842.c
1916
hdmi_write(sd, 0x94, 0x1e); /* equaliser */
drivers/media/i2c/adv7842.c
1917
hdmi_write(sd, 0x99, 0xa1); /* ADI recommended write */
drivers/media/i2c/adv7842.c
1918
hdmi_write(sd, 0x9b, 0x09); /* ADI recommended write */
drivers/media/i2c/adv7842.c
1919
hdmi_write(sd, 0x9d, 0x02); /* equaliser */
drivers/media/i2c/adv7842.c
1921
afe_write(sd, 0x00, 0xff); /* power down ADC */
drivers/media/i2c/adv7842.c
1922
afe_write(sd, 0xc8, 0x40); /* phase control */
drivers/media/i2c/adv7842.c
1925
cp_write(sd, 0x73, 0x10);
drivers/media/i2c/adv7842.c
1926
cp_write(sd, 0x74, 0x04);
drivers/media/i2c/adv7842.c
1927
cp_write(sd, 0x75, 0x01);
drivers/media/i2c/adv7842.c
1928
cp_write(sd, 0x76, 0x00);
drivers/media/i2c/adv7842.c
1933
afe_write(sd, 0x12, 0xfb); /* ADC noise shaping filter controls */
drivers/media/i2c/adv7842.c
1934
afe_write(sd, 0x0c, 0x0d); /* CP core gain controls */
drivers/media/i2c/adv7842.c
1935
cp_write(sd, 0x3e, 0x00); /* CP core pre-gain control */
drivers/media/i2c/adv7842.c
1938
cp_write(sd, 0xc3, 0x33); /* Component mode */
drivers/media/i2c/adv7842.c
1941
io_write_and_or(sd, 0x02, 0x0f, 0xf0);
drivers/media/i2c/adv7842.c
1945
v4l2_dbg(2, debug, sd, "%s: Unknown mode %d\n",
drivers/media/i2c/adv7842.c
1951
static int adv7842_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
1954
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
1956
v4l2_dbg(2, debug, sd, "%s: input %d\n", __func__, input);
drivers/media/i2c/adv7842.c
1989
disable_input(sd);
drivers/media/i2c/adv7842.c
1990
select_input(sd, state->vid_std_select);
drivers/media/i2c/adv7842.c
1991
enable_input(sd);
drivers/media/i2c/adv7842.c
1993
v4l2_subdev_notify_event(sd, &adv7842_ev_fmt);
drivers/media/i2c/adv7842.c
1998
static int adv7842_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
2062
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/adv7842.c
2064
io_write_clr_set(sd, 0x02, 0x02,
drivers/media/i2c/adv7842.c
2066
io_write(sd, 0x03, state->format->op_format_sel |
drivers/media/i2c/adv7842.c
2068
io_write_clr_set(sd, 0x04, 0xe0, adv7842_op_ch_sel(state));
drivers/media/i2c/adv7842.c
2069
io_write_clr_set(sd, 0x05, 0x01,
drivers/media/i2c/adv7842.c
2071
set_rgb_quantization_range(sd);
drivers/media/i2c/adv7842.c
2074
static int adv7842_get_format(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
2078
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
2085
if (!(sdp_read(sd, 0x5a) & 0x01))
drivers/media/i2c/adv7842.c
2112
static int adv7842_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
2116
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
2123
return adv7842_get_format(sd, sd_state, format);
drivers/media/i2c/adv7842.c
2145
static void adv7842_irq_enable(struct v4l2_subdev *sd, bool enable)
drivers/media/i2c/adv7842.c
2149
io_write(sd, 0x46, 0x9c);
drivers/media/i2c/adv7842.c
2151
io_write(sd, 0x5a, 0x10);
drivers/media/i2c/adv7842.c
2153
io_write(sd, 0x73, 0x03);
drivers/media/i2c/adv7842.c
2155
io_write(sd, 0x78, 0x03);
drivers/media/i2c/adv7842.c
2157
io_write(sd, 0xa0, 0x09);
drivers/media/i2c/adv7842.c
2159
io_write(sd, 0x69, 0x08);
drivers/media/i2c/adv7842.c
2161
io_write(sd, 0x46, 0x0);
drivers/media/i2c/adv7842.c
2162
io_write(sd, 0x5a, 0x0);
drivers/media/i2c/adv7842.c
2163
io_write(sd, 0x73, 0x0);
drivers/media/i2c/adv7842.c
2164
io_write(sd, 0x78, 0x0);
drivers/media/i2c/adv7842.c
2165
io_write(sd, 0xa0, 0x0);
drivers/media/i2c/adv7842.c
2166
io_write(sd, 0x69, 0x0);
drivers/media/i2c/adv7842.c
2171
static void adv7842_cec_tx_raw_status(struct v4l2_subdev *sd, u8 tx_raw_status)
drivers/media/i2c/adv7842.c
2173
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
2175
if ((cec_read(sd, 0x11) & 0x01) == 0) {
drivers/media/i2c/adv7842.c
2176
v4l2_dbg(1, debug, sd, "%s: tx raw: tx disabled\n", __func__);
drivers/media/i2c/adv7842.c
2181
v4l2_dbg(1, debug, sd, "%s: tx raw: arbitration lost\n",
drivers/media/i2c/adv7842.c
2192
v4l2_dbg(1, debug, sd, "%s: tx raw: retry failed\n", __func__);
drivers/media/i2c/adv7842.c
2198
nack_cnt = cec_read(sd, 0x14) & 0xf;
drivers/media/i2c/adv7842.c
2201
low_drive_cnt = cec_read(sd, 0x14) >> 4;
drivers/media/i2c/adv7842.c
2209
v4l2_dbg(1, debug, sd, "%s: tx raw: ready ok\n", __func__);
drivers/media/i2c/adv7842.c
2215
static void adv7842_cec_isr(struct v4l2_subdev *sd, bool *handled)
drivers/media/i2c/adv7842.c
2220
cec_irq = io_read(sd, 0x93) & 0x0f;
drivers/media/i2c/adv7842.c
2224
v4l2_dbg(1, debug, sd, "%s: cec: irq 0x%x\n", __func__, cec_irq);
drivers/media/i2c/adv7842.c
2225
adv7842_cec_tx_raw_status(sd, cec_irq);
drivers/media/i2c/adv7842.c
2227
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
2230
msg.len = cec_read(sd, 0x25) & 0x1f;
drivers/media/i2c/adv7842.c
2238
msg.msg[i] = cec_read(sd, i + 0x15);
drivers/media/i2c/adv7842.c
2239
cec_write(sd, 0x26, 0x01); /* re-enable rx */
drivers/media/i2c/adv7842.c
2244
io_write(sd, 0x94, cec_irq);
drivers/media/i2c/adv7842.c
2253
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/adv7842.c
2256
cec_write_clr_set(sd, 0x2a, 0x01, 0x01); /* power up cec */
drivers/media/i2c/adv7842.c
2257
cec_write(sd, 0x2c, 0x01); /* cec soft reset */
drivers/media/i2c/adv7842.c
2258
cec_write_clr_set(sd, 0x11, 0x01, 0); /* initially disable tx */
drivers/media/i2c/adv7842.c
2264
io_write_clr_set(sd, 0x96, 0x0f, 0x0f);
drivers/media/i2c/adv7842.c
2265
cec_write(sd, 0x26, 0x01); /* enable rx */
drivers/media/i2c/adv7842.c
2268
io_write_clr_set(sd, 0x96, 0x0f, 0x00);
drivers/media/i2c/adv7842.c
2270
cec_write_clr_set(sd, 0x27, 0x70, 0x00);
drivers/media/i2c/adv7842.c
2272
cec_write_clr_set(sd, 0x2a, 0x01, 0x00);
drivers/media/i2c/adv7842.c
2282
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/adv7842.c
2289
cec_write_clr_set(sd, 0x27, 0x70, 0);
drivers/media/i2c/adv7842.c
2313
cec_write_clr_set(sd, 0x27, 0x10, 0x10);
drivers/media/i2c/adv7842.c
2315
cec_write_clr_set(sd, 0x28, 0x0f, addr);
drivers/media/i2c/adv7842.c
2319
cec_write_clr_set(sd, 0x27, 0x20, 0x20);
drivers/media/i2c/adv7842.c
2321
cec_write_clr_set(sd, 0x28, 0xf0, addr << 4);
drivers/media/i2c/adv7842.c
2325
cec_write_clr_set(sd, 0x27, 0x40, 0x40);
drivers/media/i2c/adv7842.c
2327
cec_write_clr_set(sd, 0x29, 0x0f, addr);
drivers/media/i2c/adv7842.c
2337
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/adv7842.c
2346
cec_write_clr_set(sd, 0x12, 0x70, max(1, attempts - 1) << 4);
drivers/media/i2c/adv7842.c
2349
v4l2_err(sd, "%s: len exceeded 16 (%d)\n", __func__, len);
drivers/media/i2c/adv7842.c
2355
cec_write(sd, i, msg->msg[i]);
drivers/media/i2c/adv7842.c
2358
cec_write(sd, 0x10, len);
drivers/media/i2c/adv7842.c
2360
cec_write(sd, 0x11, 0x01);
drivers/media/i2c/adv7842.c
2371
static int adv7842_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
drivers/media/i2c/adv7842.c
2373
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
2377
adv7842_irq_enable(sd, false);
drivers/media/i2c/adv7842.c
2380
irq_status[0] = io_read(sd, 0x43);
drivers/media/i2c/adv7842.c
2381
irq_status[1] = io_read(sd, 0x57);
drivers/media/i2c/adv7842.c
2382
irq_status[2] = io_read(sd, 0x70);
drivers/media/i2c/adv7842.c
2383
irq_status[3] = io_read(sd, 0x75);
drivers/media/i2c/adv7842.c
2384
irq_status[4] = io_read(sd, 0x9d);
drivers/media/i2c/adv7842.c
2385
irq_status[5] = io_read(sd, 0x66);
drivers/media/i2c/adv7842.c
2389
io_write(sd, 0x44, irq_status[0]);
drivers/media/i2c/adv7842.c
2391
io_write(sd, 0x58, irq_status[1]);
drivers/media/i2c/adv7842.c
2393
io_write(sd, 0x71, irq_status[2]);
drivers/media/i2c/adv7842.c
2395
io_write(sd, 0x76, irq_status[3]);
drivers/media/i2c/adv7842.c
2397
io_write(sd, 0x9e, irq_status[4]);
drivers/media/i2c/adv7842.c
2399
io_write(sd, 0x67, irq_status[5]);
drivers/media/i2c/adv7842.c
2401
adv7842_irq_enable(sd, true);
drivers/media/i2c/adv7842.c
2403
v4l2_dbg(1, debug, sd, "%s: irq %x, %x, %x, %x, %x, %x\n", __func__,
drivers/media/i2c/adv7842.c
2417
if (is_digital_input(sd))
drivers/media/i2c/adv7842.c
2424
v4l2_dbg(1, debug, sd,
drivers/media/i2c/adv7842.c
2428
v4l2_subdev_notify_event(sd, &adv7842_ev_fmt);
drivers/media/i2c/adv7842.c
2435
v4l2_dbg(1, debug, sd, "%s: irq %s mode\n", __func__,
drivers/media/i2c/adv7842.c
2436
(io_read(sd, 0x65) & 0x08) ? "HDMI" : "DVI");
drivers/media/i2c/adv7842.c
2437
set_rgb_quantization_range(sd);
drivers/media/i2c/adv7842.c
2444
adv7842_cec_isr(sd, handled);
drivers/media/i2c/adv7842.c
2449
v4l2_dbg(1, debug, sd, "%s: irq tx_5v\n", __func__);
drivers/media/i2c/adv7842.c
2450
adv7842_s_detect_tx_5v_ctrl(sd);
drivers/media/i2c/adv7842.c
2457
static int adv7842_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
drivers/media/i2c/adv7842.c
2459
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
2509
static int adv7842_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *e)
drivers/media/i2c/adv7842.c
2511
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
252
static inline struct adv7842_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
254
return container_of(sd, struct adv7842_state, sd);
drivers/media/i2c/adv7842.c
2542
err = edid_write_vga_segment(sd);
drivers/media/i2c/adv7842.c
2553
adv7842_s_detect_tx_5v_ctrl(sd);
drivers/media/i2c/adv7842.c
2555
err = edid_write_hdmi_segment(sd, e->pad);
drivers/media/i2c/adv7842.c
2561
v4l2_err(sd, "error %d writing edid on port %d\n", err, e->pad);
drivers/media/i2c/adv7842.c
2579
static int adv7842_read_infoframe_buf(struct v4l2_subdev *sd, int index,
drivers/media/i2c/adv7842.c
2585
if (!(io_read(sd, 0x60) & cri->present_mask)) {
drivers/media/i2c/adv7842.c
2586
v4l2_dbg(1, debug, sd,
drivers/media/i2c/adv7842.c
259
return &container_of(ctrl->handler, struct adv7842_state, hdl)->sd;
drivers/media/i2c/adv7842.c
2592
buf[i] = infoframe_read(sd, cri->head_addr + i);
drivers/media/i2c/adv7842.c
2597
v4l2_err(sd, "%s: invalid %s infoframe length %d\n",
drivers/media/i2c/adv7842.c
2603
buf[i + 3] = infoframe_read(sd, cri->payload_addr + i);
drivers/media/i2c/adv7842.c
2607
static void adv7842_log_infoframes(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
2609
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7842.c
2615
if (!(hdmi_read(sd, 0x05) & 0x80)) {
drivers/media/i2c/adv7842.c
2616
v4l2_info(sd, "receive DVI-D signal, no infoframes\n");
drivers/media/i2c/adv7842.c
2621
len = adv7842_read_infoframe_buf(sd, i, buffer);
drivers/media/i2c/adv7842.c
2626
v4l2_err(sd, "%s: unpack of %s infoframe failed\n",
drivers/media/i2c/adv7842.c
2655
static int adv7842_sdp_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
2658
u8 sdp_signal_detected = sdp_read(sd, 0x5A) & 0x01;
drivers/media/i2c/adv7842.c
2660
v4l2_info(sd, "Chip powered %s\n", no_power(sd) ? "off" : "on");
drivers/media/i2c/adv7842.c
2661
v4l2_info(sd, "Prim-mode = 0x%x, video std = 0x%x\n",
drivers/media/i2c/adv7842.c
2662
io_read(sd, 0x01) & 0x0f, io_read(sd, 0x00) & 0x3f);
drivers/media/i2c/adv7842.c
2664
v4l2_info(sd, "SDP: free run: %s\n",
drivers/media/i2c/adv7842.c
2665
(sdp_read(sd, 0x56) & 0x01) ? "on" : "off");
drivers/media/i2c/adv7842.c
2666
v4l2_info(sd, "SDP: %s\n", sdp_signal_detected ?
drivers/media/i2c/adv7842.c
2683
v4l2_info(sd, "SDP: standard %s\n",
drivers/media/i2c/adv7842.c
2684
sdp_std_txt[sdp_read(sd, 0x52) & 0x0f]);
drivers/media/i2c/adv7842.c
2685
v4l2_info(sd, "SDP: %s\n",
drivers/media/i2c/adv7842.c
2686
(sdp_read(sd, 0x59) & 0x08) ? "50Hz" : "60Hz");
drivers/media/i2c/adv7842.c
2687
v4l2_info(sd, "SDP: %s\n",
drivers/media/i2c/adv7842.c
2688
(sdp_read(sd, 0x57) & 0x08) ? "Interlaced" : "Progressive");
drivers/media/i2c/adv7842.c
2689
v4l2_info(sd, "SDP: deinterlacer %s\n",
drivers/media/i2c/adv7842.c
2690
(sdp_read(sd, 0x12) & 0x08) ? "enabled" : "disabled");
drivers/media/i2c/adv7842.c
2691
v4l2_info(sd, "SDP: csc %s mode\n",
drivers/media/i2c/adv7842.c
2692
(sdp_io_read(sd, 0xe0) & 0x40) ? "auto" : "manual");
drivers/media/i2c/adv7842.c
2697
static int adv7842_cp_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
2700
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
2703
u8 reg_io_0x02 = io_read(sd, 0x02);
drivers/media/i2c/adv7842.c
2704
u8 reg_io_0x21 = io_read(sd, 0x21);
drivers/media/i2c/adv7842.c
2705
u8 reg_rep_0x77 = rep_read(sd, 0x77);
drivers/media/i2c/adv7842.c
2706
u8 reg_rep_0x7d = rep_read(sd, 0x7d);
drivers/media/i2c/adv7842.c
2707
bool audio_pll_locked = hdmi_read(sd, 0x04) & 0x01;
drivers/media/i2c/adv7842.c
2708
bool audio_sample_packet_detect = hdmi_read(sd, 0x18) & 0x01;
drivers/media/i2c/adv7842.c
2709
bool audio_mute = io_read(sd, 0x65) & 0x40;
drivers/media/i2c/adv7842.c
2737
v4l2_info(sd, "-----Chip status-----\n");
drivers/media/i2c/adv7842.c
2738
v4l2_info(sd, "Chip power: %s\n", no_power(sd) ? "off" : "on");
drivers/media/i2c/adv7842.c
2739
v4l2_info(sd, "HDMI/DVI-D port selected: %s\n",
drivers/media/i2c/adv7842.c
2741
v4l2_info(sd, "EDID A %s, B %s\n",
drivers/media/i2c/adv7842.c
2746
v4l2_info(sd, "HPD A %s, B %s\n",
drivers/media/i2c/adv7842.c
2749
v4l2_info(sd, "CEC: %s\n", state->cec_enabled_adap ?
drivers/media/i2c/adv7842.c
2758
v4l2_info(sd, "CEC Logical Address: 0x%x\n",
drivers/media/i2c/adv7842.c
2763
v4l2_info(sd, "-----Signal status-----\n");
drivers/media/i2c/adv7842.c
2765
v4l2_info(sd, "Cable detected (+5V power): %s\n",
drivers/media/i2c/adv7842.c
2766
io_read(sd, 0x6f) & 0x02 ? "true" : "false");
drivers/media/i2c/adv7842.c
2767
v4l2_info(sd, "TMDS signal detected: %s\n",
drivers/media/i2c/adv7842.c
2768
(io_read(sd, 0x6a) & 0x02) ? "true" : "false");
drivers/media/i2c/adv7842.c
2769
v4l2_info(sd, "TMDS signal locked: %s\n",
drivers/media/i2c/adv7842.c
2770
(io_read(sd, 0x6a) & 0x20) ? "true" : "false");
drivers/media/i2c/adv7842.c
2772
v4l2_info(sd, "Cable detected (+5V power):%s\n",
drivers/media/i2c/adv7842.c
2773
io_read(sd, 0x6f) & 0x01 ? "true" : "false");
drivers/media/i2c/adv7842.c
2774
v4l2_info(sd, "TMDS signal detected: %s\n",
drivers/media/i2c/adv7842.c
2775
(io_read(sd, 0x6a) & 0x01) ? "true" : "false");
drivers/media/i2c/adv7842.c
2776
v4l2_info(sd, "TMDS signal locked: %s\n",
drivers/media/i2c/adv7842.c
2777
(io_read(sd, 0x6a) & 0x10) ? "true" : "false");
drivers/media/i2c/adv7842.c
2779
v4l2_info(sd, "CP free run: %s\n",
drivers/media/i2c/adv7842.c
2780
(!!(cp_read(sd, 0xff) & 0x10) ? "on" : "off"));
drivers/media/i2c/adv7842.c
2781
v4l2_info(sd, "Prim-mode = 0x%x, video std = 0x%x, v_freq = 0x%x\n",
drivers/media/i2c/adv7842.c
2782
io_read(sd, 0x01) & 0x0f, io_read(sd, 0x00) & 0x3f,
drivers/media/i2c/adv7842.c
2783
(io_read(sd, 0x01) & 0x70) >> 4);
drivers/media/i2c/adv7842.c
2785
v4l2_info(sd, "-----Video Timings-----\n");
drivers/media/i2c/adv7842.c
2786
if (no_cp_signal(sd)) {
drivers/media/i2c/adv7842.c
2787
v4l2_info(sd, "STDI: not locked\n");
drivers/media/i2c/adv7842.c
2789
u32 bl = ((cp_read(sd, 0xb1) & 0x3f) << 8) | cp_read(sd, 0xb2);
drivers/media/i2c/adv7842.c
2790
u32 lcf = ((cp_read(sd, 0xb3) & 0x7) << 8) | cp_read(sd, 0xb4);
drivers/media/i2c/adv7842.c
2791
u32 lcvs = cp_read(sd, 0xb3) >> 3;
drivers/media/i2c/adv7842.c
2792
u32 fcl = ((cp_read(sd, 0xb8) & 0x1f) << 8) | cp_read(sd, 0xb9);
drivers/media/i2c/adv7842.c
2793
char hs_pol = ((cp_read(sd, 0xb5) & 0x10) ?
drivers/media/i2c/adv7842.c
2794
((cp_read(sd, 0xb5) & 0x08) ? '+' : '-') : 'x');
drivers/media/i2c/adv7842.c
2795
char vs_pol = ((cp_read(sd, 0xb5) & 0x40) ?
drivers/media/i2c/adv7842.c
2796
((cp_read(sd, 0xb5) & 0x20) ? '+' : '-') : 'x');
drivers/media/i2c/adv7842.c
2797
v4l2_info(sd,
drivers/media/i2c/adv7842.c
2800
(cp_read(sd, 0xb1) & 0x40) ?
drivers/media/i2c/adv7842.c
2804
if (adv7842_query_dv_timings(sd, 0, &timings))
drivers/media/i2c/adv7842.c
2805
v4l2_info(sd, "No video detected\n");
drivers/media/i2c/adv7842.c
2807
v4l2_print_dv_timings(sd->name, "Detected format: ",
drivers/media/i2c/adv7842.c
2809
v4l2_print_dv_timings(sd->name, "Configured format: ",
drivers/media/i2c/adv7842.c
2812
if (no_cp_signal(sd))
drivers/media/i2c/adv7842.c
2815
v4l2_info(sd, "-----Color space-----\n");
drivers/media/i2c/adv7842.c
2816
v4l2_info(sd, "RGB quantization range ctrl: %s\n",
drivers/media/i2c/adv7842.c
2818
v4l2_info(sd, "Input color space: %s\n",
drivers/media/i2c/adv7842.c
2820
v4l2_info(sd, "Output color space: %s %s, alt-gamma %s\n",
drivers/media/i2c/adv7842.c
2825
temp = cp_read(sd, 0xf4) >> 4;
drivers/media/i2c/adv7842.c
2826
v4l2_info(sd, "Color space conversion: %s\n",
drivers/media/i2c/adv7842.c
2829
if (!is_digital_input(sd))
drivers/media/i2c/adv7842.c
2832
v4l2_info(sd, "-----%s status-----\n", is_hdmi(sd) ? "HDMI" : "DVI-D");
drivers/media/i2c/adv7842.c
2833
v4l2_info(sd, "HDCP encrypted content: %s\n",
drivers/media/i2c/adv7842.c
2834
(hdmi_read(sd, 0x05) & 0x40) ? "true" : "false");
drivers/media/i2c/adv7842.c
2835
v4l2_info(sd, "HDCP keys read: %s%s\n",
drivers/media/i2c/adv7842.c
2836
(hdmi_read(sd, 0x04) & 0x20) ? "yes" : "no",
drivers/media/i2c/adv7842.c
2837
(hdmi_read(sd, 0x04) & 0x10) ? "ERROR" : "");
drivers/media/i2c/adv7842.c
2838
if (!is_hdmi(sd))
drivers/media/i2c/adv7842.c
2841
v4l2_info(sd, "Audio: pll %s, samples %s, %s\n",
drivers/media/i2c/adv7842.c
2846
v4l2_info(sd, "Audio format: %s\n",
drivers/media/i2c/adv7842.c
2847
(hdmi_read(sd, 0x07) & 0x40) ? "multi-channel" : "stereo");
drivers/media/i2c/adv7842.c
2849
v4l2_info(sd, "Audio CTS: %u\n", (hdmi_read(sd, 0x5b) << 12) +
drivers/media/i2c/adv7842.c
2850
(hdmi_read(sd, 0x5c) << 8) +
drivers/media/i2c/adv7842.c
2851
(hdmi_read(sd, 0x5d) & 0xf0));
drivers/media/i2c/adv7842.c
2852
v4l2_info(sd, "Audio N: %u\n", ((hdmi_read(sd, 0x5d) & 0x0f) << 16) +
drivers/media/i2c/adv7842.c
2853
(hdmi_read(sd, 0x5e) << 8) +
drivers/media/i2c/adv7842.c
2854
hdmi_read(sd, 0x5f));
drivers/media/i2c/adv7842.c
2855
v4l2_info(sd, "AV Mute: %s\n",
drivers/media/i2c/adv7842.c
2856
(hdmi_read(sd, 0x04) & 0x40) ? "on" : "off");
drivers/media/i2c/adv7842.c
2857
temp = hdmi_read(sd, 0x0b) >> 6;
drivers/media/i2c/adv7842.c
2858
v4l2_info(sd, "Deep color mode: %s\n",
drivers/media/i2c/adv7842.c
2861
adv7842_log_infoframes(sd);
drivers/media/i2c/adv7842.c
2866
static int adv7842_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
2868
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
2871
return adv7842_sdp_log_status(sd);
drivers/media/i2c/adv7842.c
2872
return adv7842_cp_log_status(sd);
drivers/media/i2c/adv7842.c
2875
static int adv7842_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/adv7842.c
2877
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
2879
v4l2_dbg(1, debug, sd, "%s:\n", __func__);
drivers/media/i2c/adv7842.c
2884
if (!(sdp_read(sd, 0x5A) & 0x01)) {
drivers/media/i2c/adv7842.c
2886
v4l2_dbg(1, debug, sd, "%s: no valid signal\n", __func__);
drivers/media/i2c/adv7842.c
2890
switch (sdp_read(sd, 0x52) & 0x0f) {
drivers/media/i2c/adv7842.c
2930
static void adv7842_s_sdp_io(struct v4l2_subdev *sd, struct adv7842_sdp_io_sync_adjustment *s)
drivers/media/i2c/adv7842.c
2933
sdp_io_write(sd, 0x94, (s->hs_beg >> 8) & 0xf);
drivers/media/i2c/adv7842.c
2934
sdp_io_write(sd, 0x95, s->hs_beg & 0xff);
drivers/media/i2c/adv7842.c
2935
sdp_io_write(sd, 0x96, (s->hs_width >> 8) & 0xf);
drivers/media/i2c/adv7842.c
2936
sdp_io_write(sd, 0x97, s->hs_width & 0xff);
drivers/media/i2c/adv7842.c
2937
sdp_io_write(sd, 0x98, (s->de_beg >> 8) & 0xf);
drivers/media/i2c/adv7842.c
2938
sdp_io_write(sd, 0x99, s->de_beg & 0xff);
drivers/media/i2c/adv7842.c
2939
sdp_io_write(sd, 0x9a, (s->de_end >> 8) & 0xf);
drivers/media/i2c/adv7842.c
2940
sdp_io_write(sd, 0x9b, s->de_end & 0xff);
drivers/media/i2c/adv7842.c
2941
sdp_io_write(sd, 0xa8, s->vs_beg_o);
drivers/media/i2c/adv7842.c
2942
sdp_io_write(sd, 0xa9, s->vs_beg_e);
drivers/media/i2c/adv7842.c
2943
sdp_io_write(sd, 0xaa, s->vs_end_o);
drivers/media/i2c/adv7842.c
2944
sdp_io_write(sd, 0xab, s->vs_end_e);
drivers/media/i2c/adv7842.c
2945
sdp_io_write(sd, 0xac, s->de_v_beg_o);
drivers/media/i2c/adv7842.c
2946
sdp_io_write(sd, 0xad, s->de_v_beg_e);
drivers/media/i2c/adv7842.c
2947
sdp_io_write(sd, 0xae, s->de_v_end_o);
drivers/media/i2c/adv7842.c
2948
sdp_io_write(sd, 0xaf, s->de_v_end_e);
drivers/media/i2c/adv7842.c
2951
sdp_io_write(sd, 0x94, 0x00);
drivers/media/i2c/adv7842.c
2952
sdp_io_write(sd, 0x95, 0x00);
drivers/media/i2c/adv7842.c
2953
sdp_io_write(sd, 0x96, 0x00);
drivers/media/i2c/adv7842.c
2954
sdp_io_write(sd, 0x97, 0x20);
drivers/media/i2c/adv7842.c
2955
sdp_io_write(sd, 0x98, 0x00);
drivers/media/i2c/adv7842.c
2956
sdp_io_write(sd, 0x99, 0x00);
drivers/media/i2c/adv7842.c
2957
sdp_io_write(sd, 0x9a, 0x00);
drivers/media/i2c/adv7842.c
2958
sdp_io_write(sd, 0x9b, 0x00);
drivers/media/i2c/adv7842.c
2959
sdp_io_write(sd, 0xa8, 0x04);
drivers/media/i2c/adv7842.c
2960
sdp_io_write(sd, 0xa9, 0x04);
drivers/media/i2c/adv7842.c
2961
sdp_io_write(sd, 0xaa, 0x04);
drivers/media/i2c/adv7842.c
2962
sdp_io_write(sd, 0xab, 0x04);
drivers/media/i2c/adv7842.c
2963
sdp_io_write(sd, 0xac, 0x04);
drivers/media/i2c/adv7842.c
2964
sdp_io_write(sd, 0xad, 0x04);
drivers/media/i2c/adv7842.c
2965
sdp_io_write(sd, 0xae, 0x04);
drivers/media/i2c/adv7842.c
2966
sdp_io_write(sd, 0xaf, 0x04);
drivers/media/i2c/adv7842.c
2970
static int adv7842_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
drivers/media/i2c/adv7842.c
2972
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
2975
v4l2_dbg(1, debug, sd, "%s:\n", __func__);
drivers/media/i2c/adv7842.c
2981
adv7842_s_sdp_io(sd, &pdata->sdp_io_sync_625);
drivers/media/i2c/adv7842.c
2983
adv7842_s_sdp_io(sd, &pdata->sdp_io_sync_525);
drivers/media/i2c/adv7842.c
2985
adv7842_s_sdp_io(sd, NULL);
drivers/media/i2c/adv7842.c
2994
static int adv7842_g_std(struct v4l2_subdev *sd, v4l2_std_id *norm)
drivers/media/i2c/adv7842.c
2996
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
2998
v4l2_dbg(1, debug, sd, "%s:\n", __func__);
drivers/media/i2c/adv7842.c
3009
static int adv7842_core_init(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
3011
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
3013
hdmi_write(sd, 0x48,
drivers/media/i2c/adv7842.c
3017
disable_input(sd);
drivers/media/i2c/adv7842.c
3023
rep_write_and_or(sd, 0x77, 0xd3, 0x20);
drivers/media/i2c/adv7842.c
3026
io_write(sd, 0x0c, 0x42); /* Power up part and power down VDP */
drivers/media/i2c/adv7842.c
3027
io_write(sd, 0x15, 0x80); /* Power up pads */
drivers/media/i2c/adv7842.c
3030
io_write(sd, 0x02, 0xf0 | pdata->alt_gamma << 3);
drivers/media/i2c/adv7842.c
3031
io_write_and_or(sd, 0x05, 0xf0, pdata->blank_data << 3 |
drivers/media/i2c/adv7842.c
3037
hdmi_write_and_or(sd, 0x1a, 0xf1, 0x08); /* Wait 1 s before unmute */
drivers/media/i2c/adv7842.c
3040
io_write_and_or(sd, 0x14, 0xc0,
drivers/media/i2c/adv7842.c
3046
cp_write_and_or(sd, 0xba, 0xfc, pdata->hdmi_free_run_enable |
drivers/media/i2c/adv7842.c
3050
sdp_write_and_or(sd, 0xdd, 0xf0, pdata->sdp_free_run_force |
drivers/media/i2c/adv7842.c
3056
cp_write(sd, 0x69, 0x14); /* Enable CP CSC */
drivers/media/i2c/adv7842.c
3057
io_write(sd, 0x06, 0xa6); /* positive VS and HS and DE */
drivers/media/i2c/adv7842.c
3058
cp_write(sd, 0xf3, 0xdc); /* Low threshold to enter/exit free run mode */
drivers/media/i2c/adv7842.c
3059
afe_write(sd, 0xb5, 0x01); /* Setting MCLK to 256Fs */
drivers/media/i2c/adv7842.c
3061
afe_write(sd, 0x02, pdata->ain_sel); /* Select analog input muxing mode */
drivers/media/i2c/adv7842.c
3062
io_write_and_or(sd, 0x30, ~(1 << 4), pdata->output_bus_lsb_to_msb << 4);
drivers/media/i2c/adv7842.c
3064
sdp_csc_coeff(sd, &pdata->sdp_csc_coeff);
drivers/media/i2c/adv7842.c
3068
sdp_write(sd, 0x12, 0x0d); /* Frame TBC,3D comb enabled */
drivers/media/i2c/adv7842.c
3071
sdp_io_write(sd, 0x6f, 0x00); /* DDR mode */
drivers/media/i2c/adv7842.c
3072
sdp_io_write(sd, 0x75, 0x0a); /* 128 MB memory size */
drivers/media/i2c/adv7842.c
3073
sdp_io_write(sd, 0x7a, 0xa5); /* Timing Adjustment */
drivers/media/i2c/adv7842.c
3074
sdp_io_write(sd, 0x7b, 0x8f); /* Timing Adjustment */
drivers/media/i2c/adv7842.c
3075
sdp_io_write(sd, 0x60, 0x01); /* SDRAM reset */
drivers/media/i2c/adv7842.c
3077
sdp_io_write(sd, 0x75, 0x0a); /* 64 MB memory size ?*/
drivers/media/i2c/adv7842.c
3078
sdp_io_write(sd, 0x74, 0x00); /* must be zero for sdr sdram */
drivers/media/i2c/adv7842.c
3079
sdp_io_write(sd, 0x79, 0x33); /* CAS latency to 3,
drivers/media/i2c/adv7842.c
3081
sdp_io_write(sd, 0x6f, 0x01); /* SDR mode */
drivers/media/i2c/adv7842.c
3082
sdp_io_write(sd, 0x7a, 0xa5); /* Timing Adjustment */
drivers/media/i2c/adv7842.c
3083
sdp_io_write(sd, 0x7b, 0x8f); /* Timing Adjustment */
drivers/media/i2c/adv7842.c
3084
sdp_io_write(sd, 0x60, 0x01); /* SDRAM reset */
drivers/media/i2c/adv7842.c
3091
sdp_io_write(sd, 0x29, 0x10); /* Tristate memory interface */
drivers/media/i2c/adv7842.c
3094
select_input(sd, pdata->vid_std_select);
drivers/media/i2c/adv7842.c
3096
enable_input(sd);
drivers/media/i2c/adv7842.c
3100
hdmi_write(sd, 0x69, 0x5c);
drivers/media/i2c/adv7842.c
3103
hdmi_write(sd, 0x69, 0xa3);
drivers/media/i2c/adv7842.c
3105
io_write_and_or(sd, 0x20, 0xcf, 0x00);
drivers/media/i2c/adv7842.c
3109
io_write(sd, 0x19, 0x80 | pdata->llc_dll_phase);
drivers/media/i2c/adv7842.c
3110
io_write(sd, 0x33, 0x40);
drivers/media/i2c/adv7842.c
3113
io_write(sd, 0x40, 0xf2); /* Configure INT1 */
drivers/media/i2c/adv7842.c
3115
adv7842_irq_enable(sd, true);
drivers/media/i2c/adv7842.c
3117
return v4l2_ctrl_handler_setup(sd->ctrl_handler);
drivers/media/i2c/adv7842.c
3122
static int adv7842_ddr_ram_test(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
3135
io_write(sd, 0x00, 0x01); /* Program SDP 4x1 */
drivers/media/i2c/adv7842.c
3136
io_write(sd, 0x01, 0x00); /* Program SDP mode */
drivers/media/i2c/adv7842.c
3137
afe_write(sd, 0x80, 0x92); /* SDP Recommended Write */
drivers/media/i2c/adv7842.c
3138
afe_write(sd, 0x9B, 0x01); /* SDP Recommended Write ADV7844ES1 */
drivers/media/i2c/adv7842.c
3139
afe_write(sd, 0x9C, 0x60); /* SDP Recommended Write ADV7844ES1 */
drivers/media/i2c/adv7842.c
3140
afe_write(sd, 0x9E, 0x02); /* SDP Recommended Write ADV7844ES1 */
drivers/media/i2c/adv7842.c
3141
afe_write(sd, 0xA0, 0x0B); /* SDP Recommended Write ADV7844ES1 */
drivers/media/i2c/adv7842.c
3142
afe_write(sd, 0xC3, 0x02); /* Memory BIST Initialisation */
drivers/media/i2c/adv7842.c
3143
io_write(sd, 0x0C, 0x40); /* Power up ADV7844 */
drivers/media/i2c/adv7842.c
3144
io_write(sd, 0x15, 0xBA); /* Enable outputs */
drivers/media/i2c/adv7842.c
3145
sdp_write(sd, 0x12, 0x00); /* Disable 3D comb, Frame TBC & 3DNR */
drivers/media/i2c/adv7842.c
3146
io_write(sd, 0xFF, 0x04); /* Reset memory controller */
drivers/media/i2c/adv7842.c
3150
sdp_write(sd, 0x12, 0x00); /* Disable 3D Comb, Frame TBC & 3DNR */
drivers/media/i2c/adv7842.c
3151
sdp_io_write(sd, 0x2A, 0x01); /* Memory BIST Initialisation */
drivers/media/i2c/adv7842.c
3152
sdp_io_write(sd, 0x7c, 0x19); /* Memory BIST Initialisation */
drivers/media/i2c/adv7842.c
3153
sdp_io_write(sd, 0x80, 0x87); /* Memory BIST Initialisation */
drivers/media/i2c/adv7842.c
3154
sdp_io_write(sd, 0x81, 0x4a); /* Memory BIST Initialisation */
drivers/media/i2c/adv7842.c
3155
sdp_io_write(sd, 0x82, 0x2c); /* Memory BIST Initialisation */
drivers/media/i2c/adv7842.c
3156
sdp_io_write(sd, 0x83, 0x0e); /* Memory BIST Initialisation */
drivers/media/i2c/adv7842.c
3157
sdp_io_write(sd, 0x84, 0x94); /* Memory BIST Initialisation */
drivers/media/i2c/adv7842.c
3158
sdp_io_write(sd, 0x85, 0x62); /* Memory BIST Initialisation */
drivers/media/i2c/adv7842.c
3159
sdp_io_write(sd, 0x7d, 0x00); /* Memory BIST Initialisation */
drivers/media/i2c/adv7842.c
3160
sdp_io_write(sd, 0x7e, 0x1a); /* Memory BIST Initialisation */
drivers/media/i2c/adv7842.c
3164
sdp_io_write(sd, 0xd9, 0xd5); /* Enable BIST Test */
drivers/media/i2c/adv7842.c
3165
sdp_write(sd, 0x12, 0x05); /* Enable FRAME TBC & 3D COMB */
drivers/media/i2c/adv7842.c
3170
u8 result = sdp_io_read(sd, 0xdb);
drivers/media/i2c/adv7842.c
3181
v4l2_dbg(1, debug, sd,
drivers/media/i2c/adv7842.c
3190
static void adv7842_rewrite_i2c_addresses(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
3193
io_write(sd, 0xf1, pdata->i2c_sdp << 1);
drivers/media/i2c/adv7842.c
3194
io_write(sd, 0xf2, pdata->i2c_sdp_io << 1);
drivers/media/i2c/adv7842.c
3195
io_write(sd, 0xf3, pdata->i2c_avlink << 1);
drivers/media/i2c/adv7842.c
3196
io_write(sd, 0xf4, pdata->i2c_cec << 1);
drivers/media/i2c/adv7842.c
3197
io_write(sd, 0xf5, pdata->i2c_infoframe << 1);
drivers/media/i2c/adv7842.c
3199
io_write(sd, 0xf8, pdata->i2c_afe << 1);
drivers/media/i2c/adv7842.c
3200
io_write(sd, 0xf9, pdata->i2c_repeater << 1);
drivers/media/i2c/adv7842.c
3201
io_write(sd, 0xfa, pdata->i2c_edid << 1);
drivers/media/i2c/adv7842.c
3202
io_write(sd, 0xfb, pdata->i2c_hdmi << 1);
drivers/media/i2c/adv7842.c
3204
io_write(sd, 0xfd, pdata->i2c_cp << 1);
drivers/media/i2c/adv7842.c
3205
io_write(sd, 0xfe, pdata->i2c_vdp << 1);
drivers/media/i2c/adv7842.c
3208
static int adv7842_command_ram_test(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
3210
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7842.c
3211
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
3220
v4l2_info(sd, "no sdram or no ddr sdram\n");
drivers/media/i2c/adv7842.c
3224
main_reset(sd);
drivers/media/i2c/adv7842.c
3226
adv7842_rewrite_i2c_addresses(sd, pdata);
drivers/media/i2c/adv7842.c
3229
ret = adv7842_ddr_ram_test(sd);
drivers/media/i2c/adv7842.c
3231
main_reset(sd);
drivers/media/i2c/adv7842.c
3233
adv7842_rewrite_i2c_addresses(sd, pdata);
drivers/media/i2c/adv7842.c
3236
adv7842_core_init(sd);
drivers/media/i2c/adv7842.c
3238
disable_input(sd);
drivers/media/i2c/adv7842.c
3240
select_input(sd, state->vid_std_select);
drivers/media/i2c/adv7842.c
3242
enable_input(sd);
drivers/media/i2c/adv7842.c
3244
edid_write_vga_segment(sd);
drivers/media/i2c/adv7842.c
3245
edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_A);
drivers/media/i2c/adv7842.c
3246
edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_B);
drivers/media/i2c/adv7842.c
3252
adv7842_s_dv_timings(sd, 0, &timings);
drivers/media/i2c/adv7842.c
3257
static long adv7842_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
drivers/media/i2c/adv7842.c
3261
return adv7842_command_ram_test(sd);
drivers/media/i2c/adv7842.c
3266
static int adv7842_subscribe_event(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
3272
return v4l2_src_change_event_subdev_subscribe(sd, fh, sub);
drivers/media/i2c/adv7842.c
3274
return v4l2_ctrl_subdev_subscribe_event(sd, fh, sub);
drivers/media/i2c/adv7842.c
3285
struct v4l2_subdev *sd = priv;
drivers/media/i2c/adv7842.c
3289
if (!is_hdmi(sd))
drivers/media/i2c/adv7842.c
3309
len = adv7842_read_infoframe_buf(sd, index, buf);
drivers/media/i2c/adv7842.c
3315
static int adv7842_registered(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
3317
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
3318
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7842.c
3325
state->debugfs_dir = debugfs_create_dir(sd->name, v4l2_debugfs_root());
drivers/media/i2c/adv7842.c
3328
V4L2_DEBUGFS_IF_SPD | V4L2_DEBUGFS_IF_HDMI, sd,
drivers/media/i2c/adv7842.c
3334
static void adv7842_unregistered(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
3336
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
3429
static void adv7842_unregister_clients(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
343
static inline int io_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7842.c
3431
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
345
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7842.c
3457
static struct i2c_client *adv7842_dummy_client(struct v4l2_subdev *sd, const char *desc,
drivers/media/i2c/adv7842.c
3460
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7842.c
3463
io_write(sd, io_reg, addr << 1);
drivers/media/i2c/adv7842.c
3466
v4l2_err(sd, "no %s i2c addr configured\n", desc);
drivers/media/i2c/adv7842.c
3470
cp = i2c_new_dummy_device(client->adapter, io_read(sd, io_reg) >> 1);
drivers/media/i2c/adv7842.c
3472
v4l2_err(sd, "register %s on i2c addr 0x%x failed with %pe\n",
drivers/media/i2c/adv7842.c
3480
static int adv7842_register_clients(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
3482
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
3485
state->i2c_avlink = adv7842_dummy_client(sd, "avlink", pdata->i2c_avlink, 0xf3);
drivers/media/i2c/adv7842.c
3486
state->i2c_cec = adv7842_dummy_client(sd, "cec", pdata->i2c_cec, 0xf4);
drivers/media/i2c/adv7842.c
3487
state->i2c_infoframe = adv7842_dummy_client(sd, "infoframe", pdata->i2c_infoframe, 0xf5);
drivers/media/i2c/adv7842.c
3488
state->i2c_sdp_io = adv7842_dummy_client(sd, "sdp_io", pdata->i2c_sdp_io, 0xf2);
drivers/media/i2c/adv7842.c
3489
state->i2c_sdp = adv7842_dummy_client(sd, "sdp", pdata->i2c_sdp, 0xf1);
drivers/media/i2c/adv7842.c
3490
state->i2c_afe = adv7842_dummy_client(sd, "afe", pdata->i2c_afe, 0xf8);
drivers/media/i2c/adv7842.c
3491
state->i2c_repeater = adv7842_dummy_client(sd, "repeater", pdata->i2c_repeater, 0xf9);
drivers/media/i2c/adv7842.c
3492
state->i2c_edid = adv7842_dummy_client(sd, "edid", pdata->i2c_edid, 0xfa);
drivers/media/i2c/adv7842.c
3493
state->i2c_hdmi = adv7842_dummy_client(sd, "hdmi", pdata->i2c_hdmi, 0xfb);
drivers/media/i2c/adv7842.c
3494
state->i2c_cp = adv7842_dummy_client(sd, "cp", pdata->i2c_cp, 0xfd);
drivers/media/i2c/adv7842.c
3495
state->i2c_vdp = adv7842_dummy_client(sd, "vdp", pdata->i2c_vdp, 0xfe);
drivers/media/i2c/adv7842.c
350
static inline int io_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7842.c
352
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7842.c
3521
struct v4l2_subdev *sd;
drivers/media/i2c/adv7842.c
3547
sd = &state->sd;
drivers/media/i2c/adv7842.c
3548
v4l2_i2c_subdev_init(sd, client, &adv7842_ops);
drivers/media/i2c/adv7842.c
3549
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/i2c/adv7842.c
3550
sd->internal_ops = &adv7842_int_ops;
drivers/media/i2c/adv7842.c
3560
v4l2_info(sd, "got rev=0x%04x on first read attempt\n", rev);
drivers/media/i2c/adv7842.c
3565
v4l2_info(sd, "not an adv7842 on address 0x%x (rev=0x%04x)\n",
drivers/media/i2c/adv7842.c
357
static inline int io_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
drivers/media/i2c/adv7842.c
3571
main_reset(sd);
drivers/media/i2c/adv7842.c
359
return io_write(sd, reg, (io_read(sd, reg) & mask) | val);
drivers/media/i2c/adv7842.c
3605
sd->ctrl_handler = hdl;
drivers/media/i2c/adv7842.c
3610
if (adv7842_s_detect_tx_5v_ctrl(sd)) {
drivers/media/i2c/adv7842.c
3615
if (adv7842_register_clients(sd) < 0) {
drivers/media/i2c/adv7842.c
3617
v4l2_err(sd, "failed to create all i2c clients\n");
drivers/media/i2c/adv7842.c
362
static inline int io_write_clr_set(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
3625
sd->entity.function = MEDIA_ENT_F_DV_DECODER;
drivers/media/i2c/adv7842.c
3629
err = media_entity_pads_init(&sd->entity, ADV7842_PAD_SOURCE + 1,
drivers/media/i2c/adv7842.c
3634
err = adv7842_core_init(sd);
drivers/media/i2c/adv7842.c
3647
v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
drivers/media/i2c/adv7842.c
365
return io_write(sd, reg, (io_read(sd, reg) & ~mask) | val);
drivers/media/i2c/adv7842.c
3652
media_entity_cleanup(&sd->entity);
drivers/media/i2c/adv7842.c
3654
adv7842_unregister_clients(sd);
drivers/media/i2c/adv7842.c
3664
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/adv7842.c
3665
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
3667
adv7842_irq_enable(sd, false);
drivers/media/i2c/adv7842.c
3669
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/adv7842.c
3670
media_entity_cleanup(&sd->entity);
drivers/media/i2c/adv7842.c
3671
adv7842_unregister_clients(sd);
drivers/media/i2c/adv7842.c
3672
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/adv7842.c
368
static inline int avlink_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7842.c
370
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
375
static inline int avlink_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7842.c
377
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
382
static inline int cec_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7842.c
384
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
389
static inline int cec_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7842.c
391
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
396
static inline int cec_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
drivers/media/i2c/adv7842.c
398
return cec_write(sd, reg, (cec_read(sd, reg) & ~mask) | val);
drivers/media/i2c/adv7842.c
401
static inline int infoframe_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7842.c
403
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
408
static inline int infoframe_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7842.c
410
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
415
static inline int sdp_io_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7842.c
417
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
422
static inline int sdp_io_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7842.c
424
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
429
static inline int sdp_io_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
drivers/media/i2c/adv7842.c
431
return sdp_io_write(sd, reg, (sdp_io_read(sd, reg) & mask) | val);
drivers/media/i2c/adv7842.c
434
static inline int sdp_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7842.c
436
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
441
static inline int sdp_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7842.c
443
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
448
static inline int sdp_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
drivers/media/i2c/adv7842.c
450
return sdp_write(sd, reg, (sdp_read(sd, reg) & mask) | val);
drivers/media/i2c/adv7842.c
453
static inline int afe_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7842.c
455
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
460
static inline int afe_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7842.c
462
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
467
static inline int afe_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
drivers/media/i2c/adv7842.c
469
return afe_write(sd, reg, (afe_read(sd, reg) & mask) | val);
drivers/media/i2c/adv7842.c
472
static inline int rep_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7842.c
474
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
479
static inline int rep_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7842.c
481
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
486
static inline int rep_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
drivers/media/i2c/adv7842.c
488
return rep_write(sd, reg, (rep_read(sd, reg) & mask) | val);
drivers/media/i2c/adv7842.c
491
static inline int edid_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7842.c
493
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
498
static inline int edid_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7842.c
500
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
505
static inline int hdmi_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7842.c
507
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
512
static inline int hdmi_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7842.c
514
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
519
static inline int hdmi_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
drivers/media/i2c/adv7842.c
521
return hdmi_write(sd, reg, (hdmi_read(sd, reg) & mask) | val);
drivers/media/i2c/adv7842.c
524
static inline int cp_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7842.c
526
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
531
static inline int cp_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7842.c
533
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
538
static inline int cp_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val)
drivers/media/i2c/adv7842.c
540
return cp_write(sd, reg, (cp_read(sd, reg) & mask) | val);
drivers/media/i2c/adv7842.c
543
static inline int vdp_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/adv7842.c
545
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
550
static inline int vdp_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/adv7842.c
552
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
557
static void main_reset(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
559
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7842.c
561
v4l2_dbg(1, debug, sd, "%s:\n", __func__);
drivers/media/i2c/adv7842.c
628
static inline bool is_analog_input(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
630
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
636
static inline bool is_digital_input(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
638
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
666
adv7842_get_dv_timings_cap(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
668
return is_digital_input(sd) ? &adv7842_timings_cap_digital :
drivers/media/i2c/adv7842.c
674
static u16 adv7842_read_cable_det(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
676
u8 reg = io_read(sd, 0x6f);
drivers/media/i2c/adv7842.c
691
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/adv7842.c
695
v4l2_dbg(2, debug, sd, "%s: enable hotplug on ports: 0x%x\n",
drivers/media/i2c/adv7842.c
702
io_write_and_or(sd, 0x20, 0xcf, mask);
drivers/media/i2c/adv7842.c
705
static int edid_write_vga_segment(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
707
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7842.c
708
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
714
v4l2_dbg(2, debug, sd, "%s: write EDID on VGA port\n", __func__);
drivers/media/i2c/adv7842.c
720
io_write_and_or(sd, 0x20, 0xcf, 0x00);
drivers/media/i2c/adv7842.c
723
rep_write_and_or(sd, 0x7f, 0x7f, 0x00);
drivers/media/i2c/adv7842.c
726
rep_write_and_or(sd, 0x77, 0xef, 0x10);
drivers/media/i2c/adv7842.c
738
rep_write_and_or(sd, 0x7f, 0x7f, 0x80);
drivers/media/i2c/adv7842.c
741
if (rep_read(sd, 0x79) & 0x20)
drivers/media/i2c/adv7842.c
756
static int edid_write_hdmi_segment(struct v4l2_subdev *sd, u8 port)
drivers/media/i2c/adv7842.c
758
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/adv7842.c
759
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
767
v4l2_dbg(2, debug, sd, "%s: write EDID on port %c\n",
drivers/media/i2c/adv7842.c
771
io_write_and_or(sd, 0x20, 0xcf, 0x00);
drivers/media/i2c/adv7842.c
774
rep_write_and_or(sd, 0x77, 0xf3, 0x00);
drivers/media/i2c/adv7842.c
799
rep_write_and_or(sd, 0x77, 0xef, i >= 256 ? 0x10 : 0x00);
drivers/media/i2c/adv7842.c
807
rep_write(sd, 0x72, pa >> 8);
drivers/media/i2c/adv7842.c
808
rep_write(sd, 0x73, pa & 0xff);
drivers/media/i2c/adv7842.c
810
rep_write(sd, 0x74, pa >> 8);
drivers/media/i2c/adv7842.c
811
rep_write(sd, 0x75, pa & 0xff);
drivers/media/i2c/adv7842.c
813
rep_write(sd, 0x76, spa_loc & 0xff);
drivers/media/i2c/adv7842.c
814
rep_write_and_or(sd, 0x77, 0xbf, (spa_loc >> 2) & 0x40);
drivers/media/i2c/adv7842.c
819
rep_write_and_or(sd, 0x77, 0xf3, state->hdmi_edid.present);
drivers/media/i2c/adv7842.c
822
if (rep_read(sd, 0x7d) & state->hdmi_edid.present)
drivers/media/i2c/adv7842.c
842
static void adv7842_inv_register(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
844
v4l2_info(sd, "0x000-0x0ff: IO Map\n");
drivers/media/i2c/adv7842.c
845
v4l2_info(sd, "0x100-0x1ff: AVLink Map\n");
drivers/media/i2c/adv7842.c
846
v4l2_info(sd, "0x200-0x2ff: CEC Map\n");
drivers/media/i2c/adv7842.c
847
v4l2_info(sd, "0x300-0x3ff: InfoFrame Map\n");
drivers/media/i2c/adv7842.c
848
v4l2_info(sd, "0x400-0x4ff: SDP_IO Map\n");
drivers/media/i2c/adv7842.c
849
v4l2_info(sd, "0x500-0x5ff: SDP Map\n");
drivers/media/i2c/adv7842.c
850
v4l2_info(sd, "0x600-0x6ff: AFE Map\n");
drivers/media/i2c/adv7842.c
851
v4l2_info(sd, "0x700-0x7ff: Repeater Map\n");
drivers/media/i2c/adv7842.c
852
v4l2_info(sd, "0x800-0x8ff: EDID Map\n");
drivers/media/i2c/adv7842.c
853
v4l2_info(sd, "0x900-0x9ff: HDMI Map\n");
drivers/media/i2c/adv7842.c
854
v4l2_info(sd, "0xa00-0xaff: CP Map\n");
drivers/media/i2c/adv7842.c
855
v4l2_info(sd, "0xb00-0xbff: VDP Map\n");
drivers/media/i2c/adv7842.c
858
static int adv7842_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
864
reg->val = io_read(sd, reg->reg & 0xff);
drivers/media/i2c/adv7842.c
867
reg->val = avlink_read(sd, reg->reg & 0xff);
drivers/media/i2c/adv7842.c
870
reg->val = cec_read(sd, reg->reg & 0xff);
drivers/media/i2c/adv7842.c
873
reg->val = infoframe_read(sd, reg->reg & 0xff);
drivers/media/i2c/adv7842.c
876
reg->val = sdp_io_read(sd, reg->reg & 0xff);
drivers/media/i2c/adv7842.c
879
reg->val = sdp_read(sd, reg->reg & 0xff);
drivers/media/i2c/adv7842.c
882
reg->val = afe_read(sd, reg->reg & 0xff);
drivers/media/i2c/adv7842.c
885
reg->val = rep_read(sd, reg->reg & 0xff);
drivers/media/i2c/adv7842.c
888
reg->val = edid_read(sd, reg->reg & 0xff);
drivers/media/i2c/adv7842.c
891
reg->val = hdmi_read(sd, reg->reg & 0xff);
drivers/media/i2c/adv7842.c
894
reg->val = cp_read(sd, reg->reg & 0xff);
drivers/media/i2c/adv7842.c
897
reg->val = vdp_read(sd, reg->reg & 0xff);
drivers/media/i2c/adv7842.c
90
struct v4l2_subdev sd;
drivers/media/i2c/adv7842.c
900
v4l2_info(sd, "Register %03llx not supported\n", reg->reg);
drivers/media/i2c/adv7842.c
901
adv7842_inv_register(sd);
drivers/media/i2c/adv7842.c
907
static int adv7842_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
914
io_write(sd, reg->reg & 0xff, val);
drivers/media/i2c/adv7842.c
917
avlink_write(sd, reg->reg & 0xff, val);
drivers/media/i2c/adv7842.c
920
cec_write(sd, reg->reg & 0xff, val);
drivers/media/i2c/adv7842.c
923
infoframe_write(sd, reg->reg & 0xff, val);
drivers/media/i2c/adv7842.c
926
sdp_io_write(sd, reg->reg & 0xff, val);
drivers/media/i2c/adv7842.c
929
sdp_write(sd, reg->reg & 0xff, val);
drivers/media/i2c/adv7842.c
932
afe_write(sd, reg->reg & 0xff, val);
drivers/media/i2c/adv7842.c
935
rep_write(sd, reg->reg & 0xff, val);
drivers/media/i2c/adv7842.c
938
edid_write(sd, reg->reg & 0xff, val);
drivers/media/i2c/adv7842.c
941
hdmi_write(sd, reg->reg & 0xff, val);
drivers/media/i2c/adv7842.c
944
cp_write(sd, reg->reg & 0xff, val);
drivers/media/i2c/adv7842.c
947
vdp_write(sd, reg->reg & 0xff, val);
drivers/media/i2c/adv7842.c
950
v4l2_info(sd, "Register %03llx not supported\n", reg->reg);
drivers/media/i2c/adv7842.c
951
adv7842_inv_register(sd);
drivers/media/i2c/adv7842.c
958
static int adv7842_s_detect_tx_5v_ctrl(struct v4l2_subdev *sd)
drivers/media/i2c/adv7842.c
960
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
961
u16 cable_det = adv7842_read_cable_det(sd);
drivers/media/i2c/adv7842.c
963
v4l2_dbg(1, debug, sd, "%s: 0x%x\n", __func__, cable_det);
drivers/media/i2c/adv7842.c
968
static int find_and_set_predefined_video_timings(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
977
is_digital_input(sd) ? 250000 : 1000000, false))
drivers/media/i2c/adv7842.c
980
io_write(sd, 0x00, predef_vid_timings[i].vid_std);
drivers/media/i2c/adv7842.c
982
io_write(sd, 0x01, (predef_vid_timings[i].v_freq << 4) + prim_mode);
drivers/media/i2c/adv7842.c
989
static int configure_predefined_video_timings(struct v4l2_subdev *sd,
drivers/media/i2c/adv7842.c
992
struct adv7842_state *state = to_state(sd);
drivers/media/i2c/adv7842.c
995
v4l2_dbg(1, debug, sd, "%s\n", __func__);
drivers/media/i2c/adv7842.c
998
io_write(sd, 0x16, 0x43);
drivers/media/i2c/adv7842.c
999
io_write(sd, 0x17, 0x5a);
drivers/media/i2c/ak7375.c
133
static int ak7375_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ak7375.c
135
return pm_runtime_resume_and_get(sd->dev);
drivers/media/i2c/ak7375.c
138
static int ak7375_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ak7375.c
140
pm_runtime_put(sd->dev);
drivers/media/i2c/ak7375.c
154
v4l2_async_unregister_subdev(&ak7375_dev->sd);
drivers/media/i2c/ak7375.c
156
media_entity_cleanup(&ak7375_dev->sd.entity);
drivers/media/i2c/ak7375.c
171
dev_err(dev_vcm->sd.dev, "%s fail error: 0x%x\n",
drivers/media/i2c/ak7375.c
173
dev_vcm->sd.ctrl_handler = hdl;
drivers/media/i2c/ak7375.c
202
v4l2_i2c_subdev_init(&ak7375_dev->sd, client, &ak7375_ops);
drivers/media/i2c/ak7375.c
203
ak7375_dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ak7375.c
204
ak7375_dev->sd.internal_ops = &ak7375_int_ops;
drivers/media/i2c/ak7375.c
205
ak7375_dev->sd.entity.function = MEDIA_ENT_F_LENS;
drivers/media/i2c/ak7375.c
211
ret = media_entity_pads_init(&ak7375_dev->sd.entity, 0, NULL);
drivers/media/i2c/ak7375.c
215
ret = v4l2_async_register_subdev(&ak7375_dev->sd);
drivers/media/i2c/ak7375.c
227
media_entity_cleanup(&ak7375_dev->sd.entity);
drivers/media/i2c/ak7375.c
234
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ak7375.c
235
struct ak7375_device *ak7375_dev = sd_to_ak7375_vcm(sd);
drivers/media/i2c/ak7375.c
249
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ak7375.c
250
struct ak7375_device *ak7375_dev = sd_to_ak7375_vcm(sd);
drivers/media/i2c/ak7375.c
292
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ak7375.c
293
struct ak7375_device *ak7375_dev = sd_to_ak7375_vcm(sd);
drivers/media/i2c/ak7375.c
77
struct v4l2_subdev sd;
drivers/media/i2c/ak7375.c
92
return container_of(subdev, struct ak7375_device, sd);
drivers/media/i2c/ak7375.c
98
struct i2c_client *client = v4l2_get_subdevdata(&ak7375->sd);
drivers/media/i2c/ak881x.c
113
static int ak881x_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ak881x.c
124
static int ak881x_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ak881x.c
128
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ak881x.c
146
static int ak881x_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/ak881x.c
148
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ak881x.c
177
static int ak881x_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ak881x.c
179
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ak881x.c
61
static int ak881x_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/ak881x.c
64
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ak881x.c
78
static int ak881x_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/ak881x.c
81
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ak881x.c
93
static int ak881x_fill_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ak881x.c
98
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/alvium-csi2.c
1656
static int alvium_s_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/alvium-csi2.c
1660
struct alvium_dev *alvium = sd_to_alvium(sd);
drivers/media/i2c/alvium-csi2.c
1698
static int alvium_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/alvium-csi2.c
1702
struct alvium_dev *alvium = sd_to_alvium(sd);
drivers/media/i2c/alvium-csi2.c
1724
static int alvium_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/alvium-csi2.c
1728
struct alvium_dev *alvium = sd_to_alvium(sd);
drivers/media/i2c/alvium-csi2.c
1810
static int alvium_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/alvium-csi2.c
1812
struct alvium_dev *alvium = sd_to_alvium(sd);
drivers/media/i2c/alvium-csi2.c
1813
struct i2c_client *client = v4l2_get_subdevdata(&alvium->sd);
drivers/media/i2c/alvium-csi2.c
1818
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/alvium-csi2.c
1858
static int alvium_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/alvium-csi2.c
1861
struct alvium_dev *alvium = sd_to_alvium(sd);
drivers/media/i2c/alvium-csi2.c
1889
static int alvium_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/alvium-csi2.c
1893
struct alvium_dev *alvium = sd_to_alvium(sd);
drivers/media/i2c/alvium-csi2.c
1924
static int alvium_set_selection(struct v4l2_subdev *sd,
drivers/media/i2c/alvium-csi2.c
1928
struct alvium_dev *alvium = sd_to_alvium(sd);
drivers/media/i2c/alvium-csi2.c
1959
static int alvium_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/alvium-csi2.c
1963
struct alvium_dev *alvium = sd_to_alvium(sd);
drivers/media/i2c/alvium-csi2.c
1994
struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
drivers/media/i2c/alvium-csi2.c
1995
struct alvium_dev *alvium = sd_to_alvium(sd);
drivers/media/i2c/alvium-csi2.c
2018
struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
drivers/media/i2c/alvium-csi2.c
2019
struct alvium_dev *alvium = sd_to_alvium(sd);
drivers/media/i2c/alvium-csi2.c
2020
struct i2c_client *client = v4l2_get_subdevdata(&alvium->sd);
drivers/media/i2c/alvium-csi2.c
2231
alvium->sd.ctrl_handler = hdl;
drivers/media/i2c/alvium-csi2.c
2272
struct v4l2_subdev *sd = &alvium->sd;
drivers/media/i2c/alvium-csi2.c
2285
v4l2_i2c_subdev_init(sd, client, &alvium_subdev_ops);
drivers/media/i2c/alvium-csi2.c
2287
sd->internal_ops = &alvium_internal_ops;
drivers/media/i2c/alvium-csi2.c
2288
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/alvium-csi2.c
2290
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/alvium-csi2.c
2292
ret = media_entity_pads_init(&sd->entity, 1, &alvium->pad);
drivers/media/i2c/alvium-csi2.c
2304
alvium->sd.state_lock = alvium->ctrls.handler.lock;
drivers/media/i2c/alvium-csi2.c
2306
ret = v4l2_subdev_init_finalize(sd);
drivers/media/i2c/alvium-csi2.c
2317
media_entity_cleanup(&alvium->sd.entity);
drivers/media/i2c/alvium-csi2.c
2324
v4l2_subdev_cleanup(&alvium->sd);
drivers/media/i2c/alvium-csi2.c
2325
media_entity_cleanup(&alvium->sd.entity);
drivers/media/i2c/alvium-csi2.c
2384
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/alvium-csi2.c
2385
struct alvium_dev *alvium = sd_to_alvium(sd);
drivers/media/i2c/alvium-csi2.c
2403
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/alvium-csi2.c
2404
struct alvium_dev *alvium = sd_to_alvium(sd);
drivers/media/i2c/alvium-csi2.c
2485
ret = v4l2_async_register_subdev(&alvium->sd);
drivers/media/i2c/alvium-csi2.c
2507
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/alvium-csi2.c
2508
struct alvium_dev *alvium = sd_to_alvium(sd);
drivers/media/i2c/alvium-csi2.c
2511
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/alvium-csi2.h
380
struct v4l2_subdev sd;
drivers/media/i2c/alvium-csi2.h
466
static inline struct alvium_dev *sd_to_alvium(struct v4l2_subdev *sd)
drivers/media/i2c/alvium-csi2.h
468
return container_of_const(sd, struct alvium_dev, sd);
drivers/media/i2c/alvium-csi2.h
474
ctrls.handler)->sd;
drivers/media/i2c/ar0521.c
1098
v4l2_i2c_subdev_init(&sensor->sd, client, &ar0521_subdev_ops);
drivers/media/i2c/ar0521.c
1100
sensor->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ar0521.c
1102
sensor->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ar0521.c
1103
ret = media_entity_pads_init(&sensor->sd.entity, 1, &sensor->pad);
drivers/media/i2c/ar0521.c
1127
ret = v4l2_async_register_subdev(&sensor->sd);
drivers/media/i2c/ar0521.c
1141
v4l2_async_unregister_subdev(&sensor->sd);
drivers/media/i2c/ar0521.c
1142
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/ar0521.c
1146
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/ar0521.c
115
struct v4l2_subdev sd;
drivers/media/i2c/ar0521.c
1153
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ar0521.c
1154
struct ar0521_dev *sensor = to_ar0521_dev(sd);
drivers/media/i2c/ar0521.c
1156
v4l2_async_unregister_subdev(&sensor->sd);
drivers/media/i2c/ar0521.c
1157
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/ar0521.c
138
static inline struct ar0521_dev *to_ar0521_dev(struct v4l2_subdev *sd)
drivers/media/i2c/ar0521.c
140
return container_of(sd, struct ar0521_dev, sd);
drivers/media/i2c/ar0521.c
146
ctrls.handler)->sd;
drivers/media/i2c/ar0521.c
185
v4l2_err(&sensor->sd, "%s: I2C write error\n", __func__);
drivers/media/i2c/ar0521.c
439
static int ar0521_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ar0521.c
443
struct ar0521_dev *sensor = to_ar0521_dev(sd);
drivers/media/i2c/ar0521.c
459
static int ar0521_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ar0521.c
463
struct ar0521_dev *sensor = to_ar0521_dev(sd);
drivers/media/i2c/ar0521.c
529
struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
drivers/media/i2c/ar0521.c
530
struct ar0521_dev *sensor = to_ar0521_dev(sd);
drivers/media/i2c/ar0521.c
663
sensor->sd.ctrl_handler = hdl;
drivers/media/i2c/ar0521.c
840
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ar0521.c
841
struct ar0521_dev *sensor = to_ar0521_dev(sd);
drivers/media/i2c/ar0521.c
856
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ar0521.c
857
struct ar0521_dev *sensor = to_ar0521_dev(sd);
drivers/media/i2c/ar0521.c
867
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ar0521.c
868
struct ar0521_dev *sensor = to_ar0521_dev(sd);
drivers/media/i2c/ar0521.c
883
v4l2_err(&sensor->sd, "error enabling sensor clock\n");
drivers/media/i2c/ar0521.c
925
static int ar0521_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ar0521.c
929
struct ar0521_dev *sensor = to_ar0521_dev(sd);
drivers/media/i2c/ar0521.c
938
static int ar0521_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ar0521.c
956
static int ar0521_pre_streamon(struct v4l2_subdev *sd, u32 flags)
drivers/media/i2c/ar0521.c
958
struct ar0521_dev *sensor = to_ar0521_dev(sd);
drivers/media/i2c/ar0521.c
987
static int ar0521_post_streamoff(struct v4l2_subdev *sd)
drivers/media/i2c/ar0521.c
989
struct ar0521_dev *sensor = to_ar0521_dev(sd);
drivers/media/i2c/ar0521.c
995
static int ar0521_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ar0521.c
997
struct ar0521_dev *sensor = to_ar0521_dev(sd);
drivers/media/i2c/bt819.c
133
struct i2c_client *client = v4l2_get_subdevdata(&decoder->sd);
drivers/media/i2c/bt819.c
138
static int bt819_init(struct v4l2_subdev *sd)
drivers/media/i2c/bt819.c
174
struct bt819 *decoder = to_bt819(sd);
drivers/media/i2c/bt819.c
200
static int bt819_status(struct v4l2_subdev *sd, u32 *pstatus, v4l2_std_id *pstd)
drivers/media/i2c/bt819.c
202
struct bt819 *decoder = to_bt819(sd);
drivers/media/i2c/bt819.c
221
v4l2_dbg(1, debug, sd, "get status %x\n", status);
drivers/media/i2c/bt819.c
225
static int bt819_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/bt819.c
227
return bt819_status(sd, NULL, std);
drivers/media/i2c/bt819.c
230
static int bt819_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/bt819.c
232
return bt819_status(sd, status, NULL);
drivers/media/i2c/bt819.c
235
static int bt819_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/bt819.c
237
struct bt819 *decoder = to_bt819(sd);
drivers/media/i2c/bt819.c
240
v4l2_dbg(1, debug, sd, "set norm %llx\n", (unsigned long long)std);
drivers/media/i2c/bt819.c
242
if (sd->v4l2_dev == NULL || sd->v4l2_dev->notify == NULL)
drivers/media/i2c/bt819.c
243
v4l2_err(sd, "no notify found!\n");
drivers/media/i2c/bt819.c
246
v4l2_subdev_notify(sd, BT819_FIFO_RESET_LOW, NULL);
drivers/media/i2c/bt819.c
255
v4l2_subdev_notify(sd, BT819_FIFO_RESET_LOW, NULL);
drivers/media/i2c/bt819.c
264
v4l2_dbg(1, debug, sd, "unsupported norm %llx\n",
drivers/media/i2c/bt819.c
280
v4l2_subdev_notify(sd, BT819_FIFO_RESET_HIGH, NULL);
drivers/media/i2c/bt819.c
284
static int bt819_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/bt819.c
287
struct bt819 *decoder = to_bt819(sd);
drivers/media/i2c/bt819.c
289
v4l2_dbg(1, debug, sd, "set input %x\n", input);
drivers/media/i2c/bt819.c
294
if (sd->v4l2_dev == NULL || sd->v4l2_dev->notify == NULL)
drivers/media/i2c/bt819.c
295
v4l2_err(sd, "no notify found!\n");
drivers/media/i2c/bt819.c
298
v4l2_subdev_notify(sd, BT819_FIFO_RESET_LOW, NULL);
drivers/media/i2c/bt819.c
308
v4l2_subdev_notify(sd, BT819_FIFO_RESET_HIGH, NULL);
drivers/media/i2c/bt819.c
313
static int bt819_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/bt819.c
315
struct bt819 *decoder = to_bt819(sd);
drivers/media/i2c/bt819.c
317
v4l2_dbg(1, debug, sd, "enable output %x\n", enable);
drivers/media/i2c/bt819.c
328
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/bt819.c
329
struct bt819 *decoder = to_bt819(sd);
drivers/media/i2c/bt819.c
387
struct v4l2_subdev *sd;
drivers/media/i2c/bt819.c
397
sd = &decoder->sd;
drivers/media/i2c/bt819.c
398
v4l2_i2c_subdev_init(sd, client, &bt819_ops);
drivers/media/i2c/bt819.c
41
struct v4l2_subdev sd;
drivers/media/i2c/bt819.c
412
v4l2_dbg(1, debug, sd,
drivers/media/i2c/bt819.c
424
i = bt819_init(sd);
drivers/media/i2c/bt819.c
426
v4l2_dbg(1, debug, sd, "init status %d\n", i);
drivers/media/i2c/bt819.c
437
sd->ctrl_handler = &decoder->hdl;
drivers/media/i2c/bt819.c
450
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/bt819.c
451
struct bt819 *decoder = to_bt819(sd);
drivers/media/i2c/bt819.c
453
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/bt819.c
50
static inline struct bt819 *to_bt819(struct v4l2_subdev *sd)
drivers/media/i2c/bt819.c
52
return container_of(sd, struct bt819, sd);
drivers/media/i2c/bt819.c
57
return &container_of(ctrl->handler, struct bt819, hdl)->sd;
drivers/media/i2c/bt819.c
79
struct i2c_client *client = v4l2_get_subdevdata(&decoder->sd);
drivers/media/i2c/bt819.c
93
struct i2c_client *client = v4l2_get_subdevdata(&decoder->sd);
drivers/media/i2c/bt856.c
109
static int bt856_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/bt856.c
111
struct bt856 *encoder = to_bt856(sd);
drivers/media/i2c/bt856.c
113
v4l2_dbg(1, debug, sd, "set norm %llx\n", (unsigned long long)std);
drivers/media/i2c/bt856.c
130
static int bt856_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/bt856.c
133
struct bt856 *encoder = to_bt856(sd);
drivers/media/i2c/bt856.c
135
v4l2_dbg(1, debug, sd, "set input %d\n", input);
drivers/media/i2c/bt856.c
187
struct v4l2_subdev *sd;
drivers/media/i2c/bt856.c
199
sd = &encoder->sd;
drivers/media/i2c/bt856.c
200
v4l2_i2c_subdev_init(sd, client, &bt856_ops);
drivers/media/i2c/bt856.c
227
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/bt856.c
229
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/bt856.c
42
struct v4l2_subdev sd;
drivers/media/i2c/bt856.c
48
static inline struct bt856 *to_bt856(struct v4l2_subdev *sd)
drivers/media/i2c/bt856.c
50
return container_of(sd, struct bt856, sd);
drivers/media/i2c/bt856.c
57
struct i2c_client *client = v4l2_get_subdevdata(&encoder->sd);
drivers/media/i2c/bt856.c
74
v4l2_info(&encoder->sd, "register dump:\n");
drivers/media/i2c/bt856.c
82
static int bt856_init(struct v4l2_subdev *sd, u32 arg)
drivers/media/i2c/bt856.c
84
struct bt856 *encoder = to_bt856(sd);
drivers/media/i2c/bt856.c
87
v4l2_dbg(1, debug, sd, "init\n");
drivers/media/i2c/bt866.c
118
struct bt866 *encoder = to_bt866(sd);
drivers/media/i2c/bt866.c
141
v4l2_dbg(1, debug, sd, "set input %d\n", input);
drivers/media/i2c/bt866.c
179
struct v4l2_subdev *sd;
drivers/media/i2c/bt866.c
187
sd = &encoder->sd;
drivers/media/i2c/bt866.c
188
v4l2_i2c_subdev_init(sd, client, &bt866_ops);
drivers/media/i2c/bt866.c
194
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/bt866.c
196
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/bt866.c
40
struct v4l2_subdev sd;
drivers/media/i2c/bt866.c
44
static inline struct bt866 *to_bt866(struct v4l2_subdev *sd)
drivers/media/i2c/bt866.c
46
return container_of(sd, struct bt866, sd);
drivers/media/i2c/bt866.c
51
struct i2c_client *client = v4l2_get_subdevdata(&encoder->sd);
drivers/media/i2c/bt866.c
78
static int bt866_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/bt866.c
80
v4l2_dbg(1, debug, sd, "set norm %llx\n", (unsigned long long)std);
drivers/media/i2c/bt866.c
88
static int bt866_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/ccs/ccs-core.c
1089
sensor->pixel_array->sd.ctrl_handler =
drivers/media/i2c/ccs/ccs-core.c
1111
sensor->src->sd.ctrl_handler = &sensor->src->ctrl_handler;
drivers/media/i2c/ccs/ccs-core.c
1153
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
116
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
1334
v4l2_subdev_get_locked_active_state(&sensor->pixel_array->sd);
drivers/media/i2c/ccs/ccs-core.c
1338
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
1451
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
1625
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
164
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
1819
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
1860
v4l2_subdev_get_locked_active_state(&sensor->pixel_array->sd);
drivers/media/i2c/ccs/ccs-core.c
1862
v4l2_subdev_get_locked_active_state(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
1869
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
1935
v4l2_subdev_get_locked_active_state(&sensor->scaler->sd);
drivers/media/i2c/ccs/ccs-core.c
2019
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
2045
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
2083
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
2116
if (subdev != &sensor->src->sd || code->pad != CCS_PAD_SRC) {
drivers/media/i2c/ccs/ccs-core.c
2144
if (subdev == &sensor->src->sd && pad == CCS_PAD_SRC)
drivers/media/i2c/ccs/ccs-core.c
2211
if (subdev != &sensor->src->sd)
drivers/media/i2c/ccs/ccs-core.c
2782
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
279
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
2936
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
2942
rval = v4l2_device_register_subdev(sensor->src->sd.v4l2_dev, &ssd->sd);
drivers/media/i2c/ccs/ccs-core.c
2948
rval = media_create_pad_link(&ssd->sd.entity, source_pad,
drivers/media/i2c/ccs/ccs-core.c
2949
&sink_ssd->sd.entity, sink_pad,
drivers/media/i2c/ccs/ccs-core.c
2953
v4l2_device_unregister_subdev(&ssd->sd);
drivers/media/i2c/ccs/ccs-core.c
2966
v4l2_device_unregister_subdev(&sensor->ssds[i].sd);
drivers/media/i2c/ccs/ccs-core.c
3001
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
3005
v4l2_subdev_cleanup(&sensor->ssds[2].sd);
drivers/media/i2c/ccs/ccs-core.c
3006
media_entity_cleanup(&sensor->ssds[i].sd.entity);
drivers/media/i2c/ccs/ccs-core.c
3023
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
3030
v4l2_subdev_init(&ssd->sd, &ccs_ops);
drivers/media/i2c/ccs/ccs-core.c
3031
ssd->sd.internal_ops = &ccs_internal_ops;
drivers/media/i2c/ccs/ccs-core.c
3034
ssd->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ccs/ccs-core.c
3035
ssd->sd.entity.function = function;
drivers/media/i2c/ccs/ccs-core.c
3036
ssd->sd.state_lock = &sensor->mutex;
drivers/media/i2c/ccs/ccs-core.c
3042
v4l2_i2c_subdev_set_name(&ssd->sd, client, sensor->minfo.name, name);
drivers/media/i2c/ccs/ccs-core.c
3048
ssd->sd.entity.ops = &ccs_entity_ops;
drivers/media/i2c/ccs/ccs-core.c
3051
ssd->sd.owner = THIS_MODULE;
drivers/media/i2c/ccs/ccs-core.c
3052
ssd->sd.dev = &client->dev;
drivers/media/i2c/ccs/ccs-core.c
3053
v4l2_set_subdevdata(&ssd->sd, client);
drivers/media/i2c/ccs/ccs-core.c
3056
rval = media_entity_pads_init(&ssd->sd.entity, ssd->npads, ssd->pads);
drivers/media/i2c/ccs/ccs-core.c
3062
rval = __v4l2_subdev_init_finalize(&ssd->sd, lock_name, lock_key);
drivers/media/i2c/ccs/ccs-core.c
3064
media_entity_cleanup(&ssd->sd.entity);
drivers/media/i2c/ccs/ccs-core.c
3071
static int ccs_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ccs/ccs-core.c
3074
struct ccs_subdev *ssd = to_ccs_subdev(sd);
drivers/media/i2c/ccs/ccs-core.c
3098
ccs_propagate(sd, sd_state, V4L2_SEL_TGT_CROP);
drivers/media/i2c/ccs/ccs-core.c
3282
v4l2_i2c_subdev_init(&sensor->src->sd, client, &ccs_ops);
drivers/media/i2c/ccs/ccs-core.c
3283
sensor->src->sd.internal_ops = &ccs_internal_src_ops;
drivers/media/i2c/ccs/ccs-core.c
3598
rval = v4l2_async_register_subdev_sensor(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
3647
v4l2_device_unregister_subdev(&sensor->ssds[i].sd);
drivers/media/i2c/ccs/ccs-core.c
466
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
519
v4l2_subdev_get_locked_active_state(&sensor->binner->sd);
drivers/media/i2c/ccs/ccs-core.c
539
v4l2_subdev_get_locked_active_state(&sensor->scaler->sd);
drivers/media/i2c/ccs/ccs-core.c
655
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
672
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
708
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-core.c
718
state = v4l2_subdev_get_locked_active_state(&sensor->pixel_array->sd);
drivers/media/i2c/ccs/ccs-core.c
895
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-quirk.c
122
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-quirk.c
20
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-reg-access.c
230
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs-reg-access.c
79
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
drivers/media/i2c/ccs/ccs.h
190
struct v4l2_subdev sd;
drivers/media/i2c/ccs/ccs.h
266
container_of(_sd, struct ccs_subdev, sd)
drivers/media/i2c/cs3308.c
103
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/cs3308.c
105
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/cs3308.c
106
kfree(sd);
drivers/media/i2c/cs3308.c
23
static inline int cs3308_write(struct v4l2_subdev *sd, u8 reg, u8 value)
drivers/media/i2c/cs3308.c
25
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cs3308.c
30
static inline int cs3308_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/cs3308.c
32
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cs3308.c
38
static int cs3308_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
drivers/media/i2c/cs3308.c
40
reg->val = cs3308_read(sd, reg->reg & 0xffff);
drivers/media/i2c/cs3308.c
45
static int cs3308_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
drivers/media/i2c/cs3308.c
47
cs3308_write(sd, reg->reg & 0xffff, reg->val & 0xff);
drivers/media/i2c/cs3308.c
69
struct v4l2_subdev *sd;
drivers/media/i2c/cs3308.c
82
sd = kzalloc_obj(struct v4l2_subdev);
drivers/media/i2c/cs3308.c
83
if (sd == NULL)
drivers/media/i2c/cs3308.c
86
v4l2_i2c_subdev_init(sd, client, &cs3308_ops);
drivers/media/i2c/cs3308.c
89
cs3308_write(sd, 0x0d, 0x00); /* Power up all channels */
drivers/media/i2c/cs3308.c
90
cs3308_write(sd, 0x0e, 0x00); /* Master Power */
drivers/media/i2c/cs3308.c
91
cs3308_write(sd, 0x0b, 0x00); /* Device Configuration */
drivers/media/i2c/cs3308.c
94
cs3308_write(sd, i, 0xd2);
drivers/media/i2c/cs3308.c
95
cs3308_write(sd, 0x0a, 0x00); /* Unmute all channels */
drivers/media/i2c/cs5345.c
100
static int cs5345_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/cs5345.c
102
u8 v = cs5345_read(sd, 0x09) & 7;
drivers/media/i2c/cs5345.c
103
u8 m = cs5345_read(sd, 0x04);
drivers/media/i2c/cs5345.c
104
int vol = cs5345_read(sd, 0x08) & 0x3f;
drivers/media/i2c/cs5345.c
106
v4l2_info(sd, "Input: %d%s\n", v,
drivers/media/i2c/cs5345.c
110
v4l2_info(sd, "Volume: %d dB\n", vol);
drivers/media/i2c/cs5345.c
142
struct v4l2_subdev *sd;
drivers/media/i2c/cs5345.c
154
sd = &state->sd;
drivers/media/i2c/cs5345.c
155
v4l2_i2c_subdev_init(sd, client, &cs5345_ops);
drivers/media/i2c/cs5345.c
162
sd->ctrl_handler = &state->hdl;
drivers/media/i2c/cs5345.c
172
cs5345_write(sd, 0x02, 0x00);
drivers/media/i2c/cs5345.c
173
cs5345_write(sd, 0x04, 0x01);
drivers/media/i2c/cs5345.c
174
cs5345_write(sd, 0x09, 0x01);
drivers/media/i2c/cs5345.c
182
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/cs5345.c
183
struct cs5345_state *state = to_state(sd);
drivers/media/i2c/cs5345.c
185
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/cs5345.c
27
struct v4l2_subdev sd;
drivers/media/i2c/cs5345.c
31
static inline struct cs5345_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/cs5345.c
33
return container_of(sd, struct cs5345_state, sd);
drivers/media/i2c/cs5345.c
38
return &container_of(ctrl->handler, struct cs5345_state, hdl)->sd;
drivers/media/i2c/cs5345.c
43
static inline int cs5345_write(struct v4l2_subdev *sd, u8 reg, u8 value)
drivers/media/i2c/cs5345.c
45
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cs5345.c
50
static inline int cs5345_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/cs5345.c
52
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cs5345.c
57
static int cs5345_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/cs5345.c
61
v4l2_err(sd, "Invalid input %d.\n", input);
drivers/media/i2c/cs5345.c
64
cs5345_write(sd, 0x09, input & 0xf);
drivers/media/i2c/cs5345.c
65
cs5345_write(sd, 0x05, input & 0xf0);
drivers/media/i2c/cs5345.c
71
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/cs5345.c
75
cs5345_write(sd, 0x04, ctrl->val ? 0x80 : 0);
drivers/media/i2c/cs5345.c
78
cs5345_write(sd, 0x07, ((u8)ctrl->val) & 0x3f);
drivers/media/i2c/cs5345.c
79
cs5345_write(sd, 0x08, ((u8)ctrl->val) & 0x3f);
drivers/media/i2c/cs5345.c
86
static int cs5345_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
drivers/media/i2c/cs5345.c
89
reg->val = cs5345_read(sd, reg->reg & 0x1f);
drivers/media/i2c/cs5345.c
93
static int cs5345_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
drivers/media/i2c/cs5345.c
95
cs5345_write(sd, reg->reg & 0x1f, reg->val & 0xff);
drivers/media/i2c/cs53l32a.c
135
struct v4l2_subdev *sd;
drivers/media/i2c/cs53l32a.c
151
sd = &state->sd;
drivers/media/i2c/cs53l32a.c
152
v4l2_i2c_subdev_init(sd, client, &cs53l32a_ops);
drivers/media/i2c/cs53l32a.c
155
u8 v = cs53l32a_read(sd, i);
drivers/media/i2c/cs53l32a.c
157
v4l2_dbg(1, debug, sd, "Read Reg %d %02x\n", i, v);
drivers/media/i2c/cs53l32a.c
165
sd->ctrl_handler = &state->hdl;
drivers/media/i2c/cs53l32a.c
175
cs53l32a_write(sd, 0x01, 0x21);
drivers/media/i2c/cs53l32a.c
176
cs53l32a_write(sd, 0x02, 0x29);
drivers/media/i2c/cs53l32a.c
177
cs53l32a_write(sd, 0x03, 0x30);
drivers/media/i2c/cs53l32a.c
178
cs53l32a_write(sd, 0x04, 0x00);
drivers/media/i2c/cs53l32a.c
179
cs53l32a_write(sd, 0x05, 0x00);
drivers/media/i2c/cs53l32a.c
180
cs53l32a_write(sd, 0x06, 0x00);
drivers/media/i2c/cs53l32a.c
181
cs53l32a_write(sd, 0x07, 0x00);
drivers/media/i2c/cs53l32a.c
186
u8 v = cs53l32a_read(sd, i);
drivers/media/i2c/cs53l32a.c
188
v4l2_dbg(1, debug, sd, "Read Reg %d %02x\n", i, v);
drivers/media/i2c/cs53l32a.c
195
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/cs53l32a.c
196
struct cs53l32a_state *state = to_state(sd);
drivers/media/i2c/cs53l32a.c
198
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/cs53l32a.c
32
struct v4l2_subdev sd;
drivers/media/i2c/cs53l32a.c
36
static inline struct cs53l32a_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/cs53l32a.c
38
return container_of(sd, struct cs53l32a_state, sd);
drivers/media/i2c/cs53l32a.c
43
return &container_of(ctrl->handler, struct cs53l32a_state, hdl)->sd;
drivers/media/i2c/cs53l32a.c
48
static int cs53l32a_write(struct v4l2_subdev *sd, u8 reg, u8 value)
drivers/media/i2c/cs53l32a.c
50
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cs53l32a.c
55
static int cs53l32a_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/cs53l32a.c
57
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cs53l32a.c
62
static int cs53l32a_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/cs53l32a.c
70
v4l2_err(sd, "Invalid input %d.\n", input);
drivers/media/i2c/cs53l32a.c
73
cs53l32a_write(sd, 0x01, 0x01 + (input << 4));
drivers/media/i2c/cs53l32a.c
79
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/cs53l32a.c
83
cs53l32a_write(sd, 0x03, ctrl->val ? 0xf0 : 0x30);
drivers/media/i2c/cs53l32a.c
86
cs53l32a_write(sd, 0x04, (u8)ctrl->val);
drivers/media/i2c/cs53l32a.c
87
cs53l32a_write(sd, 0x05, (u8)ctrl->val);
drivers/media/i2c/cs53l32a.c
93
static int cs53l32a_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/cs53l32a.c
95
struct cs53l32a_state *state = to_state(sd);
drivers/media/i2c/cs53l32a.c
96
u8 v = cs53l32a_read(sd, 0x01);
drivers/media/i2c/cs53l32a.c
98
v4l2_info(sd, "Input: %d\n", (v >> 4) & 3);
drivers/media/i2c/cs53l32a.c
99
v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
drivers/media/i2c/cx25840/cx25840-audio.c
504
int cx25840_s_clock_freq(struct v4l2_subdev *sd, u32 freq)
drivers/media/i2c/cx25840/cx25840-audio.c
506
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-audio.c
507
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-audio.c
526
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/cx25840/cx25840-audio.c
527
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-audio.c
528
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
1709
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/cx25840/cx25840-core.c
1710
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
1711
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
174
static int cx23885_s_io_pin_config(struct v4l2_subdev *sd, size_t n,
drivers/media/i2c/cx25840/cx25840-core.c
1748
static int cx25840_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/cx25840/cx25840-core.c
1753
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
1754
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
177
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2263
static int cx25840_init(struct v4l2_subdev *sd, u32 val)
drivers/media/i2c/cx25840/cx25840-core.c
2265
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2294
static int cx25840_reset(struct v4l2_subdev *sd, u32 val)
drivers/media/i2c/cx25840/cx25840-core.c
2296
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2297
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2327
static int cx25840_load_fw(struct v4l2_subdev *sd)
drivers/media/i2c/cx25840/cx25840-core.c
2329
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2333
cx25840_reset(sd, 0);
drivers/media/i2c/cx25840/cx25840-core.c
2339
static int cx25840_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/cx25840/cx25840-core.c
2342
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2349
static int cx25840_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/cx25840/cx25840-core.c
2352
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2359
static int cx25840_s_audio_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/cx25840/cx25840-core.c
2361
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2362
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2385
static int cx25840_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/cx25840/cx25840-core.c
2387
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2388
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2419
static int cx25840_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/cx25840/cx25840-core.c
2421
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2454
static int cx25840_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/cx25840/cx25840-core.c
2456
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2470
static int cx25840_g_std(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/cx25840/cx25840-core.c
2472
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2479
static int cx25840_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/cx25840/cx25840-core.c
2481
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2482
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2491
static int cx25840_s_radio(struct v4l2_subdev *sd)
drivers/media/i2c/cx25840/cx25840-core.c
2493
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2499
static int cx25840_s_video_routing(struct v4l2_subdev *sd,
drivers/media/i2c/cx25840/cx25840-core.c
2502
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2503
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2516
static int cx25840_s_audio_routing(struct v4l2_subdev *sd,
drivers/media/i2c/cx25840/cx25840-core.c
2519
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2520
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2527
static int cx25840_s_frequency(struct v4l2_subdev *sd,
drivers/media/i2c/cx25840/cx25840-core.c
2530
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2536
static int cx25840_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
drivers/media/i2c/cx25840/cx25840-core.c
2538
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2539
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2573
static int cx25840_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
drivers/media/i2c/cx25840/cx25840-core.c
2575
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2576
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2622
static int cx25840_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/cx25840/cx25840-core.c
2624
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2625
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2630
cx25840_ir_log_status(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2631
v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
drivers/media/i2c/cx25840/cx25840-core.c
2635
static int cx23885_irq_handler(struct v4l2_subdev *sd, u32 status,
drivers/media/i2c/cx25840/cx25840-core.c
2638
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2639
struct i2c_client *c = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2659
ret = cx25840_ir_irq_handler(sd,
drivers/media/i2c/cx25840/cx25840-core.c
2704
static int cx25840_irq_handler(struct v4l2_subdev *sd, u32 status,
drivers/media/i2c/cx25840/cx25840-core.c
2707
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
2713
return cx23885_irq_handler(sd, status, handled);
drivers/media/i2c/cx25840/cx25840-core.c
3759
struct v4l2_subdev *sd;
drivers/media/i2c/cx25840/cx25840-core.c
3808
sd = &state->sd;
drivers/media/i2c/cx25840/cx25840-core.c
3809
v4l2_i2c_subdev_init(sd, client, &cx25840_ops);
drivers/media/i2c/cx25840/cx25840-core.c
3829
sd->entity.function = MEDIA_ENT_F_ATV_DECODER;
drivers/media/i2c/cx25840/cx25840-core.c
3831
ret = media_entity_pads_init(&sd->entity, ARRAY_SIZE(state->pads),
drivers/media/i2c/cx25840/cx25840-core.c
385
static int cx25840_s_io_pin_config(struct v4l2_subdev *sd, size_t n,
drivers/media/i2c/cx25840/cx25840-core.c
388
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-core.c
3935
sd->ctrl_handler = &state->hdl;
drivers/media/i2c/cx25840/cx25840-core.c
3952
cx25840_ir_probe(sd);
drivers/media/i2c/cx25840/cx25840-core.c
3958
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/cx25840/cx25840-core.c
3959
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
3961
cx25840_ir_remove(sd);
drivers/media/i2c/cx25840/cx25840-core.c
3962
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/cx25840/cx25840-core.c
524
static int common_s_io_pin_config(struct v4l2_subdev *sd, size_t n,
drivers/media/i2c/cx25840/cx25840-core.c
527
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-core.c
530
return cx23885_s_io_pin_config(sd, n, pincfg);
drivers/media/i2c/cx25840/cx25840-core.c
532
return cx25840_s_io_pin_config(sd, n, pincfg);
drivers/media/i2c/cx25840/cx25840-core.c
778
if (v4l2_get_subdev_hostdata(&state->sd))
drivers/media/i2c/cx25840/cx25840-core.c
779
clk_freq = *((u32 *)v4l2_get_subdev_hostdata(&state->sd));
drivers/media/i2c/cx25840/cx25840-core.h
102
static inline struct cx25840_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/cx25840/cx25840-core.h
104
return container_of(sd, struct cx25840_state, sd);
drivers/media/i2c/cx25840/cx25840-core.h
109
return &container_of(ctrl->handler, struct cx25840_state, hdl)->sd;
drivers/media/i2c/cx25840/cx25840-core.h
172
int cx25840_s_clock_freq(struct v4l2_subdev *sd, u32 freq);
drivers/media/i2c/cx25840/cx25840-core.h
178
int cx25840_s_raw_fmt(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt);
drivers/media/i2c/cx25840/cx25840-core.h
179
int cx25840_s_sliced_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/cx25840/cx25840-core.h
181
int cx25840_g_sliced_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/cx25840/cx25840-core.h
183
int cx25840_decode_vbi_line(struct v4l2_subdev *sd,
drivers/media/i2c/cx25840/cx25840-core.h
189
int cx25840_ir_log_status(struct v4l2_subdev *sd);
drivers/media/i2c/cx25840/cx25840-core.h
190
int cx25840_ir_irq_handler(struct v4l2_subdev *sd, u32 status, bool *handled);
drivers/media/i2c/cx25840/cx25840-core.h
191
int cx25840_ir_probe(struct v4l2_subdev *sd);
drivers/media/i2c/cx25840/cx25840-core.h
192
int cx25840_ir_remove(struct v4l2_subdev *sd);
drivers/media/i2c/cx25840/cx25840-core.h
73
struct v4l2_subdev sd;
drivers/media/i2c/cx25840/cx25840-ir.c
1002
int cx25840_ir_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/cx25840/cx25840-ir.c
1004
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
1024
v4l2_info(sd, "IR Receiver:\n");
drivers/media/i2c/cx25840/cx25840-ir.c
1025
v4l2_info(sd, "\tEnabled: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1027
v4l2_info(sd, "\tDemodulation from a carrier: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1029
v4l2_info(sd, "\tFIFO: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1048
v4l2_info(sd, "\tPulse timers' start/stop trigger: %s\n", s);
drivers/media/i2c/cx25840/cx25840-ir.c
1049
v4l2_info(sd, "\tFIFO data on pulse timer overflow: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1051
v4l2_info(sd, "\tFIFO interrupt watermark: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1053
v4l2_info(sd, "\tLoopback mode: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1056
v4l2_info(sd, "\tExpected carrier (16 clocks): %u Hz\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1080
v4l2_info(sd, "\tNext carrier edge window: 16 clocks -%1d/+%1d, %u to %u Hz\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1085
v4l2_info(sd, "\tMax measurable pulse width: %u us, %llu ns\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1088
v4l2_info(sd, "\tLow pass filter: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1091
v4l2_info(sd, "\tMin acceptable pulse width (LPF): %u us, %u ns\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1094
v4l2_info(sd, "\tPulse width timer timed-out: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1096
v4l2_info(sd, "\tPulse width timer time-out intr: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1098
v4l2_info(sd, "\tFIFO overrun: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1100
v4l2_info(sd, "\tFIFO overrun interrupt: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1102
v4l2_info(sd, "\tBusy: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1104
v4l2_info(sd, "\tFIFO service requested: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1106
v4l2_info(sd, "\tFIFO service request interrupt: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1109
v4l2_info(sd, "IR Transmitter:\n");
drivers/media/i2c/cx25840/cx25840-ir.c
1110
v4l2_info(sd, "\tEnabled: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1112
v4l2_info(sd, "\tModulation onto a carrier: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1114
v4l2_info(sd, "\tFIFO: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1116
v4l2_info(sd, "\tFIFO interrupt watermark: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1118
v4l2_info(sd, "\tCarrier polarity: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1122
v4l2_info(sd, "\tCarrier (16 clocks): %u Hz\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1124
v4l2_info(sd, "\tCarrier duty cycle: %2u/16\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1127
v4l2_info(sd, "\tMax pulse width: %u us, %llu ns\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1130
v4l2_info(sd, "\tBusy: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1132
v4l2_info(sd, "\tFIFO service requested: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
1134
v4l2_info(sd, "\tFIFO service request interrupt: %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
114
static inline struct cx25840_ir_state *to_ir_state(struct v4l2_subdev *sd)
drivers/media/i2c/cx25840/cx25840-ir.c
116
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
1186
int cx25840_ir_probe(struct v4l2_subdev *sd)
drivers/media/i2c/cx25840/cx25840-ir.c
1188
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
1216
v4l2_subdev_call(sd, ir, rx_s_parameters, &default_params);
drivers/media/i2c/cx25840/cx25840-ir.c
1220
v4l2_subdev_call(sd, ir, tx_s_parameters, &default_params);
drivers/media/i2c/cx25840/cx25840-ir.c
1225
int cx25840_ir_remove(struct v4l2_subdev *sd)
drivers/media/i2c/cx25840/cx25840-ir.c
1227
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
1228
struct cx25840_ir_state *ir_state = to_ir_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
1233
cx25840_ir_rx_shutdown(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
1234
cx25840_ir_tx_shutdown(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
464
static inline void irqenable_rx(struct v4l2_subdev *sd, u32 mask)
drivers/media/i2c/cx25840/cx25840-ir.c
466
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
475
static inline void irqenable_tx(struct v4l2_subdev *sd, u32 mask)
drivers/media/i2c/cx25840/cx25840-ir.c
477
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
488
int cx25840_ir_irq_handler(struct v4l2_subdev *sd, u32 status, bool *handled)
drivers/media/i2c/cx25840/cx25840-ir.c
490
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
491
struct cx25840_ir_state *ir_state = to_ir_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
527
v4l2_dbg(2, ir_debug, sd, "IR IRQ Status: %s %s %s %s %s %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
533
v4l2_dbg(2, ir_debug, sd, "IR IRQ Enables: %s %s %s %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
552
irqenable_tx(sd, 0);
drivers/media/i2c/cx25840/cx25840-ir.c
554
v4l2_subdev_notify(sd, V4L2_SUBDEV_IR_TX_NOTIFY, &events);
drivers/media/i2c/cx25840/cx25840-ir.c
592
v4l2_err(sd, "IR receiver software FIFO overrun\n");
drivers/media/i2c/cx25840/cx25840-ir.c
601
v4l2_err(sd, "IR receiver hardware FIFO overrun\n");
drivers/media/i2c/cx25840/cx25840-ir.c
623
v4l2_subdev_notify(sd, V4L2_SUBDEV_IR_RX_NOTIFY, &events);
drivers/media/i2c/cx25840/cx25840-ir.c
628
static int cx25840_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count,
drivers/media/i2c/cx25840/cx25840-ir.c
631
struct cx25840_ir_state *ir_state = to_ir_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
678
v4l2_dbg(2, ir_debug, sd, "rx read: %10u ns %s %s\n",
drivers/media/i2c/cx25840/cx25840-ir.c
681
v4l2_dbg(2, ir_debug, sd, "rx read: end of rx\n");
drivers/media/i2c/cx25840/cx25840-ir.c
686
static int cx25840_ir_rx_g_parameters(struct v4l2_subdev *sd,
drivers/media/i2c/cx25840/cx25840-ir.c
689
struct cx25840_ir_state *ir_state = to_ir_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
701
static int cx25840_ir_rx_shutdown(struct v4l2_subdev *sd)
drivers/media/i2c/cx25840/cx25840-ir.c
703
struct cx25840_ir_state *ir_state = to_ir_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
713
irqenable_rx(sd, 0);
drivers/media/i2c/cx25840/cx25840-ir.c
726
static int cx25840_ir_rx_s_parameters(struct v4l2_subdev *sd,
drivers/media/i2c/cx25840/cx25840-ir.c
729
struct cx25840_ir_state *ir_state = to_ir_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
738
return cx25840_ir_rx_shutdown(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
757
irqenable_rx(sd, 0);
drivers/media/i2c/cx25840/cx25840-ir.c
812
irqenable_rx(sd, IRQEN_RSE | IRQEN_RTE | IRQEN_ROE);
drivers/media/i2c/cx25840/cx25840-ir.c
821
static int cx25840_ir_tx_write(struct v4l2_subdev *sd, u8 *buf, size_t count,
drivers/media/i2c/cx25840/cx25840-ir.c
824
struct cx25840_ir_state *ir_state = to_ir_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
870
irqenable_tx(sd, IRQEN_TSE);
drivers/media/i2c/cx25840/cx25840-ir.c
876
static int cx25840_ir_tx_g_parameters(struct v4l2_subdev *sd,
drivers/media/i2c/cx25840/cx25840-ir.c
879
struct cx25840_ir_state *ir_state = to_ir_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
891
static int cx25840_ir_tx_shutdown(struct v4l2_subdev *sd)
drivers/media/i2c/cx25840/cx25840-ir.c
893
struct cx25840_ir_state *ir_state = to_ir_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
903
irqenable_tx(sd, 0);
drivers/media/i2c/cx25840/cx25840-ir.c
914
static int cx25840_ir_tx_s_parameters(struct v4l2_subdev *sd,
drivers/media/i2c/cx25840/cx25840-ir.c
917
struct cx25840_ir_state *ir_state = to_ir_state(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
926
return cx25840_ir_tx_shutdown(sd);
drivers/media/i2c/cx25840/cx25840-ir.c
944
irqenable_tx(sd, 0);
drivers/media/i2c/cx25840/cx25840-ir.c
990
irqenable_tx(sd, IRQEN_TSE);
drivers/media/i2c/cx25840/cx25840-vbi.c
117
int cx25840_s_raw_fmt(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt)
drivers/media/i2c/cx25840/cx25840-vbi.c
119
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-vbi.c
120
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-vbi.c
137
int cx25840_s_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *svbi)
drivers/media/i2c/cx25840/cx25840-vbi.c
139
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-vbi.c
140
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-vbi.c
216
int cx25840_decode_vbi_line(struct v4l2_subdev *sd, struct v4l2_decode_vbi_line *vbi)
drivers/media/i2c/cx25840/cx25840-vbi.c
218
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/cx25840/cx25840-vbi.c
72
int cx25840_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *svbi)
drivers/media/i2c/cx25840/cx25840-vbi.c
74
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/cx25840/cx25840-vbi.c
75
struct cx25840_state *state = to_state(sd);
drivers/media/i2c/ds90ub913.c
268
static int ub913_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub913.c
272
struct ub913_data *priv = sd_to_ub913(sd);
drivers/media/i2c/ds90ub913.c
290
static int ub913_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub913.c
294
struct ub913_data *priv = sd_to_ub913(sd);
drivers/media/i2c/ds90ub913.c
312
static int _ub913_set_routing(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub913.c
339
ret = v4l2_subdev_routing_validate(sd, routing,
drivers/media/i2c/ds90ub913.c
344
ret = v4l2_subdev_set_routing(sd, state, routing);
drivers/media/i2c/ds90ub913.c
362
static int ub913_set_routing(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub913.c
367
struct ub913_data *priv = sd_to_ub913(sd);
drivers/media/i2c/ds90ub913.c
372
return _ub913_set_routing(sd, state, routing);
drivers/media/i2c/ds90ub913.c
375
static int ub913_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/ds90ub913.c
378
struct ub913_data *priv = sd_to_ub913(sd);
drivers/media/i2c/ds90ub913.c
395
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/ds90ub913.c
432
static int ub913_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub913.c
436
struct ub913_data *priv = sd_to_ub913(sd);
drivers/media/i2c/ds90ub913.c
446
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/i2c/ds90ub913.c
474
static int ub913_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub913.c
492
return _ub913_set_routing(sd, state, &routing);
drivers/media/i2c/ds90ub913.c
495
static int ub913_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/ds90ub913.c
497
struct ub913_data *priv = sd_to_ub913(sd);
drivers/media/i2c/ds90ub913.c
569
struct ub913_data *priv = sd_to_ub913(notifier->sd);
drivers/media/i2c/ds90ub913.c
586
&priv->sd.entity, UB913_PAD_SINK,
drivers/media/i2c/ds90ub913.c
592
priv->sd.name);
drivers/media/i2c/ds90ub913.c
617
v4l2_async_subdev_nf_init(&priv->notifier, &priv->sd);
drivers/media/i2c/ds90ub913.c
74
struct v4l2_subdev sd;
drivers/media/i2c/ds90ub913.c
801
v4l2_i2c_subdev_init(&priv->sd, priv->client, &ub913_subdev_ops);
drivers/media/i2c/ds90ub913.c
802
priv->sd.internal_ops = &ub913_internal_ops;
drivers/media/i2c/ds90ub913.c
803
priv->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_STREAMS;
drivers/media/i2c/ds90ub913.c
804
priv->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/i2c/ds90ub913.c
805
priv->sd.entity.ops = &ub913_entity_ops;
drivers/media/i2c/ds90ub913.c
810
ret = media_entity_pads_init(&priv->sd.entity, 2, priv->pads);
drivers/media/i2c/ds90ub913.c
814
ret = v4l2_subdev_init_finalize(&priv->sd);
drivers/media/i2c/ds90ub913.c
825
ret = v4l2_async_register_subdev(&priv->sd);
drivers/media/i2c/ds90ub913.c
836
v4l2_subdev_cleanup(&priv->sd);
drivers/media/i2c/ds90ub913.c
838
media_entity_cleanup(&priv->sd.entity);
drivers/media/i2c/ds90ub913.c
845
v4l2_async_unregister_subdev(&priv->sd);
drivers/media/i2c/ds90ub913.c
847
v4l2_subdev_cleanup(&priv->sd);
drivers/media/i2c/ds90ub913.c
848
media_entity_cleanup(&priv->sd.entity);
drivers/media/i2c/ds90ub913.c
91
static inline struct ub913_data *sd_to_ub913(struct v4l2_subdev *sd)
drivers/media/i2c/ds90ub913.c
921
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ds90ub913.c
922
struct ub913_data *priv = sd_to_ub913(sd);
drivers/media/i2c/ds90ub913.c
93
return container_of(sd, struct ub913_data, sd);
drivers/media/i2c/ds90ub953.c
1252
v4l2_i2c_subdev_init(&priv->sd, priv->client, &ub953_subdev_ops);
drivers/media/i2c/ds90ub953.c
1253
priv->sd.internal_ops = &ub953_internal_ops;
drivers/media/i2c/ds90ub953.c
1255
priv->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
drivers/media/i2c/ds90ub953.c
1257
priv->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/i2c/ds90ub953.c
1258
priv->sd.entity.ops = &ub953_entity_ops;
drivers/media/i2c/ds90ub953.c
1263
ret = media_entity_pads_init(&priv->sd.entity, 2, priv->pads);
drivers/media/i2c/ds90ub953.c
1267
ret = v4l2_subdev_init_finalize(&priv->sd);
drivers/media/i2c/ds90ub953.c
1278
ret = v4l2_async_register_subdev(&priv->sd);
drivers/media/i2c/ds90ub953.c
1289
v4l2_subdev_cleanup(&priv->sd);
drivers/media/i2c/ds90ub953.c
1291
media_entity_cleanup(&priv->sd.entity);
drivers/media/i2c/ds90ub953.c
1298
v4l2_async_unregister_subdev(&priv->sd);
drivers/media/i2c/ds90ub953.c
1300
v4l2_subdev_cleanup(&priv->sd);
drivers/media/i2c/ds90ub953.c
1301
media_entity_cleanup(&priv->sd.entity);
drivers/media/i2c/ds90ub953.c
1388
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ds90ub953.c
1389
struct ub953_data *priv = sd_to_ub953(sd);
drivers/media/i2c/ds90ub953.c
386
static int _ub953_set_routing(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub953.c
402
ret = v4l2_subdev_routing_validate(sd, routing,
drivers/media/i2c/ds90ub953.c
407
ret = v4l2_subdev_set_routing_with_fmt(sd, state, routing, &format);
drivers/media/i2c/ds90ub953.c
414
static int ub953_set_routing(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub953.c
419
struct ub953_data *priv = sd_to_ub953(sd);
drivers/media/i2c/ds90ub953.c
424
return _ub953_set_routing(sd, state, routing);
drivers/media/i2c/ds90ub953.c
427
static int ub953_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/ds90ub953.c
430
struct ub953_data *priv = sd_to_ub953(sd);
drivers/media/i2c/ds90ub953.c
446
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/ds90ub953.c
487
static int ub953_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub953.c
491
struct ub953_data *priv = sd_to_ub953(sd);
drivers/media/i2c/ds90ub953.c
500
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/i2c/ds90ub953.c
520
static int ub953_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub953.c
538
return _ub953_set_routing(sd, state, &routing);
drivers/media/i2c/ds90ub953.c
541
static int ub953_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/ds90ub953.c
543
struct ub953_data *priv = sd_to_ub953(sd);
drivers/media/i2c/ds90ub953.c
649
static int ub953_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub953.c
653
struct ub953_data *priv = sd_to_ub953(sd);
drivers/media/i2c/ds90ub953.c
671
static int ub953_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub953.c
675
struct ub953_data *priv = sd_to_ub953(sd);
drivers/media/i2c/ds90ub953.c
723
struct ub953_data *priv = sd_to_ub953(notifier->sd);
drivers/media/i2c/ds90ub953.c
740
&priv->sd.entity, 0,
drivers/media/i2c/ds90ub953.c
746
priv->sd.name);
drivers/media/i2c/ds90ub953.c
75
struct v4l2_subdev sd;
drivers/media/i2c/ds90ub953.c
771
v4l2_async_subdev_nf_init(&priv->notifier, &priv->sd);
drivers/media/i2c/ds90ub953.c
97
static inline struct ub953_data *sd_to_ub953(struct v4l2_subdev *sd)
drivers/media/i2c/ds90ub953.c
99
return container_of(sd, struct ub953_data, sd);
drivers/media/i2c/ds90ub960.c
3489
ret = v4l2_subdev_call(it.rxport->source.sd, pad,
drivers/media/i2c/ds90ub960.c
3672
static int ub960_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub960.c
3676
struct ub960_data *priv = sd_to_ub960(sd);
drivers/media/i2c/ds90ub960.c
3736
priv->rxports[nport]->source.sd,
drivers/media/i2c/ds90ub960.c
3763
priv->rxports[nport]->source.sd,
drivers/media/i2c/ds90ub960.c
3787
static int ub960_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub960.c
3791
struct ub960_data *priv = sd_to_ub960(sd);
drivers/media/i2c/ds90ub960.c
3822
priv->rxports[nport]->source.sd,
drivers/media/i2c/ds90ub960.c
3848
static int _ub960_set_routing(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub960.c
3864
ret = v4l2_subdev_routing_validate(sd, routing,
drivers/media/i2c/ds90ub960.c
3870
ret = v4l2_subdev_set_routing_with_fmt(sd, state, routing, &format);
drivers/media/i2c/ds90ub960.c
3877
static int ub960_set_routing(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub960.c
3882
struct ub960_data *priv = sd_to_ub960(sd);
drivers/media/i2c/ds90ub960.c
3887
return _ub960_set_routing(sd, state, routing);
drivers/media/i2c/ds90ub960.c
3890
static int ub960_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/ds90ub960.c
3893
struct ub960_data *priv = sd_to_ub960(sd);
drivers/media/i2c/ds90ub960.c
3905
state = v4l2_subdev_lock_and_get_active_state(&priv->sd);
drivers/media/i2c/ds90ub960.c
3920
ret = v4l2_subdev_call(priv->rxports[nport]->source.sd, pad,
drivers/media/i2c/ds90ub960.c
3987
static int ub960_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub960.c
3991
struct ub960_data *priv = sd_to_ub960(sd);
drivers/media/i2c/ds90ub960.c
3999
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/i2c/ds90ub960.c
4024
static int ub960_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ds90ub960.c
4027
struct ub960_data *priv = sd_to_ub960(sd);
drivers/media/i2c/ds90ub960.c
4044
return _ub960_set_routing(sd, state, &routing);
drivers/media/i2c/ds90ub960.c
4123
static int ub960_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/ds90ub960.c
4125
struct ub960_data *priv = sd_to_ub960(sd);
drivers/media/i2c/ds90ub960.c
4133
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/ds90ub960.c
4749
struct ub960_data *priv = sd_to_ub960(notifier->sd);
drivers/media/i2c/ds90ub960.c
4763
rxport->source.sd = subdev;
drivers/media/i2c/ds90ub960.c
4766
ret = media_create_pad_link(&rxport->source.sd->entity,
drivers/media/i2c/ds90ub960.c
4767
rxport->source.pad, &priv->sd.entity, nport,
drivers/media/i2c/ds90ub960.c
4772
rxport->source.sd->name, rxport->source.pad,
drivers/media/i2c/ds90ub960.c
4773
priv->sd.name, nport);
drivers/media/i2c/ds90ub960.c
4778
if (!it.rxport->source.sd) {
drivers/media/i2c/ds90ub960.c
4793
rxport->source.sd = NULL;
drivers/media/i2c/ds90ub960.c
4806
v4l2_async_subdev_nf_init(&priv->notifier, &priv->sd);
drivers/media/i2c/ds90ub960.c
4848
v4l2_i2c_subdev_init(&priv->sd, priv->client, &ub960_subdev_ops);
drivers/media/i2c/ds90ub960.c
4849
priv->sd.internal_ops = &ub960_internal_ops;
drivers/media/i2c/ds90ub960.c
485
struct v4l2_subdev *sd;
drivers/media/i2c/ds90ub960.c
4852
priv->sd.ctrl_handler = &priv->ctrl_handler;
drivers/media/i2c/ds90ub960.c
4863
priv->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
drivers/media/i2c/ds90ub960.c
4865
priv->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/i2c/ds90ub960.c
4866
priv->sd.entity.ops = &ub960_entity_ops;
drivers/media/i2c/ds90ub960.c
4874
ret = media_entity_pads_init(&priv->sd.entity,
drivers/media/i2c/ds90ub960.c
4881
priv->sd.state_lock = priv->sd.ctrl_handler->lock;
drivers/media/i2c/ds90ub960.c
4883
ret = v4l2_subdev_init_finalize(&priv->sd);
drivers/media/i2c/ds90ub960.c
4893
ret = v4l2_async_register_subdev(&priv->sd);
drivers/media/i2c/ds90ub960.c
4904
v4l2_subdev_cleanup(&priv->sd);
drivers/media/i2c/ds90ub960.c
4906
media_entity_cleanup(&priv->sd.entity);
drivers/media/i2c/ds90ub960.c
4916
v4l2_async_unregister_subdev(&priv->sd);
drivers/media/i2c/ds90ub960.c
4918
v4l2_subdev_cleanup(&priv->sd);
drivers/media/i2c/ds90ub960.c
4920
media_entity_cleanup(&priv->sd.entity);
drivers/media/i2c/ds90ub960.c
5157
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ds90ub960.c
5158
struct ub960_data *priv = sd_to_ub960(sd);
drivers/media/i2c/ds90ub960.c
565
struct v4l2_subdev sd;
drivers/media/i2c/ds90ub960.c
597
static inline struct ub960_data *sd_to_ub960(struct v4l2_subdev *sd)
drivers/media/i2c/ds90ub960.c
599
return container_of(sd, struct ub960_data, sd);
drivers/media/i2c/dw9714.c
120
v4l2_async_unregister_subdev(&dw9714_dev->sd);
drivers/media/i2c/dw9714.c
122
media_entity_cleanup(&dw9714_dev->sd.entity);
drivers/media/i2c/dw9714.c
136
dev_err(dev_vcm->sd.dev, "%s fail error: 0x%x\n",
drivers/media/i2c/dw9714.c
138
dev_vcm->sd.ctrl_handler = hdl;
drivers/media/i2c/dw9714.c
191
v4l2_i2c_subdev_init(&dw9714_dev->sd, client, &dw9714_ops);
drivers/media/i2c/dw9714.c
192
dw9714_dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
drivers/media/i2c/dw9714.c
194
dw9714_dev->sd.internal_ops = &dw9714_int_ops;
drivers/media/i2c/dw9714.c
200
rval = media_entity_pads_init(&dw9714_dev->sd.entity, 0, NULL);
drivers/media/i2c/dw9714.c
204
dw9714_dev->sd.entity.function = MEDIA_ENT_F_LENS;
drivers/media/i2c/dw9714.c
206
rval = v4l2_async_register_subdev(&dw9714_dev->sd);
drivers/media/i2c/dw9714.c
219
media_entity_cleanup(&dw9714_dev->sd.entity);
drivers/media/i2c/dw9714.c
226
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/dw9714.c
227
struct dw9714_device *dw9714_dev = sd_to_dw9714_vcm(sd);
drivers/media/i2c/dw9714.c
250
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/dw9714.c
251
struct dw9714_device *dw9714_dev = sd_to_dw9714_vcm(sd);
drivers/media/i2c/dw9714.c
282
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/dw9714.c
283
struct dw9714_device *dw9714_dev = sd_to_dw9714_vcm(sd);
drivers/media/i2c/dw9714.c
39
struct v4l2_subdev sd;
drivers/media/i2c/dw9714.c
52
return container_of(subdev, struct dw9714_device, sd);
drivers/media/i2c/dw9714.c
70
struct i2c_client *client = v4l2_get_subdevdata(&dw9714_dev->sd);
drivers/media/i2c/dw9714.c
91
static int dw9714_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/dw9714.c
93
return pm_runtime_resume_and_get(sd->dev);
drivers/media/i2c/dw9714.c
96
static int dw9714_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/dw9714.c
98
pm_runtime_put(sd->dev);
drivers/media/i2c/dw9719.c
264
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/dw9719.c
265
struct dw9719_device *dw9719 = to_dw9719_device(sd);
drivers/media/i2c/dw9719.c
283
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/dw9719.c
284
struct dw9719_device *dw9719 = to_dw9719_device(sd);
drivers/media/i2c/dw9719.c
309
static int dw9719_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/dw9719.c
311
return pm_runtime_resume_and_get(sd->dev);
drivers/media/i2c/dw9719.c
314
static int dw9719_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/dw9719.c
316
pm_runtime_put_autosuspend(sd->dev);
drivers/media/i2c/dw9719.c
343
dw9719->sd.ctrl_handler = &dw9719->ctrls.handler;
drivers/media/i2c/dw9719.c
375
v4l2_i2c_subdev_init(&dw9719->sd, client, &dw9719_ops);
drivers/media/i2c/dw9719.c
376
dw9719->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/dw9719.c
377
dw9719->sd.internal_ops = &dw9719_internal_ops;
drivers/media/i2c/dw9719.c
383
ret = media_entity_pads_init(&dw9719->sd.entity, 0, NULL);
drivers/media/i2c/dw9719.c
387
dw9719->sd.entity.function = MEDIA_ENT_F_LENS;
drivers/media/i2c/dw9719.c
404
ret = v4l2_async_register_subdev(&dw9719->sd);
drivers/media/i2c/dw9719.c
419
media_entity_cleanup(&dw9719->sd.entity);
drivers/media/i2c/dw9719.c
428
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/dw9719.c
430
container_of(sd, struct dw9719_device, sd);
drivers/media/i2c/dw9719.c
432
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/dw9719.c
434
media_entity_cleanup(&dw9719->sd.entity);
drivers/media/i2c/dw9719.c
75
#define to_dw9719_device(x) container_of(x, struct dw9719_device, sd)
drivers/media/i2c/dw9719.c
85
struct v4l2_subdev sd;
drivers/media/i2c/dw9768.c
105
struct v4l2_subdev sd;
drivers/media/i2c/dw9768.c
115
return container_of(subdev, struct dw9768, sd);
drivers/media/i2c/dw9768.c
199
struct i2c_client *client = v4l2_get_subdevdata(&dw9768->sd);
drivers/media/i2c/dw9768.c
213
struct i2c_client *client = v4l2_get_subdevdata(&dw9768->sd);
drivers/media/i2c/dw9768.c
221
struct i2c_client *client = v4l2_get_subdevdata(&dw9768->sd);
drivers/media/i2c/dw9768.c
283
struct i2c_client *client = v4l2_get_subdevdata(&dw9768->sd);
drivers/media/i2c/dw9768.c
313
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/dw9768.c
314
struct dw9768 *dw9768 = sd_to_dw9768(sd);
drivers/media/i2c/dw9768.c
325
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/dw9768.c
326
struct dw9768 *dw9768 = sd_to_dw9768(sd);
drivers/media/i2c/dw9768.c
370
static int dw9768_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/dw9768.c
372
return pm_runtime_resume_and_get(sd->dev);
drivers/media/i2c/dw9768.c
375
static int dw9768_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/dw9768.c
377
pm_runtime_put_autosuspend(sd->dev);
drivers/media/i2c/dw9768.c
403
dw9768->sd.ctrl_handler = hdl;
drivers/media/i2c/dw9768.c
421
v4l2_i2c_subdev_init(&dw9768->sd, client, &dw9768_ops);
drivers/media/i2c/dw9768.c
459
dw9768->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/dw9768.c
460
dw9768->sd.internal_ops = &dw9768_int_ops;
drivers/media/i2c/dw9768.c
462
ret = media_entity_pads_init(&dw9768->sd.entity, 0, NULL);
drivers/media/i2c/dw9768.c
466
dw9768->sd.entity.function = MEDIA_ENT_F_LENS;
drivers/media/i2c/dw9768.c
487
ret = v4l2_async_register_subdev(&dw9768->sd);
drivers/media/i2c/dw9768.c
506
media_entity_cleanup(&dw9768->sd.entity);
drivers/media/i2c/dw9768.c
515
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/dw9768.c
516
struct dw9768 *dw9768 = sd_to_dw9768(sd);
drivers/media/i2c/dw9768.c
519
v4l2_async_unregister_subdev(&dw9768->sd);
drivers/media/i2c/dw9768.c
521
media_entity_cleanup(&dw9768->sd.entity);
drivers/media/i2c/dw9807-vcm.c
118
struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd);
drivers/media/i2c/dw9807-vcm.c
131
static int dw9807_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/dw9807-vcm.c
133
return pm_runtime_resume_and_get(sd->dev);
drivers/media/i2c/dw9807-vcm.c
136
static int dw9807_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/dw9807-vcm.c
138
pm_runtime_put(sd->dev);
drivers/media/i2c/dw9807-vcm.c
152
v4l2_async_unregister_subdev(&dw9807_dev->sd);
drivers/media/i2c/dw9807-vcm.c
154
media_entity_cleanup(&dw9807_dev->sd.entity);
drivers/media/i2c/dw9807-vcm.c
161
struct i2c_client *client = v4l2_get_subdevdata(&dev_vcm->sd);
drivers/media/i2c/dw9807-vcm.c
168
dev_vcm->sd.ctrl_handler = hdl;
drivers/media/i2c/dw9807-vcm.c
188
v4l2_i2c_subdev_init(&dw9807_dev->sd, client, &dw9807_ops);
drivers/media/i2c/dw9807-vcm.c
189
dw9807_dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/dw9807-vcm.c
190
dw9807_dev->sd.internal_ops = &dw9807_int_ops;
drivers/media/i2c/dw9807-vcm.c
196
rval = media_entity_pads_init(&dw9807_dev->sd.entity, 0, NULL);
drivers/media/i2c/dw9807-vcm.c
200
dw9807_dev->sd.entity.function = MEDIA_ENT_F_LENS;
drivers/media/i2c/dw9807-vcm.c
202
rval = v4l2_async_register_subdev(&dw9807_dev->sd);
drivers/media/i2c/dw9807-vcm.c
214
media_entity_cleanup(&dw9807_dev->sd.entity);
drivers/media/i2c/dw9807-vcm.c
221
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/dw9807-vcm.c
222
struct dw9807_device *dw9807_dev = sd_to_dw9807_vcm(sd);
drivers/media/i2c/dw9807-vcm.c
237
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/dw9807-vcm.c
238
struct dw9807_device *dw9807_dev = sd_to_dw9807_vcm(sd);
drivers/media/i2c/dw9807-vcm.c
269
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/dw9807-vcm.c
270
struct dw9807_device *dw9807_dev = sd_to_dw9807_vcm(sd);
drivers/media/i2c/dw9807-vcm.c
43
struct v4l2_subdev sd;
drivers/media/i2c/dw9807-vcm.c
50
return container_of(subdev, struct dw9807_device, sd);
drivers/media/i2c/et8ek8/et8ek8_driver.c
1329
static int et8ek8_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/et8ek8/et8ek8_driver.c
1331
struct et8ek8_sensor *sensor = to_et8ek8_sensor(sd);
drivers/media/i2c/et8ek8/et8ek8_driver.c
1340
return et8ek8_set_power(sd, true);
drivers/media/i2c/et8ek8/et8ek8_driver.c
1343
static int et8ek8_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/et8ek8/et8ek8_driver.c
1345
return et8ek8_set_power(sd, false);
drivers/media/i2c/et8ek8/et8ek8_driver.c
62
#define to_et8ek8_sensor(sd) container_of(sd, struct et8ek8_sensor, subdev)
drivers/media/i2c/gc0308.c
1046
static int gc0308_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/gc0308.c
1050
struct gc0308 *gc0308 = to_gc0308(sd);
drivers/media/i2c/gc0308.c
1076
static int gc0308_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/gc0308.c
1169
static int gc0308_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/gc0308.c
1171
struct gc0308 *gc0308 = to_gc0308(sd);
drivers/media/i2c/gc0308.c
1175
sd_state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/gc0308.c
1270
gc0308->sd.ctrl_handler = &gc0308->hdl;
drivers/media/i2c/gc0308.c
1332
v4l2_i2c_subdev_init(&gc0308->sd, client, &gc0308_subdev_ops);
drivers/media/i2c/gc0308.c
1333
gc0308->sd.internal_ops = &gc0308_internal_ops;
drivers/media/i2c/gc0308.c
1334
gc0308->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/gc0308.c
1340
gc0308->sd.state_lock = gc0308->hdl.lock;
drivers/media/i2c/gc0308.c
1342
gc0308->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/gc0308.c
1343
ret = media_entity_pads_init(&gc0308->sd.entity, 1, &gc0308->pad);
drivers/media/i2c/gc0308.c
1347
ret = v4l2_subdev_init_finalize(&gc0308->sd);
drivers/media/i2c/gc0308.c
1384
ret = v4l2_async_register_subdev(&gc0308->sd);
drivers/media/i2c/gc0308.c
1398
v4l2_subdev_cleanup(&gc0308->sd);
drivers/media/i2c/gc0308.c
1400
media_entity_cleanup(&gc0308->sd.entity);
drivers/media/i2c/gc0308.c
1411
v4l2_async_unregister_subdev(&gc0308->sd);
drivers/media/i2c/gc0308.c
1413
media_entity_cleanup(&gc0308->sd.entity);
drivers/media/i2c/gc0308.c
428
struct v4l2_subdev sd;
drivers/media/i2c/gc0308.c
451
static inline struct gc0308 *to_gc0308(struct v4l2_subdev *sd)
drivers/media/i2c/gc0308.c
453
return container_of(sd, struct gc0308, sd);
drivers/media/i2c/gc0308.c
809
static int gc0308_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/gc0308.c
812
struct gc0308 *gc0308 = to_gc0308(sd);
drivers/media/i2c/gc0308.c
817
static int gc0308_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/gc0308.c
820
struct gc0308 *gc0308 = to_gc0308(sd);
drivers/media/i2c/gc0308.c
994
static int gc0308_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/gc0310.c
325
if (!pm_runtime_get_if_in_use(sensor->sd.dev))
drivers/media/i2c/gc0310.c
346
pm_runtime_put(sensor->sd.dev);
drivers/media/i2c/gc0310.c
364
static int gc0310_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/gc0310.c
388
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/gc0310.c
389
struct gc0310_device *sensor = to_gc0310_sensor(sd);
drivers/media/i2c/gc0310.c
398
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/gc0310.c
399
struct gc0310_device *sensor = to_gc0310_sensor(sd);
drivers/media/i2c/gc0310.c
412
struct i2c_client *client = v4l2_get_subdevdata(&sensor->sd);
drivers/media/i2c/gc0310.c
438
static int gc0310_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/gc0310.c
442
struct gc0310_device *sensor = to_gc0310_sensor(sd);
drivers/media/i2c/gc0310.c
443
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/gc0310.c
482
static int gc0310_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/gc0310.c
486
struct gc0310_device *sensor = to_gc0310_sensor(sd);
drivers/media/i2c/gc0310.c
487
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/gc0310.c
501
static int gc0310_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/gc0310.c
513
static int gc0310_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/gc0310.c
549
static int gc0310_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/gc0310.c
562
struct i2c_client *client = v4l2_get_subdevdata(&sensor->sd);
drivers/media/i2c/gc0310.c
570
sensor->sd.ctrl_handler = hdl;
drivers/media/i2c/gc0310.c
617
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/gc0310.c
618
struct gc0310_device *sensor = to_gc0310_sensor(sd);
drivers/media/i2c/gc0310.c
620
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/gc0310.c
621
v4l2_subdev_cleanup(sd);
drivers/media/i2c/gc0310.c
622
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/gc0310.c
710
v4l2_i2c_subdev_init(&sensor->sd, client, &gc0310_ops);
drivers/media/i2c/gc0310.c
726
sensor->sd.internal_ops = &gc0310_internal_ops;
drivers/media/i2c/gc0310.c
727
sensor->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/gc0310.c
729
sensor->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/gc0310.c
735
ret = media_entity_pads_init(&sensor->sd.entity, 1, &sensor->pad);
drivers/media/i2c/gc0310.c
739
sensor->sd.state_lock = sensor->ctrls.handler.lock;
drivers/media/i2c/gc0310.c
740
ret = v4l2_subdev_init_finalize(&sensor->sd);
drivers/media/i2c/gc0310.c
744
ret = v4l2_async_register_subdev_sensor(&sensor->sd);
drivers/media/i2c/gc0310.c
84
#define to_gc0310_sensor(x) container_of(x, struct gc0310_device, sd)
drivers/media/i2c/gc0310.c
87
struct v4l2_subdev sd;
drivers/media/i2c/gc05a2.c
1126
struct i2c_client *client = v4l2_get_subdevdata(&gc05a2->sd);
drivers/media/i2c/gc05a2.c
1207
gc05a2->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/gc05a2.c
1254
v4l2_i2c_subdev_init(&gc05a2->sd, client, &gc05a2_subdev_ops);
drivers/media/i2c/gc05a2.c
1255
gc05a2->sd.internal_ops = &gc05a2_internal_ops;
drivers/media/i2c/gc05a2.c
1263
gc05a2->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/gc05a2.c
1265
gc05a2->sd.dev = &client->dev;
drivers/media/i2c/gc05a2.c
1266
gc05a2->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/gc05a2.c
1268
ret = media_entity_pads_init(&gc05a2->sd.entity, 1, &gc05a2->pad);
drivers/media/i2c/gc05a2.c
1274
gc05a2->sd.state_lock = gc05a2->ctrls.lock;
drivers/media/i2c/gc05a2.c
1275
ret = v4l2_subdev_init_finalize(&gc05a2->sd);
drivers/media/i2c/gc05a2.c
1286
ret = v4l2_async_register_subdev_sensor(&gc05a2->sd);
drivers/media/i2c/gc05a2.c
1296
v4l2_subdev_cleanup(&gc05a2->sd);
drivers/media/i2c/gc05a2.c
1299
media_entity_cleanup(&gc05a2->sd.entity);
drivers/media/i2c/gc05a2.c
1309
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/gc05a2.c
1310
struct gc05a2 *gc05a2 = to_gc05a2(sd);
drivers/media/i2c/gc05a2.c
1312
v4l2_async_unregister_subdev(&gc05a2->sd);
drivers/media/i2c/gc05a2.c
1313
v4l2_subdev_cleanup(sd);
drivers/media/i2c/gc05a2.c
1314
media_entity_cleanup(&gc05a2->sd.entity);
drivers/media/i2c/gc05a2.c
607
static inline struct gc05a2 *to_gc05a2(struct v4l2_subdev *sd)
drivers/media/i2c/gc05a2.c
609
return container_of(sd, struct gc05a2, sd);
drivers/media/i2c/gc05a2.c
614
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/gc05a2.c
615
struct gc05a2 *gc05a2 = to_gc05a2(sd);
drivers/media/i2c/gc05a2.c
643
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/gc05a2.c
644
struct gc05a2 *gc05a2 = to_gc05a2(sd);
drivers/media/i2c/gc05a2.c
654
static int gc05a2_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/gc05a2.c
733
static int gc05a2_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/gc05a2.c
737
struct gc05a2 *gc05a2 = to_gc05a2(sd);
drivers/media/i2c/gc05a2.c
764
static int gc05a2_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/gc05a2.c
786
static int gc05a2_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/gc05a2.c
799
gc05a2_set_format(sd, state, &fmt);
drivers/media/i2c/gc05a2.c
85
struct v4l2_subdev sd;
drivers/media/i2c/gc05a2.c
889
state = v4l2_subdev_get_locked_active_state(&gc05a2->sd);
drivers/media/i2c/gc08a3.c
1070
struct i2c_client *client = v4l2_get_subdevdata(&gc08a3->sd);
drivers/media/i2c/gc08a3.c
1151
gc08a3->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/gc08a3.c
1218
v4l2_i2c_subdev_init(&gc08a3->sd, client, &gc08a3_subdev_ops);
drivers/media/i2c/gc08a3.c
1219
gc08a3->sd.internal_ops = &gc08a3_internal_ops;
drivers/media/i2c/gc08a3.c
1239
gc08a3->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/gc08a3.c
1241
gc08a3->sd.dev = &client->dev;
drivers/media/i2c/gc08a3.c
1242
gc08a3->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/gc08a3.c
1244
ret = media_entity_pads_init(&gc08a3->sd.entity, 1, &gc08a3->pad);
drivers/media/i2c/gc08a3.c
1250
gc08a3->sd.state_lock = gc08a3->ctrls.lock;
drivers/media/i2c/gc08a3.c
1251
ret = v4l2_subdev_init_finalize(&gc08a3->sd);
drivers/media/i2c/gc08a3.c
1263
ret = v4l2_async_register_subdev_sensor(&gc08a3->sd);
drivers/media/i2c/gc08a3.c
1273
v4l2_subdev_cleanup(&gc08a3->sd);
drivers/media/i2c/gc08a3.c
1276
media_entity_cleanup(&gc08a3->sd.entity);
drivers/media/i2c/gc08a3.c
1279
v4l2_ctrl_handler_free(gc08a3->sd.ctrl_handler);
drivers/media/i2c/gc08a3.c
1289
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/gc08a3.c
1290
struct gc08a3 *gc08a3 = to_gc08a3(sd);
drivers/media/i2c/gc08a3.c
1292
v4l2_async_unregister_subdev(&gc08a3->sd);
drivers/media/i2c/gc08a3.c
1293
v4l2_subdev_cleanup(sd);
drivers/media/i2c/gc08a3.c
1294
media_entity_cleanup(&gc08a3->sd.entity);
drivers/media/i2c/gc08a3.c
582
static inline struct gc08a3 *to_gc08a3(struct v4l2_subdev *sd)
drivers/media/i2c/gc08a3.c
584
return container_of(sd, struct gc08a3, sd);
drivers/media/i2c/gc08a3.c
589
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/gc08a3.c
590
struct gc08a3 *gc08a3 = to_gc08a3(sd);
drivers/media/i2c/gc08a3.c
618
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/gc08a3.c
619
struct gc08a3 *gc08a3 = to_gc08a3(sd);
drivers/media/i2c/gc08a3.c
629
static int gc08a3_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/gc08a3.c
708
static int gc08a3_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/gc08a3.c
712
struct gc08a3 *gc08a3 = to_gc08a3(sd);
drivers/media/i2c/gc08a3.c
740
static int gc08a3_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/gc08a3.c
762
static int gc08a3_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/gc08a3.c
775
gc08a3_set_format(sd, state, &fmt);
drivers/media/i2c/gc08a3.c
85
struct v4l2_subdev sd;
drivers/media/i2c/gc08a3.c
859
state = v4l2_subdev_get_locked_active_state(&gc08a3->sd);
drivers/media/i2c/gc2145.c
1031
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/gc2145.c
1032
struct gc2145 *gc2145 = to_gc2145(sd);
drivers/media/i2c/gc2145.c
1044
struct i2c_client *client = v4l2_get_subdevdata(&gc2145->sd);
drivers/media/i2c/gc2145.c
1057
struct i2c_client *client = v4l2_get_subdevdata(&gc2145->sd);
drivers/media/i2c/gc2145.c
1161
struct v4l2_subdev *sd = gc2145_ctrl_to_sd(ctrl);
drivers/media/i2c/gc2145.c
1162
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/gc2145.c
1163
struct gc2145 *gc2145 = to_gc2145(sd);
drivers/media/i2c/gc2145.c
1206
struct i2c_client *client = v4l2_get_subdevdata(&gc2145->sd);
drivers/media/i2c/gc2145.c
1258
gc2145->sd.ctrl_handler = hdl;
drivers/media/i2c/gc2145.c
1326
v4l2_i2c_subdev_init(&gc2145->sd, client, &gc2145_subdev_ops);
drivers/media/i2c/gc2145.c
1327
gc2145->sd.internal_ops = &gc2145_subdev_internal_ops;
drivers/media/i2c/gc2145.c
1391
gc2145->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/gc2145.c
1392
gc2145->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/gc2145.c
1397
ret = media_entity_pads_init(&gc2145->sd.entity, 1, &gc2145->pad);
drivers/media/i2c/gc2145.c
1403
gc2145->sd.state_lock = gc2145->ctrls.handler.lock;
drivers/media/i2c/gc2145.c
1404
ret = v4l2_subdev_init_finalize(&gc2145->sd);
drivers/media/i2c/gc2145.c
1419
ret = v4l2_async_register_subdev_sensor(&gc2145->sd);
drivers/media/i2c/gc2145.c
1428
v4l2_subdev_cleanup(&gc2145->sd);
drivers/media/i2c/gc2145.c
1433
media_entity_cleanup(&gc2145->sd.entity);
drivers/media/i2c/gc2145.c
1446
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/gc2145.c
1447
struct gc2145 *gc2145 = to_gc2145(sd);
drivers/media/i2c/gc2145.c
1449
v4l2_subdev_cleanup(sd);
drivers/media/i2c/gc2145.c
1450
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/gc2145.c
1451
media_entity_cleanup(&sd->entity);
drivers/media/i2c/gc2145.c
632
struct v4l2_subdev sd;
drivers/media/i2c/gc2145.c
651
return container_of(_sd, struct gc2145, sd);
drivers/media/i2c/gc2145.c
657
ctrls.handler)->sd;
drivers/media/i2c/gc2145.c
691
static int gc2145_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/gc2145.c
694
struct gc2145 *gc2145 = to_gc2145(sd);
drivers/media/i2c/gc2145.c
711
static int gc2145_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/gc2145.c
741
static int gc2145_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/gc2145.c
752
static int gc2145_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/gc2145.c
756
struct gc2145 *gc2145 = to_gc2145(sd);
drivers/media/i2c/gc2145.c
776
static int gc2145_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/gc2145.c
780
struct gc2145 *gc2145 = to_gc2145(sd);
drivers/media/i2c/gc2145.c
901
static int gc2145_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/gc2145.c
905
struct gc2145 *gc2145 = to_gc2145(sd);
drivers/media/i2c/gc2145.c
906
struct i2c_client *client = v4l2_get_subdevdata(&gc2145->sd);
drivers/media/i2c/gc2145.c
970
static int gc2145_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/gc2145.c
974
struct gc2145 *gc2145 = to_gc2145(sd);
drivers/media/i2c/gc2145.c
975
struct i2c_client *client = v4l2_get_subdevdata(&gc2145->sd);
drivers/media/i2c/gc2145.c
995
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/gc2145.c
996
struct gc2145 *gc2145 = to_gc2145(sd);
drivers/media/i2c/hi556.c
1023
ret = __v4l2_ctrl_handler_setup(hi556->sd.ctrl_handler);
drivers/media/i2c/hi556.c
1045
static int hi556_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/hi556.c
1047
struct hi556 *hi556 = to_hi556(sd);
drivers/media/i2c/hi556.c
1073
static int hi556_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/hi556.c
1077
struct hi556 *hi556 = to_hi556(sd);
drivers/media/i2c/hi556.c
1115
static int hi556_get_format(struct v4l2_subdev *sd,
drivers/media/i2c/hi556.c
1119
struct hi556 *hi556 = to_hi556(sd);
drivers/media/i2c/hi556.c
1133
static int hi556_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/hi556.c
1145
static int hi556_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/hi556.c
1163
static int hi556_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/hi556.c
1165
struct hi556 *hi556 = to_hi556(sd);
drivers/media/i2c/hi556.c
122
#define to_hi556(_sd) container_of(_sd, struct hi556, sd)
drivers/media/i2c/hi556.c
1269
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/hi556.c
1270
struct hi556 *hi556 = to_hi556(sd);
drivers/media/i2c/hi556.c
1272
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/hi556.c
1273
media_entity_cleanup(&sd->entity);
drivers/media/i2c/hi556.c
1274
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/hi556.c
1281
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/hi556.c
1282
struct hi556 *hi556 = to_hi556(sd);
drivers/media/i2c/hi556.c
1293
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/hi556.c
1294
struct hi556 *hi556 = to_hi556(sd);
drivers/media/i2c/hi556.c
1336
v4l2_i2c_subdev_init(&hi556->sd, client, &hi556_subdev_ops);
drivers/media/i2c/hi556.c
1388
hi556->sd.internal_ops = &hi556_internal_ops;
drivers/media/i2c/hi556.c
1389
hi556->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/hi556.c
1390
hi556->sd.entity.ops = &hi556_subdev_entity_ops;
drivers/media/i2c/hi556.c
1391
hi556->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/hi556.c
1393
ret = media_entity_pads_init(&hi556->sd.entity, 1, &hi556->pad);
drivers/media/i2c/hi556.c
1399
ret = v4l2_async_register_subdev_sensor(&hi556->sd);
drivers/media/i2c/hi556.c
1415
media_entity_cleanup(&hi556->sd.entity);
drivers/media/i2c/hi556.c
1418
v4l2_ctrl_handler_free(hi556->sd.ctrl_handler);
drivers/media/i2c/hi556.c
637
struct v4l2_subdev sd;
drivers/media/i2c/hi556.c
674
struct i2c_client *client = v4l2_get_subdevdata(&hi556->sd);
drivers/media/i2c/hi556.c
704
struct i2c_client *client = v4l2_get_subdevdata(&hi556->sd);
drivers/media/i2c/hi556.c
909
hi556->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/hi556.c
962
static int hi556_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/hi556.c
968
struct hi556 *hi556 = to_hi556(sd);
drivers/media/i2c/hi846.c
1159
struct v4l2_subdev sd;
drivers/media/i2c/hi846.c
1175
static inline struct hi846 *to_hi846(struct v4l2_subdev *sd)
drivers/media/i2c/hi846.c
1177
return container_of(sd, struct hi846, sd);
drivers/media/i2c/hi846.c
1219
struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
drivers/media/i2c/hi846.c
1248
struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
drivers/media/i2c/hi846.c
1267
struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
drivers/media/i2c/hi846.c
1287
struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
drivers/media/i2c/hi846.c
1340
struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
drivers/media/i2c/hi846.c
1417
struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
drivers/media/i2c/hi846.c
1489
hi846->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/hi846.c
1500
struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
drivers/media/i2c/hi846.c
1530
struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
drivers/media/i2c/hi846.c
1562
ret = __v4l2_ctrl_handler_setup(hi846->sd.ctrl_handler);
drivers/media/i2c/hi846.c
1596
struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
drivers/media/i2c/hi846.c
1604
static int hi846_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/hi846.c
1606
struct hi846 *hi846 = to_hi846(sd);
drivers/media/i2c/hi846.c
1607
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/hi846.c
1675
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/hi846.c
1676
struct hi846 *hi846 = to_hi846(sd);
drivers/media/i2c/hi846.c
1684
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/hi846.c
1685
struct hi846 *hi846 = to_hi846(sd);
drivers/media/i2c/hi846.c
1690
static int hi846_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/hi846.c
1694
struct hi846 *hi846 = to_hi846(sd);
drivers/media/i2c/hi846.c
1696
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/hi846.c
1777
static int hi846_get_format(struct v4l2_subdev *sd,
drivers/media/i2c/hi846.c
1781
struct hi846 *hi846 = to_hi846(sd);
drivers/media/i2c/hi846.c
1783
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/hi846.c
1805
static int hi846_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/hi846.c
1817
static int hi846_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/hi846.c
1821
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/hi846.c
1842
static int hi846_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/hi846.c
1846
struct hi846 *hi846 = to_hi846(sd);
drivers/media/i2c/hi846.c
1874
static int hi846_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/hi846.c
1877
struct hi846 *hi846 = to_hi846(sd);
drivers/media/i2c/hi846.c
1920
struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
drivers/media/i2c/hi846.c
2075
v4l2_i2c_subdev_init(&hi846->sd, client, &hi846_subdev_ops);
drivers/media/i2c/hi846.c
2076
hi846->sd.internal_ops = &hi846_internal_ops;
drivers/media/i2c/hi846.c
2096
hi846->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/hi846.c
2097
hi846->sd.entity.ops = &hi846_subdev_entity_ops;
drivers/media/i2c/hi846.c
2098
hi846->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/hi846.c
2100
ret = media_entity_pads_init(&hi846->sd.entity, 1, &hi846->pad);
drivers/media/i2c/hi846.c
2106
ret = v4l2_async_register_subdev_sensor(&hi846->sd);
drivers/media/i2c/hi846.c
2120
media_entity_cleanup(&hi846->sd.entity);
drivers/media/i2c/hi846.c
2123
v4l2_ctrl_handler_free(hi846->sd.ctrl_handler);
drivers/media/i2c/hi846.c
2136
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/hi846.c
2137
struct hi846 *hi846 = to_hi846(sd);
drivers/media/i2c/hi846.c
2139
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/hi846.c
2140
media_entity_cleanup(&sd->entity);
drivers/media/i2c/hi846.c
2141
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/hi847.c
124
#define to_hi847(_sd) container_of(_sd, struct hi847, sd)
drivers/media/i2c/hi847.c
2174
struct v4l2_subdev sd;
drivers/media/i2c/hi847.c
2205
struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
drivers/media/i2c/hi847.c
2235
struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
drivers/media/i2c/hi847.c
2547
hi847->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/hi847.c
2581
ret = __v4l2_ctrl_handler_setup(hi847->sd.ctrl_handler);
drivers/media/i2c/hi847.c
2612
static int hi847_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/hi847.c
2614
struct hi847 *hi847 = to_hi847(sd);
drivers/media/i2c/hi847.c
2641
static int hi847_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/hi847.c
2645
struct hi847 *hi847 = to_hi847(sd);
drivers/media/i2c/hi847.c
2684
static int hi847_get_format(struct v4l2_subdev *sd,
drivers/media/i2c/hi847.c
2688
struct hi847 *hi847 = to_hi847(sd);
drivers/media/i2c/hi847.c
2702
static int hi847_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/hi847.c
2714
static int hi847_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/hi847.c
2732
static int hi847_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/hi847.c
2734
struct hi847 *hi847 = to_hi847(sd);
drivers/media/i2c/hi847.c
2845
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/hi847.c
2846
struct hi847 *hi847 = to_hi847(sd);
drivers/media/i2c/hi847.c
2848
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/hi847.c
2849
media_entity_cleanup(&sd->entity);
drivers/media/i2c/hi847.c
2850
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/hi847.c
2885
v4l2_i2c_subdev_init(&hi847->sd, client, &hi847_subdev_ops);
drivers/media/i2c/hi847.c
2900
hi847->sd.internal_ops = &hi847_internal_ops;
drivers/media/i2c/hi847.c
2901
hi847->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/hi847.c
2902
hi847->sd.entity.ops = &hi847_subdev_entity_ops;
drivers/media/i2c/hi847.c
2903
hi847->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/hi847.c
2905
ret = media_entity_pads_init(&hi847->sd.entity, 1, &hi847->pad);
drivers/media/i2c/hi847.c
2911
ret = v4l2_async_register_subdev_sensor(&hi847->sd);
drivers/media/i2c/hi847.c
2925
media_entity_cleanup(&hi847->sd.entity);
drivers/media/i2c/hi847.c
2928
v4l2_ctrl_handler_free(hi847->sd.ctrl_handler);
drivers/media/i2c/imx111.c
1037
static int imx111_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/imx111.c
1041
struct imx111 *sensor = sd_to_imx111(sd);
drivers/media/i2c/imx111.c
1086
static int imx111_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/imx111.c
1090
struct imx111 *sensor = sd_to_imx111(sd);
drivers/media/i2c/imx111.c
1102
static int imx111_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/imx111.c
1106
struct imx111 *sensor = sd_to_imx111(sd);
drivers/media/i2c/imx111.c
1124
static int imx111_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx111.c
1128
struct imx111 *sensor = sd_to_imx111(sd);
drivers/media/i2c/imx111.c
1189
static int imx111_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/imx111.c
1192
struct imx111 *sensor = sd_to_imx111(sd);
drivers/media/i2c/imx111.c
1239
struct v4l2_subdev *sd = &sensor->sd;
drivers/media/i2c/imx111.c
1245
v4l2_i2c_subdev_init(sd, client, &imx111_subdev_ops);
drivers/media/i2c/imx111.c
1247
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/imx111.c
1248
sd->internal_ops = &imx111_internal_ops;
drivers/media/i2c/imx111.c
1251
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/imx111.c
1252
sd->entity.ops = &imx111_subdev_entity_ops;
drivers/media/i2c/imx111.c
1255
ret = media_entity_pads_init(&sd->entity, 1, pad);
drivers/media/i2c/imx111.c
1269
media_entity_cleanup(&sd->entity);
drivers/media/i2c/imx111.c
1321
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx111.c
1322
struct imx111 *sensor = sd_to_imx111(sd);
drivers/media/i2c/imx111.c
1340
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx111.c
1341
struct imx111 *sensor = sd_to_imx111(sd);
drivers/media/i2c/imx111.c
1532
ret = v4l2_subdev_init_finalize(&sensor->sd);
drivers/media/i2c/imx111.c
1539
ret = v4l2_async_register_subdev_sensor(&sensor->sd);
drivers/media/i2c/imx111.c
1552
v4l2_subdev_cleanup(&sensor->sd);
drivers/media/i2c/imx111.c
1558
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/imx111.c
1571
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx111.c
1572
struct imx111 *sensor = sd_to_imx111(sd);
drivers/media/i2c/imx111.c
1574
v4l2_async_unregister_subdev(&sensor->sd);
drivers/media/i2c/imx111.c
1575
v4l2_subdev_cleanup(sd);
drivers/media/i2c/imx111.c
1576
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/imx111.c
179
struct v4l2_subdev sd;
drivers/media/i2c/imx111.c
682
static inline struct imx111 *sd_to_imx111(struct v4l2_subdev *sd)
drivers/media/i2c/imx111.c
684
return container_of_const(sd, struct imx111, sd);
drivers/media/i2c/imx111.c
978
sensor->sd.ctrl_handler = hdl;
drivers/media/i2c/imx111.c
983
static int imx111_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/imx111.c
987
struct imx111 *sensor = sd_to_imx111(sd);
drivers/media/i2c/imx208.c
1014
v4l2_async_unregister_subdev(&imx208->sd);
drivers/media/i2c/imx208.c
1017
media_entity_cleanup(&imx208->sd.entity);
drivers/media/i2c/imx208.c
1030
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx208.c
1031
struct imx208 *imx208 = to_imx208(sd);
drivers/media/i2c/imx208.c
1034
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/imx208.c
1035
media_entity_cleanup(&sd->entity);
drivers/media/i2c/imx208.c
276
struct v4l2_subdev sd;
drivers/media/i2c/imx208.c
308
return container_of(_sd, struct imx208, sd);
drivers/media/i2c/imx208.c
329
struct i2c_client *client = v4l2_get_subdevdata(&imx208->sd);
drivers/media/i2c/imx208.c
362
struct i2c_client *client = v4l2_get_subdevdata(&imx208->sd);
drivers/media/i2c/imx208.c
399
static int imx208_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/imx208.c
505
static int imx208_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/imx208.c
509
struct imx208 *imx208 = to_imx208(sd);
drivers/media/i2c/imx208.c
519
static int imx208_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/imx208.c
523
struct imx208 *imx208 = to_imx208(sd);
drivers/media/i2c/imx208.c
562
static int imx208_get_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx208.c
566
struct imx208 *imx208 = to_imx208(sd);
drivers/media/i2c/imx208.c
576
static int imx208_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx208.c
580
struct imx208 *imx208 = to_imx208(sd);
drivers/media/i2c/imx208.c
679
ret = __v4l2_ctrl_handler_setup(imx208->sd.ctrl_handler);
drivers/media/i2c/imx208.c
706
static int imx208_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/imx208.c
708
struct imx208 *imx208 = to_imx208(sd);
drivers/media/i2c/imx208.c
770
struct i2c_client *client = v4l2_get_subdevdata(&imx208->sd);
drivers/media/i2c/imx208.c
820
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx208.c
821
struct imx208 *imx208 = to_imx208(sd);
drivers/media/i2c/imx208.c
920
imx208->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/imx208.c
933
v4l2_ctrl_handler_free(imx208->sd.ctrl_handler);
drivers/media/i2c/imx208.c
961
v4l2_i2c_subdev_init(&imx208->sd, client, &imx208_subdev_ops);
drivers/media/i2c/imx208.c
983
imx208->sd.internal_ops = &imx208_internal_ops;
drivers/media/i2c/imx208.c
984
imx208->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/imx208.c
985
imx208->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/imx208.c
989
ret = media_entity_pads_init(&imx208->sd.entity, 1, &imx208->pad);
drivers/media/i2c/imx208.c
995
ret = v4l2_async_register_subdev_sensor(&imx208->sd);
drivers/media/i2c/imx214.c
1113
imx214->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/imx214.c
1155
state = v4l2_subdev_get_locked_active_state(&imx214->sd);
drivers/media/i2c/imx214.c
1313
struct i2c_client *client = v4l2_get_subdevdata(&imx214->sd);
drivers/media/i2c/imx214.c
1422
v4l2_i2c_subdev_init(&imx214->sd, client, &imx214_subdev_ops);
drivers/media/i2c/imx214.c
1423
imx214->sd.internal_ops = &imx214_internal_ops;
drivers/media/i2c/imx214.c
1441
imx214->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/imx214.c
1443
imx214->sd.dev = &client->dev;
drivers/media/i2c/imx214.c
1444
imx214->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/imx214.c
1446
ret = media_entity_pads_init(&imx214->sd.entity, 1, &imx214->pad);
drivers/media/i2c/imx214.c
1452
imx214->sd.state_lock = imx214->ctrls.lock;
drivers/media/i2c/imx214.c
1453
ret = v4l2_subdev_init_finalize(&imx214->sd);
drivers/media/i2c/imx214.c
1462
ret = v4l2_async_register_subdev_sensor(&imx214->sd);
drivers/media/i2c/imx214.c
1476
v4l2_subdev_cleanup(&imx214->sd);
drivers/media/i2c/imx214.c
1479
media_entity_cleanup(&imx214->sd.entity);
drivers/media/i2c/imx214.c
1495
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx214.c
1496
struct imx214 *imx214 = to_imx214(sd);
drivers/media/i2c/imx214.c
1498
v4l2_async_unregister_subdev(&imx214->sd);
drivers/media/i2c/imx214.c
1499
v4l2_subdev_cleanup(sd);
drivers/media/i2c/imx214.c
1500
media_entity_cleanup(&imx214->sd.entity);
drivers/media/i2c/imx214.c
257
struct v4l2_subdev sd;
drivers/media/i2c/imx214.c
524
static inline struct imx214 *to_imx214(struct v4l2_subdev *sd)
drivers/media/i2c/imx214.c
526
return container_of(sd, struct imx214, sd);
drivers/media/i2c/imx214.c
532
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx214.c
533
struct imx214 *imx214 = to_imx214(sd);
drivers/media/i2c/imx214.c
560
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx214.c
561
struct imx214 *imx214 = to_imx214(sd);
drivers/media/i2c/imx214.c
599
static int imx214_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/imx214.c
603
struct imx214 *imx214 = to_imx214(sd);
drivers/media/i2c/imx214.c
637
struct imx214 *imx214 = container_of(subdev, struct imx214, sd);
drivers/media/i2c/imx214.c
645
struct imx214 *imx214 = container_of(subdev, struct imx214, sd);
drivers/media/i2c/imx214.c
664
static int imx214_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx214.c
668
struct imx214 *imx214 = to_imx214(sd);
drivers/media/i2c/imx214.c
719
static int imx214_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/imx214.c
809
state = v4l2_subdev_get_locked_active_state(&imx214->sd);
drivers/media/i2c/imx219.c
1026
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx219.c
1027
struct imx219 *imx219 = to_imx219(sd);
drivers/media/i2c/imx219.c
1063
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx219.c
1064
struct imx219 *imx219 = to_imx219(sd);
drivers/media/i2c/imx219.c
1079
struct i2c_client *client = v4l2_get_subdevdata(&imx219->sd);
drivers/media/i2c/imx219.c
1093
struct i2c_client *client = v4l2_get_subdevdata(&imx219->sd);
drivers/media/i2c/imx219.c
1190
v4l2_i2c_subdev_init(&imx219->sd, client, &imx219_subdev_ops);
drivers/media/i2c/imx219.c
1191
imx219->sd.internal_ops = &imx219_internal_ops;
drivers/media/i2c/imx219.c
1259
imx219->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/imx219.c
1260
imx219->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/imx219.c
1265
ret = media_entity_pads_init(&imx219->sd.entity, 1, &imx219->pad);
drivers/media/i2c/imx219.c
1271
imx219->sd.state_lock = imx219->ctrl_handler.lock;
drivers/media/i2c/imx219.c
1272
ret = v4l2_subdev_init_finalize(&imx219->sd);
drivers/media/i2c/imx219.c
1281
ret = v4l2_async_register_subdev_sensor(&imx219->sd);
drivers/media/i2c/imx219.c
1295
v4l2_subdev_cleanup(&imx219->sd);
drivers/media/i2c/imx219.c
1300
media_entity_cleanup(&imx219->sd.entity);
drivers/media/i2c/imx219.c
1313
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx219.c
1314
struct imx219 *imx219 = to_imx219(sd);
drivers/media/i2c/imx219.c
1316
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/imx219.c
1317
v4l2_subdev_cleanup(sd);
drivers/media/i2c/imx219.c
1318
media_entity_cleanup(&sd->entity);
drivers/media/i2c/imx219.c
339
struct v4l2_subdev sd;
drivers/media/i2c/imx219.c
365
return container_of(_sd, struct imx219, sd);
drivers/media/i2c/imx219.c
440
struct i2c_client *client = v4l2_get_subdevdata(&imx219->sd);
drivers/media/i2c/imx219.c
446
state = v4l2_subdev_get_locked_active_state(&imx219->sd);
drivers/media/i2c/imx219.c
545
struct i2c_client *client = v4l2_get_subdevdata(&imx219->sd);
drivers/media/i2c/imx219.c
645
imx219->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/imx219.c
657
v4l2_ctrl_handler_free(imx219->sd.ctrl_handler);
drivers/media/i2c/imx219.c
716
static int imx219_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/imx219.c
720
struct imx219 *imx219 = to_imx219(sd);
drivers/media/i2c/imx219.c
721
struct i2c_client *client = v4l2_get_subdevdata(&imx219->sd);
drivers/media/i2c/imx219.c
752
ret = __v4l2_ctrl_handler_setup(imx219->sd.ctrl_handler);
drivers/media/i2c/imx219.c
773
static int imx219_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/imx219.c
777
struct imx219 *imx219 = to_imx219(sd);
drivers/media/i2c/imx219.c
778
struct i2c_client *client = v4l2_get_subdevdata(&imx219->sd);
drivers/media/i2c/imx219.c
795
static int imx219_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/imx219.c
799
struct imx219 *imx219 = to_imx219(sd);
drivers/media/i2c/imx219.c
809
static int imx219_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/imx219.c
813
struct imx219 *imx219 = to_imx219(sd);
drivers/media/i2c/imx219.c
831
static int imx219_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx219.c
835
struct imx219 *imx219 = to_imx219(sd);
drivers/media/i2c/imx219.c
951
static int imx219_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/imx219.c
981
static int imx219_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/imx219.c
994
return imx219_set_pad_format(sd, state, &fmt);
drivers/media/i2c/imx258.c
1074
ret = __v4l2_ctrl_handler_setup(imx258->sd.ctrl_handler);
drivers/media/i2c/imx258.c
1103
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx258.c
1104
struct imx258 *imx258 = to_imx258(sd);
drivers/media/i2c/imx258.c
1126
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx258.c
1127
struct imx258 *imx258 = to_imx258(sd);
drivers/media/i2c/imx258.c
1135
static int imx258_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/imx258.c
1137
struct imx258 *imx258 = to_imx258(sd);
drivers/media/i2c/imx258.c
1322
imx258->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/imx258.c
1335
v4l2_ctrl_handler_free(imx258->sd.ctrl_handler);
drivers/media/i2c/imx258.c
1447
v4l2_i2c_subdev_init(&imx258->sd, client, &imx258_subdev_ops);
drivers/media/i2c/imx258.c
1467
imx258->sd.internal_ops = &imx258_internal_ops;
drivers/media/i2c/imx258.c
1468
imx258->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/imx258.c
1469
imx258->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/imx258.c
1474
ret = media_entity_pads_init(&imx258->sd.entity, 1, &imx258->pad);
drivers/media/i2c/imx258.c
1478
ret = v4l2_async_register_subdev_sensor(&imx258->sd);
drivers/media/i2c/imx258.c
1490
media_entity_cleanup(&imx258->sd.entity);
drivers/media/i2c/imx258.c
1506
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx258.c
1507
struct imx258 *imx258 = to_imx258(sd);
drivers/media/i2c/imx258.c
1509
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/imx258.c
1510
media_entity_cleanup(&sd->entity);
drivers/media/i2c/imx258.c
651
struct v4l2_subdev sd;
drivers/media/i2c/imx258.c
688
return container_of(_sd, struct imx258, sd);
drivers/media/i2c/imx258.c
705
static int imx258_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/imx258.c
707
struct imx258 *imx258 = to_imx258(sd);
drivers/media/i2c/imx258.c
832
static int imx258_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/imx258.c
836
struct imx258 *imx258 = to_imx258(sd);
drivers/media/i2c/imx258.c
847
static int imx258_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/imx258.c
851
struct imx258 *imx258 = to_imx258(sd);
drivers/media/i2c/imx258.c
889
static int imx258_get_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx258.c
893
struct imx258 *imx258 = to_imx258(sd);
drivers/media/i2c/imx258.c
903
static int imx258_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx258.c
907
struct imx258 *imx258 = to_imx258(sd);
drivers/media/i2c/imx258.c
978
static int imx258_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/imx258.c
984
struct imx258 *imx258 = to_imx258(sd);
drivers/media/i2c/imx274.c
1072
static int imx274_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/imx274.c
1076
struct stimx274 *imx274 = to_imx274(sd);
drivers/media/i2c/imx274.c
1094
static int imx274_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/imx274.c
1099
struct stimx274 *imx274 = to_imx274(sd);
drivers/media/i2c/imx274.c
1127
static int imx274_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/imx274.c
1131
struct stimx274 *imx274 = to_imx274(sd);
drivers/media/i2c/imx274.c
1243
static int imx274_set_selection(struct v4l2_subdev *sd,
drivers/media/i2c/imx274.c
1247
struct stimx274 *imx274 = to_imx274(sd);
drivers/media/i2c/imx274.c
1332
static int imx274_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/imx274.c
1336
struct stimx274 *imx274 = to_imx274(sd);
drivers/media/i2c/imx274.c
1353
static int imx274_set_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/imx274.c
1357
struct stimx274 *imx274 = to_imx274(sd);
drivers/media/i2c/imx274.c
1436
static int imx274_s_stream(struct v4l2_subdev *sd, int on)
drivers/media/i2c/imx274.c
1438
struct stimx274 *imx274 = to_imx274(sd);
drivers/media/i2c/imx274.c
1911
static int imx274_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/imx274.c
1996
struct v4l2_subdev *sd;
drivers/media/i2c/imx274.c
2044
sd = &imx274->sd;
drivers/media/i2c/imx274.c
2045
v4l2_i2c_subdev_init(sd, client, &imx274_subdev_ops);
drivers/media/i2c/imx274.c
2046
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/i2c/imx274.c
2050
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/imx274.c
2051
ret = media_entity_pads_init(&sd->entity, 1, &imx274->pad);
drivers/media/i2c/imx274.c
2108
imx274->sd.ctrl_handler = &imx274->ctrls.handler;
drivers/media/i2c/imx274.c
2118
ret = v4l2_async_register_subdev(sd);
drivers/media/i2c/imx274.c
2137
media_entity_cleanup(&sd->entity);
drivers/media/i2c/imx274.c
2145
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx274.c
2146
struct stimx274 *imx274 = to_imx274(sd);
drivers/media/i2c/imx274.c
2153
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/imx274.c
2156
media_entity_cleanup(&sd->entity);
drivers/media/i2c/imx274.c
568
struct v4l2_subdev sd;
drivers/media/i2c/imx274.c
611
struct stimx274, ctrls.handler)->sd;
drivers/media/i2c/imx274.c
614
static inline struct stimx274 *to_imx274(struct v4l2_subdev *sd)
drivers/media/i2c/imx274.c
616
return container_of(sd, struct stimx274, sd);
drivers/media/i2c/imx274.c
843
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx274.c
844
struct stimx274 *imx274 = to_imx274(sd);
drivers/media/i2c/imx274.c
877
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx274.c
878
struct stimx274 *imx274 = to_imx274(sd);
drivers/media/i2c/imx274.c
910
struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
drivers/media/i2c/imx274.c
911
struct stimx274 *imx274 = to_imx274(sd);
drivers/media/i2c/imx283.c
1118
ret = __v4l2_ctrl_handler_setup(imx283->sd.ctrl_handler);
drivers/media/i2c/imx283.c
1123
static int imx283_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/imx283.c
1127
struct imx283 *imx283 = to_imx283(sd);
drivers/media/i2c/imx283.c
1151
static int imx283_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/imx283.c
1155
struct imx283 *imx283 = to_imx283(sd);
drivers/media/i2c/imx283.c
1173
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx283.c
1174
struct imx283 *imx283 = to_imx283(sd);
drivers/media/i2c/imx283.c
1204
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx283.c
1205
struct imx283 *imx283 = to_imx283(sd);
drivers/media/i2c/imx283.c
1248
static int imx283_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/imx283.c
1383
imx283->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/imx283.c
1453
v4l2_i2c_subdev_init(&imx283->sd, client, &imx283_subdev_ops);
drivers/media/i2c/imx283.c
1528
imx283->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/imx283.c
1529
imx283->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/imx283.c
1530
imx283->sd.internal_ops = &imx283_internal_ops;
drivers/media/i2c/imx283.c
1535
ret = media_entity_pads_init(&imx283->sd.entity, 1, &imx283->pad);
drivers/media/i2c/imx283.c
1541
imx283->sd.state_lock = imx283->ctrl_handler.lock;
drivers/media/i2c/imx283.c
1542
ret = v4l2_subdev_init_finalize(&imx283->sd);
drivers/media/i2c/imx283.c
1548
ret = v4l2_async_register_subdev_sensor(&imx283->sd);
drivers/media/i2c/imx283.c
1563
v4l2_subdev_cleanup(&imx283->sd);
drivers/media/i2c/imx283.c
1566
media_entity_cleanup(&imx283->sd.entity);
drivers/media/i2c/imx283.c
1569
v4l2_ctrl_handler_free(imx283->sd.ctrl_handler);
drivers/media/i2c/imx283.c
1582
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx283.c
1583
struct imx283 *imx283 = to_imx283(sd);
drivers/media/i2c/imx283.c
1585
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/imx283.c
1586
v4l2_subdev_cleanup(&imx283->sd);
drivers/media/i2c/imx283.c
1587
media_entity_cleanup(&sd->entity);
drivers/media/i2c/imx283.c
1588
v4l2_ctrl_handler_free(imx283->sd.ctrl_handler);
drivers/media/i2c/imx283.c
553
struct v4l2_subdev sd;
drivers/media/i2c/imx283.c
574
static inline struct imx283 *to_imx283(struct v4l2_subdev *sd)
drivers/media/i2c/imx283.c
576
return container_of_const(sd, struct imx283, sd);
drivers/media/i2c/imx283.c
761
state = v4l2_subdev_get_locked_active_state(&imx283->sd);
drivers/media/i2c/imx283.c
860
static int imx283_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/imx283.c
872
static int imx283_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/imx283.c
905
static int imx283_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/imx283.c
908
struct imx283 *imx283 = to_imx283(sd);
drivers/media/i2c/imx283.c
955
static int imx283_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx283.c
961
struct imx283 *imx283 = to_imx283(sd);
drivers/media/i2c/imx290.c
1054
ret = __v4l2_ctrl_handler_setup(imx290->sd.ctrl_handler);
drivers/media/i2c/imx290.c
1080
static int imx290_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/imx290.c
1082
struct imx290 *imx290 = to_imx290(sd);
drivers/media/i2c/imx290.c
1086
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/imx290.c
1116
static int imx290_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/imx290.c
1120
const struct imx290 *imx290 = to_imx290(sd);
drivers/media/i2c/imx290.c
1130
static int imx290_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/imx290.c
1134
const struct imx290 *imx290 = to_imx290(sd);
drivers/media/i2c/imx290.c
1151
static int imx290_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/imx290.c
1155
struct imx290 *imx290 = to_imx290(sd);
drivers/media/i2c/imx290.c
1189
static int imx290_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/imx290.c
1193
struct imx290 *imx290 = to_imx290(sd);
drivers/media/i2c/imx290.c
1294
v4l2_i2c_subdev_init(&imx290->sd, client, &imx290_subdev_ops);
drivers/media/i2c/imx290.c
1297
imx290->sd.internal_ops = &imx290_internal_ops;
drivers/media/i2c/imx290.c
1298
imx290->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/imx290.c
1299
imx290->sd.entity.ops = &imx290_subdev_entity_ops;
drivers/media/i2c/imx290.c
1300
imx290->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/imx290.c
1303
ret = media_entity_pads_init(&imx290->sd.entity, 1, &imx290->pad);
drivers/media/i2c/imx290.c
1315
imx290->sd.state_lock = imx290->ctrls.lock;
drivers/media/i2c/imx290.c
1317
ret = v4l2_subdev_init_finalize(&imx290->sd);
drivers/media/i2c/imx290.c
1323
state = v4l2_subdev_lock_and_get_active_state(&imx290->sd);
drivers/media/i2c/imx290.c
1332
media_entity_cleanup(&imx290->sd.entity);
drivers/media/i2c/imx290.c
1338
v4l2_subdev_cleanup(&imx290->sd);
drivers/media/i2c/imx290.c
1339
media_entity_cleanup(&imx290->sd.entity);
drivers/media/i2c/imx290.c
1381
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx290.c
1382
struct imx290 *imx290 = to_imx290(sd);
drivers/media/i2c/imx290.c
1389
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx290.c
1390
struct imx290 *imx290 = to_imx290(sd);
drivers/media/i2c/imx290.c
1645
v4l2_i2c_subdev_set_name(&imx290->sd, client,
drivers/media/i2c/imx290.c
1653
ret = v4l2_async_register_subdev(&imx290->sd);
drivers/media/i2c/imx290.c
1672
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx290.c
1673
struct imx290 *imx290 = to_imx290(sd);
drivers/media/i2c/imx290.c
1675
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/imx290.c
237
struct v4l2_subdev sd;
drivers/media/i2c/imx290.c
258
return container_of(_sd, struct imx290, sd);
drivers/media/i2c/imx290.c
806
state = v4l2_subdev_get_locked_active_state(&imx290->sd);
drivers/media/i2c/imx290.c
979
imx290->sd.ctrl_handler = &imx290->ctrls;
drivers/media/i2c/imx296.c
212
static inline struct imx296 *to_imx296(struct v4l2_subdev *sd)
drivers/media/i2c/imx296.c
214
return container_of(sd, struct imx296, subdev);
drivers/media/i2c/imx296.c
596
static int imx296_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/imx296.c
598
struct imx296 *sensor = to_imx296(sd);
drivers/media/i2c/imx296.c
602
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/imx296.c
643
static int imx296_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/imx296.c
647
struct imx296 *sensor = to_imx296(sd);
drivers/media/i2c/imx296.c
658
static int imx296_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/imx296.c
677
static int imx296_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx296.c
681
struct imx296 *sensor = to_imx296(sd);
drivers/media/i2c/imx296.c
728
static int imx296_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/imx296.c
753
static int imx296_set_selection(struct v4l2_subdev *sd,
drivers/media/i2c/imx296.c
800
static int imx296_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/imx296.c
815
imx296_set_selection(sd, state, &sel);
drivers/media/i2c/imx296.c
816
imx296_set_format(sd, state, &format);
drivers/media/i2c/imx319.c
117
struct v4l2_subdev sd;
drivers/media/i2c/imx319.c
1768
return container_of(_sd, struct imx319, sd);
drivers/media/i2c/imx319.c
1793
struct i2c_client *client = v4l2_get_subdevdata(&imx319->sd);
drivers/media/i2c/imx319.c
1827
struct i2c_client *client = v4l2_get_subdevdata(&imx319->sd);
drivers/media/i2c/imx319.c
1862
static int imx319_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/imx319.c
1864
struct imx319 *imx319 = to_imx319(sd);
drivers/media/i2c/imx319.c
1951
static int imx319_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/imx319.c
1955
struct imx319 *imx319 = to_imx319(sd);
drivers/media/i2c/imx319.c
1967
static int imx319_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/imx319.c
1971
struct imx319 *imx319 = to_imx319(sd);
drivers/media/i2c/imx319.c
2017
static int imx319_get_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx319.c
2021
struct imx319 *imx319 = to_imx319(sd);
drivers/media/i2c/imx319.c
2032
imx319_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx319.c
2036
struct imx319 *imx319 = to_imx319(sd);
drivers/media/i2c/imx319.c
2144
ret = __v4l2_ctrl_handler_setup(imx319->sd.ctrl_handler);
drivers/media/i2c/imx319.c
2159
static int imx319_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/imx319.c
2161
struct imx319 *imx319 = to_imx319(sd);
drivers/media/i2c/imx319.c
2315
imx319->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/imx319.c
2396
v4l2_i2c_subdev_init(&imx319->sd, client, &imx319_subdev_ops);
drivers/media/i2c/imx319.c
2425
imx319->sd.internal_ops = &imx319_internal_ops;
drivers/media/i2c/imx319.c
2426
imx319->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
drivers/media/i2c/imx319.c
2428
imx319->sd.entity.ops = &imx319_subdev_entity_ops;
drivers/media/i2c/imx319.c
2429
imx319->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/imx319.c
2433
ret = media_entity_pads_init(&imx319->sd.entity, 1, &imx319->pad);
drivers/media/i2c/imx319.c
2444
ret = v4l2_async_register_subdev_sensor(&imx319->sd);
drivers/media/i2c/imx319.c
2456
media_entity_cleanup(&imx319->sd.entity);
drivers/media/i2c/imx319.c
2459
v4l2_ctrl_handler_free(imx319->sd.ctrl_handler);
drivers/media/i2c/imx319.c
2469
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx319.c
2470
struct imx319 *imx319 = to_imx319(sd);
drivers/media/i2c/imx319.c
2472
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/imx319.c
2473
media_entity_cleanup(&sd->entity);
drivers/media/i2c/imx319.c
2474
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/imx334.c
1078
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx334.c
1079
struct imx334 *imx334 = to_imx334(sd);
drivers/media/i2c/imx334.c
1112
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx334.c
1113
struct imx334 *imx334 = to_imx334(sd);
drivers/media/i2c/imx334.c
1204
imx334->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/imx334.c
1232
v4l2_i2c_subdev_init(&imx334->sd, client, &imx334_subdev_ops);
drivers/media/i2c/imx334.c
1233
imx334->sd.internal_ops = &imx334_internal_ops;
drivers/media/i2c/imx334.c
1265
imx334->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/imx334.c
1266
imx334->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/imx334.c
1270
ret = media_entity_pads_init(&imx334->sd.entity, 1, &imx334->pad);
drivers/media/i2c/imx334.c
1276
imx334->sd.state_lock = imx334->ctrl_handler.lock;
drivers/media/i2c/imx334.c
1277
ret = v4l2_subdev_init_finalize(&imx334->sd);
drivers/media/i2c/imx334.c
1286
ret = v4l2_async_register_subdev_sensor(&imx334->sd);
drivers/media/i2c/imx334.c
1298
v4l2_subdev_cleanup(&imx334->sd);
drivers/media/i2c/imx334.c
1303
media_entity_cleanup(&imx334->sd.entity);
drivers/media/i2c/imx334.c
1306
v4l2_ctrl_handler_free(imx334->sd.ctrl_handler);
drivers/media/i2c/imx334.c
1322
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx334.c
1324
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/imx334.c
1325
v4l2_subdev_cleanup(sd);
drivers/media/i2c/imx334.c
1326
media_entity_cleanup(&sd->entity);
drivers/media/i2c/imx334.c
1327
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/imx334.c
197
struct v4l2_subdev sd;
drivers/media/i2c/imx334.c
500
return container_of(subdev, struct imx334, sd);
drivers/media/i2c/imx334.c
689
static int imx334_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/imx334.c
709
static int imx334_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/imx334.c
713
struct imx334 *imx334 = to_imx334(sd);
drivers/media/i2c/imx334.c
760
static int imx334_get_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx334.c
764
struct imx334 *imx334 = to_imx334(sd);
drivers/media/i2c/imx334.c
787
static int imx334_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx334.c
791
struct imx334 *imx334 = to_imx334(sd);
drivers/media/i2c/imx334.c
825
static int imx334_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/imx334.c
828
struct imx334 *imx334 = to_imx334(sd);
drivers/media/i2c/imx334.c
840
return imx334_set_pad_format(sd, sd_state, &fmt);
drivers/media/i2c/imx334.c
868
static int imx334_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/imx334.c
872
struct imx334 *imx334 = to_imx334(sd);
drivers/media/i2c/imx334.c
911
ret = __v4l2_ctrl_handler_setup(imx334->sd.ctrl_handler);
drivers/media/i2c/imx334.c
941
static int imx334_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/imx334.c
945
struct imx334 *imx334 = to_imx334(sd);
drivers/media/i2c/imx335.c
1023
static int imx335_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/imx335.c
1027
struct imx335 *imx335 = to_imx335(sd);
drivers/media/i2c/imx335.c
1075
ret = __v4l2_ctrl_handler_setup(imx335->sd.ctrl_handler);
drivers/media/i2c/imx335.c
1109
static int imx335_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/imx335.c
1113
struct imx335 *imx335 = to_imx335(sd);
drivers/media/i2c/imx335.c
1269
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx335.c
1270
struct imx335 *imx335 = to_imx335(sd);
drivers/media/i2c/imx335.c
1310
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx335.c
1311
struct imx335 *imx335 = to_imx335(sd);
drivers/media/i2c/imx335.c
1428
imx335->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/imx335.c
1456
v4l2_i2c_subdev_init(&imx335->sd, client, &imx335_subdev_ops);
drivers/media/i2c/imx335.c
1457
imx335->sd.internal_ops = &imx335_internal_ops;
drivers/media/i2c/imx335.c
1490
imx335->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/imx335.c
1491
imx335->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/imx335.c
1495
ret = media_entity_pads_init(&imx335->sd.entity, 1, &imx335->pad);
drivers/media/i2c/imx335.c
1501
imx335->sd.state_lock = imx335->ctrl_handler.lock;
drivers/media/i2c/imx335.c
1502
ret = v4l2_subdev_init_finalize(&imx335->sd);
drivers/media/i2c/imx335.c
1508
ret = v4l2_async_register_subdev_sensor(&imx335->sd);
drivers/media/i2c/imx335.c
1522
v4l2_subdev_cleanup(&imx335->sd);
drivers/media/i2c/imx335.c
1524
media_entity_cleanup(&imx335->sd.entity);
drivers/media/i2c/imx335.c
1526
v4l2_ctrl_handler_free(imx335->sd.ctrl_handler);
drivers/media/i2c/imx335.c
1541
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx335.c
1543
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/imx335.c
1544
v4l2_subdev_cleanup(sd);
drivers/media/i2c/imx335.c
1545
media_entity_cleanup(&sd->entity);
drivers/media/i2c/imx335.c
1546
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/imx335.c
223
struct v4l2_subdev sd;
drivers/media/i2c/imx335.c
585
return container_of(subdev, struct imx335, sd);
drivers/media/i2c/imx335.c
811
static int imx335_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/imx335.c
831
static int imx335_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/imx335.c
835
struct imx335 *imx335 = to_imx335(sd);
drivers/media/i2c/imx335.c
882
static int imx335_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx335.c
886
struct imx335 *imx335 = to_imx335(sd);
drivers/media/i2c/imx335.c
933
static int imx335_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/imx335.c
936
struct imx335 *imx335 = to_imx335(sd);
drivers/media/i2c/imx335.c
947
return imx335_set_pad_format(sd, sd_state, &fmt);
drivers/media/i2c/imx335.c
958
static int imx335_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/imx355.c
104
struct v4l2_subdev sd;
drivers/media/i2c/imx355.c
1066
return container_of(_sd, struct imx355, sd);
drivers/media/i2c/imx355.c
1091
struct i2c_client *client = v4l2_get_subdevdata(&imx355->sd);
drivers/media/i2c/imx355.c
1125
struct i2c_client *client = v4l2_get_subdevdata(&imx355->sd);
drivers/media/i2c/imx355.c
1161
static int imx355_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/imx355.c
1163
struct imx355 *imx355 = to_imx355(sd);
drivers/media/i2c/imx355.c
1250
static int imx355_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/imx355.c
1254
struct imx355 *imx355 = to_imx355(sd);
drivers/media/i2c/imx355.c
1266
static int imx355_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/imx355.c
1270
struct imx355 *imx355 = to_imx355(sd);
drivers/media/i2c/imx355.c
1316
static int imx355_get_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx355.c
1320
struct imx355 *imx355 = to_imx355(sd);
drivers/media/i2c/imx355.c
1331
imx355_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx355.c
1335
struct imx355 *imx355 = to_imx355(sd);
drivers/media/i2c/imx355.c
1415
ret = __v4l2_ctrl_handler_setup(imx355->sd.ctrl_handler);
drivers/media/i2c/imx355.c
1430
static int imx355_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/imx355.c
1432
struct imx355 *imx355 = to_imx355(sd);
drivers/media/i2c/imx355.c
1614
imx355->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/imx355.c
1693
v4l2_i2c_subdev_init(&imx355->sd, client, &imx355_subdev_ops);
drivers/media/i2c/imx355.c
1719
imx355->sd.internal_ops = &imx355_internal_ops;
drivers/media/i2c/imx355.c
1720
imx355->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
drivers/media/i2c/imx355.c
1722
imx355->sd.entity.ops = &imx355_subdev_entity_ops;
drivers/media/i2c/imx355.c
1723
imx355->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/imx355.c
1727
ret = media_entity_pads_init(&imx355->sd.entity, 1, &imx355->pad);
drivers/media/i2c/imx355.c
1741
ret = v4l2_async_register_subdev_sensor(&imx355->sd);
drivers/media/i2c/imx355.c
1750
media_entity_cleanup(&imx355->sd.entity);
drivers/media/i2c/imx355.c
1753
v4l2_ctrl_handler_free(imx355->sd.ctrl_handler);
drivers/media/i2c/imx355.c
1763
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx355.c
1764
struct imx355 *imx355 = to_imx355(sd);
drivers/media/i2c/imx355.c
1766
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/imx355.c
1767
media_entity_cleanup(&sd->entity);
drivers/media/i2c/imx355.c
1768
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/imx412.c
1021
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx412.c
1022
struct imx412 *imx412 = to_imx412(sd);
drivers/media/i2c/imx412.c
1060
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/imx412.c
1061
struct imx412 *imx412 = to_imx412(sd);
drivers/media/i2c/imx412.c
1153
imx412->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/imx412.c
1180
v4l2_i2c_subdev_init(&imx412->sd, client, &imx412_subdev_ops);
drivers/media/i2c/imx412.c
1181
imx412->sd.internal_ops = &imx412_internal_ops;
drivers/media/i2c/imx412.c
1215
imx412->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/imx412.c
1216
imx412->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/imx412.c
1218
v4l2_i2c_subdev_set_name(&imx412->sd, client, name, NULL);
drivers/media/i2c/imx412.c
1222
ret = media_entity_pads_init(&imx412->sd.entity, 1, &imx412->pad);
drivers/media/i2c/imx412.c
1228
ret = v4l2_async_register_subdev_sensor(&imx412->sd);
drivers/media/i2c/imx412.c
1242
media_entity_cleanup(&imx412->sd.entity);
drivers/media/i2c/imx412.c
1244
v4l2_ctrl_handler_free(imx412->sd.ctrl_handler);
drivers/media/i2c/imx412.c
1261
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/imx412.c
1262
struct imx412 *imx412 = to_imx412(sd);
drivers/media/i2c/imx412.c
1264
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/imx412.c
1265
media_entity_cleanup(&sd->entity);
drivers/media/i2c/imx412.c
1266
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/imx412.c
134
struct v4l2_subdev sd;
drivers/media/i2c/imx412.c
417
return container_of(subdev, struct imx412, sd);
drivers/media/i2c/imx412.c
431
struct i2c_client *client = v4l2_get_subdevdata(&imx412->sd);
drivers/media/i2c/imx412.c
474
struct i2c_client *client = v4l2_get_subdevdata(&imx412->sd);
drivers/media/i2c/imx412.c
645
static int imx412_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/imx412.c
665
static int imx412_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/imx412.c
712
static int imx412_get_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx412.c
716
struct imx412 *imx412 = to_imx412(sd);
drivers/media/i2c/imx412.c
742
static int imx412_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx412.c
746
struct imx412 *imx412 = to_imx412(sd);
drivers/media/i2c/imx412.c
778
static int imx412_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/imx412.c
781
struct imx412 *imx412 = to_imx412(sd);
drivers/media/i2c/imx412.c
787
return imx412_set_pad_format(sd, sd_state, &fmt);
drivers/media/i2c/imx412.c
811
ret = __v4l2_ctrl_handler_setup(imx412->sd.ctrl_handler);
drivers/media/i2c/imx412.c
850
static int imx412_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/imx412.c
852
struct imx412 *imx412 = to_imx412(sd);
drivers/media/i2c/imx415.c
1005
static int imx415_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/imx415.c
1023
static int imx415_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/imx415.c
1044
static int imx415_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/imx415.c
1063
static int imx415_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/imx415.c
1073
imx415_set_format(sd, state, &format);
drivers/media/i2c/imx415.c
663
static inline struct imx415 *to_imx415(struct v4l2_subdev *sd)
drivers/media/i2c/imx415.c
665
return container_of(sd, struct imx415, subdev);
drivers/media/i2c/imx415.c
944
static int imx415_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/imx415.c
946
struct imx415 *sensor = to_imx415(sd);
drivers/media/i2c/imx415.c
950
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/imx415.c
993
static int imx415_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/isl7998x.c
1003
struct isl7998x *isl7998x = sd_to_isl7998x(sd);
drivers/media/i2c/isl7998x.c
1029
static int isl7998x_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/isl7998x.c
1033
struct isl7998x *isl7998x = sd_to_isl7998x(sd);
drivers/media/i2c/isl7998x.c
1394
struct v4l2_subdev *sd = &isl7998x->subdev;
drivers/media/i2c/isl7998x.c
1410
dev_err(sd->dev,
drivers/media/i2c/isl7998x.c
1571
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/isl7998x.c
1572
struct isl7998x *isl7998x = sd_to_isl7998x(sd);
drivers/media/i2c/isl7998x.c
1597
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/isl7998x.c
1598
struct isl7998x *isl7998x = sd_to_isl7998x(sd);
drivers/media/i2c/isl7998x.c
540
static struct isl7998x *sd_to_isl7998x(struct v4l2_subdev *sd)
drivers/media/i2c/isl7998x.c
542
return container_of(sd, struct isl7998x, subdev);
drivers/media/i2c/isl7998x.c
745
static int isl7998x_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/isl7998x.c
748
struct isl7998x *isl7998x = sd_to_isl7998x(sd);
drivers/media/i2c/isl7998x.c
762
static int isl7998x_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/isl7998x.c
765
struct isl7998x *isl7998x = sd_to_isl7998x(sd);
drivers/media/i2c/isl7998x.c
771
static int isl7998x_g_std(struct v4l2_subdev *sd, v4l2_std_id *norm)
drivers/media/i2c/isl7998x.c
773
struct isl7998x *isl7998x = sd_to_isl7998x(sd);
drivers/media/i2c/isl7998x.c
782
static int isl7998x_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
drivers/media/i2c/isl7998x.c
784
struct isl7998x *isl7998x = sd_to_isl7998x(sd);
drivers/media/i2c/isl7998x.c
785
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/isl7998x.c
808
static int isl7998x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/isl7998x.c
810
struct isl7998x *isl7998x = sd_to_isl7998x(sd);
drivers/media/i2c/isl7998x.c
811
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/isl7998x.c
878
static int isl7998x_g_tvnorms(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/isl7998x.c
885
static int isl7998x_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/isl7998x.c
887
struct isl7998x *isl7998x = sd_to_isl7998x(sd);
drivers/media/i2c/isl7998x.c
888
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/isl7998x.c
915
static int isl7998x_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/isl7998x.c
917
struct isl7998x *isl7998x = sd_to_isl7998x(sd);
drivers/media/i2c/isl7998x.c
918
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/isl7998x.c
951
static int isl7998x_pre_streamon(struct v4l2_subdev *sd, u32 flags)
drivers/media/i2c/isl7998x.c
953
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/isl7998x.c
959
static int isl7998x_post_streamoff(struct v4l2_subdev *sd)
drivers/media/i2c/isl7998x.c
961
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/isl7998x.c
969
static int isl7998x_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/isl7998x.c
981
static int isl7998x_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/isl7998x.c
999
static int isl7998x_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ks0127.c
179
struct v4l2_subdev sd;
drivers/media/i2c/ks0127.c
184
static inline struct ks0127 *to_ks0127(struct v4l2_subdev *sd)
drivers/media/i2c/ks0127.c
186
return container_of(sd, struct ks0127, sd);
drivers/media/i2c/ks0127.c
294
static u8 ks0127_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/ks0127.c
296
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ks0127.c
315
v4l2_dbg(1, debug, sd, "read error\n");
drivers/media/i2c/ks0127.c
321
static void ks0127_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/ks0127.c
323
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ks0127.c
324
struct ks0127 *ks = to_ks0127(sd);
drivers/media/i2c/ks0127.c
328
v4l2_dbg(1, debug, sd, "write error\n");
drivers/media/i2c/ks0127.c
335
static void ks0127_and_or(struct v4l2_subdev *sd, u8 reg, u8 and_v, u8 or_v)
drivers/media/i2c/ks0127.c
337
struct ks0127 *ks = to_ks0127(sd);
drivers/media/i2c/ks0127.c
341
ks0127_write(sd, reg, val);
drivers/media/i2c/ks0127.c
349
static void ks0127_init(struct v4l2_subdev *sd)
drivers/media/i2c/ks0127.c
354
v4l2_dbg(1, debug, sd, "reset\n");
drivers/media/i2c/ks0127.c
361
ks0127_write(sd, i, table[i]);
drivers/media/i2c/ks0127.c
364
ks0127_write(sd, i, table[i]);
drivers/media/i2c/ks0127.c
367
ks0127_write(sd, i, table[i]);
drivers/media/i2c/ks0127.c
370
ks0127_write(sd, i, table[i]);
drivers/media/i2c/ks0127.c
373
if ((ks0127_read(sd, KS_STAT) & 0x80) == 0) {
drivers/media/i2c/ks0127.c
374
v4l2_dbg(1, debug, sd, "ks0122s found\n");
drivers/media/i2c/ks0127.c
378
switch (ks0127_read(sd, KS_CMDE) & 0x0f) {
drivers/media/i2c/ks0127.c
380
v4l2_dbg(1, debug, sd, "ks0127 found\n");
drivers/media/i2c/ks0127.c
384
v4l2_dbg(1, debug, sd, "ks0127B Revision A found\n");
drivers/media/i2c/ks0127.c
388
v4l2_dbg(1, debug, sd, "unknown revision\n");
drivers/media/i2c/ks0127.c
393
static int ks0127_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/ks0127.c
396
struct ks0127 *ks = to_ks0127(sd);
drivers/media/i2c/ks0127.c
405
v4l2_dbg(1, debug, sd,
drivers/media/i2c/ks0127.c
408
ks0127_and_or(sd, KS_CMDA, 0xfc, 0x00);
drivers/media/i2c/ks0127.c
410
ks0127_and_or(sd, KS_CMDA, ~0x40, 0x00);
drivers/media/i2c/ks0127.c
412
ks0127_and_or(sd, KS_CMDB, 0xb0, input);
drivers/media/i2c/ks0127.c
414
ks0127_and_or(sd, KS_CMDC, 0x70, 0x0a);
drivers/media/i2c/ks0127.c
416
ks0127_and_or(sd, KS_CMDD, 0x03, 0x00);
drivers/media/i2c/ks0127.c
418
ks0127_and_or(sd, KS_CTRACK, 0xcf, 0x00);
drivers/media/i2c/ks0127.c
420
ks0127_and_or(sd, KS_LUMA, 0x00,
drivers/media/i2c/ks0127.c
423
ks0127_and_or(sd, KS_VERTIA, 0x08, 0x81);
drivers/media/i2c/ks0127.c
425
ks0127_and_or(sd, KS_VERTIC, 0x0f, 0x90);
drivers/media/i2c/ks0127.c
428
ks0127_and_or(sd, KS_CHROMB, 0x0f, 0x90);
drivers/media/i2c/ks0127.c
430
ks0127_write(sd, KS_UGAIN, reg_defaults[KS_UGAIN]);
drivers/media/i2c/ks0127.c
431
ks0127_write(sd, KS_VGAIN, reg_defaults[KS_VGAIN]);
drivers/media/i2c/ks0127.c
432
ks0127_write(sd, KS_UVOFFH, reg_defaults[KS_UVOFFH]);
drivers/media/i2c/ks0127.c
433
ks0127_write(sd, KS_UVOFFL, reg_defaults[KS_UVOFFL]);
drivers/media/i2c/ks0127.c
439
v4l2_dbg(1, debug, sd,
drivers/media/i2c/ks0127.c
442
ks0127_and_or(sd, KS_CMDA, 0xfc, 0x00);
drivers/media/i2c/ks0127.c
444
ks0127_and_or(sd, KS_CMDA, ~0x40, 0x00);
drivers/media/i2c/ks0127.c
446
ks0127_and_or(sd, KS_CMDB, 0xb0, input);
drivers/media/i2c/ks0127.c
448
ks0127_and_or(sd, KS_CMDC, 0x70, 0x0a);
drivers/media/i2c/ks0127.c
450
ks0127_and_or(sd, KS_CMDD, 0x03, 0x00);
drivers/media/i2c/ks0127.c
452
ks0127_and_or(sd, KS_CTRACK, 0xcf, 0x00);
drivers/media/i2c/ks0127.c
453
ks0127_and_or(sd, KS_LUMA, 0x00,
drivers/media/i2c/ks0127.c
456
ks0127_and_or(sd, KS_VERTIA, 0x08,
drivers/media/i2c/ks0127.c
458
ks0127_and_or(sd, KS_VERTIC, 0x0f,
drivers/media/i2c/ks0127.c
461
ks0127_and_or(sd, KS_CHROMB, 0x0f,
drivers/media/i2c/ks0127.c
464
ks0127_write(sd, KS_UGAIN, reg_defaults[KS_UGAIN]);
drivers/media/i2c/ks0127.c
465
ks0127_write(sd, KS_VGAIN, reg_defaults[KS_VGAIN]);
drivers/media/i2c/ks0127.c
466
ks0127_write(sd, KS_UVOFFH, reg_defaults[KS_UVOFFH]);
drivers/media/i2c/ks0127.c
467
ks0127_write(sd, KS_UVOFFL, reg_defaults[KS_UVOFFL]);
drivers/media/i2c/ks0127.c
471
v4l2_dbg(1, debug, sd, "s_routing 15: YUV656\n");
drivers/media/i2c/ks0127.c
474
ks0127_and_or(sd, KS_CMDA, 0xfc, 0x03);
drivers/media/i2c/ks0127.c
477
ks0127_and_or(sd, KS_CMDA, 0xfc, 0x02);
drivers/media/i2c/ks0127.c
479
ks0127_and_or(sd, KS_CMDA, 0xff, 0x40); /* VSE=1 */
drivers/media/i2c/ks0127.c
481
ks0127_and_or(sd, KS_CMDB, 0xb0, (input | 0x40));
drivers/media/i2c/ks0127.c
484
ks0127_and_or(sd, KS_CMDC, 0x70, 0x87);
drivers/media/i2c/ks0127.c
486
ks0127_and_or(sd, KS_CMDD, 0x03, 0x08);
drivers/media/i2c/ks0127.c
488
ks0127_and_or(sd, KS_CTRACK, 0xcf, 0x30);
drivers/media/i2c/ks0127.c
490
ks0127_and_or(sd, KS_LUMA, 0x00, 0x71);
drivers/media/i2c/ks0127.c
491
ks0127_and_or(sd, KS_VERTIC, 0x0f,
drivers/media/i2c/ks0127.c
495
ks0127_and_or(sd, KS_VERTIA, 0x08, 0x81);
drivers/media/i2c/ks0127.c
497
ks0127_and_or(sd, KS_CHROMB, 0x0f,
drivers/media/i2c/ks0127.c
500
ks0127_and_or(sd, KS_CON, 0x00, 0x00);
drivers/media/i2c/ks0127.c
501
ks0127_and_or(sd, KS_BRT, 0x00, 32); /* spec: 34 */
drivers/media/i2c/ks0127.c
503
ks0127_and_or(sd, KS_SAT, 0x00, 0xe8);
drivers/media/i2c/ks0127.c
504
ks0127_and_or(sd, KS_HUE, 0x00, 0);
drivers/media/i2c/ks0127.c
506
ks0127_and_or(sd, KS_UGAIN, 0x00, 238);
drivers/media/i2c/ks0127.c
507
ks0127_and_or(sd, KS_VGAIN, 0x00, 0x00);
drivers/media/i2c/ks0127.c
510
ks0127_and_or(sd, KS_UVOFFH, 0x00, 0x4f);
drivers/media/i2c/ks0127.c
511
ks0127_and_or(sd, KS_UVOFFL, 0x00, 0x00);
drivers/media/i2c/ks0127.c
515
v4l2_dbg(1, debug, sd,
drivers/media/i2c/ks0127.c
522
ks0127_write(sd, KS_DEMOD, reg_defaults[KS_DEMOD]);
drivers/media/i2c/ks0127.c
526
static int ks0127_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/ks0127.c
528
struct ks0127 *ks = to_ks0127(sd);
drivers/media/i2c/ks0127.c
531
ks0127_and_or(sd, KS_DEMOD, 0xf0, 0x00);
drivers/media/i2c/ks0127.c
535
v4l2_dbg(1, debug, sd,
drivers/media/i2c/ks0127.c
537
ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x20);
drivers/media/i2c/ks0127.c
539
v4l2_dbg(1, debug, sd,
drivers/media/i2c/ks0127.c
541
ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x40);
drivers/media/i2c/ks0127.c
543
v4l2_dbg(1, debug, sd,
drivers/media/i2c/ks0127.c
545
ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x20);
drivers/media/i2c/ks0127.c
547
v4l2_dbg(1, debug, sd,
drivers/media/i2c/ks0127.c
549
ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x40);
drivers/media/i2c/ks0127.c
551
v4l2_dbg(1, debug, sd,
drivers/media/i2c/ks0127.c
555
ks0127_and_or(sd, KS_CHROMA, 0xdf, 0x20);
drivers/media/i2c/ks0127.c
556
ks0127_and_or(sd, KS_DEMOD, 0xf0, 0x00);
drivers/media/i2c/ks0127.c
560
if (!(ks0127_read(sd, KS_DEMOD) & 0x40))
drivers/media/i2c/ks0127.c
562
ks0127_and_or(sd, KS_DEMOD, 0xf0, 0x0f);
drivers/media/i2c/ks0127.c
564
v4l2_dbg(1, debug, sd, "s_std: Unknown norm %llx\n",
drivers/media/i2c/ks0127.c
570
static int ks0127_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ks0127.c
572
v4l2_dbg(1, debug, sd, "s_stream(%d)\n", enable);
drivers/media/i2c/ks0127.c
575
ks0127_and_or(sd, KS_OFMTA, 0xcf, 0x30);
drivers/media/i2c/ks0127.c
577
ks0127_and_or(sd, KS_CDEM, 0x7f, 0x00);
drivers/media/i2c/ks0127.c
580
ks0127_and_or(sd, KS_OFMTA, 0xcf, 0x00);
drivers/media/i2c/ks0127.c
582
ks0127_and_or(sd, KS_CDEM, 0x7f, 0x80);
drivers/media/i2c/ks0127.c
587
static int ks0127_status(struct v4l2_subdev *sd, u32 *pstatus, v4l2_std_id *pstd)
drivers/media/i2c/ks0127.c
593
status = ks0127_read(sd, KS_STAT);
drivers/media/i2c/ks0127.c
616
static int ks0127_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/ks0127.c
618
v4l2_dbg(1, debug, sd, "querystd\n");
drivers/media/i2c/ks0127.c
619
return ks0127_status(sd, NULL, std);
drivers/media/i2c/ks0127.c
622
static int ks0127_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/ks0127.c
624
v4l2_dbg(1, debug, sd, "g_input_status\n");
drivers/media/i2c/ks0127.c
625
return ks0127_status(sd, status, NULL);
drivers/media/i2c/ks0127.c
648
struct v4l2_subdev *sd;
drivers/media/i2c/ks0127.c
657
sd = &ks->sd;
drivers/media/i2c/ks0127.c
658
v4l2_i2c_subdev_init(sd, client, &ks0127_ops);
drivers/media/i2c/ks0127.c
662
ks0127_write(sd, KS_CMDA, 0x2c);
drivers/media/i2c/ks0127.c
666
ks0127_init(sd);
drivers/media/i2c/ks0127.c
672
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ks0127.c
674
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/ks0127.c
675
ks0127_write(sd, KS_OFMTA, 0x20); /* tristate */
drivers/media/i2c/ks0127.c
676
ks0127_write(sd, KS_CMDA, 0x2c | 0x80); /* power down */
drivers/media/i2c/lt6911uxe.c
108
static inline struct lt6911uxe *to_lt6911uxe(struct v4l2_subdev *sd)
drivers/media/i2c/lt6911uxe.c
110
return container_of(sd, struct lt6911uxe, sd);
drivers/media/i2c/lt6911uxe.c
125
static int lt6911uxe_get_detected_timings(struct v4l2_subdev *sd,
drivers/media/i2c/lt6911uxe.c
128
struct lt6911uxe *lt6911uxe = to_lt6911uxe(sd);
drivers/media/i2c/lt6911uxe.c
144
static int lt6911uxe_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/lt6911uxe.c
147
struct lt6911uxe *lt6911uxe = to_lt6911uxe(sd);
drivers/media/i2c/lt6911uxe.c
150
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/lt6911uxe.c
167
static int lt6911uxe_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/lt6911uxe.c
170
struct lt6911uxe *lt6911uxe = to_lt6911uxe(sd);
drivers/media/i2c/lt6911uxe.c
173
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/lt6911uxe.c
181
static int lt6911uxe_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/lt6911uxe.c
187
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/lt6911uxe.c
188
ret = lt6911uxe_get_detected_timings(sd, timings);
drivers/media/i2c/lt6911uxe.c
204
static int lt6911uxe_enum_dv_timings(struct v4l2_subdev *sd,
drivers/media/i2c/lt6911uxe.c
211
static int lt6911uxe_dv_timings_cap(struct v4l2_subdev *sd,
drivers/media/i2c/lt6911uxe.c
220
struct i2c_client *client = v4l2_get_subdevdata(&lt6911uxe->sd);
drivers/media/i2c/lt6911uxe.c
302
v4l2_subdev_notify_event(&lt6911uxe->sd, &lt6911uxe_ev_source_change);
drivers/media/i2c/lt6911uxe.c
327
lt6911uxe->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/lt6911uxe.c
345
static int lt6911uxe_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/lt6911uxe.c
349
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/lt6911uxe.c
350
struct lt6911uxe *lt6911uxe = to_lt6911uxe(sd);
drivers/media/i2c/lt6911uxe.c
370
static int lt6911uxe_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/lt6911uxe.c
374
struct lt6911uxe *lt6911uxe = to_lt6911uxe(sd);
drivers/media/i2c/lt6911uxe.c
375
struct i2c_client *client = v4l2_get_subdevdata(&lt6911uxe->sd);
drivers/media/i2c/lt6911uxe.c
386
static int lt6911uxe_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/lt6911uxe.c
390
struct lt6911uxe *lt6911uxe = to_lt6911uxe(sd);
drivers/media/i2c/lt6911uxe.c
405
static int lt6911uxe_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/lt6911uxe.c
409
struct lt6911uxe *lt6911uxe = to_lt6911uxe(sd);
drivers/media/i2c/lt6911uxe.c
419
static int lt6911uxe_get_mbus_config(struct v4l2_subdev *sd,
drivers/media/i2c/lt6911uxe.c
423
struct lt6911uxe *lt6911uxe = to_lt6911uxe(sd);
drivers/media/i2c/lt6911uxe.c
426
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/lt6911uxe.c
434
static int lt6911uxe_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/lt6911uxe.c
442
return lt6911uxe_set_format(sd, sd_state, &fmt);
drivers/media/i2c/lt6911uxe.c
552
struct v4l2_subdev *sd = dev_id;
drivers/media/i2c/lt6911uxe.c
553
struct lt6911uxe *lt6911uxe = to_lt6911uxe(sd);
drivers/media/i2c/lt6911uxe.c
560
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/lt6911uxe.c
565
lt6911uxe_set_format(sd, state, &fmt);
drivers/media/i2c/lt6911uxe.c
573
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/lt6911uxe.c
574
struct lt6911uxe *lt6911uxe = to_lt6911uxe(sd);
drivers/media/i2c/lt6911uxe.c
577
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/lt6911uxe.c
578
v4l2_subdev_cleanup(sd);
drivers/media/i2c/lt6911uxe.c
579
media_entity_cleanup(&sd->entity);
drivers/media/i2c/lt6911uxe.c
601
v4l2_i2c_subdev_init(&lt6911uxe->sd, client, &lt6911uxe_subdev_ops);
drivers/media/i2c/lt6911uxe.c
627
lt6911uxe->sd.dev = dev;
drivers/media/i2c/lt6911uxe.c
628
lt6911uxe->sd.internal_ops = &lt6911uxe_internal_ops;
drivers/media/i2c/lt6911uxe.c
629
lt6911uxe->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/lt6911uxe.c
630
lt6911uxe->sd.entity.ops = &lt6911uxe_subdev_entity_ops;
drivers/media/i2c/lt6911uxe.c
631
lt6911uxe->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/i2c/lt6911uxe.c
633
ret = media_entity_pads_init(&lt6911uxe->sd.entity, 1, &lt6911uxe->pad);
drivers/media/i2c/lt6911uxe.c
647
ret = v4l2_subdev_init_finalize(&lt6911uxe->sd);
drivers/media/i2c/lt6911uxe.c
663
ret = v4l2_async_register_subdev_sensor(&lt6911uxe->sd);
drivers/media/i2c/lt6911uxe.c
675
v4l2_subdev_cleanup(&lt6911uxe->sd);
drivers/media/i2c/lt6911uxe.c
680
media_entity_cleanup(&lt6911uxe->sd.entity);
drivers/media/i2c/lt6911uxe.c
683
v4l2_ctrl_handler_free(lt6911uxe->sd.ctrl_handler);
drivers/media/i2c/lt6911uxe.c
92
struct v4l2_subdev sd;
drivers/media/i2c/m52790.c
135
struct v4l2_subdev *sd;
drivers/media/i2c/m52790.c
148
sd = &state->sd;
drivers/media/i2c/m52790.c
149
v4l2_i2c_subdev_init(sd, client, &m52790_ops);
drivers/media/i2c/m52790.c
152
m52790_write(sd);
drivers/media/i2c/m52790.c
158
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/m52790.c
160
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/m52790.c
26
struct v4l2_subdev sd;
drivers/media/i2c/m52790.c
31
static inline struct m52790_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/m52790.c
33
return container_of(sd, struct m52790_state, sd);
drivers/media/i2c/m52790.c
38
static int m52790_write(struct v4l2_subdev *sd)
drivers/media/i2c/m52790.c
40
struct m52790_state *state = to_state(sd);
drivers/media/i2c/m52790.c
41
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/m52790.c
57
static int m52790_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/m52790.c
60
struct m52790_state *state = to_state(sd);
drivers/media/i2c/m52790.c
64
m52790_write(sd);
drivers/media/i2c/m52790.c
69
static int m52790_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
drivers/media/i2c/m52790.c
71
struct m52790_state *state = to_state(sd);
drivers/media/i2c/m52790.c
80
static int m52790_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
drivers/media/i2c/m52790.c
82
struct m52790_state *state = to_state(sd);
drivers/media/i2c/m52790.c
88
m52790_write(sd);
drivers/media/i2c/m52790.c
93
static int m52790_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/m52790.c
95
struct m52790_state *state = to_state(sd);
drivers/media/i2c/m52790.c
97
v4l2_info(sd, "Switch 1: %02x\n",
drivers/media/i2c/m52790.c
99
v4l2_info(sd, "Switch 2: %02x\n",
drivers/media/i2c/max2175.c
1094
static int max2175_s_frequency(struct v4l2_subdev *sd,
drivers/media/i2c/max2175.c
1097
struct max2175 *ctx = max2175_from_sd(sd);
drivers/media/i2c/max2175.c
1124
static int max2175_g_frequency(struct v4l2_subdev *sd,
drivers/media/i2c/max2175.c
1127
struct max2175 *ctx = max2175_from_sd(sd);
drivers/media/i2c/max2175.c
1139
static int max2175_enum_freq_bands(struct v4l2_subdev *sd,
drivers/media/i2c/max2175.c
1142
struct max2175 *ctx = max2175_from_sd(sd);
drivers/media/i2c/max2175.c
1152
static int max2175_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
drivers/media/i2c/max2175.c
1154
struct max2175 *ctx = max2175_from_sd(sd);
drivers/media/i2c/max2175.c
1168
static int max2175_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
drivers/media/i2c/max2175.c
1280
struct v4l2_subdev *sd;
drivers/media/i2c/max2175.c
1327
sd = &ctx->sd;
drivers/media/i2c/max2175.c
1335
v4l2_i2c_subdev_init(sd, client, &max2175_ops);
drivers/media/i2c/max2175.c
1338
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/max2175.c
1375
ctx->sd.ctrl_handler = &ctx->ctrl_hdl;
drivers/media/i2c/max2175.c
1381
ret = v4l2_async_register_subdev(sd);
drivers/media/i2c/max2175.c
1399
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/max2175.c
1408
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/max2175.c
1409
struct max2175 *ctx = max2175_from_sd(sd);
drivers/media/i2c/max2175.c
1412
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/max2175.c
264
struct v4l2_subdev sd; /* Sub-device */
drivers/media/i2c/max2175.c
299
static inline struct max2175 *max2175_from_sd(struct v4l2_subdev *sd)
drivers/media/i2c/max2175.c
301
return container_of(sd, struct max2175, sd);
drivers/media/i2c/max9286.c
1036
v4l2_i2c_subdev_init(&priv->sd, priv->client, &max9286_subdev_ops);
drivers/media/i2c/max9286.c
1037
priv->sd.internal_ops = &max9286_subdev_internal_ops;
drivers/media/i2c/max9286.c
1038
priv->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/max9286.c
1046
priv->sd.ctrl_handler = &priv->ctrls;
drivers/media/i2c/max9286.c
1051
priv->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/i2c/max9286.c
1052
priv->sd.entity.ops = &max9286_media_ops;
drivers/media/i2c/max9286.c
1057
ret = media_entity_pads_init(&priv->sd.entity, MAX9286_N_PADS,
drivers/media/i2c/max9286.c
1062
priv->sd.state_lock = priv->ctrls.lock;
drivers/media/i2c/max9286.c
1063
ret = v4l2_subdev_init_finalize(&priv->sd);
drivers/media/i2c/max9286.c
1067
ret = v4l2_async_register_subdev(&priv->sd);
drivers/media/i2c/max9286.c
1076
v4l2_subdev_cleanup(&priv->sd);
drivers/media/i2c/max9286.c
1086
v4l2_subdev_cleanup(&priv->sd);
drivers/media/i2c/max9286.c
1088
v4l2_async_unregister_subdev(&priv->sd);
drivers/media/i2c/max9286.c
157
struct v4l2_subdev *sd;
drivers/media/i2c/max9286.c
176
struct v4l2_subdev sd;
drivers/media/i2c/max9286.c
230
static inline struct max9286_priv *sd_to_max9286(struct v4l2_subdev *sd)
drivers/media/i2c/max9286.c
232
return container_of(sd, struct max9286_priv, sd);
drivers/media/i2c/max9286.c
623
ctrl = v4l2_ctrl_find(source->sd->ctrl_handler,
drivers/media/i2c/max9286.c
661
struct max9286_priv *priv = sd_to_max9286(notifier->sd);
drivers/media/i2c/max9286.c
677
source->sd = subdev;
drivers/media/i2c/max9286.c
680
ret = media_create_pad_link(&source->sd->entity, src_pad,
drivers/media/i2c/max9286.c
681
&priv->sd.entity, index,
drivers/media/i2c/max9286.c
687
source->sd->name, src_pad, priv->sd.name, index);
drivers/media/i2c/max9286.c
723
struct max9286_priv *priv = sd_to_max9286(notifier->sd);
drivers/media/i2c/max9286.c
727
source->sd = NULL;
drivers/media/i2c/max9286.c
745
v4l2_async_subdev_nf_init(&priv->notifier, &priv->sd);
drivers/media/i2c/max9286.c
784
static int max9286_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/max9286.c
786
struct max9286_priv *priv = sd_to_max9286(sd);
drivers/media/i2c/max9286.c
793
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/max9286.c
816
ret = v4l2_subdev_call(source->sd, video, s_stream, 1);
drivers/media/i2c/max9286.c
863
v4l2_subdev_call(source->sd, video, s_stream, 0);
drivers/media/i2c/max9286.c
874
static int max9286_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/max9286.c
887
static int max9286_set_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/max9286.c
900
static int max9286_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/max9286.c
912
static int max9286_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/max9286.c
916
struct max9286_priv *priv = sd_to_max9286(sd);
drivers/media/i2c/max9286.c
925
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/i2c/max9286.c
979
static int max9286_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/max96714.c
110
struct v4l2_subdev sd;
drivers/media/i2c/max96714.c
119
static inline struct max96714_priv *sd_to_max96714(struct v4l2_subdev *sd)
drivers/media/i2c/max96714.c
121
return container_of(sd, struct max96714_priv, sd);
drivers/media/i2c/max96714.c
253
static int max96714_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/max96714.c
257
struct max96714_priv *priv = sd_to_max96714(sd);
drivers/media/i2c/max96714.c
269
if (!priv->rxport.source.sd) {
drivers/media/i2c/max96714.c
280
ret = v4l2_subdev_enable_streams(priv->rxport.source.sd,
drivers/media/i2c/max96714.c
298
static int max96714_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/max96714.c
302
struct max96714_priv *priv = sd_to_max96714(sd);
drivers/media/i2c/max96714.c
314
ret = v4l2_subdev_disable_streams(priv->rxport.source.sd,
drivers/media/i2c/max96714.c
329
static int max96714_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/max96714.c
333
struct max96714_priv *priv = sd_to_max96714(sd);
drivers/media/i2c/max96714.c
342
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/i2c/max96714.c
360
static int _max96714_set_routing(struct v4l2_subdev *sd,
drivers/media/i2c/max96714.c
373
ret = v4l2_subdev_routing_validate(sd, routing,
drivers/media/i2c/max96714.c
378
return v4l2_subdev_set_routing_with_fmt(sd, state, routing, &format);
drivers/media/i2c/max96714.c
381
static int max96714_set_routing(struct v4l2_subdev *sd,
drivers/media/i2c/max96714.c
386
struct max96714_priv *priv = sd_to_max96714(sd);
drivers/media/i2c/max96714.c
391
return _max96714_set_routing(sd, state, which, routing);
drivers/media/i2c/max96714.c
394
static int max96714_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/max96714.c
411
return _max96714_set_routing(sd, state, V4L2_SUBDEV_FORMAT_ACTIVE,
drivers/media/i2c/max96714.c
468
static int max96714_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/max96714.c
470
struct max96714_priv *priv = sd_to_max96714(sd);
drivers/media/i2c/max96714.c
508
struct max96714_priv *priv = sd_to_max96714(notifier->sd);
drivers/media/i2c/max96714.c
520
priv->rxport.source.sd = subdev;
drivers/media/i2c/max96714.c
523
ret = media_create_pad_link(&priv->rxport.source.sd->entity,
drivers/media/i2c/max96714.c
524
priv->rxport.source.pad, &priv->sd.entity,
drivers/media/i2c/max96714.c
530
priv->rxport.source.sd->name, priv->rxport.source.pad,
drivers/media/i2c/max96714.c
531
priv->sd.name, MAX96714_PAD_SINK);
drivers/media/i2c/max96714.c
552
v4l2_async_subdev_nf_init(&priv->notifier, &priv->sd);
drivers/media/i2c/max96714.c
580
v4l2_i2c_subdev_init(&priv->sd, priv->client, &max96714_subdev_ops);
drivers/media/i2c/max96714.c
581
priv->sd.internal_ops = &max96714_internal_ops;
drivers/media/i2c/max96714.c
584
priv->sd.ctrl_handler = &priv->ctrl_handler;
drivers/media/i2c/max96714.c
598
priv->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_STREAMS;
drivers/media/i2c/max96714.c
599
priv->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/i2c/max96714.c
600
priv->sd.entity.ops = &max96714_entity_ops;
drivers/media/i2c/max96714.c
605
ret = media_entity_pads_init(&priv->sd.entity,
drivers/media/i2c/max96714.c
611
priv->sd.state_lock = priv->sd.ctrl_handler->lock;
drivers/media/i2c/max96714.c
613
ret = v4l2_subdev_init_finalize(&priv->sd);
drivers/media/i2c/max96714.c
623
ret = v4l2_async_register_subdev(&priv->sd);
drivers/media/i2c/max96714.c
635
v4l2_subdev_cleanup(&priv->sd);
drivers/media/i2c/max96714.c
637
media_entity_cleanup(&priv->sd.entity);
drivers/media/i2c/max96714.c
648
v4l2_async_unregister_subdev(&priv->sd);
drivers/media/i2c/max96714.c
650
v4l2_subdev_cleanup(&priv->sd);
drivers/media/i2c/max96714.c
652
media_entity_cleanup(&priv->sd.entity);
drivers/media/i2c/max96714.c
92
struct v4l2_subdev *sd;
drivers/media/i2c/max96714.c
987
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/max96714.c
988
struct max96714_priv *priv = sd_to_max96714(sd);
drivers/media/i2c/max96717.c
1078
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/max96717.c
1079
struct max96717_priv *priv = sd_to_max96717(sd);
drivers/media/i2c/max96717.c
124
struct v4l2_subdev sd;
drivers/media/i2c/max96717.c
137
static inline struct max96717_priv *sd_to_max96717(struct v4l2_subdev *sd)
drivers/media/i2c/max96717.c
139
return container_of(sd, struct max96717_priv, sd);
drivers/media/i2c/max96717.c
379
static int _max96717_set_routing(struct v4l2_subdev *sd,
drivers/media/i2c/max96717.c
391
ret = v4l2_subdev_routing_validate(sd, routing,
drivers/media/i2c/max96717.c
396
ret = v4l2_subdev_set_routing_with_fmt(sd, state, routing, &format);
drivers/media/i2c/max96717.c
403
static int max96717_set_routing(struct v4l2_subdev *sd,
drivers/media/i2c/max96717.c
408
struct max96717_priv *priv = sd_to_max96717(sd);
drivers/media/i2c/max96717.c
413
return _max96717_set_routing(sd, state, routing);
drivers/media/i2c/max96717.c
416
static int max96717_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/max96717.c
420
struct max96717_priv *priv = sd_to_max96717(sd);
drivers/media/i2c/max96717.c
430
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/i2c/max96717.c
453
static int max96717_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/max96717.c
470
return _max96717_set_routing(sd, state, &routing);
drivers/media/i2c/max96717.c
482
static int max96717_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/max96717.c
484
struct max96717_priv *priv = sd_to_max96717(sd);
drivers/media/i2c/max96717.c
493
static int max96717_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/max96717.c
497
struct max96717_priv *priv = sd_to_max96717(sd);
drivers/media/i2c/max96717.c
533
static int max96717_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/max96717.c
537
struct max96717_priv *priv = sd_to_max96717(sd);
drivers/media/i2c/max96717.c
597
struct max96717_priv *priv = sd_to_max96717(notifier->sd);
drivers/media/i2c/max96717.c
614
&priv->sd.entity, 0,
drivers/media/i2c/max96717.c
620
priv->sd.name);
drivers/media/i2c/max96717.c
645
v4l2_async_subdev_nf_init(&priv->notifier, &priv->sd);
drivers/media/i2c/max96717.c
675
v4l2_i2c_subdev_init(&priv->sd, priv->client, &max96717_subdev_ops);
drivers/media/i2c/max96717.c
676
priv->sd.internal_ops = &max96717_internal_ops;
drivers/media/i2c/max96717.c
679
priv->sd.ctrl_handler = &priv->ctrl_handler;
drivers/media/i2c/max96717.c
691
priv->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_STREAMS;
drivers/media/i2c/max96717.c
692
priv->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/i2c/max96717.c
693
priv->sd.entity.ops = &max96717_entity_ops;
drivers/media/i2c/max96717.c
698
ret = media_entity_pads_init(&priv->sd.entity, 2, priv->pads);
drivers/media/i2c/max96717.c
704
ret = v4l2_subdev_init_finalize(&priv->sd);
drivers/media/i2c/max96717.c
717
ret = v4l2_async_register_subdev(&priv->sd);
drivers/media/i2c/max96717.c
729
v4l2_subdev_cleanup(&priv->sd);
drivers/media/i2c/max96717.c
731
media_entity_cleanup(&priv->sd.entity);
drivers/media/i2c/max96717.c
740
v4l2_async_unregister_subdev(&priv->sd);
drivers/media/i2c/max96717.c
743
v4l2_subdev_cleanup(&priv->sd);
drivers/media/i2c/max96717.c
744
media_entity_cleanup(&priv->sd.entity);
drivers/media/i2c/ml86v7667.c
114
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/ml86v7667.c
115
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ml86v7667.c
159
static int ml86v7667_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/ml86v7667.c
161
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ml86v7667.c
176
static int ml86v7667_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/ml86v7667.c
178
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ml86v7667.c
190
static int ml86v7667_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ml86v7667.c
202
static int ml86v7667_fill_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ml86v7667.c
206
struct ml86v7667_priv *priv = to_ml86v7667(sd);
drivers/media/i2c/ml86v7667.c
222
static int ml86v7667_get_mbus_config(struct v4l2_subdev *sd,
drivers/media/i2c/ml86v7667.c
234
static int ml86v7667_g_std(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/ml86v7667.c
236
struct ml86v7667_priv *priv = to_ml86v7667(sd);
drivers/media/i2c/ml86v7667.c
243
static int ml86v7667_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/ml86v7667.c
245
struct ml86v7667_priv *priv = to_ml86v7667(sd);
drivers/media/i2c/ml86v7667.c
246
struct i2c_client *client = v4l2_get_subdevdata(&priv->sd);
drivers/media/i2c/ml86v7667.c
262
static int ml86v7667_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/ml86v7667.c
265
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ml86v7667.c
278
static int ml86v7667_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/ml86v7667.c
281
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ml86v7667.c
320
struct i2c_client *client = v4l2_get_subdevdata(&priv->sd);
drivers/media/i2c/ml86v7667.c
374
v4l2_i2c_subdev_init(&priv->sd, client, &ml86v7667_subdev_ops);
drivers/media/i2c/ml86v7667.c
393
priv->sd.ctrl_handler = &priv->hdl;
drivers/media/i2c/ml86v7667.c
411
v4l2_device_unregister_subdev(&priv->sd);
drivers/media/i2c/ml86v7667.c
419
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ml86v7667.c
420
struct ml86v7667_priv *priv = to_ml86v7667(sd);
drivers/media/i2c/ml86v7667.c
423
v4l2_device_unregister_subdev(&priv->sd);
drivers/media/i2c/ml86v7667.c
86
struct v4l2_subdev sd;
drivers/media/i2c/ml86v7667.c
93
return container_of(subdev, struct ml86v7667_priv, sd);
drivers/media/i2c/ml86v7667.c
98
return &container_of(ctrl->handler, struct ml86v7667_priv, hdl)->sd;
drivers/media/i2c/msp3400-driver.c
329
struct i2c_client *client = v4l2_get_subdevdata(&state->sd);
drivers/media/i2c/msp3400-driver.c
399
static int msp_s_radio(struct v4l2_subdev *sd)
drivers/media/i2c/msp3400-driver.c
401
struct msp_state *state = to_state(sd);
drivers/media/i2c/msp3400-driver.c
402
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/msp3400-driver.c
426
static int msp_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *freq)
drivers/media/i2c/msp3400-driver.c
428
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/msp3400-driver.c
435
static int msp_querystd(struct v4l2_subdev *sd, v4l2_std_id *id)
drivers/media/i2c/msp3400-driver.c
437
struct msp_state *state = to_state(sd);
drivers/media/i2c/msp3400-driver.c
438
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/msp3400-driver.c
449
static int msp_s_std(struct v4l2_subdev *sd, v4l2_std_id id)
drivers/media/i2c/msp3400-driver.c
451
struct msp_state *state = to_state(sd);
drivers/media/i2c/msp3400-driver.c
452
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/msp3400-driver.c
462
static int msp_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/msp3400-driver.c
465
struct msp_state *state = to_state(sd);
drivers/media/i2c/msp3400-driver.c
466
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/msp3400-driver.c
498
static int msp_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
drivers/media/i2c/msp3400-driver.c
500
struct msp_state *state = to_state(sd);
drivers/media/i2c/msp3400-driver.c
501
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/msp3400-driver.c
516
static int msp_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
drivers/media/i2c/msp3400-driver.c
518
struct msp_state *state = to_state(sd);
drivers/media/i2c/msp3400-driver.c
519
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/msp3400-driver.c
531
static int msp_s_i2s_clock_freq(struct v4l2_subdev *sd, u32 freq)
drivers/media/i2c/msp3400-driver.c
533
struct msp_state *state = to_state(sd);
drivers/media/i2c/msp3400-driver.c
534
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/msp3400-driver.c
551
static int msp_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/msp3400-driver.c
553
struct msp_state *state = to_state(sd);
drivers/media/i2c/msp3400-driver.c
554
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/msp3400-driver.c
556
char prefix[sizeof(sd->name) + 20];
drivers/media/i2c/msp3400-driver.c
562
snprintf(prefix, sizeof(prefix), "%s: Audio: ", sd->name);
drivers/media/i2c/msp3400-driver.c
662
struct v4l2_subdev *sd;
drivers/media/i2c/msp3400-driver.c
686
sd = &state->sd;
drivers/media/i2c/msp3400-driver.c
687
v4l2_i2c_subdev_init(sd, client, &msp_ops);
drivers/media/i2c/msp3400-driver.c
695
sd->entity.function = MEDIA_ENT_F_IF_AUD_DECODER;
drivers/media/i2c/msp3400-driver.c
697
ret = media_entity_pads_init(&sd->entity, 2, state->pads);
drivers/media/i2c/msp3400-driver.c
810
sd->ctrl_handler = hdl;
drivers/media/i2c/msp3400-driver.c
859
v4l2_device_unregister_subdev(&state->sd);
drivers/media/i2c/msp3400-driver.h
119
static inline struct msp_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/msp3400-driver.h
121
return container_of(sd, struct msp_state, sd);
drivers/media/i2c/msp3400-driver.h
62
struct v4l2_subdev sd;
drivers/media/i2c/mt9m001.c
185
static int mt9m001_apply_selection(struct v4l2_subdev *sd)
drivers/media/i2c/mt9m001.c
187
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m001.c
207
static int mt9m001_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/mt9m001.c
209
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m001.c
220
ret = mt9m001_apply_selection(sd);
drivers/media/i2c/mt9m001.c
250
static int mt9m001_set_selection(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m001.c
254
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m001.c
291
static int mt9m001_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m001.c
295
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m001.c
316
static int mt9m001_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m001.c
320
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m001.c
345
static int mt9m001_s_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m001.c
349
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m001.c
362
ret = mt9m001_set_selection(sd, NULL, &sel);
drivers/media/i2c/mt9m001.c
373
static int mt9m001_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m001.c
378
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m001.c
407
return mt9m001_s_fmt(sd, fmt, mf);
drivers/media/i2c/mt9m001.c
413
static int mt9m001_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m001.c
416
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m001.c
430
static int mt9m001_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m001.c
433
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m001.c
502
struct v4l2_subdev *sd = &mt9m001->subdev;
drivers/media/i2c/mt9m001.c
503
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m001.c
628
static int mt9m001_g_skip_top_lines(struct v4l2_subdev *sd, u32 *lines)
drivers/media/i2c/mt9m001.c
630
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m001.c
653
static int mt9m001_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m001.c
656
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m001.c
673
static int mt9m001_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m001.c
677
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m001.c
687
static int mt9m001_get_mbus_config(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m111.c
1005
static int mt9m111_s_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/mt9m111.c
1007
struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
drivers/media/i2c/mt9m111.c
1048
static int mt9m111_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m111.c
1052
struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
drivers/media/i2c/mt9m111.c
1066
static int mt9m111_set_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m111.c
1070
struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
drivers/media/i2c/mt9m111.c
1111
static int mt9m111_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m111.c
1122
static int mt9m111_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/mt9m111.c
1124
struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
drivers/media/i2c/mt9m111.c
1130
static int mt9m111_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m111.c
1148
static int mt9m111_get_mbus_config(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m111.c
1152
struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
drivers/media/i2c/mt9m111.c
448
static int mt9m111_set_selection(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m111.c
452
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m111.c
492
static int mt9m111_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m111.c
496
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m111.c
517
static int mt9m111_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m111.c
522
struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
drivers/media/i2c/mt9m111.c
619
static int mt9m111_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m111.c
624
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m111.c
625
struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
drivers/media/i2c/mt9m111.c
746
static int mt9m111_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m111.c
749
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m111.c
765
static int mt9m111_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m111.c
768
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9m114.c
1086
state = v4l2_subdev_get_locked_active_state(&sensor->pa.sd);
drivers/media/i2c/mt9m114.c
1188
static inline struct mt9m114 *pa_to_mt9m114(struct v4l2_subdev *sd)
drivers/media/i2c/mt9m114.c
1190
return container_of(sd, struct mt9m114, pa.sd);
drivers/media/i2c/mt9m114.c
1193
static int mt9m114_pa_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m114.c
1220
static int mt9m114_pa_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m114.c
1232
static int mt9m114_pa_enum_framesizes(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m114.c
1251
static int mt9m114_pa_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m114.c
1255
struct mt9m114 *sensor = pa_to_mt9m114(sd);
drivers/media/i2c/mt9m114.c
1278
static int mt9m114_pa_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m114.c
1301
static int mt9m114_pa_set_selection(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m114.c
1305
struct mt9m114 *sensor = pa_to_mt9m114(sd);
drivers/media/i2c/mt9m114.c
1381
struct v4l2_subdev *sd = &sensor->pa.sd;
drivers/media/i2c/mt9m114.c
1389
v4l2_subdev_init(sd, &mt9m114_pa_ops);
drivers/media/i2c/mt9m114.c
1390
sd->internal_ops = &mt9m114_pa_internal_ops;
drivers/media/i2c/mt9m114.c
1391
v4l2_i2c_subdev_set_name(sd, sensor->client, NULL, " pixel array");
drivers/media/i2c/mt9m114.c
1393
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/mt9m114.c
1394
sd->owner = THIS_MODULE;
drivers/media/i2c/mt9m114.c
1395
sd->dev = &sensor->client->dev;
drivers/media/i2c/mt9m114.c
1396
v4l2_set_subdevdata(sd, sensor->client);
drivers/media/i2c/mt9m114.c
1399
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/mt9m114.c
1400
sd->entity.ops = &mt9m114_entity_ops;
drivers/media/i2c/mt9m114.c
1402
ret = media_entity_pads_init(&sd->entity, 1, pads);
drivers/media/i2c/mt9m114.c
1456
sd->state_lock = hdl->lock;
drivers/media/i2c/mt9m114.c
1458
ret = v4l2_subdev_init_finalize(sd);
drivers/media/i2c/mt9m114.c
1463
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/mt9m114.c
1468
sd->ctrl_handler = hdl;
drivers/media/i2c/mt9m114.c
1474
media_entity_cleanup(&sensor->pa.sd.entity);
drivers/media/i2c/mt9m114.c
1481
media_entity_cleanup(&sensor->pa.sd.entity);
drivers/media/i2c/mt9m114.c
1616
static inline struct mt9m114 *ifp_to_mt9m114(struct v4l2_subdev *sd)
drivers/media/i2c/mt9m114.c
1618
return container_of(sd, struct mt9m114, ifp.sd);
drivers/media/i2c/mt9m114.c
1621
static int mt9m114_ifp_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/mt9m114.c
1623
struct mt9m114 *sensor = ifp_to_mt9m114(sd);
drivers/media/i2c/mt9m114.c
1631
ifp_state = v4l2_subdev_lock_and_get_active_state(&sensor->ifp.sd);
drivers/media/i2c/mt9m114.c
1632
pa_state = v4l2_subdev_lock_and_get_active_state(&sensor->pa.sd);
drivers/media/i2c/mt9m114.c
1642
static int mt9m114_ifp_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m114.c
1647
struct mt9m114 *sensor = ifp_to_mt9m114(sd);
drivers/media/i2c/mt9m114.c
1662
static int mt9m114_ifp_set_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m114.c
1667
struct mt9m114 *sensor = ifp_to_mt9m114(sd);
drivers/media/i2c/mt9m114.c
1693
static int mt9m114_ifp_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m114.c
1696
struct mt9m114 *sensor = ifp_to_mt9m114(sd);
drivers/media/i2c/mt9m114.c
1740
static int mt9m114_ifp_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m114.c
1745
struct mt9m114 *sensor = ifp_to_mt9m114(sd);
drivers/media/i2c/mt9m114.c
1785
static int mt9m114_ifp_enum_framesizes(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m114.c
1789
struct mt9m114 *sensor = ifp_to_mt9m114(sd);
drivers/media/i2c/mt9m114.c
1819
static int mt9m114_ifp_enum_frameintervals(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m114.c
1823
struct mt9m114 *sensor = ifp_to_mt9m114(sd);
drivers/media/i2c/mt9m114.c
1874
static int mt9m114_ifp_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m114.c
1878
struct mt9m114 *sensor = ifp_to_mt9m114(sd);
drivers/media/i2c/mt9m114.c
1920
static int mt9m114_ifp_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m114.c
1979
static int mt9m114_ifp_set_selection(struct v4l2_subdev *sd,
drivers/media/i2c/mt9m114.c
2056
static void mt9m114_ifp_unregistered(struct v4l2_subdev *sd)
drivers/media/i2c/mt9m114.c
2058
struct mt9m114 *sensor = ifp_to_mt9m114(sd);
drivers/media/i2c/mt9m114.c
2060
v4l2_device_unregister_subdev(&sensor->pa.sd);
drivers/media/i2c/mt9m114.c
2063
static int mt9m114_ifp_registered(struct v4l2_subdev *sd)
drivers/media/i2c/mt9m114.c
2065
struct mt9m114 *sensor = ifp_to_mt9m114(sd);
drivers/media/i2c/mt9m114.c
2068
ret = v4l2_device_register_subdev(sd->v4l2_dev, &sensor->pa.sd);
drivers/media/i2c/mt9m114.c
2075
ret = media_create_pad_link(&sensor->pa.sd.entity, 0,
drivers/media/i2c/mt9m114.c
2076
&sensor->ifp.sd.entity, 0,
drivers/media/i2c/mt9m114.c
2082
v4l2_device_unregister_subdev(&sensor->pa.sd);
drivers/media/i2c/mt9m114.c
2118
struct v4l2_subdev *sd = &sensor->ifp.sd;
drivers/media/i2c/mt9m114.c
2125
v4l2_i2c_subdev_init(sd, sensor->client, &mt9m114_ifp_ops);
drivers/media/i2c/mt9m114.c
2126
v4l2_i2c_subdev_set_name(sd, sensor->client, NULL, " ifp");
drivers/media/i2c/mt9m114.c
2128
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/mt9m114.c
2129
sd->internal_ops = &mt9m114_ifp_internal_ops;
drivers/media/i2c/mt9m114.c
2132
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_ISP;
drivers/media/i2c/mt9m114.c
2133
sd->entity.ops = &mt9m114_entity_ops;
drivers/media/i2c/mt9m114.c
2136
ret = media_entity_pads_init(&sd->entity, 2, pads);
drivers/media/i2c/mt9m114.c
2189
sd->ctrl_handler = hdl;
drivers/media/i2c/mt9m114.c
2190
sd->state_lock = hdl->lock;
drivers/media/i2c/mt9m114.c
2192
ret = v4l2_subdev_init_finalize(sd);
drivers/media/i2c/mt9m114.c
2200
media_entity_cleanup(&sensor->ifp.sd.entity);
drivers/media/i2c/mt9m114.c
2207
media_entity_cleanup(&sensor->ifp.sd.entity);
drivers/media/i2c/mt9m114.c
2315
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/mt9m114.c
2316
struct mt9m114 *sensor = ifp_to_mt9m114(sd);
drivers/media/i2c/mt9m114.c
2323
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/mt9m114.c
2324
struct mt9m114 *sensor = ifp_to_mt9m114(sd);
drivers/media/i2c/mt9m114.c
2601
ret = v4l2_async_register_subdev(&sensor->ifp.sd);
drivers/media/i2c/mt9m114.c
2629
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/mt9m114.c
2630
struct mt9m114 *sensor = ifp_to_mt9m114(sd);
drivers/media/i2c/mt9m114.c
2633
v4l2_async_unregister_subdev(&sensor->ifp.sd);
drivers/media/i2c/mt9m114.c
400
struct v4l2_subdev sd;
drivers/media/i2c/mt9m114.c
412
struct v4l2_subdev sd;
drivers/media/i2c/mt9p031.c
148
static struct mt9p031 *to_mt9p031(struct v4l2_subdev *sd)
drivers/media/i2c/mt9p031.c
150
return container_of(sd, struct mt9p031, subdev);
drivers/media/i2c/mt9t112.c
721
static int mt9t112_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/mt9t112.c
724
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9t112.c
735
static int mt9t112_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/mt9t112.c
738
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9t112.c
774
static int mt9t112_s_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/mt9t112.c
776
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9t112.c
794
static int mt9t112_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/mt9t112.c
796
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9t112.c
874
static int mt9t112_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/mt9t112.c
878
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9t112.c
899
static int mt9t112_set_selection(struct v4l2_subdev *sd,
drivers/media/i2c/mt9t112.c
903
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9t112.c
914
static int mt9t112_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/mt9t112.c
919
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9t112.c
934
static int mt9t112_s_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/mt9t112.c
937
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9t112.c
955
static int mt9t112_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/mt9t112.c
959
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9t112.c
984
return mt9t112_s_fmt(sd, mf);
drivers/media/i2c/mt9t112.c
989
static int mt9t112_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/mt9t112.c
993
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9v011.c
104
v4l2_dbg(2, debug, sd,
drivers/media/i2c/mt9v011.c
108
v4l2_dbg(0, debug, sd,
drivers/media/i2c/mt9v011.c
173
static void set_balance(struct v4l2_subdev *sd)
drivers/media/i2c/mt9v011.c
175
struct mt9v011 *core = to_mt9v011(sd);
drivers/media/i2c/mt9v011.c
192
mt9v011_write(sd, R2B_MT9V011_GREEN_1_GAIN, green_gain);
drivers/media/i2c/mt9v011.c
193
mt9v011_write(sd, R2E_MT9V011_GREEN_2_GAIN, green_gain);
drivers/media/i2c/mt9v011.c
194
mt9v011_write(sd, R2C_MT9V011_BLUE_GAIN, blue_gain);
drivers/media/i2c/mt9v011.c
195
mt9v011_write(sd, R2D_MT9V011_RED_GAIN, red_gain);
drivers/media/i2c/mt9v011.c
196
mt9v011_write(sd, R09_MT9V011_SHUTTER_WIDTH, exposure);
drivers/media/i2c/mt9v011.c
199
static void calc_fps(struct v4l2_subdev *sd, u32 *numerator, u32 *denominator)
drivers/media/i2c/mt9v011.c
201
struct mt9v011 *core = to_mt9v011(sd);
drivers/media/i2c/mt9v011.c
207
height = mt9v011_read(sd, R03_MT9V011_HEIGHT);
drivers/media/i2c/mt9v011.c
208
width = mt9v011_read(sd, R04_MT9V011_WIDTH);
drivers/media/i2c/mt9v011.c
209
hblank = mt9v011_read(sd, R05_MT9V011_HBLANK);
drivers/media/i2c/mt9v011.c
210
vblank = mt9v011_read(sd, R06_MT9V011_VBLANK);
drivers/media/i2c/mt9v011.c
211
speed = mt9v011_read(sd, R0A_MT9V011_CLK_SPEED);
drivers/media/i2c/mt9v011.c
220
v4l2_dbg(1, debug, sd, "Programmed to %u.%03u fps (%d pixel clcks)\n",
drivers/media/i2c/mt9v011.c
229
static u16 calc_speed(struct v4l2_subdev *sd, u32 numerator, u32 denominator)
drivers/media/i2c/mt9v011.c
231
struct mt9v011 *core = to_mt9v011(sd);
drivers/media/i2c/mt9v011.c
240
height = mt9v011_read(sd, R03_MT9V011_HEIGHT);
drivers/media/i2c/mt9v011.c
241
width = mt9v011_read(sd, R04_MT9V011_WIDTH);
drivers/media/i2c/mt9v011.c
242
hblank = mt9v011_read(sd, R05_MT9V011_HBLANK);
drivers/media/i2c/mt9v011.c
243
vblank = mt9v011_read(sd, R06_MT9V011_VBLANK);
drivers/media/i2c/mt9v011.c
269
static void set_res(struct v4l2_subdev *sd)
drivers/media/i2c/mt9v011.c
271
struct mt9v011 *core = to_mt9v011(sd);
drivers/media/i2c/mt9v011.c
286
mt9v011_write(sd, R02_MT9V011_COLSTART, hstart);
drivers/media/i2c/mt9v011.c
287
mt9v011_write(sd, R04_MT9V011_WIDTH, core->width);
drivers/media/i2c/mt9v011.c
288
mt9v011_write(sd, R05_MT9V011_HBLANK, 771 - core->width);
drivers/media/i2c/mt9v011.c
291
mt9v011_write(sd, R01_MT9V011_ROWSTART, vstart);
drivers/media/i2c/mt9v011.c
292
mt9v011_write(sd, R03_MT9V011_HEIGHT, core->height);
drivers/media/i2c/mt9v011.c
293
mt9v011_write(sd, R06_MT9V011_VBLANK, 508 - core->height);
drivers/media/i2c/mt9v011.c
295
calc_fps(sd, NULL, NULL);
drivers/media/i2c/mt9v011.c
298
static void set_read_mode(struct v4l2_subdev *sd)
drivers/media/i2c/mt9v011.c
300
struct mt9v011 *core = to_mt9v011(sd);
drivers/media/i2c/mt9v011.c
309
mt9v011_write(sd, R20_MT9V011_READ_MODE, mode);
drivers/media/i2c/mt9v011.c
312
static int mt9v011_reset(struct v4l2_subdev *sd, u32 val)
drivers/media/i2c/mt9v011.c
317
mt9v011_write(sd, mt9v011_init_default[i].reg,
drivers/media/i2c/mt9v011.c
320
set_balance(sd);
drivers/media/i2c/mt9v011.c
321
set_res(sd);
drivers/media/i2c/mt9v011.c
322
set_read_mode(sd);
drivers/media/i2c/mt9v011.c
327
static int mt9v011_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/mt9v011.c
338
static int mt9v011_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/mt9v011.c
343
struct mt9v011 *core = to_mt9v011(sd);
drivers/media/i2c/mt9v011.c
357
set_res(sd);
drivers/media/i2c/mt9v011.c
365
static int mt9v011_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/mt9v011.c
376
calc_fps(sd,
drivers/media/i2c/mt9v011.c
383
static int mt9v011_set_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/mt9v011.c
397
speed = calc_speed(sd, tpf->numerator, tpf->denominator);
drivers/media/i2c/mt9v011.c
399
mt9v011_write(sd, R0A_MT9V011_CLK_SPEED, speed);
drivers/media/i2c/mt9v011.c
400
v4l2_dbg(1, debug, sd, "Setting speed to %d\n", speed);
drivers/media/i2c/mt9v011.c
403
calc_fps(sd, &tpf->numerator, &tpf->denominator);
drivers/media/i2c/mt9v011.c
409
static int mt9v011_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/mt9v011.c
412
reg->val = mt9v011_read(sd, reg->reg & 0xff);
drivers/media/i2c/mt9v011.c
418
static int mt9v011_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/mt9v011.c
421
mt9v011_write(sd, reg->reg & 0xff, reg->val & 0xffff);
drivers/media/i2c/mt9v011.c
431
struct v4l2_subdev *sd = &core->sd;
drivers/media/i2c/mt9v011.c
448
set_read_mode(sd);
drivers/media/i2c/mt9v011.c
452
set_read_mode(sd);
drivers/media/i2c/mt9v011.c
458
set_balance(sd);
drivers/media/i2c/mt9v011.c
495
struct v4l2_subdev *sd;
drivers/media/i2c/mt9v011.c
507
sd = &core->sd;
drivers/media/i2c/mt9v011.c
508
v4l2_i2c_subdev_init(sd, c, &mt9v011_ops);
drivers/media/i2c/mt9v011.c
51
struct v4l2_subdev sd;
drivers/media/i2c/mt9v011.c
511
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/mt9v011.c
513
ret = media_entity_pads_init(&sd->entity, 1, &core->pad);
drivers/media/i2c/mt9v011.c
518
version = mt9v011_read(sd, R00_MT9V011_CHIP_VERSION);
drivers/media/i2c/mt9v011.c
521
v4l2_info(sd, "*** unknown micron chip detected (0x%04x).\n",
drivers/media/i2c/mt9v011.c
543
v4l2_err(sd, "control initialization error %d\n", ret);
drivers/media/i2c/mt9v011.c
547
core->sd.ctrl_handler = &core->ctrls;
drivers/media/i2c/mt9v011.c
559
v4l2_dbg(1, debug, sd, "xtal set to %d.%03d MHz\n",
drivers/media/i2c/mt9v011.c
571
struct v4l2_subdev *sd = i2c_get_clientdata(c);
drivers/media/i2c/mt9v011.c
572
struct mt9v011 *core = to_mt9v011(sd);
drivers/media/i2c/mt9v011.c
574
v4l2_dbg(1, debug, sd,
drivers/media/i2c/mt9v011.c
578
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/mt9v011.c
63
static inline struct mt9v011 *to_mt9v011(struct v4l2_subdev *sd)
drivers/media/i2c/mt9v011.c
65
return container_of(sd, struct mt9v011, sd);
drivers/media/i2c/mt9v011.c
68
static int mt9v011_read(struct v4l2_subdev *sd, unsigned char addr)
drivers/media/i2c/mt9v011.c
70
struct i2c_client *c = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9v011.c
76
v4l2_dbg(0, debug, sd,
drivers/media/i2c/mt9v011.c
83
v4l2_dbg(0, debug, sd,
drivers/media/i2c/mt9v011.c
88
v4l2_dbg(2, debug, sd, "mt9v011: read 0x%02x = 0x%04x\n", addr, val);
drivers/media/i2c/mt9v011.c
93
static void mt9v011_write(struct v4l2_subdev *sd, unsigned char addr,
drivers/media/i2c/mt9v011.c
96
struct i2c_client *c = v4l2_get_subdevdata(sd);
drivers/media/i2c/mt9v032.c
229
static struct mt9v032 *to_mt9v032(struct v4l2_subdev *sd)
drivers/media/i2c/mt9v032.c
231
return container_of(sd, struct mt9v032, subdev);
drivers/media/i2c/mt9v111.c
1090
ret = __mt9v111_power_on(&mt9v111->sd);
drivers/media/i2c/mt9v111.c
1112
__mt9v111_power_off(&mt9v111->sd);
drivers/media/i2c/mt9v111.c
1199
mt9v111->sd.ctrl_handler = &mt9v111->ctrls;
drivers/media/i2c/mt9v111.c
1214
v4l2_i2c_subdev_init(&mt9v111->sd, client, &mt9v111_ops);
drivers/media/i2c/mt9v111.c
1215
mt9v111->sd.internal_ops = &mt9v111_internal_ops;
drivers/media/i2c/mt9v111.c
1217
mt9v111->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/mt9v111.c
1218
mt9v111->sd.entity.ops = &mt9v111_subdev_entity_ops;
drivers/media/i2c/mt9v111.c
1219
mt9v111->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/mt9v111.c
1222
ret = media_entity_pads_init(&mt9v111->sd.entity, 1, &mt9v111->pad);
drivers/media/i2c/mt9v111.c
123
struct v4l2_subdev sd;
drivers/media/i2c/mt9v111.c
1230
ret = v4l2_async_register_subdev(&mt9v111->sd);
drivers/media/i2c/mt9v111.c
1237
media_entity_cleanup(&mt9v111->sd.entity);
drivers/media/i2c/mt9v111.c
1250
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/mt9v111.c
1251
struct mt9v111_dev *mt9v111 = sd_to_mt9v111(sd);
drivers/media/i2c/mt9v111.c
1253
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/mt9v111.c
1255
media_entity_cleanup(&sd->entity);
drivers/media/i2c/mt9v111.c
156
#define sd_to_mt9v111(__sd) container_of((__sd), struct mt9v111_dev, sd)
drivers/media/i2c/mt9v111.c
275
struct v4l2_subdev *sd = i2c_get_clientdata(c);
drivers/media/i2c/mt9v111.c
276
struct mt9v111_dev *mt9v111 = sd_to_mt9v111(sd);
drivers/media/i2c/mt9v111.c
359
static int __mt9v111_power_on(struct v4l2_subdev *sd)
drivers/media/i2c/mt9v111.c
361
struct mt9v111_dev *mt9v111 = sd_to_mt9v111(sd);
drivers/media/i2c/mt9v111.c
377
static int __mt9v111_power_off(struct v4l2_subdev *sd)
drivers/media/i2c/mt9v111.c
379
struct mt9v111_dev *mt9v111 = sd_to_mt9v111(sd);
drivers/media/i2c/mt9v111.c
642
static int mt9v111_s_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/mt9v111.c
644
struct mt9v111_dev *mt9v111 = sd_to_mt9v111(sd);
drivers/media/i2c/mt9v111.c
657
ret = on ? __mt9v111_power_on(sd) :
drivers/media/i2c/mt9v111.c
658
__mt9v111_power_off(sd);
drivers/media/i2c/mt9v111.c
720
static int mt9v111_set_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/mt9v111.c
724
struct mt9v111_dev *mt9v111 = sd_to_mt9v111(sd);
drivers/media/i2c/mt9v111.c
780
static int mt9v111_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/mt9v111.c
784
struct mt9v111_dev *mt9v111 = sd_to_mt9v111(sd);
drivers/media/i2c/mt9v111.c
832
static int mt9v111_enum_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/og01a1b.c
1017
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/og01a1b.c
1018
struct og01a1b *og01a1b = to_og01a1b(sd);
drivers/media/i2c/og01a1b.c
1041
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/og01a1b.c
1042
struct og01a1b *og01a1b = to_og01a1b(sd);
drivers/media/i2c/og01a1b.c
1044
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/og01a1b.c
1045
media_entity_cleanup(&sd->entity);
drivers/media/i2c/og01a1b.c
1046
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/og01a1b.c
1063
v4l2_i2c_subdev_init(&og01a1b->sd, client, &og01a1b_subdev_ops);
drivers/media/i2c/og01a1b.c
1145
og01a1b->sd.internal_ops = &og01a1b_internal_ops;
drivers/media/i2c/og01a1b.c
1146
og01a1b->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/og01a1b.c
1147
og01a1b->sd.entity.ops = &og01a1b_subdev_entity_ops;
drivers/media/i2c/og01a1b.c
1148
og01a1b->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/og01a1b.c
1150
ret = media_entity_pads_init(&og01a1b->sd.entity, 1, &og01a1b->pad);
drivers/media/i2c/og01a1b.c
1156
ret = v4l2_async_register_subdev_sensor(&og01a1b->sd);
drivers/media/i2c/og01a1b.c
1171
media_entity_cleanup(&og01a1b->sd.entity);
drivers/media/i2c/og01a1b.c
1174
v4l2_ctrl_handler_free(og01a1b->sd.ctrl_handler);
drivers/media/i2c/og01a1b.c
432
struct v4l2_subdev sd;
drivers/media/i2c/og01a1b.c
470
struct i2c_client *client = v4l2_get_subdevdata(&og01a1b->sd);
drivers/media/i2c/og01a1b.c
500
struct i2c_client *client = v4l2_get_subdevdata(&og01a1b->sd);
drivers/media/i2c/og01a1b.c
675
og01a1b->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/og01a1b.c
710
ret = __v4l2_ctrl_handler_setup(og01a1b->sd.ctrl_handler);
drivers/media/i2c/og01a1b.c
732
static int og01a1b_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/og01a1b.c
734
struct og01a1b *og01a1b = to_og01a1b(sd);
drivers/media/i2c/og01a1b.c
74
#define to_og01a1b(_sd) container_of(_sd, struct og01a1b, sd)
drivers/media/i2c/og01a1b.c
761
static int og01a1b_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/og01a1b.c
765
struct og01a1b *og01a1b = to_og01a1b(sd);
drivers/media/i2c/og01a1b.c
802
static int og01a1b_get_format(struct v4l2_subdev *sd,
drivers/media/i2c/og01a1b.c
806
struct og01a1b *og01a1b = to_og01a1b(sd);
drivers/media/i2c/og01a1b.c
820
static int og01a1b_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/og01a1b.c
832
static int og01a1b_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/og01a1b.c
850
static int og01a1b_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/og01a1b.c
852
struct og01a1b *og01a1b = to_og01a1b(sd);
drivers/media/i2c/og01a1b.c
966
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/og01a1b.c
967
struct og01a1b *og01a1b = to_og01a1b(sd);
drivers/media/i2c/og0ve1b.c
397
og0ve1b->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/og0ve1b.c
420
static int og0ve1b_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/og0ve1b.c
425
struct og0ve1b *og0ve1b = to_og0ve1b(sd);
drivers/media/i2c/og0ve1b.c
447
ret = __v4l2_ctrl_handler_setup(og0ve1b->sd.ctrl_handler);
drivers/media/i2c/og0ve1b.c
466
static int og0ve1b_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/og0ve1b.c
470
struct og0ve1b *og0ve1b = to_og0ve1b(sd);
drivers/media/i2c/og0ve1b.c
483
static int og0ve1b_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/og0ve1b.c
504
static int og0ve1b_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/og0ve1b.c
516
static int og0ve1b_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/og0ve1b.c
52
#define to_og0ve1b(_sd) container_of(_sd, struct og0ve1b, sd)
drivers/media/i2c/og0ve1b.c
534
static int og0ve1b_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/og0ve1b.c
547
og0ve1b_set_pad_format(sd, state, &fmt);
drivers/media/i2c/og0ve1b.c
638
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/og0ve1b.c
639
struct og0ve1b *og0ve1b = to_og0ve1b(sd);
drivers/media/i2c/og0ve1b.c
665
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/og0ve1b.c
666
struct og0ve1b *og0ve1b = to_og0ve1b(sd);
drivers/media/i2c/og0ve1b.c
690
v4l2_i2c_subdev_init(&og0ve1b->sd, client, &og0ve1b_subdev_ops);
drivers/media/i2c/og0ve1b.c
745
og0ve1b->sd.state_lock = og0ve1b->ctrl_handler.lock;
drivers/media/i2c/og0ve1b.c
746
og0ve1b->sd.internal_ops = &og0ve1b_internal_ops;
drivers/media/i2c/og0ve1b.c
747
og0ve1b->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/og0ve1b.c
748
og0ve1b->sd.entity.ops = &og0ve1b_subdev_entity_ops;
drivers/media/i2c/og0ve1b.c
749
og0ve1b->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/og0ve1b.c
752
ret = media_entity_pads_init(&og0ve1b->sd.entity, 1, &og0ve1b->pad);
drivers/media/i2c/og0ve1b.c
759
ret = v4l2_subdev_init_finalize(&og0ve1b->sd);
drivers/media/i2c/og0ve1b.c
769
ret = v4l2_async_register_subdev_sensor(&og0ve1b->sd);
drivers/media/i2c/og0ve1b.c
784
v4l2_subdev_cleanup(&og0ve1b->sd);
drivers/media/i2c/og0ve1b.c
789
media_entity_cleanup(&og0ve1b->sd.entity);
drivers/media/i2c/og0ve1b.c
792
v4l2_ctrl_handler_free(og0ve1b->sd.ctrl_handler);
drivers/media/i2c/og0ve1b.c
802
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/og0ve1b.c
803
struct og0ve1b *og0ve1b = to_og0ve1b(sd);
drivers/media/i2c/og0ve1b.c
805
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/og0ve1b.c
806
v4l2_subdev_cleanup(sd);
drivers/media/i2c/og0ve1b.c
807
media_entity_cleanup(&sd->entity);
drivers/media/i2c/og0ve1b.c
808
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/og0ve1b.c
93
struct v4l2_subdev sd;
drivers/media/i2c/os05b10.c
1038
os05b10->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/os05b10.c
1039
os05b10->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/os05b10.c
1040
os05b10->sd.internal_ops = &os05b10_internal_ops;
drivers/media/i2c/os05b10.c
1043
ret = media_entity_pads_init(&os05b10->sd.entity, 1, &os05b10->pad);
drivers/media/i2c/os05b10.c
1050
os05b10->sd.state_lock = os05b10->handler.lock;
drivers/media/i2c/os05b10.c
1051
ret = v4l2_subdev_init_finalize(&os05b10->sd);
drivers/media/i2c/os05b10.c
1060
ret = v4l2_async_register_subdev_sensor(&os05b10->sd);
drivers/media/i2c/os05b10.c
1072
v4l2_subdev_cleanup(&os05b10->sd);
drivers/media/i2c/os05b10.c
1077
media_entity_cleanup(&os05b10->sd.entity);
drivers/media/i2c/os05b10.c
1080
v4l2_ctrl_handler_free(os05b10->sd.ctrl_handler);
drivers/media/i2c/os05b10.c
1090
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/os05b10.c
1091
struct os05b10 *os05b10 = to_os05b10(sd);
drivers/media/i2c/os05b10.c
1093
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/os05b10.c
1094
v4l2_subdev_cleanup(&os05b10->sd);
drivers/media/i2c/os05b10.c
1095
media_entity_cleanup(&sd->entity);
drivers/media/i2c/os05b10.c
1096
v4l2_ctrl_handler_free(os05b10->sd.ctrl_handler);
drivers/media/i2c/os05b10.c
459
struct v4l2_subdev sd;
drivers/media/i2c/os05b10.c
506
static inline struct os05b10 *to_os05b10(struct v4l2_subdev *sd)
drivers/media/i2c/os05b10.c
508
return container_of_const(sd, struct os05b10, sd);
drivers/media/i2c/os05b10.c
519
state = v4l2_subdev_get_locked_active_state(&os05b10->sd);
drivers/media/i2c/os05b10.c
560
static int os05b10_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/os05b10.c
597
static int os05b10_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/os05b10.c
602
struct os05b10 *os05b10 = to_os05b10(sd);
drivers/media/i2c/os05b10.c
626
static int os05b10_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/os05b10.c
644
static int os05b10_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/os05b10.c
659
static int os05b10_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/os05b10.c
663
struct os05b10 *os05b10 = to_os05b10(sd);
drivers/media/i2c/os05b10.c
679
ret = __v4l2_ctrl_handler_setup(os05b10->sd.ctrl_handler);
drivers/media/i2c/os05b10.c
697
static int os05b10_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/os05b10.c
701
struct os05b10 *os05b10 = to_os05b10(sd);
drivers/media/i2c/os05b10.c
714
static int os05b10_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/os05b10.c
785
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/os05b10.c
786
struct os05b10 *os05b10 = to_os05b10(sd);
drivers/media/i2c/os05b10.c
825
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/os05b10.c
826
struct os05b10 *os05b10 = to_os05b10(sd);
drivers/media/i2c/os05b10.c
962
os05b10->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/os05b10.c
985
v4l2_i2c_subdev_init(&os05b10->sd, client, &os05b10_subdev_ops);
drivers/media/i2c/ov01a10.c
1014
v4l2_i2c_subdev_init(&ov01a10->sd, client, &ov01a10_subdev_ops);
drivers/media/i2c/ov01a10.c
1016
v4l2_i2c_subdev_set_name(&ov01a10->sd, client, cfg->model, NULL);
drivers/media/i2c/ov01a10.c
1017
ov01a10->sd.internal_ops = &ov01a10_internal_ops;
drivers/media/i2c/ov01a10.c
1039
ov01a10->sd.state_lock = ov01a10->ctrl_handler.lock;
drivers/media/i2c/ov01a10.c
1040
ov01a10->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov01a10.c
1041
ov01a10->sd.entity.ops = &ov01a10_subdev_entity_ops;
drivers/media/i2c/ov01a10.c
1042
ov01a10->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov01a10.c
1045
ret = media_entity_pads_init(&ov01a10->sd.entity, 1, &ov01a10->pad);
drivers/media/i2c/ov01a10.c
1049
ret = v4l2_subdev_init_finalize(&ov01a10->sd);
drivers/media/i2c/ov01a10.c
1061
ret = v4l2_async_register_subdev_sensor(&ov01a10->sd);
drivers/media/i2c/ov01a10.c
1070
v4l2_subdev_cleanup(&ov01a10->sd);
drivers/media/i2c/ov01a10.c
1073
media_entity_cleanup(&ov01a10->sd.entity);
drivers/media/i2c/ov01a10.c
1076
v4l2_ctrl_handler_free(ov01a10->sd.ctrl_handler);
drivers/media/i2c/ov01a10.c
251
struct v4l2_subdev sd;
drivers/media/i2c/ov01a10.c
274
return container_of(subdev, struct ov01a10, sd);
drivers/media/i2c/ov01a10.c
280
v4l2_subdev_get_locked_active_state(&ov01a10->sd);
drivers/media/i2c/ov01a10.c
288
v4l2_subdev_get_locked_active_state(&ov01a10->sd);
drivers/media/i2c/ov01a10.c
505
ov01a10->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/ov01a10.c
577
ret = __v4l2_ctrl_handler_setup(ov01a10->sd.ctrl_handler);
drivers/media/i2c/ov01a10.c
591
static int ov01a10_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov01a10.c
593
struct ov01a10 *ov01a10 = to_ov01a10(sd);
drivers/media/i2c/ov01a10.c
597
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/ov01a10.c
636
static int ov01a10_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov01a10.c
641
struct ov01a10 *ov01a10 = to_ov01a10(sd);
drivers/media/i2c/ov01a10.c
672
static int ov01a10_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ov01a10.c
675
struct ov01a10 *ov01a10 = to_ov01a10(sd);
drivers/media/i2c/ov01a10.c
684
static int ov01a10_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov01a10.c
688
struct ov01a10 *ov01a10 = to_ov01a10(sd);
drivers/media/i2c/ov01a10.c
698
static int ov01a10_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov01a10.c
702
struct ov01a10 *ov01a10 = to_ov01a10(sd);
drivers/media/i2c/ov01a10.c
717
static int ov01a10_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov01a10.c
721
struct ov01a10 *ov01a10 = to_ov01a10(sd);
drivers/media/i2c/ov01a10.c
749
static int ov01a10_set_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov01a10.c
753
struct ov01a10 *ov01a10 = to_ov01a10(sd);
drivers/media/i2c/ov01a10.c
868
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov01a10.c
869
struct ov01a10 *ov01a10 = to_ov01a10(sd);
drivers/media/i2c/ov01a10.c
899
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov01a10.c
900
struct ov01a10 *ov01a10 = to_ov01a10(sd);
drivers/media/i2c/ov01a10.c
979
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov01a10.c
981
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov01a10.c
982
v4l2_subdev_cleanup(sd);
drivers/media/i2c/ov01a10.c
983
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov01a10.c
984
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/ov02a10.c
130
static inline struct ov02a10 *to_ov02a10(struct v4l2_subdev *sd)
drivers/media/i2c/ov02a10.c
132
return container_of(sd, struct ov02a10, subdev);
drivers/media/i2c/ov02a10.c
298
static int ov02a10_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov02a10.c
302
struct ov02a10 *ov02a10 = to_ov02a10(sd);
drivers/media/i2c/ov02a10.c
330
static int ov02a10_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov02a10.c
334
struct ov02a10 *ov02a10 = to_ov02a10(sd);
drivers/media/i2c/ov02a10.c
353
static int ov02a10_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov02a10.c
357
struct ov02a10 *ov02a10 = to_ov02a10(sd);
drivers/media/i2c/ov02a10.c
367
static int ov02a10_enum_frame_sizes(struct v4l2_subdev *sd,
drivers/media/i2c/ov02a10.c
406
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov02a10.c
407
struct ov02a10 *ov02a10 = to_ov02a10(sd);
drivers/media/i2c/ov02a10.c
451
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov02a10.c
452
struct ov02a10 *ov02a10 = to_ov02a10(sd);
drivers/media/i2c/ov02a10.c
515
static int ov02a10_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ov02a10.c
526
ov02a10_set_fmt(sd, sd_state, &fmt);
drivers/media/i2c/ov02a10.c
531
static int ov02a10_s_stream(struct v4l2_subdev *sd, int on)
drivers/media/i2c/ov02a10.c
533
struct ov02a10 *ov02a10 = to_ov02a10(sd);
drivers/media/i2c/ov02a10.c
971
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov02a10.c
972
struct ov02a10 *ov02a10 = to_ov02a10(sd);
drivers/media/i2c/ov02a10.c
974
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov02a10.c
975
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov02a10.c
976
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/ov02c10.c
373
struct v4l2_subdev sd;
drivers/media/i2c/ov02c10.c
396
return container_of(subdev, struct ov02c10, sd);
drivers/media/i2c/ov02c10.c
570
ov02c10->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/ov02c10.c
584
static int ov02c10_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ov02c10.c
589
struct ov02c10 *ov02c10 = to_ov02c10(sd);
drivers/media/i2c/ov02c10.c
615
ret = __v4l2_ctrl_handler_setup(ov02c10->sd.ctrl_handler);
drivers/media/i2c/ov02c10.c
627
static int ov02c10_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ov02c10.c
631
struct ov02c10 *ov02c10 = to_ov02c10(sd);
drivers/media/i2c/ov02c10.c
642
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov02c10.c
643
struct ov02c10 *ov02c10 = to_ov02c10(sd);
drivers/media/i2c/ov02c10.c
660
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov02c10.c
661
struct ov02c10 *ov02c10 = to_ov02c10(sd);
drivers/media/i2c/ov02c10.c
675
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov02c10.c
676
struct ov02c10 *ov02c10 = to_ov02c10(sd);
drivers/media/i2c/ov02c10.c
703
static int ov02c10_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov02c10.c
708
struct ov02c10 *ov02c10 = to_ov02c10(sd);
drivers/media/i2c/ov02c10.c
728
static int ov02c10_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov02c10.c
740
static int ov02c10_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov02c10.c
758
static int ov02c10_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ov02c10.c
863
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov02c10.c
864
struct ov02c10 *ov02c10 = to_ov02c10(sd);
drivers/media/i2c/ov02c10.c
866
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov02c10.c
867
v4l2_subdev_cleanup(sd);
drivers/media/i2c/ov02c10.c
868
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov02c10.c
869
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/ov02c10.c
900
v4l2_i2c_subdev_init(&ov02c10->sd, client, &ov02c10_subdev_ops);
drivers/media/i2c/ov02c10.c
933
ov02c10->sd.internal_ops = &ov02c10_internal_ops;
drivers/media/i2c/ov02c10.c
934
ov02c10->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov02c10.c
935
ov02c10->sd.entity.ops = &ov02c10_subdev_entity_ops;
drivers/media/i2c/ov02c10.c
936
ov02c10->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov02c10.c
938
ret = media_entity_pads_init(&ov02c10->sd.entity, 1, &ov02c10->pad);
drivers/media/i2c/ov02c10.c
944
ov02c10->sd.state_lock = ov02c10->ctrl_handler.lock;
drivers/media/i2c/ov02c10.c
945
ret = v4l2_subdev_init_finalize(&ov02c10->sd);
drivers/media/i2c/ov02c10.c
954
ret = v4l2_async_register_subdev_sensor(&ov02c10->sd);
drivers/media/i2c/ov02c10.c
967
v4l2_subdev_cleanup(&ov02c10->sd);
drivers/media/i2c/ov02c10.c
970
media_entity_cleanup(&ov02c10->sd.entity);
drivers/media/i2c/ov02c10.c
973
v4l2_ctrl_handler_free(ov02c10->sd.ctrl_handler);
drivers/media/i2c/ov02e10.c
232
struct v4l2_subdev sd;
drivers/media/i2c/ov02e10.c
259
return container_of(subdev, struct ov02e10, sd);
drivers/media/i2c/ov02e10.c
454
ov02e10->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/ov02e10.c
480
static int ov02e10_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ov02e10.c
484
struct ov02e10 *ov02e10 = to_ov02e10(sd);
drivers/media/i2c/ov02e10.c
500
ret = __v4l2_ctrl_handler_setup(ov02e10->sd.ctrl_handler);
drivers/media/i2c/ov02e10.c
513
static int ov02e10_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ov02e10.c
517
struct ov02e10 *ov02e10 = to_ov02e10(sd);
drivers/media/i2c/ov02e10.c
527
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov02e10.c
528
struct ov02e10 *ov02e10 = to_ov02e10(sd);
drivers/media/i2c/ov02e10.c
545
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov02e10.c
546
struct ov02e10 *ov02e10 = to_ov02e10(sd);
drivers/media/i2c/ov02e10.c
561
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov02e10.c
562
struct ov02e10 *ov02e10 = to_ov02e10(sd);
drivers/media/i2c/ov02e10.c
592
static int ov02e10_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov02e10.c
596
struct ov02e10 *ov02e10 = to_ov02e10(sd);
drivers/media/i2c/ov02e10.c
644
static int ov02e10_get_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov02e10.c
648
struct ov02e10 *ov02e10 = to_ov02e10(sd);
drivers/media/i2c/ov02e10.c
658
static int ov02e10_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov02e10.c
670
static int ov02e10_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov02e10.c
688
static int ov02e10_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ov02e10.c
797
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov02e10.c
798
struct ov02e10 *ov02e10 = to_ov02e10(sd);
drivers/media/i2c/ov02e10.c
800
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov02e10.c
801
v4l2_subdev_cleanup(sd);
drivers/media/i2c/ov02e10.c
802
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov02e10.c
803
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/ov02e10.c
835
v4l2_i2c_subdev_init(&ov02e10->sd, client, &ov02e10_subdev_ops);
drivers/media/i2c/ov02e10.c
872
ov02e10->sd.internal_ops = &ov02e10_internal_ops;
drivers/media/i2c/ov02e10.c
873
ov02e10->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov02e10.c
874
ov02e10->sd.entity.ops = &ov02e10_subdev_entity_ops;
drivers/media/i2c/ov02e10.c
875
ov02e10->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov02e10.c
879
ret = media_entity_pads_init(&ov02e10->sd.entity, 1, &ov02e10->pad);
drivers/media/i2c/ov02e10.c
885
ov02e10->sd.state_lock = ov02e10->ctrl_handler.lock;
drivers/media/i2c/ov02e10.c
886
ret = v4l2_subdev_init_finalize(&ov02e10->sd);
drivers/media/i2c/ov02e10.c
895
ret = v4l2_async_register_subdev_sensor(&ov02e10->sd);
drivers/media/i2c/ov02e10.c
908
v4l2_subdev_cleanup(&ov02e10->sd);
drivers/media/i2c/ov02e10.c
911
media_entity_cleanup(&ov02e10->sd.entity);
drivers/media/i2c/ov02e10.c
914
v4l2_ctrl_handler_free(ov02e10->sd.ctrl_handler);
drivers/media/i2c/ov08d10.c
1000
ov08d10->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/ov08d10.c
1017
struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
drivers/media/i2c/ov08d10.c
1057
ret = __v4l2_ctrl_handler_setup(ov08d10->sd.ctrl_handler);
drivers/media/i2c/ov08d10.c
1075
struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
drivers/media/i2c/ov08d10.c
1097
static int ov08d10_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov08d10.c
1099
struct ov08d10 *ov08d10 = to_ov08d10(sd);
drivers/media/i2c/ov08d10.c
1130
static int ov08d10_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov08d10.c
1134
struct ov08d10 *ov08d10 = to_ov08d10(sd);
drivers/media/i2c/ov08d10.c
1178
static int ov08d10_get_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov08d10.c
1182
struct ov08d10 *ov08d10 = to_ov08d10(sd);
drivers/media/i2c/ov08d10.c
1197
static int ov08d10_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov08d10.c
1201
struct ov08d10 *ov08d10 = to_ov08d10(sd);
drivers/media/i2c/ov08d10.c
1213
static int ov08d10_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov08d10.c
1217
struct ov08d10 *ov08d10 = to_ov08d10(sd);
drivers/media/i2c/ov08d10.c
1237
static int ov08d10_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ov08d10.c
1239
struct ov08d10 *ov08d10 = to_ov08d10(sd);
drivers/media/i2c/ov08d10.c
1271
struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
drivers/media/i2c/ov08d10.c
1368
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov08d10.c
1369
struct ov08d10 *ov08d10 = to_ov08d10(sd);
drivers/media/i2c/ov08d10.c
1371
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov08d10.c
1372
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov08d10.c
1373
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/ov08d10.c
1407
v4l2_i2c_subdev_init(&ov08d10->sd, client, &ov08d10_subdev_ops);
drivers/media/i2c/ov08d10.c
1423
ov08d10->sd.internal_ops = &ov08d10_internal_ops;
drivers/media/i2c/ov08d10.c
1424
ov08d10->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov08d10.c
1425
ov08d10->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov08d10.c
1427
ret = media_entity_pads_init(&ov08d10->sd.entity, 1, &ov08d10->pad);
drivers/media/i2c/ov08d10.c
1433
ret = v4l2_async_register_subdev_sensor(&ov08d10->sd);
drivers/media/i2c/ov08d10.c
1451
media_entity_cleanup(&ov08d10->sd.entity);
drivers/media/i2c/ov08d10.c
1454
v4l2_ctrl_handler_free(ov08d10->sd.ctrl_handler);
drivers/media/i2c/ov08d10.c
521
struct v4l2_subdev sd;
drivers/media/i2c/ov08d10.c
659
struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
drivers/media/i2c/ov08d10.c
679
struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
drivers/media/i2c/ov08d10.c
68
#define to_ov08d10(_sd) container_of(_sd, struct ov08d10, sd)
drivers/media/i2c/ov08d10.c
700
struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
drivers/media/i2c/ov08d10.c
727
struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
drivers/media/i2c/ov08d10.c
770
struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
drivers/media/i2c/ov08d10.c
796
struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
drivers/media/i2c/ov08d10.c
821
struct i2c_client *client = v4l2_get_subdevdata(&ov08d10->sd);
drivers/media/i2c/ov08x40.c
1311
struct v4l2_subdev sd;
drivers/media/i2c/ov08x40.c
1341
#define to_ov08x40(_sd) container_of(_sd, struct ov08x40, sd)
drivers/media/i2c/ov08x40.c
1345
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov08x40.c
1346
struct ov08x40 *ov08x = to_ov08x40(sd);
drivers/media/i2c/ov08x40.c
1381
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov08x40.c
1382
struct ov08x40 *ov08x = to_ov08x40(sd);
drivers/media/i2c/ov08x40.c
1396
struct i2c_client *client = v4l2_get_subdevdata(&ov08x->sd);
drivers/media/i2c/ov08x40.c
1463
struct i2c_client *client = v4l2_get_subdevdata(&ov08x->sd);
drivers/media/i2c/ov08x40.c
1489
struct i2c_client *client = v4l2_get_subdevdata(&ov08x->sd);
drivers/media/i2c/ov08x40.c
1544
static int ov08x40_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ov08x40.c
1547
struct ov08x40 *ov08x = to_ov08x40(sd);
drivers/media/i2c/ov08x40.c
1765
static int ov08x40_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov08x40.c
1778
static int ov08x40_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov08x40.c
1782
struct ov08x40 *ov08x = to_ov08x40(sd);
drivers/media/i2c/ov08x40.c
1831
static int ov08x40_get_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov08x40.c
1835
struct ov08x40 *ov08x = to_ov08x40(sd);
drivers/media/i2c/ov08x40.c
1846
ov08x40_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov08x40.c
1850
struct ov08x40 *ov08x = to_ov08x40(sd);
drivers/media/i2c/ov08x40.c
1970
ret = __v4l2_ctrl_handler_setup(ov08x->sd.ctrl_handler);
drivers/media/i2c/ov08x40.c
2014
static int ov08x40_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov08x40.c
2016
struct ov08x40 *ov08x = to_ov08x40(sd);
drivers/media/i2c/ov08x40.c
2174
ov08x->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/ov08x40.c
2187
v4l2_ctrl_handler_free(ov08x->sd.ctrl_handler);
drivers/media/i2c/ov08x40.c
2294
v4l2_i2c_subdev_init(&ov08x->sd, client, &ov08x40_subdev_ops);
drivers/media/i2c/ov08x40.c
2318
ov08x->sd.internal_ops = &ov08x40_internal_ops;
drivers/media/i2c/ov08x40.c
2319
ov08x->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov08x40.c
2320
ov08x->sd.entity.ops = &ov08x40_subdev_entity_ops;
drivers/media/i2c/ov08x40.c
2321
ov08x->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov08x40.c
2325
ret = media_entity_pads_init(&ov08x->sd.entity, 1, &ov08x->pad);
drivers/media/i2c/ov08x40.c
2331
ret = v4l2_async_register_subdev_sensor(&ov08x->sd);
drivers/media/i2c/ov08x40.c
2343
media_entity_cleanup(&ov08x->sd.entity);
drivers/media/i2c/ov08x40.c
2356
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov08x40.c
2357
struct ov08x40 *ov08x = to_ov08x40(sd);
drivers/media/i2c/ov08x40.c
2359
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov08x40.c
2360
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov13858.c
1035
struct v4l2_subdev sd;
drivers/media/i2c/ov13858.c
1053
#define to_ov13858(_sd) container_of(_sd, struct ov13858, sd)
drivers/media/i2c/ov13858.c
1059
struct i2c_client *client = v4l2_get_subdevdata(&ov13858->sd);
drivers/media/i2c/ov13858.c
1095
struct i2c_client *client = v4l2_get_subdevdata(&ov13858->sd);
drivers/media/i2c/ov13858.c
1150
static int ov13858_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ov13858.c
1152
struct ov13858 *ov13858 = to_ov13858(sd);
drivers/media/i2c/ov13858.c
1276
static int ov13858_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov13858.c
1289
static int ov13858_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov13858.c
1332
static int ov13858_get_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov13858.c
1336
struct ov13858 *ov13858 = to_ov13858(sd);
drivers/media/i2c/ov13858.c
1347
ov13858_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov13858.c
1351
struct ov13858 *ov13858 = to_ov13858(sd);
drivers/media/i2c/ov13858.c
1403
static int ov13858_get_skip_frames(struct v4l2_subdev *sd, u32 *frames)
drivers/media/i2c/ov13858.c
1443
ret = __v4l2_ctrl_handler_setup(ov13858->sd.ctrl_handler);
drivers/media/i2c/ov13858.c
1459
static int ov13858_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov13858.c
1461
struct ov13858 *ov13858 = to_ov13858(sd);
drivers/media/i2c/ov13858.c
1641
ov13858->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/ov13858.c
1654
v4l2_ctrl_handler_free(ov13858->sd.ctrl_handler);
drivers/media/i2c/ov13858.c
1682
v4l2_i2c_subdev_init(&ov13858->sd, client, &ov13858_subdev_ops);
drivers/media/i2c/ov13858.c
1699
ov13858->sd.internal_ops = &ov13858_internal_ops;
drivers/media/i2c/ov13858.c
1700
ov13858->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
drivers/media/i2c/ov13858.c
1702
ov13858->sd.entity.ops = &ov13858_subdev_entity_ops;
drivers/media/i2c/ov13858.c
1703
ov13858->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov13858.c
1707
ret = media_entity_pads_init(&ov13858->sd.entity, 1, &ov13858->pad);
drivers/media/i2c/ov13858.c
1713
ret = v4l2_async_register_subdev_sensor(&ov13858->sd);
drivers/media/i2c/ov13858.c
1728
media_entity_cleanup(&ov13858->sd.entity);
drivers/media/i2c/ov13858.c
1739
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov13858.c
1740
struct ov13858 *ov13858 = to_ov13858(sd);
drivers/media/i2c/ov13858.c
1742
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov13858.c
1743
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov13b10.c
1039
static int ov13b10_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov13b10.c
1052
static int ov13b10_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov13b10.c
1056
struct ov13b10 *ov13b = to_ov13b10(sd);
drivers/media/i2c/ov13b10.c
1098
static int ov13b10_get_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov13b10.c
1102
struct ov13b10 *ov13b = to_ov13b10(sd);
drivers/media/i2c/ov13b10.c
1113
ov13b10_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov13b10.c
1117
struct ov13b10 *ov13b = to_ov13b10(sd);
drivers/media/i2c/ov13b10.c
1193
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov13b10.c
1194
struct ov13b10 *ov13b10 = to_ov13b10(sd);
drivers/media/i2c/ov13b10.c
1208
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov13b10.c
1209
struct ov13b10 *ov13b10 = to_ov13b10(sd);
drivers/media/i2c/ov13b10.c
1269
ret = __v4l2_ctrl_handler_setup(ov13b->sd.ctrl_handler);
drivers/media/i2c/ov13b10.c
1285
static int ov13b10_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov13b10.c
1287
struct ov13b10 *ov13b = to_ov13b10(sd);
drivers/media/i2c/ov13b10.c
1456
ov13b->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/ov13b10.c
1469
v4l2_ctrl_handler_free(ov13b->sd.ctrl_handler);
drivers/media/i2c/ov13b10.c
1603
v4l2_i2c_subdev_init(&ov13b->sd, client, &ov13b10_subdev_ops);
drivers/media/i2c/ov13b10.c
1630
ov13b->sd.internal_ops = &ov13b10_internal_ops;
drivers/media/i2c/ov13b10.c
1631
ov13b->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov13b10.c
1632
ov13b->sd.entity.ops = &ov13b10_subdev_entity_ops;
drivers/media/i2c/ov13b10.c
1633
ov13b->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov13b10.c
1637
ret = media_entity_pads_init(&ov13b->sd.entity, 1, &ov13b->pad);
drivers/media/i2c/ov13b10.c
1654
ret = v4l2_async_register_subdev_sensor(&ov13b->sd);
drivers/media/i2c/ov13b10.c
1664
media_entity_cleanup(&ov13b->sd.entity);
drivers/media/i2c/ov13b10.c
1678
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov13b10.c
1679
struct ov13b10 *ov13b = to_ov13b10(sd);
drivers/media/i2c/ov13b10.c
1681
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov13b10.c
1682
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov13b10.c
705
struct v4l2_subdev sd;
drivers/media/i2c/ov13b10.c
739
#define to_ov13b10(_sd) container_of(_sd, struct ov13b10, sd)
drivers/media/i2c/ov13b10.c
745
struct i2c_client *client = v4l2_get_subdevdata(&ov13b->sd);
drivers/media/i2c/ov13b10.c
781
struct i2c_client *client = v4l2_get_subdevdata(&ov13b->sd);
drivers/media/i2c/ov13b10.c
835
static int ov13b10_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ov13b10.c
837
struct ov13b10 *ov13b = to_ov13b10(sd);
drivers/media/i2c/ov2640.c
1019
static int ov2640_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov2640.c
1030
static int ov2640_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov2640.c
1050
static int ov2640_s_stream(struct v4l2_subdev *sd, int on)
drivers/media/i2c/ov2640.c
1052
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov2640.c
712
struct v4l2_subdev *sd =
drivers/media/i2c/ov2640.c
714
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov2640.c
751
static int ov2640_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/ov2640.c
754
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov2640.c
770
static int ov2640_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/ov2640.c
773
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov2640.c
797
static int ov2640_s_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/ov2640.c
799
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov2640.c
911
static int ov2640_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov2640.c
916
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov2640.c
940
static int ov2640_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov2640.c
945
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov2640.c
999
static int ov2640_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ov2659.c
1002
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov2659.c
1024
static int ov2659_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov2659.c
1028
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov2659.c
1029
struct ov2659 *ov2659 = to_ov2659(sd);
drivers/media/i2c/ov2659.c
1082
static int ov2659_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov2659.c
1086
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov2659.c
1090
struct ov2659 *ov2659 = to_ov2659(sd);
drivers/media/i2c/ov2659.c
1161
static int ov2659_s_stream(struct v4l2_subdev *sd, int on)
drivers/media/i2c/ov2659.c
1163
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov2659.c
1164
struct ov2659 *ov2659 = to_ov2659(sd);
drivers/media/i2c/ov2659.c
1188
ret = ov2659_init(sd, 0);
drivers/media/i2c/ov2659.c
1207
struct i2c_client *client = v4l2_get_subdevdata(&ov2659->sd);
drivers/media/i2c/ov2659.c
1259
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov2659.c
1260
struct ov2659 *ov2659 = to_ov2659(sd);
drivers/media/i2c/ov2659.c
1274
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov2659.c
1275
struct ov2659 *ov2659 = to_ov2659(sd);
drivers/media/i2c/ov2659.c
1303
static int ov2659_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ov2659.c
1305
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov2659.c
1343
static int ov2659_detect(struct v4l2_subdev *sd)
drivers/media/i2c/ov2659.c
1345
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov2659.c
1424
struct v4l2_subdev *sd;
drivers/media/i2c/ov2659.c
1481
ov2659->sd.ctrl_handler = &ov2659->ctrls;
drivers/media/i2c/ov2659.c
1482
sd = &ov2659->sd;
drivers/media/i2c/ov2659.c
1485
v4l2_i2c_subdev_init(sd, client, &ov2659_subdev_ops);
drivers/media/i2c/ov2659.c
1486
sd->internal_ops = &ov2659_subdev_internal_ops;
drivers/media/i2c/ov2659.c
1487
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
drivers/media/i2c/ov2659.c
1491
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov2659.c
1492
ret = media_entity_pads_init(&sd->entity, 1, &ov2659->pad);
drivers/media/i2c/ov2659.c
1508
ret = ov2659_detect(sd);
drivers/media/i2c/ov2659.c
1515
ret = v4l2_async_register_subdev(&ov2659->sd);
drivers/media/i2c/ov2659.c
1519
dev_info(&client->dev, "%s sensor driver registered !!\n", sd->name);
drivers/media/i2c/ov2659.c
1530
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov2659.c
1537
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov2659.c
1538
struct ov2659 *ov2659 = to_ov2659(sd);
drivers/media/i2c/ov2659.c
1541
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov2659.c
1542
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov2659.c
198
struct v4l2_subdev sd;
drivers/media/i2c/ov2659.c
817
static inline struct ov2659 *to_ov2659(struct v4l2_subdev *sd)
drivers/media/i2c/ov2659.c
819
return container_of(sd, struct ov2659, sd);
drivers/media/i2c/ov2659.c
971
static int ov2659_init(struct v4l2_subdev *sd, u32 val)
drivers/media/i2c/ov2659.c
973
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov2659.c
982
static int ov2659_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov2659.c
986
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov2659.c
998
static int ov2659_enum_frame_sizes(struct v4l2_subdev *sd,
drivers/media/i2c/ov2680.c
1024
sensor->sd.ctrl_handler = hdl;
drivers/media/i2c/ov2680.c
1026
ret = v4l2_async_register_subdev(&sensor->sd);
drivers/media/i2c/ov2680.c
1033
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/ov2680.c
1241
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov2680.c
1242
struct ov2680_dev *sensor = to_ov2680_dev(sd);
drivers/media/i2c/ov2680.c
1244
v4l2_async_unregister_subdev(&sensor->sd);
drivers/media/i2c/ov2680.c
1246
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/ov2680.c
1261
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov2680.c
1262
struct ov2680_dev *sensor = to_ov2680_dev(sd);
drivers/media/i2c/ov2680.c
1272
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov2680.c
1273
struct ov2680_dev *sensor = to_ov2680_dev(sd);
drivers/media/i2c/ov2680.c
152
struct v4l2_subdev sd;
drivers/media/i2c/ov2680.c
261
static struct ov2680_dev *to_ov2680_dev(struct v4l2_subdev *sd)
drivers/media/i2c/ov2680.c
263
return container_of(sd, struct ov2680_dev, sd);
drivers/media/i2c/ov2680.c
269
ctrls.handler)->sd;
drivers/media/i2c/ov2680.c
558
static int ov2680_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/ov2680.c
562
struct ov2680_dev *sensor = to_ov2680_dev(sd);
drivers/media/i2c/ov2680.c
578
static int ov2680_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov2680.c
580
struct ov2680_dev *sensor = to_ov2680_dev(sd);
drivers/media/i2c/ov2680.c
589
ret = pm_runtime_resume_and_get(sensor->sd.dev);
drivers/media/i2c/ov2680.c
595
pm_runtime_put(sensor->sd.dev);
drivers/media/i2c/ov2680.c
600
pm_runtime_put(sensor->sd.dev);
drivers/media/i2c/ov2680.c
611
static int ov2680_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov2680.c
615
struct ov2680_dev *sensor = to_ov2680_dev(sd);
drivers/media/i2c/ov2680.c
625
static int ov2680_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov2680.c
629
struct ov2680_dev *sensor = to_ov2680_dev(sd);
drivers/media/i2c/ov2680.c
642
static int ov2680_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov2680.c
646
struct ov2680_dev *sensor = to_ov2680_dev(sd);
drivers/media/i2c/ov2680.c
706
static int ov2680_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov2680.c
710
struct ov2680_dev *sensor = to_ov2680_dev(sd);
drivers/media/i2c/ov2680.c
736
static int ov2680_set_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov2680.c
740
struct ov2680_dev *sensor = to_ov2680_dev(sd);
drivers/media/i2c/ov2680.c
790
static int ov2680_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ov2680.c
793
struct ov2680_dev *sensor = to_ov2680_dev(sd);
drivers/media/i2c/ov2680.c
802
static int ov2680_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov2680.c
806
struct ov2680_dev *sensor = to_ov2680_dev(sd);
drivers/media/i2c/ov2680.c
824
static bool ov2680_valid_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov2680.c
837
if (ov2680_enum_frame_size(sd, sd_state, &fse))
drivers/media/i2c/ov2680.c
848
static int ov2680_enum_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/ov2680.c
852
struct ov2680_dev *sensor = to_ov2680_dev(sd);
drivers/media/i2c/ov2680.c
855
if (fie->index || !ov2680_valid_frame_size(sd, sd_state, fie))
drivers/media/i2c/ov2680.c
865
struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
drivers/media/i2c/ov2680.c
866
struct ov2680_dev *sensor = to_ov2680_dev(sd);
drivers/media/i2c/ov2680.c
877
if (!pm_runtime_get_if_in_use(sensor->sd.dev)) {
drivers/media/i2c/ov2680.c
907
pm_runtime_put(sensor->sd.dev);
drivers/media/i2c/ov2680.c
963
v4l2_i2c_subdev_init(&sensor->sd, client, &ov2680_subdev_ops);
drivers/media/i2c/ov2680.c
964
sensor->sd.internal_ops = &ov2680_internal_ops;
drivers/media/i2c/ov2680.c
966
sensor->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov2680.c
968
sensor->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov2680.c
970
ret = media_entity_pads_init(&sensor->sd.entity, 1, &sensor->pad);
drivers/media/i2c/ov2685.c
107
#define to_ov2685(sd) container_of(sd, struct ov2685, subdev)
drivers/media/i2c/ov2685.c
342
static int ov2685_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov2685.c
346
struct ov2685 *ov2685 = to_ov2685(sd);
drivers/media/i2c/ov2685.c
355
static int ov2685_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov2685.c
359
struct ov2685 *ov2685 = to_ov2685(sd);
drivers/media/i2c/ov2685.c
367
static int ov2685_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov2685.c
379
static int ov2685_enum_frame_sizes(struct v4l2_subdev *sd,
drivers/media/i2c/ov2685.c
415
static int ov2685_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov2685.c
419
struct ov2685 *ov2685 = to_ov2685(sd);
drivers/media/i2c/ov2685.c
507
static int ov2685_s_stream(struct v4l2_subdev *sd, int on)
drivers/media/i2c/ov2685.c
509
struct ov2685 *ov2685 = to_ov2685(sd);
drivers/media/i2c/ov2685.c
543
static int ov2685_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ov2685.c
545
struct ov2685 *ov2685 = to_ov2685(sd);
drivers/media/i2c/ov2685.c
561
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov2685.c
562
struct ov2685 *ov2685 = to_ov2685(sd);
drivers/media/i2c/ov2685.c
569
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov2685.c
570
struct ov2685 *ov2685 = to_ov2685(sd);
drivers/media/i2c/ov2685.c
855
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov2685.c
856
struct ov2685 *ov2685 = to_ov2685(sd);
drivers/media/i2c/ov2685.c
858
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov2685.c
859
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov2735.c
1020
ov2735->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov2735.c
1021
ov2735->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov2735.c
1024
ret = media_entity_pads_init(&ov2735->sd.entity, 1, &ov2735->pad);
drivers/media/i2c/ov2735.c
1030
ov2735->sd.state_lock = ov2735->handler.lock;
drivers/media/i2c/ov2735.c
1031
ret = v4l2_subdev_init_finalize(&ov2735->sd);
drivers/media/i2c/ov2735.c
1051
ret = v4l2_async_register_subdev_sensor(&ov2735->sd);
drivers/media/i2c/ov2735.c
1061
v4l2_subdev_cleanup(&ov2735->sd);
drivers/media/i2c/ov2735.c
1064
media_entity_cleanup(&ov2735->sd.entity);
drivers/media/i2c/ov2735.c
1067
v4l2_ctrl_handler_free(ov2735->sd.ctrl_handler);
drivers/media/i2c/ov2735.c
1077
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov2735.c
1078
struct ov2735 *ov2735 = to_ov2735(sd);
drivers/media/i2c/ov2735.c
1080
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov2735.c
1081
v4l2_subdev_cleanup(&ov2735->sd);
drivers/media/i2c/ov2735.c
1082
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov2735.c
1083
v4l2_ctrl_handler_free(ov2735->sd.ctrl_handler);
drivers/media/i2c/ov2735.c
201
struct v4l2_subdev sd;
drivers/media/i2c/ov2735.c
405
return container_of_const(_sd, struct ov2735, sd);
drivers/media/i2c/ov2735.c
438
state = v4l2_subdev_get_locked_active_state(&ov2735->sd);
drivers/media/i2c/ov2735.c
558
ov2735->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/ov2735.c
610
static int ov2735_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ov2735.c
614
struct ov2735 *ov2735 = to_ov2735(sd);
drivers/media/i2c/ov2735.c
643
ret = __v4l2_ctrl_handler_setup(ov2735->sd.ctrl_handler);
drivers/media/i2c/ov2735.c
659
static int ov2735_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ov2735.c
663
struct ov2735 *ov2735 = to_ov2735(sd);
drivers/media/i2c/ov2735.c
676
static int ov2735_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov2735.c
696
static int ov2735_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov2735.c
708
static int ov2735_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov2735.c
744
static int ov2735_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov2735.c
751
struct ov2735 *ov2735 = to_ov2735(sd);
drivers/media/i2c/ov2735.c
783
static int ov2735_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ov2735.c
795
ov2735_set_pad_format(sd, state, &fmt);
drivers/media/i2c/ov2735.c
825
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov2735.c
826
struct ov2735 *ov2735 = to_ov2735(sd);
drivers/media/i2c/ov2735.c
859
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov2735.c
860
struct ov2735 *ov2735 = to_ov2735(sd);
drivers/media/i2c/ov2735.c
957
v4l2_i2c_subdev_init(&ov2735->sd, client, &ov2735_subdev_ops);
drivers/media/i2c/ov2735.c
958
ov2735->sd.internal_ops = &ov2735_internal_ops;
drivers/media/i2c/ov2740.c
1001
sd_state = v4l2_subdev_lock_and_get_active_state(&ov2740->sd);
drivers/media/i2c/ov2740.c
1025
static int ov2740_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov2740.c
1029
struct ov2740 *ov2740 = to_ov2740(sd);
drivers/media/i2c/ov2740.c
1061
static int ov2740_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov2740.c
1073
static int ov2740_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov2740.c
1077
struct ov2740 *ov2740 = to_ov2740(sd);
drivers/media/i2c/ov2740.c
1094
static int ov2740_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ov2740.c
1097
struct ov2740 *ov2740 = to_ov2740(sd);
drivers/media/i2c/ov2740.c
1203
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov2740.c
1205
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov2740.c
1206
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov2740.c
1207
v4l2_subdev_cleanup(sd);
drivers/media/i2c/ov2740.c
1208
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/ov2740.c
1222
sd_state = v4l2_subdev_lock_and_get_active_state(&ov2740->sd);
drivers/media/i2c/ov2740.c
1290
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov2740.c
1291
struct ov2740 *ov2740 = to_ov2740(sd);
drivers/media/i2c/ov2740.c
1303
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov2740.c
1304
struct ov2740 *ov2740 = to_ov2740(sd);
drivers/media/i2c/ov2740.c
1341
v4l2_i2c_subdev_init(&ov2740->sd, client, &ov2740_subdev_ops);
drivers/media/i2c/ov2740.c
1342
ov2740->sd.internal_ops = &ov2740_internal_ops;
drivers/media/i2c/ov2740.c
1408
ov2740->sd.state_lock = ov2740->ctrl_handler.lock;
drivers/media/i2c/ov2740.c
1409
ov2740->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov2740.c
1410
ov2740->sd.entity.ops = &ov2740_subdev_entity_ops;
drivers/media/i2c/ov2740.c
1411
ov2740->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov2740.c
1413
ret = media_entity_pads_init(&ov2740->sd.entity, 1, &ov2740->pad);
drivers/media/i2c/ov2740.c
1419
ret = v4l2_subdev_init_finalize(&ov2740->sd);
drivers/media/i2c/ov2740.c
1429
ret = v4l2_async_register_subdev_sensor(&ov2740->sd);
drivers/media/i2c/ov2740.c
1444
v4l2_subdev_cleanup(&ov2740->sd);
drivers/media/i2c/ov2740.c
1447
media_entity_cleanup(&ov2740->sd.entity);
drivers/media/i2c/ov2740.c
1450
v4l2_ctrl_handler_free(ov2740->sd.ctrl_handler);
drivers/media/i2c/ov2740.c
524
struct v4l2_subdev sd;
drivers/media/i2c/ov2740.c
557
return container_of(subdev, struct ov2740, sd);
drivers/media/i2c/ov2740.c
571
struct i2c_client *client = v4l2_get_subdevdata(&ov2740->sd);
drivers/media/i2c/ov2740.c
601
struct i2c_client *client = v4l2_get_subdevdata(&ov2740->sd);
drivers/media/i2c/ov2740.c
835
ov2740->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/ov2740.c
976
ret = __v4l2_ctrl_handler_setup(ov2740->sd.ctrl_handler);
drivers/media/i2c/ov2740.c
995
static int ov2740_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov2740.c
997
struct ov2740 *ov2740 = to_ov2740(sd);
drivers/media/i2c/ov4689.c
1001
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov4689.c
1012
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov4689.c
1013
struct ov4689 *ov4689 = to_ov4689(sd);
drivers/media/i2c/ov4689.c
1015
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov4689.c
1016
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov4689.c
1017
v4l2_subdev_cleanup(sd);
drivers/media/i2c/ov4689.c
142
#define to_ov4689(sd) container_of(sd, struct ov4689, subdev)
drivers/media/i2c/ov4689.c
332
static int ov4689_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov4689.c
337
struct ov4689 *ov4689 = to_ov4689(sd);
drivers/media/i2c/ov4689.c
345
static int ov4689_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov4689.c
356
static int ov4689_enum_frame_sizes(struct v4l2_subdev *sd,
drivers/media/i2c/ov4689.c
387
static int ov4689_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov4689.c
450
static int ov4689_s_stream(struct v4l2_subdev *sd, int on)
drivers/media/i2c/ov4689.c
452
struct ov4689 *ov4689 = to_ov4689(sd);
drivers/media/i2c/ov4689.c
518
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov4689.c
519
struct ov4689 *ov4689 = to_ov4689(sd);
drivers/media/i2c/ov4689.c
556
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov4689.c
557
struct ov4689 *ov4689 = to_ov4689(sd);
drivers/media/i2c/ov4689.c
567
static int ov4689_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ov4689.c
894
struct v4l2_subdev *sd;
drivers/media/i2c/ov4689.c
948
sd = &ov4689->subdev;
drivers/media/i2c/ov4689.c
949
v4l2_i2c_subdev_init(sd, client, &ov4689_subdev_ops);
drivers/media/i2c/ov4689.c
950
sd->internal_ops = &ov4689_internal_ops;
drivers/media/i2c/ov4689.c
951
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov4689.c
967
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov4689.c
969
ret = media_entity_pads_init(&sd->entity, 1, &ov4689->pad);
drivers/media/i2c/ov4689.c
973
sd->state_lock = ov4689->ctrl_handler.lock;
drivers/media/i2c/ov4689.c
974
ret = v4l2_subdev_init_finalize(sd);
drivers/media/i2c/ov4689.c
986
ret = v4l2_async_register_subdev_sensor(sd);
drivers/media/i2c/ov4689.c
999
v4l2_subdev_cleanup(sd);
drivers/media/i2c/ov5640.c
2732
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov5640.c
2733
struct ov5640_dev *ov5640 = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
2740
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov5640.c
2741
struct ov5640_dev *ov5640 = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
2788
static int ov5640_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov5640.c
2792
struct ov5640_dev *sensor = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
2812
static int ov5640_try_fmt_internal(struct v4l2_subdev *sd,
drivers/media/i2c/ov5640.c
2816
struct ov5640_dev *sensor = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
2950
static int ov5640_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov5640.c
2954
struct ov5640_dev *sensor = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
2969
ret = ov5640_try_fmt_internal(sd, mbus_fmt, &new_mode);
drivers/media/i2c/ov5640.c
2996
static int ov5640_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov5640.c
3000
struct ov5640_dev *sensor = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
3320
struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
drivers/media/i2c/ov5640.c
3321
struct ov5640_dev *sensor = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
3351
struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
drivers/media/i2c/ov5640.c
3352
struct ov5640_dev *sensor = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
3536
sensor->sd.ctrl_handler = hdl;
drivers/media/i2c/ov5640.c
3544
static int ov5640_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov5640.c
3548
struct ov5640_dev *sensor = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
3577
struct v4l2_subdev *sd,
drivers/media/i2c/ov5640.c
3581
struct ov5640_dev *sensor = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
3606
static int ov5640_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/ov5640.c
3610
struct ov5640_dev *sensor = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
3626
static int ov5640_set_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/ov5640.c
3630
struct ov5640_dev *sensor = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
3685
static int ov5640_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov5640.c
3689
struct ov5640_dev *sensor = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
3709
static int ov5640_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov5640.c
3711
struct ov5640_dev *sensor = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
3761
static int ov5640_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ov5640.c
3764
struct ov5640_dev *sensor = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
3923
v4l2_i2c_subdev_init(&sensor->sd, client, &ov5640_subdev_ops);
drivers/media/i2c/ov5640.c
3924
sensor->sd.internal_ops = &ov5640_internal_ops;
drivers/media/i2c/ov5640.c
3926
sensor->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
drivers/media/i2c/ov5640.c
3929
sensor->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov5640.c
3930
ret = media_entity_pads_init(&sensor->sd.entity, 1, &sensor->pad);
drivers/media/i2c/ov5640.c
3958
ret = v4l2_async_register_subdev_sensor(&sensor->sd);
drivers/media/i2c/ov5640.c
3975
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/ov5640.c
3982
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov5640.c
3983
struct ov5640_dev *sensor = to_ov5640_dev(sd);
drivers/media/i2c/ov5640.c
3991
v4l2_async_unregister_subdev(&sensor->sd);
drivers/media/i2c/ov5640.c
3992
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/ov5640.c
438
struct v4l2_subdev sd;
drivers/media/i2c/ov5640.c
470
static inline struct ov5640_dev *to_ov5640_dev(struct v4l2_subdev *sd)
drivers/media/i2c/ov5640.c
472
return container_of(sd, struct ov5640_dev, sd);
drivers/media/i2c/ov5640.c
478
ctrls.handler)->sd;
drivers/media/i2c/ov5645.c
1105
ov5645->sd.ctrl_handler = &ov5645->ctrls;
drivers/media/i2c/ov5645.c
111
static inline struct ov5645 *to_ov5645(struct v4l2_subdev *sd)
drivers/media/i2c/ov5645.c
1113
v4l2_i2c_subdev_init(&ov5645->sd, client, &ov5645_subdev_ops);
drivers/media/i2c/ov5645.c
1114
ov5645->sd.internal_ops = &ov5645_internal_ops;
drivers/media/i2c/ov5645.c
1115
ov5645->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov5645.c
1117
ov5645->sd.dev = dev;
drivers/media/i2c/ov5645.c
1118
ov5645->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov5645.c
1120
ret = media_entity_pads_init(&ov5645->sd.entity, 1, &ov5645->pad);
drivers/media/i2c/ov5645.c
113
return container_of(sd, struct ov5645, sd);
drivers/media/i2c/ov5645.c
1169
ov5645->sd.state_lock = ov5645->ctrls.lock;
drivers/media/i2c/ov5645.c
1170
ret = v4l2_subdev_init_finalize(&ov5645->sd);
drivers/media/i2c/ov5645.c
1180
ret = v4l2_async_register_subdev_sensor(&ov5645->sd);
drivers/media/i2c/ov5645.c
1195
v4l2_subdev_cleanup(&ov5645->sd);
drivers/media/i2c/ov5645.c
1199
media_entity_cleanup(&ov5645->sd.entity);
drivers/media/i2c/ov5645.c
1208
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov5645.c
1209
struct ov5645 *ov5645 = to_ov5645(sd);
drivers/media/i2c/ov5645.c
1211
v4l2_async_unregister_subdev(&ov5645->sd);
drivers/media/i2c/ov5645.c
1212
v4l2_subdev_cleanup(sd);
drivers/media/i2c/ov5645.c
1213
media_entity_cleanup(&ov5645->sd.entity);
drivers/media/i2c/ov5645.c
637
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov5645.c
638
struct ov5645 *ov5645 = to_ov5645(sd);
drivers/media/i2c/ov5645.c
648
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov5645.c
649
struct ov5645 *ov5645 = to_ov5645(sd);
drivers/media/i2c/ov5645.c
659
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov5645.c
660
struct ov5645 *ov5645 = to_ov5645(sd);
drivers/media/i2c/ov5645.c
820
static int ov5645_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov5645.c
850
static int ov5645_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov5645.c
854
struct ov5645 *ov5645 = to_ov5645(sd);
drivers/media/i2c/ov5645.c
88
struct v4l2_subdev sd;
drivers/media/i2c/ov5645.c
913
static int ov5645_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov5645.c
924
static int ov5645_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ov5645.c
928
struct ov5645 *ov5645 = to_ov5645(sd);
drivers/media/i2c/ov5645.c
966
static int ov5645_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ov5645.c
970
struct ov5645 *ov5645 = to_ov5645(sd);
drivers/media/i2c/ov5647.c
1044
struct i2c_client *client = v4l2_get_subdevdata(&sensor->sd);
drivers/media/i2c/ov5647.c
1121
sensor->sd.ctrl_handler = &sensor->ctrls;
drivers/media/i2c/ov5647.c
1160
struct v4l2_subdev *sd;
drivers/media/i2c/ov5647.c
118
struct v4l2_subdev sd;
drivers/media/i2c/ov5647.c
1200
sd = &sensor->sd;
drivers/media/i2c/ov5647.c
1201
v4l2_i2c_subdev_init(sd, client, &ov5647_subdev_ops);
drivers/media/i2c/ov5647.c
1202
sd->internal_ops = &ov5647_subdev_internal_ops;
drivers/media/i2c/ov5647.c
1203
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/i2c/ov5647.c
1210
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov5647.c
1211
ret = media_entity_pads_init(&sd->entity, 1, &sensor->pad);
drivers/media/i2c/ov5647.c
1226
ret = ov5647_detect(sd);
drivers/media/i2c/ov5647.c
1230
sd->state_lock = sensor->ctrls.lock;
drivers/media/i2c/ov5647.c
1231
ret = v4l2_subdev_init_finalize(sd);
drivers/media/i2c/ov5647.c
1241
ret = v4l2_async_register_subdev_sensor(sd);
drivers/media/i2c/ov5647.c
1252
v4l2_subdev_cleanup(sd);
drivers/media/i2c/ov5647.c
1256
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov5647.c
1265
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov5647.c
1266
struct ov5647 *sensor = to_sensor(sd);
drivers/media/i2c/ov5647.c
1268
v4l2_async_unregister_subdev(&sensor->sd);
drivers/media/i2c/ov5647.c
1269
v4l2_subdev_cleanup(sd);
drivers/media/i2c/ov5647.c
1270
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/ov5647.c
1272
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/ov5647.c
136
static inline struct ov5647 *to_sensor(struct v4l2_subdev *sd)
drivers/media/i2c/ov5647.c
138
return container_of(sd, struct ov5647, sd);
drivers/media/i2c/ov5647.c
460
static int ov5647_set_virtual_channel(struct v4l2_subdev *sd, int channel)
drivers/media/i2c/ov5647.c
462
struct ov5647 *sensor = to_sensor(sd);
drivers/media/i2c/ov5647.c
470
static int ov5647_set_mode(struct v4l2_subdev *sd)
drivers/media/i2c/ov5647.c
472
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov5647.c
473
struct ov5647 *sensor = to_sensor(sd);
drivers/media/i2c/ov5647.c
495
ret = ov5647_set_virtual_channel(sd, 0);
drivers/media/i2c/ov5647.c
526
static int ov5647_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ov5647.c
530
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov5647.c
531
struct ov5647 *sensor = to_sensor(sd);
drivers/media/i2c/ov5647.c
539
ret = ov5647_set_mode(sd);
drivers/media/i2c/ov5647.c
546
ret = __v4l2_ctrl_handler_setup(sd->ctrl_handler);
drivers/media/i2c/ov5647.c
565
static int ov5647_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ov5647.c
569
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov5647.c
570
struct ov5647 *sensor = to_sensor(sd);
drivers/media/i2c/ov5647.c
658
static int ov5647_sensor_get_register(struct v4l2_subdev *sd,
drivers/media/i2c/ov5647.c
661
struct ov5647 *sensor = to_sensor(sd);
drivers/media/i2c/ov5647.c
675
static int ov5647_sensor_set_register(struct v4l2_subdev *sd,
drivers/media/i2c/ov5647.c
678
struct ov5647 *sensor = to_sensor(sd);
drivers/media/i2c/ov5647.c
717
static u32 ov5647_get_mbus_code(struct v4l2_subdev *sd)
drivers/media/i2c/ov5647.c
719
struct ov5647 *sensor = to_sensor(sd);
drivers/media/i2c/ov5647.c
733
static int ov5647_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov5647.c
740
code->code = ov5647_get_mbus_code(sd);
drivers/media/i2c/ov5647.c
745
static int ov5647_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov5647.c
751
if (fse->code != ov5647_get_mbus_code(sd) ||
drivers/media/i2c/ov5647.c
764
static int ov5647_get_pad_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov5647.c
770
struct ov5647 *sensor = to_sensor(sd);
drivers/media/i2c/ov5647.c
784
fmt->code = ov5647_get_mbus_code(sd);
drivers/media/i2c/ov5647.c
789
static int ov5647_set_pad_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov5647.c
794
struct ov5647 *sensor = to_sensor(sd);
drivers/media/i2c/ov5647.c
834
fmt->code = ov5647_get_mbus_code(sd);
drivers/media/i2c/ov5647.c
839
static int ov5647_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov5647.c
845
struct ov5647 *sensor = to_sensor(sd);
drivers/media/i2c/ov5647.c
890
static int ov5647_detect(struct v4l2_subdev *sd)
drivers/media/i2c/ov5647.c
892
struct ov5647 *sensor = to_sensor(sd);
drivers/media/i2c/ov5647.c
893
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov5647.c
915
static int ov5647_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ov5647.c
939
struct v4l2_subdev *sd = &sensor->sd;
drivers/media/i2c/ov5647.c
940
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov5670.c
1860
struct v4l2_subdev sd;
drivers/media/i2c/ov5670.c
1892
#define to_ov5670(_sd) container_of(_sd, struct ov5670, sd)
drivers/media/i2c/ov5670.c
1898
struct i2c_client *client = v4l2_get_subdevdata(&ov5670->sd);
drivers/media/i2c/ov5670.c
1934
struct i2c_client *client = v4l2_get_subdevdata(&ov5670->sd);
drivers/media/i2c/ov5670.c
2189
ov5670->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/ov5670.c
2199
static int ov5670_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ov5670.c
2221
static int ov5670_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov5670.c
2234
static int ov5670_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov5670.c
2274
static int ov5670_get_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov5670.c
2278
struct ov5670 *ov5670 = to_ov5670(sd);
drivers/media/i2c/ov5670.c
2288
static int ov5670_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov5670.c
2292
struct ov5670 *ov5670 = to_ov5670(sd);
drivers/media/i2c/ov5670.c
2343
static int ov5670_get_skip_frames(struct v4l2_subdev *sd, u32 *frames)
drivers/media/i2c/ov5670.c
2431
ret = __v4l2_ctrl_handler_setup(ov5670->sd.ctrl_handler);
drivers/media/i2c/ov5670.c
2461
static int ov5670_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov5670.c
2463
struct ov5670 *ov5670 = to_ov5670(sd);
drivers/media/i2c/ov5670.c
2494
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov5670.c
2495
struct ov5670 *ov5670 = to_ov5670(sd);
drivers/media/i2c/ov5670.c
2523
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov5670.c
2524
struct ov5670 *ov5670 = to_ov5670(sd);
drivers/media/i2c/ov5670.c
2671
v4l2_i2c_subdev_init(&ov5670->sd, client, &ov5670_subdev_ops);
drivers/media/i2c/ov5670.c
2672
ov5670->sd.internal_ops = &ov5670_internal_ops;
drivers/media/i2c/ov5670.c
2727
ov5670->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
drivers/media/i2c/ov5670.c
2729
ov5670->sd.entity.ops = &ov5670_subdev_entity_ops;
drivers/media/i2c/ov5670.c
2730
ov5670->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov5670.c
2734
ret = media_entity_pads_init(&ov5670->sd.entity, 1, &ov5670->pad);
drivers/media/i2c/ov5670.c
2746
ret = v4l2_async_register_subdev_sensor(&ov5670->sd);
drivers/media/i2c/ov5670.c
2759
media_entity_cleanup(&ov5670->sd.entity);
drivers/media/i2c/ov5670.c
2762
v4l2_ctrl_handler_free(ov5670->sd.ctrl_handler);
drivers/media/i2c/ov5670.c
2779
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov5670.c
2780
struct ov5670 *ov5670 = to_ov5670(sd);
drivers/media/i2c/ov5670.c
2782
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov5670.c
2783
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov5670.c
2784
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/ov5675.c
1018
static int ov5675_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov5675.c
1022
struct ov5675 *ov5675 = to_ov5675(sd);
drivers/media/i2c/ov5675.c
1059
static int ov5675_get_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov5675.c
1063
struct ov5675 *ov5675 = to_ov5675(sd);
drivers/media/i2c/ov5675.c
1077
static int ov5675_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov5675.c
1102
static int ov5675_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov5675.c
1114
static int ov5675_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov5675.c
1132
static int ov5675_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ov5675.c
1134
struct ov5675 *ov5675 = to_ov5675(sd);
drivers/media/i2c/ov5675.c
1258
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov5675.c
1259
struct ov5675 *ov5675 = to_ov5675(sd);
drivers/media/i2c/ov5675.c
1261
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov5675.c
1262
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov5675.c
1263
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/ov5675.c
1288
v4l2_i2c_subdev_init(&ov5675->sd, client, &ov5675_subdev_ops);
drivers/media/i2c/ov5675.c
1313
ov5675->sd.internal_ops = &ov5675_internal_ops;
drivers/media/i2c/ov5675.c
1314
ov5675->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov5675.c
1315
ov5675->sd.entity.ops = &ov5675_subdev_entity_ops;
drivers/media/i2c/ov5675.c
1316
ov5675->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov5675.c
1318
ret = media_entity_pads_init(&ov5675->sd.entity, 1, &ov5675->pad);
drivers/media/i2c/ov5675.c
1324
ret = v4l2_async_register_subdev_sensor(&ov5675->sd);
drivers/media/i2c/ov5675.c
1340
media_entity_cleanup(&ov5675->sd.entity);
drivers/media/i2c/ov5675.c
1343
v4l2_ctrl_handler_free(ov5675->sd.ctrl_handler);
drivers/media/i2c/ov5675.c
499
struct v4l2_subdev sd;
drivers/media/i2c/ov5675.c
543
struct i2c_client *client = v4l2_get_subdevdata(&ov5675->sd);
drivers/media/i2c/ov5675.c
573
struct i2c_client *client = v4l2_get_subdevdata(&ov5675->sd);
drivers/media/i2c/ov5675.c
82
#define to_ov5675(_sd) container_of(_sd, struct ov5675, sd)
drivers/media/i2c/ov5675.c
851
ov5675->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/ov5675.c
918
ret = __v4l2_ctrl_handler_setup(ov5675->sd.ctrl_handler);
drivers/media/i2c/ov5675.c
939
static int ov5675_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov5675.c
941
struct ov5675 *ov5675 = to_ov5675(sd);
drivers/media/i2c/ov5675.c
970
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov5675.c
971
struct ov5675 *ov5675 = to_ov5675(sd);
drivers/media/i2c/ov5675.c
984
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov5675.c
985
struct ov5675 *ov5675 = to_ov5675(sd);
drivers/media/i2c/ov5693.c
1004
static int ov5693_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/ov5693.c
1008
struct ov5693_device *ov5693 = to_ov5693_sensor(sd);
drivers/media/i2c/ov5693.c
1026
static int ov5693_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov5693.c
1038
static int ov5693_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov5693.c
1042
struct ov5693_device *ov5693 = to_ov5693_sensor(sd);
drivers/media/i2c/ov5693.c
1176
ov5693->sd.ctrl_handler = &ctrls->handler;
drivers/media/i2c/ov5693.c
125
#define to_ov5693_sensor(x) container_of(x, struct ov5693_device, sd)
drivers/media/i2c/ov5693.c
1290
v4l2_i2c_subdev_init(&ov5693->sd, client, &ov5693_ops);
drivers/media/i2c/ov5693.c
1312
ov5693->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov5693.c
1314
ov5693->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov5693.c
1324
ret = media_entity_pads_init(&ov5693->sd.entity, 1, &ov5693->pad);
drivers/media/i2c/ov5693.c
1347
ret = v4l2_async_register_subdev_sensor(&ov5693->sd);
drivers/media/i2c/ov5693.c
1366
media_entity_cleanup(&ov5693->sd.entity);
drivers/media/i2c/ov5693.c
1375
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov5693.c
1376
struct ov5693_device *ov5693 = to_ov5693_sensor(sd);
drivers/media/i2c/ov5693.c
1378
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov5693.c
1379
media_entity_cleanup(&ov5693->sd.entity);
drivers/media/i2c/ov5693.c
157
struct v4l2_subdev sd;
drivers/media/i2c/ov5693.c
700
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov5693.c
701
struct ov5693_device *ov5693 = to_ov5693_sensor(sd);
drivers/media/i2c/ov5693.c
710
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov5693.c
711
struct ov5693_device *ov5693 = to_ov5693_sensor(sd);
drivers/media/i2c/ov5693.c
798
static int ov5693_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov5693.c
802
struct ov5693_device *ov5693 = to_ov5693_sensor(sd);
drivers/media/i2c/ov5693.c
809
static int ov5693_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov5693.c
813
struct ov5693_device *ov5693 = to_ov5693_sensor(sd);
drivers/media/i2c/ov5693.c
884
static int ov5693_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov5693.c
888
struct ov5693_device *ov5693 = to_ov5693_sensor(sd);
drivers/media/i2c/ov5693.c
917
static int ov5693_set_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov5693.c
921
struct ov5693_device *ov5693 = to_ov5693_sensor(sd);
drivers/media/i2c/ov5693.c
968
static int ov5693_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov5693.c
970
struct ov5693_device *ov5693 = to_ov5693_sensor(sd);
drivers/media/i2c/ov5695.c
1022
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov5695.c
1023
struct ov5695 *ov5695 = to_ov5695(sd);
drivers/media/i2c/ov5695.c
1030
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov5695.c
1031
struct ov5695 *ov5695 = to_ov5695(sd);
drivers/media/i2c/ov5695.c
1038
static int ov5695_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ov5695.c
1040
struct ov5695 *ov5695 = to_ov5695(sd);
drivers/media/i2c/ov5695.c
114
#define to_ov5695(sd) container_of(sd, struct ov5695, subdev)
drivers/media/i2c/ov5695.c
1257
struct v4l2_subdev *sd;
drivers/media/i2c/ov5695.c
1290
sd = &ov5695->subdev;
drivers/media/i2c/ov5695.c
1291
v4l2_i2c_subdev_init(sd, client, &ov5695_subdev_ops);
drivers/media/i2c/ov5695.c
1304
sd->internal_ops = &ov5695_internal_ops;
drivers/media/i2c/ov5695.c
1305
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov5695.c
1307
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov5695.c
1308
ret = media_entity_pads_init(&sd->entity, 1, &ov5695->pad);
drivers/media/i2c/ov5695.c
1312
ret = v4l2_async_register_subdev_sensor(sd);
drivers/media/i2c/ov5695.c
1325
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov5695.c
1338
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov5695.c
1339
struct ov5695 *ov5695 = to_ov5695(sd);
drivers/media/i2c/ov5695.c
1341
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov5695.c
1342
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov5695.c
807
static int ov5695_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov5695.c
811
struct ov5695 *ov5695 = to_ov5695(sd);
drivers/media/i2c/ov5695.c
840
static int ov5695_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov5695.c
844
struct ov5695 *ov5695 = to_ov5695(sd);
drivers/media/i2c/ov5695.c
862
static int ov5695_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov5695.c
873
static int ov5695_enum_frame_sizes(struct v4l2_subdev *sd,
drivers/media/i2c/ov5695.c
930
static int ov5695_s_stream(struct v4l2_subdev *sd, int on)
drivers/media/i2c/ov5695.c
932
struct ov5695 *ov5695 = to_ov5695(sd);
drivers/media/i2c/ov5695.c
945
v4l2_err(sd, "start stream failed while write regs\n");
drivers/media/i2c/ov6211.c
375
ov6211->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/ov6211.c
398
static int ov6211_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ov6211.c
403
struct ov6211 *ov6211 = to_ov6211(sd);
drivers/media/i2c/ov6211.c
425
ret = __v4l2_ctrl_handler_setup(ov6211->sd.ctrl_handler);
drivers/media/i2c/ov6211.c
444
static int ov6211_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/ov6211.c
448
struct ov6211 *ov6211 = to_ov6211(sd);
drivers/media/i2c/ov6211.c
461
static int ov6211_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov6211.c
482
static int ov6211_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov6211.c
494
static int ov6211_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov6211.c
512
static int ov6211_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ov6211.c
52
#define to_ov6211(_sd) container_of(_sd, struct ov6211, sd)
drivers/media/i2c/ov6211.c
525
ov6211_set_pad_format(sd, state, &fmt);
drivers/media/i2c/ov6211.c
615
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov6211.c
616
struct ov6211 *ov6211 = to_ov6211(sd);
drivers/media/i2c/ov6211.c
642
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov6211.c
643
struct ov6211 *ov6211 = to_ov6211(sd);
drivers/media/i2c/ov6211.c
667
v4l2_i2c_subdev_init(&ov6211->sd, client, &ov6211_subdev_ops);
drivers/media/i2c/ov6211.c
722
ov6211->sd.state_lock = ov6211->ctrl_handler.lock;
drivers/media/i2c/ov6211.c
723
ov6211->sd.internal_ops = &ov6211_internal_ops;
drivers/media/i2c/ov6211.c
724
ov6211->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov6211.c
725
ov6211->sd.entity.ops = &ov6211_subdev_entity_ops;
drivers/media/i2c/ov6211.c
726
ov6211->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov6211.c
729
ret = media_entity_pads_init(&ov6211->sd.entity, 1, &ov6211->pad);
drivers/media/i2c/ov6211.c
736
ret = v4l2_subdev_init_finalize(&ov6211->sd);
drivers/media/i2c/ov6211.c
746
ret = v4l2_async_register_subdev_sensor(&ov6211->sd);
drivers/media/i2c/ov6211.c
761
v4l2_subdev_cleanup(&ov6211->sd);
drivers/media/i2c/ov6211.c
766
media_entity_cleanup(&ov6211->sd.entity);
drivers/media/i2c/ov6211.c
769
v4l2_ctrl_handler_free(ov6211->sd.ctrl_handler);
drivers/media/i2c/ov6211.c
779
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov6211.c
780
struct ov6211 *ov6211 = to_ov6211(sd);
drivers/media/i2c/ov6211.c
782
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov6211.c
783
v4l2_subdev_cleanup(sd);
drivers/media/i2c/ov6211.c
784
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov6211.c
785
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/ov6211.c
93
struct v4l2_subdev sd;
drivers/media/i2c/ov64a40.c
2834
struct v4l2_subdev sd;
drivers/media/i2c/ov64a40.c
2858
static inline struct ov64a40 *sd_to_ov64a40(struct v4l2_subdev *sd)
drivers/media/i2c/ov64a40.c
2860
return container_of_const(sd, struct ov64a40, sd);
drivers/media/i2c/ov64a40.c
3011
static int ov64a40_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov64a40.c
3013
struct ov64a40 *ov64a40 = sd_to_ov64a40(sd);
drivers/media/i2c/ov64a40.c
3017
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/ov64a40.c
3052
static int ov64a40_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ov64a40.c
3055
struct ov64a40 *ov64a40 = sd_to_ov64a40(sd);
drivers/media/i2c/ov64a40.c
3071
static int ov64a40_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov64a40.c
3075
struct ov64a40 *ov64a40 = sd_to_ov64a40(sd);
drivers/media/i2c/ov64a40.c
3085
static int ov64a40_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov64a40.c
3089
struct ov64a40 *ov64a40 = sd_to_ov64a40(sd);
drivers/media/i2c/ov64a40.c
3109
static int ov64a40_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov64a40.c
3140
static int ov64a40_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov64a40.c
3144
struct ov64a40 *ov64a40 = sd_to_ov64a40(sd);
drivers/media/i2c/ov64a40.c
3211
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov64a40.c
3212
struct ov64a40 *ov64a40 = sd_to_ov64a40(sd);
drivers/media/i2c/ov64a40.c
3236
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov64a40.c
3237
struct ov64a40 *ov64a40 = sd_to_ov64a40(sd);
drivers/media/i2c/ov64a40.c
3416
ov64a40->sd.ctrl_handler = hdlr;
drivers/media/i2c/ov64a40.c
3519
struct i2c_client *client = v4l2_get_subdevdata(&ov64a40->sd);
drivers/media/i2c/ov64a40.c
3541
v4l2_i2c_subdev_init(&ov64a40->sd, client, &ov64a40_subdev_ops);
drivers/media/i2c/ov64a40.c
3596
ov64a40->sd.internal_ops = &ov64a40_internal_ops;
drivers/media/i2c/ov64a40.c
3597
ov64a40->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov64a40.c
3598
ov64a40->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov64a40.c
3601
ret = media_entity_pads_init(&ov64a40->sd.entity, 1, &ov64a40->pad);
drivers/media/i2c/ov64a40.c
3607
ov64a40->sd.state_lock = ov64a40->ctrl_handler.lock;
drivers/media/i2c/ov64a40.c
3608
ret = v4l2_subdev_init_finalize(&ov64a40->sd);
drivers/media/i2c/ov64a40.c
3614
ret = v4l2_async_register_subdev_sensor(&ov64a40->sd);
drivers/media/i2c/ov64a40.c
3626
v4l2_subdev_cleanup(&ov64a40->sd);
drivers/media/i2c/ov64a40.c
3628
media_entity_cleanup(&ov64a40->sd.entity);
drivers/media/i2c/ov64a40.c
3630
v4l2_ctrl_handler_free(ov64a40->sd.ctrl_handler);
drivers/media/i2c/ov64a40.c
3640
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov64a40.c
3642
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov64a40.c
3643
v4l2_subdev_cleanup(sd);
drivers/media/i2c/ov64a40.c
3644
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov64a40.c
3645
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/ov7251.c
1085
static int ov7251_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov7251.c
1152
static int ov7251_get_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov7251.c
1156
struct ov7251 *ov7251 = to_ov7251(sd);
drivers/media/i2c/ov7251.c
1216
static int ov7251_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov7251.c
1220
struct ov7251 *ov7251 = to_ov7251(sd);
drivers/media/i2c/ov7251.c
128
struct v4l2_subdev sd;
drivers/media/i2c/ov7251.c
1304
static int ov7251_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov7251.c
1308
struct ov7251 *ov7251 = to_ov7251(sd);
drivers/media/i2c/ov7251.c
1619
ov7251->sd.ctrl_handler = &ov7251->ctrls;
drivers/media/i2c/ov7251.c
164
static inline struct ov7251 *to_ov7251(struct v4l2_subdev *sd)
drivers/media/i2c/ov7251.c
166
return container_of(sd, struct ov7251, sd);
drivers/media/i2c/ov7251.c
1699
v4l2_i2c_subdev_init(&ov7251->sd, client, &ov7251_subdev_ops);
drivers/media/i2c/ov7251.c
1700
ov7251->sd.internal_ops = &ov7251_internal_ops;
drivers/media/i2c/ov7251.c
1701
ov7251->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov7251.c
1703
ov7251->sd.dev = &client->dev;
drivers/media/i2c/ov7251.c
1704
ov7251->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov7251.c
1706
ret = media_entity_pads_init(&ov7251->sd.entity, 1, &ov7251->pad);
drivers/media/i2c/ov7251.c
1752
ret = v4l2_async_register_subdev(&ov7251->sd);
drivers/media/i2c/ov7251.c
1758
ov7251_init_state(&ov7251->sd, NULL);
drivers/media/i2c/ov7251.c
1768
media_entity_cleanup(&ov7251->sd.entity);
drivers/media/i2c/ov7251.c
1779
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov7251.c
1780
struct ov7251 *ov7251 = to_ov7251(sd);
drivers/media/i2c/ov7251.c
1782
v4l2_async_unregister_subdev(&ov7251->sd);
drivers/media/i2c/ov7251.c
1783
media_entity_cleanup(&ov7251->sd.entity);
drivers/media/i2c/ov7251.c
909
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov7251.c
910
struct ov7251 *ov7251 = to_ov7251(sd);
drivers/media/i2c/ov7251.c
951
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov7251.c
952
struct ov7251 *ov7251 = to_ov7251(sd);
drivers/media/i2c/ov7640.c
48
struct v4l2_subdev *sd;
drivers/media/i2c/ov7640.c
53
sd = devm_kzalloc(&client->dev, sizeof(*sd), GFP_KERNEL);
drivers/media/i2c/ov7640.c
54
if (sd == NULL)
drivers/media/i2c/ov7640.c
56
v4l2_i2c_subdev_init(sd, client, &ov7640_ops);
drivers/media/i2c/ov7640.c
74
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov7640.c
76
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/ov7670.c
1030
static int ov7670_apply_fmt(struct v4l2_subdev *sd)
drivers/media/i2c/ov7670.c
1032
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
1045
ret = ov7670_write(sd, REG_COM7, com7);
drivers/media/i2c/ov7670.c
1058
ret = ov7670_write(sd, REG_COM10, com10);
drivers/media/i2c/ov7670.c
1065
ret = ov7670_write_array(sd, info->fmt->regs + 1);
drivers/media/i2c/ov7670.c
1069
ret = ov7670_set_hw(sd, wsize->hstart, wsize->hstop, wsize->vstart,
drivers/media/i2c/ov7670.c
1075
ret = ov7670_write_array(sd, wsize->regs);
drivers/media/i2c/ov7670.c
1090
ret = ov7670_write(sd, REG_CLKRC, info->clkrc);
drivers/media/i2c/ov7670.c
1100
static int ov7670_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov7670.c
1104
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
1112
ret = ov7670_try_fmt_internal(sd, &format->format, NULL, NULL);
drivers/media/i2c/ov7670.c
1120
ret = ov7670_try_fmt_internal(sd, &format->format, &info->fmt, &info->wsize);
drivers/media/i2c/ov7670.c
1130
return ov7670_apply_fmt(sd);
drivers/media/i2c/ov7670.c
1135
static int ov7670_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov7670.c
1139
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
1157
static int ov7670_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/ov7670.c
1161
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
1170
info->devtype->get_framerate(sd, &ival->interval);
drivers/media/i2c/ov7670.c
1175
static int ov7670_set_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/ov7670.c
1180
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
1189
return info->devtype->set_framerate(sd, tpf);
drivers/media/i2c/ov7670.c
1201
static int ov7670_enum_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/ov7670.c
1205
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
1240
static int ov7670_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov7670.c
1244
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
1278
static int ov7670_store_cmatrix(struct v4l2_subdev *sd,
drivers/media/i2c/ov7670.c
1288
ret = ov7670_read(sd, REG_CMATRIX_SIGN, &signbits);
drivers/media/i2c/ov7670.c
1306
ret = ov7670_write(sd, REG_CMATRIX_BASE + i, raw);
drivers/media/i2c/ov7670.c
1310
return ov7670_write(sd, REG_CMATRIX_SIGN, signbits);
drivers/media/i2c/ov7670.c
1392
static int ov7670_s_sat_hue(struct v4l2_subdev *sd, int sat, int hue)
drivers/media/i2c/ov7670.c
1394
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
1398
return ov7670_store_cmatrix(sd, matrix);
drivers/media/i2c/ov7670.c
1413
static int ov7670_s_brightness(struct v4l2_subdev *sd, int value)
drivers/media/i2c/ov7670.c
1417
ov7670_read(sd, REG_COM8, &com8);
drivers/media/i2c/ov7670.c
1419
ov7670_write(sd, REG_COM8, com8);
drivers/media/i2c/ov7670.c
1421
return ov7670_write(sd, REG_BRIGHT, v);
drivers/media/i2c/ov7670.c
1424
static int ov7670_s_contrast(struct v4l2_subdev *sd, int value)
drivers/media/i2c/ov7670.c
1426
return ov7670_write(sd, REG_CONTRAS, (unsigned char) value);
drivers/media/i2c/ov7670.c
1429
static int ov7670_s_hflip(struct v4l2_subdev *sd, int value)
drivers/media/i2c/ov7670.c
1434
ret = ov7670_read(sd, REG_MVFP, &v);
drivers/media/i2c/ov7670.c
1442
return ov7670_write(sd, REG_MVFP, v);
drivers/media/i2c/ov7670.c
1445
static int ov7670_s_vflip(struct v4l2_subdev *sd, int value)
drivers/media/i2c/ov7670.c
1450
ret = ov7670_read(sd, REG_MVFP, &v);
drivers/media/i2c/ov7670.c
1458
return ov7670_write(sd, REG_MVFP, v);
drivers/media/i2c/ov7670.c
1467
static int ov7670_g_gain(struct v4l2_subdev *sd, __s32 *value)
drivers/media/i2c/ov7670.c
1472
ret = ov7670_read(sd, REG_GAIN, &gain);
drivers/media/i2c/ov7670.c
1479
static int ov7670_s_gain(struct v4l2_subdev *sd, int value)
drivers/media/i2c/ov7670.c
1484
ret = ov7670_write(sd, REG_GAIN, value & 0xff);
drivers/media/i2c/ov7670.c
1488
ret = ov7670_read(sd, REG_COM8, &com8);
drivers/media/i2c/ov7670.c
1491
return ov7670_write(sd, REG_COM8, com8 & ~COM8_AGC);
drivers/media/i2c/ov7670.c
1497
static int ov7670_s_autogain(struct v4l2_subdev *sd, int value)
drivers/media/i2c/ov7670.c
1502
ret = ov7670_read(sd, REG_COM8, &com8);
drivers/media/i2c/ov7670.c
1508
ret = ov7670_write(sd, REG_COM8, com8);
drivers/media/i2c/ov7670.c
1513
static int ov7670_s_exp(struct v4l2_subdev *sd, int value)
drivers/media/i2c/ov7670.c
1518
ret = ov7670_read(sd, REG_COM1, &com1) +
drivers/media/i2c/ov7670.c
1519
ov7670_read(sd, REG_COM8, &com8) +
drivers/media/i2c/ov7670.c
1520
ov7670_read(sd, REG_AECHH, &aechh);
drivers/media/i2c/ov7670.c
1527
ret = ov7670_write(sd, REG_COM1, com1) +
drivers/media/i2c/ov7670.c
1528
ov7670_write(sd, REG_AECH, aech) +
drivers/media/i2c/ov7670.c
1529
ov7670_write(sd, REG_AECHH, aechh);
drivers/media/i2c/ov7670.c
1532
ret = ov7670_write(sd, REG_COM8, com8 & ~COM8_AEC);
drivers/media/i2c/ov7670.c
1539
static int ov7670_s_autoexp(struct v4l2_subdev *sd,
drivers/media/i2c/ov7670.c
1545
ret = ov7670_read(sd, REG_COM8, &com8);
drivers/media/i2c/ov7670.c
1551
ret = ov7670_write(sd, REG_COM8, com8);
drivers/media/i2c/ov7670.c
1563
static int ov7670_s_test_pattern(struct v4l2_subdev *sd, int value)
drivers/media/i2c/ov7670.c
1567
ret = ov7670_update_bits(sd, REG_SCALING_XSC, TEST_PATTTERN_0,
drivers/media/i2c/ov7670.c
1572
return ov7670_update_bits(sd, REG_SCALING_YSC, TEST_PATTTERN_1,
drivers/media/i2c/ov7670.c
1578
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/ov7670.c
1579
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
1583
return ov7670_g_gain(sd, &info->gain->val);
drivers/media/i2c/ov7670.c
1590
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/ov7670.c
1591
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
1595
return ov7670_s_brightness(sd, ctrl->val);
drivers/media/i2c/ov7670.c
1597
return ov7670_s_contrast(sd, ctrl->val);
drivers/media/i2c/ov7670.c
1599
return ov7670_s_sat_hue(sd,
drivers/media/i2c/ov7670.c
1602
return ov7670_s_vflip(sd, ctrl->val);
drivers/media/i2c/ov7670.c
1604
return ov7670_s_hflip(sd, ctrl->val);
drivers/media/i2c/ov7670.c
1610
return ov7670_s_gain(sd, info->gain->val);
drivers/media/i2c/ov7670.c
1612
return ov7670_s_autogain(sd, ctrl->val);
drivers/media/i2c/ov7670.c
1618
return ov7670_s_exp(sd, info->exposure->val);
drivers/media/i2c/ov7670.c
1620
return ov7670_s_autoexp(sd, ctrl->val);
drivers/media/i2c/ov7670.c
1622
return ov7670_s_test_pattern(sd, ctrl->val);
drivers/media/i2c/ov7670.c
1633
static int ov7670_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
drivers/media/i2c/ov7670.c
1638
ret = ov7670_read(sd, reg->reg & 0xff, &val);
drivers/media/i2c/ov7670.c
1644
static int ov7670_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
drivers/media/i2c/ov7670.c
1646
ov7670_write(sd, reg->reg & 0xff, reg->val & 0xff);
drivers/media/i2c/ov7670.c
1651
static void ov7670_power_on(struct v4l2_subdev *sd)
drivers/media/i2c/ov7670.c
1653
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
1673
static void ov7670_power_off(struct v4l2_subdev *sd)
drivers/media/i2c/ov7670.c
1675
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
1688
static int ov7670_s_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/ov7670.c
1690
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
1696
ov7670_power_on(sd);
drivers/media/i2c/ov7670.c
1697
ov7670_init(sd, 0);
drivers/media/i2c/ov7670.c
1698
ov7670_apply_fmt(sd);
drivers/media/i2c/ov7670.c
1699
ov7675_apply_framerate(sd);
drivers/media/i2c/ov7670.c
1702
ov7670_power_off(sd);
drivers/media/i2c/ov7670.c
1708
static void ov7670_get_default_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov7670.c
1711
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
1720
static int ov7670_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ov7670.c
1725
ov7670_get_default_format(sd, format);
drivers/media/i2c/ov7670.c
1827
struct v4l2_subdev *sd;
drivers/media/i2c/ov7670.c
1834
sd = &info->sd;
drivers/media/i2c/ov7670.c
1835
v4l2_i2c_subdev_init(sd, client, &ov7670_ops);
drivers/media/i2c/ov7670.c
1837
sd->internal_ops = &ov7670_subdev_internal_ops;
drivers/media/i2c/ov7670.c
1838
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/i2c/ov7670.c
1876
ov7670_power_on(sd);
drivers/media/i2c/ov7670.c
1887
ret = ov7670_detect(sd);
drivers/media/i2c/ov7670.c
1901
ov7670_get_default_format(sd, &info->format);
drivers/media/i2c/ov7670.c
1908
info->devtype->set_framerate(sd, &tpf);
drivers/media/i2c/ov7670.c
1936
sd->ctrl_handler = &info->hdl;
drivers/media/i2c/ov7670.c
1952
info->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov7670.c
1953
ret = media_entity_pads_init(&info->sd.entity, 1, &info->pad);
drivers/media/i2c/ov7670.c
1959
ret = v4l2_async_register_subdev(&info->sd);
drivers/media/i2c/ov7670.c
1963
ov7670_power_off(sd);
drivers/media/i2c/ov7670.c
1967
media_entity_cleanup(&info->sd.entity);
drivers/media/i2c/ov7670.c
1971
ov7670_power_off(sd);
drivers/media/i2c/ov7670.c
1977
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov7670.c
1978
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
1980
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov7670.c
1982
media_entity_cleanup(&info->sd.entity);
drivers/media/i2c/ov7670.c
215
struct v4l2_subdev sd;
drivers/media/i2c/ov7670.c
251
static inline struct ov7670_info *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/ov7670.c
253
return container_of(sd, struct ov7670_info, sd);
drivers/media/i2c/ov7670.c
258
return &container_of(ctrl->handler, struct ov7670_info, hdl)->sd;
drivers/media/i2c/ov7670.c
471
static int ov7670_read_smbus(struct v4l2_subdev *sd, unsigned char reg,
drivers/media/i2c/ov7670.c
474
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov7670.c
486
static int ov7670_write_smbus(struct v4l2_subdev *sd, unsigned char reg,
drivers/media/i2c/ov7670.c
489
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov7670.c
500
static int ov7670_read_i2c(struct v4l2_subdev *sd, unsigned char reg,
drivers/media/i2c/ov7670.c
503
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov7670.c
533
static int ov7670_write_i2c(struct v4l2_subdev *sd, unsigned char reg,
drivers/media/i2c/ov7670.c
536
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov7670.c
553
static int ov7670_read(struct v4l2_subdev *sd, unsigned char reg,
drivers/media/i2c/ov7670.c
556
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
559
return ov7670_read_smbus(sd, reg, value);
drivers/media/i2c/ov7670.c
561
return ov7670_read_i2c(sd, reg, value);
drivers/media/i2c/ov7670.c
564
static int ov7670_write(struct v4l2_subdev *sd, unsigned char reg,
drivers/media/i2c/ov7670.c
567
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
570
return ov7670_write_smbus(sd, reg, value);
drivers/media/i2c/ov7670.c
572
return ov7670_write_i2c(sd, reg, value);
drivers/media/i2c/ov7670.c
575
static int ov7670_update_bits(struct v4l2_subdev *sd, unsigned char reg,
drivers/media/i2c/ov7670.c
581
ret = ov7670_read(sd, reg, &orig);
drivers/media/i2c/ov7670.c
585
return ov7670_write(sd, reg, (orig & ~mask) | (value & mask));
drivers/media/i2c/ov7670.c
591
static int ov7670_write_array(struct v4l2_subdev *sd, struct regval_list *vals)
drivers/media/i2c/ov7670.c
594
int ret = ov7670_write(sd, vals->reg_num, vals->value);
drivers/media/i2c/ov7670.c
607
static int ov7670_reset(struct v4l2_subdev *sd, u32 val)
drivers/media/i2c/ov7670.c
609
ov7670_write(sd, REG_COM7, COM7_RESET);
drivers/media/i2c/ov7670.c
615
static int ov7670_init(struct v4l2_subdev *sd, u32 val)
drivers/media/i2c/ov7670.c
617
return ov7670_write_array(sd, ov7670_default_regs);
drivers/media/i2c/ov7670.c
620
static int ov7670_detect(struct v4l2_subdev *sd)
drivers/media/i2c/ov7670.c
625
ret = ov7670_init(sd, 0);
drivers/media/i2c/ov7670.c
628
ret = ov7670_read(sd, REG_MIDH, &v);
drivers/media/i2c/ov7670.c
633
ret = ov7670_read(sd, REG_MIDL, &v);
drivers/media/i2c/ov7670.c
641
ret = ov7670_read(sd, REG_PID, &v);
drivers/media/i2c/ov7670.c
646
ret = ov7670_read(sd, REG_VER, &v);
drivers/media/i2c/ov7670.c
788
static void ov7675_get_framerate(struct v4l2_subdev *sd,
drivers/media/i2c/ov7670.c
791
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
809
static int ov7675_apply_framerate(struct v4l2_subdev *sd)
drivers/media/i2c/ov7670.c
811
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
814
ret = ov7670_write(sd, REG_CLKRC, info->clkrc);
drivers/media/i2c/ov7670.c
818
return ov7670_write(sd, REG_DBLV,
drivers/media/i2c/ov7670.c
822
static int ov7675_set_framerate(struct v4l2_subdev *sd,
drivers/media/i2c/ov7670.c
825
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
859
ov7675_get_framerate(sd, tpf);
drivers/media/i2c/ov7670.c
867
return ov7675_apply_framerate(sd);
drivers/media/i2c/ov7670.c
872
static void ov7670_get_framerate_legacy(struct v4l2_subdev *sd,
drivers/media/i2c/ov7670.c
875
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
883
static int ov7670_set_framerate_legacy(struct v4l2_subdev *sd,
drivers/media/i2c/ov7670.c
886
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov7670.c
907
return ov7670_write(sd, REG_CLKRC, info->clkrc);
drivers/media/i2c/ov7670.c
915
static int ov7670_set_hw(struct v4l2_subdev *sd, int hstart, int hstop,
drivers/media/i2c/ov7670.c
925
ret = ov7670_write(sd, REG_HSTART, (hstart >> 3) & 0xff);
drivers/media/i2c/ov7670.c
928
ret = ov7670_write(sd, REG_HSTOP, (hstop >> 3) & 0xff);
drivers/media/i2c/ov7670.c
931
ret = ov7670_read(sd, REG_HREF, &v);
drivers/media/i2c/ov7670.c
936
ret = ov7670_write(sd, REG_HREF, v);
drivers/media/i2c/ov7670.c
940
ret = ov7670_write(sd, REG_VSTART, (vstart >> 2) & 0xff);
drivers/media/i2c/ov7670.c
943
ret = ov7670_write(sd, REG_VSTOP, (vstop >> 2) & 0xff);
drivers/media/i2c/ov7670.c
946
ret = ov7670_read(sd, REG_VREF, &v);
drivers/media/i2c/ov7670.c
951
return ov7670_write(sd, REG_VREF, v);
drivers/media/i2c/ov7670.c
955
static int ov7670_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov7670.c
966
static int ov7670_try_fmt_internal(struct v4l2_subdev *sd,
drivers/media/i2c/ov7670.c
973
struct ov7670_info *info = to_state(sd);
drivers/media/i2c/ov772x.c
1173
static int ov772x_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov772x.c
1177
struct ov772x_priv *priv = to_ov772x(sd);
drivers/media/i2c/ov772x.c
1195
static int ov772x_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov772x.c
1200
struct ov772x_priv *priv = to_ov772x(sd);
drivers/media/i2c/ov772x.c
1214
static int ov772x_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov772x.c
1218
struct ov772x_priv *priv = to_ov772x(sd);
drivers/media/i2c/ov772x.c
1336
static int ov772x_enum_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/ov772x.c
1354
static int ov772x_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov772x.c
556
static struct ov772x_priv *to_ov772x(struct v4l2_subdev *sd)
drivers/media/i2c/ov772x.c
558
return container_of(sd, struct ov772x_priv, subdev);
drivers/media/i2c/ov772x.c
579
static int ov772x_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov772x.c
581
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov772x.c
582
struct ov772x_priv *priv = to_ov772x(sd);
drivers/media/i2c/ov772x.c
720
static int ov772x_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/ov772x.c
724
struct ov772x_priv *priv = to_ov772x(sd);
drivers/media/i2c/ov772x.c
740
static int ov772x_set_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/ov772x.c
744
struct ov772x_priv *priv = to_ov772x(sd);
drivers/media/i2c/ov772x.c
842
static int ov772x_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/ov772x.c
845
struct ov772x_priv *priv = to_ov772x(sd);
drivers/media/i2c/ov772x.c
862
static int ov772x_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/ov772x.c
865
struct ov772x_priv *priv = to_ov772x(sd);
drivers/media/i2c/ov772x.c
933
static int ov772x_s_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/ov772x.c
935
struct ov772x_priv *priv = to_ov772x(sd);
drivers/media/i2c/ov7740.c
1032
struct v4l2_subdev *sd;
drivers/media/i2c/ov7740.c
1056
sd = &ov7740->subdev;
drivers/media/i2c/ov7740.c
1057
v4l2_i2c_subdev_init(sd, client, &ov7740_subdev_ops);
drivers/media/i2c/ov7740.c
1059
sd->internal_ops = &ov7740_subdev_internal_ops;
drivers/media/i2c/ov7740.c
1060
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/i2c/ov7740.c
1063
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov7740.c
1064
ret = media_entity_pads_init(&sd->entity, 1, &ov7740->pad);
drivers/media/i2c/ov7740.c
1091
ov7740_get_default_format(sd, &ov7740->format);
drivers/media/i2c/ov7740.c
1093
ret = v4l2_async_register_subdev(sd);
drivers/media/i2c/ov7740.c
1116
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov7740.c
1117
struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
drivers/media/i2c/ov7740.c
1122
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov7740.c
1135
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov7740.c
1136
struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
drivers/media/i2c/ov7740.c
1145
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov7740.c
1146
struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
drivers/media/i2c/ov7740.c
267
static int ov7740_get_register(struct v4l2_subdev *sd,
drivers/media/i2c/ov7740.c
270
struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
drivers/media/i2c/ov7740.c
282
static int ov7740_set_register(struct v4l2_subdev *sd,
drivers/media/i2c/ov7740.c
285
struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
drivers/media/i2c/ov7740.c
611
static int ov7740_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov7740.c
613
struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
drivers/media/i2c/ov7740.c
614
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov7740.c
674
static int ov7740_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov7740.c
686
static int ov7740_enum_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/ov7740.c
705
static int ov7740_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov7740.c
721
static int ov7740_try_fmt_internal(struct v4l2_subdev *sd,
drivers/media/i2c/ov7740.c
726
struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
drivers/media/i2c/ov7740.c
768
static int ov7740_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov7740.c
772
struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
drivers/media/i2c/ov7740.c
785
ret = ov7740_try_fmt_internal(sd, &format->format, NULL, NULL);
drivers/media/i2c/ov7740.c
795
ret = ov7740_try_fmt_internal(sd, &format->format, &ovfmt, &fsize);
drivers/media/i2c/ov7740.c
810
static int ov7740_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov7740.c
814
struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
drivers/media/i2c/ov7740.c
829
static int ov7740_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/ov7740.c
857
static void ov7740_get_default_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov7740.c
860
struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
drivers/media/i2c/ov7740.c
869
static int ov7740_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ov7740.c
871
struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
drivers/media/i2c/ov7740.c
876
ov7740_get_default_format(sd, format);
drivers/media/i2c/ov8856.c
104
#define to_ov8856(_sd) container_of(_sd, struct ov8856, sd)
drivers/media/i2c/ov8856.c
1420
struct v4l2_subdev sd;
drivers/media/i2c/ov8856.c
1627
struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd);
drivers/media/i2c/ov8856.c
1657
struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd);
drivers/media/i2c/ov8856.c
1957
ov8856->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/ov8856.c
2012
ret = __v4l2_ctrl_handler_setup(ov8856->sd.ctrl_handler);
drivers/media/i2c/ov8856.c
2033
static int ov8856_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov8856.c
2035
struct ov8856 *ov8856 = to_ov8856(sd);
drivers/media/i2c/ov8856.c
2064
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov8856.c
2065
struct ov8856 *ov8856 = to_ov8856(sd);
drivers/media/i2c/ov8856.c
2103
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov8856.c
2104
struct ov8856 *ov8856 = to_ov8856(sd);
drivers/media/i2c/ov8856.c
2117
static int ov8856_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov8856.c
2121
struct ov8856 *ov8856 = to_ov8856(sd);
drivers/media/i2c/ov8856.c
2163
static int ov8856_get_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov8856.c
2167
struct ov8856 *ov8856 = to_ov8856(sd);
drivers/media/i2c/ov8856.c
2181
static int ov8856_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov8856.c
2193
static int ov8856_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov8856.c
2197
struct ov8856 *ov8856 = to_ov8856(sd);
drivers/media/i2c/ov8856.c
2217
static int ov8856_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ov8856.c
2219
struct ov8856 *ov8856 = to_ov8856(sd);
drivers/media/i2c/ov8856.c
2351
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov8856.c
2352
struct ov8856 *ov8856 = to_ov8856(sd);
drivers/media/i2c/ov8856.c
2354
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov8856.c
2355
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov8856.c
2356
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/ov8856.c
2379
v4l2_i2c_subdev_init(&ov8856->sd, client, &ov8856_subdev_ops);
drivers/media/i2c/ov8856.c
2405
ov8856->sd.internal_ops = &ov8856_internal_ops;
drivers/media/i2c/ov8856.c
2406
ov8856->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov8856.c
2407
ov8856->sd.entity.ops = &ov8856_subdev_entity_ops;
drivers/media/i2c/ov8856.c
2408
ov8856->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov8856.c
2410
ret = media_entity_pads_init(&ov8856->sd.entity, 1, &ov8856->pad);
drivers/media/i2c/ov8856.c
2416
ret = v4l2_async_register_subdev_sensor(&ov8856->sd);
drivers/media/i2c/ov8856.c
2432
media_entity_cleanup(&ov8856->sd.entity);
drivers/media/i2c/ov8856.c
2435
v4l2_ctrl_handler_free(ov8856->sd.ctrl_handler);
drivers/media/i2c/ov8858.c
124
static inline struct ov8858 *sd_to_ov8858(struct v4l2_subdev *sd)
drivers/media/i2c/ov8858.c
126
return container_of(sd, struct ov8858, subdev);
drivers/media/i2c/ov8858.c
1372
static int ov8858_s_stream(struct v4l2_subdev *sd, int on)
drivers/media/i2c/ov8858.c
1374
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov8858.c
1375
struct ov8858 *ov8858 = sd_to_ov8858(sd);
drivers/media/i2c/ov8858.c
1379
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/ov8858.c
1411
static int ov8858_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov8858.c
1415
struct ov8858 *ov8858 = sd_to_ov8858(sd);
drivers/media/i2c/ov8858.c
1447
static int ov8858_enum_frame_sizes(struct v4l2_subdev *sd,
drivers/media/i2c/ov8858.c
1465
static int ov8858_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov8858.c
1477
static int ov8858_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ov8858.c
1489
ov8858_set_fmt(sd, sd_state, &fmt);
drivers/media/i2c/ov8858.c
1668
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov8858.c
1669
struct ov8858 *ov8858 = sd_to_ov8858(sd);
drivers/media/i2c/ov8858.c
1677
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov8858.c
1678
struct ov8858 *ov8858 = sd_to_ov8858(sd);
drivers/media/i2c/ov8858.c
1871
struct v4l2_subdev *sd;
drivers/media/i2c/ov8858.c
1911
sd = &ov8858->subdev;
drivers/media/i2c/ov8858.c
1912
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov8858.c
1914
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov8858.c
1915
ret = media_entity_pads_init(&sd->entity, 1, &ov8858->pad);
drivers/media/i2c/ov8858.c
1919
sd->state_lock = ov8858->ctrl_handler.lock;
drivers/media/i2c/ov8858.c
1920
ret = v4l2_subdev_init_finalize(sd);
drivers/media/i2c/ov8858.c
1941
ret = v4l2_async_register_subdev_sensor(sd);
drivers/media/i2c/ov8858.c
1956
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov8858.c
1965
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov8858.c
1966
struct ov8858 *ov8858 = sd_to_ov8858(sd);
drivers/media/i2c/ov8858.c
1968
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov8858.c
1969
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov9282.c
1000
struct ov9282 *ov9282 = to_ov9282(sd);
drivers/media/i2c/ov9282.c
1044
static int ov9282_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ov9282.c
1047
struct ov9282 *ov9282 = to_ov9282(sd);
drivers/media/i2c/ov9282.c
1054
return ov9282_set_pad_format(sd, sd_state, &fmt);
drivers/media/i2c/ov9282.c
1072
static int ov9282_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov9282.c
1078
struct ov9282 *ov9282 = to_ov9282(sd);
drivers/media/i2c/ov9282.c
1154
ret = __v4l2_ctrl_handler_setup(ov9282->sd.ctrl_handler);
drivers/media/i2c/ov9282.c
1190
static int ov9282_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov9282.c
1192
struct ov9282 *ov9282 = to_ov9282(sd);
drivers/media/i2c/ov9282.c
1378
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov9282.c
1379
struct ov9282 *ov9282 = to_ov9282(sd);
drivers/media/i2c/ov9282.c
1428
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/ov9282.c
1429
struct ov9282 *ov9282 = to_ov9282(sd);
drivers/media/i2c/ov9282.c
1545
ov9282->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/ov9282.c
1568
v4l2_i2c_subdev_init(&ov9282->sd, client, &ov9282_subdev_ops);
drivers/media/i2c/ov9282.c
1569
ov9282->sd.internal_ops = &ov9282_internal_ops;
drivers/media/i2c/ov9282.c
1570
v4l2_i2c_subdev_set_name(&ov9282->sd, client,
drivers/media/i2c/ov9282.c
1606
ov9282->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
drivers/media/i2c/ov9282.c
1608
ov9282->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov9282.c
1612
ret = media_entity_pads_init(&ov9282->sd.entity, 1, &ov9282->pad);
drivers/media/i2c/ov9282.c
1618
ret = v4l2_async_register_subdev_sensor(&ov9282->sd);
drivers/media/i2c/ov9282.c
1632
media_entity_cleanup(&ov9282->sd.entity);
drivers/media/i2c/ov9282.c
1634
v4l2_ctrl_handler_free(ov9282->sd.ctrl_handler);
drivers/media/i2c/ov9282.c
1651
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov9282.c
1652
struct ov9282 *ov9282 = to_ov9282(sd);
drivers/media/i2c/ov9282.c
1654
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov9282.c
1655
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov9282.c
1656
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/ov9282.c
211
struct v4l2_subdev sd;
drivers/media/i2c/ov9282.c
485
return container_of(subdev, struct ov9282, sd);
drivers/media/i2c/ov9282.c
499
struct i2c_client *client = v4l2_get_subdevdata(&ov9282->sd);
drivers/media/i2c/ov9282.c
542
struct i2c_client *client = v4l2_get_subdevdata(&ov9282->sd);
drivers/media/i2c/ov9282.c
889
static int ov9282_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov9282.c
915
static int ov9282_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov9282.c
965
static int ov9282_get_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov9282.c
969
struct ov9282 *ov9282 = to_ov9282(sd);
drivers/media/i2c/ov9282.c
996
static int ov9282_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov9640.c
266
static int ov9640_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov9640.c
295
static int ov9640_get_register(struct v4l2_subdev *sd,
drivers/media/i2c/ov9640.c
298
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov9640.c
316
static int ov9640_set_register(struct v4l2_subdev *sd,
drivers/media/i2c/ov9640.c
319
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov9640.c
328
static int ov9640_s_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/ov9640.c
330
struct ov9640_priv *priv = to_ov9640_sensor(sd);
drivers/media/i2c/ov9640.c
39
#define to_ov9640_sensor(sd) container_of(sd, struct ov9640_priv, subdev)
drivers/media/i2c/ov9640.c
503
static int ov9640_s_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov9640.c
506
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ov9640.c
521
static int ov9640_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov9640.c
548
return ov9640_s_fmt(sd, mf);
drivers/media/i2c/ov9640.c
553
static int ov9640_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov9640.c
565
static int ov9640_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/ov9640.c
587
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov9640.c
588
struct ov9640_priv *priv = to_ov9640_sensor(sd);
drivers/media/i2c/ov9640.c
649
static int ov9640_get_mbus_config(struct v4l2_subdev *sd,
drivers/media/i2c/ov9640.c
747
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov9640.c
748
struct ov9640_priv *priv = to_ov9640_sensor(sd);
drivers/media/i2c/ov9650.c
1054
ov965x->sd.ctrl_handler = hdl;
drivers/media/i2c/ov9650.c
1070
static int ov965x_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov9650.c
1081
static int ov965x_enum_frame_sizes(struct v4l2_subdev *sd,
drivers/media/i2c/ov9650.c
1104
static int ov965x_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/ov9650.c
1108
struct ov965x *ov965x = to_ov965x(sd);
drivers/media/i2c/ov9650.c
1153
v4l2_dbg(1, debug, &ov965x->sd, "Changed frame interval to %u us\n",
drivers/media/i2c/ov9650.c
1159
static int ov965x_set_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/ov9650.c
1163
struct ov965x *ov965x = to_ov965x(sd);
drivers/media/i2c/ov9650.c
1173
v4l2_dbg(1, debug, sd, "Setting %d/%d frame interval\n",
drivers/media/i2c/ov9650.c
1183
static int ov965x_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov9650.c
1187
struct ov965x *ov965x = to_ov965x(sd);
drivers/media/i2c/ov9650.c
1228
static int ov965x_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/ov9650.c
1234
struct ov965x *ov965x = to_ov965x(sd);
drivers/media/i2c/ov9650.c
1337
static int ov965x_s_stream(struct v4l2_subdev *sd, int on)
drivers/media/i2c/ov9650.c
1339
struct ov965x *ov965x = to_ov965x(sd);
drivers/media/i2c/ov9650.c
1343
v4l2_dbg(1, debug, sd, "%s: on: %d\n", __func__, on);
drivers/media/i2c/ov9650.c
1378
static int ov965x_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ov9650.c
1439
static int ov965x_detect_sensor(struct v4l2_subdev *sd)
drivers/media/i2c/ov9650.c
1441
struct ov965x *ov965x = to_ov965x(sd);
drivers/media/i2c/ov9650.c
1462
v4l2_info(sd, "Found OV%04X sensor\n", ov965x->id);
drivers/media/i2c/ov9650.c
1464
v4l2_err(sd, "Sensor detection failed (%04X)\n",
drivers/media/i2c/ov9650.c
1477
struct v4l2_subdev *sd;
drivers/media/i2c/ov9650.c
1515
sd = &ov965x->sd;
drivers/media/i2c/ov9650.c
1516
v4l2_i2c_subdev_init(sd, client, &ov965x_subdev_ops);
drivers/media/i2c/ov9650.c
1517
strscpy(sd->name, DRIVER_NAME, sizeof(sd->name));
drivers/media/i2c/ov9650.c
1519
sd->internal_ops = &ov965x_sd_internal_ops;
drivers/media/i2c/ov9650.c
1520
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
drivers/media/i2c/ov9650.c
1524
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov9650.c
1525
ret = media_entity_pads_init(&sd->entity, 1, &ov965x->pad);
drivers/media/i2c/ov9650.c
1537
ret = ov965x_detect_sensor(sd);
drivers/media/i2c/ov9650.c
1544
ret = v4l2_async_register_subdev(sd);
drivers/media/i2c/ov9650.c
1550
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/ov9650.c
1552
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov9650.c
1560
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov9650.c
1561
struct ov965x *ov965x = to_ov965x(sd);
drivers/media/i2c/ov9650.c
1563
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov9650.c
1564
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/ov9650.c
1565
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov9650.c
247
struct v4l2_subdev sd;
drivers/media/i2c/ov9650.c
415
return &container_of(ctrl->handler, struct ov965x, ctrls.handler)->sd;
drivers/media/i2c/ov9650.c
418
static inline struct ov965x *to_ov965x(struct v4l2_subdev *sd)
drivers/media/i2c/ov9650.c
420
return container_of(sd, struct ov965x, sd);
drivers/media/i2c/ov9650.c
434
v4l2_dbg(2, debug, &ov965x->sd, "%s: 0x%02x @ 0x%02x. (%d)\n",
drivers/media/i2c/ov9650.c
446
v4l2_dbg(2, debug, &ov965x->sd, "%s: 0x%02x @ 0x%02X (%d)\n",
drivers/media/i2c/ov9650.c
529
static int ov965x_s_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/ov9650.c
531
struct ov965x *ov965x = to_ov965x(sd);
drivers/media/i2c/ov9650.c
534
v4l2_dbg(1, debug, sd, "%s: on: %d\n", __func__, on);
drivers/media/i2c/ov9650.c
580
v4l2_dbg(1, debug, &ov965x->sd, "clkrc: %#x, fi: %lu, tr: %lu, %d\n",
drivers/media/i2c/ov9650.c
589
v4l2_err(&ov965x->sd, "Exposure ctrl range update failed\n");
drivers/media/i2c/ov9650.c
903
struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
drivers/media/i2c/ov9650.c
904
struct ov965x *ov965x = to_ov965x(sd);
drivers/media/i2c/ov9650.c
907
v4l2_dbg(1, debug, sd, "g_ctrl: %s\n", ctrl->name);
drivers/media/i2c/ov9650.c
917
struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
drivers/media/i2c/ov9650.c
918
struct ov965x *ov965x = to_ov965x(sd);
drivers/media/i2c/ov9650.c
921
v4l2_dbg(1, debug, sd, "s_ctrl: %s, value: %d. power: %d\n",
drivers/media/i2c/ov9734.c
329
struct v4l2_subdev sd;
drivers/media/i2c/ov9734.c
349
return container_of(subdev, struct ov9734, sd);
drivers/media/i2c/ov9734.c
372
struct i2c_client *client = v4l2_get_subdevdata(&ov9734->sd);
drivers/media/i2c/ov9734.c
402
struct i2c_client *client = v4l2_get_subdevdata(&ov9734->sd);
drivers/media/i2c/ov9734.c
600
ov9734->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/ov9734.c
634
ret = __v4l2_ctrl_handler_setup(ov9734->sd.ctrl_handler);
drivers/media/i2c/ov9734.c
653
static int ov9734_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ov9734.c
655
struct ov9734 *ov9734 = to_ov9734(sd);
drivers/media/i2c/ov9734.c
683
static int ov9734_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov9734.c
687
struct ov9734 *ov9734 = to_ov9734(sd);
drivers/media/i2c/ov9734.c
724
static int ov9734_get_format(struct v4l2_subdev *sd,
drivers/media/i2c/ov9734.c
728
struct ov9734 *ov9734 = to_ov9734(sd);
drivers/media/i2c/ov9734.c
742
static int ov9734_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/ov9734.c
754
static int ov9734_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/ov9734.c
772
static int ov9734_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/ov9734.c
774
struct ov9734 *ov9734 = to_ov9734(sd);
drivers/media/i2c/ov9734.c
877
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ov9734.c
878
struct ov9734 *ov9734 = to_ov9734(sd);
drivers/media/i2c/ov9734.c
880
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/ov9734.c
881
media_entity_cleanup(&sd->entity);
drivers/media/i2c/ov9734.c
882
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/ov9734.c
918
v4l2_i2c_subdev_init(&ov9734->sd, client, &ov9734_subdev_ops);
drivers/media/i2c/ov9734.c
933
ov9734->sd.internal_ops = &ov9734_internal_ops;
drivers/media/i2c/ov9734.c
934
ov9734->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/ov9734.c
935
ov9734->sd.entity.ops = &ov9734_subdev_entity_ops;
drivers/media/i2c/ov9734.c
936
ov9734->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/ov9734.c
938
ret = media_entity_pads_init(&ov9734->sd.entity, 1, &ov9734->pad);
drivers/media/i2c/ov9734.c
952
ret = v4l2_async_register_subdev_sensor(&ov9734->sd);
drivers/media/i2c/ov9734.c
964
media_entity_cleanup(&ov9734->sd.entity);
drivers/media/i2c/ov9734.c
967
v4l2_ctrl_handler_free(ov9734->sd.ctrl_handler);
drivers/media/i2c/rdacm20.c
317
struct v4l2_subdev sd;
drivers/media/i2c/rdacm20.c
323
static inline struct rdacm20_device *sd_to_rdacm20(struct v4l2_subdev *sd)
drivers/media/i2c/rdacm20.c
325
return container_of(sd, struct rdacm20_device, sd);
drivers/media/i2c/rdacm20.c
398
static int rdacm20_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/rdacm20.c
400
struct rdacm20_device *dev = sd_to_rdacm20(sd);
drivers/media/i2c/rdacm20.c
405
static int rdacm20_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/rdacm20.c
417
static int rdacm20_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/rdacm20.c
598
v4l2_i2c_subdev_init(&dev->sd, client, &rdacm20_subdev_ops);
drivers/media/i2c/rdacm20.c
599
dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/rdacm20.c
605
dev->sd.ctrl_handler = &dev->ctrls;
drivers/media/i2c/rdacm20.c
612
dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/rdacm20.c
613
ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad);
drivers/media/i2c/rdacm20.c
617
ret = v4l2_async_register_subdev(&dev->sd);
drivers/media/i2c/rdacm20.c
626
media_entity_cleanup(&dev->sd.entity);
drivers/media/i2c/rdacm20.c
638
v4l2_async_unregister_subdev(&dev->sd);
drivers/media/i2c/rdacm20.c
640
media_entity_cleanup(&dev->sd.entity);
drivers/media/i2c/rdacm20.c
649
rdacm20_s_stream(&dev->sd, 0);
drivers/media/i2c/rdacm21.c
273
static int rdacm21_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/rdacm21.c
275
struct rdacm21_device *dev = sd_to_rdacm21(sd);
drivers/media/i2c/rdacm21.c
284
static int rdacm21_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/rdacm21.c
296
static int rdacm21_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/rdacm21.c
301
struct rdacm21_device *dev = sd_to_rdacm21(sd);
drivers/media/i2c/rdacm21.c
570
v4l2_i2c_subdev_init(&dev->sd, client, &rdacm21_subdev_ops);
drivers/media/i2c/rdacm21.c
571
dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/rdacm21.c
577
dev->sd.ctrl_handler = &dev->ctrls;
drivers/media/i2c/rdacm21.c
584
dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/rdacm21.c
585
ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad);
drivers/media/i2c/rdacm21.c
589
ret = v4l2_async_register_subdev(&dev->sd);
drivers/media/i2c/rdacm21.c
607
v4l2_async_unregister_subdev(&dev->sd);
drivers/media/i2c/rdacm21.c
81
struct v4l2_subdev sd;
drivers/media/i2c/rdacm21.c
89
static inline struct rdacm21_device *sd_to_rdacm21(struct v4l2_subdev *sd)
drivers/media/i2c/rdacm21.c
91
return container_of(sd, struct rdacm21_device, sd);
drivers/media/i2c/rj54n1cb0c.c
1104
ret = rj54n1_sensor_scale(sd, &input_w, &input_h, &output_w, &output_h);
drivers/media/i2c/rj54n1cb0c.c
1127
static int rj54n1_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/rj54n1cb0c.c
1130
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/rj54n1cb0c.c
1145
static int rj54n1_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/rj54n1cb0c.c
1148
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/rj54n1cb0c.c
1161
static int rj54n1_s_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/rj54n1cb0c.c
1163
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/rj54n1cb0c.c
1190
struct v4l2_subdev *sd = &rj54n1->subdev;
drivers/media/i2c/rj54n1cb0c.c
1191
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/rj54n1cb0c.c
490
static int rj54n1_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/rj54n1cb0c.c
501
static int rj54n1_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/rj54n1cb0c.c
503
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/rj54n1cb0c.c
540
static int rj54n1_sensor_scale(struct v4l2_subdev *sd, s32 *in_w, s32 *in_h,
drivers/media/i2c/rj54n1cb0c.c
543
static int rj54n1_set_selection(struct v4l2_subdev *sd,
drivers/media/i2c/rj54n1cb0c.c
547
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/rj54n1cb0c.c
567
ret = rj54n1_sensor_scale(sd, &input_w, &input_h, &output_w, &output_h);
drivers/media/i2c/rj54n1cb0c.c
580
static int rj54n1_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/rj54n1cb0c.c
584
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/rj54n1cb0c.c
605
static int rj54n1_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/rj54n1cb0c.c
610
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/rj54n1cb0c.c
633
static int rj54n1_sensor_scale(struct v4l2_subdev *sd, s32 *in_w, s32 *in_h,
drivers/media/i2c/rj54n1cb0c.c
636
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/rj54n1cb0c.c
975
static int rj54n1_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/rj54n1cb0c.c
980
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1001
struct s5c73m3 *state = sensor_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1032
static int s5c73m3_oif_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1036
struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1071
static int s5c73m3_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1076
struct s5c73m3 *state = sensor_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1110
static int s5c73m3_oif_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1115
struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1158
static int s5c73m3_oif_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1161
struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1176
static int s5c73m3_oif_set_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1179
struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1199
static int s5c73m3_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1215
static int s5c73m3_oif_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1230
static int s5c73m3_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1257
static int s5c73m3_oif_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1261
struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1316
static int s5c73m3_oif_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1318
struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1320
v4l2_ctrl_handler_log_status(sd->ctrl_handler, sd->name);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1322
v4l2_info(sd, "power: %d, apply_fmt: %d\n", state->power,
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1328
static int s5c73m3_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1343
static int s5c73m3_oif_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1435
static int s5c73m3_oif_set_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1437
struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1455
v4l2_err(sd, "Soft landing lens failed\n");
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1460
v4l2_dbg(1, s5c73m3_dbg, sd, "%s: power: %d\n",
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1467
static int s5c73m3_oif_registered(struct v4l2_subdev *sd)
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1469
struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1472
ret = v4l2_device_register_subdev(sd->v4l2_dev, &state->sensor_sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1474
v4l2_err(sd->v4l2_dev, "Failed to register %s\n",
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1490
static void s5c73m3_oif_unregistered(struct v4l2_subdev *sd)
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1492
struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1603
struct v4l2_subdev *sd;
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1618
sd = &state->sensor_sd;
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1621
v4l2_subdev_init(sd, &s5c73m3_subdev_ops);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1622
sd->owner = client->dev.driver->owner;
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1623
v4l2_set_subdevdata(sd, state);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1624
strscpy(sd->name, "S5C73M3", sizeof(sd->name));
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1626
sd->internal_ops = &s5c73m3_internal_ops;
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1627
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1631
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1633
ret = media_entity_pads_init(&sd->entity, S5C73M3_NUM_PADS,
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1703
v4l2_info(sd, "%s: completed successfully\n", __func__);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
1709
media_entity_cleanup(&sd->entity);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
340
static int s5c73m3_load_fw(struct v4l2_subdev *sd)
drivers/media/i2c/s5c73m3/s5c73m3-core.c
342
struct s5c73m3 *state = sensor_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
352
v4l2_err(sd, "Firmware request failed (%s)\n", fw_name);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
356
v4l2_info(sd, "Loading firmware (%s, %zu B)\n", fw_name, fw->size);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
363
v4l2_err(sd, "SPI write failed\n");
drivers/media/i2c/s5c73m3/s5c73m3-core.c
411
static int __s5c73m3_s_stream(struct s5c73m3 *state, struct v4l2_subdev *sd,
drivers/media/i2c/s5c73m3/s5c73m3-core.c
443
v4l2_err(sd, "Error setting frame rate(%d)\n", ret);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
449
static int s5c73m3_oif_s_stream(struct v4l2_subdev *sd, int on)
drivers/media/i2c/s5c73m3/s5c73m3-core.c
451
struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
455
ret = __s5c73m3_s_stream(state, sd, on);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
479
struct v4l2_subdev *sd = &state->sensor_sd;
drivers/media/i2c/s5c73m3/s5c73m3-core.c
512
v4l2_info(sd, "Sensor type: %s, FW version: %s\n",
drivers/media/i2c/s5c73m3/s5c73m3-core.c
519
struct v4l2_subdev *sd = &state->sensor_sd;
drivers/media/i2c/s5c73m3/s5c73m3-core.c
524
v4l2_warn(sd, "Updating F-ROM firmware.\n");
drivers/media/i2c/s5c73m3/s5c73m3-core.c
537
v4l2_warn(sd, "Updating F-ROM firmware failed.\n");
drivers/media/i2c/s5c73m3/s5c73m3-core.c
540
v4l2_warn(sd, "Updating F-ROM firmware finished.\n");
drivers/media/i2c/s5c73m3/s5c73m3-core.c
547
v4l2_warn(sd, "Updating F-ROM firmware timed-out.\n");
drivers/media/i2c/s5c73m3/s5c73m3-core.c
553
struct v4l2_subdev *sd = &state->sensor_sd;
drivers/media/i2c/s5c73m3/s5c73m3-core.c
566
v4l2_err(sd, "booting failed: %d\n", ret);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
584
v4l2_err(sd, "SPI not ready: %d\n", ret);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
588
s5c73m3_load_fw(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
658
struct v4l2_subdev *sd = &state->sensor_sd;
drivers/media/i2c/s5c73m3/s5c73m3-core.c
671
v4l2_err(sd, "%s: booting failed: %d\n", __func__, ret);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
695
v4l2_err(sd, "SPI not ready: %d\n", ret);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
728
struct v4l2_subdev *sd = &state->sensor_sd;
drivers/media/i2c/s5c73m3/s5c73m3-core.c
740
v4l2_err(sd, "Booting failed: %d\n", ret);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
754
v4l2_err(sd, "Binary read failed: %d\n", ret);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
869
static int s5c73m3_oif_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/s5c73m3/s5c73m3-core.c
873
struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
926
static int s5c73m3_oif_set_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/s5c73m3/s5c73m3-core.c
930
struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
943
v4l2_dbg(1, s5c73m3_dbg, sd, "Setting %d/%d frame interval\n",
drivers/media/i2c/s5c73m3/s5c73m3-core.c
959
static int s5c73m3_oif_enum_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/s5c73m3/s5c73m3-core.c
963
struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c
997
static int s5c73m3_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c
106
struct v4l2_subdev *sd = &state->sensor_sd;
drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c
133
v4l2_dbg(1, s5c73m3_dbg, sd,
drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c
266
struct v4l2_subdev *sd = &state->sensor_sd;
drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c
268
v4l2_dbg(1, s5c73m3_dbg, sd, "Image stabilization: %d\n", val);
drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c
337
struct v4l2_subdev *sd = ctrl_to_sensor_sd(ctrl);
drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c
338
struct s5c73m3 *state = sensor_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c
341
v4l2_dbg(1, s5c73m3_dbg, sd, "set_ctrl: %s, value: %d\n",
drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c
60
struct v4l2_subdev *sd = ctrl_to_sensor_sd(ctrl);
drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c
61
struct s5c73m3 *state = sensor_sd_to_s5c73m3(sd);
drivers/media/i2c/s5c73m3/s5c73m3.h
439
static inline struct s5c73m3 *sensor_sd_to_s5c73m3(struct v4l2_subdev *sd)
drivers/media/i2c/s5c73m3/s5c73m3.h
441
return container_of(sd, struct s5c73m3, sensor_sd);
drivers/media/i2c/s5c73m3/s5c73m3.h
444
static inline struct s5c73m3 *oif_sd_to_s5c73m3(struct v4l2_subdev *sd)
drivers/media/i2c/s5c73m3/s5c73m3.h
446
return container_of(sd, struct s5c73m3, oif_sd);
drivers/media/i2c/s5k3m5.c
1005
static int s5k3m5_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/s5k3m5.c
1009
struct s5k3m5 *s5k3m5 = to_s5k3m5(sd);
drivers/media/i2c/s5k3m5.c
1020
static int s5k3m5_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/s5k3m5.c
1024
struct s5k3m5 *s5k3m5 = to_s5k3m5(sd);
drivers/media/i2c/s5k3m5.c
1040
static int s5k3m5_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/s5k3m5.c
1044
struct s5k3m5 *s5k3m5 = to_s5k3m5(sd);
drivers/media/i2c/s5k3m5.c
1064
static int s5k3m5_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/s5k3m5.c
1067
struct s5k3m5 *s5k3m5 = to_s5k3m5(sd);
drivers/media/i2c/s5k3m5.c
107
struct v4l2_subdev sd;
drivers/media/i2c/s5k3m5.c
1078
s5k3m5_set_pad_format(sd, state, &fmt);
drivers/media/i2c/s5k3m5.c
1177
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/s5k3m5.c
1178
struct s5k3m5 *s5k3m5 = to_s5k3m5(sd);
drivers/media/i2c/s5k3m5.c
1202
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/s5k3m5.c
1203
struct s5k3m5 *s5k3m5 = to_s5k3m5(sd);
drivers/media/i2c/s5k3m5.c
1226
v4l2_i2c_subdev_init(&s5k3m5->sd, client, &s5k3m5_subdev_ops);
drivers/media/i2c/s5k3m5.c
1282
s5k3m5->sd.state_lock = s5k3m5->ctrl_handler.lock;
drivers/media/i2c/s5k3m5.c
1283
s5k3m5->sd.internal_ops = &s5k3m5_internal_ops;
drivers/media/i2c/s5k3m5.c
1284
s5k3m5->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/s5k3m5.c
1285
s5k3m5->sd.entity.ops = &s5k3m5_subdev_entity_ops;
drivers/media/i2c/s5k3m5.c
1286
s5k3m5->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/s5k3m5.c
1289
ret = media_entity_pads_init(&s5k3m5->sd.entity, 1, &s5k3m5->pad);
drivers/media/i2c/s5k3m5.c
1296
ret = v4l2_subdev_init_finalize(&s5k3m5->sd);
drivers/media/i2c/s5k3m5.c
1306
ret = v4l2_async_register_subdev_sensor(&s5k3m5->sd);
drivers/media/i2c/s5k3m5.c
1320
v4l2_subdev_cleanup(&s5k3m5->sd);
drivers/media/i2c/s5k3m5.c
1325
media_entity_cleanup(&s5k3m5->sd.entity);
drivers/media/i2c/s5k3m5.c
1328
v4l2_ctrl_handler_free(s5k3m5->sd.ctrl_handler);
drivers/media/i2c/s5k3m5.c
1338
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/s5k3m5.c
1339
struct s5k3m5 *s5k3m5 = to_s5k3m5(sd);
drivers/media/i2c/s5k3m5.c
1341
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/s5k3m5.c
1342
v4l2_subdev_cleanup(sd);
drivers/media/i2c/s5k3m5.c
1343
media_entity_cleanup(&sd->entity);
drivers/media/i2c/s5k3m5.c
1344
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/s5k3m5.c
56
#define to_s5k3m5(_sd) container_of(_sd, struct s5k3m5, sd)
drivers/media/i2c/s5k3m5.c
854
s5k3m5->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/s5k3m5.c
864
static int s5k3m5_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/s5k3m5.c
868
struct s5k3m5 *s5k3m5 = to_s5k3m5(sd);
drivers/media/i2c/s5k3m5.c
903
ret = __v4l2_ctrl_handler_setup(s5k3m5->sd.ctrl_handler);
drivers/media/i2c/s5k3m5.c
921
static int s5k3m5_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/s5k3m5.c
925
struct s5k3m5 *s5k3m5 = to_s5k3m5(sd);
drivers/media/i2c/s5k3m5.c
960
static int s5k3m5_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/s5k3m5.c
964
struct s5k3m5 *s5k3m5 = to_s5k3m5(sd);
drivers/media/i2c/s5k3m5.c
994
if (s5k3m5->sd.ctrl_handler->error)
drivers/media/i2c/s5k3m5.c
995
return s5k3m5->sd.ctrl_handler->error;
drivers/media/i2c/s5k5baf.c
1012
struct i2c_client *c = v4l2_get_subdevdata(&state->sd);
drivers/media/i2c/s5k5baf.c
1031
static int s5k5baf_set_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/s5k5baf.c
1033
struct s5k5baf *state = to_s5k5baf(sd);
drivers/media/i2c/s5k5baf.c
1084
static int s5k5baf_s_stream(struct v4l2_subdev *sd, int on)
drivers/media/i2c/s5k5baf.c
1086
struct s5k5baf *state = to_s5k5baf(sd);
drivers/media/i2c/s5k5baf.c
1116
static int s5k5baf_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/s5k5baf.c
1120
struct s5k5baf *state = to_s5k5baf(sd);
drivers/media/i2c/s5k5baf.c
1157
v4l2_info(&state->sd, "frame interval changed to %d00us\n",
drivers/media/i2c/s5k5baf.c
1161
static int s5k5baf_set_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/s5k5baf.c
1165
struct s5k5baf *state = to_s5k5baf(sd);
drivers/media/i2c/s5k5baf.c
1183
static int s5k5baf_enum_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/s5k5baf.c
1202
static int s5k5baf_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/s5k5baf.c
1220
static int s5k5baf_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/s5k5baf.c
1278
static int s5k5baf_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/s5k5baf.c
1282
struct s5k5baf *state = to_s5k5baf(sd);
drivers/media/i2c/s5k5baf.c
1309
static int s5k5baf_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/s5k5baf.c
1314
struct s5k5baf *state = to_s5k5baf(sd);
drivers/media/i2c/s5k5baf.c
1372
static int s5k5baf_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/s5k5baf.c
1377
struct s5k5baf *state = to_s5k5baf(sd);
drivers/media/i2c/s5k5baf.c
1465
static int s5k5baf_set_selection(struct v4l2_subdev *sd,
drivers/media/i2c/s5k5baf.c
1470
struct s5k5baf *state = to_s5k5baf(sd);
drivers/media/i2c/s5k5baf.c
1554
struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
drivers/media/i2c/s5k5baf.c
1555
struct s5k5baf *state = to_s5k5baf(sd);
drivers/media/i2c/s5k5baf.c
1558
v4l2_dbg(1, debug, sd, "ctrl: %s, value: %d\n", ctrl->name, ctrl->val);
drivers/media/i2c/s5k5baf.c
1641
v4l2_err(&state->sd, "cannot init ctrl handler (%d)\n", ret);
drivers/media/i2c/s5k5baf.c
1689
v4l2_err(&state->sd, "error creating controls (%d)\n",
drivers/media/i2c/s5k5baf.c
1696
state->sd.ctrl_handler = hdl;
drivers/media/i2c/s5k5baf.c
1703
static int s5k5baf_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/s5k5baf.c
1710
if (s5k5baf_is_cis_subdev(sd))
drivers/media/i2c/s5k5baf.c
1739
v4l2_info(&state->sd, "FW API=%#x, revision=%#x sensor_id=%#x\n",
drivers/media/i2c/s5k5baf.c
1743
v4l2_err(&state->sd, "FW API version not supported\n");
drivers/media/i2c/s5k5baf.c
1750
static int s5k5baf_registered(struct v4l2_subdev *sd)
drivers/media/i2c/s5k5baf.c
1752
struct s5k5baf *state = to_s5k5baf(sd);
drivers/media/i2c/s5k5baf.c
1755
ret = v4l2_device_register_subdev(sd->v4l2_dev, &state->cis_sd);
drivers/media/i2c/s5k5baf.c
1757
v4l2_err(sd, "failed to register subdev %s\n",
drivers/media/i2c/s5k5baf.c
1761
&state->sd.entity, PAD_CIS,
drivers/media/i2c/s5k5baf.c
1767
static void s5k5baf_unregistered(struct v4l2_subdev *sd)
drivers/media/i2c/s5k5baf.c
1769
struct s5k5baf *state = to_s5k5baf(sd);
drivers/media/i2c/s5k5baf.c
1802
struct i2c_client *c = v4l2_get_subdevdata(&state->sd);
drivers/media/i2c/s5k5baf.c
1870
struct v4l2_subdev *sd;
drivers/media/i2c/s5k5baf.c
1873
sd = &state->cis_sd;
drivers/media/i2c/s5k5baf.c
1874
v4l2_subdev_init(sd, &s5k5baf_cis_subdev_ops);
drivers/media/i2c/s5k5baf.c
1875
sd->owner = THIS_MODULE;
drivers/media/i2c/s5k5baf.c
1876
v4l2_set_subdevdata(sd, state);
drivers/media/i2c/s5k5baf.c
1877
snprintf(sd->name, sizeof(sd->name), "S5K5BAF-CIS %d-%04x",
drivers/media/i2c/s5k5baf.c
1880
sd->internal_ops = &s5k5baf_cis_subdev_internal_ops;
drivers/media/i2c/s5k5baf.c
1881
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/s5k5baf.c
1884
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/s5k5baf.c
1885
ret = media_entity_pads_init(&sd->entity, NUM_CIS_PADS, &state->cis_pad);
drivers/media/i2c/s5k5baf.c
1889
sd = &state->sd;
drivers/media/i2c/s5k5baf.c
1890
v4l2_i2c_subdev_init(sd, c, &s5k5baf_subdev_ops);
drivers/media/i2c/s5k5baf.c
1891
snprintf(sd->name, sizeof(sd->name), "S5K5BAF-ISP %d-%04x",
drivers/media/i2c/s5k5baf.c
1894
sd->internal_ops = &s5k5baf_subdev_internal_ops;
drivers/media/i2c/s5k5baf.c
1895
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/s5k5baf.c
1899
sd->entity.function = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN;
drivers/media/i2c/s5k5baf.c
1900
ret = media_entity_pads_init(&sd->entity, NUM_ISP_PADS, state->pads);
drivers/media/i2c/s5k5baf.c
1907
dev_err(&c->dev, "cannot init media entity %s\n", sd->name);
drivers/media/i2c/s5k5baf.c
1913
struct i2c_client *c = v4l2_get_subdevdata(&state->sd);
drivers/media/i2c/s5k5baf.c
1957
state->clock = devm_v4l2_sensor_clk_get_legacy(state->sd.dev,
drivers/media/i2c/s5k5baf.c
1981
ret = v4l2_async_register_subdev(&state->sd);
drivers/media/i2c/s5k5baf.c
1988
v4l2_ctrl_handler_free(state->sd.ctrl_handler);
drivers/media/i2c/s5k5baf.c
1990
media_entity_cleanup(&state->sd.entity);
drivers/media/i2c/s5k5baf.c
1997
struct v4l2_subdev *sd = i2c_get_clientdata(c);
drivers/media/i2c/s5k5baf.c
1998
struct s5k5baf *state = to_s5k5baf(sd);
drivers/media/i2c/s5k5baf.c
2000
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/s5k5baf.c
2001
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/s5k5baf.c
2002
media_entity_cleanup(&sd->entity);
drivers/media/i2c/s5k5baf.c
2004
sd = &state->cis_sd;
drivers/media/i2c/s5k5baf.c
2005
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/s5k5baf.c
2006
media_entity_cleanup(&sd->entity);
drivers/media/i2c/s5k5baf.c
293
struct v4l2_subdev sd;
drivers/media/i2c/s5k5baf.c
395
return &container_of(ctrl->handler, struct s5k5baf, ctrls.handler)->sd;
drivers/media/i2c/s5k5baf.c
398
static inline bool s5k5baf_is_cis_subdev(struct v4l2_subdev *sd)
drivers/media/i2c/s5k5baf.c
400
return sd->entity.function == MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/s5k5baf.c
403
static inline struct s5k5baf *to_s5k5baf(struct v4l2_subdev *sd)
drivers/media/i2c/s5k5baf.c
405
if (s5k5baf_is_cis_subdev(sd))
drivers/media/i2c/s5k5baf.c
406
return container_of(sd, struct s5k5baf, cis_sd);
drivers/media/i2c/s5k5baf.c
408
return container_of(sd, struct s5k5baf, sd);
drivers/media/i2c/s5k5baf.c
413
struct i2c_client *c = v4l2_get_subdevdata(&state->sd);
drivers/media/i2c/s5k5baf.c
443
struct i2c_client *c = v4l2_get_subdevdata(&state->sd);
drivers/media/i2c/s5k5baf.c
473
struct i2c_client *c = v4l2_get_subdevdata(&state->sd);
drivers/media/i2c/s5k5baf.c
545
v4l2_err(&state->sd, "timeout on register synchronize (%#x)\n", addr);
drivers/media/i2c/s5k5baf.c
595
v4l2_err(&state->sd, "error configuring PLL (%d)\n", status);
drivers/media/i2c/s5k5baf.c
803
v4l2_info(&state->sd,
drivers/media/i2c/s5k5baf.c
807
v4l2_err(&state->sd,
drivers/media/i2c/s5k5baf.c
812
v4l2_err(&state->sd, "cannot find correct frame interval\n");
drivers/media/i2c/s5k5baf.c
834
v4l2_err(&state->sd,
drivers/media/i2c/s5k5baf.c
883
v4l2_err(&state->sd,
drivers/media/i2c/s5k5baf.c
891
v4l2_err(&state->sd, "crop error: %d\n", err);
drivers/media/i2c/s5k5baf.c
952
v4l2_dbg(1, debug, &state->sd, "clock frequency: %ld\n",
drivers/media/i2c/s5k5baf.c
963
v4l2_err(&state->sd, "%s() failed (%d)\n", __func__, ret);
drivers/media/i2c/s5k5baf.c
984
v4l2_err(&state->sd, "failed to disable regulators\n");
drivers/media/i2c/s5k6a3.c
133
static int s5k6a3_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/s5k6a3.c
137
struct s5k6a3 *sensor = sd_to_s5k6a3(sd);
drivers/media/i2c/s5k6a3.c
151
static int s5k6a3_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/s5k6a3.c
155
struct s5k6a3 *sensor = sd_to_s5k6a3(sd);
drivers/media/i2c/s5k6a3.c
172
static int s5k6a3_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/s5k6a3.c
245
static int s5k6a3_s_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/s5k6a3.c
247
struct s5k6a3 *sensor = sd_to_s5k6a3(sd);
drivers/media/i2c/s5k6a3.c
279
struct v4l2_subdev *sd;
drivers/media/i2c/s5k6a3.c
309
sd = &sensor->subdev;
drivers/media/i2c/s5k6a3.c
310
v4l2_i2c_subdev_init(sd, client, &s5k6a3_subdev_ops);
drivers/media/i2c/s5k6a3.c
312
sd->internal_ops = &s5k6a3_sd_internal_ops;
drivers/media/i2c/s5k6a3.c
318
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/s5k6a3.c
320
ret = media_entity_pads_init(&sd->entity, 1, &sensor->pad);
drivers/media/i2c/s5k6a3.c
327
ret = v4l2_async_register_subdev(sd);
drivers/media/i2c/s5k6a3.c
331
media_entity_cleanup(&sd->entity);
drivers/media/i2c/s5k6a3.c
339
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/s5k6a3.c
342
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/s5k6a3.c
343
media_entity_cleanup(&sd->entity);
drivers/media/i2c/s5k6a3.c
74
static inline struct s5k6a3 *sd_to_s5k6a3(struct v4l2_subdev *sd)
drivers/media/i2c/s5k6a3.c
76
return container_of(sd, struct s5k6a3, subdev);
drivers/media/i2c/s5k6a3.c
99
static int s5k6a3_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/s5kjn1.c
102
struct v4l2_subdev sd;
drivers/media/i2c/s5kjn1.c
1021
if (s5kjn1->sd.ctrl_handler->error)
drivers/media/i2c/s5kjn1.c
1022
return s5kjn1->sd.ctrl_handler->error;
drivers/media/i2c/s5kjn1.c
1032
static int s5kjn1_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/s5kjn1.c
1036
struct s5kjn1 *s5kjn1 = to_s5kjn1(sd);
drivers/media/i2c/s5kjn1.c
1047
static int s5kjn1_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/s5kjn1.c
1051
struct s5kjn1 *s5kjn1 = to_s5kjn1(sd);
drivers/media/i2c/s5kjn1.c
1067
static int s5kjn1_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/s5kjn1.c
1071
struct s5kjn1 *s5kjn1 = to_s5kjn1(sd);
drivers/media/i2c/s5kjn1.c
1091
static int s5kjn1_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/s5kjn1.c
1094
struct s5kjn1 *s5kjn1 = to_s5kjn1(sd);
drivers/media/i2c/s5kjn1.c
1105
s5kjn1_set_pad_format(sd, state, &fmt);
drivers/media/i2c/s5kjn1.c
1204
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/s5kjn1.c
1205
struct s5kjn1 *s5kjn1 = to_s5kjn1(sd);
drivers/media/i2c/s5kjn1.c
1266
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/s5kjn1.c
1267
struct s5kjn1 *s5kjn1 = to_s5kjn1(sd);
drivers/media/i2c/s5kjn1.c
1301
v4l2_i2c_subdev_init(&s5kjn1->sd, client, &s5kjn1_subdev_ops);
drivers/media/i2c/s5kjn1.c
1392
s5kjn1->sd.state_lock = s5kjn1->ctrl_handler.lock;
drivers/media/i2c/s5kjn1.c
1393
s5kjn1->sd.internal_ops = &s5kjn1_internal_ops;
drivers/media/i2c/s5kjn1.c
1394
s5kjn1->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/s5kjn1.c
1395
s5kjn1->sd.entity.ops = &s5kjn1_subdev_entity_ops;
drivers/media/i2c/s5kjn1.c
1396
s5kjn1->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/s5kjn1.c
1399
ret = media_entity_pads_init(&s5kjn1->sd.entity, 1, &s5kjn1->pad);
drivers/media/i2c/s5kjn1.c
1406
ret = v4l2_subdev_init_finalize(&s5kjn1->sd);
drivers/media/i2c/s5kjn1.c
1416
ret = v4l2_async_register_subdev_sensor(&s5kjn1->sd);
drivers/media/i2c/s5kjn1.c
1430
v4l2_subdev_cleanup(&s5kjn1->sd);
drivers/media/i2c/s5kjn1.c
1435
media_entity_cleanup(&s5kjn1->sd.entity);
drivers/media/i2c/s5kjn1.c
1438
v4l2_ctrl_handler_free(s5kjn1->sd.ctrl_handler);
drivers/media/i2c/s5kjn1.c
1448
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/s5kjn1.c
1449
struct s5kjn1 *s5kjn1 = to_s5kjn1(sd);
drivers/media/i2c/s5kjn1.c
1451
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/s5kjn1.c
1452
v4l2_subdev_cleanup(sd);
drivers/media/i2c/s5kjn1.c
1453
media_entity_cleanup(&sd->entity);
drivers/media/i2c/s5kjn1.c
1454
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/s5kjn1.c
56
#define to_s5kjn1(_sd) container_of(_sd, struct s5kjn1, sd)
drivers/media/i2c/s5kjn1.c
882
s5kjn1->sd.ctrl_handler = ctrl_hdlr;
drivers/media/i2c/s5kjn1.c
892
static int s5kjn1_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/s5kjn1.c
896
struct s5kjn1 *s5kjn1 = to_s5kjn1(sd);
drivers/media/i2c/s5kjn1.c
932
ret = __v4l2_ctrl_handler_setup(s5kjn1->sd.ctrl_handler);
drivers/media/i2c/s5kjn1.c
948
static int s5kjn1_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/s5kjn1.c
952
struct s5kjn1 *s5kjn1 = to_s5kjn1(sd);
drivers/media/i2c/s5kjn1.c
987
static int s5kjn1_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/s5kjn1.c
991
struct s5kjn1 *s5kjn1 = to_s5kjn1(sd);
drivers/media/i2c/saa6588.c
145
v4l2_info(&s->sd, "Read: buffer empty.\n");
drivers/media/i2c/saa6588.c
150
v4l2_info(&s->sd, "Read: ");
drivers/media/i2c/saa6588.c
152
v4l2_info(&s->sd, "0x%02x ", s->buffer[i]);
drivers/media/i2c/saa6588.c
163
v4l2_info(&s->sd, "%d blocks total.\n", s->block_count);
drivers/media/i2c/saa6588.c
223
v4l2_info(&s->sd, "New block: ");
drivers/media/i2c/saa6588.c
227
v4l2_info(&s->sd, "0x%02x ", blockbuf[i]);
drivers/media/i2c/saa6588.c
243
v4l2_info(&s->sd, "%d blocks total.\n", s->block_count);
drivers/media/i2c/saa6588.c
248
struct i2c_client *client = v4l2_get_subdevdata(&s->sd);
drivers/media/i2c/saa6588.c
258
v4l2_info(&s->sd, "read error!\n");
drivers/media/i2c/saa6588.c
268
v4l2_info(&s->sd, "Saw block %d again.\n", blocknum);
drivers/media/i2c/saa6588.c
326
struct i2c_client *client = v4l2_get_subdevdata(&s->sd);
drivers/media/i2c/saa6588.c
372
v4l2_info(&s->sd, "writing: 0w=0x%02x 1w=0x%02x 2w=0x%02x\n",
drivers/media/i2c/saa6588.c
377
v4l2_info(&s->sd, "i2c i/o error: rc == %d (should be 3)\n", rc);
drivers/media/i2c/saa6588.c
382
static long saa6588_command(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
drivers/media/i2c/saa6588.c
384
struct saa6588 *s = to_saa6588(sd);
drivers/media/i2c/saa6588.c
414
static int saa6588_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
drivers/media/i2c/saa6588.c
416
struct saa6588 *s = to_saa6588(sd);
drivers/media/i2c/saa6588.c
424
static int saa6588_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
drivers/media/i2c/saa6588.c
426
struct saa6588 *s = to_saa6588(sd);
drivers/media/i2c/saa6588.c
453
struct v4l2_subdev *sd;
drivers/media/i2c/saa6588.c
467
sd = &s->sd;
drivers/media/i2c/saa6588.c
468
v4l2_i2c_subdev_init(sd, client, &saa6588_ops);
drivers/media/i2c/saa6588.c
487
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/saa6588.c
488
struct saa6588 *s = to_saa6588(sd);
drivers/media/i2c/saa6588.c
490
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/saa6588.c
54
struct v4l2_subdev sd;
drivers/media/i2c/saa6588.c
68
static inline struct saa6588 *to_saa6588(struct v4l2_subdev *sd)
drivers/media/i2c/saa6588.c
70
return container_of(sd, struct saa6588, sd);
drivers/media/i2c/saa6752hs.c
108
static inline struct saa6752hs_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/saa6752hs.c
110
return container_of(sd, struct saa6752hs_state, sd);
drivers/media/i2c/saa6752hs.c
424
static int saa6752hs_init(struct v4l2_subdev *sd, u32 leading_null_bytes)
drivers/media/i2c/saa6752hs.c
427
struct saa6752hs_state *h = to_state(sd);
drivers/media/i2c/saa6752hs.c
428
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/saa6752hs.c
545
static int saa6752hs_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/saa6752hs.c
550
struct saa6752hs_state *h = to_state(sd);
drivers/media/i2c/saa6752hs.c
565
static int saa6752hs_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/saa6752hs.c
570
struct saa6752hs_state *h = to_state(sd);
drivers/media/i2c/saa6752hs.c
626
static int saa6752hs_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/saa6752hs.c
628
struct saa6752hs_state *h = to_state(sd);
drivers/media/i2c/saa6752hs.c
663
struct v4l2_subdev *sd;
drivers/media/i2c/saa6752hs.c
674
sd = &h->sd;
drivers/media/i2c/saa6752hs.c
675
v4l2_i2c_subdev_init(sd, client, &saa6752hs_ops);
drivers/media/i2c/saa6752hs.c
751
sd->ctrl_handler = hdl;
drivers/media/i2c/saa6752hs.c
766
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/saa6752hs.c
768
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/saa6752hs.c
769
v4l2_ctrl_handler_free(&to_state(sd)->hdl);
drivers/media/i2c/saa6752hs.c
82
struct v4l2_subdev sd;
drivers/media/i2c/saa7110.c
105
static inline int saa7110_read(struct v4l2_subdev *sd)
drivers/media/i2c/saa7110.c
107
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/saa7110.c
120
static int saa7110_selmux(struct v4l2_subdev *sd, int chan)
drivers/media/i2c/saa7110.c
151
struct saa7110 *decoder = to_saa7110(sd);
drivers/media/i2c/saa7110.c
154
saa7110_write(sd, 0x06, ptr[0]); /* Luminance control */
drivers/media/i2c/saa7110.c
155
saa7110_write(sd, 0x20, ptr[1]); /* Analog Control #1 */
drivers/media/i2c/saa7110.c
156
saa7110_write(sd, 0x21, ptr[2]); /* Analog Control #2 */
drivers/media/i2c/saa7110.c
157
saa7110_write(sd, 0x22, ptr[3]); /* Mixer Control #1 */
drivers/media/i2c/saa7110.c
158
saa7110_write(sd, 0x2C, ptr[4]); /* Mixer Control #2 */
drivers/media/i2c/saa7110.c
159
saa7110_write(sd, 0x30, ptr[5]); /* ADCs gain control */
drivers/media/i2c/saa7110.c
160
saa7110_write(sd, 0x31, ptr[6]); /* Mixer Control #3 */
drivers/media/i2c/saa7110.c
161
saa7110_write(sd, 0x21, ptr[7]); /* Analog Control #2 */
drivers/media/i2c/saa7110.c
177
static v4l2_std_id determine_norm(struct v4l2_subdev *sd)
drivers/media/i2c/saa7110.c
180
struct saa7110 *decoder = to_saa7110(sd);
drivers/media/i2c/saa7110.c
184
saa7110_write_block(sd, initseq, sizeof(initseq));
drivers/media/i2c/saa7110.c
185
saa7110_selmux(sd, decoder->input);
drivers/media/i2c/saa7110.c
189
status = saa7110_read(sd);
drivers/media/i2c/saa7110.c
191
v4l2_dbg(1, debug, sd, "status=0x%02x (no signal)\n", status);
drivers/media/i2c/saa7110.c
195
saa7110_write(sd, 0x06, 0x83);
drivers/media/i2c/saa7110.c
197
v4l2_dbg(1, debug, sd, "status=0x%02x (NTSC/no color)\n", status);
drivers/media/i2c/saa7110.c
201
v4l2_dbg(1, debug, sd, "status=0x%02x (PAL/no color)\n", status);
drivers/media/i2c/saa7110.c
207
v4l2_dbg(1, debug, sd, "status=0x%02x (NTSC)\n", status);
drivers/media/i2c/saa7110.c
208
saa7110_write(sd, 0x0D, 0x86);
drivers/media/i2c/saa7110.c
209
saa7110_write(sd, 0x0F, 0x50);
drivers/media/i2c/saa7110.c
210
saa7110_write(sd, 0x11, 0x2C);
drivers/media/i2c/saa7110.c
216
saa7110_write(sd, 0x0D, 0x86);
drivers/media/i2c/saa7110.c
217
saa7110_write(sd, 0x0F, 0x10);
drivers/media/i2c/saa7110.c
218
saa7110_write(sd, 0x11, 0x59);
drivers/media/i2c/saa7110.c
225
status = saa7110_read(sd);
drivers/media/i2c/saa7110.c
227
v4l2_dbg(1, debug, sd, "status=0x%02x (SECAM)\n", status);
drivers/media/i2c/saa7110.c
228
saa7110_write(sd, 0x0D, 0x87);
drivers/media/i2c/saa7110.c
231
v4l2_dbg(1, debug, sd, "status=0x%02x (PAL)\n", status);
drivers/media/i2c/saa7110.c
235
static int saa7110_g_input_status(struct v4l2_subdev *sd, u32 *pstatus)
drivers/media/i2c/saa7110.c
237
struct saa7110 *decoder = to_saa7110(sd);
drivers/media/i2c/saa7110.c
239
int status = saa7110_read(sd);
drivers/media/i2c/saa7110.c
241
v4l2_dbg(1, debug, sd, "status=0x%02x norm=%llx\n",
drivers/media/i2c/saa7110.c
252
static int saa7110_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/saa7110.c
254
*std &= determine_norm(sd);
drivers/media/i2c/saa7110.c
258
static int saa7110_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/saa7110.c
260
struct saa7110 *decoder = to_saa7110(sd);
drivers/media/i2c/saa7110.c
266
saa7110_write(sd, 0x0D, 0x86);
drivers/media/i2c/saa7110.c
267
saa7110_write(sd, 0x0F, 0x50);
drivers/media/i2c/saa7110.c
268
saa7110_write(sd, 0x11, 0x2C);
drivers/media/i2c/saa7110.c
270
v4l2_dbg(1, debug, sd, "switched to NTSC\n");
drivers/media/i2c/saa7110.c
272
saa7110_write(sd, 0x0D, 0x86);
drivers/media/i2c/saa7110.c
273
saa7110_write(sd, 0x0F, 0x10);
drivers/media/i2c/saa7110.c
274
saa7110_write(sd, 0x11, 0x59);
drivers/media/i2c/saa7110.c
276
v4l2_dbg(1, debug, sd, "switched to PAL\n");
drivers/media/i2c/saa7110.c
278
saa7110_write(sd, 0x0D, 0x87);
drivers/media/i2c/saa7110.c
279
saa7110_write(sd, 0x0F, 0x10);
drivers/media/i2c/saa7110.c
280
saa7110_write(sd, 0x11, 0x59);
drivers/media/i2c/saa7110.c
282
v4l2_dbg(1, debug, sd, "switched to SECAM\n");
drivers/media/i2c/saa7110.c
290
static int saa7110_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/saa7110.c
293
struct saa7110 *decoder = to_saa7110(sd);
drivers/media/i2c/saa7110.c
296
v4l2_dbg(1, debug, sd, "input=%d not available\n", input);
drivers/media/i2c/saa7110.c
300
saa7110_selmux(sd, input);
drivers/media/i2c/saa7110.c
301
v4l2_dbg(1, debug, sd, "switched to input=%d\n", input);
drivers/media/i2c/saa7110.c
306
static int saa7110_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/saa7110.c
308
struct saa7110 *decoder = to_saa7110(sd);
drivers/media/i2c/saa7110.c
312
saa7110_write(sd, 0x0E, enable ? 0x18 : 0x80);
drivers/media/i2c/saa7110.c
313
v4l2_dbg(1, debug, sd, "YUV %s\n", enable ? "on" : "off");
drivers/media/i2c/saa7110.c
320
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/saa7110.c
324
saa7110_write(sd, 0x19, ctrl->val);
drivers/media/i2c/saa7110.c
327
saa7110_write(sd, 0x13, ctrl->val);
drivers/media/i2c/saa7110.c
330
saa7110_write(sd, 0x12, ctrl->val);
drivers/media/i2c/saa7110.c
333
saa7110_write(sd, 0x07, ctrl->val);
drivers/media/i2c/saa7110.c
364
struct v4l2_subdev *sd;
drivers/media/i2c/saa7110.c
378
sd = &decoder->sd;
drivers/media/i2c/saa7110.c
379
v4l2_i2c_subdev_init(sd, client, &saa7110_ops);
drivers/media/i2c/saa7110.c
392
sd->ctrl_handler = &decoder->hdl;
drivers/media/i2c/saa7110.c
403
rv = saa7110_write_block(sd, initseq, sizeof(initseq));
drivers/media/i2c/saa7110.c
405
v4l2_dbg(1, debug, sd, "init status %d\n", rv);
drivers/media/i2c/saa7110.c
408
saa7110_write(sd, 0x21, 0x10);
drivers/media/i2c/saa7110.c
409
saa7110_write(sd, 0x0e, 0x18);
drivers/media/i2c/saa7110.c
410
saa7110_write(sd, 0x0D, 0x04);
drivers/media/i2c/saa7110.c
411
ver = saa7110_read(sd);
drivers/media/i2c/saa7110.c
412
saa7110_write(sd, 0x0D, 0x06);
drivers/media/i2c/saa7110.c
414
status = saa7110_read(sd);
drivers/media/i2c/saa7110.c
415
v4l2_dbg(1, debug, sd, "version %x, status=0x%02x\n",
drivers/media/i2c/saa7110.c
417
saa7110_write(sd, 0x0D, 0x86);
drivers/media/i2c/saa7110.c
418
saa7110_write(sd, 0x0F, 0x10);
drivers/media/i2c/saa7110.c
419
saa7110_write(sd, 0x11, 0x59);
drivers/media/i2c/saa7110.c
42
struct v4l2_subdev sd;
drivers/media/i2c/saa7110.c
432
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/saa7110.c
433
struct saa7110 *decoder = to_saa7110(sd);
drivers/media/i2c/saa7110.c
435
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/saa7110.c
53
static inline struct saa7110 *to_saa7110(struct v4l2_subdev *sd)
drivers/media/i2c/saa7110.c
55
return container_of(sd, struct saa7110, sd);
drivers/media/i2c/saa7110.c
60
return &container_of(ctrl->handler, struct saa7110, hdl)->sd;
drivers/media/i2c/saa7110.c
67
static int saa7110_write(struct v4l2_subdev *sd, u8 reg, u8 value)
drivers/media/i2c/saa7110.c
69
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/saa7110.c
70
struct saa7110 *decoder = to_saa7110(sd);
drivers/media/i2c/saa7110.c
76
static int saa7110_write_block(struct v4l2_subdev *sd, const u8 *data, unsigned int len)
drivers/media/i2c/saa7110.c
78
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/saa7110.c
79
struct saa7110 *decoder = to_saa7110(sd);
drivers/media/i2c/saa7110.c
96
ret = saa7110_write(sd, reg++, *data++);
drivers/media/i2c/saa7115.c
100
return container_of(sd, struct saa711x_state, sd);
drivers/media/i2c/saa7115.c
1013
u8 reg = saa711x_read(sd, R_0E_CHROMA_CNTL_1) & 0x8f;
drivers/media/i2c/saa7115.c
1026
saa711x_write(sd, R_0E_CHROMA_CNTL_1, reg);
drivers/media/i2c/saa7115.c
1029
int taskb = saa711x_read(sd, R_80_GLOBAL_CNTL_1) & 0x10;
drivers/media/i2c/saa7115.c
1032
saa711x_writeregs(sd, saa7115_cfg_vbi_on);
drivers/media/i2c/saa7115.c
1035
saa711x_s_clock_freq(sd, state->audclk_freq);
drivers/media/i2c/saa7115.c
1040
static void saa711x_set_lcr(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt)
drivers/media/i2c/saa7115.c
1042
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
105
return &container_of(ctrl->handler, struct saa711x_state, hdl)->sd;
drivers/media/i2c/saa7115.c
110
static inline int saa711x_write(struct v4l2_subdev *sd, u8 reg, u8 value)
drivers/media/i2c/saa7115.c
1113
saa711x_write(sd, i - 2 + R_41_LCR_BASE, lcr[i]);
drivers/media/i2c/saa7115.c
1117
saa711x_writeregs(sd, fmt == NULL ?
drivers/media/i2c/saa7115.c
112
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/saa7115.c
1122
static int saa711x_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *sliced)
drivers/media/i2c/saa7115.c
1136
if (saa711x_read(sd, R_80_GLOBAL_CNTL_1) & 0x10)
drivers/media/i2c/saa7115.c
1139
u8 v = saa711x_read(sd, i - 2 + R_41_LCR_BASE);
drivers/media/i2c/saa7115.c
1149
static int saa711x_s_raw_fmt(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt)
drivers/media/i2c/saa7115.c
1151
saa711x_set_lcr(sd, NULL);
drivers/media/i2c/saa7115.c
1155
static int saa711x_s_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt)
drivers/media/i2c/saa7115.c
1157
saa711x_set_lcr(sd, fmt);
drivers/media/i2c/saa7115.c
1161
static int saa711x_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/saa7115.c
1173
return saa711x_set_size(sd, fmt->width, fmt->height);
drivers/media/i2c/saa7115.c
1182
static int saa711x_decode_vbi_line(struct v4l2_subdev *sd, struct v4l2_decode_vbi_line *vbi)
drivers/media/i2c/saa7115.c
1184
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
1247
static int saa711x_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
drivers/media/i2c/saa7115.c
1249
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
1254
status = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
drivers/media/i2c/saa7115.c
1256
v4l2_dbg(1, debug, sd, "status: 0x%02x\n", status);
drivers/media/i2c/saa7115.c
1261
static int saa711x_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/saa7115.c
1263
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
1266
saa711x_set_v4lstd(sd, std);
drivers/media/i2c/saa7115.c
1270
static int saa711x_s_radio(struct v4l2_subdev *sd)
drivers/media/i2c/saa7115.c
1272
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
1278
static int saa711x_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/saa7115.c
1281
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
1284
v4l2_dbg(1, debug, sd, "decoder set input %d output %d\n",
drivers/media/i2c/saa7115.c
1298
v4l2_dbg(1, debug, sd, "now setting %s input %s output\n",
drivers/media/i2c/saa7115.c
1308
saa711x_write(sd, R_10_CHROMA_CNTL_2,
drivers/media/i2c/saa7115.c
1309
(saa711x_read(sd, R_10_CHROMA_CNTL_2) & 0x3f) |
drivers/media/i2c/saa7115.c
1311
saa711x_write(sd, R_13_RT_X_PORT_OUT_CNTL,
drivers/media/i2c/saa7115.c
1312
(saa711x_read(sd, R_13_RT_X_PORT_OUT_CNTL) & 0xf0) |
drivers/media/i2c/saa7115.c
1317
saa711x_write(sd, R_02_INPUT_CNTL_1,
drivers/media/i2c/saa7115.c
1318
(saa711x_read(sd, R_02_INPUT_CNTL_1) & mask) |
drivers/media/i2c/saa7115.c
1322
saa711x_write(sd, R_09_LUMA_CNTL,
drivers/media/i2c/saa7115.c
1323
(saa711x_read(sd, R_09_LUMA_CNTL) & 0x7f) |
drivers/media/i2c/saa7115.c
1329
saa711x_write(sd, R_83_X_PORT_I_O_ENA_AND_OUT_CLK,
drivers/media/i2c/saa7115.c
1330
(saa711x_read(sd, R_83_X_PORT_I_O_ENA_AND_OUT_CLK) & 0xfe) |
drivers/media/i2c/saa7115.c
1335
saa711x_write(sd, R_85_I_PORT_SIGNAL_POLAR, 0x20);
drivers/media/i2c/saa7115.c
1337
saa711x_write(sd, R_85_I_PORT_SIGNAL_POLAR, 0x21);
drivers/media/i2c/saa7115.c
1342
static int saa711x_s_gpio(struct v4l2_subdev *sd, u32 val)
drivers/media/i2c/saa7115.c
1344
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
1348
saa711x_write(sd, 0x11, (saa711x_read(sd, 0x11) & 0x7f) |
drivers/media/i2c/saa7115.c
1353
static int saa711x_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/saa7115.c
1355
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
1357
v4l2_dbg(1, debug, sd, "%s output\n",
drivers/media/i2c/saa7115.c
1365
saa711x_write(sd, R_87_I_PORT_I_O_ENA_OUT_CLK_AND_GATED, state->enable);
drivers/media/i2c/saa7115.c
1369
static int saa711x_s_crystal_freq(struct v4l2_subdev *sd, u32 freq, u32 flags)
drivers/media/i2c/saa7115.c
1371
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
1380
saa711x_s_clock_freq(sd, state->audclk_freq);
drivers/media/i2c/saa7115.c
1384
static int saa711x_reset(struct v4l2_subdev *sd, u32 val)
drivers/media/i2c/saa7115.c
1386
v4l2_dbg(1, debug, sd, "decoder RESET\n");
drivers/media/i2c/saa7115.c
1387
saa711x_writeregs(sd, saa7115_cfg_reset_scaler);
drivers/media/i2c/saa7115.c
1391
static int saa711x_g_vbi_data(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_data *data)
drivers/media/i2c/saa7115.c
1398
if (saa711x_read(sd, 0x6b) & 0xc0)
drivers/media/i2c/saa7115.c
1400
data->data[0] = saa711x_read(sd, 0x6c);
drivers/media/i2c/saa7115.c
1401
data->data[1] = saa711x_read(sd, 0x6d);
drivers/media/i2c/saa7115.c
1406
if (saa711x_read(sd, 0x66) & 0x30)
drivers/media/i2c/saa7115.c
1408
data->data[0] = saa711x_read(sd, 0x69);
drivers/media/i2c/saa7115.c
1409
data->data[1] = saa711x_read(sd, 0x6a);
drivers/media/i2c/saa7115.c
1413
if (saa711x_read(sd, 0x66) & 0xc0)
drivers/media/i2c/saa7115.c
1415
data->data[0] = saa711x_read(sd, 0x67);
drivers/media/i2c/saa7115.c
1416
data->data[1] = saa711x_read(sd, 0x68);
drivers/media/i2c/saa7115.c
1423
static int saa711x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/saa7115.c
1425
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
1434
reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
drivers/media/i2c/saa7115.c
1437
reg1e = saa711x_read(sd, R_1E_STATUS_BYTE_1_VD_DEC);
drivers/media/i2c/saa7115.c
1439
v4l2_dbg(1, debug, sd, "Status byte 1 (0x1e)=0x%02x\n", reg1e);
drivers/media/i2c/saa7115.c
1464
v4l2_dbg(1, debug, sd, "Status byte 2 (0x1f)=0x%02x\n", reg1f);
drivers/media/i2c/saa7115.c
1478
v4l2_dbg(1, debug, sd, "detected std mask = %08Lx\n", *std);
drivers/media/i2c/saa7115.c
1483
static int saa711x_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/saa7115.c
1485
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
1491
reg1e = saa711x_read(sd, R_1E_STATUS_BYTE_1_VD_DEC);
drivers/media/i2c/saa7115.c
1492
reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
drivers/media/i2c/saa7115.c
1499
static int saa711x_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
drivers/media/i2c/saa7115.c
1501
reg->val = saa711x_read(sd, reg->reg & 0xff);
drivers/media/i2c/saa7115.c
1506
static int saa711x_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
drivers/media/i2c/saa7115.c
1508
saa711x_write(sd, reg->reg & 0xff, reg->val & 0xff);
drivers/media/i2c/saa7115.c
1513
static int saa711x_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/saa7115.c
1515
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
1520
v4l2_info(sd, "Audio frequency: %d Hz\n", state->audclk_freq);
drivers/media/i2c/saa7115.c
1523
reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
drivers/media/i2c/saa7115.c
1525
v4l2_info(sd, "Video signal: %s\n", signalOk ? "ok" : "bad");
drivers/media/i2c/saa7115.c
1526
v4l2_info(sd, "Frequency: %s\n", (reg1f & 0x20) ? "60 Hz" : "50 Hz");
drivers/media/i2c/saa7115.c
1531
reg1e = saa711x_read(sd, R_1E_STATUS_BYTE_1_VD_DEC);
drivers/media/i2c/saa7115.c
1532
reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
drivers/media/i2c/saa7115.c
1538
v4l2_info(sd, "Input: S-Video %d\n", state->input - 6);
drivers/media/i2c/saa7115.c
1540
v4l2_info(sd, "Input: Composite %d\n", state->input);
drivers/media/i2c/saa7115.c
1541
v4l2_info(sd, "Video signal: %s\n", signalOk ? (vcr ? "VCR" : "broadcast/DVD") : "bad");
drivers/media/i2c/saa7115.c
1542
v4l2_info(sd, "Frequency: %s\n", (reg1f & 0x20) ? "60 Hz" : "50 Hz");
drivers/media/i2c/saa7115.c
1546
v4l2_info(sd, "Detected format: NTSC\n");
drivers/media/i2c/saa7115.c
1549
v4l2_info(sd, "Detected format: PAL\n");
drivers/media/i2c/saa7115.c
155
static int saa711x_writeregs(struct v4l2_subdev *sd, const unsigned char *regs)
drivers/media/i2c/saa7115.c
1552
v4l2_info(sd, "Detected format: SECAM\n");
drivers/media/i2c/saa7115.c
1555
v4l2_info(sd, "Detected format: BW/No color\n");
drivers/media/i2c/saa7115.c
1558
v4l2_info(sd, "Width, Height: %d, %d\n", state->width, state->height);
drivers/media/i2c/saa7115.c
1559
v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
drivers/media/i2c/saa7115.c
157
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
1626
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/saa7115.c
1634
work = saa711x_read(sd, R_08_SYNC_CNTL);
drivers/media/i2c/saa7115.c
1637
saa711x_write(sd, R_08_SYNC_CNTL, work);
drivers/media/i2c/saa7115.c
1641
work = saa711x_read(sd, R_10_CHROMA_CNTL_2);
drivers/media/i2c/saa7115.c
1645
saa711x_write(sd, R_10_CHROMA_CNTL_2, work);
drivers/media/i2c/saa7115.c
1649
work = saa711x_read(sd, R_10_CHROMA_CNTL_2);
drivers/media/i2c/saa7115.c
1652
saa711x_write(sd, R_10_CHROMA_CNTL_2, work);
drivers/media/i2c/saa7115.c
1656
work = saa711x_read(sd, R_12_RT_SIGNAL_CNTL);
drivers/media/i2c/saa7115.c
1663
saa711x_write(sd, R_12_RT_SIGNAL_CNTL, work);
drivers/media/i2c/saa7115.c
1667
work = saa711x_read(sd, R_12_RT_SIGNAL_CNTL);
drivers/media/i2c/saa7115.c
167
if (saa711x_write(sd, reg, data) < 0)
drivers/media/i2c/saa7115.c
1670
saa711x_write(sd, R_12_RT_SIGNAL_CNTL, work);
drivers/media/i2c/saa7115.c
1674
work = saa711x_read(sd, R_13_RT_X_PORT_OUT_CNTL);
drivers/media/i2c/saa7115.c
1678
saa711x_write(sd, R_13_RT_X_PORT_OUT_CNTL, work);
drivers/media/i2c/saa7115.c
170
v4l2_dbg(1, debug, sd, "tried to access reserved reg 0x%02x\n", reg);
drivers/media/i2c/saa7115.c
176
static inline int saa711x_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/saa7115.c
178
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/saa7115.c
1803
struct v4l2_subdev *sd;
drivers/media/i2c/saa7115.c
1831
sd = &state->sd;
drivers/media/i2c/saa7115.c
1832
v4l2_i2c_subdev_init(sd, client, &saa711x_ops);
drivers/media/i2c/saa7115.c
1840
sd->entity.function = MEDIA_ENT_F_ATV_DECODER;
drivers/media/i2c/saa7115.c
1842
ret = media_entity_pads_init(&sd->entity, SAA711X_NUM_PADS,
drivers/media/i2c/saa7115.c
1865
sd->ctrl_handler = hdl;
drivers/media/i2c/saa7115.c
1882
v4l2_dbg(1, debug, sd, "writing init values\n");
drivers/media/i2c/saa7115.c
1890
saa711x_writeregs(sd, saa7111_init);
drivers/media/i2c/saa7115.c
1893
saa711x_writeregs(sd, gm7113c_init);
drivers/media/i2c/saa7115.c
1897
saa711x_writeregs(sd, gm7113c_init);
drivers/media/i2c/saa7115.c
1899
saa711x_writeregs(sd, saa7113_init);
drivers/media/i2c/saa7115.c
1903
saa711x_writeregs(sd, saa7115_init_auto_input);
drivers/media/i2c/saa7115.c
1906
saa711x_writeregs(sd, saa7115_init_misc);
drivers/media/i2c/saa7115.c
1911
saa711x_set_v4lstd(sd, V4L2_STD_NTSC);
drivers/media/i2c/saa7115.c
1914
v4l2_dbg(1, debug, sd, "status: (1E) 0x%02x, (1F) 0x%02x\n",
drivers/media/i2c/saa7115.c
1915
saa711x_read(sd, R_1E_STATUS_BYTE_1_VD_DEC),
drivers/media/i2c/saa7115.c
1916
saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC));
drivers/media/i2c/saa7115.c
1924
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/saa7115.c
1926
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/saa7115.c
1927
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/saa7115.c
70
struct v4l2_subdev sd;
drivers/media/i2c/saa7115.c
742
static int saa711x_s_clock_freq(struct v4l2_subdev *sd, u32 freq)
drivers/media/i2c/saa7115.c
744
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
755
v4l2_dbg(1, debug, sd, "set audio clock freq: %d\n", freq);
drivers/media/i2c/saa7115.c
786
saa711x_write(sd, R_38_CLK_RATIO_AMXCLK_TO_ASCLK, 0x03);
drivers/media/i2c/saa7115.c
787
saa711x_write(sd, R_39_CLK_RATIO_ASCLK_TO_ALRCLK, 0x10 << state->double_asclk);
drivers/media/i2c/saa7115.c
788
saa711x_write(sd, R_3A_AUD_CLK_GEN_BASIC_SETUP, acc);
drivers/media/i2c/saa7115.c
790
saa711x_write(sd, R_30_AUD_MAST_CLK_CYCLES_PER_FIELD, acpf & 0xff);
drivers/media/i2c/saa7115.c
791
saa711x_write(sd, R_30_AUD_MAST_CLK_CYCLES_PER_FIELD+1,
drivers/media/i2c/saa7115.c
793
saa711x_write(sd, R_30_AUD_MAST_CLK_CYCLES_PER_FIELD+2,
drivers/media/i2c/saa7115.c
796
saa711x_write(sd, R_34_AUD_MAST_CLK_NOMINAL_INC, acni & 0xff);
drivers/media/i2c/saa7115.c
797
saa711x_write(sd, R_34_AUD_MAST_CLK_NOMINAL_INC+1, (acni >> 8) & 0xff);
drivers/media/i2c/saa7115.c
798
saa711x_write(sd, R_34_AUD_MAST_CLK_NOMINAL_INC+2, (acni >> 16) & 0x3f);
drivers/media/i2c/saa7115.c
805
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/saa7115.c
806
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
813
saa711x_read(sd, R_0F_CHROMA_GAIN_CNTL) & 0x7f;
drivers/media/i2c/saa7115.c
821
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/saa7115.c
822
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
826
saa711x_write(sd, R_0A_LUMA_BRIGHT_CNTL, ctrl->val);
drivers/media/i2c/saa7115.c
830
saa711x_write(sd, R_0B_LUMA_CONTRAST_CNTL, ctrl->val);
drivers/media/i2c/saa7115.c
834
saa711x_write(sd, R_0C_CHROMA_SAT_CNTL, ctrl->val);
drivers/media/i2c/saa7115.c
838
saa711x_write(sd, R_0D_CHROMA_HUE_CNTL, ctrl->val);
drivers/media/i2c/saa7115.c
844
saa711x_write(sd, R_0F_CHROMA_GAIN_CNTL, state->gain->val);
drivers/media/i2c/saa7115.c
846
saa711x_write(sd, R_0F_CHROMA_GAIN_CNTL, state->gain->val | 0x80);
drivers/media/i2c/saa7115.c
856
static int saa711x_set_size(struct v4l2_subdev *sd, int width, int height)
drivers/media/i2c/saa7115.c
858
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
865
v4l2_dbg(1, debug, sd, "decoder set size to %ix%i\n", width, height);
drivers/media/i2c/saa7115.c
891
saa711x_write(sd, R_CC_B_HORIZ_OUTPUT_WINDOW_LENGTH,
drivers/media/i2c/saa7115.c
893
saa711x_write(sd, R_CD_B_HORIZ_OUTPUT_WINDOW_LENGTH_MSB,
drivers/media/i2c/saa7115.c
904
saa711x_write(sd, R_CE_B_VERT_OUTPUT_WINDOW_LENGTH,
drivers/media/i2c/saa7115.c
906
saa711x_write(sd, R_CF_B_VERT_OUTPUT_WINDOW_LENGTH_MSB,
drivers/media/i2c/saa7115.c
917
saa711x_write(sd, R_D0_B_HORIZ_PRESCALING,
drivers/media/i2c/saa7115.c
920
v4l2_dbg(1, debug, sd, "Hpsc: 0x%05x, Hfsc: 0x%05x\n", HPSC, HFSC);
drivers/media/i2c/saa7115.c
922
saa711x_write(sd, R_D8_B_HORIZ_LUMA_SCALING_INC,
drivers/media/i2c/saa7115.c
924
saa711x_write(sd, R_D9_B_HORIZ_LUMA_SCALING_INC_MSB,
drivers/media/i2c/saa7115.c
928
saa711x_write(sd, R_DC_B_HORIZ_CHROMA_SCALING,
drivers/media/i2c/saa7115.c
930
saa711x_write(sd, R_DD_B_HORIZ_CHROMA_SCALING_MSB,
drivers/media/i2c/saa7115.c
934
v4l2_dbg(1, debug, sd, "Vsrc: %d, Vscy: 0x%05x\n", Vsrc, VSCY);
drivers/media/i2c/saa7115.c
937
saa711x_write(sd, R_D5_B_LUMA_CONTRAST_CNTL,
drivers/media/i2c/saa7115.c
939
saa711x_write(sd, R_D6_B_CHROMA_SATURATION_CNTL,
drivers/media/i2c/saa7115.c
943
saa711x_write(sd, R_E0_B_VERT_LUMA_SCALING_INC,
drivers/media/i2c/saa7115.c
945
saa711x_write(sd, R_E1_B_VERT_LUMA_SCALING_INC_MSB,
drivers/media/i2c/saa7115.c
948
saa711x_write(sd, R_E2_B_VERT_CHROMA_SCALING_INC,
drivers/media/i2c/saa7115.c
950
saa711x_write(sd, R_E3_B_VERT_CHROMA_SCALING_INC_MSB,
drivers/media/i2c/saa7115.c
953
saa711x_writeregs(sd, saa7115_cfg_reset_scaler);
drivers/media/i2c/saa7115.c
956
saa711x_write(sd, R_80_GLOBAL_CNTL_1,
drivers/media/i2c/saa7115.c
957
saa711x_read(sd, R_80_GLOBAL_CNTL_1) | 0x20);
drivers/media/i2c/saa7115.c
962
static void saa711x_set_v4lstd(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/saa7115.c
964
struct saa711x_state *state = to_state(sd);
drivers/media/i2c/saa7115.c
98
static inline struct saa711x_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/saa7115.c
980
v4l2_dbg(1, debug, sd, "decoder set standard 60 Hz\n");
drivers/media/i2c/saa7115.c
982
u8 reg = saa711x_read(sd, R_08_SYNC_CNTL);
drivers/media/i2c/saa7115.c
985
saa711x_write(sd, R_08_SYNC_CNTL, reg);
drivers/media/i2c/saa7115.c
987
saa711x_writeregs(sd, saa7115_cfg_60hz_video);
drivers/media/i2c/saa7115.c
989
saa711x_set_size(sd, 720, 480);
drivers/media/i2c/saa7115.c
991
v4l2_dbg(1, debug, sd, "decoder set standard 50 Hz\n");
drivers/media/i2c/saa7115.c
993
u8 reg = saa711x_read(sd, R_08_SYNC_CNTL);
drivers/media/i2c/saa7115.c
995
saa711x_write(sd, R_08_SYNC_CNTL, reg);
drivers/media/i2c/saa7115.c
997
saa711x_writeregs(sd, saa7115_cfg_50hz_video);
drivers/media/i2c/saa7115.c
999
saa711x_set_size(sd, 720, 576);
drivers/media/i2c/saa7127.c
246
struct v4l2_subdev sd;
drivers/media/i2c/saa7127.c
266
static inline struct saa7127_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/saa7127.c
268
return container_of(sd, struct saa7127_state, sd);
drivers/media/i2c/saa7127.c
302
static int saa7127_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/saa7127.c
304
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/saa7127.c
311
static int saa7127_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/saa7127.c
313
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/saa7127.c
320
v4l2_err(sd, "I2C Write Problem\n");
drivers/media/i2c/saa7127.c
326
static int saa7127_write_inittab(struct v4l2_subdev *sd,
drivers/media/i2c/saa7127.c
330
saa7127_write(sd, regs->reg, regs->value);
drivers/media/i2c/saa7127.c
338
static int saa7127_set_vps(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data)
drivers/media/i2c/saa7127.c
340
struct saa7127_state *state = to_state(sd);
drivers/media/i2c/saa7127.c
346
v4l2_dbg(1, debug, sd, "Turn VPS Signal %s\n", enable ? "on" : "off");
drivers/media/i2c/saa7127.c
347
saa7127_write(sd, 0x54, enable << 7);
drivers/media/i2c/saa7127.c
358
v4l2_dbg(1, debug, sd, "Set VPS data %*ph\n", 5, state->vps_data);
drivers/media/i2c/saa7127.c
359
saa7127_write(sd, 0x55, state->vps_data[0]);
drivers/media/i2c/saa7127.c
360
saa7127_write(sd, 0x56, state->vps_data[1]);
drivers/media/i2c/saa7127.c
361
saa7127_write(sd, 0x57, state->vps_data[2]);
drivers/media/i2c/saa7127.c
362
saa7127_write(sd, 0x58, state->vps_data[3]);
drivers/media/i2c/saa7127.c
363
saa7127_write(sd, 0x59, state->vps_data[4]);
drivers/media/i2c/saa7127.c
369
static int saa7127_set_cc(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data)
drivers/media/i2c/saa7127.c
371
struct saa7127_state *state = to_state(sd);
drivers/media/i2c/saa7127.c
378
v4l2_dbg(1, debug, sd,
drivers/media/i2c/saa7127.c
380
saa7127_write(sd, SAA7127_REG_CLOSED_CAPTION,
drivers/media/i2c/saa7127.c
387
v4l2_dbg(2, debug, sd, "CC data: %04x\n", cc);
drivers/media/i2c/saa7127.c
388
saa7127_write(sd, SAA7127_REG_LINE_21_ODD_0, cc & 0xff);
drivers/media/i2c/saa7127.c
389
saa7127_write(sd, SAA7127_REG_LINE_21_ODD_1, cc >> 8);
drivers/media/i2c/saa7127.c
396
static int saa7127_set_xds(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data)
drivers/media/i2c/saa7127.c
398
struct saa7127_state *state = to_state(sd);
drivers/media/i2c/saa7127.c
405
v4l2_dbg(1, debug, sd, "Turn XDS %s\n", enable ? "on" : "off");
drivers/media/i2c/saa7127.c
406
saa7127_write(sd, SAA7127_REG_CLOSED_CAPTION,
drivers/media/i2c/saa7127.c
413
v4l2_dbg(2, debug, sd, "XDS data: %04x\n", xds);
drivers/media/i2c/saa7127.c
414
saa7127_write(sd, SAA7127_REG_LINE_21_EVEN_0, xds & 0xff);
drivers/media/i2c/saa7127.c
415
saa7127_write(sd, SAA7127_REG_LINE_21_EVEN_1, xds >> 8);
drivers/media/i2c/saa7127.c
422
static int saa7127_set_wss(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data)
drivers/media/i2c/saa7127.c
424
struct saa7127_state *state = to_state(sd);
drivers/media/i2c/saa7127.c
430
v4l2_dbg(1, debug, sd, "Turn WSS %s\n", enable ? "on" : "off");
drivers/media/i2c/saa7127.c
431
saa7127_write(sd, 0x27, enable << 7);
drivers/media/i2c/saa7127.c
437
saa7127_write(sd, 0x26, data->data[0]);
drivers/media/i2c/saa7127.c
438
saa7127_write(sd, 0x27, 0x80 | (data->data[1] & 0x3f));
drivers/media/i2c/saa7127.c
439
v4l2_dbg(1, debug, sd,
drivers/media/i2c/saa7127.c
447
static int saa7127_set_video_enable(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/saa7127.c
449
struct saa7127_state *state = to_state(sd);
drivers/media/i2c/saa7127.c
452
v4l2_dbg(1, debug, sd, "Enable Video Output\n");
drivers/media/i2c/saa7127.c
453
saa7127_write(sd, 0x2d, state->reg_2d);
drivers/media/i2c/saa7127.c
454
saa7127_write(sd, 0x61, state->reg_61);
drivers/media/i2c/saa7127.c
456
v4l2_dbg(1, debug, sd, "Disable Video Output\n");
drivers/media/i2c/saa7127.c
457
saa7127_write(sd, 0x2d, (state->reg_2d & 0xf0));
drivers/media/i2c/saa7127.c
458
saa7127_write(sd, 0x61, (state->reg_61 | 0xc0));
drivers/media/i2c/saa7127.c
466
static int saa7127_set_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/saa7127.c
468
struct saa7127_state *state = to_state(sd);
drivers/media/i2c/saa7127.c
472
v4l2_dbg(1, debug, sd, "Selecting 60 Hz video Standard\n");
drivers/media/i2c/saa7127.c
481
v4l2_dbg(1, debug, sd,
drivers/media/i2c/saa7127.c
487
v4l2_dbg(1, debug, sd, "Selecting 50 Hz PAL video Standard\n");
drivers/media/i2c/saa7127.c
493
saa7127_write_inittab(sd, inittab);
drivers/media/i2c/saa7127.c
500
static int saa7127_set_output_type(struct v4l2_subdev *sd, int output)
drivers/media/i2c/saa7127.c
502
struct saa7127_state *state = to_state(sd);
drivers/media/i2c/saa7127.c
547
v4l2_dbg(1, debug, sd,
drivers/media/i2c/saa7127.c
551
saa7127_write(sd, 0x2d, state->reg_2d);
drivers/media/i2c/saa7127.c
552
saa7127_write(sd, 0x3a, state->reg_3a | state->reg_3a_cb);
drivers/media/i2c/saa7127.c
559
static int saa7127_set_input_type(struct v4l2_subdev *sd, int input)
drivers/media/i2c/saa7127.c
561
struct saa7127_state *state = to_state(sd);
drivers/media/i2c/saa7127.c
565
v4l2_dbg(1, debug, sd, "Selecting Normal Encoder Input\n");
drivers/media/i2c/saa7127.c
570
v4l2_dbg(1, debug, sd, "Selecting Color Bar generator\n");
drivers/media/i2c/saa7127.c
577
saa7127_write(sd, 0x3a, state->reg_3a | state->reg_3a_cb);
drivers/media/i2c/saa7127.c
584
static int saa7127_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/saa7127.c
586
struct saa7127_state *state = to_state(sd);
drivers/media/i2c/saa7127.c
590
return saa7127_set_std(sd, std);
drivers/media/i2c/saa7127.c
593
static int saa7127_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/saa7127.c
596
struct saa7127_state *state = to_state(sd);
drivers/media/i2c/saa7127.c
600
rc = saa7127_set_input_type(sd, input);
drivers/media/i2c/saa7127.c
602
rc = saa7127_set_output_type(sd, output);
drivers/media/i2c/saa7127.c
606
static int saa7127_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/saa7127.c
608
struct saa7127_state *state = to_state(sd);
drivers/media/i2c/saa7127.c
612
return saa7127_set_video_enable(sd, enable);
drivers/media/i2c/saa7127.c
615
static int saa7127_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt)
drivers/media/i2c/saa7127.c
617
struct saa7127_state *state = to_state(sd);
drivers/media/i2c/saa7127.c
635
static int saa7127_s_vbi_data(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data)
drivers/media/i2c/saa7127.c
639
return saa7127_set_wss(sd, data);
drivers/media/i2c/saa7127.c
641
return saa7127_set_vps(sd, data);
drivers/media/i2c/saa7127.c
644
return saa7127_set_cc(sd, data);
drivers/media/i2c/saa7127.c
645
return saa7127_set_xds(sd, data);
drivers/media/i2c/saa7127.c
653
static int saa7127_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
drivers/media/i2c/saa7127.c
655
reg->val = saa7127_read(sd, reg->reg & 0xff);
drivers/media/i2c/saa7127.c
660
static int saa7127_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
drivers/media/i2c/saa7127.c
662
saa7127_write(sd, reg->reg & 0xff, reg->val & 0xff);
drivers/media/i2c/saa7127.c
667
static int saa7127_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/saa7127.c
669
struct saa7127_state *state = to_state(sd);
drivers/media/i2c/saa7127.c
671
v4l2_info(sd, "Standard: %s\n", (state->std & V4L2_STD_525_60) ? "60 Hz" : "50 Hz");
drivers/media/i2c/saa7127.c
672
v4l2_info(sd, "Input: %s\n", state->input_type ? "color bars" : "normal");
drivers/media/i2c/saa7127.c
673
v4l2_info(sd, "Output: %s\n", state->video_enable ?
drivers/media/i2c/saa7127.c
675
v4l2_info(sd, "WSS: %s\n", state->wss_enable ?
drivers/media/i2c/saa7127.c
677
v4l2_info(sd, "VPS: %s\n", state->vps_enable ? "enabled" : "disabled");
drivers/media/i2c/saa7127.c
678
v4l2_info(sd, "CC: %s\n", state->cc_enable ? "enabled" : "disabled");
drivers/media/i2c/saa7127.c
715
struct v4l2_subdev *sd;
drivers/media/i2c/saa7127.c
729
sd = &state->sd;
drivers/media/i2c/saa7127.c
730
v4l2_i2c_subdev_init(sd, client, &saa7127_ops);
drivers/media/i2c/saa7127.c
737
if ((saa7127_read(sd, 0) & 0xe4) != 0 ||
drivers/media/i2c/saa7127.c
738
(saa7127_read(sd, 0x29) & 0x3f) != 0x1d) {
drivers/media/i2c/saa7127.c
739
v4l2_dbg(1, debug, sd, "saa7127 not found\n");
drivers/media/i2c/saa7127.c
749
read_result = saa7127_read(sd, SAA7129_REG_FADE_KEY_COL2);
drivers/media/i2c/saa7127.c
750
saa7127_write(sd, SAA7129_REG_FADE_KEY_COL2, 0xaa);
drivers/media/i2c/saa7127.c
751
if (saa7127_read(sd, SAA7129_REG_FADE_KEY_COL2) == 0xaa) {
drivers/media/i2c/saa7127.c
752
saa7127_write(sd, SAA7129_REG_FADE_KEY_COL2,
drivers/media/i2c/saa7127.c
762
v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
drivers/media/i2c/saa7127.c
765
v4l2_dbg(1, debug, sd, "Configuring encoder\n");
drivers/media/i2c/saa7127.c
766
saa7127_write_inittab(sd, saa7127_init_config_common);
drivers/media/i2c/saa7127.c
767
saa7127_set_std(sd, V4L2_STD_NTSC);
drivers/media/i2c/saa7127.c
768
saa7127_set_output_type(sd, SAA7127_OUTPUT_TYPE_BOTH);
drivers/media/i2c/saa7127.c
769
saa7127_set_vps(sd, &vbi);
drivers/media/i2c/saa7127.c
770
saa7127_set_wss(sd, &vbi);
drivers/media/i2c/saa7127.c
771
saa7127_set_cc(sd, &vbi);
drivers/media/i2c/saa7127.c
772
saa7127_set_xds(sd, &vbi);
drivers/media/i2c/saa7127.c
776
saa7127_set_input_type(sd, SAA7127_INPUT_TYPE_TEST_IMAGE);
drivers/media/i2c/saa7127.c
778
saa7127_set_input_type(sd, SAA7127_INPUT_TYPE_NORMAL);
drivers/media/i2c/saa7127.c
779
saa7127_set_video_enable(sd, 1);
drivers/media/i2c/saa7127.c
782
saa7127_write_inittab(sd, saa7129_init_config_extra);
drivers/media/i2c/saa7127.c
790
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/saa7127.c
792
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/saa7127.c
794
saa7127_set_video_enable(sd, 0);
drivers/media/i2c/saa717x.c
1016
set_h_prescale(sd, 0, prescale);
drivers/media/i2c/saa717x.c
1017
set_h_prescale(sd, 1, prescale);
drivers/media/i2c/saa717x.c
1021
saa717x_write(sd, 0x6C, (u8)(h_scale & 0xFF));
drivers/media/i2c/saa717x.c
1022
saa717x_write(sd, 0x6D, (u8)((h_scale >> 8) & 0xFF));
drivers/media/i2c/saa717x.c
1024
saa717x_write(sd, 0xAC, (u8)(h_scale & 0xFF));
drivers/media/i2c/saa717x.c
1025
saa717x_write(sd, 0xAD, (u8)((h_scale >> 8) & 0xFF));
drivers/media/i2c/saa717x.c
1028
set_v_scale(sd, 0, v_scale);
drivers/media/i2c/saa717x.c
1029
set_v_scale(sd, 1, v_scale);
drivers/media/i2c/saa717x.c
1034
saa717x_write(sd, 0x5C, (u8)(fmt->width & 0xFF));
drivers/media/i2c/saa717x.c
1035
saa717x_write(sd, 0x5D, (u8)((fmt->width >> 8) & 0xFF));
drivers/media/i2c/saa717x.c
1037
saa717x_write(sd, 0x9C, (u8)(fmt->width & 0xFF));
drivers/media/i2c/saa717x.c
1038
saa717x_write(sd, 0x9D, (u8)((fmt->width >> 8) & 0xFF));
drivers/media/i2c/saa717x.c
1042
saa717x_write(sd, 0x5E, (u8)(fmt->height & 0xFF));
drivers/media/i2c/saa717x.c
1043
saa717x_write(sd, 0x5F, (u8)((fmt->height >> 8) & 0xFF));
drivers/media/i2c/saa717x.c
1045
saa717x_write(sd, 0x9E, (u8)(fmt->height & 0xFF));
drivers/media/i2c/saa717x.c
1046
saa717x_write(sd, 0x9F, (u8)((fmt->height >> 8) & 0xFF));
drivers/media/i2c/saa717x.c
1050
static int saa717x_s_radio(struct v4l2_subdev *sd)
drivers/media/i2c/saa717x.c
1052
struct saa717x_state *decoder = to_state(sd);
drivers/media/i2c/saa717x.c
1058
static int saa717x_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/saa717x.c
1060
struct saa717x_state *decoder = to_state(sd);
drivers/media/i2c/saa717x.c
1062
v4l2_dbg(1, debug, sd, "decoder set norm ");
drivers/media/i2c/saa717x.c
1063
v4l2_dbg(1, debug, sd, "(not yet implemented)\n");
drivers/media/i2c/saa717x.c
1070
static int saa717x_s_audio_routing(struct v4l2_subdev *sd,
drivers/media/i2c/saa717x.c
1073
struct saa717x_state *decoder = to_state(sd);
drivers/media/i2c/saa717x.c
1077
v4l2_dbg(1, debug, sd,
drivers/media/i2c/saa717x.c
108
v4l2_dbg(2, debug, sd, "wrote: reg 0x%03x=%08x\n", reg, value);
drivers/media/i2c/saa717x.c
1080
set_audio_regs(sd, decoder);
drivers/media/i2c/saa717x.c
1086
static int saa717x_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/saa717x.c
1088
struct saa717x_state *decoder = to_state(sd);
drivers/media/i2c/saa717x.c
1090
v4l2_dbg(1, debug, sd, "decoder %s output\n",
drivers/media/i2c/saa717x.c
1093
saa717x_write(sd, 0x193, enable ? 0xa6 : 0x26);
drivers/media/i2c/saa717x.c
1098
static int saa717x_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
drivers/media/i2c/saa717x.c
1100
struct saa717x_state *decoder = to_state(sd);
drivers/media/i2c/saa717x.c
112
static void saa717x_write_regs(struct v4l2_subdev *sd, u32 *data)
drivers/media/i2c/saa717x.c
1123
v4l2_dbg(1, debug, sd, "change audio mode to %s\n",
drivers/media/i2c/saa717x.c
1128
set_audio_mode(sd, decoder->tuner_audio_mode);
drivers/media/i2c/saa717x.c
1132
static int saa717x_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
drivers/media/i2c/saa717x.c
1134
struct saa717x_state *decoder = to_state(sd);
drivers/media/i2c/saa717x.c
1139
get_inf_dev_status(sd, &dual_f, &stereo_f);
drivers/media/i2c/saa717x.c
1141
v4l2_dbg(1, debug, sd, "DETECT==st:%d dual:%d\n",
drivers/media/i2c/saa717x.c
1147
v4l2_dbg(1, debug, sd, "DETECT==MONO\n");
drivers/media/i2c/saa717x.c
115
saa717x_write(sd, data[0], data[1]);
drivers/media/i2c/saa717x.c
1155
v4l2_dbg(1, debug, sd, "DETECT==ST(ST)\n");
drivers/media/i2c/saa717x.c
1158
v4l2_dbg(1, debug, sd, "DETECT==ST(MONO)\n");
drivers/media/i2c/saa717x.c
1166
v4l2_dbg(1, debug, sd, "DETECT==DUAL1\n");
drivers/media/i2c/saa717x.c
1169
v4l2_dbg(1, debug, sd, "DETECT==DUAL2\n");
drivers/media/i2c/saa717x.c
1175
static int saa717x_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/saa717x.c
1177
struct saa717x_state *state = to_state(sd);
drivers/media/i2c/saa717x.c
1179
v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
drivers/media/i2c/saa717x.c
120
static u32 saa717x_read(struct v4l2_subdev *sd, u32 reg)
drivers/media/i2c/saa717x.c
122
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/saa717x.c
1235
struct v4l2_subdev *sd;
drivers/media/i2c/saa717x.c
1247
sd = &decoder->sd;
drivers/media/i2c/saa717x.c
1248
v4l2_i2c_subdev_init(sd, client, &saa717x_ops);
drivers/media/i2c/saa717x.c
1250
if (saa717x_write(sd, 0x5a4, 0xfe) &&
drivers/media/i2c/saa717x.c
1251
saa717x_write(sd, 0x5a5, 0x0f) &&
drivers/media/i2c/saa717x.c
1252
saa717x_write(sd, 0x5a6, 0x00) &&
drivers/media/i2c/saa717x.c
1253
saa717x_write(sd, 0x5a7, 0x01))
drivers/media/i2c/saa717x.c
1254
id = saa717x_read(sd, 0x5a0);
drivers/media/i2c/saa717x.c
1256
v4l2_dbg(1, debug, sd, "saa717x not found (id=%02x)\n", id);
drivers/media/i2c/saa717x.c
1267
v4l2_info(sd, "%s found @ 0x%x (%s)\n", p,
drivers/media/i2c/saa717x.c
1291
sd->ctrl_handler = hdl;
drivers/media/i2c/saa717x.c
1314
v4l2_dbg(1, debug, sd, "writing init values\n");
drivers/media/i2c/saa717x.c
1317
saa717x_write_regs(sd, reg_init_initialize);
drivers/media/i2c/saa717x.c
1328
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/saa717x.c
1330
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/saa717x.c
1331
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/saa717x.c
146
v4l2_dbg(2, debug, sd, "read: reg 0x%03x=0x%08x\n", reg, value);
drivers/media/i2c/saa717x.c
44
struct v4l2_subdev sd;
drivers/media/i2c/saa717x.c
63
static inline struct saa717x_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/saa717x.c
65
return container_of(sd, struct saa717x_state, sd);
drivers/media/i2c/saa717x.c
680
static void get_inf_dev_status(struct v4l2_subdev *sd,
drivers/media/i2c/saa717x.c
70
return &container_of(ctrl->handler, struct saa717x_state, hdl)->sd;
drivers/media/i2c/saa717x.c
719
reg_data3 = saa717x_read(sd, 0x0528);
drivers/media/i2c/saa717x.c
721
v4l2_dbg(1, debug, sd, "tvaudio thread status: 0x%x [%s%s%s]\n",
drivers/media/i2c/saa717x.c
725
v4l2_dbg(1, debug, sd, "detailed status: "
drivers/media/i2c/saa717x.c
746
v4l2_dbg(1, debug, sd, "ST!!!\n");
drivers/media/i2c/saa717x.c
751
v4l2_dbg(1, debug, sd, "DUAL!!!\n");
drivers/media/i2c/saa717x.c
757
static void set_audio_mode(struct v4l2_subdev *sd, int audio_mode)
drivers/media/i2c/saa717x.c
759
v4l2_dbg(1, debug, sd, "writing registers to set audio mode by set %d\n",
drivers/media/i2c/saa717x.c
762
saa717x_write(sd, 0x46c, reg_set_audio_template[audio_mode][0]);
drivers/media/i2c/saa717x.c
763
saa717x_write(sd, 0x470, reg_set_audio_template[audio_mode][1]);
drivers/media/i2c/saa717x.c
767
static int set_audio_regs(struct v4l2_subdev *sd,
drivers/media/i2c/saa717x.c
775
saa717x_write(sd, 0x0594, decoder->audio_input);
drivers/media/i2c/saa717x.c
776
v4l2_dbg(1, debug, sd, "set audio input %d\n",
drivers/media/i2c/saa717x.c
796
saa717x_write(sd, 0x480, val);
drivers/media/i2c/saa717x.c
801
saa717x_write(sd, 0x488, val);
drivers/media/i2c/saa717x.c
806
static void set_h_prescale(struct v4l2_subdev *sd,
drivers/media/i2c/saa717x.c
839
saa717x_write(sd, 0x60 + task_shift, vals[i].xpsc);
drivers/media/i2c/saa717x.c
841
saa717x_write(sd, 0x61 + task_shift, vals[i].xacl);
drivers/media/i2c/saa717x.c
843
saa717x_write(sd, 0x62 + task_shift,
drivers/media/i2c/saa717x.c
846
saa717x_write(sd, 0x63 + task_shift,
drivers/media/i2c/saa717x.c
851
static void set_v_scale(struct v4l2_subdev *sd, int task, int yscale)
drivers/media/i2c/saa717x.c
857
saa717x_write(sd, 0x70 + task_shift, yscale & 0xff);
drivers/media/i2c/saa717x.c
859
saa717x_write(sd, 0x71 + task_shift, yscale >> 8);
drivers/media/i2c/saa717x.c
86
static int saa717x_write(struct v4l2_subdev *sd, u32 reg, u32 value)
drivers/media/i2c/saa717x.c
864
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/saa717x.c
865
struct saa717x_state *state = to_state(sd);
drivers/media/i2c/saa717x.c
869
saa717x_write(sd, 0x10a, ctrl->val);
drivers/media/i2c/saa717x.c
873
saa717x_write(sd, 0x10b, ctrl->val);
drivers/media/i2c/saa717x.c
877
saa717x_write(sd, 0x10c, ctrl->val);
drivers/media/i2c/saa717x.c
88
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/saa717x.c
881
saa717x_write(sd, 0x10d, ctrl->val);
drivers/media/i2c/saa717x.c
907
set_audio_regs(sd, state);
drivers/media/i2c/saa717x.c
911
static int saa717x_s_video_routing(struct v4l2_subdev *sd,
drivers/media/i2c/saa717x.c
914
struct saa717x_state *decoder = to_state(sd);
drivers/media/i2c/saa717x.c
919
v4l2_dbg(1, debug, sd, "decoder set input (%d)\n", input);
drivers/media/i2c/saa717x.c
929
v4l2_dbg(1, debug, sd, "now setting %s input %d\n",
drivers/media/i2c/saa717x.c
934
saa717x_write(sd, 0x102,
drivers/media/i2c/saa717x.c
935
(saa717x_read(sd, 0x102) & 0xf0) |
drivers/media/i2c/saa717x.c
939
saa717x_write(sd, 0x109,
drivers/media/i2c/saa717x.c
940
(saa717x_read(sd, 0x109) & 0x7f) |
drivers/media/i2c/saa717x.c
946
set_audio_mode(sd, decoder->tuner_audio_mode);
drivers/media/i2c/saa717x.c
950
set_audio_mode(sd, TUNER_AUDIO_STEREO);
drivers/media/i2c/saa717x.c
954
saa717x_write_regs(sd, reg_init_tuner_input);
drivers/media/i2c/saa717x.c
956
saa717x_write_regs(sd, reg_init_svideo_input);
drivers/media/i2c/saa717x.c
958
saa717x_write_regs(sd, reg_init_composite_input);
drivers/media/i2c/saa717x.c
965
static int saa717x_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
drivers/media/i2c/saa717x.c
967
reg->val = saa717x_read(sd, reg->reg);
drivers/media/i2c/saa717x.c
972
static int saa717x_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
drivers/media/i2c/saa717x.c
977
saa717x_write(sd, addr, val);
drivers/media/i2c/saa717x.c
982
static int saa717x_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/saa717x.c
989
v4l2_dbg(1, debug, sd, "decoder set size\n");
drivers/media/i2c/saa7185.c
207
static int saa7185_init(struct v4l2_subdev *sd, u32 val)
drivers/media/i2c/saa7185.c
209
struct saa7185 *encoder = to_saa7185(sd);
drivers/media/i2c/saa7185.c
211
saa7185_write_block(sd, init_common, sizeof(init_common));
drivers/media/i2c/saa7185.c
213
saa7185_write_block(sd, init_ntsc, sizeof(init_ntsc));
drivers/media/i2c/saa7185.c
215
saa7185_write_block(sd, init_pal, sizeof(init_pal));
drivers/media/i2c/saa7185.c
219
static int saa7185_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/saa7185.c
221
struct saa7185 *encoder = to_saa7185(sd);
drivers/media/i2c/saa7185.c
224
saa7185_write_block(sd, init_ntsc, sizeof(init_ntsc));
drivers/media/i2c/saa7185.c
226
saa7185_write_block(sd, init_pal, sizeof(init_pal));
drivers/media/i2c/saa7185.c
233
static int saa7185_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/saa7185.c
236
struct saa7185 *encoder = to_saa7185(sd);
drivers/media/i2c/saa7185.c
244
saa7185_write(sd, 0x3a, 0x0f);
drivers/media/i2c/saa7185.c
246
saa7185_write(sd, 0x61, (encoder->reg[0x61] & 0xf7) | 0x08);
drivers/media/i2c/saa7185.c
247
saa7185_write(sd, 0x6e, 0x01);
drivers/media/i2c/saa7185.c
252
saa7185_write(sd, 0x3a, 0x0f);
drivers/media/i2c/saa7185.c
254
saa7185_write(sd, 0x61, (encoder->reg[0x61] & 0xf7) | 0x00);
drivers/media/i2c/saa7185.c
256
saa7185_write(sd, 0x6e, 0x00);
drivers/media/i2c/saa7185.c
261
saa7185_write(sd, 0x3a, 0x8f);
drivers/media/i2c/saa7185.c
263
saa7185_write(sd, 0x61, (encoder->reg[0x61] & 0xf7) | 0x08);
drivers/media/i2c/saa7185.c
265
saa7185_write(sd, 0x6e, 0x01);
drivers/media/i2c/saa7185.c
297
struct v4l2_subdev *sd;
drivers/media/i2c/saa7185.c
310
sd = &encoder->sd;
drivers/media/i2c/saa7185.c
311
v4l2_i2c_subdev_init(sd, client, &saa7185_ops);
drivers/media/i2c/saa7185.c
313
i = saa7185_write_block(sd, init_common, sizeof(init_common));
drivers/media/i2c/saa7185.c
315
i = saa7185_write_block(sd, init_ntsc, sizeof(init_ntsc));
drivers/media/i2c/saa7185.c
317
v4l2_dbg(1, debug, sd, "init error %d\n", i);
drivers/media/i2c/saa7185.c
319
v4l2_dbg(1, debug, sd, "revision 0x%x\n",
drivers/media/i2c/saa7185.c
320
saa7185_read(sd) >> 5);
drivers/media/i2c/saa7185.c
326
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/saa7185.c
327
struct saa7185 *encoder = to_saa7185(sd);
drivers/media/i2c/saa7185.c
329
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/saa7185.c
331
saa7185_write(sd, 0x61, (encoder->reg[0x61]) | 0x40);
drivers/media/i2c/saa7185.c
35
struct v4l2_subdev sd;
drivers/media/i2c/saa7185.c
41
static inline struct saa7185 *to_saa7185(struct v4l2_subdev *sd)
drivers/media/i2c/saa7185.c
43
return container_of(sd, struct saa7185, sd);
drivers/media/i2c/saa7185.c
48
static inline int saa7185_read(struct v4l2_subdev *sd)
drivers/media/i2c/saa7185.c
50
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/saa7185.c
55
static int saa7185_write(struct v4l2_subdev *sd, u8 reg, u8 value)
drivers/media/i2c/saa7185.c
57
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/saa7185.c
58
struct saa7185 *encoder = to_saa7185(sd);
drivers/media/i2c/saa7185.c
60
v4l2_dbg(1, debug, sd, "%02x set to %02x\n", reg, value);
drivers/media/i2c/saa7185.c
65
static int saa7185_write_block(struct v4l2_subdev *sd,
drivers/media/i2c/saa7185.c
68
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/saa7185.c
69
struct saa7185 *encoder = to_saa7185(sd);
drivers/media/i2c/saa7185.c
97
ret = saa7185_write(sd, reg, *data++);
drivers/media/i2c/sony-btf-mpx.c
159
struct i2c_client *client = v4l2_get_subdevdata(&t->sd);
drivers/media/i2c/sony-btf-mpx.c
267
static int sony_btf_mpx_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/sony-btf-mpx.c
269
struct sony_btf_mpx *t = to_state(sd);
drivers/media/i2c/sony-btf-mpx.c
288
static int sony_btf_mpx_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
drivers/media/i2c/sony-btf-mpx.c
290
struct sony_btf_mpx *t = to_state(sd);
drivers/media/i2c/sony-btf-mpx.c
302
static int sony_btf_mpx_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
drivers/media/i2c/sony-btf-mpx.c
304
struct sony_btf_mpx *t = to_state(sd);
drivers/media/i2c/sony-btf-mpx.c
337
struct v4l2_subdev *sd;
drivers/media/i2c/sony-btf-mpx.c
349
sd = &t->sd;
drivers/media/i2c/sony-btf-mpx.c
350
v4l2_i2c_subdev_init(sd, client, &sony_btf_mpx_ops);
drivers/media/i2c/sony-btf-mpx.c
361
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/sony-btf-mpx.c
363
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/sony-btf-mpx.c
37
struct v4l2_subdev sd;
drivers/media/i2c/sony-btf-mpx.c
42
static inline struct sony_btf_mpx *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/sony-btf-mpx.c
44
return container_of(sd, struct sony_btf_mpx, sd);
drivers/media/i2c/st-mipid02.c
211
static inline struct mipid02_dev *to_mipid02_dev(struct v4l2_subdev *sd)
drivers/media/i2c/st-mipid02.c
213
return container_of(sd, struct mipid02_dev, sd);
drivers/media/i2c/st-mipid02.c
240
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/st-mipid02.c
241
struct mipid02_dev *bridge = to_mipid02_dev(sd);
drivers/media/i2c/st-mipid02.c
276
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/st-mipid02.c
277
struct mipid02_dev *bridge = to_mipid02_dev(sd);
drivers/media/i2c/st-mipid02.c
445
static int mipid02_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/st-mipid02.c
449
struct mipid02_dev *bridge = to_mipid02_dev(sd);
drivers/media/i2c/st-mipid02.c
477
static int mipid02_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/st-mipid02.c
481
struct mipid02_dev *bridge = to_mipid02_dev(sd);
drivers/media/i2c/st-mipid02.c
559
static int mipid02_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/st-mipid02.c
569
static int mipid02_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/st-mipid02.c
599
static int mipid02_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/st-mipid02.c
603
struct mipid02_dev *bridge = to_mipid02_dev(sd);
drivers/media/i2c/st-mipid02.c
662
struct mipid02_dev *bridge = to_mipid02_dev(notifier->sd);
drivers/media/i2c/st-mipid02.c
679
&bridge->sd.entity, 0,
drivers/media/i2c/st-mipid02.c
697
struct mipid02_dev *bridge = to_mipid02_dev(notifier->sd);
drivers/media/i2c/st-mipid02.c
743
v4l2_async_subdev_nf_init(&bridge->notifier, &bridge->sd);
drivers/media/i2c/st-mipid02.c
815
v4l2_i2c_subdev_init(&bridge->sd, client, &mipid02_subdev_ops);
drivers/media/i2c/st-mipid02.c
851
bridge->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/st-mipid02.c
852
bridge->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/i2c/st-mipid02.c
853
bridge->sd.internal_ops = &mipid02_subdev_internal_ops;
drivers/media/i2c/st-mipid02.c
854
bridge->sd.entity.ops = &mipid02_subdev_entity_ops;
drivers/media/i2c/st-mipid02.c
858
ret = media_entity_pads_init(&bridge->sd.entity, MIPID02_PAD_NB,
drivers/media/i2c/st-mipid02.c
865
ret = v4l2_subdev_init_finalize(&bridge->sd);
drivers/media/i2c/st-mipid02.c
90
struct v4l2_subdev sd;
drivers/media/i2c/st-mipid02.c
903
ret = v4l2_async_register_subdev(&bridge->sd);
drivers/media/i2c/st-mipid02.c
922
media_entity_cleanup(&bridge->sd.entity);
drivers/media/i2c/st-mipid02.c
929
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/st-mipid02.c
930
struct mipid02_dev *bridge = to_mipid02_dev(sd);
drivers/media/i2c/st-mipid02.c
934
v4l2_async_unregister_subdev(&bridge->sd);
drivers/media/i2c/st-mipid02.c
940
media_entity_cleanup(&bridge->sd.entity);
drivers/media/i2c/tc358743.c
1004
i2c_wr32(sd, CECRCTL1, reg);
drivers/media/i2c/tc358743.c
1011
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tc358743.c
1015
la = i2c_rd32(sd, CECADD);
drivers/media/i2c/tc358743.c
1018
i2c_wr32(sd, CECADD, la);
drivers/media/i2c/tc358743.c
1026
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tc358743.c
1029
i2c_wr32(sd, CECTCTL,
drivers/media/i2c/tc358743.c
1033
i2c_wr32(sd, CECTBUF1 + i * 4,
drivers/media/i2c/tc358743.c
1035
i2c_wr32(sd, CECTEN, MASK_CECTEN);
drivers/media/i2c/tc358743.c
1046
static void tc358743_cec_handler(struct v4l2_subdev *sd, u16 intstatus,
drivers/media/i2c/tc358743.c
1049
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
1053
cec_rxint = i2c_rd32(sd, CECRSTAT);
drivers/media/i2c/tc358743.c
1054
cec_txint = i2c_rd32(sd, CECTSTAT);
drivers/media/i2c/tc358743.c
1060
i2c_wr32(sd, CECICLR, clr);
drivers/media/i2c/tc358743.c
1089
v = i2c_rd32(sd, CECRCTR);
drivers/media/i2c/tc358743.c
1094
v = i2c_rd32(sd, CECRBUF1 + i * 4);
drivers/media/i2c/tc358743.c
1101
i2c_wr16(sd, INTSTATUS,
drivers/media/i2c/tc358743.c
1109
static void tc358743_format_change(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
1111
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
1118
if (tc358743_get_detected_timings(sd, &timings)) {
drivers/media/i2c/tc358743.c
1119
enable_stream(sd, false);
drivers/media/i2c/tc358743.c
1121
v4l2_dbg(1, debug, sd, "%s: No signal\n",
drivers/media/i2c/tc358743.c
1125
enable_stream(sd, false);
drivers/media/i2c/tc358743.c
1128
v4l2_print_dv_timings(sd->name,
drivers/media/i2c/tc358743.c
1133
if (sd->devnode)
drivers/media/i2c/tc358743.c
1134
v4l2_subdev_notify_event(sd, &tc358743_ev_fmt);
drivers/media/i2c/tc358743.c
1137
static void tc358743_init_interrupts(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
1143
i2c_wr8(sd, i, 0xff);
drivers/media/i2c/tc358743.c
1145
i2c_wr16(sd, INTSTATUS, 0xffff);
drivers/media/i2c/tc358743.c
1148
static void tc358743_enable_interrupts(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
1151
v4l2_dbg(2, debug, sd, "%s: cable connected = %d\n", __func__,
drivers/media/i2c/tc358743.c
1155
i2c_wr8(sd, SYS_INTM, ~(MASK_M_DDC | MASK_M_DVI_DET |
drivers/media/i2c/tc358743.c
1157
i2c_wr8(sd, CLK_INTM, ~MASK_M_IN_DE_CHG);
drivers/media/i2c/tc358743.c
1158
i2c_wr8(sd, CBIT_INTM, ~(MASK_M_CBIT_FS | MASK_M_AF_LOCK |
drivers/media/i2c/tc358743.c
1160
i2c_wr8(sd, AUDIO_INTM, ~MASK_M_BUFINIT_END);
drivers/media/i2c/tc358743.c
1161
i2c_wr8(sd, MISC_INTM, ~MASK_M_SYNC_CHG);
drivers/media/i2c/tc358743.c
1163
i2c_wr8(sd, SYS_INTM, ~MASK_M_DDC & 0xff);
drivers/media/i2c/tc358743.c
1164
i2c_wr8(sd, CLK_INTM, 0xff);
drivers/media/i2c/tc358743.c
1165
i2c_wr8(sd, CBIT_INTM, 0xff);
drivers/media/i2c/tc358743.c
1166
i2c_wr8(sd, AUDIO_INTM, 0xff);
drivers/media/i2c/tc358743.c
1167
i2c_wr8(sd, MISC_INTM, 0xff);
drivers/media/i2c/tc358743.c
1171
static void tc358743_hdmi_audio_int_handler(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
1174
u8 audio_int_mask = i2c_rd8(sd, AUDIO_INTM);
drivers/media/i2c/tc358743.c
1175
u8 audio_int = i2c_rd8(sd, AUDIO_INT) & ~audio_int_mask;
drivers/media/i2c/tc358743.c
1177
i2c_wr8(sd, AUDIO_INT, audio_int);
drivers/media/i2c/tc358743.c
1179
v4l2_dbg(3, debug, sd, "%s: AUDIO_INT = 0x%02x\n", __func__, audio_int);
drivers/media/i2c/tc358743.c
1181
tc358743_s_ctrl_audio_sampling_rate(sd);
drivers/media/i2c/tc358743.c
1182
tc358743_s_ctrl_audio_present(sd);
drivers/media/i2c/tc358743.c
1185
static void tc358743_csi_err_int_handler(struct v4l2_subdev *sd, bool *handled)
drivers/media/i2c/tc358743.c
1187
v4l2_err(sd, "%s: CSI_ERR = 0x%x\n", __func__, i2c_rd32(sd, CSI_ERR));
drivers/media/i2c/tc358743.c
1189
i2c_wr32(sd, CSI_INT_CLR, MASK_ICRER);
drivers/media/i2c/tc358743.c
1192
static void tc358743_hdmi_misc_int_handler(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
1195
u8 misc_int_mask = i2c_rd8(sd, MISC_INTM);
drivers/media/i2c/tc358743.c
1196
u8 misc_int = i2c_rd8(sd, MISC_INT) & ~misc_int_mask;
drivers/media/i2c/tc358743.c
1198
i2c_wr8(sd, MISC_INT, misc_int);
drivers/media/i2c/tc358743.c
120
static void tc358743_enable_interrupts(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
1200
v4l2_dbg(3, debug, sd, "%s: MISC_INT = 0x%02x\n", __func__, misc_int);
drivers/media/i2c/tc358743.c
1206
if (no_sync(sd) || no_signal(sd)) {
drivers/media/i2c/tc358743.c
1207
tc358743_reset_phy(sd);
drivers/media/i2c/tc358743.c
1208
tc358743_erase_bksv(sd);
drivers/media/i2c/tc358743.c
1211
tc358743_format_change(sd);
drivers/media/i2c/tc358743.c
1219
v4l2_err(sd, "%s: Unhandled MISC_INT interrupts: 0x%02x\n",
drivers/media/i2c/tc358743.c
122
static int tc358743_s_ctrl_detect_tx_5v(struct v4l2_subdev *sd);
drivers/media/i2c/tc358743.c
1224
static void tc358743_hdmi_cbit_int_handler(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
1227
u8 cbit_int_mask = i2c_rd8(sd, CBIT_INTM);
drivers/media/i2c/tc358743.c
1228
u8 cbit_int = i2c_rd8(sd, CBIT_INT) & ~cbit_int_mask;
drivers/media/i2c/tc358743.c
1230
i2c_wr8(sd, CBIT_INT, cbit_int);
drivers/media/i2c/tc358743.c
1232
v4l2_dbg(3, debug, sd, "%s: CBIT_INT = 0x%02x\n", __func__, cbit_int);
drivers/media/i2c/tc358743.c
1236
v4l2_dbg(1, debug, sd, "%s: Audio sample rate changed\n",
drivers/media/i2c/tc358743.c
1238
tc358743_s_ctrl_audio_sampling_rate(sd);
drivers/media/i2c/tc358743.c
124
static inline struct tc358743_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
1247
v4l2_dbg(1, debug, sd, "%s: Audio present changed\n",
drivers/media/i2c/tc358743.c
1249
tc358743_s_ctrl_audio_present(sd);
drivers/media/i2c/tc358743.c
1257
v4l2_err(sd, "%s: Unhandled CBIT_INT interrupts: 0x%02x\n",
drivers/media/i2c/tc358743.c
126
return container_of(sd, struct tc358743_state, sd);
drivers/media/i2c/tc358743.c
1262
static void tc358743_hdmi_clk_int_handler(struct v4l2_subdev *sd, bool *handled)
drivers/media/i2c/tc358743.c
1264
u8 clk_int_mask = i2c_rd8(sd, CLK_INTM);
drivers/media/i2c/tc358743.c
1265
u8 clk_int = i2c_rd8(sd, CLK_INT) & ~clk_int_mask;
drivers/media/i2c/tc358743.c
1268
i2c_wr8(sd, CLK_INT, clk_int | 0x80 | MASK_I_OUT_H_CHG);
drivers/media/i2c/tc358743.c
1270
v4l2_dbg(3, debug, sd, "%s: CLK_INT = 0x%02x\n", __func__, clk_int);
drivers/media/i2c/tc358743.c
1274
v4l2_dbg(1, debug, sd, "%s: DE size or position has changed\n",
drivers/media/i2c/tc358743.c
1283
if (!no_signal(sd) && !no_sync(sd))
drivers/media/i2c/tc358743.c
1284
tc358743_format_change(sd);
drivers/media/i2c/tc358743.c
1292
v4l2_err(sd, "%s: Unhandled CLK_INT interrupts: 0x%02x\n",
drivers/media/i2c/tc358743.c
1297
static void tc358743_hdmi_sys_int_handler(struct v4l2_subdev *sd, bool *handled)
drivers/media/i2c/tc358743.c
1299
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
1300
u8 sys_int_mask = i2c_rd8(sd, SYS_INTM);
drivers/media/i2c/tc358743.c
1301
u8 sys_int = i2c_rd8(sd, SYS_INT) & ~sys_int_mask;
drivers/media/i2c/tc358743.c
1303
i2c_wr8(sd, SYS_INT, sys_int);
drivers/media/i2c/tc358743.c
1305
v4l2_dbg(3, debug, sd, "%s: SYS_INT = 0x%02x\n", __func__, sys_int);
drivers/media/i2c/tc358743.c
1308
bool tx_5v = tx_5v_power_present(sd);
drivers/media/i2c/tc358743.c
131
static int i2c_rd(struct v4l2_subdev *sd, u16 reg, u8 *values, u32 n)
drivers/media/i2c/tc358743.c
1310
v4l2_dbg(1, debug, sd, "%s: Tx 5V power present: %s\n",
drivers/media/i2c/tc358743.c
1314
tc358743_enable_edid(sd);
drivers/media/i2c/tc358743.c
1316
tc358743_enable_interrupts(sd, false);
drivers/media/i2c/tc358743.c
1317
tc358743_disable_edid(sd);
drivers/media/i2c/tc358743.c
1319
tc358743_erase_bksv(sd);
drivers/media/i2c/tc358743.c
1320
tc358743_update_controls(sd);
drivers/media/i2c/tc358743.c
1329
v4l2_dbg(1, debug, sd, "%s: HDMI->DVI change detected\n",
drivers/media/i2c/tc358743.c
133
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
1335
if (no_sync(sd) || no_signal(sd)) {
drivers/media/i2c/tc358743.c
1336
tc358743_reset_phy(sd);
drivers/media/i2c/tc358743.c
1337
tc358743_erase_bksv(sd);
drivers/media/i2c/tc358743.c
1346
v4l2_dbg(1, debug, sd, "%s: DVI->HDMI change detected\n",
drivers/media/i2c/tc358743.c
1350
i2c_wr8(sd, ANA_CTL, MASK_APPL_PCSX_NORMAL | MASK_ANALOG_ON);
drivers/media/i2c/tc358743.c
1358
v4l2_err(sd, "%s: Unhandled SYS_INT interrupts: 0x%02x\n",
drivers/media/i2c/tc358743.c
1365
static int tc358743_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
1367
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
1369
uint8_t hdmi_sys_status = i2c_rd8(sd, SYS_STATUS);
drivers/media/i2c/tc358743.c
1370
uint16_t sysctl = i2c_rd16(sd, SYSCTL);
drivers/media/i2c/tc358743.c
1371
u8 vi_status3 = i2c_rd8(sd, VI_STATUS3);
drivers/media/i2c/tc358743.c
1378
v4l2_info(sd, "-----Chip status-----\n");
drivers/media/i2c/tc358743.c
1379
v4l2_info(sd, "Chip ID: 0x%02x\n",
drivers/media/i2c/tc358743.c
1380
(i2c_rd16(sd, CHIPID) & MASK_CHIPID) >> 8);
drivers/media/i2c/tc358743.c
1381
v4l2_info(sd, "Chip revision: 0x%02x\n",
drivers/media/i2c/tc358743.c
1382
i2c_rd16(sd, CHIPID) & MASK_REVID);
drivers/media/i2c/tc358743.c
1383
v4l2_info(sd, "Reset: IR: %d, CEC: %d, CSI TX: %d, HDMI: %d\n",
drivers/media/i2c/tc358743.c
1388
v4l2_info(sd, "Sleep mode: %s\n", sysctl & MASK_SLEEP ? "on" : "off");
drivers/media/i2c/tc358743.c
1389
v4l2_info(sd, "Cable detected (+5V power): %s\n",
drivers/media/i2c/tc358743.c
1391
v4l2_info(sd, "DDC lines enabled: %s\n",
drivers/media/i2c/tc358743.c
1392
(i2c_rd8(sd, EDID_MODE) & MASK_EDID_MODE_E_DDC) ?
drivers/media/i2c/tc358743.c
1394
v4l2_info(sd, "Hotplug enabled: %s\n",
drivers/media/i2c/tc358743.c
1395
(i2c_rd8(sd, HPD_CTL) & MASK_HPD_OUT0) ?
drivers/media/i2c/tc358743.c
1397
v4l2_info(sd, "CEC enabled: %s\n",
drivers/media/i2c/tc358743.c
1398
(i2c_rd16(sd, CECEN) & MASK_CECEN) ? "yes" : "no");
drivers/media/i2c/tc358743.c
1399
v4l2_info(sd, "-----Signal status-----\n");
drivers/media/i2c/tc358743.c
1400
v4l2_info(sd, "TMDS signal detected: %s\n",
drivers/media/i2c/tc358743.c
1402
v4l2_info(sd, "Stable sync signal: %s\n",
drivers/media/i2c/tc358743.c
1404
v4l2_info(sd, "PHY PLL locked: %s\n",
drivers/media/i2c/tc358743.c
1406
v4l2_info(sd, "PHY DE detected: %s\n",
drivers/media/i2c/tc358743.c
1409
if (tc358743_get_detected_timings(sd, &timings)) {
drivers/media/i2c/tc358743.c
1410
v4l2_info(sd, "No video detected\n");
drivers/media/i2c/tc358743.c
1412
v4l2_print_dv_timings(sd->name, "Detected format: ", &timings,
drivers/media/i2c/tc358743.c
1415
v4l2_print_dv_timings(sd->name, "Configured format: ", &state->timings,
drivers/media/i2c/tc358743.c
1418
v4l2_info(sd, "-----CSI-TX status-----\n");
drivers/media/i2c/tc358743.c
1419
v4l2_info(sd, "Lanes needed: %d\n",
drivers/media/i2c/tc358743.c
1420
tc358743_num_csi_lanes_needed(sd));
drivers/media/i2c/tc358743.c
1421
v4l2_info(sd, "Lanes in use: %d\n",
drivers/media/i2c/tc358743.c
1423
v4l2_info(sd, "Waiting for particular sync signal: %s\n",
drivers/media/i2c/tc358743.c
1424
(i2c_rd16(sd, CSI_STATUS) & MASK_S_WSYNC) ?
drivers/media/i2c/tc358743.c
1426
v4l2_info(sd, "Transmit mode: %s\n",
drivers/media/i2c/tc358743.c
1427
(i2c_rd16(sd, CSI_STATUS) & MASK_S_TXACT) ?
drivers/media/i2c/tc358743.c
1429
v4l2_info(sd, "Receive mode: %s\n",
drivers/media/i2c/tc358743.c
1430
(i2c_rd16(sd, CSI_STATUS) & MASK_S_RXACT) ?
drivers/media/i2c/tc358743.c
1432
v4l2_info(sd, "Stopped: %s\n",
drivers/media/i2c/tc358743.c
1433
(i2c_rd16(sd, CSI_STATUS) & MASK_S_HLT) ?
drivers/media/i2c/tc358743.c
1435
v4l2_info(sd, "Color space: %s\n",
drivers/media/i2c/tc358743.c
1441
v4l2_info(sd, "-----%s status-----\n", is_hdmi(sd) ? "HDMI" : "DVI-D");
drivers/media/i2c/tc358743.c
1442
v4l2_info(sd, "HDCP encrypted content: %s\n",
drivers/media/i2c/tc358743.c
1444
v4l2_info(sd, "Input color space: %s %s range\n",
drivers/media/i2c/tc358743.c
1447
if (!is_hdmi(sd))
drivers/media/i2c/tc358743.c
1449
v4l2_info(sd, "AV Mute: %s\n", hdmi_sys_status & MASK_S_AVMUTE ? "on" :
drivers/media/i2c/tc358743.c
1451
v4l2_info(sd, "Deep color mode: %d-bits per channel\n",
drivers/media/i2c/tc358743.c
1452
deep_color_mode[(i2c_rd8(sd, VI_STATUS1) &
drivers/media/i2c/tc358743.c
1454
print_infoframes(sd);
drivers/media/i2c/tc358743.c
1460
static void tc358743_print_register_map(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
1462
v4l2_info(sd, "0x0000-0x00FF: Global Control Register\n");
drivers/media/i2c/tc358743.c
1463
v4l2_info(sd, "0x0100-0x01FF: CSI2-TX PHY Register\n");
drivers/media/i2c/tc358743.c
1464
v4l2_info(sd, "0x0200-0x03FF: CSI2-TX PPI Register\n");
drivers/media/i2c/tc358743.c
1465
v4l2_info(sd, "0x0400-0x05FF: Reserved\n");
drivers/media/i2c/tc358743.c
1466
v4l2_info(sd, "0x0600-0x06FF: CEC Register\n");
drivers/media/i2c/tc358743.c
1467
v4l2_info(sd, "0x0700-0x84FF: Reserved\n");
drivers/media/i2c/tc358743.c
1468
v4l2_info(sd, "0x8500-0x85FF: HDMIRX System Control Register\n");
drivers/media/i2c/tc358743.c
1469
v4l2_info(sd, "0x8600-0x86FF: HDMIRX Audio Control Register\n");
drivers/media/i2c/tc358743.c
1470
v4l2_info(sd, "0x8700-0x87FF: HDMIRX InfoFrame packet data Register\n");
drivers/media/i2c/tc358743.c
1471
v4l2_info(sd, "0x8800-0x88FF: HDMIRX HDCP Port Register\n");
drivers/media/i2c/tc358743.c
1472
v4l2_info(sd, "0x8900-0x89FF: HDMIRX Video Output Port & 3D Register\n");
drivers/media/i2c/tc358743.c
1473
v4l2_info(sd, "0x8A00-0x8BFF: Reserved\n");
drivers/media/i2c/tc358743.c
1474
v4l2_info(sd, "0x8C00-0x8FFF: HDMIRX EDID-RAM (1024bytes)\n");
drivers/media/i2c/tc358743.c
1475
v4l2_info(sd, "0x9000-0x90FF: HDMIRX GBD Extraction Control\n");
drivers/media/i2c/tc358743.c
1476
v4l2_info(sd, "0x9100-0x92FF: HDMIRX GBD RAM read\n");
drivers/media/i2c/tc358743.c
1477
v4l2_info(sd, "0x9300- : Reserved\n");
drivers/media/i2c/tc358743.c
1493
static int tc358743_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
1497
tc358743_print_register_map(sd);
drivers/media/i2c/tc358743.c
1503
reg->val = i2c_rdreg(sd, reg->reg, reg->size);
drivers/media/i2c/tc358743.c
1508
static int tc358743_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
1512
tc358743_print_register_map(sd);
drivers/media/i2c/tc358743.c
1529
i2c_wrreg(sd, (u16)reg->reg, reg->val,
drivers/media/i2c/tc358743.c
1536
static int tc358743_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
drivers/media/i2c/tc358743.c
1538
u16 intstatus = i2c_rd16(sd, INTSTATUS);
drivers/media/i2c/tc358743.c
154
v4l2_err(sd, "%s: reading register 0x%x from 0x%x failed: %d\n",
drivers/media/i2c/tc358743.c
1540
v4l2_dbg(1, debug, sd, "%s: IntStatus = 0x%04x\n", __func__, intstatus);
drivers/media/i2c/tc358743.c
1543
u8 hdmi_int0 = i2c_rd8(sd, HDMI_INT0);
drivers/media/i2c/tc358743.c
1544
u8 hdmi_int1 = i2c_rd8(sd, HDMI_INT1);
drivers/media/i2c/tc358743.c
1547
tc358743_hdmi_misc_int_handler(sd, handled);
drivers/media/i2c/tc358743.c
1549
tc358743_hdmi_cbit_int_handler(sd, handled);
drivers/media/i2c/tc358743.c
1551
tc358743_hdmi_clk_int_handler(sd, handled);
drivers/media/i2c/tc358743.c
1553
tc358743_hdmi_sys_int_handler(sd, handled);
drivers/media/i2c/tc358743.c
1555
tc358743_hdmi_audio_int_handler(sd, handled);
drivers/media/i2c/tc358743.c
1557
i2c_wr16(sd, INTSTATUS, MASK_HDMI_INT);
drivers/media/i2c/tc358743.c
1563
tc358743_cec_handler(sd, intstatus, handled);
drivers/media/i2c/tc358743.c
1564
i2c_wr16(sd, INTSTATUS,
drivers/media/i2c/tc358743.c
1571
u32 csi_int = i2c_rd32(sd, CSI_INT);
drivers/media/i2c/tc358743.c
1574
tc358743_csi_err_int_handler(sd, handled);
drivers/media/i2c/tc358743.c
1576
i2c_wr16(sd, INTSTATUS, MASK_CSI_INT);
drivers/media/i2c/tc358743.c
1579
intstatus = i2c_rd16(sd, INTSTATUS);
drivers/media/i2c/tc358743.c
1581
v4l2_dbg(1, debug, sd,
drivers/media/i2c/tc358743.c
1594
tc358743_isr(&state->sd, 0, &handled);
drivers/media/i2c/tc358743.c
160
static void i2c_wr(struct v4l2_subdev *sd, u16 reg, u8 *values, u32 n)
drivers/media/i2c/tc358743.c
1619
tc358743_isr(&state->sd, 0, &handled);
drivers/media/i2c/tc358743.c
162
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
1622
static int tc358743_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
drivers/media/i2c/tc358743.c
1627
return v4l2_src_change_event_subdev_subscribe(sd, fh, sub);
drivers/media/i2c/tc358743.c
1629
return v4l2_ctrl_subdev_subscribe_event(sd, fh, sub);
drivers/media/i2c/tc358743.c
1637
static int tc358743_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/tc358743.c
1640
*status |= no_signal(sd) ? V4L2_IN_ST_NO_SIGNAL : 0;
drivers/media/i2c/tc358743.c
1641
*status |= no_sync(sd) ? V4L2_IN_ST_NO_SYNC : 0;
drivers/media/i2c/tc358743.c
1643
v4l2_dbg(1, debug, sd, "%s: status = 0x%x\n", __func__, *status);
drivers/media/i2c/tc358743.c
1648
static int tc358743_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/tc358743.c
1651
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
1660
v4l2_print_dv_timings(sd->name, "tc358743_s_dv_timings: ",
drivers/media/i2c/tc358743.c
1664
v4l2_dbg(1, debug, sd, "%s: no change\n", __func__);
drivers/media/i2c/tc358743.c
1670
v4l2_dbg(1, debug, sd, "%s: timings out of range\n", __func__);
drivers/media/i2c/tc358743.c
1676
enable_stream(sd, false);
drivers/media/i2c/tc358743.c
1677
tc358743_set_pll(sd);
drivers/media/i2c/tc358743.c
1678
tc358743_set_csi(sd);
drivers/media/i2c/tc358743.c
1683
static int tc358743_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/tc358743.c
1686
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
1696
static int tc358743_enum_dv_timings(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
170
v4l2_warn(sd, "i2c wr reg=%04x: len=%d is too big!\n",
drivers/media/i2c/tc358743.c
1706
static int tc358743_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/tc358743.c
1714
ret = tc358743_get_detected_timings(sd, timings);
drivers/media/i2c/tc358743.c
1719
v4l2_print_dv_timings(sd->name, "tc358743_query_dv_timings: ",
drivers/media/i2c/tc358743.c
1724
v4l2_dbg(1, debug, sd, "%s: timings out of range\n", __func__);
drivers/media/i2c/tc358743.c
1731
static int tc358743_dv_timings_cap(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
1742
static int tc358743_get_mbus_config(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
1746
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
1757
static int tc358743_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/tc358743.c
1759
enable_stream(sd, enable);
drivers/media/i2c/tc358743.c
1762
tc358743_set_csi(sd);
drivers/media/i2c/tc358743.c
1770
static int tc358743_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
1799
static int tc358743_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
1803
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
1818
static int tc358743_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
1822
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
1825
int ret = tc358743_get_fmt(sd, sd_state, format);
drivers/media/i2c/tc358743.c
1840
enable_stream(sd, false);
drivers/media/i2c/tc358743.c
1841
tc358743_set_pll(sd);
drivers/media/i2c/tc358743.c
1842
tc358743_set_csi(sd);
drivers/media/i2c/tc358743.c
1843
tc358743_set_csi_color_space(sd);
drivers/media/i2c/tc358743.c
1848
static int tc358743_g_edid(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
1851
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
187
v4l2_err(sd, "%s: writing register 0x%x from 0x%x failed: %d\n",
drivers/media/i2c/tc358743.c
1873
i2c_rd(sd, EDID_RAM + (edid->start_block * EDID_BLOCK_SIZE), edid->edid,
drivers/media/i2c/tc358743.c
1879
static int tc358743_s_edid(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
1882
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
1888
v4l2_dbg(2, debug, sd, "%s, pad %d, start block %d, blocks %d\n",
drivers/media/i2c/tc358743.c
1910
tc358743_disable_edid(sd);
drivers/media/i2c/tc358743.c
1912
i2c_wr8(sd, EDID_LEN1, edid_len & 0xff);
drivers/media/i2c/tc358743.c
1913
i2c_wr8(sd, EDID_LEN2, edid_len >> 8);
drivers/media/i2c/tc358743.c
1921
i2c_wr(sd, EDID_RAM + i, edid->edid + i, EDID_BLOCK_SIZE);
drivers/media/i2c/tc358743.c
1927
if (tx_5v_power_present(sd))
drivers/media/i2c/tc358743.c
1928
tc358743_enable_edid(sd);
drivers/media/i2c/tc358743.c
197
v4l2_info(sd, "I2C write 0x%04x = 0x%02x",
drivers/media/i2c/tc358743.c
201
v4l2_info(sd, "I2C write 0x%04x = 0x%02x%02x",
drivers/media/i2c/tc358743.c
205
v4l2_info(sd, "I2C write 0x%04x = 0x%02x%02x%02x%02x",
drivers/media/i2c/tc358743.c
209
v4l2_info(sd, "I2C write %d bytes from address 0x%04x\n",
drivers/media/i2c/tc358743.c
214
static noinline u32 i2c_rdreg_err(struct v4l2_subdev *sd, u16 reg, u32 n,
drivers/media/i2c/tc358743.c
2176
struct v4l2_subdev *sd;
drivers/media/i2c/tc358743.c
220
error = i2c_rd(sd, reg, (u8 __force *)&val, n);
drivers/media/i2c/tc358743.c
2205
sd = &state->sd;
drivers/media/i2c/tc358743.c
2206
v4l2_i2c_subdev_init(sd, client, &tc358743_ops);
drivers/media/i2c/tc358743.c
2207
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/i2c/tc358743.c
2210
if (i2c_rd16_err(sd, CHIPID, &chipid) ||
drivers/media/i2c/tc358743.c
2212
v4l2_info(sd, "not a TC358743 on address 0x%x\n",
drivers/media/i2c/tc358743.c
2230
sd->ctrl_handler = &state->hdl;
drivers/media/i2c/tc358743.c
2236
if (tc358743_update_controls(sd)) {
drivers/media/i2c/tc358743.c
2242
sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/i2c/tc358743.c
2243
err = media_entity_pads_init(&sd->entity, 1, &state->pad);
drivers/media/i2c/tc358743.c
2249
sd->dev = &client->dev;
drivers/media/i2c/tc358743.c
2267
tc358743_initial_setup(sd);
drivers/media/i2c/tc358743.c
2269
tc358743_s_dv_timings(sd, 0, &default_timing);
drivers/media/i2c/tc358743.c
227
static inline u32 i2c_rdreg(struct v4l2_subdev *sd, u16 reg, u32 n)
drivers/media/i2c/tc358743.c
2271
tc358743_set_csi_color_space(sd);
drivers/media/i2c/tc358743.c
2273
tc358743_init_interrupts(sd);
drivers/media/i2c/tc358743.c
229
return i2c_rdreg_err(sd, reg, n, NULL);
drivers/media/i2c/tc358743.c
2300
tc358743_enable_interrupts(sd, tx_5v_power_present(sd));
drivers/media/i2c/tc358743.c
2301
i2c_wr16(sd, INTMASK, ~irq_mask);
drivers/media/i2c/tc358743.c
2303
err = v4l2_ctrl_handler_setup(sd->ctrl_handler);
drivers/media/i2c/tc358743.c
2307
err = v4l2_async_register_subdev(sd);
drivers/media/i2c/tc358743.c
2311
i2c_wr8(sd, TYP_ACP_SET, packet_type);
drivers/media/i2c/tc358743.c
2312
i2c_wr8(sd, PK_AUTO_CLR, 0xff);
drivers/media/i2c/tc358743.c
2313
i2c_wr8(sd, NO_PKT_CLR, MASK_NO_ACP_CLR);
drivers/media/i2c/tc358743.c
2315
state->debugfs_dir = debugfs_create_dir(sd->name, v4l2_debugfs_root());
drivers/media/i2c/tc358743.c
2319
V4L2_DEBUGFS_IF_DRM, sd, tc358743_debugfs_if_read);
drivers/media/i2c/tc358743.c
232
static noinline void i2c_wrreg(struct v4l2_subdev *sd, u16 reg, u32 val, u32 n)
drivers/media/i2c/tc358743.c
2321
v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
drivers/media/i2c/tc358743.c
2335
media_entity_cleanup(&sd->entity);
drivers/media/i2c/tc358743.c
2342
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tc358743.c
2343
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
2353
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/tc358743.c
2354
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/tc358743.c
2356
media_entity_cleanup(&sd->entity);
drivers/media/i2c/tc358743.c
236
i2c_wr(sd, reg, (u8 __force *)&raw, n);
drivers/media/i2c/tc358743.c
239
static u8 i2c_rd8(struct v4l2_subdev *sd, u16 reg)
drivers/media/i2c/tc358743.c
241
return i2c_rdreg(sd, reg, 1);
drivers/media/i2c/tc358743.c
244
static void i2c_wr8(struct v4l2_subdev *sd, u16 reg, u8 val)
drivers/media/i2c/tc358743.c
246
i2c_wrreg(sd, reg, val, 1);
drivers/media/i2c/tc358743.c
249
static void i2c_wr8_and_or(struct v4l2_subdev *sd, u16 reg,
drivers/media/i2c/tc358743.c
252
i2c_wrreg(sd, reg, (i2c_rdreg(sd, reg, 1) & mask) | val, 1);
drivers/media/i2c/tc358743.c
255
static u16 i2c_rd16(struct v4l2_subdev *sd, u16 reg)
drivers/media/i2c/tc358743.c
257
return i2c_rdreg(sd, reg, 2);
drivers/media/i2c/tc358743.c
260
static int i2c_rd16_err(struct v4l2_subdev *sd, u16 reg, u16 *value)
drivers/media/i2c/tc358743.c
263
*value = i2c_rdreg_err(sd, reg, 2, &err);
drivers/media/i2c/tc358743.c
267
static void i2c_wr16(struct v4l2_subdev *sd, u16 reg, u16 val)
drivers/media/i2c/tc358743.c
269
i2c_wrreg(sd, reg, val, 2);
drivers/media/i2c/tc358743.c
272
static void i2c_wr16_and_or(struct v4l2_subdev *sd, u16 reg, u16 mask, u16 val)
drivers/media/i2c/tc358743.c
274
i2c_wrreg(sd, reg, (i2c_rdreg(sd, reg, 2) & mask) | val, 2);
drivers/media/i2c/tc358743.c
277
static u32 i2c_rd32(struct v4l2_subdev *sd, u16 reg)
drivers/media/i2c/tc358743.c
279
return i2c_rdreg(sd, reg, 4);
drivers/media/i2c/tc358743.c
282
static void i2c_wr32(struct v4l2_subdev *sd, u16 reg, u32 val)
drivers/media/i2c/tc358743.c
284
i2c_wrreg(sd, reg, val, 4);
drivers/media/i2c/tc358743.c
289
static inline bool is_hdmi(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
291
return i2c_rd8(sd, SYS_STATUS) & MASK_S_HDMI;
drivers/media/i2c/tc358743.c
294
static inline bool tx_5v_power_present(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
296
return i2c_rd8(sd, SYS_STATUS) & MASK_S_DDC5V;
drivers/media/i2c/tc358743.c
299
static inline bool no_signal(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
301
return !(i2c_rd8(sd, SYS_STATUS) & MASK_S_TMDS);
drivers/media/i2c/tc358743.c
304
static inline bool no_sync(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
306
return !(i2c_rd8(sd, SYS_STATUS) & MASK_S_SYNC);
drivers/media/i2c/tc358743.c
309
static inline bool audio_present(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
311
return i2c_rd8(sd, AU_STATUS0) & MASK_S_A_SAMPLE;
drivers/media/i2c/tc358743.c
314
static int get_audio_sampling_rate(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
322
if (no_signal(sd))
drivers/media/i2c/tc358743.c
325
return code_to_rate[i2c_rd8(sd, FS_SET) & MASK_FS];
drivers/media/i2c/tc358743.c
339
static int tc358743_get_detected_timings(struct v4l2_subdev *sd,
drivers/media/i2c/tc358743.c
348
if (!(i2c_rd8(sd, HPD_CTL) & MASK_HPD_OUT0))
drivers/media/i2c/tc358743.c
351
if (no_signal(sd)) {
drivers/media/i2c/tc358743.c
352
v4l2_dbg(1, debug, sd, "%s: no valid signal\n", __func__);
drivers/media/i2c/tc358743.c
355
if (no_sync(sd)) {
drivers/media/i2c/tc358743.c
356
v4l2_dbg(1, debug, sd, "%s: no sync on signal\n", __func__);
drivers/media/i2c/tc358743.c
361
bt->interlaced = i2c_rd8(sd, VI_STATUS1) & MASK_S_V_INTERLACE ?
drivers/media/i2c/tc358743.c
364
width = ((i2c_rd8(sd, DE_WIDTH_H_HI) & 0x1f) << 8) +
drivers/media/i2c/tc358743.c
365
i2c_rd8(sd, DE_WIDTH_H_LO);
drivers/media/i2c/tc358743.c
366
height = ((i2c_rd8(sd, DE_WIDTH_V_HI) & 0x1f) << 8) +
drivers/media/i2c/tc358743.c
367
i2c_rd8(sd, DE_WIDTH_V_LO);
drivers/media/i2c/tc358743.c
368
frame_width = ((i2c_rd8(sd, H_SIZE_HI) & 0x1f) << 8) +
drivers/media/i2c/tc358743.c
369
i2c_rd8(sd, H_SIZE_LO);
drivers/media/i2c/tc358743.c
370
frame_height = (((i2c_rd8(sd, V_SIZE_HI) & 0x3f) << 8) +
drivers/media/i2c/tc358743.c
371
i2c_rd8(sd, V_SIZE_LO)) / 2;
drivers/media/i2c/tc358743.c
374
frame_interval = ((i2c_rd8(sd, FV_CNT_HI) & 0x3) << 8) +
drivers/media/i2c/tc358743.c
375
i2c_rd8(sd, FV_CNT_LO);
drivers/media/i2c/tc358743.c
400
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tc358743.c
402
v4l2_dbg(2, debug, sd, "%s:\n", __func__);
drivers/media/i2c/tc358743.c
404
i2c_wr8_and_or(sd, HPD_CTL, ~MASK_HPD_OUT0, MASK_HPD_OUT0);
drivers/media/i2c/tc358743.c
407
static void tc358743_set_hdmi_hdcp(struct v4l2_subdev *sd, bool enable)
drivers/media/i2c/tc358743.c
409
v4l2_dbg(2, debug, sd, "%s: %s\n", __func__, enable ?
drivers/media/i2c/tc358743.c
413
i2c_wr8_and_or(sd, HDCP_REG3, ~KEY_RD_CMD, KEY_RD_CMD);
drivers/media/i2c/tc358743.c
415
i2c_wr8_and_or(sd, HDCP_MODE, ~MASK_MANUAL_AUTHENTICATION, 0);
drivers/media/i2c/tc358743.c
417
i2c_wr8_and_or(sd, HDCP_REG1, 0xff,
drivers/media/i2c/tc358743.c
421
i2c_wr8_and_or(sd, HDCP_REG2, ~MASK_AUTO_P3_RESET,
drivers/media/i2c/tc358743.c
424
i2c_wr8_and_or(sd, HDCP_MODE, ~MASK_MANUAL_AUTHENTICATION,
drivers/media/i2c/tc358743.c
429
static void tc358743_disable_edid(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
431
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
433
v4l2_dbg(2, debug, sd, "%s:\n", __func__);
drivers/media/i2c/tc358743.c
439
i2c_wr8_and_or(sd, HPD_CTL, ~MASK_HPD_OUT0, 0x0);
drivers/media/i2c/tc358743.c
442
static void tc358743_enable_edid(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
444
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
447
v4l2_dbg(2, debug, sd, "%s: no EDID -> no hotplug\n", __func__);
drivers/media/i2c/tc358743.c
448
tc358743_s_ctrl_detect_tx_5v(sd);
drivers/media/i2c/tc358743.c
452
v4l2_dbg(2, debug, sd, "%s:\n", __func__);
drivers/media/i2c/tc358743.c
458
tc358743_enable_interrupts(sd, true);
drivers/media/i2c/tc358743.c
459
tc358743_s_ctrl_detect_tx_5v(sd);
drivers/media/i2c/tc358743.c
462
static void tc358743_erase_bksv(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
467
i2c_wr8(sd, BKSV + i, 0);
drivers/media/i2c/tc358743.c
477
struct v4l2_subdev *sd = priv;
drivers/media/i2c/tc358743.c
480
if (!is_hdmi(sd))
drivers/media/i2c/tc358743.c
485
i2c_rd(sd, PK_AVI_0HEAD, buf, PK_AVI_LEN);
drivers/media/i2c/tc358743.c
488
i2c_rd(sd, PK_AUD_0HEAD, buf, PK_AUD_LEN);
drivers/media/i2c/tc358743.c
491
i2c_rd(sd, PK_SPD_0HEAD, buf, PK_SPD_LEN);
drivers/media/i2c/tc358743.c
494
i2c_rd(sd, PK_VS_0HEAD, buf, PK_VS_LEN);
drivers/media/i2c/tc358743.c
497
i2c_rd(sd, PK_ACP_0HEAD, buf, PK_ACP_LEN);
drivers/media/i2c/tc358743.c
514
static void print_infoframes(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
516
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tc358743.c
529
i2c_wr8(sd, TYP_ACP_SET, packet_type);
drivers/media/i2c/tc358743.c
531
if (!is_hdmi(sd)) {
drivers/media/i2c/tc358743.c
532
v4l2_info(sd, "DVI-D signal - InfoFrames not supported\n");
drivers/media/i2c/tc358743.c
536
i2c_rd(sd, PK_AVI_0HEAD, buffer, PK_AVI_LEN);
drivers/media/i2c/tc358743.c
540
i2c_rd(sd, PK_VS_0HEAD, buffer, PK_VS_LEN);
drivers/media/i2c/tc358743.c
544
i2c_rd(sd, PK_AUD_0HEAD, buffer, PK_AUD_LEN);
drivers/media/i2c/tc358743.c
548
i2c_rd(sd, PK_SPD_0HEAD, buffer, PK_SPD_LEN);
drivers/media/i2c/tc358743.c
552
i2c_rd(sd, PK_ACP_0HEAD, buffer, PK_ACP_LEN);
drivers/media/i2c/tc358743.c
555
v4l2_info(sd, "Packet: %*ph\n", PK_ACP_LEN, buffer);
drivers/media/i2c/tc358743.c
557
v4l2_info(sd, "InfoFrame: %*ph\n", PK_ACP_LEN, buffer);
drivers/media/i2c/tc358743.c
563
i2c_rd(sd, PK_MS_0HEAD, buffer, PK_MS_LEN);
drivers/media/i2c/tc358743.c
565
v4l2_info(sd, "MPEG Source InfoFrame: %*ph\n",
drivers/media/i2c/tc358743.c
568
i2c_rd(sd, PK_ISRC1_0HEAD, buffer, PK_ISRC1_LEN);
drivers/media/i2c/tc358743.c
570
v4l2_info(sd, "ISRC1 Packet: %*ph\n",
drivers/media/i2c/tc358743.c
573
i2c_rd(sd, PK_ISRC2_0HEAD, buffer, PK_ISRC2_LEN);
drivers/media/i2c/tc358743.c
575
v4l2_info(sd, "ISRC2 Packet: %*ph\n",
drivers/media/i2c/tc358743.c
581
static int tc358743_s_ctrl_detect_tx_5v(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
583
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
586
tx_5v_power_present(sd));
drivers/media/i2c/tc358743.c
589
static int tc358743_s_ctrl_audio_sampling_rate(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
591
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
594
get_audio_sampling_rate(sd));
drivers/media/i2c/tc358743.c
597
static int tc358743_s_ctrl_audio_present(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
599
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
602
audio_present(sd));
drivers/media/i2c/tc358743.c
605
static int tc358743_update_controls(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
609
ret |= tc358743_s_ctrl_detect_tx_5v(sd);
drivers/media/i2c/tc358743.c
610
ret |= tc358743_s_ctrl_audio_sampling_rate(sd);
drivers/media/i2c/tc358743.c
611
ret |= tc358743_s_ctrl_audio_present(sd);
drivers/media/i2c/tc358743.c
618
static void tc358743_reset_phy(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
620
v4l2_dbg(1, debug, sd, "%s:\n", __func__);
drivers/media/i2c/tc358743.c
622
i2c_wr8_and_or(sd, PHY_RST, ~MASK_RESET_CTRL, 0);
drivers/media/i2c/tc358743.c
623
i2c_wr8_and_or(sd, PHY_RST, ~MASK_RESET_CTRL, MASK_RESET_CTRL);
drivers/media/i2c/tc358743.c
626
static void tc358743_reset(struct v4l2_subdev *sd, uint16_t mask)
drivers/media/i2c/tc358743.c
628
u16 sysctl = i2c_rd16(sd, SYSCTL);
drivers/media/i2c/tc358743.c
630
i2c_wr16(sd, SYSCTL, sysctl | mask);
drivers/media/i2c/tc358743.c
631
i2c_wr16(sd, SYSCTL, sysctl & ~mask);
drivers/media/i2c/tc358743.c
634
static inline void tc358743_sleep_mode(struct v4l2_subdev *sd, bool enable)
drivers/media/i2c/tc358743.c
636
i2c_wr16_and_or(sd, SYSCTL, ~MASK_SLEEP,
drivers/media/i2c/tc358743.c
640
static inline void enable_stream(struct v4l2_subdev *sd, bool enable)
drivers/media/i2c/tc358743.c
642
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
644
v4l2_dbg(3, debug, sd, "%s: %sable\n",
drivers/media/i2c/tc358743.c
651
i2c_wr32(sd, TXOPTIONCNTRL, 0);
drivers/media/i2c/tc358743.c
653
i2c_wr32(sd, TXOPTIONCNTRL, MASK_CONTCLKMODE);
drivers/media/i2c/tc358743.c
655
i2c_wr8(sd, VI_MUTE, MASK_AUTO_MUTE);
drivers/media/i2c/tc358743.c
659
i2c_wr8(sd, VI_MUTE, MASK_AUTO_MUTE | MASK_VI_MUTE);
drivers/media/i2c/tc358743.c
663
i2c_wr16_and_or(sd, CONFCTL, ~(MASK_VBUFEN | MASK_ABUFEN),
drivers/media/i2c/tc358743.c
668
static void tc358743_set_pll(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
670
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
672
u16 pllctl0 = i2c_rd16(sd, PLLCTL0);
drivers/media/i2c/tc358743.c
673
u16 pllctl1 = i2c_rd16(sd, PLLCTL1);
drivers/media/i2c/tc358743.c
678
v4l2_dbg(2, debug, sd, "%s:\n", __func__);
drivers/media/i2c/tc358743.c
694
v4l2_dbg(1, debug, sd, "%s: updating PLL clock\n", __func__);
drivers/media/i2c/tc358743.c
695
tc358743_sleep_mode(sd, true);
drivers/media/i2c/tc358743.c
696
i2c_wr16(sd, PLLCTL0, pllctl0_new);
drivers/media/i2c/tc358743.c
697
i2c_wr16_and_or(sd, PLLCTL1,
drivers/media/i2c/tc358743.c
702
i2c_wr16_and_or(sd, PLLCTL1, ~MASK_CKEN, MASK_CKEN);
drivers/media/i2c/tc358743.c
703
tc358743_sleep_mode(sd, false);
drivers/media/i2c/tc358743.c
707
static void tc358743_set_ref_clk(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
709
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
722
i2c_wr8(sd, SYS_FREQ0, sys_freq & 0x00ff);
drivers/media/i2c/tc358743.c
723
i2c_wr8(sd, SYS_FREQ1, (sys_freq & 0xff00) >> 8);
drivers/media/i2c/tc358743.c
725
i2c_wr8_and_or(sd, PHY_CTL0, ~MASK_PHY_SYSCLK_IND,
drivers/media/i2c/tc358743.c
730
i2c_wr8(sd, FH_MIN0, fh_min & 0x00ff);
drivers/media/i2c/tc358743.c
731
i2c_wr8(sd, FH_MIN1, (fh_min & 0xff00) >> 8);
drivers/media/i2c/tc358743.c
734
i2c_wr8(sd, FH_MAX0, fh_max & 0x00ff);
drivers/media/i2c/tc358743.c
735
i2c_wr8(sd, FH_MAX1, (fh_max & 0xff00) >> 8);
drivers/media/i2c/tc358743.c
738
i2c_wr8(sd, LOCKDET_REF0, lockdet_ref & 0x0000ff);
drivers/media/i2c/tc358743.c
739
i2c_wr8(sd, LOCKDET_REF1, (lockdet_ref & 0x00ff00) >> 8);
drivers/media/i2c/tc358743.c
740
i2c_wr8(sd, LOCKDET_REF2, (lockdet_ref & 0x0f0000) >> 16);
drivers/media/i2c/tc358743.c
742
i2c_wr8_and_or(sd, NCO_F0_MOD, ~MASK_NCO_F0_MOD,
drivers/media/i2c/tc358743.c
752
i2c_wr16(sd, CECHCLK, cec_freq);
drivers/media/i2c/tc358743.c
753
i2c_wr16(sd, CECLCLK, cec_freq);
drivers/media/i2c/tc358743.c
756
static void tc358743_set_csi_color_space(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
758
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
762
v4l2_dbg(2, debug, sd, "%s: YCbCr 422 16-bit\n", __func__);
drivers/media/i2c/tc358743.c
763
i2c_wr8_and_or(sd, VOUT_SET2,
drivers/media/i2c/tc358743.c
766
i2c_wr8_and_or(sd, VI_REP, ~MASK_VOUT_COLOR_SEL & 0xff,
drivers/media/i2c/tc358743.c
769
i2c_wr16_and_or(sd, CONFCTL, ~MASK_YCBCRFMT,
drivers/media/i2c/tc358743.c
774
v4l2_dbg(2, debug, sd, "%s: RGB 888 24-bit\n", __func__);
drivers/media/i2c/tc358743.c
775
i2c_wr8_and_or(sd, VOUT_SET2,
drivers/media/i2c/tc358743.c
778
i2c_wr8_and_or(sd, VI_REP, ~MASK_VOUT_COLOR_SEL & 0xff,
drivers/media/i2c/tc358743.c
781
i2c_wr16_and_or(sd, CONFCTL, ~MASK_YCBCRFMT, 0);
drivers/media/i2c/tc358743.c
785
v4l2_dbg(2, debug, sd, "%s: Unsupported format code 0x%x\n",
drivers/media/i2c/tc358743.c
790
static unsigned tc358743_num_csi_lanes_needed(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
792
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
803
static void tc358743_set_csi(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
805
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
807
unsigned lanes = tc358743_num_csi_lanes_needed(sd);
drivers/media/i2c/tc358743.c
809
v4l2_dbg(3, debug, sd, "%s:\n", __func__);
drivers/media/i2c/tc358743.c
813
tc358743_reset(sd, MASK_CTXRST);
drivers/media/i2c/tc358743.c
816
i2c_wr32(sd, CLW_CNTRL, MASK_CLW_LANEDISABLE);
drivers/media/i2c/tc358743.c
818
i2c_wr32(sd, D0W_CNTRL, MASK_D0W_LANEDISABLE);
drivers/media/i2c/tc358743.c
820
i2c_wr32(sd, D1W_CNTRL, MASK_D1W_LANEDISABLE);
drivers/media/i2c/tc358743.c
822
i2c_wr32(sd, D2W_CNTRL, MASK_D2W_LANEDISABLE);
drivers/media/i2c/tc358743.c
824
i2c_wr32(sd, D3W_CNTRL, MASK_D3W_LANEDISABLE);
drivers/media/i2c/tc358743.c
826
i2c_wr32(sd, LINEINITCNT, pdata->lineinitcnt);
drivers/media/i2c/tc358743.c
827
i2c_wr32(sd, LPTXTIMECNT, pdata->lptxtimecnt);
drivers/media/i2c/tc358743.c
828
i2c_wr32(sd, TCLK_HEADERCNT, pdata->tclk_headercnt);
drivers/media/i2c/tc358743.c
829
i2c_wr32(sd, TCLK_TRAILCNT, pdata->tclk_trailcnt);
drivers/media/i2c/tc358743.c
830
i2c_wr32(sd, THS_HEADERCNT, pdata->ths_headercnt);
drivers/media/i2c/tc358743.c
831
i2c_wr32(sd, TWAKEUP, pdata->twakeup);
drivers/media/i2c/tc358743.c
832
i2c_wr32(sd, TCLK_POSTCNT, pdata->tclk_postcnt);
drivers/media/i2c/tc358743.c
833
i2c_wr32(sd, THS_TRAILCNT, pdata->ths_trailcnt);
drivers/media/i2c/tc358743.c
834
i2c_wr32(sd, HSTXVREGCNT, pdata->hstxvregcnt);
drivers/media/i2c/tc358743.c
836
i2c_wr32(sd, HSTXVREGEN,
drivers/media/i2c/tc358743.c
843
i2c_wr32(sd, TXOPTIONCNTRL, (state->bus.flags &
drivers/media/i2c/tc358743.c
845
i2c_wr32(sd, STARTCNTRL, MASK_START);
drivers/media/i2c/tc358743.c
846
i2c_wr32(sd, CSI_START, MASK_STRT);
drivers/media/i2c/tc358743.c
848
i2c_wr32(sd, CSI_CONFW, MASK_MODE_SET |
drivers/media/i2c/tc358743.c
856
i2c_wr32(sd, CSI_CONFW, MASK_MODE_SET |
drivers/media/i2c/tc358743.c
860
i2c_wr32(sd, CSI_CONFW, MASK_MODE_CLEAR |
drivers/media/i2c/tc358743.c
863
i2c_wr32(sd, CSI_CONFW, MASK_MODE_SET |
drivers/media/i2c/tc358743.c
867
static void tc358743_set_hdmi_phy(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
869
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
87
struct v4l2_subdev sd;
drivers/media/i2c/tc358743.c
874
i2c_wr8_and_or(sd, PHY_EN, ~MASK_ENABLE_PHY, 0x0);
drivers/media/i2c/tc358743.c
875
i2c_wr8(sd, PHY_CTL1, SET_PHY_AUTO_RST1_US(1600) |
drivers/media/i2c/tc358743.c
877
i2c_wr8_and_or(sd, PHY_CTL2, ~MASK_PHY_AUTO_RSTn,
drivers/media/i2c/tc358743.c
884
i2c_wr8(sd, PHY_BIAS, 0x40);
drivers/media/i2c/tc358743.c
885
i2c_wr8(sd, PHY_CSQ, SET_CSQ_CNT_LEVEL(0x0a));
drivers/media/i2c/tc358743.c
886
i2c_wr8(sd, AVM_CTL, 45);
drivers/media/i2c/tc358743.c
887
i2c_wr8_and_or(sd, HDMI_DET, ~MASK_HDMI_DET_V,
drivers/media/i2c/tc358743.c
889
i2c_wr8_and_or(sd, HV_RST, ~(MASK_H_PI_RST | MASK_V_PI_RST),
drivers/media/i2c/tc358743.c
894
i2c_wr8_and_or(sd, PHY_EN, ~MASK_ENABLE_PHY, MASK_ENABLE_PHY);
drivers/media/i2c/tc358743.c
897
static void tc358743_set_hdmi_audio(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
899
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
902
i2c_wr8(sd, FORCE_MUTE, 0x00);
drivers/media/i2c/tc358743.c
903
i2c_wr8(sd, AUTO_CMD0, MASK_AUTO_MUTE7 | MASK_AUTO_MUTE6 |
drivers/media/i2c/tc358743.c
906
i2c_wr8(sd, AUTO_CMD1, MASK_AUTO_MUTE9);
drivers/media/i2c/tc358743.c
907
i2c_wr8(sd, AUTO_CMD2, MASK_AUTO_PLAY3 | MASK_AUTO_PLAY2);
drivers/media/i2c/tc358743.c
908
i2c_wr8(sd, BUFINIT_START, SET_BUFINIT_START_MS(500));
drivers/media/i2c/tc358743.c
909
i2c_wr8(sd, FS_MUTE, 0x00);
drivers/media/i2c/tc358743.c
910
i2c_wr8(sd, FS_IMODE, MASK_NLPCM_SMODE | MASK_FS_SMODE);
drivers/media/i2c/tc358743.c
911
i2c_wr8(sd, ACR_MODE, MASK_CTS_MODE);
drivers/media/i2c/tc358743.c
912
i2c_wr8(sd, ACR_MDF0, MASK_ACR_L2MDF_1976_PPM | MASK_ACR_L1MDF_976_PPM);
drivers/media/i2c/tc358743.c
913
i2c_wr8(sd, ACR_MDF1, MASK_ACR_L3MDF_3906_PPM);
drivers/media/i2c/tc358743.c
914
i2c_wr8(sd, SDO_MODE1, MASK_SDO_FMT_I2S);
drivers/media/i2c/tc358743.c
915
i2c_wr8(sd, DIV_MODE, SET_DIV_DLY_MS(100));
drivers/media/i2c/tc358743.c
918
i2c_wr16_and_or(sd, CONFCTL, 0xffff, MASK_AUDCHNUM_2 |
drivers/media/i2c/tc358743.c
923
static void tc358743_set_hdmi_info_frame_mode(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
926
i2c_wr8(sd, PK_INT_MODE, MASK_ISRC2_INT_MODE | MASK_ISRC_INT_MODE |
drivers/media/i2c/tc358743.c
930
i2c_wr8(sd, NO_PKT_LIMIT, 0x2c);
drivers/media/i2c/tc358743.c
931
i2c_wr8(sd, NO_PKT_CLR, 0x53);
drivers/media/i2c/tc358743.c
932
i2c_wr8(sd, ERR_PK_LIMIT, 0x01);
drivers/media/i2c/tc358743.c
933
i2c_wr8(sd, NO_PKT_LIMIT2, 0x30);
drivers/media/i2c/tc358743.c
934
i2c_wr8(sd, NO_GDB_LIMIT, 0x10);
drivers/media/i2c/tc358743.c
937
static void tc358743_initial_setup(struct v4l2_subdev *sd)
drivers/media/i2c/tc358743.c
939
struct tc358743_state *state = to_state(sd);
drivers/media/i2c/tc358743.c
946
i2c_wr16_and_or(sd, SYSCTL, ~(MASK_IRRST | MASK_CECRST),
drivers/media/i2c/tc358743.c
949
tc358743_reset(sd, MASK_CTXRST | MASK_HDMIRST);
drivers/media/i2c/tc358743.c
951
tc358743_reset(sd, MASK_CECRST);
drivers/media/i2c/tc358743.c
953
tc358743_sleep_mode(sd, false);
drivers/media/i2c/tc358743.c
955
i2c_wr16(sd, FIFOCTL, pdata->fifo_level);
drivers/media/i2c/tc358743.c
957
tc358743_set_ref_clk(sd);
drivers/media/i2c/tc358743.c
959
i2c_wr8_and_or(sd, DDC_CTL, ~MASK_DDC5V_MODE,
drivers/media/i2c/tc358743.c
961
i2c_wr8_and_or(sd, EDID_MODE, ~MASK_EDID_MODE, MASK_EDID_MODE_E_DDC);
drivers/media/i2c/tc358743.c
963
tc358743_set_hdmi_phy(sd);
drivers/media/i2c/tc358743.c
964
tc358743_set_hdmi_hdcp(sd, pdata->enable_hdcp);
drivers/media/i2c/tc358743.c
965
tc358743_set_hdmi_audio(sd);
drivers/media/i2c/tc358743.c
966
tc358743_set_hdmi_info_frame_mode(sd);
drivers/media/i2c/tc358743.c
969
i2c_wr8_and_or(sd, VI_MODE, ~MASK_RGB_DVI, 0);
drivers/media/i2c/tc358743.c
971
i2c_wr8_and_or(sd, VOUT_SET2, ~MASK_VOUTCOLORMODE,
drivers/media/i2c/tc358743.c
973
i2c_wr8(sd, VOUT_SET3, MASK_VOUT_EXTCNT);
drivers/media/i2c/tc358743.c
982
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tc358743.c
984
i2c_wr32(sd, CECIMSK, enable ? MASK_CECTIM | MASK_CECRIM : 0);
drivers/media/i2c/tc358743.c
985
i2c_wr32(sd, CECICLR, MASK_CECTICLR | MASK_CECRICLR);
drivers/media/i2c/tc358743.c
986
i2c_wr32(sd, CECEN, enable);
drivers/media/i2c/tc358743.c
988
i2c_wr32(sd, CECREN, MASK_CECREN);
drivers/media/i2c/tc358743.c
996
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tc358743.c
999
reg = i2c_rd32(sd, CECRCTL1);
drivers/media/i2c/tc358746.c
1002
tc358746_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
drivers/media/i2c/tc358746.c
1004
struct tc358746 *tc358746 = to_tc358746(sd);
drivers/media/i2c/tc358746.c
1011
if (!pm_runtime_get_if_in_use(sd->dev))
drivers/media/i2c/tc358746.c
1017
pm_runtime_put_sync_autosuspend(sd->dev);
drivers/media/i2c/tc358746.c
1023
tc358746_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
drivers/media/i2c/tc358746.c
1025
struct tc358746 *tc358746 = to_tc358746(sd);
drivers/media/i2c/tc358746.c
1027
if (!pm_runtime_get_if_in_use(sd->dev))
drivers/media/i2c/tc358746.c
1032
pm_runtime_put_sync_autosuspend(sd->dev);
drivers/media/i2c/tc358746.c
1080
dev_dbg(tc358746->sd.dev, "MCLKCTL: %u (0x%x)\n", val, val);
drivers/media/i2c/tc358746.c
1092
dev_dbg(tc358746->sd.dev, "CLKCTL[MCLKDIV]: %u (0x%x)\n", val, val);
drivers/media/i2c/tc358746.c
1110
struct device *dev = tc358746->sd.dev;
drivers/media/i2c/tc358746.c
1258
struct device *dev = tc358746->sd.dev;
drivers/media/i2c/tc358746.c
1294
struct v4l2_subdev *sd = &tc358746->sd;
drivers/media/i2c/tc358746.c
1297
v4l2_i2c_subdev_init(sd, client, &tc358746_ops);
drivers/media/i2c/tc358746.c
1298
sd->internal_ops = &tc358746_internal_ops;
drivers/media/i2c/tc358746.c
1299
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/tc358746.c
1300
sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/i2c/tc358746.c
1301
sd->entity.ops = &tc358746_entity_ops;
drivers/media/i2c/tc358746.c
1305
err = media_entity_pads_init(&sd->entity, TC358746_NR_PADS,
drivers/media/i2c/tc358746.c
1310
err = v4l2_subdev_init_finalize(sd);
drivers/media/i2c/tc358746.c
1312
media_entity_cleanup(&sd->entity);
drivers/media/i2c/tc358746.c
1320
struct device *dev = tc358746->sd.dev;
drivers/media/i2c/tc358746.c
1376
struct device *dev = tc358746->sd.dev;
drivers/media/i2c/tc358746.c
142
struct v4l2_subdev sd;
drivers/media/i2c/tc358746.c
1437
tc358746->sd.ctrl_handler = &tc358746->ctrl_hdl;
drivers/media/i2c/tc358746.c
1443
struct v4l2_subdev *sd,
drivers/media/i2c/tc358746.c
1451
return v4l2_create_fwnode_links_to_pad(sd, sink, flags);
drivers/media/i2c/tc358746.c
1467
ep = fwnode_graph_get_endpoint_by_id(dev_fwnode(tc358746->sd.dev),
drivers/media/i2c/tc358746.c
1478
v4l2_async_subdev_nf_init(&tc358746->notifier, &tc358746->sd);
drivers/media/i2c/tc358746.c
1494
err = v4l2_async_register_subdev(&tc358746->sd);
drivers/media/i2c/tc358746.c
1603
v4l2_subdev_cleanup(&tc358746->sd);
drivers/media/i2c/tc358746.c
1604
media_entity_cleanup(&tc358746->sd.entity);
drivers/media/i2c/tc358746.c
1611
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tc358746.c
1612
struct tc358746 *tc358746 = to_tc358746(sd);
drivers/media/i2c/tc358746.c
1614
v4l2_subdev_cleanup(sd);
drivers/media/i2c/tc358746.c
1619
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/tc358746.c
1620
media_entity_cleanup(&sd->entity);
drivers/media/i2c/tc358746.c
1622
pm_runtime_disable(sd->dev);
drivers/media/i2c/tc358746.c
1623
pm_runtime_set_suspended(sd->dev);
drivers/media/i2c/tc358746.c
1624
pm_runtime_dont_use_autosuspend(sd->dev);
drivers/media/i2c/tc358746.c
167
static inline struct tc358746 *to_tc358746(struct v4l2_subdev *sd)
drivers/media/i2c/tc358746.c
169
return container_of(sd, struct tc358746, sd);
drivers/media/i2c/tc358746.c
342
dev_err(tc358746->sd.dev,
drivers/media/i2c/tc358746.c
359
dev_err(tc358746->sd.dev,
drivers/media/i2c/tc358746.c
456
dev_dbg(tc358746->sd.dev,
drivers/media/i2c/tc358746.c
493
dev_dbg(tc358746->sd.dev,
drivers/media/i2c/tc358746.c
506
struct v4l2_subdev *sd = &tc358746->sd;
drivers/media/i2c/tc358746.c
509
struct device *dev = sd->dev;
drivers/media/i2c/tc358746.c
516
sink_state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/tc358746.c
521
source_pad = media_entity_remote_source_pad_unique(&sd->entity);
drivers/media/i2c/tc358746.c
523
dev_err(dev, "Failed to get source pad of %s\n", sd->name);
drivers/media/i2c/tc358746.c
593
struct device *dev = tc358746->sd.dev;
drivers/media/i2c/tc358746.c
684
dev_dbg(tc358746->sd.dev, "CLW_CNTRL: 0x%x\n", val);
drivers/media/i2c/tc358746.c
694
dev_dbg(tc358746->sd.dev, "D%uW_CNTRL: 0x%x\n", lane, val);
drivers/media/i2c/tc358746.c
710
dev_dbg(tc358746->sd.dev, "HSTXVREGEN: 0x%x\n", val);
drivers/media/i2c/tc358746.c
775
static int tc358746_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/tc358746.c
777
struct tc358746 *tc358746 = to_tc358746(sd);
drivers/media/i2c/tc358746.c
781
dev_dbg(sd->dev, "%sable\n", enable ? "en" : "dis");
drivers/media/i2c/tc358746.c
788
err = pm_runtime_resume_and_get(sd->dev);
drivers/media/i2c/tc358746.c
819
pm_runtime_put_sync_autosuspend(sd->dev);
drivers/media/i2c/tc358746.c
840
pm_runtime_put_sync_autosuspend(sd->dev);
drivers/media/i2c/tc358746.c
845
static int tc358746_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/tc358746.c
860
static int tc358746_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/tc358746.c
875
static int tc358746_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/tc358746.c
884
return v4l2_subdev_get_fmt(sd, sd_state, format);
drivers/media/i2c/tc358746.c
899
dev_dbg(sd->dev, "Update format: %ux%u code:0x%x -> %ux%u code:0x%x",
drivers/media/i2c/tc358746.c
917
struct device *dev = tc358746->sd.dev;
drivers/media/i2c/tc358746.c
987
static int tc358746_get_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/tc358746.c
990
struct tc358746 *tc358746 = to_tc358746(sd);
drivers/media/i2c/tda1997x.c
1008
io_write(sd, REG_AUDIO_OUT_ENABLE, reg);
drivers/media/i2c/tda1997x.c
1011
io_write(sd, REG_TEST_MODE, 0x00);
drivers/media/i2c/tda1997x.c
1018
tda1997x_hdmi_info_reset(struct v4l2_subdev *sd, u8 info_rst, bool reset_sus)
drivers/media/i2c/tda1997x.c
1023
reg = io_read(sd, REG_HDMI_INFO_RST);
drivers/media/i2c/tda1997x.c
1024
io_write(sd, REG_HDMI_INFO_RST, info_rst);
drivers/media/i2c/tda1997x.c
1028
reg = io_read(sd, REG_INT_FLG_CLR_MODE);
drivers/media/i2c/tda1997x.c
1029
io_write(sd, REG_INT_FLG_CLR_MODE, reg);
drivers/media/i2c/tda1997x.c
1033
reg = io_read(sd, REG_RATE_CTRL);
drivers/media/i2c/tda1997x.c
1037
reg = io_write(sd, REG_RATE_CTRL, reg);
drivers/media/i2c/tda1997x.c
1045
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tda1997x.c
1050
io_write(sd, REG_PON_OVR_EN, PON_DIS);
drivers/media/i2c/tda1997x.c
1052
io_write(sd, REG_CFG1, PON_EN);
drivers/media/i2c/tda1997x.c
1054
io_write(sd, REG_DEEP_PLL7_BYP, PON_DIS);
drivers/media/i2c/tda1997x.c
1056
reg = io_read(sd, REG_OF);
drivers/media/i2c/tda1997x.c
1058
io_write(sd, REG_OF, reg);
drivers/media/i2c/tda1997x.c
1062
reg = io_read(sd, REG_OF);
drivers/media/i2c/tda1997x.c
1064
io_write(sd, REG_OF, reg);
drivers/media/i2c/tda1997x.c
1066
io_write(sd, REG_DEEP_PLL7_BYP, PON_EN);
drivers/media/i2c/tda1997x.c
1068
io_write(sd, REG_CFG1, PON_DIS);
drivers/media/i2c/tda1997x.c
1070
io_write(sd, REG_PON_OVR_EN, PON_EN);
drivers/media/i2c/tda1997x.c
1075
tda1997x_detect_tx_5v(struct v4l2_subdev *sd)
drivers/media/i2c/tda1997x.c
1077
u8 reg = io_read(sd, REG_DETECT_5V);
drivers/media/i2c/tda1997x.c
1083
tda1997x_detect_tx_hpd(struct v4l2_subdev *sd)
drivers/media/i2c/tda1997x.c
1085
u8 reg = io_read(sd, REG_DETECT_5V);
drivers/media/i2c/tda1997x.c
1094
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tda1997x.c
1110
vper = io_read24(sd, REG_V_PER);
drivers/media/i2c/tda1997x.c
1111
hper = io_read16(sd, REG_H_PER);
drivers/media/i2c/tda1997x.c
1112
hsper = io_read16(sd, REG_HS_WIDTH);
drivers/media/i2c/tda1997x.c
1119
v4l2_dbg(1, debug, sd, "Signal Timings: %u/%u/%u\n", vper, hper, hsper);
drivers/media/i2c/tda1997x.c
1121
htot = io_read16(sd, REG_FMT_H_TOT);
drivers/media/i2c/tda1997x.c
1122
hact = io_read16(sd, REG_FMT_H_ACT);
drivers/media/i2c/tda1997x.c
1123
hfront = io_read16(sd, REG_FMT_H_FRONT);
drivers/media/i2c/tda1997x.c
1124
hsync = io_read16(sd, REG_FMT_H_SYNC);
drivers/media/i2c/tda1997x.c
1125
hback = io_read16(sd, REG_FMT_H_BACK);
drivers/media/i2c/tda1997x.c
1127
vtot = io_read16(sd, REG_FMT_V_TOT);
drivers/media/i2c/tda1997x.c
1128
vact = io_read16(sd, REG_FMT_V_ACT);
drivers/media/i2c/tda1997x.c
1129
vfront1 = io_read(sd, REG_FMT_V_FRONT_F1);
drivers/media/i2c/tda1997x.c
1130
vfront2 = io_read(sd, REG_FMT_V_FRONT_F2);
drivers/media/i2c/tda1997x.c
1131
vsync = io_read(sd, REG_FMT_V_SYNC);
drivers/media/i2c/tda1997x.c
1132
vback1 = io_read(sd, REG_FMT_V_BACK_F1);
drivers/media/i2c/tda1997x.c
1133
vback2 = io_read(sd, REG_FMT_V_BACK_F2);
drivers/media/i2c/tda1997x.c
1135
v4l2_dbg(1, debug, sd, "Geometry: H %u %u %u %u %u Sync%c V %u %u %u %u %u %u %u Sync%c\n",
drivers/media/i2c/tda1997x.c
1169
v4l2_print_dv_timings(sd->name, "Detected format: ", timings, false);
drivers/media/i2c/tda1997x.c
1176
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tda1997x.c
1180
io_write(sd, REG_CLK_CFG, CLK_CFG_SEL_ACLK_EN | CLK_CFG_SEL_ACLK);
drivers/media/i2c/tda1997x.c
1181
io_write(sd, REG_PON_OVR_EN, PON_EN);
drivers/media/i2c/tda1997x.c
1182
io_write(sd, REG_PON_CBIAS, PON_EN);
drivers/media/i2c/tda1997x.c
1183
io_write(sd, REG_PON_PLL, PON_EN);
drivers/media/i2c/tda1997x.c
1185
reg = io_read(sd, REG_MODE_REC_CFG1);
drivers/media/i2c/tda1997x.c
1188
io_write(sd, REG_MODE_REC_CFG1, reg);
drivers/media/i2c/tda1997x.c
1189
io_write(sd, REG_CLK_CFG, CLK_CFG_DIS);
drivers/media/i2c/tda1997x.c
1190
io_write(sd, REG_PON_OVR_EN, PON_DIS);
drivers/media/i2c/tda1997x.c
1191
reg = io_read(sd, REG_MODE_REC_CFG1);
drivers/media/i2c/tda1997x.c
1193
io_write(sd, REG_MODE_REC_CFG1, reg);
drivers/media/i2c/tda1997x.c
1203
tda1997x_read_activity_status_regs(struct v4l2_subdev *sd)
drivers/media/i2c/tda1997x.c
1208
reg = io_read(sd, REG_CLK_A_STATUS);
drivers/media/i2c/tda1997x.c
1215
reg = io_read(sd, REG_CLK_B_STATUS);
drivers/media/i2c/tda1997x.c
1222
reg = io_read(sd, REG_SUS_STATUS);
drivers/media/i2c/tda1997x.c
1264
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tda1997x.c
1271
len = io_readn(sd, addr, sizeof(buffer), buffer);
drivers/media/i2c/tda1997x.c
1333
tda1997x_configure_audout(sd, state->audio_ch_alloc);
drivers/media/i2c/tda1997x.c
1335
tda1997x_hdmi_info_reset(sd, RESET_AUDIO, false);
drivers/media/i2c/tda1997x.c
1345
reg = io_read(sd, REG_PIX_REPEAT);
drivers/media/i2c/tda1997x.c
1349
io_write(sd, REG_PIX_REPEAT, reg);
drivers/media/i2c/tda1997x.c
1352
reg = io_read(sd, REG_PIX_REPEAT);
drivers/media/i2c/tda1997x.c
1355
io_write(sd, REG_PIX_REPEAT, reg);
drivers/media/i2c/tda1997x.c
1358
tda1997x_configure_csc(sd);
drivers/media/i2c/tda1997x.c
1368
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tda1997x.c
1371
source = io_read(sd, REG_INT_FLG_CLR_SUS);
drivers/media/i2c/tda1997x.c
1372
io_write(sd, REG_INT_FLG_CLR_SUS, source);
drivers/media/i2c/tda1997x.c
1382
reg = io_read(sd, REG_HDMI_INFO_RST);
drivers/media/i2c/tda1997x.c
1384
io_write(sd, REG_HDMI_INFO_RST, reg);
drivers/media/i2c/tda1997x.c
1386
io_write(sd, REG_HDMI_INFO_RST, reg);
drivers/media/i2c/tda1997x.c
1393
reg = io_read(sd, REG_SUS_STATUS);
drivers/media/i2c/tda1997x.c
1400
reg = io_read(sd, REG_SUS_STATUS);
drivers/media/i2c/tda1997x.c
1408
v4l2_subdev_notify_event(&state->sd, &tda1997x_ev_fmt);
drivers/media/i2c/tda1997x.c
1414
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tda1997x.c
1417
source = io_read(sd, REG_INT_FLG_CLR_DDC);
drivers/media/i2c/tda1997x.c
1418
io_write(sd, REG_INT_FLG_CLR_DDC, source);
drivers/media/i2c/tda1997x.c
1428
tda1997x_detect_tx_5v(sd));
drivers/media/i2c/tda1997x.c
1434
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tda1997x.c
1439
source = io_read(sd, REG_INT_FLG_CLR_RATE);
drivers/media/i2c/tda1997x.c
1440
io_write(sd, REG_INT_FLG_CLR_RATE, source);
drivers/media/i2c/tda1997x.c
1443
irq_status = tda1997x_read_activity_status_regs(sd);
drivers/media/i2c/tda1997x.c
1451
irq_status = tda1997x_read_activity_status_regs(sd);
drivers/media/i2c/tda1997x.c
1452
reg = io_read(sd, REG_INT_FLG_CLR_RATE);
drivers/media/i2c/tda1997x.c
1453
io_write(sd, REG_INT_FLG_CLR_RATE, reg);
drivers/media/i2c/tda1997x.c
1471
reg = io_read(sd, REG_PIX_REPEAT);
drivers/media/i2c/tda1997x.c
1474
io_write(sd, REG_PIX_REPEAT, reg);
drivers/media/i2c/tda1997x.c
1480
v4l2_subdev_notify_event(sd, &tda1997x_ev_fmt);
drivers/media/i2c/tda1997x.c
1499
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tda1997x.c
1502
source = io_read(sd, REG_INT_FLG_CLR_INFO);
drivers/media/i2c/tda1997x.c
1503
io_write(sd, REG_INT_FLG_CLR_INFO, source);
drivers/media/i2c/tda1997x.c
1526
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tda1997x.c
1529
source = io_read(sd, REG_INT_FLG_CLR_AUDIO);
drivers/media/i2c/tda1997x.c
1530
io_write(sd, REG_INT_FLG_CLR_AUDIO, source);
drivers/media/i2c/tda1997x.c
1536
reg = io_read(sd, REG_SUS_STATUS);
drivers/media/i2c/tda1997x.c
1538
reg = io_read(sd, REG_HDMI_INFO_RST);
drivers/media/i2c/tda1997x.c
1540
io_write(sd, REG_HDMI_INFO_RST, reg);
drivers/media/i2c/tda1997x.c
1542
io_write(sd, REG_HDMI_INFO_RST, reg);
drivers/media/i2c/tda1997x.c
1552
reg = io_read(sd, REG_AUDIO_FREQ);
drivers/media/i2c/tda1997x.c
1558
reg = io_read(sd, REG_AUDIO_FLAGS);
drivers/media/i2c/tda1997x.c
1574
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tda1997x.c
1577
source = io_read(sd, REG_INT_FLG_CLR_HDCP);
drivers/media/i2c/tda1997x.c
1578
io_write(sd, REG_INT_FLG_CLR_HDCP, source);
drivers/media/i2c/tda1997x.c
1585
reg = io_read(sd, REG_INT_MASK_TOP);
drivers/media/i2c/tda1997x.c
1587
io_write(sd, REG_INT_MASK_TOP, reg);
drivers/media/i2c/tda1997x.c
1595
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tda1997x.c
1601
flags = io_read(sd, REG_INT_FLG_CLR_TOP);
drivers/media/i2c/tda1997x.c
1636
tda1997x_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/tda1997x.c
1638
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
1644
vper = io_read24(sd, REG_V_PER) & MASK_VPER;
drivers/media/i2c/tda1997x.c
1645
hper = io_read16(sd, REG_H_PER) & MASK_HPER;
drivers/media/i2c/tda1997x.c
1646
hsper = io_read16(sd, REG_HS_WIDTH) & MASK_HSWIDTH;
drivers/media/i2c/tda1997x.c
1658
v4l2_dbg(1, debug, sd, "inputs:%d/%d timings:%d/%d/%d\n",
drivers/media/i2c/tda1997x.c
1672
static int tda1997x_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/tda1997x.c
1675
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
1689
tda1997x_configure_vhref(sd);
drivers/media/i2c/tda1997x.c
1691
tda1997x_configure_csc(sd);
drivers/media/i2c/tda1997x.c
1697
static int tda1997x_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/tda1997x.c
1700
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
1710
static int tda1997x_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/tda1997x.c
1713
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
1734
static int tda1997x_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/tda1997x.c
1737
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
1746
static int tda1997x_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/tda1997x.c
1750
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
1778
static int tda1997x_get_format(struct v4l2_subdev *sd,
drivers/media/i2c/tda1997x.c
1782
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
1800
static int tda1997x_set_format(struct v4l2_subdev *sd,
drivers/media/i2c/tda1997x.c
1804
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
1834
tda1997x_configure_csc(sd);
drivers/media/i2c/tda1997x.c
1841
static int tda1997x_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
drivers/media/i2c/tda1997x.c
1843
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
1868
static int tda1997x_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
drivers/media/i2c/tda1997x.c
1870
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
1882
tda1997x_disable_edid(sd);
drivers/media/i2c/tda1997x.c
1891
tda1997x_disable_edid(sd);
drivers/media/i2c/tda1997x.c
1895
io_write(sd, REG_EDID_IN_BYTE0 + i, edid->edid[i]);
drivers/media/i2c/tda1997x.c
1899
io_write(sd, REG_EDID_IN_BYTE128 + i, edid->edid[i+128]);
drivers/media/i2c/tda1997x.c
1905
tda1997x_enable_edid(sd);
drivers/media/i2c/tda1997x.c
1910
static int tda1997x_get_dv_timings_cap(struct v4l2_subdev *sd,
drivers/media/i2c/tda1997x.c
1917
static int tda1997x_enum_dv_timings(struct v4l2_subdev *sd,
drivers/media/i2c/tda1997x.c
1941
static int tda1997x_log_infoframe(struct v4l2_subdev *sd, int addr)
drivers/media/i2c/tda1997x.c
1943
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
1949
len = io_readn(sd, addr, sizeof(buffer), buffer);
drivers/media/i2c/tda1997x.c
1950
v4l2_dbg(1, debug, sd, "infoframe: addr=%d len=%d\n", addr, len);
drivers/media/i2c/tda1997x.c
1963
static int tda1997x_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/tda1997x.c
1965
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
1969
v4l2_info(sd, "-----Chip status-----\n");
drivers/media/i2c/tda1997x.c
1970
v4l2_info(sd, "Chip: %s N%d\n", state->info->name,
drivers/media/i2c/tda1997x.c
1972
v4l2_info(sd, "EDID Enabled: %s\n", state->edid.present ? "yes" : "no");
drivers/media/i2c/tda1997x.c
1974
v4l2_info(sd, "-----Signal status-----\n");
drivers/media/i2c/tda1997x.c
1975
v4l2_info(sd, "Cable detected (+5V power): %s\n",
drivers/media/i2c/tda1997x.c
1976
tda1997x_detect_tx_5v(sd) ? "yes" : "no");
drivers/media/i2c/tda1997x.c
1977
v4l2_info(sd, "HPD detected: %s\n",
drivers/media/i2c/tda1997x.c
1978
tda1997x_detect_tx_hpd(sd) ? "yes" : "no");
drivers/media/i2c/tda1997x.c
1980
v4l2_info(sd, "-----Video Timings-----\n");
drivers/media/i2c/tda1997x.c
1983
v4l2_info(sd, "No video detected\n");
drivers/media/i2c/tda1997x.c
1986
v4l2_info(sd, "Invalid signal detected\n");
drivers/media/i2c/tda1997x.c
1989
v4l2_print_dv_timings(sd->name, "Configured format: ",
drivers/media/i2c/tda1997x.c
1992
v4l2_info(sd, "-----Color space-----\n");
drivers/media/i2c/tda1997x.c
1993
v4l2_info(sd, "Input color space: %s %s %s",
drivers/media/i2c/tda1997x.c
1998
v4l2_info(sd, "Output color space: %s",
drivers/media/i2c/tda1997x.c
2000
v4l2_info(sd, "Color space conversion: %s", state->conv ?
drivers/media/i2c/tda1997x.c
2003
v4l2_info(sd, "-----Audio-----\n");
drivers/media/i2c/tda1997x.c
2005
v4l2_info(sd, "audio: %dch %dHz\n", state->audio_channels,
drivers/media/i2c/tda1997x.c
2008
v4l2_info(sd, "audio: none\n");
drivers/media/i2c/tda1997x.c
2011
v4l2_info(sd, "-----Infoframes-----\n");
drivers/media/i2c/tda1997x.c
2012
tda1997x_log_infoframe(sd, AUD_IF);
drivers/media/i2c/tda1997x.c
2013
tda1997x_log_infoframe(sd, SPD_IF);
drivers/media/i2c/tda1997x.c
2014
tda1997x_log_infoframe(sd, AVI_IF);
drivers/media/i2c/tda1997x.c
2019
static int tda1997x_subscribe_event(struct v4l2_subdev *sd,
drivers/media/i2c/tda1997x.c
2025
return v4l2_src_change_event_subdev_subscribe(sd, fh, sub);
drivers/media/i2c/tda1997x.c
2027
return v4l2_ctrl_subdev_subscribe_event(sd, fh, sub);
drivers/media/i2c/tda1997x.c
2059
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/tda1997x.c
2060
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
2067
tda1997x_configure_csc(sd);
drivers/media/i2c/tda1997x.c
2076
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/tda1997x.c
2077
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
2091
static int tda1997x_core_init(struct v4l2_subdev *sd)
drivers/media/i2c/tda1997x.c
2093
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
2099
io_write(sd, REG_HPD_AUTO_CTRL, HPD_AUTO_HPD_UNSEL);
drivers/media/i2c/tda1997x.c
2101
io_write(sd, REG_MAN_SUS_HDMI_SEL, MAN_DIS_HDCP | MAN_RST_HDCP);
drivers/media/i2c/tda1997x.c
2102
io_write(sd, REG_CGU_DBG_SEL, 1 << CGU_DBG_CLK_SEL_SHIFT);
drivers/media/i2c/tda1997x.c
2106
io_write(sd, REG_SUS_SET_RGB2, 0x06);
drivers/media/i2c/tda1997x.c
2107
io_write(sd, REG_SUS_SET_RGB3, 0x06);
drivers/media/i2c/tda1997x.c
2110
io_write(sd, REG_RT_MAN_CTRL, RT_MAN_CTRL_RT |
drivers/media/i2c/tda1997x.c
2114
tda1997x_cec_write(sd, REG_PWR_CONTROL & 0xff, 0x04);
drivers/media/i2c/tda1997x.c
2116
tda1997x_cec_write(sd, REG_OSC_DIVIDER & 0xff, 0x03);
drivers/media/i2c/tda1997x.c
2117
tda1997x_cec_write(sd, REG_EN_OSC_PERIOD_LSB & 0xff, 0xa0);
drivers/media/i2c/tda1997x.c
2118
io_write(sd, REG_TIMER_D, 0x54);
drivers/media/i2c/tda1997x.c
2120
reg = tda1997x_cec_read(sd, REG_CONTROL & 0xff);
drivers/media/i2c/tda1997x.c
2122
tda1997x_cec_write(sd, REG_CONTROL & 0xff, reg);
drivers/media/i2c/tda1997x.c
2126
reg = io_read(sd, REG_VERSION);
drivers/media/i2c/tda1997x.c
2128
reg = io_read(sd, REG_CMTP_REG10);
drivers/media/i2c/tda1997x.c
2131
io_write(sd, REG_INT_MASK_TOP,
drivers/media/i2c/tda1997x.c
2135
io_write(sd, REG_INT_MASK_SUS, MASK_MPT | MASK_FMT | MASK_SUS_END);
drivers/media/i2c/tda1997x.c
2137
io_write(sd, REG_INT_MASK_RATE, MASK_RATE_B_ST | MASK_RATE_A_ST);
drivers/media/i2c/tda1997x.c
2139
io_write(sd, REG_INT_MASK_INFO,
drivers/media/i2c/tda1997x.c
2142
io_write(sd, REG_INT_MASK_AUDIO,
drivers/media/i2c/tda1997x.c
2146
io_write(sd, REG_INT_MASK_HDCP, MASK_STATE_C5);
drivers/media/i2c/tda1997x.c
2148
io_write(sd, REG_INT_MASK_DDC, MASK_DET_5V);
drivers/media/i2c/tda1997x.c
2150
io_write(sd, REG_INT_MASK_AFE, 0);
drivers/media/i2c/tda1997x.c
2151
io_write(sd, REG_INT_MASK_MODE, 0);
drivers/media/i2c/tda1997x.c
2154
io_write(sd, REG_INT_FLG_CLR_TOP, 0xff);
drivers/media/i2c/tda1997x.c
2155
io_write(sd, REG_INT_FLG_CLR_SUS, 0xff);
drivers/media/i2c/tda1997x.c
2156
io_write(sd, REG_INT_FLG_CLR_DDC, 0xff);
drivers/media/i2c/tda1997x.c
2157
io_write(sd, REG_INT_FLG_CLR_RATE, 0xff);
drivers/media/i2c/tda1997x.c
2158
io_write(sd, REG_INT_FLG_CLR_MODE, 0xff);
drivers/media/i2c/tda1997x.c
2159
io_write(sd, REG_INT_FLG_CLR_INFO, 0xff);
drivers/media/i2c/tda1997x.c
2160
io_write(sd, REG_INT_FLG_CLR_AUDIO, 0xff);
drivers/media/i2c/tda1997x.c
2161
io_write(sd, REG_INT_FLG_CLR_HDCP, 0xff);
drivers/media/i2c/tda1997x.c
2162
io_write(sd, REG_INT_FLG_CLR_AFE, 0xff);
drivers/media/i2c/tda1997x.c
2166
io_write(sd, REG_CGU_DBG_SEL, 1 << CGU_DBG_CLK_SEL_SHIFT);
drivers/media/i2c/tda1997x.c
2167
io_write24(sd, REG_CLK_MIN_RATE, CLK_MIN_RATE);
drivers/media/i2c/tda1997x.c
2168
io_write24(sd, REG_CLK_MAX_RATE, CLK_MAX_RATE);
drivers/media/i2c/tda1997x.c
2170
io_write(sd, REG_WDL_CFG, WDL_CFG_VAL);
drivers/media/i2c/tda1997x.c
2172
io_write(sd, REG_DEEP_COLOR_CTRL, DC_FILTER_VAL);
drivers/media/i2c/tda1997x.c
2174
io_write(sd, REG_SVC_MODE, 0x00);
drivers/media/i2c/tda1997x.c
2176
io_write(sd, REG_INFO_CTRL, 0xff);
drivers/media/i2c/tda1997x.c
2178
io_write(sd, REG_INFO_EXCEED, 3);
drivers/media/i2c/tda1997x.c
2187
tda1997x_hdmi_info_reset(sd, NACK_HDCP, true);
drivers/media/i2c/tda1997x.c
2190
tda1997x_manual_hpd(sd, HPD_LOW_BP);
drivers/media/i2c/tda1997x.c
2193
io_write(sd, REG_HDCP_BCAPS, HDCP_HDMI | HDCP_FAST_REAUTH);
drivers/media/i2c/tda1997x.c
2198
io_write(sd, REG_HDMI_CTRL, reg);
drivers/media/i2c/tda1997x.c
2201
tda1997x_hdmi_info_reset(sd, 0, true);
drivers/media/i2c/tda1997x.c
2204
reg = io_read(sd, REG_VDP_CTRL);
drivers/media/i2c/tda1997x.c
2206
io_write(sd, REG_VDP_CTRL, reg);
drivers/media/i2c/tda1997x.c
2215
io_write(sd, REG_VP35_32_CTRL + i, pdata->vidout_port_cfg[i]);
drivers/media/i2c/tda1997x.c
2219
tda1997x_configure_audout(sd, 0);
drivers/media/i2c/tda1997x.c
2242
io_write(sd, REG_AUDIO_CLOCK, reg);
drivers/media/i2c/tda1997x.c
2245
tda1997x_hdmi_info_reset(sd, RESET_AI, false);
drivers/media/i2c/tda1997x.c
2247
tda1997x_hdmi_info_reset(sd, RESET_IF, false);
drivers/media/i2c/tda1997x.c
2249
tda1997x_hdmi_info_reset(sd, RESET_AUDIO, false);
drivers/media/i2c/tda1997x.c
2251
tda1997x_hdmi_info_reset(sd, RESET_GAMUT, false);
drivers/media/i2c/tda1997x.c
2254
state->hdmi_status = io_read(sd, REG_HDMI_FLAGS);
drivers/media/i2c/tda1997x.c
2256
io_write(sd, REG_EDID_ENABLE, EDID_ENABLE_A_EN | EDID_ENABLE_B_EN);
drivers/media/i2c/tda1997x.c
226
struct v4l2_subdev sd;
drivers/media/i2c/tda1997x.c
2424
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tda1997x.c
2429
reg = io_read(sd, REG_CMTP_REG10);
drivers/media/i2c/tda1997x.c
2452
state->chip_revision = io_read(sd, REG_CMTP_REG11);
drivers/media/i2c/tda1997x.c
2470
struct v4l2_subdev *sd = snd_soc_dai_get_drvdata(dai);
drivers/media/i2c/tda1997x.c
2471
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
2529
struct v4l2_subdev *sd;
drivers/media/i2c/tda1997x.c
2591
sd = &state->sd;
drivers/media/i2c/tda1997x.c
2592
v4l2_i2c_subdev_init(sd, client, &tda1997x_subdev_ops);
drivers/media/i2c/tda1997x.c
2593
sd->internal_ops = &tda1997x_internal_ops;
drivers/media/i2c/tda1997x.c
2594
snprintf(sd->name, sizeof(sd->name), "%s %d-%04x",
drivers/media/i2c/tda1997x.c
2597
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/i2c/tda1997x.c
2598
sd->entity.function = MEDIA_ENT_F_DV_DECODER;
drivers/media/i2c/tda1997x.c
2599
sd->entity.ops = &tda1997x_media_ops;
drivers/media/i2c/tda1997x.c
2688
io_write(sd, REG_MAN_SUS_HDMI_SEL, MAN_RST_HDCP | MAN_DIS_HDCP);
drivers/media/i2c/tda1997x.c
2695
io_write(sd, REG_MAN_SUS_HDMI_SEL, 0x00);
drivers/media/i2c/tda1997x.c
2696
io_write(sd, REG_VDP_CTRL, 0x1f);
drivers/media/i2c/tda1997x.c
2714
ret = 0x34 + ((io_read(sd, REG_SLAVE_ADDR)>>4) & 0x03);
drivers/media/i2c/tda1997x.c
2724
ret = tda1997x_core_init(sd);
drivers/media/i2c/tda1997x.c
2744
state->sd.ctrl_handler = hdl;
drivers/media/i2c/tda1997x.c
2753
ret = media_entity_pads_init(&sd->entity, TDA1997X_NUM_PADS,
drivers/media/i2c/tda1997x.c
2760
ret = v4l2_async_register_subdev(sd);
drivers/media/i2c/tda1997x.c
2796
media_entity_cleanup(&sd->entity);
drivers/media/i2c/tda1997x.c
2812
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tda1997x.c
2813
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
2823
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/tda1997x.c
2824
media_entity_cleanup(&sd->entity);
drivers/media/i2c/tda1997x.c
296
static inline struct tda1997x_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/tda1997x.c
298
return container_of(sd, struct tda1997x_state, sd);
drivers/media/i2c/tda1997x.c
303
return &container_of(ctrl->handler, struct tda1997x_state, hdl)->sd;
drivers/media/i2c/tda1997x.c
306
static int tda1997x_cec_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/tda1997x.c
308
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
320
static int tda1997x_cec_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/tda1997x.c
322
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
339
static int tda1997x_setpage(struct v4l2_subdev *sd, u8 page)
drivers/media/i2c/tda1997x.c
341
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
358
static inline int io_read(struct v4l2_subdev *sd, u16 reg)
drivers/media/i2c/tda1997x.c
360
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
364
if (tda1997x_setpage(sd, reg >> 8)) {
drivers/media/i2c/tda1997x.c
381
static inline long io_read16(struct v4l2_subdev *sd, u16 reg)
drivers/media/i2c/tda1997x.c
386
val = io_read(sd, reg);
drivers/media/i2c/tda1997x.c
390
val = io_read(sd, reg + 1);
drivers/media/i2c/tda1997x.c
398
static inline long io_read24(struct v4l2_subdev *sd, u16 reg)
drivers/media/i2c/tda1997x.c
403
val = io_read(sd, reg);
drivers/media/i2c/tda1997x.c
407
val = io_read(sd, reg + 1);
drivers/media/i2c/tda1997x.c
411
val = io_read(sd, reg + 2);
drivers/media/i2c/tda1997x.c
419
static unsigned int io_readn(struct v4l2_subdev *sd, u16 reg, u8 len, u8 *data)
drivers/media/i2c/tda1997x.c
426
val = io_read(sd, reg + i);
drivers/media/i2c/tda1997x.c
436
static int io_write(struct v4l2_subdev *sd, u16 reg, u8 val)
drivers/media/i2c/tda1997x.c
438
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
442
if (tda1997x_setpage(sd, reg >> 8)) {
drivers/media/i2c/tda1997x.c
460
static int io_write16(struct v4l2_subdev *sd, u16 reg, u16 val)
drivers/media/i2c/tda1997x.c
464
ret = io_write(sd, reg, (val >> 8) & 0xff);
drivers/media/i2c/tda1997x.c
467
ret = io_write(sd, reg + 1, val & 0xff);
drivers/media/i2c/tda1997x.c
473
static int io_write24(struct v4l2_subdev *sd, u16 reg, u32 val)
drivers/media/i2c/tda1997x.c
477
ret = io_write(sd, reg, (val >> 16) & 0xff);
drivers/media/i2c/tda1997x.c
480
ret = io_write(sd, reg + 1, (val >> 8) & 0xff);
drivers/media/i2c/tda1997x.c
483
ret = io_write(sd, reg + 2, val & 0xff);
drivers/media/i2c/tda1997x.c
502
static int tda1997x_manual_hpd(struct v4l2_subdev *sd, enum hpd_mode mode)
drivers/media/i2c/tda1997x.c
506
hpd_auto = io_read(sd, REG_HPD_AUTO_CTRL);
drivers/media/i2c/tda1997x.c
507
hpd_pwr = io_read(sd, REG_HPD_POWER);
drivers/media/i2c/tda1997x.c
508
hpd_man = io_read(sd, REG_HPD_MAN_CTRL);
drivers/media/i2c/tda1997x.c
523
io_write(sd, REG_HPD_POWER, hpd_pwr);
drivers/media/i2c/tda1997x.c
524
io_write(sd, REG_HPD_MAN_CTRL, hpd_man);
drivers/media/i2c/tda1997x.c
531
io_write(sd, REG_HPD_POWER, hpd_pwr);
drivers/media/i2c/tda1997x.c
539
io_write(sd, REG_HPD_AUTO_CTRL, hpd_auto);
drivers/media/i2c/tda1997x.c
540
io_write(sd, REG_HPD_MAN_CTRL, hpd_man);
drivers/media/i2c/tda1997x.c
545
io_write(sd, REG_HPD_AUTO_CTRL, hpd_auto);
drivers/media/i2c/tda1997x.c
551
io_write(sd, REG_HPD_MAN_CTRL, hpd_man);
drivers/media/i2c/tda1997x.c
564
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tda1997x.c
566
v4l2_dbg(2, debug, sd, "%s\n", __func__);
drivers/media/i2c/tda1997x.c
569
tda1997x_manual_hpd(sd, HPD_HIGH_OTHER);
drivers/media/i2c/tda1997x.c
570
tda1997x_manual_hpd(sd, HPD_HIGH_BP);
drivers/media/i2c/tda1997x.c
575
static void tda1997x_disable_edid(struct v4l2_subdev *sd)
drivers/media/i2c/tda1997x.c
577
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
579
v4l2_dbg(1, debug, sd, "%s\n", __func__);
drivers/media/i2c/tda1997x.c
583
tda1997x_manual_hpd(sd, HPD_LOW_BP);
drivers/media/i2c/tda1997x.c
586
static void tda1997x_enable_edid(struct v4l2_subdev *sd)
drivers/media/i2c/tda1997x.c
588
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
590
v4l2_dbg(1, debug, sd, "%s\n", __func__);
drivers/media/i2c/tda1997x.c
645
tda1997x_configure_csc(struct v4l2_subdev *sd)
drivers/media/i2c/tda1997x.c
647
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
705
reg = io_read(sd, REG_VDP_CTRL);
drivers/media/i2c/tda1997x.c
707
io_write(sd, REG_VDP_CTRL, reg);
drivers/media/i2c/tda1997x.c
709
io_write16(sd, REG_VDP_MATRIX + 0, state->conv->offint1);
drivers/media/i2c/tda1997x.c
710
io_write16(sd, REG_VDP_MATRIX + 2, state->conv->offint2);
drivers/media/i2c/tda1997x.c
711
io_write16(sd, REG_VDP_MATRIX + 4, state->conv->offint3);
drivers/media/i2c/tda1997x.c
713
io_write16(sd, REG_VDP_MATRIX + 6, state->conv->p11coef);
drivers/media/i2c/tda1997x.c
714
io_write16(sd, REG_VDP_MATRIX + 8, state->conv->p12coef);
drivers/media/i2c/tda1997x.c
715
io_write16(sd, REG_VDP_MATRIX + 10, state->conv->p13coef);
drivers/media/i2c/tda1997x.c
716
io_write16(sd, REG_VDP_MATRIX + 12, state->conv->p21coef);
drivers/media/i2c/tda1997x.c
717
io_write16(sd, REG_VDP_MATRIX + 14, state->conv->p22coef);
drivers/media/i2c/tda1997x.c
718
io_write16(sd, REG_VDP_MATRIX + 16, state->conv->p23coef);
drivers/media/i2c/tda1997x.c
719
io_write16(sd, REG_VDP_MATRIX + 18, state->conv->p31coef);
drivers/media/i2c/tda1997x.c
720
io_write16(sd, REG_VDP_MATRIX + 20, state->conv->p32coef);
drivers/media/i2c/tda1997x.c
721
io_write16(sd, REG_VDP_MATRIX + 22, state->conv->p33coef);
drivers/media/i2c/tda1997x.c
723
io_write16(sd, REG_VDP_MATRIX + 24, state->conv->offout1);
drivers/media/i2c/tda1997x.c
724
io_write16(sd, REG_VDP_MATRIX + 26, state->conv->offout2);
drivers/media/i2c/tda1997x.c
725
io_write16(sd, REG_VDP_MATRIX + 28, state->conv->offout3);
drivers/media/i2c/tda1997x.c
728
reg = io_read(sd, REG_VDP_CTRL);
drivers/media/i2c/tda1997x.c
730
io_write(sd, REG_VDP_CTRL, reg);
drivers/media/i2c/tda1997x.c
735
io_write16(sd, REG_BLK_GY, blanking_codes->code_gy);
drivers/media/i2c/tda1997x.c
736
io_write16(sd, REG_BLK_BU, blanking_codes->code_bu);
drivers/media/i2c/tda1997x.c
737
io_write16(sd, REG_BLK_RV, blanking_codes->code_rv);
drivers/media/i2c/tda1997x.c
743
tda1997x_configure_vhref(struct v4l2_subdev *sd)
drivers/media/i2c/tda1997x.c
745
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
782
io_write16(sd, REG_FDW_S, 0x2ef); /* start position */
drivers/media/i2c/tda1997x.c
783
io_write16(sd, REG_FDW_E, 0x141); /* end position */
drivers/media/i2c/tda1997x.c
787
io_write16(sd, REG_PXCNT_PR, 4);
drivers/media/i2c/tda1997x.c
789
io_write16(sd, REG_PXCNT_PR, 1);
drivers/media/i2c/tda1997x.c
790
io_write16(sd, REG_PXCNT_NPIX, width & MASK_VHREF);
drivers/media/i2c/tda1997x.c
791
io_write16(sd, REG_LCNT_PR, 1);
drivers/media/i2c/tda1997x.c
792
io_write16(sd, REG_LCNT_NLIN, lines & MASK_VHREF);
drivers/media/i2c/tda1997x.c
800
io_write(sd, REG_VHREF_CTRL, reg);
drivers/media/i2c/tda1997x.c
809
io_write16(sd, REG_HREF_S, href_start & MASK_VHREF);
drivers/media/i2c/tda1997x.c
810
io_write16(sd, REG_HREF_E, href_end & MASK_VHREF);
drivers/media/i2c/tda1997x.c
812
io_write16(sd, REG_VREF_F1_S, vref_f1_start & MASK_VHREF);
drivers/media/i2c/tda1997x.c
813
io_write(sd, REG_VREF_F1_WIDTH, vref_f1_width);
drivers/media/i2c/tda1997x.c
815
io_write16(sd, REG_VREF_F2_S, vref_f2_start & MASK_VHREF);
drivers/media/i2c/tda1997x.c
816
io_write(sd, REG_VREF_F2_WIDTH, vref_f2_width);
drivers/media/i2c/tda1997x.c
821
io_write16(sd, REG_FREF_F1_S, reg);
drivers/media/i2c/tda1997x.c
823
io_write16(sd, REG_FREF_F2_S, reg);
drivers/media/i2c/tda1997x.c
830
struct v4l2_subdev *sd = &state->sd;
drivers/media/i2c/tda1997x.c
840
io_write(sd, REG_PCLK, reg);
drivers/media/i2c/tda1997x.c
851
io_write(sd, REG_FILTERS_CTRL, prefilter);
drivers/media/i2c/tda1997x.c
858
io_write(sd, REG_OF, reg);
drivers/media/i2c/tda1997x.c
861
reg = io_read(sd, REG_VDP_CTRL);
drivers/media/i2c/tda1997x.c
876
io_write(sd, REG_VDP_CTRL, reg);
drivers/media/i2c/tda1997x.c
882
io_write(sd, REG_DE_FREF, reg);
drivers/media/i2c/tda1997x.c
891
io_write(sd, REG_HS_HREF, reg);
drivers/media/i2c/tda1997x.c
900
io_write(sd, REG_VS_VREF, reg);
drivers/media/i2c/tda1997x.c
907
tda1997x_configure_audout(struct v4l2_subdev *sd, u8 channel_assignment)
drivers/media/i2c/tda1997x.c
909
struct tda1997x_state *state = to_state(sd);
drivers/media/i2c/tda1997x.c
918
io_write(sd, REG_AUDIO_PATH, channel_assignment);
drivers/media/i2c/tda1997x.c
965
io_write(sd, REG_AUDCFG, reg);
drivers/media/i2c/tda1997x.c
973
io_write(sd, REG_AUDIO_LAYOUT, reg);
drivers/media/i2c/tda1997x.c
976
io_write(sd, REG_FIFO_LATENCY_VAL, 0x80);
drivers/media/i2c/tda7432.c
220
static int tda7432_write(struct v4l2_subdev *sd, int subaddr, int val)
drivers/media/i2c/tda7432.c
222
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tda7432.c
225
v4l2_dbg(2, debug, sd, "In tda7432_write\n");
drivers/media/i2c/tda7432.c
226
v4l2_dbg(1, debug, sd, "Writing %d 0x%x\n", subaddr, val);
drivers/media/i2c/tda7432.c
230
v4l2_err(sd, "I/O error, trying (write %d 0x%x)\n",
drivers/media/i2c/tda7432.c
237
static int tda7432_set(struct v4l2_subdev *sd)
drivers/media/i2c/tda7432.c
239
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tda7432.c
256
v4l2_err(sd, "I/O error, trying tda7432_set\n");
drivers/media/i2c/tda7432.c
263
static int tda7432_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/tda7432.c
265
struct tda7432 *state = to_state(sd);
drivers/media/i2c/tda7432.c
267
v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
drivers/media/i2c/tda7432.c
273
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/tda7432.c
274
struct tda7432 *t = to_state(sd);
drivers/media/i2c/tda7432.c
300
tda7432_write(sd, TDA7432_LF, lf);
drivers/media/i2c/tda7432.c
301
tda7432_write(sd, TDA7432_LR, lr);
drivers/media/i2c/tda7432.c
302
tda7432_write(sd, TDA7432_RF, rf);
drivers/media/i2c/tda7432.c
303
tda7432_write(sd, TDA7432_RR, rr);
drivers/media/i2c/tda7432.c
310
tda7432_write(sd, TDA7432_VL, volume);
drivers/media/i2c/tda7432.c
320
tda7432_write(sd, TDA7432_TN, 0x10 | (bass << 4) | treble);
drivers/media/i2c/tda7432.c
349
struct v4l2_subdev *sd;
drivers/media/i2c/tda7432.c
357
sd = &t->sd;
drivers/media/i2c/tda7432.c
358
v4l2_i2c_subdev_init(sd, client, &tda7432_ops);
drivers/media/i2c/tda7432.c
370
sd->ctrl_handler = &t->hdl;
drivers/media/i2c/tda7432.c
381
v4l2_warn(sd, "loudness parameter must be between 0 and 15\n");
drivers/media/i2c/tda7432.c
388
tda7432_set(sd);
drivers/media/i2c/tda7432.c
394
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tda7432.c
395
struct tda7432 *t = to_state(sd);
drivers/media/i2c/tda7432.c
397
tda7432_set(sd);
drivers/media/i2c/tda7432.c
398
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/tda7432.c
63
struct v4l2_subdev sd;
drivers/media/i2c/tda7432.c
77
static inline struct tda7432 *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/tda7432.c
79
return container_of(sd, struct tda7432, sd);
drivers/media/i2c/tda7432.c
84
return &container_of(ctrl->handler, struct tda7432, hdl)->sd;
drivers/media/i2c/tda9840.c
108
v4l2_dbg(1, debug, sd, "TDA9840_SWITCH: 0x%02x\n", byte);
drivers/media/i2c/tda9840.c
109
tda9840_write(sd, SWITCH, byte);
drivers/media/i2c/tda9840.c
113
static int tda9840_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *t)
drivers/media/i2c/tda9840.c
115
int stat = tda9840_status(sd);
drivers/media/i2c/tda9840.c
154
struct v4l2_subdev *sd;
drivers/media/i2c/tda9840.c
165
sd = devm_kzalloc(&client->dev, sizeof(*sd), GFP_KERNEL);
drivers/media/i2c/tda9840.c
166
if (sd == NULL)
drivers/media/i2c/tda9840.c
168
v4l2_i2c_subdev_init(sd, client, &tda9840_ops);
drivers/media/i2c/tda9840.c
171
tda9840_write(sd, LEVEL_ADJUST, 0);
drivers/media/i2c/tda9840.c
172
tda9840_write(sd, STEREO_ADJUST, 0);
drivers/media/i2c/tda9840.c
173
tda9840_write(sd, SWITCH, TDA9840_SET_STEREO);
drivers/media/i2c/tda9840.c
179
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tda9840.c
181
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/tda9840.c
47
static void tda9840_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/tda9840.c
49
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tda9840.c
52
v4l2_dbg(1, debug, sd, "error writing %02x to %02x\n",
drivers/media/i2c/tda9840.c
56
static int tda9840_status(struct v4l2_subdev *sd)
drivers/media/i2c/tda9840.c
58
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tda9840.c
64
v4l2_dbg(1, debug, sd,
drivers/media/i2c/tda9840.c
72
v4l2_dbg(1, debug, sd,
drivers/media/i2c/tda9840.c
77
v4l2_dbg(1, debug, sd, "TDA9840_DETECT: byte: 0x%02x\n", byte);
drivers/media/i2c/tda9840.c
81
static int tda9840_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *t)
drivers/media/i2c/tda9840.c
83
int stat = tda9840_status(sd);
drivers/media/i2c/tea6415c.c
102
v4l2_dbg(1, debug, sd,
drivers/media/i2c/tea6415c.c
121
struct v4l2_subdev *sd;
drivers/media/i2c/tea6415c.c
129
sd = devm_kzalloc(&client->dev, sizeof(*sd), GFP_KERNEL);
drivers/media/i2c/tea6415c.c
130
if (sd == NULL)
drivers/media/i2c/tea6415c.c
132
v4l2_i2c_subdev_init(sd, client, &tea6415c_ops);
drivers/media/i2c/tea6415c.c
138
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tea6415c.c
140
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/tea6415c.c
37
static int tea6415c_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/tea6415c.c
40
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tea6415c.c
44
v4l2_dbg(1, debug, sd, "i=%d, o=%d\n", i, o);
drivers/media/i2c/tea6420.c
102
sd = devm_kzalloc(&client->dev, sizeof(*sd), GFP_KERNEL);
drivers/media/i2c/tea6420.c
103
if (sd == NULL)
drivers/media/i2c/tea6420.c
105
v4l2_i2c_subdev_init(sd, client, &tea6420_ops);
drivers/media/i2c/tea6420.c
110
err += tea6420_s_routing(sd, 6, i, 0);
drivers/media/i2c/tea6420.c
120
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tea6420.c
122
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/tea6420.c
38
static int tea6420_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/tea6420.c
41
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tea6420.c
47
v4l2_dbg(1, debug, sd, "i=%d, o=%d, g=%d\n", i, o, g);
drivers/media/i2c/tea6420.c
73
v4l2_dbg(1, debug, sd,
drivers/media/i2c/tea6420.c
92
struct v4l2_subdev *sd;
drivers/media/i2c/thp7312.c
2122
v4l2_i2c_subdev_init(&thp7312->sd, client, &thp7312_subdev_ops);
drivers/media/i2c/thp7312.c
2123
thp7312->sd.internal_ops = &thp7312_internal_ops;
drivers/media/i2c/thp7312.c
2124
thp7312->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/thp7312.c
2126
thp7312->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/thp7312.c
2128
ret = media_entity_pads_init(&thp7312->sd.entity, 1, &thp7312->pad);
drivers/media/i2c/thp7312.c
2153
thp7312->sd.ctrl_handler = &thp7312->ctrl_handler;
drivers/media/i2c/thp7312.c
2154
thp7312->sd.state_lock = thp7312->ctrl_handler.lock;
drivers/media/i2c/thp7312.c
2156
ret = v4l2_subdev_init_finalize(&thp7312->sd);
drivers/media/i2c/thp7312.c
2173
ret = v4l2_async_register_subdev(&thp7312->sd);
drivers/media/i2c/thp7312.c
2194
v4l2_subdev_cleanup(&thp7312->sd);
drivers/media/i2c/thp7312.c
2200
media_entity_cleanup(&thp7312->sd.entity);
drivers/media/i2c/thp7312.c
2206
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/thp7312.c
2207
struct thp7312_device *thp7312 = to_thp7312_dev(sd);
drivers/media/i2c/thp7312.c
2215
v4l2_async_unregister_subdev(&thp7312->sd);
drivers/media/i2c/thp7312.c
2216
v4l2_subdev_cleanup(&thp7312->sd);
drivers/media/i2c/thp7312.c
2217
media_entity_cleanup(&thp7312->sd.entity);
drivers/media/i2c/thp7312.c
252
struct v4l2_subdev sd;
drivers/media/i2c/thp7312.c
304
static inline struct thp7312_device *to_thp7312_dev(struct v4l2_subdev *sd)
drivers/media/i2c/thp7312.c
306
return container_of(sd, struct thp7312_device, sd);
drivers/media/i2c/thp7312.c
635
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/thp7312.c
636
struct thp7312_device *thp7312 = to_thp7312_dev(sd);
drivers/media/i2c/thp7312.c
647
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/thp7312.c
648
struct thp7312_device *thp7312 = to_thp7312_dev(sd);
drivers/media/i2c/thp7312.c
674
static int thp7312_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/thp7312.c
686
static int thp7312_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/thp7312.c
704
static int thp7312_enum_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/thp7312.c
731
static int thp7312_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/thp7312.c
735
struct thp7312_device *thp7312 = to_thp7312_dev(sd);
drivers/media/i2c/thp7312.c
768
static int thp7312_set_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/thp7312.c
772
struct thp7312_device *thp7312 = to_thp7312_dev(sd);
drivers/media/i2c/thp7312.c
800
static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/thp7312.c
802
struct thp7312_device *thp7312 = to_thp7312_dev(sd);
drivers/media/i2c/thp7312.c
806
sd_state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/thp7312.c
848
static int thp7312_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/ths7303.c
115
err = ths7303_write(sd, THS7303_CHANNEL_1, val);
drivers/media/i2c/ths7303.c
122
err = ths7303_write(sd, THS7303_CHANNEL_2, val);
drivers/media/i2c/ths7303.c
129
err = ths7303_write(sd, THS7303_CHANNEL_3, val);
drivers/media/i2c/ths7303.c
139
static int ths7303_s_std_output(struct v4l2_subdev *sd, v4l2_std_id norm)
drivers/media/i2c/ths7303.c
141
struct ths7303_state *state = to_state(sd);
drivers/media/i2c/ths7303.c
146
return ths7303_setval(sd, THS7303_FILTER_MODE_480I_576I);
drivers/media/i2c/ths7303.c
149
return ths7303_setval(sd, THS7303_FILTER_MODE_DISABLE);
drivers/media/i2c/ths7303.c
152
static int ths7303_config(struct v4l2_subdev *sd)
drivers/media/i2c/ths7303.c
154
struct ths7303_state *state = to_state(sd);
drivers/media/i2c/ths7303.c
158
ths7303_write(sd, THS7303_CHANNEL_1,
drivers/media/i2c/ths7303.c
159
(ths7303_read(sd, THS7303_CHANNEL_1) & 0xf8) |
drivers/media/i2c/ths7303.c
161
ths7303_write(sd, THS7303_CHANNEL_2,
drivers/media/i2c/ths7303.c
162
(ths7303_read(sd, THS7303_CHANNEL_2) & 0xf8) |
drivers/media/i2c/ths7303.c
164
ths7303_write(sd, THS7303_CHANNEL_3,
drivers/media/i2c/ths7303.c
165
(ths7303_read(sd, THS7303_CHANNEL_3) & 0xf8) |
drivers/media/i2c/ths7303.c
171
res = ths7303_setval(sd, THS7303_FILTER_MODE_1080P);
drivers/media/i2c/ths7303.c
173
res = ths7303_setval(sd, THS7303_FILTER_MODE_720P_1080I);
drivers/media/i2c/ths7303.c
175
res = ths7303_setval(sd, THS7303_FILTER_MODE_480P_576P);
drivers/media/i2c/ths7303.c
177
res = ths7303_setval(sd, THS7303_FILTER_MODE_480I_576I);
drivers/media/i2c/ths7303.c
180
res = ths7303_setval(sd, THS7303_FILTER_MODE_DISABLE);
drivers/media/i2c/ths7303.c
186
static int ths7303_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ths7303.c
188
struct ths7303_state *state = to_state(sd);
drivers/media/i2c/ths7303.c
192
return ths7303_config(sd);
drivers/media/i2c/ths7303.c
196
static int ths7303_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/ths7303.c
199
struct ths7303_state *state = to_state(sd);
drivers/media/i2c/ths7303.c
207
return ths7303_config(sd);
drivers/media/i2c/ths7303.c
217
static int ths7303_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/ths7303.c
221
reg->val = ths7303_read(sd, reg->reg);
drivers/media/i2c/ths7303.c
225
static int ths7303_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/ths7303.c
228
ths7303_write(sd, reg->reg, reg->val);
drivers/media/i2c/ths7303.c
263
static void ths7303_log_channel_status(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/ths7303.c
265
u8 val = ths7303_read(sd, reg);
drivers/media/i2c/ths7303.c
268
v4l2_info(sd, "Channel %d Off\n", reg);
drivers/media/i2c/ths7303.c
272
v4l2_info(sd, "Channel %d On\n", reg);
drivers/media/i2c/ths7303.c
273
v4l2_info(sd, " value 0x%x\n", val);
drivers/media/i2c/ths7303.c
274
v4l2_info(sd, " %s\n", stc_lpf_sel_txt[(val >> 6) & 0x3]);
drivers/media/i2c/ths7303.c
275
v4l2_info(sd, " %s\n", in_mux_sel_txt[(val >> 5) & 0x1]);
drivers/media/i2c/ths7303.c
276
v4l2_info(sd, " %s\n", lpf_freq_sel_txt[(val >> 3) & 0x3]);
drivers/media/i2c/ths7303.c
277
v4l2_info(sd, " %s\n", in_bias_sel_dis_cont_txt[(val >> 0) & 0x7]);
drivers/media/i2c/ths7303.c
280
static int ths7303_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/ths7303.c
282
struct ths7303_state *state = to_state(sd);
drivers/media/i2c/ths7303.c
284
v4l2_info(sd, "stream %s\n", state->stream_on ? "On" : "Off");
drivers/media/i2c/ths7303.c
292
v4l2_info(sd,
drivers/media/i2c/ths7303.c
301
v4l2_info(sd, "no timings set\n");
drivers/media/i2c/ths7303.c
304
ths7303_log_channel_status(sd, THS7303_CHANNEL_1);
drivers/media/i2c/ths7303.c
305
ths7303_log_channel_status(sd, THS7303_CHANNEL_2);
drivers/media/i2c/ths7303.c
306
ths7303_log_channel_status(sd, THS7303_CHANNEL_3);
drivers/media/i2c/ths7303.c
333
struct v4l2_subdev *sd;
drivers/media/i2c/ths7303.c
352
sd = &state->sd;
drivers/media/i2c/ths7303.c
353
v4l2_i2c_subdev_init(sd, client, &ths7303_ops);
drivers/media/i2c/ths7303.c
356
if (ths7303_setval(sd, THS7303_FILTER_MODE_480I_576I) < 0) {
drivers/media/i2c/ths7303.c
36
struct v4l2_subdev sd;
drivers/media/i2c/ths7303.c
366
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ths7303.c
368
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/ths7303.c
55
static inline struct ths7303_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/ths7303.c
57
return container_of(sd, struct ths7303_state, sd);
drivers/media/i2c/ths7303.c
60
static int ths7303_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/ths7303.c
62
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ths7303.c
67
static int ths7303_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/ths7303.c
69
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ths7303.c
82
static int ths7303_setval(struct v4l2_subdev *sd,
drivers/media/i2c/ths7303.c
85
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ths7303.c
86
struct ths7303_state *state = to_state(sd);
drivers/media/i2c/ths8200.c
100
ths8200_write(sd, reg, (ths8200_read(sd, reg) & clr_mask) | val_mask);
drivers/media/i2c/ths8200.c
105
static int ths8200_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/ths8200.c
108
reg->val = ths8200_read(sd, reg->reg & 0xff);
drivers/media/i2c/ths8200.c
114
static int ths8200_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/ths8200.c
117
ths8200_write(sd, reg->reg & 0xff, reg->val & 0xff);
drivers/media/i2c/ths8200.c
123
static int ths8200_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/ths8200.c
125
struct ths8200_state *state = to_state(sd);
drivers/media/i2c/ths8200.c
126
uint8_t reg_03 = ths8200_read(sd, THS8200_CHIP_CTL);
drivers/media/i2c/ths8200.c
128
v4l2_info(sd, "----- Chip status -----\n");
drivers/media/i2c/ths8200.c
129
v4l2_info(sd, "version: %u\n", state->chip_version);
drivers/media/i2c/ths8200.c
130
v4l2_info(sd, "power: %s\n", (reg_03 & 0x0c) ? "off" : "on");
drivers/media/i2c/ths8200.c
131
v4l2_info(sd, "reset: %s\n", (reg_03 & 0x01) ? "off" : "on");
drivers/media/i2c/ths8200.c
132
v4l2_info(sd, "test pattern: %s\n",
drivers/media/i2c/ths8200.c
134
v4l2_info(sd, "format: %ux%u\n",
drivers/media/i2c/ths8200.c
135
ths8200_read(sd, THS8200_DTG2_PIXEL_CNT_MSB) * 256 +
drivers/media/i2c/ths8200.c
136
ths8200_read(sd, THS8200_DTG2_PIXEL_CNT_LSB),
drivers/media/i2c/ths8200.c
137
(ths8200_read(sd, THS8200_DTG2_LINE_CNT_MSB) & 0x07) * 256 +
drivers/media/i2c/ths8200.c
138
ths8200_read(sd, THS8200_DTG2_LINE_CNT_LSB));
drivers/media/i2c/ths8200.c
139
v4l2_print_dv_timings(sd->name, "Configured format:",
drivers/media/i2c/ths8200.c
145
static int ths8200_s_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/ths8200.c
147
struct ths8200_state *state = to_state(sd);
drivers/media/i2c/ths8200.c
149
v4l2_dbg(1, debug, sd, "%s: power %s\n", __func__, on ? "on" : "off");
drivers/media/i2c/ths8200.c
154
ths8200_write_and_or(sd, THS8200_CHIP_CTL, 0xf2, (on ? 0x00 : 0x0c));
drivers/media/i2c/ths8200.c
172
static int ths8200_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/ths8200.c
174
struct ths8200_state *state = to_state(sd);
drivers/media/i2c/ths8200.c
177
ths8200_s_power(sd, true);
drivers/media/i2c/ths8200.c
179
ths8200_write_and_or(sd, THS8200_CHIP_CTL, 0xfe,
drivers/media/i2c/ths8200.c
182
v4l2_dbg(1, debug, sd, "%s: %sable\n",
drivers/media/i2c/ths8200.c
188
static void ths8200_core_init(struct v4l2_subdev *sd)
drivers/media/i2c/ths8200.c
191
ths8200_write_and_or(sd, THS8200_CHIP_CTL, 0x3f, 0xc0);
drivers/media/i2c/ths8200.c
198
ths8200_write(sd, THS8200_DATA_CNTL, 0x70);
drivers/media/i2c/ths8200.c
203
ths8200_write(sd, THS8200_DTG1_MODE, 0x87);
drivers/media/i2c/ths8200.c
210
ths8200_write(sd, THS8200_DTG1_Y_SYNC_MSB, 0x00);
drivers/media/i2c/ths8200.c
211
ths8200_write(sd, THS8200_DTG1_CBCR_SYNC_MSB, 0x00);
drivers/media/i2c/ths8200.c
214
static void ths8200_setup(struct v4l2_subdev *sd, struct v4l2_bt_timings *bt)
drivers/media/i2c/ths8200.c
222
ths8200_s_stream(sd, false);
drivers/media/i2c/ths8200.c
225
ths8200_write(sd, THS8200_DTG1_SPEC_A, bt->hsync);
drivers/media/i2c/ths8200.c
226
ths8200_write(sd, THS8200_DTG1_SPEC_B, bt->hfrontporch);
drivers/media/i2c/ths8200.c
230
ths8200_write(sd, THS8200_DTG1_SPEC_C, 0x00);
drivers/media/i2c/ths8200.c
235
ths8200_write(sd, THS8200_DTG1_SPEC_D_LSB,
drivers/media/i2c/ths8200.c
238
ths8200_write(sd, THS8200_DTG1_SPEC_E_LSB, 0x00);
drivers/media/i2c/ths8200.c
243
ths8200_write(sd, THS8200_DTG1_SPEC_DEH_MSB,
drivers/media/i2c/ths8200.c
247
ths8200_write(sd, THS8200_DTG1_SPEC_K_LSB, (bt->hfrontporch) & 0xff);
drivers/media/i2c/ths8200.c
248
ths8200_write(sd, THS8200_DTG1_SPEC_K_MSB,
drivers/media/i2c/ths8200.c
252
ths8200_write(sd, THS8200_DTG1_SPEC_G_LSB, (htotal(bt)/2) & 0xff);
drivers/media/i2c/ths8200.c
253
ths8200_write(sd, THS8200_DTG1_SPEC_G_MSB,
drivers/media/i2c/ths8200.c
257
ths8200_write(sd, THS8200_DTG1_TOT_PIXELS_MSB, htotal(bt) >> 8);
drivers/media/i2c/ths8200.c
258
ths8200_write(sd, THS8200_DTG1_TOT_PIXELS_LSB, htotal(bt) & 0xff);
drivers/media/i2c/ths8200.c
264
ths8200_write(sd, THS8200_DTG1_FRAME_FIELD_SZ_MSB,
drivers/media/i2c/ths8200.c
266
ths8200_write(sd, THS8200_DTG1_FRAME_SZ_LSB, vtotal(bt) & 0xff);
drivers/media/i2c/ths8200.c
272
ths8200_write(sd, THS8200_DTG1_FIELD_SZ_LSB, 0xff);
drivers/media/i2c/ths8200.c
289
ths8200_write_and_or(sd, THS8200_DTG2_BP1_2_MSB, 0x88,
drivers/media/i2c/ths8200.c
292
ths8200_write(sd, THS8200_DTG2_BP3_4_MSB, ((vtotal(bt)) >> 4) & 0x70);
drivers/media/i2c/ths8200.c
293
ths8200_write(sd, THS8200_DTG2_BP1_LSB, line_start_active_video & 0xff);
drivers/media/i2c/ths8200.c
294
ths8200_write(sd, THS8200_DTG2_BP2_LSB, line_start_front_porch & 0xff);
drivers/media/i2c/ths8200.c
295
ths8200_write(sd, THS8200_DTG2_BP3_LSB, (vtotal(bt)) & 0xff);
drivers/media/i2c/ths8200.c
298
ths8200_write(sd, THS8200_DTG2_LINETYPE1, 0x90);
drivers/media/i2c/ths8200.c
299
ths8200_write(sd, THS8200_DTG2_LINETYPE2, 0x90);
drivers/media/i2c/ths8200.c
302
ths8200_write(sd, THS8200_DTG2_HLENGTH_LSB, bt->hsync & 0xff);
drivers/media/i2c/ths8200.c
303
ths8200_write_and_or(sd, THS8200_DTG2_HLENGTH_LSB_HDLY_MSB, 0x3f,
drivers/media/i2c/ths8200.c
307
ths8200_write_and_or(sd, THS8200_DTG2_HLENGTH_LSB_HDLY_MSB, 0xe0,
drivers/media/i2c/ths8200.c
309
ths8200_write(sd, THS8200_DTG2_HLENGTH_HDLY_LSB, htotal(bt));
drivers/media/i2c/ths8200.c
312
ths8200_write(sd, THS8200_DTG2_VLENGTH1_LSB, (bt->vsync + 1) & 0xff);
drivers/media/i2c/ths8200.c
313
ths8200_write_and_or(sd, THS8200_DTG2_VLENGTH1_MSB_VDLY1_MSB, 0x3f,
drivers/media/i2c/ths8200.c
317
ths8200_write_and_or(sd, THS8200_DTG2_VLENGTH1_MSB_VDLY1_MSB, 0xf8,
drivers/media/i2c/ths8200.c
319
ths8200_write(sd, THS8200_DTG2_VDLY1_LSB, vtotal(bt) + 1);
drivers/media/i2c/ths8200.c
324
ths8200_write(sd, THS8200_DTG2_VLENGTH2_LSB, 0x00);
drivers/media/i2c/ths8200.c
325
ths8200_write(sd, THS8200_DTG2_VLENGTH2_MSB_VDLY2_MSB, 0x07);
drivers/media/i2c/ths8200.c
326
ths8200_write(sd, THS8200_DTG2_VDLY2_LSB, 0xff);
drivers/media/i2c/ths8200.c
330
ths8200_write(sd, THS8200_DTG2_HS_IN_DLY_MSB, 0);
drivers/media/i2c/ths8200.c
331
ths8200_write(sd, THS8200_DTG2_HS_IN_DLY_LSB, 0);
drivers/media/i2c/ths8200.c
332
ths8200_write(sd, THS8200_DTG2_VS_IN_DLY_MSB, 0);
drivers/media/i2c/ths8200.c
333
ths8200_write(sd, THS8200_DTG2_VS_IN_DLY_LSB, 0);
drivers/media/i2c/ths8200.c
349
ths8200_write(sd, THS8200_DTG2_CNTL, 0x44 | polarity);
drivers/media/i2c/ths8200.c
352
ths8200_s_stream(sd, true);
drivers/media/i2c/ths8200.c
354
v4l2_dbg(1, debug, sd, "%s: frame %dx%d, polarity %d\n"
drivers/media/i2c/ths8200.c
361
static int ths8200_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/ths8200.c
364
struct ths8200_state *state = to_state(sd);
drivers/media/i2c/ths8200.c
366
v4l2_dbg(1, debug, sd, "%s:\n", __func__);
drivers/media/i2c/ths8200.c
377
v4l2_dbg(1, debug, sd, "Unsupported format\n");
drivers/media/i2c/ths8200.c
386
ths8200_setup(sd, &timings->bt);
drivers/media/i2c/ths8200.c
391
static int ths8200_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/ths8200.c
394
struct ths8200_state *state = to_state(sd);
drivers/media/i2c/ths8200.c
396
v4l2_dbg(1, debug, sd, "%s:\n", __func__);
drivers/media/i2c/ths8200.c
406
static int ths8200_enum_dv_timings(struct v4l2_subdev *sd,
drivers/media/i2c/ths8200.c
41
struct v4l2_subdev sd;
drivers/media/i2c/ths8200.c
416
static int ths8200_dv_timings_cap(struct v4l2_subdev *sd,
drivers/media/i2c/ths8200.c
448
struct v4l2_subdev *sd;
drivers/media/i2c/ths8200.c
459
sd = &state->sd;
drivers/media/i2c/ths8200.c
460
v4l2_i2c_subdev_init(sd, client, &ths8200_ops);
drivers/media/i2c/ths8200.c
462
state->chip_version = ths8200_read(sd, THS8200_VERSION);
drivers/media/i2c/ths8200.c
463
v4l2_dbg(1, debug, sd, "chip version 0x%x\n", state->chip_version);
drivers/media/i2c/ths8200.c
465
ths8200_core_init(sd);
drivers/media/i2c/ths8200.c
467
error = v4l2_async_register_subdev(&state->sd);
drivers/media/i2c/ths8200.c
471
v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
drivers/media/i2c/ths8200.c
479
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/ths8200.c
480
struct ths8200_state *decoder = to_state(sd);
drivers/media/i2c/ths8200.c
482
v4l2_dbg(1, debug, sd, "%s removed @ 0x%x (%s)\n", client->name,
drivers/media/i2c/ths8200.c
485
ths8200_s_power(sd, false);
drivers/media/i2c/ths8200.c
486
v4l2_async_unregister_subdev(&decoder->sd);
drivers/media/i2c/ths8200.c
56
static inline struct ths8200_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/ths8200.c
58
return container_of(sd, struct ths8200_state, sd);
drivers/media/i2c/ths8200.c
71
static int ths8200_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/ths8200.c
73
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ths8200.c
78
static int ths8200_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/ths8200.c
80
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/ths8200.c
89
v4l2_err(sd, "I2C Write Problem\n");
drivers/media/i2c/ths8200.c
97
ths8200_write_and_or(struct v4l2_subdev *sd, u8 reg,
drivers/media/i2c/tlv320aic23b.c
100
v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
drivers/media/i2c/tlv320aic23b.c
135
struct v4l2_subdev *sd;
drivers/media/i2c/tlv320aic23b.c
147
sd = &state->sd;
drivers/media/i2c/tlv320aic23b.c
148
v4l2_i2c_subdev_init(sd, client, &tlv320aic23b_ops);
drivers/media/i2c/tlv320aic23b.c
153
tlv320aic23b_write(sd, 15, 0x000);
drivers/media/i2c/tlv320aic23b.c
155
tlv320aic23b_write(sd, 6, 0x00A);
drivers/media/i2c/tlv320aic23b.c
157
tlv320aic23b_write(sd, 7, 0x049);
drivers/media/i2c/tlv320aic23b.c
159
tlv320aic23b_write(sd, 0, 0x119);
drivers/media/i2c/tlv320aic23b.c
161
tlv320aic23b_write(sd, 8, 0x000);
drivers/media/i2c/tlv320aic23b.c
163
tlv320aic23b_write(sd, 9, 0x001);
drivers/media/i2c/tlv320aic23b.c
168
sd->ctrl_handler = &state->hdl;
drivers/media/i2c/tlv320aic23b.c
181
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tlv320aic23b.c
182
struct tlv320aic23b_state *state = to_state(sd);
drivers/media/i2c/tlv320aic23b.c
184
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/tlv320aic23b.c
31
struct v4l2_subdev sd;
drivers/media/i2c/tlv320aic23b.c
35
static inline struct tlv320aic23b_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/tlv320aic23b.c
37
return container_of(sd, struct tlv320aic23b_state, sd);
drivers/media/i2c/tlv320aic23b.c
42
return &container_of(ctrl->handler, struct tlv320aic23b_state, hdl)->sd;
drivers/media/i2c/tlv320aic23b.c
45
static int tlv320aic23b_write(struct v4l2_subdev *sd, int reg, u16 val)
drivers/media/i2c/tlv320aic23b.c
47
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tlv320aic23b.c
51
v4l2_err(sd, "Invalid register R%d\n", reg);
drivers/media/i2c/tlv320aic23b.c
59
v4l2_err(sd, "I2C: cannot write %03x to register R%d\n", val, reg);
drivers/media/i2c/tlv320aic23b.c
63
static int tlv320aic23b_s_clock_freq(struct v4l2_subdev *sd, u32 freq)
drivers/media/i2c/tlv320aic23b.c
67
tlv320aic23b_write(sd, 8, 0x018);
drivers/media/i2c/tlv320aic23b.c
70
tlv320aic23b_write(sd, 8, 0x022);
drivers/media/i2c/tlv320aic23b.c
73
tlv320aic23b_write(sd, 8, 0x000);
drivers/media/i2c/tlv320aic23b.c
83
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/tlv320aic23b.c
87
tlv320aic23b_write(sd, 0, 0x180); /* mute both channels */
drivers/media/i2c/tlv320aic23b.c
90
tlv320aic23b_write(sd, 0, 0x119);
drivers/media/i2c/tlv320aic23b.c
96
static int tlv320aic23b_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/tlv320aic23b.c
98
struct tlv320aic23b_state *state = to_state(sd);
drivers/media/i2c/tvaudio.c
1006
struct v4l2_subdev *sd = &chip->sd;
drivers/media/i2c/tvaudio.c
1050
v4l2_dbg(1, debug, sd,
drivers/media/i2c/tvaudio.c
1089
v4l2_dbg(1, debug, sd,
drivers/media/i2c/tvaudio.c
1097
struct v4l2_subdev *sd = &chip->sd;
drivers/media/i2c/tvaudio.c
1107
v4l2_dbg(1, debug, sd, "tda9874a_checkit(): DIC=0x%X, SIC=0x%X.\n", dic, sic);
drivers/media/i2c/tvaudio.c
1110
v4l2_info(sd, "found tda9874%s.\n", (dic == 0x11) ? "a" : "h");
drivers/media/i2c/tvaudio.c
113
struct v4l2_subdev sd;
drivers/media/i2c/tvaudio.c
1240
struct v4l2_subdev *sd = &chip->sd;
drivers/media/i2c/tvaudio.c
1251
v4l2_info(sd, "found tda9875%s rev. %d.\n",
drivers/media/i2c/tvaudio.c
140
static inline struct CHIPSTATE *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/tvaudio.c
142
return container_of(sd, struct CHIPSTATE, sd);
drivers/media/i2c/tvaudio.c
1449
struct v4l2_subdev *sd = &chip->sd;
drivers/media/i2c/tvaudio.c
1453
v4l2_dbg(1, debug, sd, "ta8874z_setaudmode(): mode: 0x%02x\n", mode);
drivers/media/i2c/tvaudio.c
147
return &container_of(ctrl->handler, struct CHIPSTATE, hdl)->sd;
drivers/media/i2c/tvaudio.c
156
struct v4l2_subdev *sd = &chip->sd;
drivers/media/i2c/tvaudio.c
157
struct i2c_client *c = v4l2_get_subdevdata(sd);
drivers/media/i2c/tvaudio.c
162
v4l2_dbg(1, debug, sd, "chip_write: 0x%x\n", val);
drivers/media/i2c/tvaudio.c
167
v4l2_warn(sd, "I/O error (write 0x%x)\n", val);
drivers/media/i2c/tvaudio.c
174
v4l2_info(sd,
drivers/media/i2c/tvaudio.c
1745
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/tvaudio.c
1746
struct CHIPSTATE *chip = to_state(sd);
drivers/media/i2c/tvaudio.c
1785
static int tvaudio_s_radio(struct v4l2_subdev *sd)
drivers/media/i2c/tvaudio.c
1787
struct CHIPSTATE *chip = to_state(sd);
drivers/media/i2c/tvaudio.c
1794
static int tvaudio_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/tvaudio.c
1797
struct CHIPSTATE *chip = to_state(sd);
drivers/media/i2c/tvaudio.c
180
v4l2_dbg(1, debug, sd, "chip_write: reg%d=0x%x\n",
drivers/media/i2c/tvaudio.c
1813
static int tvaudio_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
drivers/media/i2c/tvaudio.c
1815
struct CHIPSTATE *chip = to_state(sd);
drivers/media/i2c/tvaudio.c
1843
static int tvaudio_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
drivers/media/i2c/tvaudio.c
1845
struct CHIPSTATE *chip = to_state(sd);
drivers/media/i2c/tvaudio.c
1861
static int tvaudio_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/tvaudio.c
1863
struct CHIPSTATE *chip = to_state(sd);
drivers/media/i2c/tvaudio.c
1869
static int tvaudio_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *freq)
drivers/media/i2c/tvaudio.c
187
v4l2_warn(sd, "I/O error (write reg%d=0x%x)\n",
drivers/media/i2c/tvaudio.c
1871
struct CHIPSTATE *chip = to_state(sd);
drivers/media/i2c/tvaudio.c
1890
static int tvaudio_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/tvaudio.c
1892
struct CHIPSTATE *chip = to_state(sd);
drivers/media/i2c/tvaudio.c
1895
v4l2_info(sd, "Chip: %s\n", desc->name);
drivers/media/i2c/tvaudio.c
1896
v4l2_ctrl_handler_log_status(&chip->hdl, sd->name);
drivers/media/i2c/tvaudio.c
1942
struct v4l2_subdev *sd;
drivers/media/i2c/tvaudio.c
1956
sd = &chip->sd;
drivers/media/i2c/tvaudio.c
1957
v4l2_i2c_subdev_init(sd, client, &tvaudio_ops);
drivers/media/i2c/tvaudio.c
1960
v4l2_dbg(1, debug, sd, "chip found @ 0x%x\n", client->addr<<1);
drivers/media/i2c/tvaudio.c
1972
v4l2_dbg(1, debug, sd, "no matching chip description found\n");
drivers/media/i2c/tvaudio.c
1975
v4l2_info(sd, "%s found @ 0x%x (%s)\n", desc->name, client->addr<<1, client->adapter->name);
drivers/media/i2c/tvaudio.c
1977
v4l2_dbg(1, debug, sd, "matches:%s%s%s.\n",
drivers/media/i2c/tvaudio.c
200
struct v4l2_subdev *sd = &chip->sd;
drivers/media/i2c/tvaudio.c
2006
v4l2_info(sd, "volume callback undefined!\n");
drivers/media/i2c/tvaudio.c
2024
v4l2_info(sd, "bass/treble callbacks undefined!\n");
drivers/media/i2c/tvaudio.c
2038
sd->ctrl_handler = &chip->hdl;
drivers/media/i2c/tvaudio.c
2055
v4l2_info(sd, "set/get mode callbacks undefined!\n");
drivers/media/i2c/tvaudio.c
2062
v4l2_warn(sd, "failed to create kthread\n");
drivers/media/i2c/tvaudio.c
207
v4l2_info(sd,
drivers/media/i2c/tvaudio.c
2071
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tvaudio.c
2072
struct CHIPSTATE *chip = to_state(sd);
drivers/media/i2c/tvaudio.c
2081
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/tvaudio.c
221
struct v4l2_subdev *sd = &chip->sd;
drivers/media/i2c/tvaudio.c
222
struct i2c_client *c = v4l2_get_subdevdata(sd);
drivers/media/i2c/tvaudio.c
228
v4l2_warn(sd, "I/O error (read)\n");
drivers/media/i2c/tvaudio.c
233
v4l2_dbg(1, debug, sd, "chip_read: 0x%x\n", buffer);
drivers/media/i2c/tvaudio.c
239
struct v4l2_subdev *sd = &chip->sd;
drivers/media/i2c/tvaudio.c
240
struct i2c_client *c = v4l2_get_subdevdata(sd);
drivers/media/i2c/tvaudio.c
262
v4l2_warn(sd, "I/O error (read2)\n");
drivers/media/i2c/tvaudio.c
267
v4l2_dbg(1, debug, sd, "chip_read2: reg%d=0x%x\n",
drivers/media/i2c/tvaudio.c
274
struct v4l2_subdev *sd = &chip->sd;
drivers/media/i2c/tvaudio.c
275
struct i2c_client *c = v4l2_get_subdevdata(sd);
drivers/media/i2c/tvaudio.c
282
v4l2_info(sd,
drivers/media/i2c/tvaudio.c
291
v4l2_dbg(1, debug, sd, "chip_cmd(%s): reg=%d, data:",
drivers/media/i2c/tvaudio.c
304
v4l2_warn(sd, "I/O error (%s)\n", name);
drivers/media/i2c/tvaudio.c
329
struct v4l2_subdev *sd = &chip->sd;
drivers/media/i2c/tvaudio.c
332
v4l2_dbg(1, debug, sd, "thread started\n");
drivers/media/i2c/tvaudio.c
342
v4l2_dbg(1, debug, sd, "thread wakeup\n");
drivers/media/i2c/tvaudio.c
354
v4l2_dbg(1, debug, sd, "thread checkmode\n");
drivers/media/i2c/tvaudio.c
389
v4l2_dbg(1, debug, sd, "thread exiting\n");
drivers/media/i2c/tvaudio.c
418
struct v4l2_subdev *sd = &chip->sd;
drivers/media/i2c/tvaudio.c
432
v4l2_dbg(1, debug, sd,
drivers/media/i2c/tvaudio.c
750
struct v4l2_subdev *sd = &chip->sd;
drivers/media/i2c/tvaudio.c
763
v4l2_dbg(1, debug, sd,
drivers/media/i2c/tvaudio.c
771
struct v4l2_subdev *sd = &chip->sd;
drivers/media/i2c/tvaudio.c
776
v4l2_dbg(1, debug, sd,
drivers/media/i2c/tvaudio.c
781
v4l2_dbg(1, debug, sd,
drivers/media/i2c/tvaudio.c
784
v4l2_dbg(1, debug, sd, "tda9873_setaudmode(): sw_data = %d\n",
drivers/media/i2c/tvaudio.c
808
v4l2_dbg(1, debug, sd,
drivers/media/i2c/tvaudio.c
919
struct v4l2_subdev *sd = &chip->sd;
drivers/media/i2c/tvaudio.c
951
v4l2_dbg(1, debug, sd, "tda9874a_setup(): %s [0x%02X].\n",
drivers/media/i2c/tvaudio.c
958
struct v4l2_subdev *sd = &chip->sd;
drivers/media/i2c/tvaudio.c
998
v4l2_dbg(1, debug, sd,
drivers/media/i2c/tvp514x.c
1029
struct v4l2_subdev *sd;
drivers/media/i2c/tvp514x.c
1071
sd = &decoder->sd;
drivers/media/i2c/tvp514x.c
1072
v4l2_i2c_subdev_init(sd, client, &tvp514x_ops);
drivers/media/i2c/tvp514x.c
1076
decoder->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/tvp514x.c
1077
decoder->sd.entity.function = MEDIA_ENT_F_ATV_DECODER;
drivers/media/i2c/tvp514x.c
1079
ret = media_entity_pads_init(&decoder->sd.entity, 1, &decoder->pad);
drivers/media/i2c/tvp514x.c
1081
v4l2_err(sd, "%s decoder driver failed to register !!\n",
drivers/media/i2c/tvp514x.c
1082
sd->name);
drivers/media/i2c/tvp514x.c
1097
sd->ctrl_handler = &decoder->hdl;
drivers/media/i2c/tvp514x.c
1104
ret = v4l2_async_register_subdev(&decoder->sd);
drivers/media/i2c/tvp514x.c
1106
v4l2_info(sd, "%s decoder driver registered !!\n", sd->name);
drivers/media/i2c/tvp514x.c
1111
media_entity_cleanup(&decoder->sd.entity);
drivers/media/i2c/tvp514x.c
1125
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tvp514x.c
1126
struct tvp514x_decoder *decoder = to_decoder(sd);
drivers/media/i2c/tvp514x.c
1128
v4l2_async_unregister_subdev(&decoder->sd);
drivers/media/i2c/tvp514x.c
1129
media_entity_cleanup(&decoder->sd.entity);
drivers/media/i2c/tvp514x.c
262
static inline struct tvp514x_decoder *to_decoder(struct v4l2_subdev *sd)
drivers/media/i2c/tvp514x.c
264
return container_of(sd, struct tvp514x_decoder, sd);
drivers/media/i2c/tvp514x.c
269
return &container_of(ctrl->handler, struct tvp514x_decoder, hdl)->sd;
drivers/media/i2c/tvp514x.c
280
static int tvp514x_read_reg(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/tvp514x.c
283
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tvp514x.c
290
v4l2_warn(sd, "Read: retry ... %d\n", retry);
drivers/media/i2c/tvp514x.c
305
static void dump_reg(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/tvp514x.c
309
val = tvp514x_read_reg(sd, reg);
drivers/media/i2c/tvp514x.c
310
v4l2_info(sd, "Reg(0x%.2X): 0x%.2X\n", reg, val);
drivers/media/i2c/tvp514x.c
322
static int tvp514x_write_reg(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/tvp514x.c
325
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tvp514x.c
332
v4l2_warn(sd, "Write: retry ... %d\n", retry);
drivers/media/i2c/tvp514x.c
354
static int tvp514x_write_regs(struct v4l2_subdev *sd,
drivers/media/i2c/tvp514x.c
369
err = tvp514x_write_reg(sd, next->reg, (u8) next->val);
drivers/media/i2c/tvp514x.c
371
v4l2_err(sd, "Write failed. Err[%d]\n", err);
drivers/media/i2c/tvp514x.c
385
static enum tvp514x_std tvp514x_query_current_std(struct v4l2_subdev *sd)
drivers/media/i2c/tvp514x.c
389
std = tvp514x_read_reg(sd, REG_VIDEO_STD);
drivers/media/i2c/tvp514x.c
392
std_status = tvp514x_read_reg(sd, REG_VIDEO_STD_STATUS);
drivers/media/i2c/tvp514x.c
412
static void tvp514x_reg_dump(struct v4l2_subdev *sd)
drivers/media/i2c/tvp514x.c
414
dump_reg(sd, REG_INPUT_SEL);
drivers/media/i2c/tvp514x.c
415
dump_reg(sd, REG_AFE_GAIN_CTRL);
drivers/media/i2c/tvp514x.c
416
dump_reg(sd, REG_VIDEO_STD);
drivers/media/i2c/tvp514x.c
417
dump_reg(sd, REG_OPERATION_MODE);
drivers/media/i2c/tvp514x.c
418
dump_reg(sd, REG_COLOR_KILLER);
drivers/media/i2c/tvp514x.c
419
dump_reg(sd, REG_LUMA_CONTROL1);
drivers/media/i2c/tvp514x.c
420
dump_reg(sd, REG_LUMA_CONTROL2);
drivers/media/i2c/tvp514x.c
421
dump_reg(sd, REG_LUMA_CONTROL3);
drivers/media/i2c/tvp514x.c
422
dump_reg(sd, REG_BRIGHTNESS);
drivers/media/i2c/tvp514x.c
423
dump_reg(sd, REG_CONTRAST);
drivers/media/i2c/tvp514x.c
424
dump_reg(sd, REG_SATURATION);
drivers/media/i2c/tvp514x.c
425
dump_reg(sd, REG_HUE);
drivers/media/i2c/tvp514x.c
426
dump_reg(sd, REG_CHROMA_CONTROL1);
drivers/media/i2c/tvp514x.c
427
dump_reg(sd, REG_CHROMA_CONTROL2);
drivers/media/i2c/tvp514x.c
428
dump_reg(sd, REG_COMP_PR_SATURATION);
drivers/media/i2c/tvp514x.c
429
dump_reg(sd, REG_COMP_Y_CONTRAST);
drivers/media/i2c/tvp514x.c
430
dump_reg(sd, REG_COMP_PB_SATURATION);
drivers/media/i2c/tvp514x.c
431
dump_reg(sd, REG_COMP_Y_BRIGHTNESS);
drivers/media/i2c/tvp514x.c
432
dump_reg(sd, REG_AVID_START_PIXEL_LSB);
drivers/media/i2c/tvp514x.c
433
dump_reg(sd, REG_AVID_START_PIXEL_MSB);
drivers/media/i2c/tvp514x.c
434
dump_reg(sd, REG_AVID_STOP_PIXEL_LSB);
drivers/media/i2c/tvp514x.c
435
dump_reg(sd, REG_AVID_STOP_PIXEL_MSB);
drivers/media/i2c/tvp514x.c
436
dump_reg(sd, REG_HSYNC_START_PIXEL_LSB);
drivers/media/i2c/tvp514x.c
437
dump_reg(sd, REG_HSYNC_START_PIXEL_MSB);
drivers/media/i2c/tvp514x.c
438
dump_reg(sd, REG_HSYNC_STOP_PIXEL_LSB);
drivers/media/i2c/tvp514x.c
439
dump_reg(sd, REG_HSYNC_STOP_PIXEL_MSB);
drivers/media/i2c/tvp514x.c
440
dump_reg(sd, REG_VSYNC_START_LINE_LSB);
drivers/media/i2c/tvp514x.c
441
dump_reg(sd, REG_VSYNC_START_LINE_MSB);
drivers/media/i2c/tvp514x.c
442
dump_reg(sd, REG_VSYNC_STOP_LINE_LSB);
drivers/media/i2c/tvp514x.c
443
dump_reg(sd, REG_VSYNC_STOP_LINE_MSB);
drivers/media/i2c/tvp514x.c
444
dump_reg(sd, REG_VBLK_START_LINE_LSB);
drivers/media/i2c/tvp514x.c
445
dump_reg(sd, REG_VBLK_START_LINE_MSB);
drivers/media/i2c/tvp514x.c
446
dump_reg(sd, REG_VBLK_STOP_LINE_LSB);
drivers/media/i2c/tvp514x.c
447
dump_reg(sd, REG_VBLK_STOP_LINE_MSB);
drivers/media/i2c/tvp514x.c
448
dump_reg(sd, REG_SYNC_CONTROL);
drivers/media/i2c/tvp514x.c
449
dump_reg(sd, REG_OUTPUT_FORMATTER1);
drivers/media/i2c/tvp514x.c
450
dump_reg(sd, REG_OUTPUT_FORMATTER2);
drivers/media/i2c/tvp514x.c
451
dump_reg(sd, REG_OUTPUT_FORMATTER3);
drivers/media/i2c/tvp514x.c
452
dump_reg(sd, REG_OUTPUT_FORMATTER4);
drivers/media/i2c/tvp514x.c
453
dump_reg(sd, REG_OUTPUT_FORMATTER5);
drivers/media/i2c/tvp514x.c
454
dump_reg(sd, REG_OUTPUT_FORMATTER6);
drivers/media/i2c/tvp514x.c
455
dump_reg(sd, REG_CLEAR_LOST_LOCK);
drivers/media/i2c/tvp514x.c
465
static int tvp514x_configure(struct v4l2_subdev *sd,
drivers/media/i2c/tvp514x.c
472
tvp514x_write_regs(sd, decoder->tvp514x_regs);
drivers/media/i2c/tvp514x.c
477
tvp514x_reg_dump(sd);
drivers/media/i2c/tvp514x.c
493
static int tvp514x_detect(struct v4l2_subdev *sd,
drivers/media/i2c/tvp514x.c
497
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tvp514x.c
499
chip_id_msb = tvp514x_read_reg(sd, REG_CHIP_ID_MSB);
drivers/media/i2c/tvp514x.c
500
chip_id_lsb = tvp514x_read_reg(sd, REG_CHIP_ID_LSB);
drivers/media/i2c/tvp514x.c
501
rom_ver = tvp514x_read_reg(sd, REG_ROM_VERSION);
drivers/media/i2c/tvp514x.c
503
v4l2_dbg(1, debug, sd,
drivers/media/i2c/tvp514x.c
512
v4l2_err(sd, "chip id mismatch msb:0x%x lsb:0x%x\n",
drivers/media/i2c/tvp514x.c
519
v4l2_info(sd, "%s (Version - 0x%.2x) found at 0x%x (%s)\n",
drivers/media/i2c/tvp514x.c
533
static int tvp514x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std_id)
drivers/media/i2c/tvp514x.c
535
struct tvp514x_decoder *decoder = to_decoder(sd);
drivers/media/i2c/tvp514x.c
545
tvp514x_s_stream(sd, 1);
drivers/media/i2c/tvp514x.c
550
current_std = tvp514x_query_current_std(sd);
drivers/media/i2c/tvp514x.c
594
sync_lock_status = tvp514x_read_reg(sd, REG_STATUS1);
drivers/media/i2c/tvp514x.c
602
v4l2_dbg(1, debug, sd, "Current STD: %s\n",
drivers/media/i2c/tvp514x.c
615
static int tvp514x_s_std(struct v4l2_subdev *sd, v4l2_std_id std_id)
drivers/media/i2c/tvp514x.c
617
struct tvp514x_decoder *decoder = to_decoder(sd);
drivers/media/i2c/tvp514x.c
627
err = tvp514x_write_reg(sd, REG_VIDEO_STD,
drivers/media/i2c/tvp514x.c
636
v4l2_dbg(1, debug, sd, "Standard set to: %s\n",
drivers/media/i2c/tvp514x.c
652
static int tvp514x_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/tvp514x.c
655
struct tvp514x_decoder *decoder = to_decoder(sd);
drivers/media/i2c/tvp514x.c
668
err = tvp514x_write_reg(sd, REG_INPUT_SEL, input_sel);
drivers/media/i2c/tvp514x.c
672
output_sel |= tvp514x_read_reg(sd,
drivers/media/i2c/tvp514x.c
674
err = tvp514x_write_reg(sd, REG_OUTPUT_FORMATTER1,
drivers/media/i2c/tvp514x.c
684
v4l2_dbg(1, debug, sd, "Input set to: %d\n", input_sel);
drivers/media/i2c/tvp514x.c
698
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/tvp514x.c
699
struct tvp514x_decoder *decoder = to_decoder(sd);
drivers/media/i2c/tvp514x.c
706
err = tvp514x_write_reg(sd, REG_BRIGHTNESS, value);
drivers/media/i2c/tvp514x.c
711
err = tvp514x_write_reg(sd, REG_CONTRAST, value);
drivers/media/i2c/tvp514x.c
716
err = tvp514x_write_reg(sd, REG_SATURATION, value);
drivers/media/i2c/tvp514x.c
725
err = tvp514x_write_reg(sd, REG_HUE, value);
drivers/media/i2c/tvp514x.c
730
err = tvp514x_write_reg(sd, REG_AFE_GAIN_CTRL, value ? 0x0f : 0x0c);
drivers/media/i2c/tvp514x.c
736
v4l2_dbg(1, debug, sd, "Set Control: ID - %d - %d\n",
drivers/media/i2c/tvp514x.c
742
tvp514x_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/tvp514x.c
746
struct tvp514x_decoder *decoder = to_decoder(sd);
drivers/media/i2c/tvp514x.c
766
tvp514x_set_frame_interval(struct v4l2_subdev *sd,
drivers/media/i2c/tvp514x.c
77
static int tvp514x_s_stream(struct v4l2_subdev *sd, int enable);
drivers/media/i2c/tvp514x.c
770
struct tvp514x_decoder *decoder = to_decoder(sd);
drivers/media/i2c/tvp514x.c
799
static int tvp514x_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/tvp514x.c
802
struct tvp514x_decoder *decoder = to_decoder(sd);
drivers/media/i2c/tvp514x.c
811
err = tvp514x_write_reg(sd, REG_OPERATION_MODE, 0x01);
drivers/media/i2c/tvp514x.c
813
v4l2_err(sd, "Unable to turn off decoder\n");
drivers/media/i2c/tvp514x.c
822
err = tvp514x_write_regs(sd, decoder->int_seq);
drivers/media/i2c/tvp514x.c
824
v4l2_err(sd, "Unable to turn on decoder\n");
drivers/media/i2c/tvp514x.c
828
err = tvp514x_detect(sd, decoder);
drivers/media/i2c/tvp514x.c
830
v4l2_err(sd, "Unable to detect decoder\n");
drivers/media/i2c/tvp514x.c
833
err = tvp514x_configure(sd, decoder);
drivers/media/i2c/tvp514x.c
835
v4l2_err(sd, "Unable to configure decoder\n");
drivers/media/i2c/tvp514x.c
861
static int tvp514x_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/tvp514x.c
888
static int tvp514x_get_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/tvp514x.c
892
struct tvp514x_decoder *decoder = to_decoder(sd);
drivers/media/i2c/tvp514x.c
920
static int tvp514x_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/tvp514x.c
924
struct tvp514x_decoder *decoder = to_decoder(sd);
drivers/media/i2c/tvp514x.c
99
struct v4l2_subdev sd;
drivers/media/i2c/tvp5150.c
100
return container_of(sd, struct tvp5150, sd);
drivers/media/i2c/tvp5150.c
1010
tvp5150_selmux(sd);
drivers/media/i2c/tvp5150.c
1047
static int tvp5150_fill_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/tvp5150.c
105
return &container_of(ctrl->handler, struct tvp5150, hdl)->sd;
drivers/media/i2c/tvp5150.c
1052
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
1066
dev_dbg_lvl(sd->dev, 1, debug, "width = %d, height = %d\n", f->width,
drivers/media/i2c/tvp5150.c
1071
static unsigned int tvp5150_get_hmax(struct v4l2_subdev *sd)
drivers/media/i2c/tvp5150.c
1073
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
1078
std = tvp5150_read_std(sd);
drivers/media/i2c/tvp5150.c
108
static int tvp5150_read(struct v4l2_subdev *sd, unsigned char addr)
drivers/media/i2c/tvp5150.c
1086
static void tvp5150_set_hw_selection(struct v4l2_subdev *sd,
drivers/media/i2c/tvp5150.c
1089
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
1090
unsigned int hmax = tvp5150_get_hmax(sd);
drivers/media/i2c/tvp5150.c
110
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
1106
static int tvp5150_set_selection(struct v4l2_subdev *sd,
drivers/media/i2c/tvp5150.c
1110
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
1118
dev_dbg_lvl(sd->dev, 1, debug, "%s left=%d, top=%d, width=%d, height=%d\n",
drivers/media/i2c/tvp5150.c
1124
hmax = tvp5150_get_hmax(sd);
drivers/media/i2c/tvp5150.c
1151
tvp5150_set_hw_selection(sd, rect);
drivers/media/i2c/tvp5150.c
1158
static int tvp5150_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/tvp5150.c
1162
struct tvp5150 *decoder = container_of(sd, struct tvp5150, sd);
drivers/media/i2c/tvp5150.c
1174
std = tvp5150_read_std(sd);
drivers/media/i2c/tvp5150.c
1194
static int tvp5150_get_mbus_config(struct v4l2_subdev *sd,
drivers/media/i2c/tvp5150.c
1198
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
120
static void dump_reg_range(struct v4l2_subdev *sd, char *s, u8 init,
drivers/media/i2c/tvp5150.c
1212
static int tvp5150_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/tvp5150.c
1215
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
1223
std = tvp5150_read_std(sd);
drivers/media/i2c/tvp5150.c
1233
static int tvp5150_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/tvp5150.c
1244
static int tvp5150_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/tvp5150.c
1248
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
127
dprintk0(sd->dev, "too much data to dump\n");
drivers/media/i2c/tvp5150.c
1300
static int tvp5150_s_routing(struct v4l2_subdev *sd, u32 input, u32 output,
drivers/media/i2c/tvp5150.c
1307
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/media/i2c/tvp5150.c
1308
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
1332
dev_dbg_lvl(sd->dev, 1, debug, "link setup '%s':%d->'%s':%d[%d]",
drivers/media/i2c/tvp5150.c
1337
dev_dbg_lvl(sd->dev, 1, debug,
drivers/media/i2c/tvp5150.c
135
buf[j] = tvp5150_read(sd, i + j);
drivers/media/i2c/tvp5150.c
1363
tvp5150_s_routing(sd, is_svideo ? TVP5150_SVIDEO : tvp5150_pad->index,
drivers/media/i2c/tvp5150.c
137
dprintk0(sd->dev, "%s reg %02x = %*ph\n", s, i, len, buf);
drivers/media/i2c/tvp5150.c
1403
tvp5150_s_std(sd, new_norm ? new_norm : v4l2ca->sdtv_stds);
drivers/media/i2c/tvp5150.c
141
static int tvp5150_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/tvp5150.c
1418
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/tvp5150.c
1419
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
143
dprintk0(sd->dev, "tvp5150: Video input source selection #1 = 0x%02x\n",
drivers/media/i2c/tvp5150.c
1431
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/tvp5150.c
1432
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
144
tvp5150_read(sd, TVP5150_VD_IN_SRC_SEL_1));
drivers/media/i2c/tvp5150.c
1443
static int tvp5150_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/tvp5150.c
1445
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
145
dprintk0(sd->dev, "tvp5150: Analog channel controls = 0x%02x\n",
drivers/media/i2c/tvp5150.c
1453
ret = pm_runtime_resume_and_get(sd->dev);
drivers/media/i2c/tvp5150.c
1457
tvp5150_enable(sd);
drivers/media/i2c/tvp5150.c
146
tvp5150_read(sd, TVP5150_ANAL_CHL_CTL));
drivers/media/i2c/tvp5150.c
1465
v4l2_subdev_notify_event(&decoder->sd, &tvp5150_ev_fmt);
drivers/media/i2c/tvp5150.c
1467
pm_runtime_put(sd->dev);
drivers/media/i2c/tvp5150.c
147
dprintk0(sd->dev, "tvp5150: Operation mode controls = 0x%02x\n",
drivers/media/i2c/tvp5150.c
1475
static int tvp5150_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/tvp5150.c
1478
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
148
tvp5150_read(sd, TVP5150_OP_MODE_CTL));
drivers/media/i2c/tvp5150.c
1488
tvp5150_selmux(sd);
drivers/media/i2c/tvp5150.c
149
dprintk0(sd->dev, "tvp5150: Miscellaneous controls = 0x%02x\n",
drivers/media/i2c/tvp5150.c
1492
static int tvp5150_s_raw_fmt(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt)
drivers/media/i2c/tvp5150.c
1494
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
150
tvp5150_read(sd, TVP5150_MISC_CTL));
drivers/media/i2c/tvp5150.c
151
dprintk0(sd->dev, "tvp5150: Autoswitch mask= 0x%02x\n",
drivers/media/i2c/tvp5150.c
1514
static int tvp5150_s_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *svbi)
drivers/media/i2c/tvp5150.c
1516
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
152
tvp5150_read(sd, TVP5150_AUTOSW_MSK));
drivers/media/i2c/tvp5150.c
1523
tvp5150_set_vbi(sd, svbi->service_lines[0][i],
drivers/media/i2c/tvp5150.c
153
dprintk0(sd->dev, "tvp5150: Color killer threshold control = 0x%02x\n",
drivers/media/i2c/tvp5150.c
154
tvp5150_read(sd, TVP5150_COLOR_KIL_THSH_CTL));
drivers/media/i2c/tvp5150.c
1542
static int tvp5150_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *svbi)
drivers/media/i2c/tvp5150.c
155
dprintk0(sd->dev, "tvp5150: Luminance processing controls #1 #2 and #3 = %02x %02x %02x\n",
drivers/media/i2c/tvp5150.c
1550
tvp5150_get_vbi(sd, i);
drivers/media/i2c/tvp5150.c
1558
static int tvp5150_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
drivers/media/i2c/tvp5150.c
156
tvp5150_read(sd, TVP5150_LUMA_PROC_CTL_1),
drivers/media/i2c/tvp5150.c
1562
res = tvp5150_read(sd, reg->reg & 0xff);
drivers/media/i2c/tvp5150.c
1564
dev_err(sd->dev, "%s: failed with error = %d\n", __func__, res);
drivers/media/i2c/tvp5150.c
157
tvp5150_read(sd, TVP5150_LUMA_PROC_CTL_2),
drivers/media/i2c/tvp5150.c
1573
static int tvp5150_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
drivers/media/i2c/tvp5150.c
1575
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
158
tvp5150_read(sd, TVP5150_LUMA_PROC_CTL_3));
drivers/media/i2c/tvp5150.c
1581
static int tvp5150_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
drivers/media/i2c/tvp5150.c
1586
return v4l2_src_change_event_subdev_subscribe(sd, fh, sub);
drivers/media/i2c/tvp5150.c
1588
return v4l2_ctrl_subdev_subscribe_event(sd, fh, sub);
drivers/media/i2c/tvp5150.c
159
dprintk0(sd->dev, "tvp5150: Brightness control = 0x%02x\n",
drivers/media/i2c/tvp5150.c
1594
static int tvp5150_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
drivers/media/i2c/tvp5150.c
1596
int status = tvp5150_read(sd, 0x88);
drivers/media/i2c/tvp5150.c
160
tvp5150_read(sd, TVP5150_BRIGHT_CTL));
drivers/media/i2c/tvp5150.c
1602
static int tvp5150_registered(struct v4l2_subdev *sd)
drivers/media/i2c/tvp5150.c
1605
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
161
dprintk0(sd->dev, "tvp5150: Color saturation control = 0x%02x\n",
drivers/media/i2c/tvp5150.c
162
tvp5150_read(sd, TVP5150_SATURATION_CTL));
drivers/media/i2c/tvp5150.c
1629
ret = media_device_register_entity(sd->v4l2_dev->mdev, con);
drivers/media/i2c/tvp5150.c
163
dprintk0(sd->dev, "tvp5150: Hue control = 0x%02x\n",
drivers/media/i2c/tvp5150.c
1633
ret = media_create_pad_link(con, 0, &sd->entity, port, flags);
drivers/media/i2c/tvp5150.c
164
tvp5150_read(sd, TVP5150_HUE_CTL));
drivers/media/i2c/tvp5150.c
1644
ret = media_create_pad_link(con, 0, &sd->entity, port,
drivers/media/i2c/tvp5150.c
165
dprintk0(sd->dev, "tvp5150: Contrast control = 0x%02x\n",
drivers/media/i2c/tvp5150.c
1657
tvp5150_selmux(sd);
drivers/media/i2c/tvp5150.c
1659
tvp5150_s_std(sd, v4l2c->connector.analog.sdtv_stds);
drivers/media/i2c/tvp5150.c
166
tvp5150_read(sd, TVP5150_CONTRAST_CTL));
drivers/media/i2c/tvp5150.c
167
dprintk0(sd->dev, "tvp5150: Outputs and data rates select = 0x%02x\n",
drivers/media/i2c/tvp5150.c
1676
static int tvp5150_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/tvp5150.c
1678
return pm_runtime_resume_and_get(sd->dev);
drivers/media/i2c/tvp5150.c
168
tvp5150_read(sd, TVP5150_DATA_RATE_SEL));
drivers/media/i2c/tvp5150.c
1681
static int tvp5150_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/i2c/tvp5150.c
1683
pm_runtime_put(sd->dev);
drivers/media/i2c/tvp5150.c
169
dprintk0(sd->dev, "tvp5150: Configuration shared pins = 0x%02x\n",
drivers/media/i2c/tvp5150.c
170
tvp5150_read(sd, TVP5150_CONF_SHARED_PIN));
drivers/media/i2c/tvp5150.c
171
dprintk0(sd->dev, "tvp5150: Active video cropping start = 0x%02x%02x\n",
drivers/media/i2c/tvp5150.c
172
tvp5150_read(sd, TVP5150_ACT_VD_CROP_ST_MSB),
drivers/media/i2c/tvp5150.c
173
tvp5150_read(sd, TVP5150_ACT_VD_CROP_ST_LSB));
drivers/media/i2c/tvp5150.c
174
dprintk0(sd->dev, "tvp5150: Active video cropping stop = 0x%02x%02x\n",
drivers/media/i2c/tvp5150.c
175
tvp5150_read(sd, TVP5150_ACT_VD_CROP_STP_MSB),
drivers/media/i2c/tvp5150.c
176
tvp5150_read(sd, TVP5150_ACT_VD_CROP_STP_LSB));
drivers/media/i2c/tvp5150.c
177
dprintk0(sd->dev, "tvp5150: Genlock/RTC = 0x%02x\n",
drivers/media/i2c/tvp5150.c
178
tvp5150_read(sd, TVP5150_GENLOCK));
drivers/media/i2c/tvp5150.c
179
dprintk0(sd->dev, "tvp5150: Horizontal sync start = 0x%02x\n",
drivers/media/i2c/tvp5150.c
180
tvp5150_read(sd, TVP5150_HORIZ_SYNC_START));
drivers/media/i2c/tvp5150.c
181
dprintk0(sd->dev, "tvp5150: Vertical blanking start = 0x%02x\n",
drivers/media/i2c/tvp5150.c
182
tvp5150_read(sd, TVP5150_VERT_BLANKING_START));
drivers/media/i2c/tvp5150.c
1828
struct v4l2_subdev *sd = &core->sd;
drivers/media/i2c/tvp5150.c
1829
struct i2c_client *c = v4l2_get_subdevdata(sd);
drivers/media/i2c/tvp5150.c
183
dprintk0(sd->dev, "tvp5150: Vertical blanking stop = 0x%02x\n",
drivers/media/i2c/tvp5150.c
184
tvp5150_read(sd, TVP5150_VERT_BLANKING_STOP));
drivers/media/i2c/tvp5150.c
1846
dev_info(sd->dev, "tvp%04x (%u.%u) chip found @ 0x%02x (%s)\n",
drivers/media/i2c/tvp5150.c
185
dprintk0(sd->dev, "tvp5150: Chrominance processing control #1 and #2 = %02x %02x\n",
drivers/media/i2c/tvp5150.c
1851
dev_info(sd->dev, "tvp5150a detected.\n");
drivers/media/i2c/tvp5150.c
1853
dev_info(sd->dev, "tvp5150am1 detected.\n");
drivers/media/i2c/tvp5150.c
1858
dev_info(sd->dev, "tvp5151 detected.\n");
drivers/media/i2c/tvp5150.c
186
tvp5150_read(sd, TVP5150_CHROMA_PROC_CTL_1),
drivers/media/i2c/tvp5150.c
1860
dev_info(sd->dev, "*** unknown tvp%04x chip detected.\n",
drivers/media/i2c/tvp5150.c
187
tvp5150_read(sd, TVP5150_CHROMA_PROC_CTL_2));
drivers/media/i2c/tvp5150.c
188
dprintk0(sd->dev, "tvp5150: Interrupt reset register B = 0x%02x\n",
drivers/media/i2c/tvp5150.c
189
tvp5150_read(sd, TVP5150_INT_RESET_REG_B));
drivers/media/i2c/tvp5150.c
190
dprintk0(sd->dev, "tvp5150: Interrupt enable register B = 0x%02x\n",
drivers/media/i2c/tvp5150.c
1900
struct v4l2_subdev *sd = &decoder->sd;
drivers/media/i2c/tvp5150.c
1903
sd->entity.ops = &tvp5150_sd_media_ops;
drivers/media/i2c/tvp5150.c
1904
sd->entity.function = MEDIA_ENT_F_ATV_DECODER;
drivers/media/i2c/tvp5150.c
191
tvp5150_read(sd, TVP5150_INT_ENABLE_REG_B));
drivers/media/i2c/tvp5150.c
1914
return media_entity_pads_init(&sd->entity, TVP5150_NUM_PADS,
drivers/media/i2c/tvp5150.c
192
dprintk0(sd->dev, "tvp5150: Interrupt configuration register B = 0x%02x\n",
drivers/media/i2c/tvp5150.c
1928
struct device *dev = decoder->sd.dev;
drivers/media/i2c/tvp5150.c
193
tvp5150_read(sd, TVP5150_INTT_CONFIG_REG_B));
drivers/media/i2c/tvp5150.c
194
dprintk0(sd->dev, "tvp5150: Video standard = 0x%02x\n",
drivers/media/i2c/tvp5150.c
195
tvp5150_read(sd, TVP5150_VIDEO_STD));
drivers/media/i2c/tvp5150.c
196
dprintk0(sd->dev, "tvp5150: Chroma gain factor: Cb=0x%02x Cr=0x%02x\n",
drivers/media/i2c/tvp5150.c
197
tvp5150_read(sd, TVP5150_CB_GAIN_FACT),
drivers/media/i2c/tvp5150.c
198
tvp5150_read(sd, TVP5150_CR_GAIN_FACTOR));
drivers/media/i2c/tvp5150.c
199
dprintk0(sd->dev, "tvp5150: Macrovision on counter = 0x%02x\n",
drivers/media/i2c/tvp5150.c
1991
struct device *dev = decoder->sd.dev;
drivers/media/i2c/tvp5150.c
200
tvp5150_read(sd, TVP5150_MACROVISION_ON_CTR));
drivers/media/i2c/tvp5150.c
201
dprintk0(sd->dev, "tvp5150: Macrovision off counter = 0x%02x\n",
drivers/media/i2c/tvp5150.c
202
tvp5150_read(sd, TVP5150_MACROVISION_OFF_CTR));
drivers/media/i2c/tvp5150.c
203
dprintk0(sd->dev, "tvp5150: ITU-R BT.656.%d timing(TVP5150AM1 only)\n",
drivers/media/i2c/tvp5150.c
204
(tvp5150_read(sd, TVP5150_REV_SELECT) & 1) ? 3 : 4);
drivers/media/i2c/tvp5150.c
205
dprintk0(sd->dev, "tvp5150: Device ID = %02x%02x\n",
drivers/media/i2c/tvp5150.c
206
tvp5150_read(sd, TVP5150_MSB_DEV_ID),
drivers/media/i2c/tvp5150.c
207
tvp5150_read(sd, TVP5150_LSB_DEV_ID));
drivers/media/i2c/tvp5150.c
208
dprintk0(sd->dev, "tvp5150: ROM version = (hex) %02x.%02x\n",
drivers/media/i2c/tvp5150.c
209
tvp5150_read(sd, TVP5150_ROM_MAJOR_VER),
drivers/media/i2c/tvp5150.c
210
tvp5150_read(sd, TVP5150_ROM_MINOR_VER));
drivers/media/i2c/tvp5150.c
211
dprintk0(sd->dev, "tvp5150: Vertical line count = 0x%02x%02x\n",
drivers/media/i2c/tvp5150.c
2118
struct v4l2_subdev *sd;
drivers/media/i2c/tvp5150.c
212
tvp5150_read(sd, TVP5150_VERT_LN_COUNT_MSB),
drivers/media/i2c/tvp5150.c
213
tvp5150_read(sd, TVP5150_VERT_LN_COUNT_LSB));
drivers/media/i2c/tvp5150.c
214
dprintk0(sd->dev, "tvp5150: Interrupt status register B = 0x%02x\n",
drivers/media/i2c/tvp5150.c
2142
sd = &core->sd;
drivers/media/i2c/tvp5150.c
2143
v4l2_i2c_subdev_init(sd, c, &tvp5150_ops);
drivers/media/i2c/tvp5150.c
2144
sd->internal_ops = &tvp5150_internal_ops;
drivers/media/i2c/tvp5150.c
2145
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/i2c/tvp5150.c
215
tvp5150_read(sd, TVP5150_INT_STATUS_REG_B));
drivers/media/i2c/tvp5150.c
2150
dev_err(sd->dev, "DT parsing error: %d\n", res);
drivers/media/i2c/tvp5150.c
216
dprintk0(sd->dev, "tvp5150: Interrupt active register B = 0x%02x\n",
drivers/media/i2c/tvp5150.c
217
tvp5150_read(sd, TVP5150_INT_ACTIVE_REG_B));
drivers/media/i2c/tvp5150.c
218
dprintk0(sd->dev, "tvp5150: Status regs #1 to #5 = %02x %02x %02x %02x %02x\n",
drivers/media/i2c/tvp5150.c
219
tvp5150_read(sd, TVP5150_STATUS_REG_1),
drivers/media/i2c/tvp5150.c
220
tvp5150_read(sd, TVP5150_STATUS_REG_2),
drivers/media/i2c/tvp5150.c
2201
sd->ctrl_handler = &core->hdl;
drivers/media/i2c/tvp5150.c
2207
tvp5150_set_default(tvp5150_read_std(sd), &core->rect);
drivers/media/i2c/tvp5150.c
221
tvp5150_read(sd, TVP5150_STATUS_REG_3),
drivers/media/i2c/tvp5150.c
2210
tvp5150_reset(sd, 0); /* Calls v4l2_ctrl_handler_setup() */
drivers/media/i2c/tvp5150.c
2219
res = v4l2_async_register_subdev(sd);
drivers/media/i2c/tvp5150.c
222
tvp5150_read(sd, TVP5150_STATUS_REG_4),
drivers/media/i2c/tvp5150.c
2224
tvp5150_log_status(sd);
drivers/media/i2c/tvp5150.c
223
tvp5150_read(sd, TVP5150_STATUS_REG_5));
drivers/media/i2c/tvp5150.c
2239
struct v4l2_subdev *sd = i2c_get_clientdata(c);
drivers/media/i2c/tvp5150.c
2240
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
2243
dev_dbg_lvl(sd->dev, 1, debug,
drivers/media/i2c/tvp5150.c
225
dump_reg_range(sd, "Teletext filter 1", TVP5150_TELETEXT_FIL1_INI,
drivers/media/i2c/tvp5150.c
2253
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/tvp5150.c
227
dump_reg_range(sd, "Teletext filter 2", TVP5150_TELETEXT_FIL2_INI,
drivers/media/i2c/tvp5150.c
230
dprintk0(sd->dev, "tvp5150: Teletext filter enable = 0x%02x\n",
drivers/media/i2c/tvp5150.c
231
tvp5150_read(sd, TVP5150_TELETEXT_FIL_ENA));
drivers/media/i2c/tvp5150.c
232
dprintk0(sd->dev, "tvp5150: Interrupt status register A = 0x%02x\n",
drivers/media/i2c/tvp5150.c
233
tvp5150_read(sd, TVP5150_INT_STATUS_REG_A));
drivers/media/i2c/tvp5150.c
234
dprintk0(sd->dev, "tvp5150: Interrupt enable register A = 0x%02x\n",
drivers/media/i2c/tvp5150.c
235
tvp5150_read(sd, TVP5150_INT_ENABLE_REG_A));
drivers/media/i2c/tvp5150.c
236
dprintk0(sd->dev, "tvp5150: Interrupt configuration = 0x%02x\n",
drivers/media/i2c/tvp5150.c
237
tvp5150_read(sd, TVP5150_INT_CONF));
drivers/media/i2c/tvp5150.c
238
dprintk0(sd->dev, "tvp5150: VDP status register = 0x%02x\n",
drivers/media/i2c/tvp5150.c
239
tvp5150_read(sd, TVP5150_VDP_STATUS_REG));
drivers/media/i2c/tvp5150.c
240
dprintk0(sd->dev, "tvp5150: FIFO word count = 0x%02x\n",
drivers/media/i2c/tvp5150.c
241
tvp5150_read(sd, TVP5150_FIFO_WORD_COUNT));
drivers/media/i2c/tvp5150.c
242
dprintk0(sd->dev, "tvp5150: FIFO interrupt threshold = 0x%02x\n",
drivers/media/i2c/tvp5150.c
243
tvp5150_read(sd, TVP5150_FIFO_INT_THRESHOLD));
drivers/media/i2c/tvp5150.c
244
dprintk0(sd->dev, "tvp5150: FIFO reset = 0x%02x\n",
drivers/media/i2c/tvp5150.c
245
tvp5150_read(sd, TVP5150_FIFO_RESET));
drivers/media/i2c/tvp5150.c
246
dprintk0(sd->dev, "tvp5150: Line number interrupt = 0x%02x\n",
drivers/media/i2c/tvp5150.c
247
tvp5150_read(sd, TVP5150_LINE_NUMBER_INT));
drivers/media/i2c/tvp5150.c
248
dprintk0(sd->dev, "tvp5150: Pixel alignment register = 0x%02x%02x\n",
drivers/media/i2c/tvp5150.c
249
tvp5150_read(sd, TVP5150_PIX_ALIGN_REG_HIGH),
drivers/media/i2c/tvp5150.c
250
tvp5150_read(sd, TVP5150_PIX_ALIGN_REG_LOW));
drivers/media/i2c/tvp5150.c
251
dprintk0(sd->dev, "tvp5150: FIFO output control = 0x%02x\n",
drivers/media/i2c/tvp5150.c
252
tvp5150_read(sd, TVP5150_FIFO_OUT_CTRL));
drivers/media/i2c/tvp5150.c
253
dprintk0(sd->dev, "tvp5150: Full field enable = 0x%02x\n",
drivers/media/i2c/tvp5150.c
254
tvp5150_read(sd, TVP5150_FULL_FIELD_ENA));
drivers/media/i2c/tvp5150.c
255
dprintk0(sd->dev, "tvp5150: Full field mode register = 0x%02x\n",
drivers/media/i2c/tvp5150.c
256
tvp5150_read(sd, TVP5150_FULL_FIELD_MODE_REG));
drivers/media/i2c/tvp5150.c
258
dump_reg_range(sd, "CC data", TVP5150_CC_DATA_INI,
drivers/media/i2c/tvp5150.c
261
dump_reg_range(sd, "WSS data", TVP5150_WSS_DATA_INI,
drivers/media/i2c/tvp5150.c
264
dump_reg_range(sd, "VPS data", TVP5150_VPS_DATA_INI,
drivers/media/i2c/tvp5150.c
267
dump_reg_range(sd, "VITC data", TVP5150_VITC_DATA_INI,
drivers/media/i2c/tvp5150.c
270
dump_reg_range(sd, "Line mode", TVP5150_LINE_MODE_INI,
drivers/media/i2c/tvp5150.c
279
static void tvp5150_selmux(struct v4l2_subdev *sd)
drivers/media/i2c/tvp5150.c
282
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
305
dev_dbg_lvl(sd->dev, 1, debug,
drivers/media/i2c/tvp5150.c
597
static int tvp5150_write_inittab(struct v4l2_subdev *sd,
drivers/media/i2c/tvp5150.c
600
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
609
static int tvp5150_vdp_init(struct v4l2_subdev *sd)
drivers/media/i2c/tvp5150.c
611
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
641
static int tvp5150_g_sliced_vbi_cap(struct v4l2_subdev *sd,
drivers/media/i2c/tvp5150.c
646
dev_dbg_lvl(sd->dev, 1, debug, "g_sliced_vbi_cap\n");
drivers/media/i2c/tvp5150.c
678
static int tvp5150_set_vbi(struct v4l2_subdev *sd,
drivers/media/i2c/tvp5150.c
682
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
688
dev_err(sd->dev, "VBI can't be configured without knowing number of lines\n");
drivers/media/i2c/tvp5150.c
72
struct v4l2_subdev sd;
drivers/media/i2c/tvp5150.c
723
static int tvp5150_get_vbi(struct v4l2_subdev *sd, int line)
drivers/media/i2c/tvp5150.c
725
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
732
dev_err(sd->dev, "VBI can't be configured without knowing number of lines\n");
drivers/media/i2c/tvp5150.c
745
ret = tvp5150_read(sd, reg + i);
drivers/media/i2c/tvp5150.c
747
dev_err(sd->dev, "%s: failed with error = %d\n",
drivers/media/i2c/tvp5150.c
759
static int tvp5150_set_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/tvp5150.c
761
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
782
dev_dbg_lvl(sd->dev, 1, debug, "Set video std register to %d.\n", fmt);
drivers/media/i2c/tvp5150.c
787
static int tvp5150_g_std(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/tvp5150.c
789
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
796
static int tvp5150_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/tvp5150.c
798
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
827
return tvp5150_set_std(sd, std);
drivers/media/i2c/tvp5150.c
830
static v4l2_std_id tvp5150_read_std(struct v4l2_subdev *sd)
drivers/media/i2c/tvp5150.c
832
int val = tvp5150_read(sd, TVP5150_STATUS_REG_5);
drivers/media/i2c/tvp5150.c
852
static int query_lock(struct v4l2_subdev *sd)
drivers/media/i2c/tvp5150.c
854
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
866
static int tvp5150_querystd(struct v4l2_subdev *sd, v4l2_std_id *std_id)
drivers/media/i2c/tvp5150.c
868
*std_id = query_lock(sd) ? tvp5150_read_std(sd) : V4L2_STD_UNKNOWN;
drivers/media/i2c/tvp5150.c
893
dev_dbg_lvl(decoder->sd.dev, 1, debug,
drivers/media/i2c/tvp5150.c
896
v4l2_subdev_notify_event(&decoder->sd, &tvp5150_ev_fmt);
drivers/media/i2c/tvp5150.c
915
static int tvp5150_reset(struct v4l2_subdev *sd, u32 val)
drivers/media/i2c/tvp5150.c
917
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
921
tvp5150_write_inittab(sd, tvp5150_init_default);
drivers/media/i2c/tvp5150.c
938
tvp5150_vdp_init(sd);
drivers/media/i2c/tvp5150.c
941
tvp5150_selmux(sd);
drivers/media/i2c/tvp5150.c
949
static int tvp5150_enable(struct v4l2_subdev *sd)
drivers/media/i2c/tvp5150.c
951
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp5150.c
955
tvp5150_write_inittab(sd, tvp5150_init_enable);
drivers/media/i2c/tvp5150.c
958
std = tvp5150_read_std(sd);
drivers/media/i2c/tvp5150.c
963
tvp5150_set_std(sd, std);
drivers/media/i2c/tvp5150.c
98
static inline struct tvp5150 *to_tvp5150(struct v4l2_subdev *sd)
drivers/media/i2c/tvp5150.c
991
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/tvp5150.c
992
struct tvp5150 *decoder = to_tvp5150(sd);
drivers/media/i2c/tvp7002.c
1001
error = tvp7002_write(sd, TVP7002_SYNC_CTL_1, polarity_a);
drivers/media/i2c/tvp7002.c
1008
error = tvp7002_write(sd, TVP7002_MISC_CTL_3, polarity_b);
drivers/media/i2c/tvp7002.c
1014
error = tvp7002_s_dv_timings(sd, 0, &timings);
drivers/media/i2c/tvp7002.c
1018
device->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/tvp7002.c
1019
device->sd.entity.function = MEDIA_ENT_F_ATV_DECODER;
drivers/media/i2c/tvp7002.c
1021
error = media_entity_pads_init(&device->sd.entity, 1, &device->pad);
drivers/media/i2c/tvp7002.c
1029
sd->ctrl_handler = &device->hdl;
drivers/media/i2c/tvp7002.c
1036
error = v4l2_async_register_subdev(&device->sd);
drivers/media/i2c/tvp7002.c
1045
media_entity_cleanup(&device->sd.entity);
drivers/media/i2c/tvp7002.c
1059
struct v4l2_subdev *sd = i2c_get_clientdata(c);
drivers/media/i2c/tvp7002.c
1060
struct tvp7002 *device = to_tvp7002(sd);
drivers/media/i2c/tvp7002.c
1062
v4l2_dbg(1, debug, sd, "Removing tvp7002 adapter"
drivers/media/i2c/tvp7002.c
1064
v4l2_async_unregister_subdev(&device->sd);
drivers/media/i2c/tvp7002.c
1066
media_entity_cleanup(&device->sd.entity);
drivers/media/i2c/tvp7002.c
407
struct v4l2_subdev sd;
drivers/media/i2c/tvp7002.c
424
static inline struct tvp7002 *to_tvp7002(struct v4l2_subdev *sd)
drivers/media/i2c/tvp7002.c
426
return container_of(sd, struct tvp7002, sd);
drivers/media/i2c/tvp7002.c
431
return &container_of(ctrl->handler, struct tvp7002, hdl)->sd;
drivers/media/i2c/tvp7002.c
442
static int tvp7002_read(struct v4l2_subdev *sd, u8 addr, u8 *dst)
drivers/media/i2c/tvp7002.c
444
struct i2c_client *c = v4l2_get_subdevdata(sd);
drivers/media/i2c/tvp7002.c
458
v4l2_err(sd, "TVP7002 read error %d\n", error);
drivers/media/i2c/tvp7002.c
472
static inline void tvp7002_read_err(struct v4l2_subdev *sd, u8 reg,
drivers/media/i2c/tvp7002.c
476
*err = tvp7002_read(sd, reg, dst);
drivers/media/i2c/tvp7002.c
488
static int tvp7002_write(struct v4l2_subdev *sd, u8 addr, u8 value)
drivers/media/i2c/tvp7002.c
494
c = v4l2_get_subdevdata(sd);
drivers/media/i2c/tvp7002.c
502
v4l2_warn(sd, "Write: retry ... %d\n", retry);
drivers/media/i2c/tvp7002.c
505
v4l2_err(sd, "TVP7002 write error %d\n", error);
drivers/media/i2c/tvp7002.c
519
static inline void tvp7002_write_err(struct v4l2_subdev *sd, u8 reg,
drivers/media/i2c/tvp7002.c
523
*err = tvp7002_write(sd, reg, val);
drivers/media/i2c/tvp7002.c
534
static int tvp7002_write_inittab(struct v4l2_subdev *sd,
drivers/media/i2c/tvp7002.c
542
tvp7002_write_err(sd, regs->reg, regs->value, &error);
drivers/media/i2c/tvp7002.c
549
static int tvp7002_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/tvp7002.c
552
struct tvp7002 *device = to_tvp7002(sd);
drivers/media/i2c/tvp7002.c
566
return tvp7002_write_inittab(sd, tvp7002_timings[i].p_settings);
drivers/media/i2c/tvp7002.c
572
static int tvp7002_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/tvp7002.c
575
struct tvp7002 *device = to_tvp7002(sd);
drivers/media/i2c/tvp7002.c
593
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/tvp7002.c
598
tvp7002_write_err(sd, TVP7002_R_FINE_GAIN, ctrl->val, &error);
drivers/media/i2c/tvp7002.c
599
tvp7002_write_err(sd, TVP7002_G_FINE_GAIN, ctrl->val, &error);
drivers/media/i2c/tvp7002.c
600
tvp7002_write_err(sd, TVP7002_B_FINE_GAIN, ctrl->val, &error);
drivers/media/i2c/tvp7002.c
614
static int tvp7002_query_dv(struct v4l2_subdev *sd, int *index)
drivers/media/i2c/tvp7002.c
630
tvp7002_read_err(sd, TVP7002_L_FRAME_STAT_LSBS, &lpf_lsb, &error);
drivers/media/i2c/tvp7002.c
631
tvp7002_read_err(sd, TVP7002_L_FRAME_STAT_MSBS, &lpf_msb, &error);
drivers/media/i2c/tvp7002.c
636
tvp7002_read_err(sd, TVP7002_CLK_L_STAT_LSBS, &cpl_lsb, &error);
drivers/media/i2c/tvp7002.c
637
tvp7002_read_err(sd, TVP7002_CLK_L_STAT_MSBS, &cpl_msb, &error);
drivers/media/i2c/tvp7002.c
658
v4l2_dbg(1, debug, sd, "detection failed: lpf = %x, cpl = %x\n",
drivers/media/i2c/tvp7002.c
664
v4l2_dbg(1, debug, sd, "detected timings: %d\n", *index);
drivers/media/i2c/tvp7002.c
668
static int tvp7002_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/tvp7002.c
677
err = tvp7002_query_dv(sd, &index);
drivers/media/i2c/tvp7002.c
694
static int tvp7002_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/tvp7002.c
700
ret = tvp7002_read(sd, reg->reg & 0xff, &val);
drivers/media/i2c/tvp7002.c
716
static int tvp7002_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/tvp7002.c
719
return tvp7002_write(sd, reg->reg & 0xff, reg->val & 0xff);
drivers/media/i2c/tvp7002.c
730
static int tvp7002_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/tvp7002.c
732
struct tvp7002 *device = to_tvp7002(sd);
drivers/media/i2c/tvp7002.c
739
error = tvp7002_write(sd, TVP7002_MISC_CTL_2, enable ? 0x00 : 0x03);
drivers/media/i2c/tvp7002.c
741
v4l2_dbg(1, debug, sd, "Fail to set streaming\n");
drivers/media/i2c/tvp7002.c
756
static int tvp7002_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/tvp7002.c
758
struct tvp7002 *device = to_tvp7002(sd);
drivers/media/i2c/tvp7002.c
763
tvp7002_query_dv(sd, &detected);
drivers/media/i2c/tvp7002.c
766
v4l2_info(sd, "Selected DV Timings: %ux%u\n", bt->width, bt->height);
drivers/media/i2c/tvp7002.c
768
v4l2_info(sd, "Detected DV Timings: None\n");
drivers/media/i2c/tvp7002.c
771
v4l2_info(sd, "Detected DV Timings: %ux%u\n",
drivers/media/i2c/tvp7002.c
774
v4l2_info(sd, "Streaming enabled: %s\n",
drivers/media/i2c/tvp7002.c
778
v4l2_ctrl_handler_log_status(&device->hdl, sd->name);
drivers/media/i2c/tvp7002.c
783
static int tvp7002_enum_dv_timings(struct v4l2_subdev *sd,
drivers/media/i2c/tvp7002.c
810
tvp7002_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/tvp7002.c
832
tvp7002_get_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/tvp7002.c
836
struct tvp7002 *tvp7002 = to_tvp7002(sd);
drivers/media/i2c/tvp7002.c
856
tvp7002_set_pad_format(struct v4l2_subdev *sd,
drivers/media/i2c/tvp7002.c
860
return tvp7002_get_pad_format(sd, sd_state, fmt);
drivers/media/i2c/tvp7002.c
951
struct v4l2_subdev *sd;
drivers/media/i2c/tvp7002.c
974
sd = &device->sd;
drivers/media/i2c/tvp7002.c
979
v4l2_i2c_subdev_init(sd, c, &tvp7002_ops);
drivers/media/i2c/tvp7002.c
983
error = tvp7002_read(sd, TVP7002_CHIP_REV, &revision);
drivers/media/i2c/tvp7002.c
988
v4l2_info(sd, "Rev. %02x detected.\n", revision);
drivers/media/i2c/tvp7002.c
990
v4l2_info(sd, "Unknown revision detected.\n");
drivers/media/i2c/tvp7002.c
993
error = tvp7002_write_inittab(sd, tvp7002_init_default);
drivers/media/i2c/tw2804.c
130
static inline struct tw2804 *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/tw2804.c
132
return container_of(sd, struct tw2804, sd);
drivers/media/i2c/tw2804.c
140
static int tw2804_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/tw2804.c
142
struct tw2804 *state = to_state(sd);
drivers/media/i2c/tw2804.c
144
v4l2_info(sd, "Standard: %s\n",
drivers/media/i2c/tw2804.c
146
v4l2_info(sd, "Channel: %d\n", state->channel);
drivers/media/i2c/tw2804.c
147
v4l2_info(sd, "Input: %d\n", state->input);
drivers/media/i2c/tw2804.c
148
return v4l2_ctrl_subdev_log_status(sd);
drivers/media/i2c/tw2804.c
167
struct i2c_client *client = v4l2_get_subdevdata(&state->sd);
drivers/media/i2c/tw2804.c
192
struct i2c_client *client = v4l2_get_subdevdata(&state->sd);
drivers/media/i2c/tw2804.c
250
static int tw2804_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
drivers/media/i2c/tw2804.c
252
struct tw2804 *dec = to_state(sd);
drivers/media/i2c/tw2804.c
253
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tw2804.c
274
static int tw2804_s_video_routing(struct v4l2_subdev *sd, u32 input, u32 output,
drivers/media/i2c/tw2804.c
277
struct tw2804 *dec = to_state(sd);
drivers/media/i2c/tw2804.c
278
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tw2804.c
28
struct v4l2_subdev sd;
drivers/media/i2c/tw2804.c
350
struct v4l2_subdev *sd;
drivers/media/i2c/tw2804.c
360
sd = &state->sd;
drivers/media/i2c/tw2804.c
361
v4l2_i2c_subdev_init(sd, client, &tw2804_ops);
drivers/media/i2c/tw2804.c
394
sd->ctrl_handler = &state->hdl;
drivers/media/i2c/tw2804.c
409
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tw2804.c
410
struct tw2804 *state = to_state(sd);
drivers/media/i2c/tw2804.c
412
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/tw9900.c
186
static int tw9900_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/tw9900.c
190
struct tw9900 *tw9900 = to_tw9900(sd);
drivers/media/i2c/tw9900.c
200
static int tw9900_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/tw9900.c
204
struct tw9900 *tw9900 = to_tw9900(sd);
drivers/media/i2c/tw9900.c
221
static int tw9900_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/tw9900.c
259
static int tw9900_s_stream(struct v4l2_subdev *sd, int on)
drivers/media/i2c/tw9900.c
261
struct tw9900 *tw9900 = to_tw9900(sd);
drivers/media/i2c/tw9900.c
281
ret = __v4l2_ctrl_handler_setup(sd->ctrl_handler);
drivers/media/i2c/tw9900.c
324
static int tw9900_subscribe_event(struct v4l2_subdev *sd,
drivers/media/i2c/tw9900.c
330
return v4l2_src_change_event_subdev_subscribe(sd, fh, sub);
drivers/media/i2c/tw9900.c
332
return v4l2_ctrl_subdev_subscribe_event(sd, fh, sub);
drivers/media/i2c/tw9900.c
338
static int tw9900_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/tw9900.c
340
struct tw9900 *tw9900 = to_tw9900(sd);
drivers/media/i2c/tw9900.c
392
static int tw9900_g_std(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/tw9900.c
394
struct tw9900 *tw9900 = to_tw9900(sd);
drivers/media/i2c/tw9900.c
451
static int tw9900_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/tw9900.c
453
struct tw9900 *tw9900 = to_tw9900(sd);
drivers/media/i2c/tw9900.c
501
static int tw9900_g_tvnorms(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/tw9900.c
508
static int tw9900_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/tw9900.c
510
struct tw9900 *tw9900 = to_tw9900(sd);
drivers/media/i2c/tw9900.c
602
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tw9900.c
603
struct tw9900 *tw9900 = to_tw9900(sd);
drivers/media/i2c/tw9900.c
638
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tw9900.c
639
struct tw9900 *tw9900 = to_tw9900(sd);
drivers/media/i2c/tw9900.c
738
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tw9900.c
739
struct tw9900 *tw9900 = to_tw9900(sd);
drivers/media/i2c/tw9900.c
741
v4l2_async_unregister_subdev(sd);
drivers/media/i2c/tw9900.c
742
media_entity_cleanup(&sd->entity);
drivers/media/i2c/tw9900.c
743
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/i2c/tw9900.c
89
#define to_tw9900(sd) container_of(sd, struct tw9900, subdev)
drivers/media/i2c/tw9903.c
102
if (write_reg(sd, regs[i], regs[i + 1]) < 0)
drivers/media/i2c/tw9903.c
107
static int tw9903_s_video_routing(struct v4l2_subdev *sd, u32 input,
drivers/media/i2c/tw9903.c
110
write_reg(sd, 0x02, 0x40 | (input << 1));
drivers/media/i2c/tw9903.c
114
static int tw9903_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
drivers/media/i2c/tw9903.c
116
struct tw9903 *dec = to_state(sd);
drivers/media/i2c/tw9903.c
133
write_regs(sd, is_60hz ? config_60hz : config_50hz);
drivers/media/i2c/tw9903.c
142
struct v4l2_subdev *sd = &dec->sd;
drivers/media/i2c/tw9903.c
146
write_reg(sd, 0x10, ctrl->val);
drivers/media/i2c/tw9903.c
149
write_reg(sd, 0x11, ctrl->val);
drivers/media/i2c/tw9903.c
152
write_reg(sd, 0x15, ctrl->val);
drivers/media/i2c/tw9903.c
160
static int tw9903_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/tw9903.c
162
struct tw9903 *dec = to_state(sd);
drivers/media/i2c/tw9903.c
165
v4l2_info(sd, "Standard: %d Hz\n", is_60hz ? 60 : 50);
drivers/media/i2c/tw9903.c
166
v4l2_ctrl_subdev_log_status(sd);
drivers/media/i2c/tw9903.c
195
struct v4l2_subdev *sd;
drivers/media/i2c/tw9903.c
208
sd = &dec->sd;
drivers/media/i2c/tw9903.c
209
v4l2_i2c_subdev_init(sd, client, &tw9903_ops);
drivers/media/i2c/tw9903.c
218
sd->ctrl_handler = hdl;
drivers/media/i2c/tw9903.c
229
if (write_regs(sd, initial_registers) < 0) {
drivers/media/i2c/tw9903.c
240
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tw9903.c
242
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/tw9903.c
243
v4l2_ctrl_handler_free(&to_state(sd)->hdl);
drivers/media/i2c/tw9903.c
28
struct v4l2_subdev sd;
drivers/media/i2c/tw9903.c
33
static inline struct tw9903 *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/tw9903.c
35
return container_of(sd, struct tw9903, sd);
drivers/media/i2c/tw9903.c
90
static int write_reg(struct v4l2_subdev *sd, u8 reg, u8 value)
drivers/media/i2c/tw9903.c
92
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tw9903.c
97
static int write_regs(struct v4l2_subdev *sd, const u8 *regs)
drivers/media/i2c/tw9906.c
104
write_regs(sd, is_60hz ? config_60hz : config_50hz);
drivers/media/i2c/tw9906.c
112
struct v4l2_subdev *sd = &dec->sd;
drivers/media/i2c/tw9906.c
116
write_reg(sd, 0x10, ctrl->val);
drivers/media/i2c/tw9906.c
119
write_reg(sd, 0x11, ctrl->val);
drivers/media/i2c/tw9906.c
122
write_reg(sd, 0x15, ctrl->val);
drivers/media/i2c/tw9906.c
130
static int tw9906_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/tw9906.c
132
struct tw9906 *dec = to_state(sd);
drivers/media/i2c/tw9906.c
135
v4l2_info(sd, "Standard: %d Hz\n", is_60hz ? 60 : 50);
drivers/media/i2c/tw9906.c
136
v4l2_ctrl_subdev_log_status(sd);
drivers/media/i2c/tw9906.c
163
struct v4l2_subdev *sd;
drivers/media/i2c/tw9906.c
176
sd = &dec->sd;
drivers/media/i2c/tw9906.c
177
v4l2_i2c_subdev_init(sd, client, &tw9906_ops);
drivers/media/i2c/tw9906.c
186
sd->ctrl_handler = hdl;
drivers/media/i2c/tw9906.c
19
struct v4l2_subdev sd;
drivers/media/i2c/tw9906.c
197
if (write_regs(sd, initial_registers) < 0) {
drivers/media/i2c/tw9906.c
208
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/tw9906.c
210
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/tw9906.c
211
v4l2_ctrl_handler_free(&to_state(sd)->hdl);
drivers/media/i2c/tw9906.c
24
static inline struct tw9906 *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/tw9906.c
26
return container_of(sd, struct tw9906, sd);
drivers/media/i2c/tw9906.c
61
static int write_reg(struct v4l2_subdev *sd, u8 reg, u8 value)
drivers/media/i2c/tw9906.c
63
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tw9906.c
68
static int write_regs(struct v4l2_subdev *sd, const u8 *regs)
drivers/media/i2c/tw9906.c
73
if (write_reg(sd, regs[i], regs[i + 1]) < 0)
drivers/media/i2c/tw9906.c
78
static int tw9906_s_video_routing(struct v4l2_subdev *sd, u32 input,
drivers/media/i2c/tw9906.c
81
write_reg(sd, 0x02, 0x40 | (input << 1));
drivers/media/i2c/tw9906.c
85
static int tw9906_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
drivers/media/i2c/tw9906.c
87
struct tw9906 *dec = to_state(sd);
drivers/media/i2c/tw9910.c
456
static int tw9910_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/tw9910.c
458
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tw9910.c
496
static int tw9910_g_std(struct v4l2_subdev *sd, v4l2_std_id *norm)
drivers/media/i2c/tw9910.c
498
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tw9910.c
506
static int tw9910_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
drivers/media/i2c/tw9910.c
508
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tw9910.c
546
static int tw9910_g_register(struct v4l2_subdev *sd,
drivers/media/i2c/tw9910.c
549
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tw9910.c
569
static int tw9910_s_register(struct v4l2_subdev *sd,
drivers/media/i2c/tw9910.c
572
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tw9910.c
636
static int tw9910_s_power(struct v4l2_subdev *sd, int on)
drivers/media/i2c/tw9910.c
638
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tw9910.c
644
static int tw9910_set_frame(struct v4l2_subdev *sd, u32 *width, u32 *height)
drivers/media/i2c/tw9910.c
646
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tw9910.c
717
static int tw9910_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/tw9910.c
721
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tw9910.c
743
static int tw9910_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/tw9910.c
748
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tw9910.c
769
static int tw9910_s_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/tw9910.c
784
ret = tw9910_set_frame(sd, &width, &height);
drivers/media/i2c/tw9910.c
794
static int tw9910_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/tw9910.c
799
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/tw9910.c
825
return tw9910_s_fmt(sd, mf);
drivers/media/i2c/tw9910.c
881
static int tw9910_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/tw9910.c
893
static int tw9910_g_tvnorms(struct v4l2_subdev *sd, v4l2_std_id *norm)
drivers/media/i2c/uda1342.c
21
static int uda1342_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/uda1342.c
24
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/uda1342.c
34
v4l2_err(sd, "input %d not supported\n", input);
drivers/media/i2c/uda1342.c
51
struct v4l2_subdev *sd;
drivers/media/i2c/uda1342.c
59
sd = devm_kzalloc(&client->dev, sizeof(*sd), GFP_KERNEL);
drivers/media/i2c/uda1342.c
60
if (sd == NULL)
drivers/media/i2c/uda1342.c
63
v4l2_i2c_subdev_init(sd, client, &uda1342_ops);
drivers/media/i2c/uda1342.c
76
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/uda1342.c
78
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/upd64031a.c
100
static int upd64031a_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *freq)
drivers/media/i2c/upd64031a.c
102
struct upd64031a_state *state = to_state(sd);
drivers/media/i2c/upd64031a.c
105
v4l2_dbg(1, debug, sd, "changed input or channel\n");
drivers/media/i2c/upd64031a.c
106
upd64031a_write(sd, R00, reg | 0x10);
drivers/media/i2c/upd64031a.c
107
upd64031a_write(sd, R00, reg & ~0x10);
drivers/media/i2c/upd64031a.c
113
static int upd64031a_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/upd64031a.c
116
struct upd64031a_state *state = to_state(sd);
drivers/media/i2c/upd64031a.c
130
upd64031a_write(sd, R00, r00);
drivers/media/i2c/upd64031a.c
131
upd64031a_write(sd, R05, r05);
drivers/media/i2c/upd64031a.c
132
upd64031a_write(sd, R08, r08);
drivers/media/i2c/upd64031a.c
133
return upd64031a_s_frequency(sd, NULL);
drivers/media/i2c/upd64031a.c
136
static int upd64031a_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/upd64031a.c
138
v4l2_info(sd, "Status: SA00=0x%02x SA01=0x%02x\n",
drivers/media/i2c/upd64031a.c
139
upd64031a_read(sd, 0), upd64031a_read(sd, 1));
drivers/media/i2c/upd64031a.c
144
static int upd64031a_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
drivers/media/i2c/upd64031a.c
146
reg->val = upd64031a_read(sd, reg->reg & 0xff);
drivers/media/i2c/upd64031a.c
151
static int upd64031a_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
drivers/media/i2c/upd64031a.c
153
upd64031a_write(sd, reg->reg & 0xff, reg->val & 0xff);
drivers/media/i2c/upd64031a.c
189
struct v4l2_subdev *sd;
drivers/media/i2c/upd64031a.c
201
sd = &state->sd;
drivers/media/i2c/upd64031a.c
202
v4l2_i2c_subdev_init(sd, client, &upd64031a_ops);
drivers/media/i2c/upd64031a.c
208
upd64031a_write(sd, i, state->regs[i]);
drivers/media/i2c/upd64031a.c
214
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/upd64031a.c
216
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/upd64031a.c
50
struct v4l2_subdev sd;
drivers/media/i2c/upd64031a.c
58
static inline struct upd64031a_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/upd64031a.c
60
return container_of(sd, struct upd64031a_state, sd);
drivers/media/i2c/upd64031a.c
72
static u8 upd64031a_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/upd64031a.c
74
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/upd64031a.c
85
static void upd64031a_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/upd64031a.c
87
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/upd64031a.c
92
v4l2_dbg(1, debug, sd, "write reg: %02X val: %02X\n", reg, val);
drivers/media/i2c/upd64031a.c
94
v4l2_err(sd, "I/O error write 0x%02x/0x%02x\n", reg, val);
drivers/media/i2c/upd64083.c
102
upd64083_write(sd, R00, r00);
drivers/media/i2c/upd64083.c
103
upd64083_write(sd, R02, r02);
drivers/media/i2c/upd64083.c
108
static int upd64083_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
drivers/media/i2c/upd64083.c
110
reg->val = upd64083_read(sd, reg->reg & 0xff);
drivers/media/i2c/upd64083.c
115
static int upd64083_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
drivers/media/i2c/upd64083.c
117
upd64083_write(sd, reg->reg & 0xff, reg->val & 0xff);
drivers/media/i2c/upd64083.c
122
static int upd64083_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/upd64083.c
124
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/upd64083.c
128
v4l2_info(sd, "Status: SA00=%02x SA01=%02x SA02=%02x SA03=%02x "
drivers/media/i2c/upd64083.c
160
struct v4l2_subdev *sd;
drivers/media/i2c/upd64083.c
172
sd = &state->sd;
drivers/media/i2c/upd64083.c
173
v4l2_i2c_subdev_init(sd, client, &upd64083_ops);
drivers/media/i2c/upd64083.c
179
upd64083_write(sd, i, state->regs[i]);
drivers/media/i2c/upd64083.c
185
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/upd64083.c
187
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/upd64083.c
38
struct v4l2_subdev sd;
drivers/media/i2c/upd64083.c
44
static inline struct upd64083_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/upd64083.c
46
return container_of(sd, struct upd64083_state, sd);
drivers/media/i2c/upd64083.c
61
static void upd64083_write(struct v4l2_subdev *sd, u8 reg, u8 val)
drivers/media/i2c/upd64083.c
63
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/upd64083.c
68
v4l2_dbg(1, debug, sd, "write reg: %02x val: %02x\n", reg, val);
drivers/media/i2c/upd64083.c
70
v4l2_err(sd, "I/O error write 0x%02x/0x%02x\n", reg, val);
drivers/media/i2c/upd64083.c
76
static u8 upd64083_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/upd64083.c
78
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/upd64083.c
90
static int upd64083_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/upd64083.c
93
struct upd64083_state *state = to_state(sd);
drivers/media/i2c/vd55g1.c
1084
static int vd55g1_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/vd55g1.c
1088
struct vd55g1 *sensor = to_vd55g1(sd);
drivers/media/i2c/vd55g1.c
1146
static int vd55g1_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/vd55g1.c
1150
struct vd55g1 *sensor = to_vd55g1(sd);
drivers/media/i2c/vd55g1.c
1219
static int vd55g1_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/vd55g1.c
1242
static int vd55g1_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/vd55g1.c
1246
struct vd55g1 *sensor = to_vd55g1(sd);
drivers/media/i2c/vd55g1.c
1302
static int vd55g1_set_pad_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/vd55g1.c
1306
struct vd55g1 *sensor = to_vd55g1(sd);
drivers/media/i2c/vd55g1.c
1345
static int vd55g1_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/vd55g1.c
1348
struct vd55g1 *sensor = to_vd55g1(sd);
drivers/media/i2c/vd55g1.c
1360
ret = v4l2_subdev_set_routing(sd, sd_state, &routing);
drivers/media/i2c/vd55g1.c
1368
return vd55g1_set_pad_fmt(sd, sd_state, &fmt);
drivers/media/i2c/vd55g1.c
1371
static int vd55g1_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/vd55g1.c
1375
struct vd55g1 *sensor = to_vd55g1(sd);
drivers/media/i2c/vd55g1.c
1445
v4l2_subdev_get_locked_active_state(&sensor->sd);
drivers/media/i2c/vd55g1.c
1547
v4l2_subdev_lock_and_get_active_state(&sensor->sd);
drivers/media/i2c/vd55g1.c
1637
sensor->sd.ctrl_handler = hdl;
drivers/media/i2c/vd55g1.c
1685
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/vd55g1.c
1686
struct vd55g1 *sensor = to_vd55g1(sd);
drivers/media/i2c/vd55g1.c
1739
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/vd55g1.c
1740
struct vd55g1 *sensor = to_vd55g1(sd);
drivers/media/i2c/vd55g1.c
1880
sensor->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/vd55g1.c
1881
sensor->sd.internal_ops = &vd55g1_internal_ops;
drivers/media/i2c/vd55g1.c
1885
sensor->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/vd55g1.c
1886
ret = media_entity_pads_init(&sensor->sd.entity, 1, &sensor->pad);
drivers/media/i2c/vd55g1.c
1892
sensor->sd.state_lock = sensor->ctrl_handler.lock;
drivers/media/i2c/vd55g1.c
1893
ret = v4l2_subdev_init_finalize(&sensor->sd);
drivers/media/i2c/vd55g1.c
1913
v4l2_ctrl_handler_free(sensor->sd.ctrl_handler);
drivers/media/i2c/vd55g1.c
1916
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/vd55g1.c
1922
v4l2_async_unregister_subdev(&sensor->sd);
drivers/media/i2c/vd55g1.c
1923
v4l2_subdev_cleanup(&sensor->sd);
drivers/media/i2c/vd55g1.c
1924
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/vd55g1.c
1925
v4l2_ctrl_handler_free(sensor->sd.ctrl_handler);
drivers/media/i2c/vd55g1.c
1951
v4l2_i2c_subdev_init(&sensor->sd, client, &vd55g1_subdev_ops);
drivers/media/i2c/vd55g1.c
2002
ret = v4l2_async_register_subdev(&sensor->sd);
drivers/media/i2c/vd55g1.c
2023
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/vd55g1.c
2024
struct vd55g1 *sensor = to_vd55g1(sd);
drivers/media/i2c/vd55g1.c
536
struct v4l2_subdev sd;
drivers/media/i2c/vd55g1.c
570
static inline struct vd55g1 *to_vd55g1(struct v4l2_subdev *sd)
drivers/media/i2c/vd55g1.c
572
return container_of_const(sd, struct vd55g1, sd);
drivers/media/i2c/vd55g1.c
577
struct v4l2_subdev *sd = &container_of_const(ctrl->handler,
drivers/media/i2c/vd55g1.c
579
ctrl_handler)->sd;
drivers/media/i2c/vd55g1.c
581
return to_vd55g1(sd);
drivers/media/i2c/vd56g3.c
1002
static int vd56g3_disable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/vd56g3.c
1006
struct vd56g3 *sensor = to_vd56g3(sd);
drivers/media/i2c/vd56g3.c
1027
static int vd56g3_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/vd56g3.c
1041
return vd56g3_set_pad_fmt(sd, sd_state, &fmt);
drivers/media/i2c/vd56g3.c
1078
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/vd56g3.c
1079
struct vd56g3 *sensor = to_vd56g3(sd);
drivers/media/i2c/vd56g3.c
1126
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/i2c/vd56g3.c
1127
struct vd56g3 *sensor = to_vd56g3(sd);
drivers/media/i2c/vd56g3.c
1395
sensor->sd.internal_ops = &vd56g3_internal_ops;
drivers/media/i2c/vd56g3.c
1396
sensor->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/i2c/vd56g3.c
1397
sensor->sd.entity.ops = &vd56g3_subdev_entity_ops;
drivers/media/i2c/vd56g3.c
1401
sensor->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/vd56g3.c
1402
ret = media_entity_pads_init(&sensor->sd.entity, 1, &sensor->pad);
drivers/media/i2c/vd56g3.c
1417
sensor->sd.state_lock = sensor->ctrl_handler.lock;
drivers/media/i2c/vd56g3.c
1418
ret = v4l2_subdev_init_finalize(&sensor->sd);
drivers/media/i2c/vd56g3.c
1425
state = v4l2_subdev_lock_and_get_active_state(&sensor->sd);
drivers/media/i2c/vd56g3.c
1436
v4l2_ctrl_handler_free(sensor->sd.ctrl_handler);
drivers/media/i2c/vd56g3.c
1439
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/vd56g3.c
1446
v4l2_async_unregister_subdev(&sensor->sd);
drivers/media/i2c/vd56g3.c
1447
v4l2_subdev_cleanup(&sensor->sd);
drivers/media/i2c/vd56g3.c
1448
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/vd56g3.c
1449
v4l2_ctrl_handler_free(sensor->sd.ctrl_handler);
drivers/media/i2c/vd56g3.c
1462
v4l2_i2c_subdev_init(&sensor->sd, client, &vd56g3_subdev_ops);
drivers/media/i2c/vd56g3.c
1520
ret = v4l2_async_register_subdev(&sensor->sd);
drivers/media/i2c/vd56g3.c
1547
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/vd56g3.c
1548
struct vd56g3 *sensor = to_vd56g3(sd);
drivers/media/i2c/vd56g3.c
215
struct v4l2_subdev sd;
drivers/media/i2c/vd56g3.c
249
static inline struct vd56g3 *to_vd56g3(struct v4l2_subdev *sd)
drivers/media/i2c/vd56g3.c
251
return container_of_const(sd, struct vd56g3, sd);
drivers/media/i2c/vd56g3.c
512
state = v4l2_subdev_get_locked_active_state(&sensor->sd);
drivers/media/i2c/vd56g3.c
599
state = v4l2_subdev_get_locked_active_state(&sensor->sd);
drivers/media/i2c/vd56g3.c
736
sensor->sd.ctrl_handler = hdl;
drivers/media/i2c/vd56g3.c
780
static int vd56g3_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/vd56g3.c
784
struct vd56g3 *sensor = to_vd56g3(sd);
drivers/media/i2c/vd56g3.c
795
static int vd56g3_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/vd56g3.c
825
static int vd56g3_set_pad_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/vd56g3.c
829
struct vd56g3 *sensor = to_vd56g3(sd);
drivers/media/i2c/vd56g3.c
860
static int vd56g3_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/vd56g3.c
883
static int vd56g3_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/vd56g3.c
889
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/i2c/vd56g3.c
903
static int vd56g3_enable_streams(struct v4l2_subdev *sd,
drivers/media/i2c/vd56g3.c
907
struct vd56g3 *sensor = to_vd56g3(sd);
drivers/media/i2c/vgxy61.c
1078
struct i2c_client *client = v4l2_get_subdevdata(&sensor->sd);
drivers/media/i2c/vgxy61.c
1138
struct i2c_client *client = v4l2_get_subdevdata(&sensor->sd);
drivers/media/i2c/vgxy61.c
1167
static int vgxy61_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/vgxy61.c
1169
struct vgxy61_dev *sensor = to_vgxy61_dev(sd);
drivers/media/i2c/vgxy61.c
1184
static int vgxy61_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/i2c/vgxy61.c
1187
struct vgxy61_dev *sensor = to_vgxy61_dev(sd);
drivers/media/i2c/vgxy61.c
1199
static int vgxy61_set_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/vgxy61.c
1203
struct vgxy61_dev *sensor = to_vgxy61_dev(sd);
drivers/media/i2c/vgxy61.c
1215
ret = vgxy61_try_fmt_internal(sd, &format->format, &new_mode);
drivers/media/i2c/vgxy61.c
1254
static int vgxy61_init_state(struct v4l2_subdev *sd,
drivers/media/i2c/vgxy61.c
1257
struct vgxy61_dev *sensor = to_vgxy61_dev(sd);
drivers/media/i2c/vgxy61.c
1263
return vgxy61_set_fmt(sd, sd_state, &fmt);
drivers/media/i2c/vgxy61.c
1268
struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
drivers/media/i2c/vgxy61.c
1269
struct vgxy61_dev *sensor = to_vgxy61_dev(sd);
drivers/media/i2c/vgxy61.c
1397
sensor->sd.ctrl_handler = hdl;
drivers/media/i2c/vgxy61.c
1651
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/vgxy61.c
1652
struct vgxy61_dev *sensor = to_vgxy61_dev(sd);
drivers/media/i2c/vgxy61.c
1708
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/vgxy61.c
1709
struct vgxy61_dev *sensor = to_vgxy61_dev(sd);
drivers/media/i2c/vgxy61.c
1795
v4l2_i2c_subdev_init(&sensor->sd, client, &vgxy61_subdev_ops);
drivers/media/i2c/vgxy61.c
1796
sensor->sd.internal_ops = &vgxy61_internal_ops;
drivers/media/i2c/vgxy61.c
1797
sensor->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
drivers/media/i2c/vgxy61.c
1800
sensor->sd.entity.ops = &vgxy61_subdev_entity_ops;
drivers/media/i2c/vgxy61.c
1801
sensor->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/i2c/vgxy61.c
1833
ret = media_entity_pads_init(&sensor->sd.entity, 1, &sensor->pad);
drivers/media/i2c/vgxy61.c
1844
ret = v4l2_async_register_subdev(&sensor->sd);
drivers/media/i2c/vgxy61.c
1860
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/vgxy61.c
1862
v4l2_ctrl_handler_free(sensor->sd.ctrl_handler);
drivers/media/i2c/vgxy61.c
1872
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/vgxy61.c
1873
struct vgxy61_dev *sensor = to_vgxy61_dev(sd);
drivers/media/i2c/vgxy61.c
1875
v4l2_async_unregister_subdev(&sensor->sd);
drivers/media/i2c/vgxy61.c
1877
media_entity_cleanup(&sensor->sd.entity);
drivers/media/i2c/vgxy61.c
384
struct v4l2_subdev sd;
drivers/media/i2c/vgxy61.c
486
static inline struct vgxy61_dev *to_vgxy61_dev(struct v4l2_subdev *sd)
drivers/media/i2c/vgxy61.c
488
return container_of(sd, struct vgxy61_dev, sd);
drivers/media/i2c/vgxy61.c
494
ctrl_handler)->sd;
drivers/media/i2c/vgxy61.c
627
static int vgxy61_try_fmt_internal(struct v4l2_subdev *sd,
drivers/media/i2c/vgxy61.c
631
struct vgxy61_dev *sensor = to_vgxy61_dev(sd);
drivers/media/i2c/vgxy61.c
654
static int vgxy61_get_selection(struct v4l2_subdev *sd,
drivers/media/i2c/vgxy61.c
658
struct vgxy61_dev *sensor = to_vgxy61_dev(sd);
drivers/media/i2c/vgxy61.c
677
static int vgxy61_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/i2c/vgxy61.c
689
static int vgxy61_get_fmt(struct v4l2_subdev *sd,
drivers/media/i2c/vgxy61.c
693
struct vgxy61_dev *sensor = to_vgxy61_dev(sd);
drivers/media/i2c/vgxy61.c
723
static int vgxy61_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/i2c/vgxy61.c
727
struct vgxy61_dev *sensor = to_vgxy61_dev(sd);
drivers/media/i2c/vp27smpx.c
101
static int vp27smpx_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/vp27smpx.c
103
struct vp27smpx_state *state = to_state(sd);
drivers/media/i2c/vp27smpx.c
105
v4l2_info(sd, "Audio Mode: %u%s\n", state->audmode,
drivers/media/i2c/vp27smpx.c
144
struct v4l2_subdev *sd;
drivers/media/i2c/vp27smpx.c
156
sd = &state->sd;
drivers/media/i2c/vp27smpx.c
157
v4l2_i2c_subdev_init(sd, client, &vp27smpx_ops);
drivers/media/i2c/vp27smpx.c
161
vp27smpx_set_audmode(sd, state->audmode);
drivers/media/i2c/vp27smpx.c
167
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/vp27smpx.c
169
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/vp27smpx.c
28
struct v4l2_subdev sd;
drivers/media/i2c/vp27smpx.c
33
static inline struct vp27smpx_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/vp27smpx.c
35
return container_of(sd, struct vp27smpx_state, sd);
drivers/media/i2c/vp27smpx.c
38
static void vp27smpx_set_audmode(struct v4l2_subdev *sd, u32 audmode)
drivers/media/i2c/vp27smpx.c
40
struct vp27smpx_state *state = to_state(sd);
drivers/media/i2c/vp27smpx.c
41
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/vp27smpx.c
58
v4l2_err(sd, "I/O error setting audmode\n");
drivers/media/i2c/vp27smpx.c
63
static int vp27smpx_s_radio(struct v4l2_subdev *sd)
drivers/media/i2c/vp27smpx.c
65
struct vp27smpx_state *state = to_state(sd);
drivers/media/i2c/vp27smpx.c
71
static int vp27smpx_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
drivers/media/i2c/vp27smpx.c
73
struct vp27smpx_state *state = to_state(sd);
drivers/media/i2c/vp27smpx.c
79
static int vp27smpx_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
drivers/media/i2c/vp27smpx.c
81
struct vp27smpx_state *state = to_state(sd);
drivers/media/i2c/vp27smpx.c
84
vp27smpx_set_audmode(sd, vt->audmode);
drivers/media/i2c/vp27smpx.c
88
static int vp27smpx_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
drivers/media/i2c/vp27smpx.c
90
struct vp27smpx_state *state = to_state(sd);
drivers/media/i2c/vpx3220.c
102
if (vpx3220_fp_status(sd) < 0)
drivers/media/i2c/vpx3220.c
107
v4l2_dbg(1, debug, sd, "%s: failed\n", __func__);
drivers/media/i2c/vpx3220.c
114
static int vpx3220_fp_read(struct v4l2_subdev *sd, u16 fpaddr)
drivers/media/i2c/vpx3220.c
116
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/vpx3220.c
121
v4l2_dbg(1, debug, sd, "%s: failed\n", __func__);
drivers/media/i2c/vpx3220.c
125
if (vpx3220_fp_status(sd) < 0)
drivers/media/i2c/vpx3220.c
131
v4l2_dbg(1, debug, sd, "%s: failed\n", __func__);
drivers/media/i2c/vpx3220.c
138
static int vpx3220_write_block(struct v4l2_subdev *sd, const u8 *data, unsigned int len)
drivers/media/i2c/vpx3220.c
145
ret = vpx3220_write(sd, reg, *data++);
drivers/media/i2c/vpx3220.c
154
static int vpx3220_write_fp_block(struct v4l2_subdev *sd,
drivers/media/i2c/vpx3220.c
162
ret |= vpx3220_fp_write(sd, reg, *data++);
drivers/media/i2c/vpx3220.c
265
static int vpx3220_init(struct v4l2_subdev *sd, u32 val)
drivers/media/i2c/vpx3220.c
267
struct vpx3220 *decoder = to_vpx3220(sd);
drivers/media/i2c/vpx3220.c
269
vpx3220_write_block(sd, init_common, sizeof(init_common));
drivers/media/i2c/vpx3220.c
270
vpx3220_write_fp_block(sd, init_fp, sizeof(init_fp) >> 1);
drivers/media/i2c/vpx3220.c
272
vpx3220_write_fp_block(sd, init_ntsc, sizeof(init_ntsc) >> 1);
drivers/media/i2c/vpx3220.c
274
vpx3220_write_fp_block(sd, init_pal, sizeof(init_pal) >> 1);
drivers/media/i2c/vpx3220.c
276
vpx3220_write_fp_block(sd, init_secam, sizeof(init_secam) >> 1);
drivers/media/i2c/vpx3220.c
278
vpx3220_write_fp_block(sd, init_pal, sizeof(init_pal) >> 1);
drivers/media/i2c/vpx3220.c
282
static int vpx3220_status(struct v4l2_subdev *sd, u32 *pstatus, v4l2_std_id *pstd)
drivers/media/i2c/vpx3220.c
287
status = vpx3220_fp_read(sd, 0x0f3);
drivers/media/i2c/vpx3220.c
289
v4l2_dbg(1, debug, sd, "status: 0x%04x\n", status);
drivers/media/i2c/vpx3220.c
325
static int vpx3220_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
drivers/media/i2c/vpx3220.c
327
v4l2_dbg(1, debug, sd, "querystd\n");
drivers/media/i2c/vpx3220.c
328
return vpx3220_status(sd, NULL, std);
drivers/media/i2c/vpx3220.c
33
struct v4l2_subdev sd;
drivers/media/i2c/vpx3220.c
331
static int vpx3220_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/i2c/vpx3220.c
333
v4l2_dbg(1, debug, sd, "g_input_status\n");
drivers/media/i2c/vpx3220.c
334
return vpx3220_status(sd, status, NULL);
drivers/media/i2c/vpx3220.c
337
static int vpx3220_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/i2c/vpx3220.c
339
struct vpx3220 *decoder = to_vpx3220(sd);
drivers/media/i2c/vpx3220.c
345
temp_input = vpx3220_fp_read(sd, 0xf2);
drivers/media/i2c/vpx3220.c
347
v4l2_dbg(1, debug, sd, "s_std %llx\n", (unsigned long long)std);
drivers/media/i2c/vpx3220.c
349
vpx3220_write_fp_block(sd, init_ntsc, sizeof(init_ntsc) >> 1);
drivers/media/i2c/vpx3220.c
350
v4l2_dbg(1, debug, sd, "norm switched to NTSC\n");
drivers/media/i2c/vpx3220.c
352
vpx3220_write_fp_block(sd, init_pal, sizeof(init_pal) >> 1);
drivers/media/i2c/vpx3220.c
353
v4l2_dbg(1, debug, sd, "norm switched to PAL\n");
drivers/media/i2c/vpx3220.c
355
vpx3220_write_fp_block(sd, init_secam, sizeof(init_secam) >> 1);
drivers/media/i2c/vpx3220.c
356
v4l2_dbg(1, debug, sd, "norm switched to SECAM\n");
drivers/media/i2c/vpx3220.c
364
vpx3220_fp_write(sd, 0xf2, temp_input | 0x0010);
drivers/media/i2c/vpx3220.c
369
static int vpx3220_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/vpx3220.c
387
v4l2_dbg(1, debug, sd, "input switched to %s\n", inputs[input]);
drivers/media/i2c/vpx3220.c
389
vpx3220_write(sd, 0x33, input_vals[input][0]);
drivers/media/i2c/vpx3220.c
391
data = vpx3220_fp_read(sd, 0xf2) & ~(0x0020);
drivers/media/i2c/vpx3220.c
395
vpx3220_fp_write(sd, 0xf2,
drivers/media/i2c/vpx3220.c
402
static int vpx3220_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/i2c/vpx3220.c
404
v4l2_dbg(1, debug, sd, "s_stream %s\n", enable ? "on" : "off");
drivers/media/i2c/vpx3220.c
406
vpx3220_write(sd, 0xf2, (enable ? 0x1b : 0x00));
drivers/media/i2c/vpx3220.c
412
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/vpx3220.c
416
vpx3220_write(sd, 0xe6, ctrl->val);
drivers/media/i2c/vpx3220.c
42
static inline struct vpx3220 *to_vpx3220(struct v4l2_subdev *sd)
drivers/media/i2c/vpx3220.c
420
vpx3220_write(sd, 0xe7, ctrl->val + 192);
drivers/media/i2c/vpx3220.c
423
vpx3220_fp_write(sd, 0xa0, ctrl->val);
drivers/media/i2c/vpx3220.c
426
vpx3220_fp_write(sd, 0x1c, ctrl->val);
drivers/media/i2c/vpx3220.c
44
return container_of(sd, struct vpx3220, sd);
drivers/media/i2c/vpx3220.c
462
struct v4l2_subdev *sd;
drivers/media/i2c/vpx3220.c
475
sd = &decoder->sd;
drivers/media/i2c/vpx3220.c
476
v4l2_i2c_subdev_init(sd, client, &vpx3220_ops);
drivers/media/i2c/vpx3220.c
489
sd->ctrl_handler = &decoder->hdl;
drivers/media/i2c/vpx3220.c
49
return &container_of(ctrl->handler, struct vpx3220, hdl)->sd;
drivers/media/i2c/vpx3220.c
515
v4l2_info(sd, "%s found @ 0x%x (%s)\n", name,
drivers/media/i2c/vpx3220.c
518
v4l2_info(sd, "chip (%02x:%04x) found @ 0x%x (%s)\n",
drivers/media/i2c/vpx3220.c
521
vpx3220_write_block(sd, init_common, sizeof(init_common));
drivers/media/i2c/vpx3220.c
522
vpx3220_write_fp_block(sd, init_fp, sizeof(init_fp) >> 1);
drivers/media/i2c/vpx3220.c
524
vpx3220_write_fp_block(sd, init_pal, sizeof(init_pal) >> 1);
drivers/media/i2c/vpx3220.c
530
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/vpx3220.c
531
struct vpx3220 *decoder = to_vpx3220(sd);
drivers/media/i2c/vpx3220.c
533
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/vpx3220.c
56
static inline int vpx3220_write(struct v4l2_subdev *sd, u8 reg, u8 value)
drivers/media/i2c/vpx3220.c
58
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/vpx3220.c
65
static inline int vpx3220_read(struct v4l2_subdev *sd, u8 reg)
drivers/media/i2c/vpx3220.c
67
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/vpx3220.c
72
static int vpx3220_fp_status(struct v4l2_subdev *sd)
drivers/media/i2c/vpx3220.c
78
status = vpx3220_read(sd, 0x29);
drivers/media/i2c/vpx3220.c
92
static int vpx3220_fp_write(struct v4l2_subdev *sd, u8 fpaddr, u16 data)
drivers/media/i2c/vpx3220.c
94
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/vpx3220.c
98
v4l2_dbg(1, debug, sd, "%s: failed\n", __func__);
drivers/media/i2c/wm8739.c
114
wm8739_write(sd, R0, (vol_l & 0x1f) | mute);
drivers/media/i2c/wm8739.c
115
wm8739_write(sd, R1, (vol_r & 0x1f) | mute);
drivers/media/i2c/wm8739.c
121
static int wm8739_s_clock_freq(struct v4l2_subdev *sd, u32 audiofreq)
drivers/media/i2c/wm8739.c
123
struct wm8739_state *state = to_state(sd);
drivers/media/i2c/wm8739.c
127
wm8739_write(sd, R9, 0x000);
drivers/media/i2c/wm8739.c
131
wm8739_write(sd, R8, 0x020);
drivers/media/i2c/wm8739.c
135
wm8739_write(sd, R8, 0x000);
drivers/media/i2c/wm8739.c
139
wm8739_write(sd, R8, 0x018);
drivers/media/i2c/wm8739.c
145
wm8739_write(sd, R9, 0x001);
drivers/media/i2c/wm8739.c
149
static int wm8739_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/wm8739.c
151
struct wm8739_state *state = to_state(sd);
drivers/media/i2c/wm8739.c
153
v4l2_info(sd, "Frequency: %u Hz\n", state->clock_freq);
drivers/media/i2c/wm8739.c
154
v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
drivers/media/i2c/wm8739.c
184
struct v4l2_subdev *sd;
drivers/media/i2c/wm8739.c
196
sd = &state->sd;
drivers/media/i2c/wm8739.c
197
v4l2_i2c_subdev_init(sd, client, &wm8739_ops);
drivers/media/i2c/wm8739.c
205
sd->ctrl_handler = &state->hdl;
drivers/media/i2c/wm8739.c
219
wm8739_write(sd, R15, 0x00);
drivers/media/i2c/wm8739.c
221
wm8739_write(sd, R5, 0x000);
drivers/media/i2c/wm8739.c
223
wm8739_write(sd, R6, 0x000);
drivers/media/i2c/wm8739.c
226
wm8739_write(sd, R7, 0x049);
drivers/media/i2c/wm8739.c
228
wm8739_write(sd, R8, 0x000);
drivers/media/i2c/wm8739.c
230
wm8739_write(sd, R9, 0x001);
drivers/media/i2c/wm8739.c
238
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/wm8739.c
239
struct wm8739_state *state = to_state(sd);
drivers/media/i2c/wm8739.c
241
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/wm8739.c
41
struct v4l2_subdev sd;
drivers/media/i2c/wm8739.c
52
static inline struct wm8739_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/wm8739.c
54
return container_of(sd, struct wm8739_state, sd);
drivers/media/i2c/wm8739.c
59
return &container_of(ctrl->handler, struct wm8739_state, hdl)->sd;
drivers/media/i2c/wm8739.c
64
static int wm8739_write(struct v4l2_subdev *sd, int reg, u16 val)
drivers/media/i2c/wm8739.c
66
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/wm8739.c
70
v4l2_err(sd, "Invalid register R%d\n", reg);
drivers/media/i2c/wm8739.c
74
v4l2_dbg(1, debug, sd, "write: %02x %02x\n", reg, val);
drivers/media/i2c/wm8739.c
80
v4l2_err(sd, "I2C: cannot write %03x to register R%d\n", val, reg);
drivers/media/i2c/wm8739.c
86
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/wm8739.c
87
struct wm8739_state *state = to_state(sd);
drivers/media/i2c/wm8775.c
102
wm8775_write(sd, R21, state->input);
drivers/media/i2c/wm8775.c
105
static int wm8775_s_routing(struct v4l2_subdev *sd,
drivers/media/i2c/wm8775.c
108
struct wm8775_state *state = to_state(sd);
drivers/media/i2c/wm8775.c
116
v4l2_err(sd, "Invalid input %d.\n", input);
drivers/media/i2c/wm8775.c
124
wm8775_set_audio(sd, 1);
drivers/media/i2c/wm8775.c
130
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/i2c/wm8775.c
136
wm8775_set_audio(sd, 0);
drivers/media/i2c/wm8775.c
139
wm8775_write(sd, R17, (ctrl->val ? ALC_EN : 0) | ALC_HOLD);
drivers/media/i2c/wm8775.c
145
static int wm8775_log_status(struct v4l2_subdev *sd)
drivers/media/i2c/wm8775.c
147
struct wm8775_state *state = to_state(sd);
drivers/media/i2c/wm8775.c
149
v4l2_info(sd, "Input: %d\n", state->input);
drivers/media/i2c/wm8775.c
150
v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
drivers/media/i2c/wm8775.c
154
static int wm8775_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *freq)
drivers/media/i2c/wm8775.c
156
wm8775_set_audio(sd, 0);
drivers/media/i2c/wm8775.c
196
struct v4l2_subdev *sd;
drivers/media/i2c/wm8775.c
215
sd = &state->sd;
drivers/media/i2c/wm8775.c
216
v4l2_i2c_subdev_init(sd, client, &wm8775_ops);
drivers/media/i2c/wm8775.c
228
sd->ctrl_handler = &state->hdl;
drivers/media/i2c/wm8775.c
238
wm8775_write(sd, R23, 0x000);
drivers/media/i2c/wm8775.c
240
wm8775_write(sd, R7, 0x000);
drivers/media/i2c/wm8775.c
242
wm8775_write(sd, R11, 0x021);
drivers/media/i2c/wm8775.c
244
wm8775_write(sd, R12, 0x102);
drivers/media/i2c/wm8775.c
246
wm8775_write(sd, R13, 0x000);
drivers/media/i2c/wm8775.c
250
wm8775_write(sd, R14, 0x1d4);
drivers/media/i2c/wm8775.c
252
wm8775_write(sd, R15, 0x1d4);
drivers/media/i2c/wm8775.c
254
wm8775_write(sd, R16, 0x1bf);
drivers/media/i2c/wm8775.c
257
wm8775_write(sd, R17, 0x185);
drivers/media/i2c/wm8775.c
260
wm8775_write(sd, R16, 0x1bb);
drivers/media/i2c/wm8775.c
262
wm8775_write(sd, R17, (state->loud->val ? ALC_EN : 0) | ALC_HOLD);
drivers/media/i2c/wm8775.c
265
wm8775_write(sd, R18, 0x0a2);
drivers/media/i2c/wm8775.c
267
wm8775_write(sd, R19, 0x005);
drivers/media/i2c/wm8775.c
270
wm8775_write(sd, R20, 0x07a);
drivers/media/i2c/wm8775.c
272
wm8775_write(sd, R21, 0x102);
drivers/media/i2c/wm8775.c
275
wm8775_write(sd, R20, 0x0fb);
drivers/media/i2c/wm8775.c
277
wm8775_set_audio(sd, 1); /* set volume/mute/mux */
drivers/media/i2c/wm8775.c
284
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/i2c/wm8775.c
285
struct wm8775_state *state = to_state(sd);
drivers/media/i2c/wm8775.c
287
v4l2_device_unregister_subdev(sd);
drivers/media/i2c/wm8775.c
44
struct v4l2_subdev sd;
drivers/media/i2c/wm8775.c
53
static inline struct wm8775_state *to_state(struct v4l2_subdev *sd)
drivers/media/i2c/wm8775.c
55
return container_of(sd, struct wm8775_state, sd);
drivers/media/i2c/wm8775.c
60
return &container_of(ctrl->handler, struct wm8775_state, hdl)->sd;
drivers/media/i2c/wm8775.c
63
static int wm8775_write(struct v4l2_subdev *sd, int reg, u16 val)
drivers/media/i2c/wm8775.c
65
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/i2c/wm8775.c
69
v4l2_err(sd, "Invalid register R%d\n", reg);
drivers/media/i2c/wm8775.c
77
v4l2_err(sd, "I2C: cannot write %03x to register R%d\n", val, reg);
drivers/media/i2c/wm8775.c
81
static void wm8775_set_audio(struct v4l2_subdev *sd, int quietly)
drivers/media/i2c/wm8775.c
83
struct wm8775_state *state = to_state(sd);
drivers/media/i2c/wm8775.c
95
wm8775_write(sd, R21, 0x0c0 | state->input);
drivers/media/i2c/wm8775.c
97
wm8775_write(sd, R14, vol_l | 0x100); /* 0x100= Left channel ADC zero cross enable */
drivers/media/i2c/wm8775.c
98
wm8775_write(sd, R15, vol_r | 0x100); /* 0x100= Right channel ADC zero cross enable */
drivers/media/pci/bt8xx/bttv-cards.c
3533
struct v4l2_subdev *sd;
drivers/media/pci/bt8xx/bttv-cards.c
3535
sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
drivers/media/pci/bt8xx/bttv-cards.c
3537
btv->has_saa6588 = (sd != NULL);
drivers/media/pci/cobalt/cobalt-driver.c
124
static unsigned cobalt_get_sd_nr(struct v4l2_subdev *sd)
drivers/media/pci/cobalt/cobalt-driver.c
126
struct cobalt *cobalt = to_cobalt(sd->v4l2_dev);
drivers/media/pci/cobalt/cobalt-driver.c
130
if (sd == cobalt->streams[i].sd)
drivers/media/pci/cobalt/cobalt-driver.c
136
static void cobalt_notify(struct v4l2_subdev *sd,
drivers/media/pci/cobalt/cobalt-driver.c
139
struct cobalt *cobalt = to_cobalt(sd->v4l2_dev);
drivers/media/pci/cobalt/cobalt-driver.c
140
unsigned sd_nr = cobalt_get_sd_nr(sd);
drivers/media/pci/cobalt/cobalt-driver.c
513
s[i].sd = v4l2_i2c_new_subdev_board(&cobalt->v4l2_dev,
drivers/media/pci/cobalt/cobalt-driver.c
515
if (!s[i].sd) {
drivers/media/pci/cobalt/cobalt-driver.c
520
err = v4l2_subdev_call(s[i].sd, video, s_routing,
drivers/media/pci/cobalt/cobalt-driver.c
524
err = v4l2_subdev_call(s[i].sd, pad, set_edid,
drivers/media/pci/cobalt/cobalt-driver.c
528
err = v4l2_subdev_call(s[i].sd, pad, set_fmt, NULL,
drivers/media/pci/cobalt/cobalt-driver.c
605
s->sd = v4l2_i2c_new_subdev_board(&cobalt->v4l2_dev,
drivers/media/pci/cobalt/cobalt-driver.c
607
if (s->sd) {
drivers/media/pci/cobalt/cobalt-driver.c
608
int err = v4l2_subdev_call(s->sd, pad, set_edid, &cobalt_edid);
drivers/media/pci/cobalt/cobalt-driver.c
612
err = v4l2_subdev_call(s->sd, pad, set_fmt, NULL,
drivers/media/pci/cobalt/cobalt-driver.c
633
s->sd = v4l2_i2c_new_subdev_board(&cobalt->v4l2_dev,
drivers/media/pci/cobalt/cobalt-driver.c
635
if (s->sd) {
drivers/media/pci/cobalt/cobalt-driver.c
644
v4l2_subdev_call(s->sd, core, s_power, 1);
drivers/media/pci/cobalt/cobalt-driver.c
645
v4l2_subdev_call(s->sd, video, s_stream, 1);
drivers/media/pci/cobalt/cobalt-driver.c
646
v4l2_subdev_call(s->sd, audio, s_stream, 1);
drivers/media/pci/cobalt/cobalt-driver.c
647
v4l2_ctrl_s_ctrl(v4l2_ctrl_find(s->sd->ctrl_handler,
drivers/media/pci/cobalt/cobalt-driver.c
767
struct v4l2_subdev *sd = cobalt->streams[i].sd;
drivers/media/pci/cobalt/cobalt-driver.c
770
if (sd == NULL)
drivers/media/pci/cobalt/cobalt-driver.c
772
client = v4l2_get_subdevdata(sd);
drivers/media/pci/cobalt/cobalt-driver.c
773
v4l2_device_unregister_subdev(sd);
drivers/media/pci/cobalt/cobalt-driver.h
214
struct v4l2_subdev *sd;
drivers/media/pci/cobalt/cobalt-irq.c
211
v4l2_subdev_call(cobalt->streams[i].sd, core,
drivers/media/pci/cobalt/cobalt-v4l2.c
1024
ret = v4l2_subdev_call(s->sd, pad, get_edid, edid);
drivers/media/pci/cobalt/cobalt-v4l2.c
1038
ret = v4l2_subdev_call(s->sd, pad, set_edid, edid);
drivers/media/pci/cobalt/cobalt-v4l2.c
1081
err = v4l2_subdev_call(s->sd, pad, g_dv_timings, 0, &timings);
drivers/media/pci/cobalt/cobalt-v4l2.c
1100
err = v4l2_subdev_call(s->sd, pad, g_dv_timings, 0, &timings);
drivers/media/pci/cobalt/cobalt-v4l2.c
1241
if (s->sd)
drivers/media/pci/cobalt/cobalt-v4l2.c
1242
vdev->ctrl_handler = s->sd->ctrl_handler;
drivers/media/pci/cobalt/cobalt-v4l2.c
1244
v4l2_subdev_call(s->sd, pad, s_dv_timings, 0, &s->timings);
drivers/media/pci/cobalt/cobalt-v4l2.c
1245
if (!s->is_output && s->sd)
drivers/media/pci/cobalt/cobalt-v4l2.c
175
v4l2_subdev_call(s->sd, pad, set_fmt, NULL, &sd_fmt);
drivers/media/pci/cobalt/cobalt-v4l2.c
226
v4l2_subdev_call(s->sd, pad, set_fmt, NULL,
drivers/media/pci/cobalt/cobalt-v4l2.c
233
v4l2_subdev_call(s->sd, pad, set_fmt, NULL,
drivers/media/pci/cobalt/cobalt-v4l2.c
241
v4l2_subdev_call(s->sd, pad, set_fmt, NULL,
drivers/media/pci/cobalt/cobalt-v4l2.c
582
v4l2_subdev_call(s->sd, core, log_status);
drivers/media/pci/cobalt/cobalt-v4l2.c
612
return v4l2_subdev_call(s->sd,
drivers/media/pci/cobalt/cobalt-v4l2.c
633
err = v4l2_subdev_call(s->sd,
drivers/media/pci/cobalt/cobalt-v4l2.c
653
return v4l2_subdev_call(s->sd,
drivers/media/pci/cobalt/cobalt-v4l2.c
666
return v4l2_subdev_call(s->sd,
drivers/media/pci/cobalt/cobalt-v4l2.c
676
return v4l2_subdev_call(s->sd,
drivers/media/pci/cobalt/cobalt-v4l2.c
719
v4l2_subdev_call(s->sd, pad, get_fmt, NULL, &sd_fmt);
drivers/media/pci/cobalt/cobalt-v4l2.c
763
v4l2_subdev_call(s->sd, pad, get_fmt, NULL, &sd_fmt);
drivers/media/pci/cobalt/cobalt-v4l2.c
941
v4l2_subdev_call(s->sd, pad, set_fmt, NULL, &sd_fmt);
drivers/media/pci/cobalt/cobalt-v4l2.c
962
return v4l2_subdev_call(s->sd,
drivers/media/pci/cobalt/cobalt-v4l2.c
989
return v4l2_subdev_call(s->sd, video, s_routing,
drivers/media/pci/cx18/cx18-av-audio.c
402
int cx18_av_s_clock_freq(struct v4l2_subdev *sd, u32 freq)
drivers/media/pci/cx18/cx18-av-audio.c
404
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-audio.c
430
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/pci/cx18/cx18-av-audio.c
431
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-core.c
1009
static int cx18_av_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/pci/cx18/cx18-av-core.c
1011
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-core.c
1013
CX18_DEBUG_INFO_DEV(sd, "%s output\n", enable ? "enable" : "disable");
drivers/media/pci/cx18/cx18-av-core.c
1036
struct v4l2_subdev *sd = &state->sd;
drivers/media/pci/cx18/cx18-av-core.c
1042
CX18_INFO_DEV(sd, "Video signal: %spresent\n",
drivers/media/pci/cx18/cx18-av-core.c
1044
CX18_INFO_DEV(sd, "Detected format: %s\n",
drivers/media/pci/cx18/cx18-av-core.c
1047
CX18_INFO_DEV(sd, "Specified standard: %s\n",
drivers/media/pci/cx18/cx18-av-core.c
1053
CX18_INFO_DEV(sd, "Specified video input: Composite %d\n",
drivers/media/pci/cx18/cx18-av-core.c
1056
CX18_INFO_DEV(sd, "Specified video input: S-Video (Luma In%d, Chroma In%d)\n",
drivers/media/pci/cx18/cx18-av-core.c
1061
CX18_INFO_DEV(sd, "Specified audioclock freq: %d Hz\n",
drivers/media/pci/cx18/cx18-av-core.c
1068
struct v4l2_subdev *sd = &state->sd;
drivers/media/pci/cx18/cx18-av-core.c
1091
CX18_INFO_DEV(sd, "Detected audio mode: %s\n", p);
drivers/media/pci/cx18/cx18-av-core.c
1116
CX18_INFO_DEV(sd, "Detected audio standard: %s\n", p);
drivers/media/pci/cx18/cx18-av-core.c
1117
CX18_INFO_DEV(sd, "Audio muted: %s\n",
drivers/media/pci/cx18/cx18-av-core.c
1119
CX18_INFO_DEV(sd, "Audio microcontroller: %s\n",
drivers/media/pci/cx18/cx18-av-core.c
113
static void cx18_av_initialize(struct v4l2_subdev *sd)
drivers/media/pci/cx18/cx18-av-core.c
1141
CX18_INFO_DEV(sd, "Configured audio standard: %s\n", p);
drivers/media/pci/cx18/cx18-av-core.c
115
struct cx18_av_state *state = to_cx18_av_state(sd);
drivers/media/pci/cx18/cx18-av-core.c
1155
CX18_INFO_DEV(sd, "Configured audio mode: %s\n", p);
drivers/media/pci/cx18/cx18-av-core.c
116
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-core.c
1173
CX18_INFO_DEV(sd, "Configured audio system: %s\n", p);
drivers/media/pci/cx18/cx18-av-core.c
1177
CX18_INFO_DEV(sd, "Specified audio input: Tuner (In%d)\n",
drivers/media/pci/cx18/cx18-av-core.c
1180
CX18_INFO_DEV(sd, "Specified audio input: External\n");
drivers/media/pci/cx18/cx18-av-core.c
1193
CX18_INFO_DEV(sd, "Preferred audio mode: %s\n", p);
drivers/media/pci/cx18/cx18-av-core.c
1200
CX18_INFO_DEV(sd, "Selected 65 MHz format: %s\n", p);
drivers/media/pci/cx18/cx18-av-core.c
1210
CX18_INFO_DEV(sd, "Selected 45 MHz format: %s\n", p);
drivers/media/pci/cx18/cx18-av-core.c
1214
static int cx18_av_log_status(struct v4l2_subdev *sd)
drivers/media/pci/cx18/cx18-av-core.c
1216
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-core.c
1223
static int cx18_av_g_register(struct v4l2_subdev *sd,
drivers/media/pci/cx18/cx18-av-core.c
1226
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-core.c
1235
static int cx18_av_s_register(struct v4l2_subdev *sd,
drivers/media/pci/cx18/cx18-av-core.c
1238
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-core.c
1302
struct v4l2_subdev *sd;
drivers/media/pci/cx18/cx18-av-core.c
1314
sd = &state->sd;
drivers/media/pci/cx18/cx18-av-core.c
1315
v4l2_subdev_init(sd, &cx18_av_ops);
drivers/media/pci/cx18/cx18-av-core.c
1316
v4l2_set_subdevdata(sd, cx);
drivers/media/pci/cx18/cx18-av-core.c
1317
snprintf(sd->name, sizeof(sd->name),
drivers/media/pci/cx18/cx18-av-core.c
1319
sd->grp_id = CX18_HW_418_AV;
drivers/media/pci/cx18/cx18-av-core.c
1345
sd->ctrl_handler = &state->hdl;
drivers/media/pci/cx18/cx18-av-core.c
1352
err = v4l2_device_register_subdev(&cx->v4l2_dev, sd);
drivers/media/pci/cx18/cx18-av-core.c
255
static int cx18_av_reset(struct v4l2_subdev *sd, u32 val)
drivers/media/pci/cx18/cx18-av-core.c
257
cx18_av_initialize(sd);
drivers/media/pci/cx18/cx18-av-core.c
261
static int cx18_av_load_fw(struct v4l2_subdev *sd)
drivers/media/pci/cx18/cx18-av-core.c
263
struct cx18_av_state *state = to_cx18_av_state(sd);
drivers/media/pci/cx18/cx18-av-core.c
268
cx18_av_initialize(sd);
drivers/media/pci/cx18/cx18-av-core.c
276
struct v4l2_subdev *sd = &state->sd;
drivers/media/pci/cx18/cx18-av-core.c
443
CX18_DEBUG_INFO_DEV(sd, "PLL regs = int: %u, frac: %u, post: %u\n",
drivers/media/pci/cx18/cx18-av-core.c
452
CX18_DEBUG_INFO_DEV(sd, "Video PLL = %d.%06d MHz\n",
drivers/media/pci/cx18/cx18-av-core.c
454
CX18_DEBUG_INFO_DEV(sd, "Pixel rate = %d.%06d Mpixel/sec\n",
drivers/media/pci/cx18/cx18-av-core.c
457
CX18_DEBUG_INFO_DEV(sd, "ADC XTAL/pixel clock decimation ratio = %d.%03d\n",
drivers/media/pci/cx18/cx18-av-core.c
464
CX18_DEBUG_INFO_DEV(sd,
drivers/media/pci/cx18/cx18-av-core.c
468
CX18_DEBUG_INFO_DEV(sd,
drivers/media/pci/cx18/cx18-av-core.c
561
static int cx18_av_s_frequency(struct v4l2_subdev *sd,
drivers/media/pci/cx18/cx18-av-core.c
564
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-core.c
573
struct v4l2_subdev *sd = &state->sd;
drivers/media/pci/cx18/cx18-av-core.c
585
CX18_DEBUG_INFO_DEV(sd, "decoder set video input %d, audio input %d\n",
drivers/media/pci/cx18/cx18-av-core.c
605
CX18_ERR_DEV(sd, "0x%06x is not a valid video input!\n",
drivers/media/pci/cx18/cx18-av-core.c
625
CX18_ERR_DEV(sd, "0x%06x is not a valid video input!\n",
drivers/media/pci/cx18/cx18-av-core.c
670
CX18_ERR_DEV(sd, "0x%04x is not a valid audio input!\n",
drivers/media/pci/cx18/cx18-av-core.c
742
static int cx18_av_s_video_routing(struct v4l2_subdev *sd,
drivers/media/pci/cx18/cx18-av-core.c
745
struct cx18_av_state *state = to_cx18_av_state(sd);
drivers/media/pci/cx18/cx18-av-core.c
746
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-core.c
750
static int cx18_av_s_audio_routing(struct v4l2_subdev *sd,
drivers/media/pci/cx18/cx18-av-core.c
753
struct cx18_av_state *state = to_cx18_av_state(sd);
drivers/media/pci/cx18/cx18-av-core.c
754
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-core.c
758
static int cx18_av_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
drivers/media/pci/cx18/cx18-av-core.c
760
struct cx18_av_state *state = to_cx18_av_state(sd);
drivers/media/pci/cx18/cx18-av-core.c
761
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-core.c
795
static int cx18_av_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
drivers/media/pci/cx18/cx18-av-core.c
797
struct cx18_av_state *state = to_cx18_av_state(sd);
drivers/media/pci/cx18/cx18-av-core.c
798
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-core.c
840
static int cx18_av_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
drivers/media/pci/cx18/cx18-av-core.c
842
struct cx18_av_state *state = to_cx18_av_state(sd);
drivers/media/pci/cx18/cx18-av-core.c
843
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-core.c
878
CX18_DEBUG_INFO_DEV(sd, "changing video std to fmt %i\n", fmt);
drivers/media/pci/cx18/cx18-av-core.c
896
static int cx18_av_s_radio(struct v4l2_subdev *sd)
drivers/media/pci/cx18/cx18-av-core.c
898
struct cx18_av_state *state = to_cx18_av_state(sd);
drivers/media/pci/cx18/cx18-av-core.c
905
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/pci/cx18/cx18-av-core.c
906
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-core.c
932
static int cx18_av_set_fmt(struct v4l2_subdev *sd,
drivers/media/pci/cx18/cx18-av-core.c
937
struct cx18_av_state *state = to_cx18_av_state(sd);
drivers/media/pci/cx18/cx18-av-core.c
938
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-core.c
972
CX18_ERR_DEV(sd, "%dx%d is not a valid size!\n",
drivers/media/pci/cx18/cx18-av-core.c
993
CX18_DEBUG_INFO_DEV(sd,
drivers/media/pci/cx18/cx18-av-core.h
332
static inline struct cx18_av_state *to_cx18_av_state(struct v4l2_subdev *sd)
drivers/media/pci/cx18/cx18-av-core.h
334
return container_of(sd, struct cx18_av_state, sd);
drivers/media/pci/cx18/cx18-av-core.h
339
return &container_of(ctrl->handler, struct cx18_av_state, hdl)->sd;
drivers/media/pci/cx18/cx18-av-core.h
364
int cx18_av_s_clock_freq(struct v4l2_subdev *sd, u32 freq);
drivers/media/pci/cx18/cx18-av-core.h
370
int cx18_av_decode_vbi_line(struct v4l2_subdev *sd,
drivers/media/pci/cx18/cx18-av-core.h
372
int cx18_av_s_raw_fmt(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt);
drivers/media/pci/cx18/cx18-av-core.h
373
int cx18_av_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt);
drivers/media/pci/cx18/cx18-av-core.h
374
int cx18_av_s_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt);
drivers/media/pci/cx18/cx18-av-core.h
84
struct v4l2_subdev sd;
drivers/media/pci/cx18/cx18-av-firmware.c
125
CX18_ERR_DEV(sd, "unable to load firmware %s\n", FWFILE);
drivers/media/pci/cx18/cx18-av-firmware.c
133
CX18_INFO_DEV(sd, "loaded %s firmware (%d bytes)\n", FWFILE, size);
drivers/media/pci/cx18/cx18-av-firmware.c
24
struct v4l2_subdev *sd = &cx->av_state.sd;
drivers/media/pci/cx18/cx18-av-firmware.c
50
CX18_ERR_DEV(sd, "verification of %s firmware load failed: expected %#010x got %#010x\n",
drivers/media/pci/cx18/cx18-av-firmware.c
58
CX18_INFO_DEV(sd, "verified load of %s firmware (%d bytes)\n",
drivers/media/pci/cx18/cx18-av-firmware.c
65
struct v4l2_subdev *sd = &cx->av_state.sd;
drivers/media/pci/cx18/cx18-av-firmware.c
74
CX18_ERR_DEV(sd, "unable to open firmware %s\n", FWFILE);
drivers/media/pci/cx18/cx18-av-vbi.c
110
int cx18_av_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *svbi)
drivers/media/pci/cx18/cx18-av-vbi.c
112
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-vbi.c
153
int cx18_av_s_raw_fmt(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt)
drivers/media/pci/cx18/cx18-av-vbi.c
155
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-vbi.c
167
int cx18_av_s_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *svbi)
drivers/media/pci/cx18/cx18-av-vbi.c
169
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-av-vbi.c
237
int cx18_av_decode_vbi_line(struct v4l2_subdev *sd,
drivers/media/pci/cx18/cx18-av-vbi.c
240
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-gpio.c
105
static int gpiomux_s_radio(struct v4l2_subdev *sd)
drivers/media/pci/cx18/cx18-gpio.c
107
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-gpio.c
119
static int gpiomux_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
drivers/media/pci/cx18/cx18-gpio.c
121
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-gpio.c
144
static int gpiomux_s_audio_routing(struct v4l2_subdev *sd,
drivers/media/pci/cx18/cx18-gpio.c
147
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-gpio.c
193
static int resetctrl_log_status(struct v4l2_subdev *sd)
drivers/media/pci/cx18/cx18-gpio.c
195
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-gpio.c
198
CX18_INFO_DEV(sd, "GPIO: direction 0x%08x, value 0x%08x\n",
drivers/media/pci/cx18/cx18-gpio.c
204
static int resetctrl_reset(struct v4l2_subdev *sd, u32 val)
drivers/media/pci/cx18/cx18-gpio.c
206
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-gpio.c
282
struct v4l2_subdev *sd;
drivers/media/pci/cx18/cx18-gpio.c
288
sd = &cx->sd_gpiomux;
drivers/media/pci/cx18/cx18-gpio.c
293
sd = &cx->sd_resetctrl;
drivers/media/pci/cx18/cx18-gpio.c
301
v4l2_subdev_init(sd, ops);
drivers/media/pci/cx18/cx18-gpio.c
302
v4l2_set_subdevdata(sd, cx);
drivers/media/pci/cx18/cx18-gpio.c
303
snprintf(sd->name, sizeof(sd->name), "%s %s", cx->v4l2_dev.name, str);
drivers/media/pci/cx18/cx18-gpio.c
304
sd->grp_id = hw;
drivers/media/pci/cx18/cx18-gpio.c
305
return v4l2_device_register_subdev(&cx->v4l2_dev, sd);
drivers/media/pci/cx18/cx18-gpio.c
94
static int gpiomux_log_status(struct v4l2_subdev *sd)
drivers/media/pci/cx18/cx18-gpio.c
96
struct cx18 *cx = v4l2_get_subdevdata(sd);
drivers/media/pci/cx18/cx18-gpio.c
99
CX18_INFO_DEV(sd, "GPIO: direction 0x%08x, value 0x%08x\n",
drivers/media/pci/cx18/cx18-i2c.c
105
sd = v4l2_i2c_new_subdev(&cx->v4l2_dev,
drivers/media/pci/cx18/cx18-i2c.c
107
if (sd != NULL)
drivers/media/pci/cx18/cx18-i2c.c
108
sd->grp_id = hw;
drivers/media/pci/cx18/cx18-i2c.c
109
sd = v4l2_i2c_new_subdev(&cx->v4l2_dev,
drivers/media/pci/cx18/cx18-i2c.c
111
if (sd != NULL)
drivers/media/pci/cx18/cx18-i2c.c
112
sd->grp_id = hw;
drivers/media/pci/cx18/cx18-i2c.c
113
sd = v4l2_i2c_new_subdev(&cx->v4l2_dev,
drivers/media/pci/cx18/cx18-i2c.c
115
if (sd != NULL)
drivers/media/pci/cx18/cx18-i2c.c
116
sd->grp_id = hw;
drivers/media/pci/cx18/cx18-i2c.c
117
return sd != NULL ? 0 : -1;
drivers/media/pci/cx18/cx18-i2c.c
128
sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, adap, type, hw_addrs[idx],
drivers/media/pci/cx18/cx18-i2c.c
130
if (sd != NULL)
drivers/media/pci/cx18/cx18-i2c.c
131
sd->grp_id = hw;
drivers/media/pci/cx18/cx18-i2c.c
132
return sd != NULL ? 0 : -1;
drivers/media/pci/cx18/cx18-i2c.c
139
struct v4l2_subdev *sd;
drivers/media/pci/cx18/cx18-i2c.c
142
v4l2_device_for_each_subdev(sd, &cx->v4l2_dev) {
drivers/media/pci/cx18/cx18-i2c.c
143
if (sd->grp_id == hw) {
drivers/media/pci/cx18/cx18-i2c.c
144
result = sd;
drivers/media/pci/cx18/cx18-i2c.c
97
struct v4l2_subdev *sd;
drivers/media/pci/cx18/cx18-vbi.c
44
const int sd = sizeof(mpeg_hdr_data); /* start of vbi data */
drivers/media/pci/cx18/cx18-vbi.c
63
dst[sd + 12 + line * 43] = cx18_service2vbi(sdata->id);
drivers/media/pci/cx18/cx18-vbi.c
64
memcpy(dst + sd + 12 + line * 43 + 1, sdata->data, 42);
drivers/media/pci/cx18/cx18-vbi.c
72
memcpy(dst + sd, "ITV0", 4);
drivers/media/pci/cx18/cx18-vbi.c
73
memmove(dst + sd + 4, dst + sd + 12, line * 43);
drivers/media/pci/cx18/cx18-vbi.c
76
memcpy(dst + sd, "itv0", 4);
drivers/media/pci/cx18/cx18-vbi.c
79
memcpy(dst + sd + 4, &linemask[0], 8);
drivers/media/pci/cx18/cx18-vbi.c
89
cx->vbi.sliced_mpeg_size[idx] = sd + size;
drivers/media/pci/cx23885/cx23885-core.c
1945
static void cx23885_v4l2_dev_notify(struct v4l2_subdev *sd,
drivers/media/pci/cx23885/cx23885-core.c
1950
if (sd == NULL)
drivers/media/pci/cx23885/cx23885-core.c
1953
dev = to_cx23885(sd->v4l2_dev);
drivers/media/pci/cx23885/cx23885-core.c
1957
if (sd == dev->sd_ir)
drivers/media/pci/cx23885/cx23885-core.c
1958
cx23885_ir_rx_v4l2_dev_notify(sd, *(u32 *)arg);
drivers/media/pci/cx23885/cx23885-core.c
1961
if (sd == dev->sd_ir)
drivers/media/pci/cx23885/cx23885-core.c
1962
cx23885_ir_tx_v4l2_dev_notify(sd, *(u32 *)arg);
drivers/media/pci/cx23885/cx23885-core.c
859
struct v4l2_subdev *sd;
drivers/media/pci/cx23885/cx23885-core.c
862
v4l2_device_for_each_subdev(sd, &dev->v4l2_dev) {
drivers/media/pci/cx23885/cx23885-core.c
863
if (sd->grp_id == hw) {
drivers/media/pci/cx23885/cx23885-core.c
864
result = sd;
drivers/media/pci/cx23885/cx23885-ir.c
100
if (sd == dev->sd_cx25840)
drivers/media/pci/cx23885/cx23885-ir.c
63
void cx23885_ir_rx_v4l2_dev_notify(struct v4l2_subdev *sd, u32 events)
drivers/media/pci/cx23885/cx23885-ir.c
65
struct cx23885_dev *dev = to_cx23885(sd->v4l2_dev);
drivers/media/pci/cx23885/cx23885-ir.c
81
if (sd == dev->sd_cx25840)
drivers/media/pci/cx23885/cx23885-ir.c
88
void cx23885_ir_tx_v4l2_dev_notify(struct v4l2_subdev *sd, u32 events)
drivers/media/pci/cx23885/cx23885-ir.c
90
struct cx23885_dev *dev = to_cx23885(sd->v4l2_dev);
drivers/media/pci/cx23885/cx23885-ir.h
12
void cx23885_ir_rx_v4l2_dev_notify(struct v4l2_subdev *sd, u32 events);
drivers/media/pci/cx23885/cx23885-ir.h
13
void cx23885_ir_tx_v4l2_dev_notify(struct v4l2_subdev *sd, u32 events);
drivers/media/pci/cx23885/cx23885-video.c
1264
struct v4l2_subdev *sd = NULL;
drivers/media/pci/cx23885/cx23885-video.c
1267
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
drivers/media/pci/cx23885/cx23885-video.c
1271
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
drivers/media/pci/cx23885/cx23885-video.c
1274
if (sd) {
drivers/media/pci/cx23885/cx23885-video.c
1280
tun_setup.addr = v4l2_i2c_subdev_addr(sd);
drivers/media/pci/cx23885/cx23885-video.c
1283
v4l2_subdev_call(sd, tuner, s_type_addr, &tun_setup);
drivers/media/pci/cx23885/cx23885-video.c
1295
v4l2_subdev_call(sd, tuner, s_config, &cfg);
drivers/media/pci/cx23885/cx23885-video.c
1307
v4l2_subdev_call(sd, tuner, s_config, &cfg);
drivers/media/pci/cx23885/cx23888-ir.c
1001
v4l2_info(sd, "\tPulse width timer timed-out: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1003
v4l2_info(sd, "\tPulse width timer time-out intr: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1005
v4l2_info(sd, "\tFIFO overrun: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1007
v4l2_info(sd, "\tFIFO overrun interrupt: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1009
v4l2_info(sd, "\tBusy: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1011
v4l2_info(sd, "\tFIFO service requested: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1013
v4l2_info(sd, "\tFIFO service request interrupt: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1016
v4l2_info(sd, "IR Transmitter:\n");
drivers/media/pci/cx23885/cx23888-ir.c
1017
v4l2_info(sd, "\tEnabled: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1019
v4l2_info(sd, "\tModulation onto a carrier: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1021
v4l2_info(sd, "\tFIFO: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1023
v4l2_info(sd, "\tFIFO interrupt watermark: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1025
v4l2_info(sd, "\tOutput pin level inversion %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1027
v4l2_info(sd, "\tCarrier polarity: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1031
v4l2_info(sd, "\tCarrier (16 clocks): %u Hz\n",
drivers/media/pci/cx23885/cx23888-ir.c
1033
v4l2_info(sd, "\tCarrier duty cycle: %2u/16\n",
drivers/media/pci/cx23885/cx23888-ir.c
1036
v4l2_info(sd, "\tMax pulse width: %u us, %llu ns\n",
drivers/media/pci/cx23885/cx23888-ir.c
1039
v4l2_info(sd, "\tBusy: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1041
v4l2_info(sd, "\tFIFO service requested: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1043
v4l2_info(sd, "\tFIFO service request interrupt: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
1050
static int cx23888_ir_g_register(struct v4l2_subdev *sd,
drivers/media/pci/cx23885/cx23888-ir.c
1053
struct cx23888_ir_state *state = to_state(sd);
drivers/media/pci/cx23885/cx23888-ir.c
1065
static int cx23888_ir_s_register(struct v4l2_subdev *sd,
drivers/media/pci/cx23885/cx23888-ir.c
1068
struct cx23888_ir_state *state = to_state(sd);
drivers/media/pci/cx23885/cx23888-ir.c
1141
struct v4l2_subdev *sd;
drivers/media/pci/cx23885/cx23888-ir.c
1157
sd = &state->sd;
drivers/media/pci/cx23885/cx23888-ir.c
1159
v4l2_subdev_init(sd, &cx23888_ir_controller_ops);
drivers/media/pci/cx23885/cx23888-ir.c
1160
v4l2_set_subdevdata(sd, state);
drivers/media/pci/cx23885/cx23888-ir.c
1162
snprintf(sd->name, sizeof(sd->name), "%s/888-ir", dev->name);
drivers/media/pci/cx23885/cx23888-ir.c
1163
sd->grp_id = CX23885_HW_888_IR;
drivers/media/pci/cx23885/cx23888-ir.c
1165
ret = v4l2_device_register_subdev(&dev->v4l2_dev, sd);
drivers/media/pci/cx23885/cx23888-ir.c
117
struct v4l2_subdev sd;
drivers/media/pci/cx23885/cx23888-ir.c
1176
v4l2_subdev_call(sd, ir, rx_s_parameters, &default_params);
drivers/media/pci/cx23885/cx23888-ir.c
1180
v4l2_subdev_call(sd, ir, tx_s_parameters, &default_params);
drivers/media/pci/cx23885/cx23888-ir.c
1189
struct v4l2_subdev *sd;
drivers/media/pci/cx23885/cx23888-ir.c
1192
sd = cx23885_find_hw(dev, CX23885_HW_888_IR);
drivers/media/pci/cx23885/cx23888-ir.c
1193
if (sd == NULL)
drivers/media/pci/cx23885/cx23888-ir.c
1196
cx23888_ir_rx_shutdown(sd);
drivers/media/pci/cx23885/cx23888-ir.c
1197
cx23888_ir_tx_shutdown(sd);
drivers/media/pci/cx23885/cx23888-ir.c
1199
state = to_state(sd);
drivers/media/pci/cx23885/cx23888-ir.c
1200
v4l2_device_unregister_subdev(sd);
drivers/media/pci/cx23885/cx23888-ir.c
133
static inline struct cx23888_ir_state *to_state(struct v4l2_subdev *sd)
drivers/media/pci/cx23885/cx23888-ir.c
135
return v4l2_get_subdevdata(sd);
drivers/media/pci/cx23885/cx23888-ir.c
500
static int cx23888_ir_irq_handler(struct v4l2_subdev *sd, u32 status,
drivers/media/pci/cx23885/cx23888-ir.c
503
struct cx23888_ir_state *state = to_state(sd);
drivers/media/pci/cx23885/cx23888-ir.c
527
v4l2_dbg(2, ir_888_debug, sd, "IRQ Status: %s %s %s %s %s %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
533
v4l2_dbg(2, ir_888_debug, sd, "IRQ Enables: %s %s %s %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
554
v4l2_subdev_notify(sd, V4L2_SUBDEV_IR_TX_NOTIFY, &events);
drivers/media/pci/cx23885/cx23888-ir.c
592
v4l2_err(sd, "IR receiver software FIFO overrun\n");
drivers/media/pci/cx23885/cx23888-ir.c
601
v4l2_err(sd, "IR receiver hardware FIFO overrun\n");
drivers/media/pci/cx23885/cx23888-ir.c
624
v4l2_subdev_notify(sd, V4L2_SUBDEV_IR_RX_NOTIFY, &events);
drivers/media/pci/cx23885/cx23888-ir.c
629
static int cx23888_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count,
drivers/media/pci/cx23885/cx23888-ir.c
632
struct cx23888_ir_state *state = to_state(sd);
drivers/media/pci/cx23885/cx23888-ir.c
673
v4l2_dbg(2, ir_888_debug, sd, "rx read: %10u ns %s %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
676
v4l2_dbg(2, ir_888_debug, sd, "rx read: end of rx\n");
drivers/media/pci/cx23885/cx23888-ir.c
681
static int cx23888_ir_rx_g_parameters(struct v4l2_subdev *sd,
drivers/media/pci/cx23885/cx23888-ir.c
684
struct cx23888_ir_state *state = to_state(sd);
drivers/media/pci/cx23885/cx23888-ir.c
691
static int cx23888_ir_rx_shutdown(struct v4l2_subdev *sd)
drivers/media/pci/cx23885/cx23888-ir.c
693
struct cx23888_ir_state *state = to_state(sd);
drivers/media/pci/cx23885/cx23888-ir.c
712
static int cx23888_ir_rx_s_parameters(struct v4l2_subdev *sd,
drivers/media/pci/cx23885/cx23888-ir.c
715
struct cx23888_ir_state *state = to_state(sd);
drivers/media/pci/cx23885/cx23888-ir.c
721
return cx23888_ir_rx_shutdown(sd);
drivers/media/pci/cx23885/cx23888-ir.c
800
static int cx23888_ir_tx_write(struct v4l2_subdev *sd, u8 *buf, size_t count,
drivers/media/pci/cx23885/cx23888-ir.c
803
struct cx23888_ir_state *state = to_state(sd);
drivers/media/pci/cx23885/cx23888-ir.c
811
static int cx23888_ir_tx_g_parameters(struct v4l2_subdev *sd,
drivers/media/pci/cx23885/cx23888-ir.c
814
struct cx23888_ir_state *state = to_state(sd);
drivers/media/pci/cx23885/cx23888-ir.c
821
static int cx23888_ir_tx_shutdown(struct v4l2_subdev *sd)
drivers/media/pci/cx23885/cx23888-ir.c
823
struct cx23888_ir_state *state = to_state(sd);
drivers/media/pci/cx23885/cx23888-ir.c
840
static int cx23888_ir_tx_s_parameters(struct v4l2_subdev *sd,
drivers/media/pci/cx23885/cx23888-ir.c
843
struct cx23888_ir_state *state = to_state(sd);
drivers/media/pci/cx23885/cx23888-ir.c
849
return cx23888_ir_tx_shutdown(sd);
drivers/media/pci/cx23885/cx23888-ir.c
916
static int cx23888_ir_log_status(struct v4l2_subdev *sd)
drivers/media/pci/cx23885/cx23888-ir.c
918
struct cx23888_ir_state *state = to_state(sd);
drivers/media/pci/cx23885/cx23888-ir.c
931
v4l2_info(sd, "IR Receiver:\n");
drivers/media/pci/cx23885/cx23888-ir.c
932
v4l2_info(sd, "\tEnabled: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
934
v4l2_info(sd, "\tDemodulation from a carrier: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
936
v4l2_info(sd, "\tFIFO: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
955
v4l2_info(sd, "\tPulse timers' start/stop trigger: %s\n", s);
drivers/media/pci/cx23885/cx23888-ir.c
956
v4l2_info(sd, "\tFIFO data on pulse timer overflow: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
958
v4l2_info(sd, "\tFIFO interrupt watermark: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
960
v4l2_info(sd, "\tLoopback mode: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
963
v4l2_info(sd, "\tExpected carrier (16 clocks): %u Hz\n",
drivers/media/pci/cx23885/cx23888-ir.c
987
v4l2_info(sd, "\tNext carrier edge window: 16 clocks -%1d/+%1d, %u to %u Hz\n",
drivers/media/pci/cx23885/cx23888-ir.c
992
v4l2_info(sd, "\tMax measurable pulse width: %u us, %llu ns\n",
drivers/media/pci/cx23885/cx23888-ir.c
995
v4l2_info(sd, "\tLow pass filter: %s\n",
drivers/media/pci/cx23885/cx23888-ir.c
998
v4l2_info(sd, "\tMin acceptable pulse width (LPF): %u us, %u ns\n",
drivers/media/pci/cx88/cx88-video.c
1353
struct v4l2_subdev *sd;
drivers/media/pci/cx88/cx88-video.c
1360
sd = v4l2_i2c_new_subdev_board(&core->v4l2_dev, &core->i2c_adap,
drivers/media/pci/cx88/cx88-video.c
1362
if (sd) {
drivers/media/pci/cx88/cx88-video.c
1363
core->sd_wm8775 = sd;
drivers/media/pci/cx88/cx88-video.c
1364
sd->grp_id = WM8775_GID;
drivers/media/pci/intel/ipu3/ipu3-cio2.c
1191
static int cio2_subdev_subscribe_event(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu3/ipu3-cio2.c
1205
static int cio2_subdev_init_state(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu3/ipu3-cio2.c
1231
static int cio2_subdev_set_fmt(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu3/ipu3-cio2.c
1244
return v4l2_subdev_get_fmt(sd, sd_state, fmt);
drivers/media/pci/intel/ipu3/ipu3-cio2.c
1269
static int cio2_subdev_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu3/ipu3-cio2.c
1284
struct v4l2_subdev *sd =
drivers/media/pci/intel/ipu3/ipu3-cio2.c
1290
return v4l2_subdev_call(sd, pad, get_fmt, NULL, fmt);
drivers/media/pci/intel/ipu3/ipu3-cio2.c
1362
struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu3/ipu3-cio2.c
1373
ret = ipu_bridge_instantiate_vcm(sd->dev);
drivers/media/pci/intel/ipu3/ipu3-cio2.c
1380
q->sensor = sd;
drivers/media/pci/intel/ipu3/ipu3-cio2.c
1388
struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu3/ipu3-cio2.c
1410
ret = v4l2_create_fwnode_links_to_pad(asd->sd,
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
102
static int csi2_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
105
struct ipu6_isys_subdev *asd = to_ipu6_isys_subdev(sd);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
116
return v4l2_ctrl_subdev_subscribe_event(sd, fh, sub);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
231
static int ipu6_isys_csi2_set_stream(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
235
struct ipu6_isys_subdev *asd = to_ipu6_isys_subdev(sd);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
346
static int ipu6_isys_csi2_enable_streams(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
350
struct ipu6_isys_subdev *asd = to_ipu6_isys_subdev(sd);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
358
remote_pad = media_pad_remote_pad_first(&sd->entity.pads[CSI2_PAD_SINK]);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
369
ret = ipu6_isys_csi2_set_stream(sd, &timing, csi2->nlanes, true);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
376
ipu6_isys_csi2_set_stream(sd, NULL, 0, false);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
383
static int ipu6_isys_csi2_disable_streams(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
395
remote_pad = media_pad_remote_pad_first(&sd->entity.pads[CSI2_PAD_SINK]);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
398
ipu6_isys_csi2_set_stream(sd, NULL, 0, false);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
405
static int ipu6_isys_csi2_set_sel(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
409
struct ipu6_isys_subdev *asd = to_ipu6_isys_subdev(sd);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
450
sd->name, sel->r.left, sel->r.top, sel->r.width, sel->r.height,
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
456
static int ipu6_isys_csi2_get_sel(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
464
if (sd->entity.pads[sel->pad].flags & MEDIA_PAD_FL_SINK)
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
521
v4l2_device_unregister_subdev(&csi2->asd.sd);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
522
v4l2_subdev_cleanup(&csi2->asd.sd);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
538
csi2->asd.sd.entity.ops = &csi2_entity_ops;
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
547
snprintf(csi2->asd.sd.name, sizeof(csi2->asd.sd.name),
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
549
v4l2_set_subdevdata(&csi2->asd.sd, &csi2->asd);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
550
ret = v4l2_subdev_init_finalize(&csi2->asd.sd);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
556
ret = v4l2_device_register_subdev(&isys->v4l2_dev, &csi2->asd.sd);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
572
struct video_device *vdev = stream->asd->sd.devnode;
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
91
src_pad = media_pad_remote_pad_unique(&csi2->asd.sd.entity.pads[CSI2_PAD_SINK]);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
95
csi2->asd.sd.name, src_pad);
drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
428
struct v4l2_subdev *sd;
drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
434
sd = media_entity_to_v4l2_subdev(remote_pad->entity);
drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
435
r_stream = ipu6_isys_get_src_stream_by_src_pad(sd, remote_pad->index);
drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
438
v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
449
sd->entity.name, remote_pad->index, r_stream);
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
162
int ipu6_isys_subdev_set_fmt(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
166
struct ipu6_isys_subdev *asd = to_ipu6_isys_subdev(sd);
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
175
if ((sd->entity.pads[format->pad].flags & MEDIA_PAD_FL_SOURCE) &&
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
176
sd->entity.num_pads > 1)
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
177
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
201
if (!(sd->entity.pads[format->pad].flags & MEDIA_PAD_FL_SINK))
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
230
int ipu6_isys_subdev_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
234
struct ipu6_isys_subdev *asd = to_ipu6_isys_subdev(sd);
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
248
static int subdev_set_routing(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
260
ret = v4l2_subdev_routing_validate(sd, routing,
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
265
return v4l2_subdev_set_routing_with_fmt(sd, state, routing, &format);
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
268
u32 ipu6_isys_get_src_stream_by_src_pad(struct v4l2_subdev *sd, u32 pad)
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
275
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
292
static int ipu6_isys_subdev_init_state(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
307
return subdev_set_routing(sd, state, &routing);
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
310
int ipu6_isys_subdev_set_routing(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
315
return subdev_set_routing(sd, state, routing);
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
332
v4l2_subdev_init(&asd->sd, ops);
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
334
asd->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
337
asd->sd.owner = THIS_MODULE;
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
338
asd->sd.dev = &asd->isys->adev->auxdev.dev;
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
339
asd->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
340
asd->sd.internal_ops = &ipu6_isys_subdev_internal_ops;
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
354
ret = media_entity_pads_init(&asd->sd.entity, num_pads, asd->pad);
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
363
asd->ctrl_init(&asd->sd);
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
369
asd->sd.ctrl_handler = &asd->ctrl_handler;
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
380
media_entity_cleanup(&asd->sd.entity);
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
387
media_entity_cleanup(&asd->sd.entity);
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.h
16
struct v4l2_subdev sd;
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.h
21
void (*ctrl_init)(struct v4l2_subdev *sd);
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.h
26
container_of(__sd, struct ipu6_isys_subdev, sd)
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.h
33
int ipu6_isys_subdev_set_fmt(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.h
36
int ipu6_isys_subdev_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.h
40
u32 ipu6_isys_get_src_stream_by_src_pad(struct v4l2_subdev *sd, u32 pad);
drivers/media/pci/intel/ipu6/ipu6-isys-subdev.h
41
int ipu6_isys_subdev_set_routing(struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu6/ipu6-isys-video.c
1001
sd = &stream->asd->sd;
drivers/media/pci/intel/ipu6/ipu6-isys-video.c
1003
r_stream = ipu6_isys_get_src_stream_by_src_pad(sd, r_pad->index);
drivers/media/pci/intel/ipu6/ipu6-isys-video.c
1005
subdev_state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/pci/intel/ipu6/ipu6-isys-video.c
1020
sd->name, r_pad->index, stream_mask);
drivers/media/pci/intel/ipu6/ipu6-isys-video.c
1021
ret = v4l2_subdev_disable_streams(sd, r_pad->index,
drivers/media/pci/intel/ipu6/ipu6-isys-video.c
1024
dev_err(dev, "stream off %s failed with %d\n", sd->name,
drivers/media/pci/intel/ipu6/ipu6-isys-video.c
1036
dev_dbg(dev, "stream on %s pad %d mask 0x%llx\n", sd->name,
drivers/media/pci/intel/ipu6/ipu6-isys-video.c
1038
ret = v4l2_subdev_enable_streams(sd, r_pad->index, stream_mask);
drivers/media/pci/intel/ipu6/ipu6-isys-video.c
1040
dev_err(dev, "stream on %s failed with %d\n", sd->name,
drivers/media/pci/intel/ipu6/ipu6-isys-video.c
457
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(src_pad->entity);
drivers/media/pci/intel/ipu6/ipu6-isys-video.c
458
struct v4l2_subdev_state *state = v4l2_subdev_get_locked_active_state(sd);
drivers/media/pci/intel/ipu6/ipu6-isys-video.c
472
src_stream = ipu6_isys_get_src_stream_by_src_pad(sd, src_pad->index);
drivers/media/pci/intel/ipu6/ipu6-isys-video.c
776
v4l2_subdev_lock_and_get_active_state(&csi2->asd.sd);
drivers/media/pci/intel/ipu6/ipu6-isys-video.c
992
struct v4l2_subdev *sd;
drivers/media/pci/intel/ipu6/ipu6-isys.c
107
struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu6/ipu6-isys.c
114
for (i = 0; i < sd->entity.num_pads; i++) {
drivers/media/pci/intel/ipu6/ipu6-isys.c
115
if (sd->entity.pads[i].flags & MEDIA_PAD_FL_SOURCE)
drivers/media/pci/intel/ipu6/ipu6-isys.c
119
if (i == sd->entity.num_pads) {
drivers/media/pci/intel/ipu6/ipu6-isys.c
125
ret = media_create_pad_link(&sd->entity, i,
drivers/media/pci/intel/ipu6/ipu6-isys.c
126
&isys->csi2[csi2->port].asd.sd.entity,
drivers/media/pci/intel/ipu6/ipu6-isys.c
139
v4l2_device_unregister_subdev(sd);
drivers/media/pci/intel/ipu6/ipu6-isys.c
206
struct media_entity *sd = &isys->csi2[i].asd.sd.entity;
drivers/media/pci/intel/ipu6/ipu6-isys.c
211
ret = media_create_pad_link(sd, CSI2_PAD_SRC + j,
drivers/media/pci/intel/ipu6/ipu6-isys.c
673
struct v4l2_subdev *sd,
drivers/media/pci/intel/ipu6/ipu6-isys.c
688
ret = ipu_bridge_instantiate_vcm(sd->dev);
drivers/media/pci/intel/ipu6/ipu6-isys.c
695
sd->name, s_asd->csi2.nlanes, s_asd->csi2.port);
drivers/media/pci/intel/ipu6/ipu6-isys.c
696
ret = isys_complete_ext_device_registration(isys, sd, &s_asd->csi2);
drivers/media/pci/intel/ivsc/mei_csi.c
152
static inline struct mei_csi *sd_to_csi(struct v4l2_subdev *sd)
drivers/media/pci/intel/ivsc/mei_csi.c
154
return container_of(sd, struct mei_csi, subdev);
drivers/media/pci/intel/ivsc/mei_csi.c
274
static int mei_csi_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/pci/intel/ivsc/mei_csi.c
276
struct mei_csi *csi = sd_to_csi(sd);
drivers/media/pci/intel/ivsc/mei_csi.c
326
static int mei_csi_init_state(struct v4l2_subdev *sd,
drivers/media/pci/intel/ivsc/mei_csi.c
332
for (i = 0; i < sd->entity.num_pads; i++) {
drivers/media/pci/intel/ivsc/mei_csi.c
340
static int mei_csi_set_fmt(struct v4l2_subdev *sd,
drivers/media/pci/intel/ivsc/mei_csi.c
463
static int mei_csi_get_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/pci/intel/ivsc/mei_csi.c
466
struct mei_csi *csi = sd_to_csi(sd);
drivers/media/pci/ivtv/ivtv-gpio.c
136
static inline struct ivtv *sd_to_ivtv(struct v4l2_subdev *sd)
drivers/media/pci/ivtv/ivtv-gpio.c
138
return container_of(sd, struct ivtv, sd_gpio);
drivers/media/pci/ivtv/ivtv-gpio.c
146
static int subdev_s_clock_freq(struct v4l2_subdev *sd, u32 freq)
drivers/media/pci/ivtv/ivtv-gpio.c
148
struct ivtv *itv = sd_to_ivtv(sd);
drivers/media/pci/ivtv/ivtv-gpio.c
169
static int subdev_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
drivers/media/pci/ivtv/ivtv-gpio.c
171
struct ivtv *itv = sd_to_ivtv(sd);
drivers/media/pci/ivtv/ivtv-gpio.c
183
static int subdev_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
drivers/media/pci/ivtv/ivtv-gpio.c
185
struct ivtv *itv = sd_to_ivtv(sd);
drivers/media/pci/ivtv/ivtv-gpio.c
210
static int subdev_s_radio(struct v4l2_subdev *sd)
drivers/media/pci/ivtv/ivtv-gpio.c
212
struct ivtv *itv = sd_to_ivtv(sd);
drivers/media/pci/ivtv/ivtv-gpio.c
222
static int subdev_s_audio_routing(struct v4l2_subdev *sd,
drivers/media/pci/ivtv/ivtv-gpio.c
225
struct ivtv *itv = sd_to_ivtv(sd);
drivers/media/pci/ivtv/ivtv-gpio.c
250
struct v4l2_subdev *sd = to_sd(ctrl);
drivers/media/pci/ivtv/ivtv-gpio.c
251
struct ivtv *itv = sd_to_ivtv(sd);
drivers/media/pci/ivtv/ivtv-gpio.c
267
static int subdev_log_status(struct v4l2_subdev *sd)
drivers/media/pci/ivtv/ivtv-gpio.c
269
struct ivtv *itv = sd_to_ivtv(sd);
drivers/media/pci/ivtv/ivtv-gpio.c
274
v4l2_ctrl_handler_log_status(&itv->hdl_gpio, sd->name);
drivers/media/pci/ivtv/ivtv-gpio.c
278
static int subdev_s_video_routing(struct v4l2_subdev *sd,
drivers/media/pci/ivtv/ivtv-gpio.c
281
struct ivtv *itv = sd_to_ivtv(sd);
drivers/media/pci/ivtv/ivtv-i2c.c
244
struct v4l2_subdev *sd;
drivers/media/pci/ivtv/ivtv-i2c.c
256
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, adap, type, 0,
drivers/media/pci/ivtv/ivtv-i2c.c
258
if (sd)
drivers/media/pci/ivtv/ivtv-i2c.c
259
sd->grp_id = 1 << idx;
drivers/media/pci/ivtv/ivtv-i2c.c
260
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, adap, type, 0,
drivers/media/pci/ivtv/ivtv-i2c.c
262
if (sd)
drivers/media/pci/ivtv/ivtv-i2c.c
263
sd->grp_id = 1 << idx;
drivers/media/pci/ivtv/ivtv-i2c.c
264
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, adap, type, 0,
drivers/media/pci/ivtv/ivtv-i2c.c
266
if (sd)
drivers/media/pci/ivtv/ivtv-i2c.c
267
sd->grp_id = 1 << idx;
drivers/media/pci/ivtv/ivtv-i2c.c
268
return sd ? 0 : -1;
drivers/media/pci/ivtv/ivtv-i2c.c
280
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
drivers/media/pci/ivtv/ivtv-i2c.c
292
sd = v4l2_i2c_new_subdev_board(&itv->v4l2_dev, adap,
drivers/media/pci/ivtv/ivtv-i2c.c
295
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
drivers/media/pci/ivtv/ivtv-i2c.c
298
if (sd)
drivers/media/pci/ivtv/ivtv-i2c.c
299
sd->grp_id = 1 << idx;
drivers/media/pci/ivtv/ivtv-i2c.c
300
return sd ? 0 : -1;
drivers/media/pci/ivtv/ivtv-i2c.c
306
struct v4l2_subdev *sd;
drivers/media/pci/ivtv/ivtv-i2c.c
309
v4l2_device_for_each_subdev(sd, &itv->v4l2_dev) {
drivers/media/pci/ivtv/ivtv-i2c.c
310
if (sd->grp_id == hw) {
drivers/media/pci/ivtv/ivtv-i2c.c
311
result = sd;
drivers/media/pci/ivtv/ivtv-vbi.c
186
const int sd = sizeof(mpeg_hdr_data); /* start of vbi data */
drivers/media/pci/ivtv/ivtv-vbi.c
204
dst[sd + 12 + line * 43] =
drivers/media/pci/ivtv/ivtv-vbi.c
206
memcpy(dst + sd + 12 + line * 43 + 1, itv->vbi.sliced_data[i].data, 42);
drivers/media/pci/ivtv/ivtv-vbi.c
214
memcpy(dst + sd, "ITV0", 4);
drivers/media/pci/ivtv/ivtv-vbi.c
215
memmove(dst + sd + 4, dst + sd + 12, line * 43);
drivers/media/pci/ivtv/ivtv-vbi.c
218
memcpy(dst + sd, "itv0", 4);
drivers/media/pci/ivtv/ivtv-vbi.c
221
memcpy(dst + sd + 4, &linemask[0], 8);
drivers/media/pci/ivtv/ivtv-vbi.c
231
itv->vbi.sliced_mpeg_size[idx] = sd + size;
drivers/media/pci/saa7134/saa7134-core.c
1154
struct v4l2_subdev *sd;
drivers/media/pci/saa7134/saa7134-core.c
1156
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
drivers/media/pci/saa7134/saa7134-core.c
1159
if (sd) {
drivers/media/pci/saa7134/saa7134-go7007.c
380
static int saa7134_go7007_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
drivers/media/pci/saa7134/saa7134-go7007.c
383
struct saa7134_go7007 *saa = container_of(sd, struct saa7134_go7007, sd);
drivers/media/pci/saa7134/saa7134-go7007.c
409
struct v4l2_subdev *sd;
drivers/media/pci/saa7134/saa7134-go7007.c
431
sd = &saa->sd;
drivers/media/pci/saa7134/saa7134-go7007.c
432
v4l2_subdev_init(sd, &saa7134_go7007_sd_ops);
drivers/media/pci/saa7134/saa7134-go7007.c
433
v4l2_set_subdevdata(sd, saa);
drivers/media/pci/saa7134/saa7134-go7007.c
434
strscpy(sd->name, "saa7134-go7007", sizeof(sd->name));
drivers/media/pci/saa7134/saa7134-go7007.c
455
if (v4l2_device_register_subdev(&go->v4l2_dev, sd) < 0)
drivers/media/pci/saa7134/saa7134-go7007.c
489
v4l2_device_unregister_subdev(&saa->sd);
drivers/media/pci/saa7134/saa7134-go7007.c
51
struct v4l2_subdev sd;
drivers/media/pci/zoran/zoran_card.c
1150
static void zoran_subdev_notify(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
drivers/media/pci/zoran/zoran_card.c
1152
struct zoran *zr = to_zoran(sd->v4l2_dev);
drivers/media/platform/amlogic/c3/isp/c3-isp-capture.c
511
struct v4l2_subdev *sd =
drivers/media/platform/amlogic/c3/isp/c3-isp-capture.c
520
ret = v4l2_subdev_call_state_active(sd, pad, get_fmt, &src_fmt);
drivers/media/platform/amlogic/c3/isp/c3-isp-capture.c
641
ret = v4l2_subdev_enable_streams(&cap->rsz->sd, C3_ISP_RSZ_PAD_SOURCE,
drivers/media/platform/amlogic/c3/isp/c3-isp-capture.c
667
v4l2_subdev_disable_streams(&cap->rsz->sd, C3_ISP_RSZ_PAD_SOURCE,
drivers/media/platform/amlogic/c3/isp/c3-isp-common.h
155
struct v4l2_subdev sd;
drivers/media/platform/amlogic/c3/isp/c3-isp-common.h
173
struct v4l2_subdev sd;
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
291
for_each_media_entity_data_link(&core->sd.entity, link) {
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
302
static int c3_isp_core_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
306
struct c3_isp_core *core = v4l2_get_subdevdata(sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
337
static int c3_isp_core_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
341
struct c3_isp_core *core = v4l2_get_subdevdata(sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
359
static int c3_isp_core_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
463
static int c3_isp_core_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
480
static int c3_isp_core_init_state(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
527
static int c3_isp_core_subscribe_event(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
583
v4l2_event_queue(isp->core.sd.devnode, &event);
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
589
struct v4l2_subdev *sd = &core->sd;
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
592
v4l2_subdev_init(sd, &c3_isp_core_subdev_ops);
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
593
sd->owner = THIS_MODULE;
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
594
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
595
sd->internal_ops = &c3_isp_core_internal_ops;
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
596
snprintf(sd->name, sizeof(sd->name), "%s", C3_ISP_CORE_SUBDEV_NAME);
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
598
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
599
sd->entity.ops = &c3_isp_core_entity_ops;
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
602
sd->dev = isp->dev;
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
603
v4l2_set_subdevdata(sd, core);
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
611
ret = media_entity_pads_init(&sd->entity, C3_ISP_CORE_PAD_MAX,
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
616
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
620
ret = v4l2_device_register_subdev(&isp->v4l2_dev, sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
627
v4l2_subdev_cleanup(sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
629
media_entity_cleanup(&sd->entity);
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
636
struct v4l2_subdev *sd = &core->sd;
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
638
v4l2_device_unregister_subdev(sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
639
v4l2_subdev_cleanup(sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c
640
media_entity_cleanup(&sd->entity);
drivers/media/platform/amlogic/c3/isp/c3-isp-dev.c
100
&isp->core.sd.entity.pads[C3_ISP_CORE_PAD_SINK_VIDEO];
drivers/media/platform/amlogic/c3/isp/c3-isp-dev.c
102
return v4l2_create_fwnode_links_to_pad(sd, sink, MEDIA_LNK_FL_ENABLED |
drivers/media/platform/amlogic/c3/isp/c3-isp-dev.c
199
media_entity_remove_links(&isp->core.sd.entity);
drivers/media/platform/amlogic/c3/isp/c3-isp-dev.c
202
media_entity_remove_links(&isp->resizers[i].sd.entity);
drivers/media/platform/amlogic/c3/isp/c3-isp-dev.c
214
ret = media_create_pad_link(&isp->resizers[i].sd.entity,
drivers/media/platform/amlogic/c3/isp/c3-isp-dev.c
225
ret = media_create_pad_link(&isp->core.sd.entity,
drivers/media/platform/amlogic/c3/isp/c3-isp-dev.c
227
&isp->resizers[i].sd.entity,
drivers/media/platform/amlogic/c3/isp/c3-isp-dev.c
237
ret = media_create_pad_link(&isp->core.sd.entity,
drivers/media/platform/amlogic/c3/isp/c3-isp-dev.c
247
&isp->core.sd.entity,
drivers/media/platform/amlogic/c3/isp/c3-isp-dev.c
94
struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
497
static int c3_isp_rsz_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
501
struct c3_isp_resizer *rsz = v4l2_get_subdevdata(sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
511
static int c3_isp_rsz_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
515
struct c3_isp_resizer *rsz = v4l2_get_subdevdata(sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
522
static int c3_isp_rsz_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
623
static int c3_isp_rsz_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
635
static int c3_isp_rsz_get_selection(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
676
static int c3_isp_rsz_set_selection(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
746
static int c3_isp_rsz_init_state(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
813
struct v4l2_subdev *sd = &rsz->sd;
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
816
v4l2_subdev_init(sd, &c3_isp_rsz_subdev_ops);
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
817
sd->owner = THIS_MODULE;
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
818
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
819
sd->internal_ops = &c3_isp_rsz_internal_ops;
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
820
snprintf(sd->name, sizeof(sd->name), "c3-isp-resizer%u", rsz->id);
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
822
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER;
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
823
sd->entity.ops = &c3_isp_rsz_entity_ops;
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
825
sd->dev = rsz->isp->dev;
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
826
v4l2_set_subdevdata(sd, rsz);
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
830
ret = media_entity_pads_init(&sd->entity, C3_ISP_RSZ_PAD_MAX,
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
835
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
839
ret = v4l2_device_register_subdev(&rsz->isp->v4l2_dev, sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
846
v4l2_subdev_cleanup(sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
848
media_entity_cleanup(&sd->entity);
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
854
struct v4l2_subdev *sd = &rsz->sd;
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
856
v4l2_device_unregister_subdev(sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
857
v4l2_subdev_cleanup(sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
858
media_entity_cleanup(&sd->entity);
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c
870
rsz->src_sd = &isp->core.sd;
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
211
struct v4l2_subdev sd;
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
439
static int c3_mipi_adap_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
443
struct c3_adap_device *adap = v4l2_get_subdevdata(sd);
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
477
static int c3_mipi_adap_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
481
struct c3_adap_device *adap = v4l2_get_subdevdata(sd);
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
496
static int c3_mipi_adap_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
523
static int c3_mipi_adap_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
531
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
557
static int c3_mipi_adap_init_state(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
630
struct v4l2_subdev *sd = &adap->sd;
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
633
v4l2_subdev_init(sd, &c3_mipi_adap_subdev_ops);
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
634
sd->owner = THIS_MODULE;
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
635
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
636
sd->internal_ops = &c3_mipi_adap_internal_ops;
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
637
snprintf(sd->name, sizeof(sd->name), "%s", MIPI_ADAP_SUBDEV_NAME);
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
639
sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
640
sd->entity.ops = &c3_mipi_adap_entity_ops;
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
642
sd->dev = adap->dev;
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
643
v4l2_set_subdevdata(sd, adap);
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
647
ret = media_entity_pads_init(&sd->entity, C3_MIPI_ADAP_PAD_MAX,
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
652
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
654
media_entity_cleanup(&sd->entity);
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
663
v4l2_subdev_cleanup(&adap->sd);
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
664
media_entity_cleanup(&adap->sd.entity);
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
669
struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
672
struct c3_adap_device *adap = v4l2_get_subdevdata(notifier->sd);
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
673
struct media_pad *sink = &adap->sd.entity.pads[C3_MIPI_ADAP_PAD_SINK];
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
675
return v4l2_create_fwnode_links_to_pad(sd, sink, MEDIA_LNK_FL_ENABLED |
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
689
v4l2_async_subdev_nf_init(&adap->notifier, &adap->sd);
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
708
ret = v4l2_async_register_subdev(&adap->sd);
drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
727
v4l2_async_unregister_subdev(&adap->sd);
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
253
struct v4l2_subdev sd;
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
416
static int c3_mipi_csi_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
420
struct c3_csi_device *csi = v4l2_get_subdevdata(sd);
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
447
static int c3_mipi_csi_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
451
struct c3_csi_device *csi = v4l2_get_subdevdata(sd);
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
466
static int c3_mipi_csi_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
493
static int c3_mipi_csi_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
501
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
533
static int c3_mipi_csi_init_state(struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
606
struct v4l2_subdev *sd = &csi->sd;
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
609
v4l2_subdev_init(sd, &c3_mipi_csi_subdev_ops);
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
610
sd->owner = THIS_MODULE;
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
611
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
612
sd->internal_ops = &c3_mipi_csi_internal_ops;
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
613
snprintf(sd->name, sizeof(sd->name), "%s", MIPI_CSI2_SUBDEV_NAME);
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
615
sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
616
sd->entity.ops = &c3_mipi_csi_entity_ops;
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
618
sd->dev = csi->dev;
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
619
v4l2_set_subdevdata(sd, csi);
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
623
ret = media_entity_pads_init(&sd->entity, C3_MIPI_CSI2_PAD_MAX,
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
628
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
630
media_entity_cleanup(&sd->entity);
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
639
v4l2_subdev_cleanup(&csi->sd);
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
640
media_entity_cleanup(&csi->sd.entity);
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
645
struct v4l2_subdev *sd,
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
648
struct c3_csi_device *csi = v4l2_get_subdevdata(notifier->sd);
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
649
struct media_pad *sink = &csi->sd.entity.pads[C3_MIPI_CSI2_PAD_SINK];
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
651
return v4l2_create_fwnode_links_to_pad(sd, sink, MEDIA_LNK_FL_ENABLED |
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
668
v4l2_async_subdev_nf_init(&csi->notifier, &csi->sd);
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
693
ret = v4l2_async_register_subdev(&csi->sd);
drivers/media/platform/amlogic/c3/mipi-csi2/c3-mipi-csi2.c
712
v4l2_async_unregister_subdev(&csi->sd);
drivers/media/platform/arm/mali-c55/mali-c55-capture.c
284
struct v4l2_subdev *sd =
drivers/media/platform/arm/mali-c55/mali-c55-capture.c
294
ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &sd_fmt);
drivers/media/platform/arm/mali-c55/mali-c55-capture.c
607
ret = v4l2_subdev_enable_streams(&rsz->sd, MALI_C55_RSZ_SOURCE_PAD,
drivers/media/platform/arm/mali-c55/mali-c55-capture.c
613
ret = v4l2_subdev_enable_streams(&mali_c55->isp.sd,
drivers/media/platform/arm/mali-c55/mali-c55-capture.c
623
v4l2_subdev_disable_streams(&rsz->sd, MALI_C55_RSZ_SOURCE_PAD, BIT(0));
drivers/media/platform/arm/mali-c55/mali-c55-capture.c
645
if (v4l2_subdev_is_streaming(&isp->sd))
drivers/media/platform/arm/mali-c55/mali-c55-capture.c
646
v4l2_subdev_disable_streams(&isp->sd,
drivers/media/platform/arm/mali-c55/mali-c55-capture.c
651
v4l2_subdev_disable_streams(&rsz->sd, MALI_C55_RSZ_SOURCE_PAD, BIT(0));
drivers/media/platform/arm/mali-c55/mali-c55-common.h
63
struct v4l2_subdev sd;
drivers/media/platform/arm/mali-c55/mali-c55-common.h
73
struct v4l2_subdev sd;
drivers/media/platform/arm/mali-c55/mali-c55-common.h
99
struct v4l2_subdev sd;
drivers/media/platform/arm/mali-c55/mali-c55-core.c
207
media_entity_remove_links(&mali_c55->tpg.sd.entity);
drivers/media/platform/arm/mali-c55/mali-c55-core.c
208
media_entity_remove_links(&mali_c55->isp.sd.entity);
drivers/media/platform/arm/mali-c55/mali-c55-core.c
211
media_entity_remove_links(&mali_c55->resizers[i].sd.entity);
drivers/media/platform/arm/mali-c55/mali-c55-core.c
222
ret = media_create_pad_link(&mali_c55->tpg.sd.entity, 0,
drivers/media/platform/arm/mali-c55/mali-c55-core.c
223
&mali_c55->isp.sd.entity,
drivers/media/platform/arm/mali-c55/mali-c55-core.c
231
ret = media_create_pad_link(&mali_c55->isp.sd.entity,
drivers/media/platform/arm/mali-c55/mali-c55-core.c
233
&mali_c55->resizers[MALI_C55_RSZ_FR].sd.entity,
drivers/media/platform/arm/mali-c55/mali-c55-core.c
242
ret = media_create_pad_link(&mali_c55->isp.sd.entity,
drivers/media/platform/arm/mali-c55/mali-c55-core.c
244
&mali_c55->resizers[MALI_C55_RSZ_FR].sd.entity,
drivers/media/platform/arm/mali-c55/mali-c55-core.c
253
ret = media_create_pad_link(&mali_c55->resizers[0].sd.entity,
drivers/media/platform/arm/mali-c55/mali-c55-core.c
265
ret = media_create_pad_link(&mali_c55->isp.sd.entity,
drivers/media/platform/arm/mali-c55/mali-c55-core.c
267
&mali_c55->resizers[MALI_C55_RSZ_DS].sd.entity,
drivers/media/platform/arm/mali-c55/mali-c55-core.c
276
ret = media_create_pad_link(&mali_c55->resizers[1].sd.entity,
drivers/media/platform/arm/mali-c55/mali-c55-core.c
287
ret = media_create_pad_link(&mali_c55->isp.sd.entity,
drivers/media/platform/arm/mali-c55/mali-c55-core.c
298
&mali_c55->isp.sd.entity,
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
175
static int mali_c55_isp_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
200
static int mali_c55_isp_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
232
static int mali_c55_isp_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
247
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
294
static int mali_c55_isp_get_selection(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
307
static int mali_c55_isp_set_selection(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
345
static int mali_c55_isp_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
349
struct mali_c55_isp *isp = container_of(sd, struct mali_c55_isp, sd);
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
387
static int mali_c55_isp_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
391
struct mali_c55_isp *isp = container_of(sd, struct mali_c55_isp, sd);
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
426
v4l2_event_queue(mali_c55->isp.sd.devnode, &event);
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
430
mali_c55_isp_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
453
static int mali_c55_isp_init_state(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
595
mali_c55->isp.sd.ctrl_handler = handler;
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
603
struct v4l2_subdev *sd = &isp->sd;
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
608
v4l2_subdev_init(sd, &mali_c55_isp_ops);
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
609
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
610
sd->entity.ops = &mali_c55_isp_media_ops;
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
611
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_ISP;
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
612
sd->internal_ops = &mali_c55_isp_internal_ops;
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
613
strscpy(sd->name, MALI_C55_DRIVER_NAME " isp", sizeof(sd->name));
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
622
ret = media_entity_pads_init(&sd->entity, MALI_C55_ISP_NUM_PADS,
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
631
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
635
ret = v4l2_device_register_subdev(&mali_c55->v4l2_dev, sd);
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
644
v4l2_subdev_cleanup(sd);
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
648
media_entity_cleanup(&sd->entity);
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
662
v4l2_device_unregister_subdev(&isp->sd);
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
663
v4l2_subdev_cleanup(&isp->sd);
drivers/media/platform/arm/mali-c55/mali-c55-isp.c
664
media_entity_cleanup(&isp->sd.entity);
drivers/media/platform/arm/mali-c55/mali-c55-params.c
643
ret = v4l2_subdev_enable_streams(&mali_c55->isp.sd,
drivers/media/platform/arm/mali-c55/mali-c55-params.c
669
if (v4l2_subdev_is_streaming(&isp->sd))
drivers/media/platform/arm/mali-c55/mali-c55-params.c
670
v4l2_subdev_disable_streams(&isp->sd,
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1011
static int mali_c55_rsz_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1034
static int mali_c55_rsz_init_state(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1037
struct mali_c55_resizer *rsz = sd_to_mali_c55_rsz(sd);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1053
return __mali_c55_rsz_set_routing(sd, state, &routing);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1064
struct v4l2_subdev *sd = &rsz->sd;
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1069
v4l2_subdev_init(sd, &mali_c55_resizer_ops);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1070
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_STREAMS;
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1071
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER;
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1072
sd->internal_ops = &mali_c55_resizer_internal_ops;
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1084
snprintf(sd->name, sizeof(sd->name), "%s resizer fr",
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1091
snprintf(sd->name, sizeof(sd->name), "%s resizer ds",
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1095
ret = media_entity_pads_init(&sd->entity, num_pads, rsz->pads);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1099
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1103
ret = v4l2_device_register_subdev(&mali_c55->v4l2_dev, sd);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1113
v4l2_subdev_cleanup(sd);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1115
media_entity_cleanup(&sd->entity);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1125
v4l2_device_unregister_subdev(&rsz->sd);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1126
v4l2_subdev_cleanup(&rsz->sd);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
1127
media_entity_cleanup(&rsz->sd.entity);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
24
sd_to_mali_c55_rsz(struct v4l2_subdev *sd)
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
26
return container_of(sd, struct mali_c55_resizer, sd);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
508
static int __mali_c55_rsz_set_routing(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
512
struct mali_c55_resizer *rsz = sd_to_mali_c55_rsz(sd);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
520
ret = v4l2_subdev_routing_validate(sd, routing, 0);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
539
ret = v4l2_subdev_set_routing(sd, state, routing);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
586
static int mali_c55_rsz_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
647
static int mali_c55_rsz_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
717
static int mali_c55_rsz_set_sink_fmt(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
775
static int mali_c55_rsz_set_source_fmt(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
814
static int mali_c55_rsz_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
829
return mali_c55_rsz_set_sink_fmt(sd, state, format);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
831
return mali_c55_rsz_set_source_fmt(sd, state, format);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
834
static int mali_c55_rsz_get_selection(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
852
static int mali_c55_rsz_set_crop(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
856
struct mali_c55_resizer *rsz = sd_to_mali_c55_rsz(sd);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
865
v4l2_subdev_is_streaming(sd)) {
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
910
static int mali_c55_rsz_set_compose(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
914
struct mali_c55_resizer *rsz = sd_to_mali_c55_rsz(sd);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
924
v4l2_subdev_is_streaming(sd))
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
958
static int mali_c55_rsz_set_selection(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
966
return mali_c55_rsz_set_crop(sd, state, sel);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
969
return mali_c55_rsz_set_compose(sd, state, sel);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
974
static int mali_c55_rsz_set_routing(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
980
media_entity_is_streaming(&sd->entity))
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
983
return __mali_c55_rsz_set_routing(sd, state, routing);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
986
static int mali_c55_rsz_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c
990
struct mali_c55_resizer *rsz = sd_to_mali_c55_rsz(sd);
drivers/media/platform/arm/mali-c55/mali-c55-stats.c
158
ret = v4l2_subdev_enable_streams(&mali_c55->isp.sd,
drivers/media/platform/arm/mali-c55/mali-c55-stats.c
184
if (v4l2_subdev_is_streaming(&isp->sd))
drivers/media/platform/arm/mali-c55/mali-c55-stats.c
185
v4l2_subdev_disable_streams(&isp->sd,
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
145
static int mali_c55_tpg_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
157
static int mali_c55_tpg_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
182
static int mali_c55_tpg_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
186
struct mali_c55_tpg *tpg = container_of(sd, struct mali_c55_tpg, sd);
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
222
static int mali_c55_tpg_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
226
struct mali_c55_tpg *tpg = container_of(sd, struct mali_c55_tpg, sd);
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
238
__v4l2_ctrl_handler_setup(sd->ctrl_handler);
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
250
static int mali_c55_tpg_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
254
struct mali_c55_tpg *tpg = container_of(sd, struct mali_c55_tpg, sd);
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
284
static int mali_c55_tpg_init_state(struct v4l2_subdev *sd,
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
356
mali_c55->tpg.sd.ctrl_handler = &ctrls->handler;
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
357
mali_c55->tpg.sd.state_lock = ctrls->handler.lock;
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
365
struct v4l2_subdev *sd = &tpg->sd;
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
369
v4l2_subdev_init(sd, &mali_c55_tpg_ops);
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
370
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
371
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
372
sd->internal_ops = &mali_c55_tpg_internal_ops;
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
373
strscpy(sd->name, MALI_C55_DRIVER_NAME " tpg", sizeof(sd->name));
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
376
ret = media_entity_pads_init(&sd->entity, 1, pad);
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
390
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
394
ret = v4l2_device_register_subdev(&mali_c55->v4l2_dev, sd);
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
417
v4l2_subdev_cleanup(sd);
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
421
media_entity_cleanup(&sd->entity);
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
433
v4l2_device_unregister_subdev(&tpg->sd);
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
435
v4l2_subdev_cleanup(&tpg->sd);
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c
436
media_entity_cleanup(&tpg->sd.entity);
drivers/media/platform/atmel/atmel-isi.c
1119
struct v4l2_subdev *sd,
drivers/media/platform/atmel/atmel-isi.c
590
.sd = isi->entity.subdev,
drivers/media/platform/atmel/atmel-isi.c
878
struct v4l2_subdev *sd = isi->entity.subdev;
drivers/media/platform/atmel/atmel-isi.c
891
ret = v4l2_subdev_call(sd, core, s_power, 1);
drivers/media/platform/atmel/atmel-isi.c
897
v4l2_subdev_call(sd, core, s_power, 0);
drivers/media/platform/atmel/atmel-isi.c
909
struct v4l2_subdev *sd = isi->entity.subdev;
drivers/media/platform/atmel/atmel-isi.c
920
v4l2_subdev_call(sd, core, s_power, 0);
drivers/media/platform/broadcom/bcm2835-unicam.c
1174
static int __unicam_subdev_set_routing(struct v4l2_subdev *sd,
drivers/media/platform/broadcom/bcm2835-unicam.c
1181
ret = v4l2_subdev_routing_validate(sd, routing,
drivers/media/platform/broadcom/bcm2835-unicam.c
1186
ret = v4l2_subdev_set_routing(sd, state, routing);
drivers/media/platform/broadcom/bcm2835-unicam.c
1210
static int unicam_subdev_init_state(struct v4l2_subdev *sd,
drivers/media/platform/broadcom/bcm2835-unicam.c
1230
return __unicam_subdev_set_routing(sd, state, &routing);
drivers/media/platform/broadcom/bcm2835-unicam.c
1233
static int unicam_subdev_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/broadcom/bcm2835-unicam.c
1279
static int unicam_subdev_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/broadcom/bcm2835-unicam.c
1333
static int unicam_subdev_set_format(struct v4l2_subdev *sd,
drivers/media/platform/broadcom/bcm2835-unicam.c
1337
struct unicam_device *unicam = sd_to_unicam_device(sd);
drivers/media/platform/broadcom/bcm2835-unicam.c
1349
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/platform/broadcom/bcm2835-unicam.c
1407
static int unicam_subdev_set_routing(struct v4l2_subdev *sd,
drivers/media/platform/broadcom/bcm2835-unicam.c
1412
struct unicam_device *unicam = sd_to_unicam_device(sd);
drivers/media/platform/broadcom/bcm2835-unicam.c
1417
return __unicam_subdev_set_routing(sd, state, routing);
drivers/media/platform/broadcom/bcm2835-unicam.c
1420
static int unicam_sd_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/broadcom/bcm2835-unicam.c
1424
struct unicam_device *unicam = sd_to_unicam_device(sd);
drivers/media/platform/broadcom/bcm2835-unicam.c
1457
static int unicam_sd_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/broadcom/bcm2835-unicam.c
1461
struct unicam_device *unicam = sd_to_unicam_device(sd);
drivers/media/platform/broadcom/bcm2835-unicam.c
1507
struct v4l2_subdev *sd = &unicam->subdev.sd;
drivers/media/platform/broadcom/bcm2835-unicam.c
1510
v4l2_subdev_init(sd, &unicam_subdev_ops);
drivers/media/platform/broadcom/bcm2835-unicam.c
1511
sd->internal_ops = &unicam_subdev_internal_ops;
drivers/media/platform/broadcom/bcm2835-unicam.c
1512
v4l2_set_subdevdata(sd, unicam);
drivers/media/platform/broadcom/bcm2835-unicam.c
1514
sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/platform/broadcom/bcm2835-unicam.c
1515
sd->entity.ops = &unicam_subdev_media_ops;
drivers/media/platform/broadcom/bcm2835-unicam.c
1516
sd->dev = unicam->dev;
drivers/media/platform/broadcom/bcm2835-unicam.c
1517
sd->owner = THIS_MODULE;
drivers/media/platform/broadcom/bcm2835-unicam.c
1518
sd->flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_STREAMS;
drivers/media/platform/broadcom/bcm2835-unicam.c
1520
strscpy(sd->name, "unicam", sizeof(sd->name));
drivers/media/platform/broadcom/bcm2835-unicam.c
1526
ret = media_entity_pads_init(&sd->entity, ARRAY_SIZE(unicam->subdev.pads),
drivers/media/platform/broadcom/bcm2835-unicam.c
1534
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/broadcom/bcm2835-unicam.c
1540
ret = v4l2_device_register_subdev(&unicam->v4l2_dev, sd);
drivers/media/platform/broadcom/bcm2835-unicam.c
1549
v4l2_subdev_cleanup(sd);
drivers/media/platform/broadcom/bcm2835-unicam.c
1551
media_entity_cleanup(&sd->entity);
drivers/media/platform/broadcom/bcm2835-unicam.c
1557
v4l2_subdev_cleanup(&unicam->subdev.sd);
drivers/media/platform/broadcom/bcm2835-unicam.c
1558
media_entity_cleanup(&unicam->subdev.sd.entity);
drivers/media/platform/broadcom/bcm2835-unicam.c
1701
if (pad->entity != &unicam->subdev.sd.entity)
drivers/media/platform/broadcom/bcm2835-unicam.c
1755
ret = v4l2_subdev_enable_streams(&unicam->subdev.sd,
drivers/media/platform/broadcom/bcm2835-unicam.c
1764
ret = v4l2_subdev_enable_streams(&unicam->subdev.sd,
drivers/media/platform/broadcom/bcm2835-unicam.c
1776
v4l2_subdev_disable_streams(&unicam->subdev.sd,
drivers/media/platform/broadcom/bcm2835-unicam.c
1795
v4l2_subdev_disable_streams(&unicam->subdev.sd,
drivers/media/platform/broadcom/bcm2835-unicam.c
1799
v4l2_subdev_disable_streams(&unicam->subdev.sd,
drivers/media/platform/broadcom/bcm2835-unicam.c
212
struct v4l2_subdev sd;
drivers/media/platform/broadcom/bcm2835-unicam.c
2130
struct v4l2_subdev *sd =
drivers/media/platform/broadcom/bcm2835-unicam.c
2139
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/broadcom/bcm2835-unicam.c
2321
ret = media_create_pad_link(&unicam->subdev.sd.entity,
drivers/media/platform/broadcom/bcm2835-unicam.c
243
sd_to_unicam_device(struct v4l2_subdev *sd)
drivers/media/platform/broadcom/bcm2835-unicam.c
245
return container_of(sd, struct unicam_device, subdev.sd);
drivers/media/platform/cadence/cdns-csi2rx.c
473
static int csi2rx_log_status(struct v4l2_subdev *sd)
drivers/media/platform/cadence/cdns-csi2rx.c
475
struct csi2rx_priv *csi2rx = v4l2_subdev_to_csi2rx(sd);
drivers/media/platform/cadence/cdns-csi2rx.c
643
struct v4l2_subdev *subdev = notifier->sd;
drivers/media/platform/microchip/microchip-isc-base.c
1039
return v4l2_g_parm_cap(video_devdata(file), isc->current_subdev->sd, a);
drivers/media/platform/microchip/microchip-isc-base.c
1046
return v4l2_s_parm_cap(video_devdata(file), isc->current_subdev->sd, a);
drivers/media/platform/microchip/microchip-isc-base.c
1111
struct v4l2_subdev *sd = isc->current_subdev->sd;
drivers/media/platform/microchip/microchip-isc-base.c
1124
ret = v4l2_subdev_call(sd, core, s_power, 1);
drivers/media/platform/microchip/microchip-isc-base.c
1132
v4l2_subdev_call(sd, core, s_power, 0);
drivers/media/platform/microchip/microchip-isc-base.c
1144
struct v4l2_subdev *sd = isc->current_subdev->sd;
drivers/media/platform/microchip/microchip-isc-base.c
1155
v4l2_subdev_call(sd, core, s_power, 0);
drivers/media/platform/microchip/microchip-isc-base.c
1686
subdev_entity->sd = subdev;
drivers/media/platform/microchip/microchip-isc-base.c
343
ret = v4l2_subdev_call(isc->current_subdev->sd, video, s_stream, 1);
drivers/media/platform/microchip/microchip-isc-base.c
387
v4l2_subdev_call(isc->current_subdev->sd, video, s_stream, 0);
drivers/media/platform/microchip/microchip-isc-base.c
431
ret = v4l2_subdev_call(isc->current_subdev->sd, video, s_stream, 0);
drivers/media/platform/microchip/microchip-isc-base.c
918
ret = v4l2_subdev_call(isc->current_subdev->sd, pad, get_fmt, NULL,
drivers/media/platform/microchip/microchip-isc-scaler.c
107
static int isc_scaler_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/microchip/microchip-isc-scaler.c
111
struct isc_device *isc = container_of(sd, struct isc_device, scaler_sd);
drivers/media/platform/microchip/microchip-isc-scaler.c
126
static int isc_scaler_g_sel(struct v4l2_subdev *sd,
drivers/media/platform/microchip/microchip-isc-scaler.c
130
struct isc_device *isc = container_of(sd, struct isc_device, scaler_sd);
drivers/media/platform/microchip/microchip-isc-scaler.c
148
static int isc_scaler_init_state(struct v4l2_subdev *sd,
drivers/media/platform/microchip/microchip-isc-scaler.c
154
struct isc_device *isc = container_of(sd, struct isc_device, scaler_sd);
drivers/media/platform/microchip/microchip-isc-scaler.c
236
ret = media_create_pad_link(&isc->current_subdev->sd->entity,
drivers/media/platform/microchip/microchip-isc-scaler.c
244
isc->current_subdev->sd->entity.name,
drivers/media/platform/microchip/microchip-isc-scaler.c
250
isc->current_subdev->sd->name, isc->remote_pad);
drivers/media/platform/microchip/microchip-isc-scaler.c
28
static int isc_scaler_get_fmt(struct v4l2_subdev *sd,
drivers/media/platform/microchip/microchip-isc-scaler.c
32
struct isc_device *isc = container_of(sd, struct isc_device, scaler_sd);
drivers/media/platform/microchip/microchip-isc-scaler.c
48
static int isc_scaler_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/microchip/microchip-isc-scaler.c
52
struct isc_device *isc = container_of(sd, struct isc_device, scaler_sd);
drivers/media/platform/microchip/microchip-isc.h
46
struct v4l2_subdev *sd;
drivers/media/platform/nxp/imx-mipi-csis.c
1009
return container_of(sdev, struct mipi_csis_device, sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1012
static int mipi_csis_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/nxp/imx-mipi-csis.c
1014
struct mipi_csis_device *csis = sd_to_mipi_csis_device(sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1021
v4l2_subdev_disable_streams(csis->source.sd,
drivers/media/platform/nxp/imx-mipi-csis.c
1033
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1056
ret = v4l2_subdev_enable_streams(csis->source.sd,
drivers/media/platform/nxp/imx-mipi-csis.c
1076
static int mipi_csis_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx-mipi-csis.c
1106
static int mipi_csis_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx-mipi-csis.c
1119
return v4l2_subdev_get_fmt(sd, state, sdformat);
drivers/media/platform/nxp/imx-mipi-csis.c
1180
static int mipi_csis_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/platform/nxp/imx-mipi-csis.c
1191
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1210
static int mipi_csis_init_state(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx-mipi-csis.c
1228
return mipi_csis_set_fmt(sd, state, &fmt);
drivers/media/platform/nxp/imx-mipi-csis.c
1231
static int mipi_csis_log_status(struct v4l2_subdev *sd)
drivers/media/platform/nxp/imx-mipi-csis.c
1233
struct mipi_csis_device *csis = sd_to_mipi_csis_device(sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1242
static int mipi_csis_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
drivers/media/platform/nxp/imx-mipi-csis.c
1290
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/nxp/imx-mipi-csis.c
1291
struct mipi_csis_device *csis = sd_to_mipi_csis_device(sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1304
if (csis->source.sd)
drivers/media/platform/nxp/imx-mipi-csis.c
1307
csis->source.sd = remote_sd;
drivers/media/platform/nxp/imx-mipi-csis.c
1310
csis->source.sd = NULL;
drivers/media/platform/nxp/imx-mipi-csis.c
1334
struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx-mipi-csis.c
1338
struct media_pad *sink = &csis->sd.entity.pads[CSIS_PAD_SINK];
drivers/media/platform/nxp/imx-mipi-csis.c
1340
return v4l2_create_fwnode_links_to_pad(sd, sink, 0);
drivers/media/platform/nxp/imx-mipi-csis.c
1356
v4l2_async_subdev_nf_init(&csis->notifier, &csis->sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1393
return v4l2_async_register_subdev(&csis->sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1402
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/platform/nxp/imx-mipi-csis.c
1403
struct mipi_csis_device *csis = sd_to_mipi_csis_device(sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1417
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/platform/nxp/imx-mipi-csis.c
1418
struct mipi_csis_device *csis = sd_to_mipi_csis_device(sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1445
struct v4l2_subdev *sd = &csis->sd;
drivers/media/platform/nxp/imx-mipi-csis.c
1448
v4l2_subdev_init(sd, &mipi_csis_subdev_ops);
drivers/media/platform/nxp/imx-mipi-csis.c
1449
sd->internal_ops = &mipi_csis_internal_ops;
drivers/media/platform/nxp/imx-mipi-csis.c
1450
sd->owner = THIS_MODULE;
drivers/media/platform/nxp/imx-mipi-csis.c
1451
snprintf(sd->name, sizeof(sd->name), "csis-%s",
drivers/media/platform/nxp/imx-mipi-csis.c
1454
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/platform/nxp/imx-mipi-csis.c
1455
sd->ctrl_handler = NULL;
drivers/media/platform/nxp/imx-mipi-csis.c
1457
sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/platform/nxp/imx-mipi-csis.c
1458
sd->entity.ops = &mipi_csis_entity_ops;
drivers/media/platform/nxp/imx-mipi-csis.c
1460
sd->dev = csis->dev;
drivers/media/platform/nxp/imx-mipi-csis.c
1466
ret = media_entity_pads_init(&sd->entity, CSIS_PADS_NUM, csis->pads);
drivers/media/platform/nxp/imx-mipi-csis.c
1470
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1472
media_entity_cleanup(&sd->entity);
drivers/media/platform/nxp/imx-mipi-csis.c
1549
platform_set_drvdata(pdev, &csis->sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1573
v4l2_subdev_cleanup(&csis->sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1574
media_entity_cleanup(&csis->sd.entity);
drivers/media/platform/nxp/imx-mipi-csis.c
1577
v4l2_async_unregister_subdev(&csis->sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1584
struct v4l2_subdev *sd = platform_get_drvdata(pdev);
drivers/media/platform/nxp/imx-mipi-csis.c
1585
struct mipi_csis_device *csis = sd_to_mipi_csis_device(sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1590
v4l2_async_unregister_subdev(&csis->sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1596
v4l2_subdev_cleanup(&csis->sd);
drivers/media/platform/nxp/imx-mipi-csis.c
1597
media_entity_cleanup(&csis->sd.entity);
drivers/media/platform/nxp/imx-mipi-csis.c
341
struct v4l2_subdev sd;
drivers/media/platform/nxp/imx-mipi-csis.c
346
struct v4l2_subdev *sd;
drivers/media/platform/nxp/imx-mipi-csis.c
787
v4l2_event_queue(csis->sd.devnode, &event);
drivers/media/platform/nxp/imx7-media-csi.c
1415
ret = v4l2_subdev_call_state_active(&csi->sd, pad, get_fmt, &fmt_src);
drivers/media/platform/nxp/imx7-media-csi.c
1461
ret = v4l2_subdev_call(&csi->sd, video, s_stream, 1);
drivers/media/platform/nxp/imx7-media-csi.c
1492
v4l2_subdev_call(&csi->sd, video, s_stream, 0);
drivers/media/platform/nxp/imx7-media-csi.c
1604
struct v4l2_subdev *sd = &csi->sd;
drivers/media/platform/nxp/imx7-media-csi.c
1605
struct v4l2_device *v4l2_dev = sd->v4l2_dev;
drivers/media/platform/nxp/imx7-media-csi.c
1625
ret = media_create_pad_link(&sd->entity, IMX7_CSI_PAD_SRC,
drivers/media/platform/nxp/imx7-media-csi.c
1669
snprintf(vdev->name, sizeof(vdev->name), "%s capture", csi->sd.name);
drivers/media/platform/nxp/imx7-media-csi.c
1709
static int imx7_csi_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/nxp/imx7-media-csi.c
1711
struct imx7_csi *csi = v4l2_get_subdevdata(sd);
drivers/media/platform/nxp/imx7-media-csi.c
1715
sd_state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/nxp/imx7-media-csi.c
1745
static int imx7_csi_init_state(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx7-media-csi.c
1772
static int imx7_csi_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx7-media-csi.c
1849
static void imx7_csi_try_fmt(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx7-media-csi.c
1892
static int imx7_csi_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx7-media-csi.c
1896
struct imx7_csi *csi = v4l2_get_subdevdata(sd);
drivers/media/platform/nxp/imx7-media-csi.c
1906
imx7_csi_try_fmt(sd, sd_state, sdformat, &cc);
drivers/media/platform/nxp/imx7-media-csi.c
1917
imx7_csi_try_fmt(sd, sd_state, &format, &outcc);
drivers/media/platform/nxp/imx7-media-csi.c
1927
static int imx7_csi_pad_link_validate(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx7-media-csi.c
1932
struct imx7_csi *csi = v4l2_get_subdevdata(sd);
drivers/media/platform/nxp/imx7-media-csi.c
1941
ret = v4l2_subdev_link_validate_default(sd, link, source_fmt, sink_fmt);
drivers/media/platform/nxp/imx7-media-csi.c
1982
static int imx7_csi_registered(struct v4l2_subdev *sd)
drivers/media/platform/nxp/imx7-media-csi.c
1984
struct imx7_csi *csi = v4l2_get_subdevdata(sd);
drivers/media/platform/nxp/imx7-media-csi.c
2010
static void imx7_csi_unregistered(struct v4l2_subdev *sd)
drivers/media/platform/nxp/imx7-media-csi.c
2012
struct imx7_csi *csi = v4l2_get_subdevdata(sd);
drivers/media/platform/nxp/imx7-media-csi.c
2053
struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx7-media-csi.c
2057
struct media_pad *sink = &csi->sd.entity.pads[IMX7_CSI_PAD_SINK];
drivers/media/platform/nxp/imx7-media-csi.c
2059
csi->src_sd = sd;
drivers/media/platform/nxp/imx7-media-csi.c
2061
return v4l2_create_fwnode_links_to_pad(sd, sink, MEDIA_LNK_FL_ENABLED |
drivers/media/platform/nxp/imx7-media-csi.c
2121
v4l2_subdev_cleanup(&csi->sd);
drivers/media/platform/nxp/imx7-media-csi.c
2170
v4l2_subdev_init(&csi->sd, &imx7_csi_subdev_ops);
drivers/media/platform/nxp/imx7-media-csi.c
2171
v4l2_set_subdevdata(&csi->sd, csi);
drivers/media/platform/nxp/imx7-media-csi.c
2172
csi->sd.internal_ops = &imx7_csi_internal_ops;
drivers/media/platform/nxp/imx7-media-csi.c
2173
csi->sd.entity.ops = &imx7_csi_entity_ops;
drivers/media/platform/nxp/imx7-media-csi.c
2174
csi->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/platform/nxp/imx7-media-csi.c
2175
csi->sd.dev = csi->dev;
drivers/media/platform/nxp/imx7-media-csi.c
2176
csi->sd.owner = THIS_MODULE;
drivers/media/platform/nxp/imx7-media-csi.c
2177
csi->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/nxp/imx7-media-csi.c
2178
snprintf(csi->sd.name, sizeof(csi->sd.name), "csi");
drivers/media/platform/nxp/imx7-media-csi.c
2184
ret = media_entity_pads_init(&csi->sd.entity, IMX7_CSI_PADS_NUM,
drivers/media/platform/nxp/imx7-media-csi.c
2189
ret = v4l2_subdev_init_finalize(&csi->sd);
drivers/media/platform/nxp/imx7-media-csi.c
2193
ret = v4l2_device_register_subdev(&csi->v4l2_dev, &csi->sd);
drivers/media/platform/nxp/imx7-media-csi.c
2265
v4l2_async_unregister_subdev(&csi->sd);
drivers/media/platform/nxp/imx7-media-csi.c
243
struct v4l2_subdev sd;
drivers/media/platform/nxp/imx7-media-csi.c
483
v4l2_warn(&csi->sd, "consider increasing the CMA area\n");
drivers/media/platform/nxp/imx7-media-csi.c
521
v4l2_warn(&csi->sd, "wait last EOF timeout\n");
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
105
ret = v4l2_device_register_subdev(&pipe->isi->v4l2_dev, &pipe->sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
161
ret = media_create_pad_link(&isi->crossbar.sd.entity,
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
163
&pipe->sd.entity,
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
51
struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
61
dev_dbg(isi->dev, "Bound subdev %s to crossbar input %u\n", sd->name,
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
69
link = device_link_add(isi->dev, sd->dev, DL_FLAG_STATELESS);
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
72
"Failed to create device link to source %s\n", sd->name);
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
76
return v4l2_create_fwnode_links_to_pad(sd, pad, link_flags);
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h
196
struct v4l2_subdev sd;
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h
240
struct v4l2_subdev sd;
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
100
struct mxc_isi_crossbar *xbar = to_isi_crossbar(sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
104
ret = v4l2_subdev_routing_validate(sd, routing,
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
121
return v4l2_subdev_set_routing_with_fmt(sd, state, routing,
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
133
struct v4l2_subdev *sd;
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
163
sd = media_entity_to_v4l2_subdev(pad->entity);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
164
if (!sd) {
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
175
return sd;
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
178
static int mxc_isi_crossbar_init_state(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
181
struct mxc_isi_crossbar *xbar = to_isi_crossbar(sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
206
ret = __mxc_isi_crossbar_set_routing(sd, state, &routing);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
213
static int mxc_isi_crossbar_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
217
struct mxc_isi_crossbar *xbar = to_isi_crossbar(sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
22
static inline struct mxc_isi_crossbar *to_isi_crossbar(struct v4l2_subdev *sd)
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
24
return container_of(sd, struct mxc_isi_crossbar, sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
250
static int mxc_isi_crossbar_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
254
struct mxc_isi_crossbar *xbar = to_isi_crossbar(sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
267
return v4l2_subdev_get_fmt(sd, state, fmt);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
309
static int mxc_isi_crossbar_set_routing(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
315
media_entity_is_streaming(&sd->entity))
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
318
return __mxc_isi_crossbar_set_routing(sd, state, routing);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
321
static int mxc_isi_crossbar_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
325
struct mxc_isi_crossbar *xbar = to_isi_crossbar(sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
367
static int mxc_isi_crossbar_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
371
struct mxc_isi_crossbar *xbar = to_isi_crossbar(sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
433
struct v4l2_subdev *sd = &xbar->sd;
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
440
v4l2_subdev_init(sd, &mxc_isi_crossbar_subdev_ops);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
441
sd->internal_ops = &mxc_isi_crossbar_internal_ops;
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
442
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_STREAMS;
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
443
strscpy(sd->name, "crossbar", sizeof(sd->name));
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
444
sd->dev = isi->dev;
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
446
sd->entity.function = MEDIA_ENT_F_VID_MUX;
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
447
sd->entity.ops = &mxc_isi_cross_entity_ops;
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
473
ret = media_entity_pads_init(&sd->entity, num_pads, xbar->pads);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
477
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
484
media_entity_cleanup(&sd->entity);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
494
media_entity_cleanup(&xbar->sd.entity);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
501
return v4l2_device_register_subdev(&xbar->isi->v4l2_dev, &xbar->sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
96
static int __mxc_isi_crossbar_set_routing(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c
795
&m2m->isi->crossbar.sd.entity,
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
230
static inline struct mxc_isi_pipe *to_isi_pipe(struct v4l2_subdev *sd)
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
232
return container_of(sd, struct mxc_isi_pipe, sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
244
struct v4l2_subdev *sd = &pipe->sd;
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
254
state = v4l2_subdev_lock_and_get_active_state(&xbar->sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
264
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
290
ret = v4l2_subdev_enable_streams(&xbar->sd, xbar->num_sinks + pipe->id,
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
307
ret = v4l2_subdev_disable_streams(&xbar->sd, xbar->num_sinks + pipe->id,
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
344
static int mxc_isi_pipe_init_state(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
347
struct mxc_isi_pipe *pipe = to_isi_pipe(sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
386
static int mxc_isi_pipe_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
394
struct mxc_isi_pipe *pipe = to_isi_pipe(sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
450
static int mxc_isi_pipe_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
454
struct mxc_isi_pipe *pipe = to_isi_pipe(sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
545
static int mxc_isi_pipe_get_selection(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
549
struct mxc_isi_pipe *pipe = to_isi_pipe(sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
604
static int mxc_isi_pipe_set_selection(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
608
struct mxc_isi_pipe *pipe = to_isi_pipe(sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
755
struct v4l2_subdev *sd;
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
771
sd = &pipe->sd;
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
772
v4l2_subdev_init(sd, &mxc_isi_pipe_subdev_ops);
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
773
sd->internal_ops = &mxc_isi_pipe_internal_ops;
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
774
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
775
snprintf(sd->name, sizeof(sd->name), "mxc_isi.%d", pipe->id);
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
776
sd->dev = isi->dev;
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
778
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
779
sd->entity.ops = &mxc_isi_pipe_entity_ops;
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
784
ret = media_entity_pads_init(&sd->entity, MXC_ISI_PIPE_PADS_NUM,
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
789
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
812
media_entity_cleanup(&sd->entity);
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
820
struct v4l2_subdev *sd = &pipe->sd;
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
822
media_entity_cleanup(&sd->entity);
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
833
struct v4l2_subdev *sd = &pipe->sd;
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
838
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
1435
ret = media_create_pad_link(&pipe->sd.entity,
drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
709
struct v4l2_subdev *sd = &video->pipe->sd;
drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
712
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
1020
platform_set_drvdata(pdev, &state->sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
1050
media_entity_cleanup(&state->sd.entity);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
1051
v4l2_subdev_cleanup(&state->sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
1054
v4l2_async_unregister_subdev(&state->sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
1065
struct v4l2_subdev *sd = platform_get_drvdata(pdev);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
1066
struct csi_state *state = mipi_sd_to_csi2_state(sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
1070
v4l2_async_unregister_subdev(&state->sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
1074
media_entity_cleanup(&state->sd.entity);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
1075
v4l2_subdev_cleanup(&state->sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
119
struct v4l2_subdev sd;
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
420
src_pad = media_entity_remote_source_pad_unique(&sd_state->sd->entity);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
423
sd_state->sd->name, src_pad);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
517
return container_of(sdev, struct csi_state, sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
520
static int imx8mq_mipi_csi_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
522
struct csi_state *state = mipi_sd_to_csi2_state(sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
540
sd_state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
567
static int imx8mq_mipi_csi_init_state(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
594
static int imx8mq_mipi_csi_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
624
static int imx8mq_mipi_csi_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
636
return v4l2_subdev_get_fmt(sd, sd_state, sdformat);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
699
struct v4l2_subdev *sd,
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
703
struct media_pad *sink = &state->sd.entity.pads[MIPI_CSI2_PAD_SINK];
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
705
state->src_sd = sd;
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
707
return v4l2_create_fwnode_links_to_pad(sd, sink, MEDIA_LNK_FL_ENABLED |
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
724
v4l2_async_subdev_nf_init(&state->notifier, &state->sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
761
return v4l2_async_register_subdev(&state->sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
770
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
771
struct csi_state *state = mipi_sd_to_csi2_state(sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
786
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
787
struct csi_state *state = mipi_sd_to_csi2_state(sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
798
sd_state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
815
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
816
struct csi_state *state = mipi_sd_to_csi2_state(sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
827
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
828
struct csi_state *state = mipi_sd_to_csi2_state(sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
838
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
839
struct csi_state *state = mipi_sd_to_csi2_state(sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
853
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
854
struct csi_state *state = mipi_sd_to_csi2_state(sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
878
struct v4l2_subdev *sd = &state->sd;
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
881
v4l2_subdev_init(sd, &imx8mq_mipi_csi_subdev_ops);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
882
sd->internal_ops = &imx8mq_mipi_csi_internal_ops;
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
883
sd->owner = THIS_MODULE;
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
884
snprintf(sd->name, sizeof(sd->name), "%s %s",
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
887
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
889
sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
890
sd->entity.ops = &imx8mq_mipi_csi_entity_ops;
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
892
sd->dev = state->dev;
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
898
ret = media_entity_pads_init(&sd->entity, MIPI_CSI2_PADS_NUM,
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
903
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
905
media_entity_cleanup(&sd->entity);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
914
struct v4l2_subdev *sd = dev_get_drvdata(&pdev->dev);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
915
struct csi_state *state = mipi_sd_to_csi2_state(sd);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
922
struct v4l2_subdev *sd = dev_get_drvdata(&pdev->dev);
drivers/media/platform/nxp/imx8mq-mipi-csi2.c
923
struct csi_state *state = mipi_sd_to_csi2_state(sd);
drivers/media/platform/qcom/camss/camss-csid.c
1024
static int csid_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/platform/qcom/camss/camss-csid.c
1037
return csid_set_format(sd, fh ? fh->state : NULL, &format);
drivers/media/platform/qcom/camss/camss-csid.c
1211
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/qcom/camss/camss-csid.c
1212
struct csid_device *csid = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csid.c
1253
struct v4l2_subdev *sd;
drivers/media/platform/qcom/camss/camss-csid.c
1258
sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/qcom/camss/camss-csid.c
1259
csid = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csid.c
1267
sd = media_entity_to_v4l2_subdev(remote->entity);
drivers/media/platform/qcom/camss/camss-csid.c
1268
csiphy = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csid.c
1283
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/qcom/camss/camss-csid.c
1284
struct csid_device *csid = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csid.c
1343
struct v4l2_subdev *sd = &csid->subdev;
drivers/media/platform/qcom/camss/camss-csid.c
1349
v4l2_subdev_init(sd, &csid_v4l2_ops);
drivers/media/platform/qcom/camss/camss-csid.c
1350
sd->internal_ops = &csid_v4l2_internal_ops;
drivers/media/platform/qcom/camss/camss-csid.c
1351
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
drivers/media/platform/qcom/camss/camss-csid.c
1353
snprintf(sd->name, ARRAY_SIZE(sd->name), "%s%d",
drivers/media/platform/qcom/camss/camss-csid.c
1355
v4l2_set_subdevdata(sd, csid);
drivers/media/platform/qcom/camss/camss-csid.c
1379
ret = csid_init_formats(sd, NULL);
drivers/media/platform/qcom/camss/camss-csid.c
1389
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
drivers/media/platform/qcom/camss/camss-csid.c
1390
sd->entity.ops = &csid_media_ops;
drivers/media/platform/qcom/camss/camss-csid.c
1391
ret = media_entity_pads_init(&sd->entity, MSM_CSID_PADS_NUM, pads);
drivers/media/platform/qcom/camss/camss-csid.c
1397
ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/media/platform/qcom/camss/camss-csid.c
1406
media_entity_cleanup(&sd->entity);
drivers/media/platform/qcom/camss/camss-csid.c
678
static int csid_set_power(struct v4l2_subdev *sd, int on)
drivers/media/platform/qcom/camss/camss-csid.c
680
struct csid_device *csid = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csid.c
758
static int csid_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/qcom/camss/camss-csid.c
760
struct csid_device *csid = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csid.c
883
static int csid_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-csid.c
887
struct csid_device *csid = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csid.c
925
static int csid_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-csid.c
929
struct csid_device *csid = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csid.c
963
static int csid_get_format(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-csid.c
967
struct csid_device *csid = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csid.c
987
static int csid_set_format(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-csid.c
991
struct csid_device *csid = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csiphy.c
203
static int csiphy_set_power(struct v4l2_subdev *sd, int on)
drivers/media/platform/qcom/camss/camss-csiphy.c
205
struct csiphy_device *csiphy = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csiphy.c
322
static int csiphy_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/qcom/camss/camss-csiphy.c
324
struct csiphy_device *csiphy = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csiphy.c
410
static int csiphy_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-csiphy.c
414
struct csiphy_device *csiphy = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csiphy.c
443
static int csiphy_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-csiphy.c
447
struct csiphy_device *csiphy = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csiphy.c
481
static int csiphy_get_format(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-csiphy.c
485
struct csiphy_device *csiphy = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csiphy.c
505
static int csiphy_set_format(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-csiphy.c
509
struct csiphy_device *csiphy = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csiphy.c
544
static int csiphy_init_formats(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-csiphy.c
558
return csiphy_set_format(sd, fh ? fh->state : NULL, &format);
drivers/media/platform/qcom/camss/camss-csiphy.c
723
struct v4l2_subdev *sd;
drivers/media/platform/qcom/camss/camss-csiphy.c
730
sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/qcom/camss/camss-csiphy.c
731
csiphy = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csiphy.c
733
sd = media_entity_to_v4l2_subdev(remote->entity);
drivers/media/platform/qcom/camss/camss-csiphy.c
734
csid = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-csiphy.c
782
struct v4l2_subdev *sd = &csiphy->subdev;
drivers/media/platform/qcom/camss/camss-csiphy.c
787
v4l2_subdev_init(sd, &csiphy_v4l2_ops);
drivers/media/platform/qcom/camss/camss-csiphy.c
788
sd->internal_ops = &csiphy_v4l2_internal_ops;
drivers/media/platform/qcom/camss/camss-csiphy.c
789
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/qcom/camss/camss-csiphy.c
790
snprintf(sd->name, ARRAY_SIZE(sd->name), "%s%d",
drivers/media/platform/qcom/camss/camss-csiphy.c
792
v4l2_set_subdevdata(sd, csiphy);
drivers/media/platform/qcom/camss/camss-csiphy.c
794
ret = csiphy_init_formats(sd, NULL);
drivers/media/platform/qcom/camss/camss-csiphy.c
803
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
drivers/media/platform/qcom/camss/camss-csiphy.c
804
sd->entity.ops = &csiphy_media_ops;
drivers/media/platform/qcom/camss/camss-csiphy.c
805
ret = media_entity_pads_init(&sd->entity, MSM_CSIPHY_PADS_NUM, pads);
drivers/media/platform/qcom/camss/camss-csiphy.c
811
ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/media/platform/qcom/camss/camss-csiphy.c
814
media_entity_cleanup(&sd->entity);
drivers/media/platform/qcom/camss/camss-ispif.c
1015
static int ispif_get_format(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-ispif.c
1019
struct ispif_line *line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-ispif.c
1039
static int ispif_set_format(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-ispif.c
1043
struct ispif_line *line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-ispif.c
1075
static int ispif_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/platform/qcom/camss/camss-ispif.c
1088
return ispif_set_format(sd, fh ? fh->state : NULL, &format);
drivers/media/platform/qcom/camss/camss-ispif.c
1270
struct v4l2_subdev *sd;
drivers/media/platform/qcom/camss/camss-ispif.c
1274
sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/qcom/camss/camss-ispif.c
1275
line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-ispif.c
1289
struct v4l2_subdev *sd;
drivers/media/platform/qcom/camss/camss-ispif.c
1292
sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/qcom/camss/camss-ispif.c
1293
line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-ispif.c
1316
struct v4l2_subdev *sd;
drivers/media/platform/qcom/camss/camss-ispif.c
1319
sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/qcom/camss/camss-ispif.c
1320
line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-ispif.c
1324
struct v4l2_subdev *sd;
drivers/media/platform/qcom/camss/camss-ispif.c
1328
sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/qcom/camss/camss-ispif.c
1329
line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-ispif.c
1390
struct v4l2_subdev *sd = &ispif->line[i].subdev;
drivers/media/platform/qcom/camss/camss-ispif.c
1393
v4l2_subdev_init(sd, &ispif_v4l2_ops);
drivers/media/platform/qcom/camss/camss-ispif.c
1394
sd->internal_ops = &ispif_v4l2_internal_ops;
drivers/media/platform/qcom/camss/camss-ispif.c
1395
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/qcom/camss/camss-ispif.c
1396
snprintf(sd->name, ARRAY_SIZE(sd->name), "%s%d",
drivers/media/platform/qcom/camss/camss-ispif.c
1398
v4l2_set_subdevdata(sd, &ispif->line[i]);
drivers/media/platform/qcom/camss/camss-ispif.c
1400
ret = ispif_init_formats(sd, NULL);
drivers/media/platform/qcom/camss/camss-ispif.c
1409
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
drivers/media/platform/qcom/camss/camss-ispif.c
1410
sd->entity.ops = &ispif_media_ops;
drivers/media/platform/qcom/camss/camss-ispif.c
1411
ret = media_entity_pads_init(&sd->entity, MSM_ISPIF_PADS_NUM,
drivers/media/platform/qcom/camss/camss-ispif.c
1419
ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/media/platform/qcom/camss/camss-ispif.c
1423
media_entity_cleanup(&sd->entity);
drivers/media/platform/qcom/camss/camss-ispif.c
1432
struct v4l2_subdev *sd = &ispif->line[i].subdev;
drivers/media/platform/qcom/camss/camss-ispif.c
1434
v4l2_device_unregister_subdev(sd);
drivers/media/platform/qcom/camss/camss-ispif.c
1435
media_entity_cleanup(&sd->entity);
drivers/media/platform/qcom/camss/camss-ispif.c
1456
struct v4l2_subdev *sd = &ispif->line[i].subdev;
drivers/media/platform/qcom/camss/camss-ispif.c
1458
v4l2_device_unregister_subdev(sd);
drivers/media/platform/qcom/camss/camss-ispif.c
1459
media_entity_cleanup(&sd->entity);
drivers/media/platform/qcom/camss/camss-ispif.c
359
static int ispif_set_power(struct v4l2_subdev *sd, int on)
drivers/media/platform/qcom/camss/camss-ispif.c
361
struct ispif_line *line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-ispif.c
802
static int ispif_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/qcom/camss/camss-ispif.c
804
struct ispif_line *line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-ispif.c
944
static int ispif_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-ispif.c
948
struct ispif_line *line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-ispif.c
977
static int ispif_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-ispif.c
981
struct ispif_line *line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-vfe.c
1216
static int vfe_set_power(struct v4l2_subdev *sd, int on)
drivers/media/platform/qcom/camss/camss-vfe.c
1218
struct vfe_line *line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-vfe.c
1242
static int vfe_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/qcom/camss/camss-vfe.c
1244
struct vfe_line *line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-vfe.c
1475
static int vfe_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-vfe.c
1479
struct vfe_line *line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-vfe.c
1509
static int vfe_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-vfe.c
1513
struct vfe_line *line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-vfe.c
1547
static int vfe_get_format(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-vfe.c
1551
struct vfe_line *line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-vfe.c
1563
static int vfe_set_selection(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-vfe.c
1575
static int vfe_set_format(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-vfe.c
1579
struct vfe_line *line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-vfe.c
1610
ret = vfe_set_selection(sd, sd_state, &sel);
drivers/media/platform/qcom/camss/camss-vfe.c
1626
static int vfe_get_selection(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-vfe.c
1630
struct vfe_line *line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-vfe.c
1643
ret = vfe_get_format(sd, sd_state, &fmt);
drivers/media/platform/qcom/camss/camss-vfe.c
1696
static int vfe_set_selection(struct v4l2_subdev *sd,
drivers/media/platform/qcom/camss/camss-vfe.c
1700
struct vfe_line *line = v4l2_get_subdevdata(sd);
drivers/media/platform/qcom/camss/camss-vfe.c
1723
ret = vfe_set_selection(sd, sd_state, &crop);
drivers/media/platform/qcom/camss/camss-vfe.c
1738
ret = vfe_get_format(sd, sd_state, &fmt);
drivers/media/platform/qcom/camss/camss-vfe.c
1744
ret = vfe_set_format(sd, sd_state, &fmt);
drivers/media/platform/qcom/camss/camss-vfe.c
1761
static int vfe_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/platform/qcom/camss/camss-vfe.c
1774
return vfe_set_format(sd, fh ? fh->state : NULL, &format);
drivers/media/platform/qcom/camss/camss-vfe.c
2040
struct v4l2_subdev *sd;
drivers/media/platform/qcom/camss/camss-vfe.c
2049
sd = &vfe->line[i].subdev;
drivers/media/platform/qcom/camss/camss-vfe.c
2053
v4l2_subdev_init(sd, &vfe_v4l2_ops);
drivers/media/platform/qcom/camss/camss-vfe.c
2054
sd->internal_ops = &vfe_v4l2_internal_ops;
drivers/media/platform/qcom/camss/camss-vfe.c
2055
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/qcom/camss/camss-vfe.c
2057
snprintf(sd->name, ARRAY_SIZE(sd->name), "%s%d_%s",
drivers/media/platform/qcom/camss/camss-vfe.c
2060
snprintf(sd->name, ARRAY_SIZE(sd->name), "%s%d_%s%d",
drivers/media/platform/qcom/camss/camss-vfe.c
2063
v4l2_set_subdevdata(sd, &vfe->line[i]);
drivers/media/platform/qcom/camss/camss-vfe.c
2065
ret = vfe_init_formats(sd, NULL);
drivers/media/platform/qcom/camss/camss-vfe.c
2074
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
drivers/media/platform/qcom/camss/camss-vfe.c
2075
sd->entity.ops = &vfe_media_ops;
drivers/media/platform/qcom/camss/camss-vfe.c
2076
ret = media_entity_pads_init(&sd->entity, MSM_VFE_PADS_NUM,
drivers/media/platform/qcom/camss/camss-vfe.c
2083
ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/media/platform/qcom/camss/camss-vfe.c
2110
&sd->entity, MSM_VFE_PAD_SRC,
drivers/media/platform/qcom/camss/camss-vfe.c
2115
sd->entity.name, video_out->vdev.entity.name,
drivers/media/platform/qcom/camss/camss-vfe.c
2127
v4l2_device_unregister_subdev(sd);
drivers/media/platform/qcom/camss/camss-vfe.c
2130
media_entity_cleanup(&sd->entity);
drivers/media/platform/qcom/camss/camss-vfe.c
2134
sd = &vfe->line[i].subdev;
drivers/media/platform/qcom/camss/camss-vfe.c
2138
v4l2_device_unregister_subdev(sd);
drivers/media/platform/qcom/camss/camss-vfe.c
2139
media_entity_cleanup(&sd->entity);
drivers/media/platform/qcom/camss/camss-vfe.c
2157
struct v4l2_subdev *sd = &vfe->line[i].subdev;
drivers/media/platform/qcom/camss/camss-vfe.c
2161
v4l2_device_unregister_subdev(sd);
drivers/media/platform/qcom/camss/camss-vfe.c
2162
media_entity_cleanup(&sd->entity);
drivers/media/platform/qcom/camss/camss.c
4789
struct v4l2_subdev *sd;
drivers/media/platform/qcom/camss/camss.c
4791
list_for_each_entry(sd, &v4l2_dev->subdevs, list) {
drivers/media/platform/qcom/camss/camss.c
4792
struct csiphy_device *csiphy = sd->host_priv;
drivers/media/platform/qcom/camss/camss.c
4801
sensor = &sd->entity;
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
1459
ret = media_create_pad_link(entity, 0, &pispbe->sd.entity,
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
1463
ret = media_create_pad_link(&pispbe->sd.entity, id, entity,
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
1494
struct v4l2_subdev *sd = &pispbe->sd;
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
1497
v4l2_subdev_init(sd, &pispbe_sd_ops);
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
1498
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
1499
sd->owner = THIS_MODULE;
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
1500
sd->dev = pispbe->dev;
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
1501
strscpy(sd->name, PISPBE_NAME, sizeof(sd->name));
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
1508
ret = media_entity_pads_init(&sd->entity, PISPBE_NUM_NODES,
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
1513
ret = v4l2_device_register_subdev(&pispbe->v4l2_dev, sd);
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
1520
media_entity_cleanup(&sd->entity);
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
1582
v4l2_device_unregister_subdev(&pispbe->sd);
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
1583
media_entity_cleanup(&pispbe->sd.entity);
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
1603
v4l2_device_unregister_subdev(&pispbe->sd);
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
1604
media_entity_cleanup(&pispbe->sd.entity);
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
212
struct v4l2_subdev sd;
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
1107
state = v4l2_subdev_get_locked_active_state(&cfe->csi2.sd);
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
1185
state = v4l2_subdev_lock_and_get_active_state(&cfe->csi2.sd);
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
1290
state = v4l2_subdev_lock_and_get_active_state(&cfe->csi2.sd);
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
1735
static void cfe_notify(struct v4l2_subdev *sd, unsigned int notification,
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
1738
struct cfe_device *cfe = to_cfe_device(sd->v4l2_dev);
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
1854
struct media_entity *fe = &cfe->fe.sd.entity;
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
1855
struct media_entity *csi2 = &cfe->csi2.sd.entity;
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
2104
ret = media_create_pad_link(&cfe->csi2.sd.entity,
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
2112
ret = media_create_pad_link(&cfe->csi2.sd.entity,
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
2114
&cfe->fe.sd.entity,
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
2128
src = &cfe->fe.sd.entity;
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
2134
dst = &cfe->fe.sd.entity;
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
787
state = v4l2_subdev_get_locked_active_state(&cfe->csi2.sd);
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
812
state = v4l2_subdev_get_locked_active_state(&cfe->csi2.sd);
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
866
state = v4l2_subdev_get_locked_active_state(&cfe->csi2.sd);
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
380
static int csi2_init_state(struct v4l2_subdev *sd,
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
398
ret = v4l2_subdev_set_routing_with_fmt(sd, state, &routing,
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
406
static int csi2_pad_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
477
static int csi2_set_routing(struct v4l2_subdev *sd,
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
484
ret = v4l2_subdev_routing_validate(sd, routing,
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
498
ret = v4l2_subdev_set_routing_with_fmt(sd, state, routing,
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
547
ret = media_entity_pads_init(&csi2->sd.entity, ARRAY_SIZE(csi2->pad),
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
553
v4l2_subdev_init(&csi2->sd, &csi2_subdev_ops);
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
554
csi2->sd.internal_ops = &csi2_internal_ops;
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
555
csi2->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
556
csi2->sd.entity.ops = &csi2_entity_ops;
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
557
csi2->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_STREAMS;
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
558
csi2->sd.owner = THIS_MODULE;
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
559
snprintf(csi2->sd.name, sizeof(csi2->sd.name), "csi2");
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
561
ret = v4l2_subdev_init_finalize(&csi2->sd);
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
565
ret = v4l2_device_register_subdev(csi2->v4l2_dev, &csi2->sd);
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
574
v4l2_subdev_cleanup(&csi2->sd);
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
576
media_entity_cleanup(&csi2->sd.entity);
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
583
v4l2_device_unregister_subdev(&csi2->sd);
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
584
v4l2_subdev_cleanup(&csi2->sd);
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c
585
media_entity_cleanup(&csi2->sd.entity);
drivers/media/platform/raspberrypi/rp1-cfe/csi2.h
63
struct v4l2_subdev sd;
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
401
static int pisp_fe_init_state(struct v4l2_subdev *sd,
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
431
static int pisp_fe_pad_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
504
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
516
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(link->sink->entity);
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
517
struct pisp_fe_device *fe = container_of(sd, struct pisp_fe_device, sd);
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
562
ret = media_entity_pads_init(&fe->sd.entity, ARRAY_SIZE(fe->pad),
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
568
v4l2_subdev_init(&fe->sd, &pisp_fe_subdev_ops);
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
569
fe->sd.internal_ops = &pisp_fe_internal_ops;
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
570
fe->sd.entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER;
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
571
fe->sd.entity.ops = &pisp_fe_entity_ops;
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
572
fe->sd.entity.name = "pisp-fe";
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
573
fe->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
574
fe->sd.owner = THIS_MODULE;
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
575
snprintf(fe->sd.name, sizeof(fe->sd.name), "pisp-fe");
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
577
ret = v4l2_subdev_init_finalize(&fe->sd);
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
581
ret = v4l2_device_register_subdev(fe->v4l2_dev, &fe->sd);
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
593
v4l2_subdev_cleanup(&fe->sd);
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
595
media_entity_cleanup(&fe->sd.entity);
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
602
v4l2_device_unregister_subdev(&fe->sd);
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
603
v4l2_subdev_cleanup(&fe->sd);
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c
604
media_entity_cleanup(&fe->sd.entity);
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.h
38
struct v4l2_subdev sd;
drivers/media/platform/renesas/rcar-csi2.c
1833
static int rcsi2_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rcar-csi2.c
1837
struct rcar_csi2 *priv = sd_to_csi2(sd);
drivers/media/platform/renesas/rcar-csi2.c
1857
static int rcsi2_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rcar-csi2.c
1861
struct rcar_csi2 *priv = sd_to_csi2(sd);
drivers/media/platform/renesas/rcar-csi2.c
1878
static int rcsi2_set_pad_format(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rcar-csi2.c
1882
struct rcar_csi2 *priv = sd_to_csi2(sd);
drivers/media/platform/renesas/rcar-csi2.c
1886
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/platform/renesas/rcar-csi2.c
1912
static int rcsi2_init_state(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rcar-csi2.c
1915
struct rcar_csi2 *priv = sd_to_csi2(sd);
drivers/media/platform/renesas/rcar-csi2.c
2283
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/renesas/rcar-csi2.c
2284
struct rcar_csi2 *priv = sd_to_csi2(sd);
drivers/media/platform/renesas/rcar-csi2.c
787
static inline struct rcar_csi2 *sd_to_csi2(struct v4l2_subdev *sd)
drivers/media/platform/renesas/rcar-csi2.c
789
return container_of(sd, struct rcar_csi2, subdev);
drivers/media/platform/renesas/rcar-isp/csisp.c
177
static inline struct rcar_isp *sd_to_isp(struct v4l2_subdev *sd)
drivers/media/platform/renesas/rcar-isp/csisp.c
179
return container_of(sd, struct rcar_isp, subdev);
drivers/media/platform/renesas/rcar-isp/csisp.c
292
static int risp_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rcar-isp/csisp.c
296
struct rcar_isp *isp = sd_to_isp(sd);
drivers/media/platform/renesas/rcar-isp/csisp.c
316
static int risp_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rcar-isp/csisp.c
320
struct rcar_isp *isp = sd_to_isp(sd);
drivers/media/platform/renesas/rcar-isp/csisp.c
336
static int risp_set_pad_format(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rcar-isp/csisp.c
343
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/platform/renesas/rcar-vin/rcar-core.c
197
struct v4l2_subdev *sd;
drivers/media/platform/renesas/rcar-vin/rcar-core.c
200
sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/renesas/rcar-vin/rcar-core.c
203
if (group->remotes[i].subdev == sd)
drivers/media/platform/renesas/rcar-vin/rcar-core.c
585
struct v4l2_subdev *sd;
drivers/media/platform/renesas/rcar-vin/rcar-core.c
595
sd = media_entity_to_v4l2_subdev(link->source->entity);
drivers/media/platform/renesas/rcar-vin/rcar-core.c
598
group->vin[i]->parallel.subdev == sd) {
drivers/media/platform/renesas/rcar-vin/rcar-dma.c
1176
static int rvin_mc_validate_format(struct rvin_dev *vin, struct v4l2_subdev *sd,
drivers/media/platform/renesas/rcar-vin/rcar-dma.c
1184
if (v4l2_subdev_call(sd, pad, get_fmt, NULL, &fmt))
drivers/media/platform/renesas/rcar-vin/rcar-dma.c
1293
struct v4l2_subdev *sd;
drivers/media/platform/renesas/rcar-vin/rcar-dma.c
1301
sd = media_entity_to_v4l2_subdev(pad->entity);
drivers/media/platform/renesas/rcar-vin/rcar-dma.c
1305
return v4l2_subdev_disable_streams(sd, pad->index, BIT_ULL(0));
drivers/media/platform/renesas/rcar-vin/rcar-dma.c
1308
ret = rvin_mc_validate_format(vin, sd, pad);
drivers/media/platform/renesas/rcar-vin/rcar-dma.c
1316
ret = v4l2_subdev_enable_streams(sd, pad->index, BIT_ULL(0));
drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
340
struct v4l2_subdev *sd;
drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
347
sd = media_entity_to_v4l2_subdev(pad->entity);
drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
351
ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &fmt);
drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
659
static void rvin_notify(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
666
container_of(sd->v4l2_dev, struct rvin_dev, v4l2_dev);
drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
681
if (remote != sd)
drivers/media/platform/renesas/renesas-ceu.c
1054
struct v4l2_subdev *v4l2_sd = ceudev->sd->v4l2_sd;
drivers/media/platform/renesas/renesas-ceu.c
1070
struct v4l2_subdev *v4l2_sd = ceudev->sd->v4l2_sd;
drivers/media/platform/renesas/renesas-ceu.c
1219
ceu_sd_old = ceudev->sd;
drivers/media/platform/renesas/renesas-ceu.c
1220
ceudev->sd = ceudev->subdevs[i];
drivers/media/platform/renesas/renesas-ceu.c
1228
ceudev->sd = ceu_sd_old;
drivers/media/platform/renesas/renesas-ceu.c
1234
ceudev->sd = ceu_sd_old;
drivers/media/platform/renesas/renesas-ceu.c
1240
v4l2_subdev_call(ceudev->sd->v4l2_sd, core, s_power, 1);
drivers/media/platform/renesas/renesas-ceu.c
1251
return v4l2_g_parm_cap(video_devdata(file), ceudev->sd->v4l2_sd, a);
drivers/media/platform/renesas/renesas-ceu.c
1258
return v4l2_s_parm_cap(video_devdata(file), ceudev->sd->v4l2_sd, a);
drivers/media/platform/renesas/renesas-ceu.c
1265
struct ceu_subdev *ceu_sd = ceudev->sd;
drivers/media/platform/renesas/renesas-ceu.c
1297
struct ceu_subdev *ceu_sd = ceudev->sd;
drivers/media/platform/renesas/renesas-ceu.c
1412
if (!ceudev->sd) {
drivers/media/platform/renesas/renesas-ceu.c
1413
ceudev->sd = ceudev->subdevs[0];
drivers/media/platform/renesas/renesas-ceu.c
1417
v4l2_sd = ceudev->sd->v4l2_sd;
drivers/media/platform/renesas/renesas-ceu.c
1470
ceudev->sd = NULL;
drivers/media/platform/renesas/renesas-ceu.c
178
struct ceu_subdev *sd;
drivers/media/platform/renesas/renesas-ceu.c
352
struct ceu_subdev *ceu_sd = ceudev->sd;
drivers/media/platform/renesas/renesas-ceu.c
681
struct v4l2_subdev *v4l2_sd = ceudev->sd->v4l2_sd;
drivers/media/platform/renesas/renesas-ceu.c
732
struct v4l2_subdev *v4l2_sd = ceudev->sd->v4l2_sd;
drivers/media/platform/renesas/renesas-ceu.c
781
struct ceu_subdev *ceu_sd = ceudev->sd;
drivers/media/platform/renesas/renesas-ceu.c
884
struct ceu_subdev *ceu_sd = ceudev->sd;
drivers/media/platform/renesas/renesas-ceu.c
967
struct ceu_subdev *ceu_sd = ceudev->sd;
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
246
static inline struct rzg2l_csi2 *sd_to_csi2(struct v4l2_subdev *sd)
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
248
return container_of(sd, struct rzg2l_csi2, subdev);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
424
static int rzg2l_csi2_dphy_setting(struct v4l2_subdev *sd, bool on)
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
426
struct rzg2l_csi2 *csi2 = sd_to_csi2(sd);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
552
static int rzg2l_csi2_mipi_link_setting(struct v4l2_subdev *sd, bool on)
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
554
struct rzg2l_csi2 *csi2 = sd_to_csi2(sd);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
565
static int rzg2l_csi2_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
567
struct rzg2l_csi2 *csi2 = sd_to_csi2(sd);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
576
ret = rzg2l_csi2_mipi_link_setting(sd, 1);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
593
ret = rzg2l_csi2_dphy_setting(sd, 0);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
596
ret = rzg2l_csi2_mipi_link_setting(sd, 0);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
608
rzg2l_csi2_mipi_link_setting(sd, 0);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
614
static int rzg2l_csi2_pre_streamon(struct v4l2_subdev *sd, u32 flags)
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
616
return rzg2l_csi2_dphy_setting(sd, 1);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
619
static int rzg2l_csi2_post_streamoff(struct v4l2_subdev *sd)
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
621
struct rzg2l_csi2 *csi2 = sd_to_csi2(sd);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
630
return rzg2l_csi2_dphy_setting(sd, 0);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
635
static int rzg2l_csi2_set_format(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
639
struct rzg2l_csi2 *csi2 = sd_to_csi2(sd);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
675
static int rzg2l_csi2_init_state(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
679
struct rzg2l_csi2 *csi2 = sd_to_csi2(sd);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
690
return rzg2l_csi2_set_format(sd, sd_state, &fmt);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
693
static int rzg2l_csi2_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
705
static int rzg2l_csi2_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
709
struct rzg2l_csi2 *csi2 = sd_to_csi2(sd);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
725
static int rzg2l_csi2_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
728
struct rzg2l_csi2 *csi2 = sd_to_csi2(sd);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c
155
static int rzg2l_cru_ip_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c
161
cru = v4l2_get_subdevdata(sd);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c
202
static int rzg2l_cru_ip_set_format(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c
206
struct rzg2l_cru_dev *cru = v4l2_get_subdevdata(sd);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c
242
static int rzg2l_cru_ip_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c
268
static int rzg2l_cru_ip_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c
272
struct rzg2l_cru_dev *cru = v4l2_get_subdevdata(sd);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c
289
static int rzg2l_cru_ip_init_state(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c
303
return rzg2l_cru_ip_set_format(sd, sd_state, &fmt);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
509
struct v4l2_subdev *sd;
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
517
sd = media_entity_to_v4l2_subdev(pad->entity);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
522
ret = v4l2_subdev_call(sd, video, s_stream, 0);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
526
ret = v4l2_subdev_call(sd, video, post_streamoff);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
537
pipe = media_entity_pipeline(&sd->entity) ? : &cru->vdev.pipe;
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
542
ret = v4l2_subdev_call(sd, video, pre_streamon, 0);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
546
ret = v4l2_subdev_call(sd, video, s_stream, 1);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
553
v4l2_subdev_call(sd, video, post_streamoff);
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
124
static int rzv2h_ivc_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
159
static int rzv2h_ivc_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
167
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
190
static int rzv2h_ivc_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
204
static int rzv2h_ivc_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
230
static int rzv2h_ivc_init_state(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
257
static int rzv2h_ivc_registered(struct v4l2_subdev *sd)
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
259
struct rzv2h_ivc *ivc = container_of(sd, struct rzv2h_ivc, subdev.sd);
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
261
return rzv2h_ivc_init_vdev(ivc, sd->v4l2_dev);
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
274
struct v4l2_subdev *sd =
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
283
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
322
struct v4l2_subdev *sd;
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
326
sd = &ivc->subdev.sd;
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
327
sd->dev = ivc->dev;
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
328
v4l2_subdev_init(sd, &rzv2h_ivc_subdev_ops);
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
329
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
330
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
331
sd->internal_ops = &rzv2h_ivc_subdev_internal_ops;
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
332
sd->entity.ops = &rzv2h_ivc_media_ops;
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
337
snprintf(sd->name, sizeof(sd->name), "rzv2h ivc block");
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
339
ret = media_entity_pads_init(&sd->entity, RZV2H_IVC_NUM_SUBDEV_PADS,
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
346
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
352
ret = v4l2_async_register_subdev(sd);
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
361
v4l2_subdev_cleanup(sd);
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
363
media_entity_cleanup(&sd->entity);
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
370
struct v4l2_subdev *sd = &ivc->subdev.sd;
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
372
v4l2_subdev_cleanup(sd);
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
373
media_entity_remove_links(&sd->entity);
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
374
v4l2_async_unregister_subdev(sd);
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
375
media_entity_cleanup(&sd->entity);
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-subdev.c
89
static int rzv2h_ivc_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
500
ret = media_create_pad_link(&vdev->entity, 0, &ivc->subdev.sd.entity,
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h
98
struct v4l2_subdev sd;
drivers/media/platform/renesas/sh_vou.c
1349
struct v4l2_subdev *sd = list_entry(v4l2_dev->subdevs.next,
drivers/media/platform/renesas/sh_vou.c
1351
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/platform/rockchip/rkcif/rkcif-capture-dvp.c
668
state = v4l2_subdev_lock_and_get_active_state(&interface->sd);
drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c
598
state = v4l2_subdev_lock_and_get_active_state(&interface->sd);
drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c
647
state = v4l2_subdev_lock_and_get_active_state(&interface->sd);
drivers/media/platform/rockchip/rkcif/rkcif-common.h
137
struct v4l2_subdev *sd;
drivers/media/platform/rockchip/rkcif/rkcif-common.h
195
struct v4l2_subdev sd;
drivers/media/platform/rockchip/rkcif/rkcif-dev.c
107
ret = v4l2_create_fwnode_links_to_pad(sd, sink_pad,
drivers/media/platform/rockchip/rkcif/rkcif-dev.c
111
sd->name);
drivers/media/platform/rockchip/rkcif/rkcif-dev.c
115
remote->sd = sd;
drivers/media/platform/rockchip/rkcif/rkcif-dev.c
96
struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
117
static int rkcif_interface_set_sel(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
148
static int rkcif_interface_set_routing(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
155
ret = v4l2_subdev_routing_validate(sd, routing,
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
167
ret = v4l2_subdev_set_routing(sd, state, routing);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
17
static inline struct rkcif_interface *to_rkcif_interface(struct v4l2_subdev *sd)
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
188
static int rkcif_interface_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
19
return container_of(sd, struct rkcif_interface, sd);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
192
struct rkcif_interface *interface = to_rkcif_interface(sd);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
200
media_pad_remote_pad_first(&sd->entity.pads[RKCIF_IF_PAD_SINK]);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
220
static int rkcif_interface_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
229
media_pad_remote_pad_first(&sd->entity.pads[RKCIF_IF_PAD_SINK]);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
252
static int rkcif_interface_init_state(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
255
struct rkcif_interface *interface = to_rkcif_interface(sd);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
27
static int rkcif_interface_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
297
ret = v4l2_subdev_set_routing_with_fmt(sd, state, &routing,
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
31
struct rkcif_interface *interface = to_rkcif_interface(sd);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
362
struct v4l2_subdev *sd = &interface->sd;
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
367
v4l2_subdev_init(sd, &rkcif_interface_ops);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
368
sd->dev = rkcif->dev;
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
369
sd->entity.ops = &rkcif_interface_media_ops;
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
370
sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
371
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_STREAMS;
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
372
sd->internal_ops = &rkcif_interface_internal_ops;
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
373
sd->owner = THIS_MODULE;
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
376
snprintf(sd->name, sizeof(sd->name), "rkcif-dvp0");
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
378
snprintf(sd->name, sizeof(sd->name), "rkcif-mipi%d",
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
383
ret = media_entity_pads_init(&sd->entity, RKCIF_IF_PAD_MAX, pads);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
387
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
391
ret = v4l2_device_register_subdev(&rkcif->v4l2_dev, sd);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
393
dev_err(sd->dev, "failed to register subdev\n");
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
40
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
404
v4l2_device_unregister_subdev(sd);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
406
v4l2_subdev_cleanup(sd);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
408
media_entity_cleanup(&sd->entity);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
415
struct v4l2_subdev *sd = &interface->sd;
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
420
v4l2_device_unregister_subdev(sd);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
421
v4l2_subdev_cleanup(sd);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
422
media_entity_cleanup(&sd->entity);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c
79
static int rkcif_interface_get_sel(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkcif/rkcif-stream.c
285
ret = v4l2_subdev_enable_streams(&stream->interface->sd,
drivers/media/platform/rockchip/rkcif/rkcif-stream.c
312
v4l2_subdev_disable_streams(&stream->interface->sd, RKCIF_IF_PAD_SRC,
drivers/media/platform/rockchip/rkcif/rkcif-stream.c
464
struct v4l2_subdev *sd;
drivers/media/platform/rockchip/rkcif/rkcif-stream.c
472
sd = media_entity_to_v4l2_subdev(link->source->entity);
drivers/media/platform/rockchip/rkcif/rkcif-stream.c
474
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/rockchip/rkcif/rkcif-stream.c
592
ret = media_create_pad_link(&interface->sd.entity, RKCIF_IF_PAD_SRC,
drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
1074
v4l2_subdev_call(&rkisp1->isp.sd, video, s_stream, false);
drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
1076
v4l2_subdev_call(&rkisp1->resizer_devs[cap->id].sd, video, s_stream,
drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
1094
ret = v4l2_subdev_call(&rkisp1->resizer_devs[cap->id].sd, video,
drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
1106
ret = v4l2_subdev_call(&rkisp1->isp.sd, video, s_stream, true);
drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
1113
v4l2_subdev_call(&rkisp1->resizer_devs[cap->id].sd, video, s_stream,
drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
1458
struct v4l2_subdev *sd =
drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
1469
ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &sd_fmt);
drivers/media/platform/rockchip/rkisp1/rkisp1-common.h
191
struct v4l2_subdev *sd;
drivers/media/platform/rockchip/rkisp1/rkisp1-common.h
210
struct v4l2_subdev sd;
drivers/media/platform/rockchip/rkisp1/rkisp1-common.h
225
struct v4l2_subdev sd;
drivers/media/platform/rockchip/rkisp1/rkisp1-common.h
446
struct v4l2_subdev sd;
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
247
static int rkisp1_csi_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
28
static inline struct rkisp1_csi *to_rkisp1_csi(struct v4l2_subdev *sd)
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
288
static int rkisp1_csi_init_state(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
30
return container_of(sd, struct rkisp1_csi, sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
306
static int rkisp1_csi_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
310
struct rkisp1_csi *csi = to_rkisp1_csi(sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
316
return v4l2_subdev_get_fmt(sd, sd_state, fmt);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
33
int rkisp1_csi_link_sensor(struct rkisp1_device *rkisp1, struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
348
static int rkisp1_csi_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
350
struct rkisp1_csi *csi = to_rkisp1_csi(sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
369
source_pad = media_entity_remote_source_pad_unique(&sd->entity);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
390
sd_state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
40
s_asd->pixel_rate_ctrl = v4l2_ctrl_find(sd->ctrl_handler,
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
44
sd->name);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
441
struct v4l2_subdev *sd;
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
446
sd = &csi->sd;
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
447
v4l2_subdev_init(sd, &rkisp1_csi_ops);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
448
sd->internal_ops = &rkisp1_csi_internal_ops;
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
449
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
450
sd->entity.ops = &rkisp1_csi_media_ops;
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
451
sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
452
sd->owner = THIS_MODULE;
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
453
strscpy(sd->name, RKISP1_CSI_DEV_NAME, sizeof(sd->name));
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
461
ret = media_entity_pads_init(&sd->entity, RKISP1_CSI_PAD_NUM, pads);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
465
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
469
ret = v4l2_device_register_subdev(&csi->rkisp1->v4l2_dev, sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
471
dev_err(sd->dev, "Failed to register csi receiver subdev\n");
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
478
v4l2_subdev_cleanup(sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
480
media_entity_cleanup(&sd->entity);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
49
ret = media_create_pad_link(&sd->entity, source_pad,
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
492
v4l2_device_unregister_subdev(&csi->sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
493
v4l2_subdev_cleanup(&csi->sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
494
media_entity_cleanup(&csi->sd.entity);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
50
&csi->sd.entity, RKISP1_CSI_PAD_SINK,
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c
54
sd->name);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.h
24
int rkisp1_csi_link_sensor(struct rkisp1_device *rkisp1, struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
128
struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
138
s_asd->sd = sd;
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
140
source_pad = media_entity_get_fwnode_pad(&sd->entity, s_asd->source_ep,
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
144
sd->name);
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
149
return rkisp1_csi_link_sensor(rkisp1, sd, s_asd, source_pad);
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
151
ret = media_create_pad_link(&sd->entity, source_pad,
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
152
&rkisp1->isp.sd.entity,
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
157
sd->name);
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
373
ret = media_create_pad_link(&rkisp1->csi.sd.entity,
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
375
&rkisp1->isp.sd.entity,
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
385
&rkisp1->resizer_devs[i].sd.entity;
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
389
ret = media_create_pad_link(&rkisp1->isp.sd.entity,
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
406
&rkisp1->isp.sd.entity,
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
414
return media_create_pad_link(&rkisp1->isp.sd.entity,
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1031
struct v4l2_subdev *sd = &isp->sd;
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1036
v4l2_subdev_init(sd, &rkisp1_isp_ops);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1037
sd->internal_ops = &rkisp1_isp_internal_ops;
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1038
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1039
sd->entity.ops = &rkisp1_isp_media_ops;
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1040
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1041
sd->owner = THIS_MODULE;
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1042
strscpy(sd->name, RKISP1_ISP_DEV_NAME, sizeof(sd->name));
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1050
ret = media_entity_pads_init(&sd->entity, RKISP1_ISP_PAD_MAX, pads);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1054
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1058
ret = v4l2_device_register_subdev(&rkisp1->v4l2_dev, sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1067
v4l2_subdev_cleanup(sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1069
media_entity_cleanup(&sd->entity);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1070
isp->sd.v4l2_dev = NULL;
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1078
if (!isp->sd.v4l2_dev)
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1081
v4l2_device_unregister_subdev(&isp->sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1082
v4l2_subdev_cleanup(&isp->sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1083
media_entity_cleanup(&isp->sd.entity);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
1100
v4l2_event_queue(isp->sd.devnode, &event);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
470
static inline struct rkisp1_isp *to_rkisp1_isp(struct v4l2_subdev *sd)
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
472
return container_of(sd, struct rkisp1_isp, sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
475
static int rkisp1_isp_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
516
static int rkisp1_isp_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
520
struct rkisp1_isp *isp = to_rkisp1_isp(sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
550
static int rkisp1_isp_init_state(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
819
static int rkisp1_isp_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
823
struct rkisp1_isp *isp = to_rkisp1_isp(sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
836
static int rkisp1_isp_get_selection(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
874
static int rkisp1_isp_set_selection(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
878
struct rkisp1_isp *isp = to_rkisp1_isp(sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
919
static int rkisp1_isp_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
921
struct rkisp1_isp *isp = to_rkisp1_isp(sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
950
if (rkisp1->source == &rkisp1->csi.sd) {
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
970
sd_state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
991
static int rkisp1_isp_subs_evt(struct v4l2_subdev *sd, struct v4l2_fh *fh,
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
327
static int rkisp1_rsz_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
332
container_of(sd, struct rkisp1_resizer, sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
379
static int rkisp1_rsz_init_state(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
545
static int rkisp1_rsz_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
550
container_of(sd, struct rkisp1_resizer, sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
560
static int rkisp1_rsz_get_selection(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
593
static int rkisp1_rsz_set_selection(struct v4l2_subdev *sd,
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
598
container_of(sd, struct rkisp1_resizer, sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
628
static int rkisp1_rsz_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
631
container_of(sd, struct rkisp1_resizer, sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
648
sd_state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
677
v4l2_device_unregister_subdev(&rsz->sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
678
v4l2_subdev_cleanup(&rsz->sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
679
media_entity_cleanup(&rsz->sd.entity);
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
689
struct v4l2_subdev *sd = &rsz->sd;
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
700
v4l2_subdev_init(sd, &rkisp1_rsz_ops);
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
701
sd->internal_ops = &rkisp1_rsz_internal_ops;
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
702
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
703
sd->entity.ops = &rkisp1_rsz_media_ops;
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
704
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER;
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
705
sd->owner = THIS_MODULE;
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
706
strscpy(sd->name, dev_names[rsz->id], sizeof(sd->name));
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
713
ret = media_entity_pads_init(&sd->entity, RKISP1_RSZ_PAD_MAX, pads);
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
717
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
721
ret = v4l2_device_register_subdev(&rsz->rkisp1->v4l2_dev, sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
723
dev_err(sd->dev, "Failed to register resizer subdev\n");
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
730
v4l2_subdev_cleanup(sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
732
media_entity_cleanup(&sd->entity);
drivers/media/platform/samsung/exynos4-is/common.c
20
struct v4l2_subdev *sd;
drivers/media/platform/samsung/exynos4-is/common.c
28
sd = media_entity_to_v4l2_subdev(pad->entity);
drivers/media/platform/samsung/exynos4-is/common.c
30
if (sd->grp_id == GRP_ID_FIMC_IS_SENSOR ||
drivers/media/platform/samsung/exynos4-is/common.c
31
sd->grp_id == GRP_ID_SENSOR)
drivers/media/platform/samsung/exynos4-is/common.c
32
return sd;
drivers/media/platform/samsung/exynos4-is/common.c
34
pad = &sd->entity.pads[0];
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1061
struct v4l2_subdev *sd;
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1068
sd = __fimc_md_get_subdev(ve->pipe, IDX_SENSOR);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1071
if (sd)
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1072
strscpy(i->name, sd->name, sizeof(i->name));
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1104
struct v4l2_subdev *sd = &vc->subdev;
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1117
for (i = 0; i < sd->entity.num_pads; i++) {
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1118
struct media_pad *p = &sd->entity.pads[i];
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1132
if (sd == &vc->subdev) {
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1139
ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &sink_fmt);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1145
sd = media_entity_to_v4l2_subdev(src_pad->entity);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1147
ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &src_fmt);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1156
if (sd == p->subdevs[IDX_SENSOR] &&
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1162
ret = fimc_get_sensor_frame_desc(sd, plane_fmt,
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1182
struct v4l2_subdev *sd;
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1192
sd = __fimc_md_get_subdev(vc->ve.pipe, IDX_SENSOR);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1193
if (sd)
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1194
si = v4l2_get_subdev_hostdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1367
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1368
struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1390
vc->input = sd->grp_id;
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1421
void fimc_sensor_notify(struct v4l2_subdev *sd, unsigned int notification,
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1430
if (sd == NULL)
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1433
si = v4l2_get_subdev_hostdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1434
fmd = entity_to_fimc_mdev(&sd->entity);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1457
static int fimc_subdev_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1470
static int fimc_subdev_get_fmt(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1474
struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1511
static int fimc_subdev_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1515
struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1577
static int fimc_subdev_get_selection(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1581
struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1633
static int fimc_subdev_set_selection(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1637
struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1811
static int fimc_capture_subdev_registered(struct v4l2_subdev *sd)
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1813
struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1819
ret = fimc_register_m2m_device(fimc, sd->v4l2_dev);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1823
fimc->vid_cap.ve.pipe = v4l2_get_subdev_hostdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1825
ret = fimc_register_capture_device(fimc, sd->v4l2_dev);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1834
static void fimc_capture_subdev_unregistered(struct v4l2_subdev *sd)
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1836
struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1866
struct v4l2_subdev *sd = &fimc->vid_cap.subdev;
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1869
v4l2_subdev_init(sd, &fimc_subdev_ops);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1870
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1871
snprintf(sd->name, sizeof(sd->name), "FIMC.%d", fimc->id);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1876
ret = media_entity_pads_init(&sd->entity, FIMC_SD_PADS_NUM,
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1881
sd->entity.ops = &fimc_sd_media_ops;
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1882
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER;
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1883
sd->internal_ops = &fimc_capture_sd_internal_ops;
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1884
v4l2_set_subdevdata(sd, fimc);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1890
struct v4l2_subdev *sd = &fimc->vid_cap.subdev;
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1892
v4l2_device_unregister_subdev(sd);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1893
media_entity_cleanup(&sd->entity);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
1894
v4l2_set_subdevdata(sd, NULL);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
763
struct v4l2_subdev *sd = p->subdevs[IDX_SENSOR];
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
775
if (WARN_ON(!sd || !tfmt))
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
780
me = fimc_pipeline_get_head(&sd->entity);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
796
sd = media_entity_to_v4l2_subdev(me);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
799
ret = v4l2_subdev_call(sd, pad, set_fmt, NULL, &sfmt);
drivers/media/platform/samsung/exynos4-is/fimc-capture.c
806
ret = v4l2_subdev_call(sd, pad, set_fmt, NULL,
drivers/media/platform/samsung/exynos4-is/fimc-core.h
662
void fimc_sensor_notify(struct v4l2_subdev *sd, unsigned int notification,
drivers/media/platform/samsung/exynos4-is/fimc-isp-video.c
449
struct v4l2_subdev *sd = &isp->subdev;
drivers/media/platform/samsung/exynos4-is/fimc-isp-video.c
462
pad = &sd->entity.pads[0];
drivers/media/platform/samsung/exynos4-is/fimc-isp-video.c
466
ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &sink_fmt);
drivers/media/platform/samsung/exynos4-is/fimc-isp-video.c
475
sd = media_entity_to_v4l2_subdev(pad->entity);
drivers/media/platform/samsung/exynos4-is/fimc-isp-video.c
477
ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &src_fmt);
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
108
static int fimc_is_subdev_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
121
static int fimc_isp_subdev_get_fmt(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
125
struct fimc_isp *isp = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
152
isp_dbg(1, sd, "%s: pad%d: fmt: 0x%x, %dx%d\n", __func__,
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
193
static int fimc_isp_subdev_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
197
struct fimc_isp *isp = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
202
isp_dbg(1, sd, "%s: pad%d: code: 0x%x, %dx%d\n",
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
228
if (!media_entity_is_streaming(&sd->entity)) {
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
252
static int fimc_isp_subdev_s_stream(struct v4l2_subdev *sd, int on)
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
254
struct fimc_isp *isp = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
258
isp_dbg(1, sd, "%s: on: %d\n", __func__, on);
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
272
isp_dbg(1, sd, "changing mode to %d\n", is->config_index);
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
283
v4l2_err(sd, "stream on timeout\n");
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
292
v4l2_err(sd, "stream off timeout\n");
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
301
static int fimc_isp_subdev_s_power(struct v4l2_subdev *sd, int on)
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
303
struct fimc_isp *isp = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
318
v4l2_err(sd, "firmware booting failed\n");
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
333
v4l2_err(sd, "sensor close timeout\n");
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
344
v4l2_err(sd, "sub-IP power off timeout\n");
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
364
static int fimc_isp_subdev_open(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
392
static int fimc_isp_subdev_registered(struct v4l2_subdev *sd)
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
394
struct fimc_isp *isp = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
398
isp->video_capture.ve.pipe = v4l2_get_subdev_hostdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
400
ret = fimc_isp_video_device_register(isp, sd->v4l2_dev,
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
408
static void fimc_isp_subdev_unregistered(struct v4l2_subdev *sd)
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
410
struct fimc_isp *isp = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
695
struct v4l2_subdev *sd = &isp->subdev;
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
701
v4l2_subdev_init(sd, &fimc_is_subdev_ops);
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
703
sd->owner = THIS_MODULE;
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
704
sd->grp_id = GRP_ID_FIMC_IS;
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
705
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
706
snprintf(sd->name, sizeof(sd->name), "FIMC-IS-ISP");
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
708
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
712
ret = media_entity_pads_init(&sd->entity, FIMC_ISP_SD_PADS_NUM,
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
762
media_entity_cleanup(&sd->entity);
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
769
sd->ctrl_handler = handler;
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
770
sd->internal_ops = &fimc_is_subdev_internal_ops;
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
771
sd->entity.ops = &fimc_is_subdev_media_ops;
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
772
v4l2_set_subdevdata(sd, isp);
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
781
struct v4l2_subdev *sd = &isp->subdev;
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
783
v4l2_device_unregister_subdev(sd);
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
784
media_entity_cleanup(&sd->entity);
drivers/media/platform/samsung/exynos4-is/fimc-isp.c
786
v4l2_set_subdevdata(sd, NULL);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1000
static int fimc_lite_subdev_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1014
struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1023
static int fimc_lite_subdev_get_fmt(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1027
struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1032
mf = __fimc_lite_subdev_get_try_fmt(sd, sd_state, fmt->pad);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1054
static int fimc_lite_subdev_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1058
struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1064
v4l2_dbg(1, debug, sd, "pad%d: code: 0x%x, %dx%d\n",
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1070
media_entity_is_streaming(&sd->entity)) ||
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1082
mf = __fimc_lite_subdev_get_try_fmt(sd, sd_state, fmt->pad);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1087
src_fmt = __fimc_lite_subdev_get_try_fmt(sd, sd_state,
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1115
static int fimc_lite_subdev_get_selection(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1119
struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1143
v4l2_dbg(1, debug, sd, "%s: (%d,%d)/%ux%u, f_w: %d, f_h: %d\n",
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1150
static int fimc_lite_subdev_set_selection(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1154
struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1177
v4l2_dbg(1, debug, sd, "%s: (%d,%d)/%ux%u, f_w: %d, f_h: %d\n",
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1184
static int fimc_lite_subdev_s_stream(struct v4l2_subdev *sd, int on)
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1186
struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1197
fimc->sensor = fimc_find_remote_sensor(&sd->entity);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1222
v4l2_err(sd, "s_stream(0) timeout\n");
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1230
static int fimc_lite_log_status(struct v4l2_subdev *sd)
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1232
struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1238
static int fimc_lite_subdev_registered(struct v4l2_subdev *sd)
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1240
struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1253
vfd->v4l2_dev = sd->v4l2_dev;
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1284
fimc->ve.pipe = v4l2_get_subdev_hostdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1293
v4l2_info(sd->v4l2_dev, "Registered %s as /dev/%s\n",
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1298
static void fimc_lite_subdev_unregistered(struct v4l2_subdev *sd)
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1300
struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1383
struct v4l2_subdev *sd = &fimc->subdev;
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1386
v4l2_subdev_init(sd, &fimc_lite_subdev_ops);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1387
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1388
snprintf(sd->name, sizeof(sd->name), "FIMC-LITE.%d", fimc->index);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1393
ret = media_entity_pads_init(&sd->entity, FLITE_SD_PADS_NUM,
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1402
media_entity_cleanup(&sd->entity);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1406
sd->ctrl_handler = handler;
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1407
sd->internal_ops = &fimc_lite_subdev_internal_ops;
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1408
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER;
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1409
sd->entity.ops = &fimc_lite_subdev_media_ops;
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1410
sd->owner = THIS_MODULE;
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1411
v4l2_set_subdevdata(sd, fimc);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1418
struct v4l2_subdev *sd = &fimc->subdev;
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1420
v4l2_device_unregister_subdev(sd);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1421
media_entity_cleanup(&sd->entity);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
1423
v4l2_set_subdevdata(sd, NULL);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
763
struct v4l2_subdev *sd = &fimc->subdev;
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
775
pad = &sd->entity.pads[0];
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
779
if (sd == &fimc->subdev) {
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
786
ret = v4l2_subdev_call(sd, pad, get_fmt, NULL,
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
796
sd = media_entity_to_v4l2_subdev(pad->entity);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
798
ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &src_fmt);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
949
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
950
struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
956
v4l2_dbg(1, debug, sd, "%s: %s --> %s, flags: 0x%x. source_id: 0x%x\n",
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
964
fimc->source_subdev_grp_id = sd->grp_id;
drivers/media/platform/samsung/exynos4-is/fimc-lite.c
988
v4l2_err(sd, "Invalid pad index\n");
drivers/media/platform/samsung/exynos4-is/media-dev.c
100
p->subdevs[IDX_CSIS] = sd;
drivers/media/platform/samsung/exynos4-is/media-dev.c
1011
if (fmd->csis[i].sd == NULL)
drivers/media/platform/samsung/exynos4-is/media-dev.c
1014
source = &fmd->csis[i].sd->entity;
drivers/media/platform/samsung/exynos4-is/media-dev.c
103
p->subdevs[IDX_FLITE] = sd;
drivers/media/platform/samsung/exynos4-is/media-dev.c
106
p->subdevs[IDX_FIMC] = sd;
drivers/media/platform/samsung/exynos4-is/media-dev.c
109
p->subdevs[IDX_IS_ISP] = sd;
drivers/media/platform/samsung/exynos4-is/media-dev.c
114
me = &sd->entity;
drivers/media/platform/samsung/exynos4-is/media-dev.c
131
static int __subdev_set_power(struct v4l2_subdev *sd, int on)
drivers/media/platform/samsung/exynos4-is/media-dev.c
136
if (sd == NULL)
drivers/media/platform/samsung/exynos4-is/media-dev.c
139
use_count = &sd->entity.use_count;
drivers/media/platform/samsung/exynos4-is/media-dev.c
144
ret = v4l2_subdev_call(sd, core, s_power, on);
drivers/media/platform/samsung/exynos4-is/media-dev.c
230
struct v4l2_subdev *sd;
drivers/media/platform/samsung/exynos4-is/media-dev.c
238
sd = p->subdevs[IDX_SENSOR];
drivers/media/platform/samsung/exynos4-is/media-dev.c
239
if (sd == NULL) {
drivers/media/platform/samsung/exynos4-is/media-dev.c
260
struct v4l2_subdev *sd = p ? p->subdevs[IDX_SENSOR] : NULL;
drivers/media/platform/samsung/exynos4-is/media-dev.c
264
if (sd == NULL) {
drivers/media/platform/samsung/exynos4-is/media-dev.c
271
fmd = entity_to_fimc_mdev(&sd->entity);
drivers/media/platform/samsung/exynos4-is/media-dev.c
297
struct v4l2_subdev *sd = p->subdevs[IDX_CSIS];
drivers/media/platform/samsung/exynos4-is/media-dev.c
299
if (!sd)
drivers/media/platform/samsung/exynos4-is/media-dev.c
300
sd = p->subdevs[IDX_FIMC];
drivers/media/platform/samsung/exynos4-is/media-dev.c
302
if (!sd) {
drivers/media/platform/samsung/exynos4-is/media-dev.c
310
fmd = entity_to_fimc_mdev(&sd->entity);
drivers/media/platform/samsung/exynos4-is/media-dev.c
574
struct v4l2_subdev *sd;
drivers/media/platform/samsung/exynos4-is/media-dev.c
582
sd = &fimc_lite->subdev;
drivers/media/platform/samsung/exynos4-is/media-dev.c
583
sd->grp_id = GRP_ID_FLITE;
drivers/media/platform/samsung/exynos4-is/media-dev.c
589
v4l2_set_subdev_hostdata(sd, ep);
drivers/media/platform/samsung/exynos4-is/media-dev.c
591
ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd);
drivers/media/platform/samsung/exynos4-is/media-dev.c
602
struct v4l2_subdev *sd;
drivers/media/platform/samsung/exynos4-is/media-dev.c
609
sd = &fimc->vid_cap.subdev;
drivers/media/platform/samsung/exynos4-is/media-dev.c
610
sd->grp_id = GRP_ID_FIMC;
drivers/media/platform/samsung/exynos4-is/media-dev.c
616
v4l2_set_subdev_hostdata(sd, ep);
drivers/media/platform/samsung/exynos4-is/media-dev.c
618
ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd);
drivers/media/platform/samsung/exynos4-is/media-dev.c
633
struct v4l2_subdev *sd)
drivers/media/platform/samsung/exynos4-is/media-dev.c
643
if (WARN_ON(fmd->csis[id].sd))
drivers/media/platform/samsung/exynos4-is/media-dev.c
646
sd->grp_id = GRP_ID_CSIS;
drivers/media/platform/samsung/exynos4-is/media-dev.c
647
ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd);
drivers/media/platform/samsung/exynos4-is/media-dev.c
649
fmd->csis[id].sd = sd;
drivers/media/platform/samsung/exynos4-is/media-dev.c
658
struct v4l2_subdev *sd = &is->isp.subdev;
drivers/media/platform/samsung/exynos4-is/media-dev.c
667
v4l2_set_subdev_hostdata(sd, ep);
drivers/media/platform/samsung/exynos4-is/media-dev.c
669
ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd);
drivers/media/platform/samsung/exynos4-is/media-dev.c
68
struct v4l2_subdev *sd;
drivers/media/platform/samsung/exynos4-is/media-dev.c
784
if (fmd->csis[i].sd == NULL)
drivers/media/platform/samsung/exynos4-is/media-dev.c
786
v4l2_device_unregister_subdev(fmd->csis[i].sd);
drivers/media/platform/samsung/exynos4-is/media-dev.c
787
fmd->csis[i].sd = NULL;
drivers/media/platform/samsung/exynos4-is/media-dev.c
90
sd = media_entity_to_v4l2_subdev(pad->entity);
drivers/media/platform/samsung/exynos4-is/media-dev.c
92
switch (sd->grp_id) {
drivers/media/platform/samsung/exynos4-is/media-dev.c
94
sensor = sd;
drivers/media/platform/samsung/exynos4-is/media-dev.c
97
p->subdevs[IDX_SENSOR] = sd;
drivers/media/platform/samsung/exynos4-is/media-dev.c
972
csis = fmd->csis[pdata->mux_id].sd;
drivers/media/platform/samsung/exynos4-is/media-dev.h
176
int fimc_md_set_camclk(struct v4l2_subdev *sd, bool on);
drivers/media/platform/samsung/exynos4-is/media-dev.h
64
struct v4l2_subdev *sd;
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
203
struct v4l2_subdev sd;
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
276
return container_of(sdev, struct csis_state, sd);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
334
v4l2_dbg(1, debug, &state->sd, "fmt: %#x, %d x %d\n",
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
439
v4l2_info(&state->sd, "--- %s ---\n", label);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
443
v4l2_info(&state->sd, "%10s: 0x%08x\n", registers[i].name, cfg);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
481
v4l2_info(&state->sd, "%s events: %d\n",
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
491
static int s5pcsis_s_power(struct v4l2_subdev *sd, int on)
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
493
struct csis_state *state = sd_to_csis_state(sd);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
502
static int s5pcsis_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
504
struct csis_state *state = sd_to_csis_state(sd);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
507
v4l2_dbg(1, debug, sd, "%s: %d, state: 0x%x\n",
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
539
static int s5pcsis_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
577
static int s5pcsis_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
581
struct csis_state *state = sd_to_csis_state(sd);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
606
static int s5pcsis_get_fmt(struct v4l2_subdev *sd,
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
610
struct csis_state *state = sd_to_csis_state(sd);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
623
static int s5pcsis_s_rx_buffer(struct v4l2_subdev *sd, void *buf,
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
626
struct csis_state *state = sd_to_csis_state(sd);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
639
static int s5pcsis_log_status(struct v4l2_subdev *sd)
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
641
struct csis_state *state = sd_to_csis_state(sd);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
704
v4l2_dbg(2, debug, &state->sd, "%s: %d\n",
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
708
v4l2_dbg(2, debug, &state->sd, "status: %08x\n", status);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
841
v4l2_subdev_init(&state->sd, &s5pcsis_subdev_ops);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
842
state->sd.owner = THIS_MODULE;
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
843
snprintf(state->sd.name, sizeof(state->sd.name), "%s.%d",
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
845
state->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
852
state->sd.entity.function = MEDIA_ENT_F_IO_V4L;
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
855
ret = media_entity_pads_init(&state->sd.entity,
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
861
v4l2_set_subdevdata(&state->sd, pdev);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
864
platform_set_drvdata(pdev, &state->sd);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
880
media_entity_cleanup(&state->sd.entity);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
890
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
891
struct csis_state *state = sd_to_csis_state(sd);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
894
v4l2_dbg(1, debug, sd, "%s: flags: 0x%x\n",
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
919
struct v4l2_subdev *sd = dev_get_drvdata(dev);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
920
struct csis_state *state = sd_to_csis_state(sd);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
923
v4l2_dbg(1, debug, sd, "%s: flags: 0x%x\n",
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
986
struct v4l2_subdev *sd = platform_get_drvdata(pdev);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
987
struct csis_state *state = sd_to_csis_state(sd);
drivers/media/platform/samsung/exynos4-is/mipi-csis.c
995
media_entity_cleanup(&state->sd.entity);
drivers/media/platform/samsung/s3c-camif/camif-capture.c
116
err = v4l2_subdev_call(sensor->sd, core, s_power, on);
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1198
static int s3c_camif_subdev_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1209
static int s3c_camif_subdev_get_fmt(struct v4l2_subdev *sd,
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1213
struct camif_dev *camif = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1277
static int s3c_camif_subdev_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1281
struct camif_dev *camif = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1286
v4l2_dbg(1, debug, sd, "pad%d: code: 0x%x, %ux%u\n",
drivers/media/platform/samsung/s3c-camif/camif-capture.c
134
err = v4l2_subdev_call(sensor->sd, video, s_stream, on);
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1344
static int s3c_camif_subdev_get_selection(struct v4l2_subdev *sd,
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1348
struct camif_dev *camif = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1375
v4l2_dbg(1, debug, sd, "%s: crop: (%d,%d)/%ux%u, size: %ux%u\n",
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1431
static int s3c_camif_subdev_set_selection(struct v4l2_subdev *sd,
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1435
struct camif_dev *camif = v4l2_get_subdevdata(sd);
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1467
v4l2_dbg(1, debug, sd, "%s: (%d,%d)/%ux%u, f_w: %u, f_h: %u\n",
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1541
struct v4l2_subdev *sd = &camif->subdev;
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1544
v4l2_subdev_init(sd, &s3c_camif_subdev_ops);
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1545
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1546
strscpy(sd->name, "S3C-CAMIF", sizeof(sd->name));
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1552
ret = media_entity_pads_init(&sd->entity, CAMIF_SD_PADS_NUM,
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1576
media_entity_cleanup(&sd->entity);
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1584
sd->ctrl_handler = handler;
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1585
v4l2_set_subdevdata(sd, camif);
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1592
struct v4l2_subdev *sd = &camif->subdev;
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1595
if (v4l2_get_subdevdata(sd) == NULL)
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1598
v4l2_device_unregister_subdev(sd);
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1599
media_entity_cleanup(&sd->entity);
drivers/media/platform/samsung/s3c-camif/camif-capture.c
1601
v4l2_set_subdevdata(sd, NULL);
drivers/media/platform/samsung/s3c-camif/camif-capture.c
649
struct v4l2_subdev *sensor = vp->camif->sensor.sd;
drivers/media/platform/samsung/s3c-camif/camif-capture.c
69
if (camif->sensor.sd == NULL || vp->out_fmt == NULL)
drivers/media/platform/samsung/s3c-camif/camif-capture.c
819
ret = v4l2_subdev_call(camif->sensor.sd, pad, get_fmt, NULL, &src_fmt);
drivers/media/platform/samsung/s3c-camif/camif-capture.c
836
struct media_entity *sensor = &camif->sensor.sd->entity;
drivers/media/platform/samsung/s3c-camif/camif-capture.c
880
media_pipeline_stop(camif->sensor.sd->entity.pads);
drivers/media/platform/samsung/s3c-camif/camif-core.c
196
struct v4l2_subdev *sd;
drivers/media/platform/samsung/s3c-camif/camif-core.c
199
camif->sensor.sd = NULL;
drivers/media/platform/samsung/s3c-camif/camif-core.c
211
sd = v4l2_i2c_new_subdev_board(v4l2_dev, adapter,
drivers/media/platform/samsung/s3c-camif/camif-core.c
213
if (sd == NULL) {
drivers/media/platform/samsung/s3c-camif/camif-core.c
219
camif->sensor.sd = sd;
drivers/media/platform/samsung/s3c-camif/camif-core.c
221
v4l2_info(v4l2_dev, "registered sensor subdevice %s\n", sd->name);
drivers/media/platform/samsung/s3c-camif/camif-core.c
225
ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &format);
drivers/media/platform/samsung/s3c-camif/camif-core.c
233
v4l2_info(sd, "Initial format from sensor: %dx%d, %#x\n",
drivers/media/platform/samsung/s3c-camif/camif-core.c
241
struct v4l2_subdev *sd = camif->sensor.sd;
drivers/media/platform/samsung/s3c-camif/camif-core.c
242
struct i2c_client *client = sd ? v4l2_get_subdevdata(sd) : NULL;
drivers/media/platform/samsung/s3c-camif/camif-core.c
249
v4l2_device_unregister_subdev(sd);
drivers/media/platform/samsung/s3c-camif/camif-core.c
250
camif->sensor.sd = NULL;
drivers/media/platform/samsung/s3c-camif/camif-core.c
259
ret = media_create_pad_link(&camif->sensor.sd->entity, 0,
drivers/media/platform/samsung/s3c-camif/camif-core.h
281
struct v4l2_subdev *sd;
drivers/media/platform/st/stm32/stm32-csi.c
1003
csidev->sd.owner = THIS_MODULE;
drivers/media/platform/st/stm32/stm32-csi.c
1004
csidev->sd.dev = &pdev->dev;
drivers/media/platform/st/stm32/stm32-csi.c
1005
csidev->sd.internal_ops = &stm32_csi_subdev_internal_ops;
drivers/media/platform/st/stm32/stm32-csi.c
1006
v4l2_subdev_init(&csidev->sd, &stm32_csi_subdev_ops);
drivers/media/platform/st/stm32/stm32-csi.c
1007
v4l2_set_subdevdata(&csidev->sd, &pdev->dev);
drivers/media/platform/st/stm32/stm32-csi.c
1008
snprintf(csidev->sd.name, sizeof(csidev->sd.name), "%s",
drivers/media/platform/st/stm32/stm32-csi.c
1012
csidev->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/platform/st/stm32/stm32-csi.c
1013
csidev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/st/stm32/stm32-csi.c
1017
ret = media_entity_pads_init(&csidev->sd.entity, STM32_CSI_PAD_MAX,
drivers/media/platform/st/stm32/stm32-csi.c
1022
ret = v4l2_subdev_init_finalize(&csidev->sd);
drivers/media/platform/st/stm32/stm32-csi.c
1052
ret = v4l2_async_register_subdev(&csidev->sd);
drivers/media/platform/st/stm32/stm32-csi.c
1070
v4l2_async_unregister_subdev(&csidev->sd);
drivers/media/platform/st/stm32/stm32-csi.c
194
struct v4l2_subdev sd;
drivers/media/platform/st/stm32/stm32-csi.c
352
static inline struct stm32_csi_dev *to_csidev(struct v4l2_subdev *sd)
drivers/media/platform/st/stm32/stm32-csi.c
354
return container_of(sd, struct stm32_csi_dev, sd);
drivers/media/platform/st/stm32/stm32-csi.c
662
static int stm32_csi_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-csi.c
666
struct stm32_csi_dev *csidev = to_csidev(sd);
drivers/media/platform/st/stm32/stm32-csi.c
684
static int stm32_csi_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-csi.c
688
struct stm32_csi_dev *csidev = to_csidev(sd);
drivers/media/platform/st/stm32/stm32-csi.c
716
static int stm32_csi_init_state(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-csi.c
721
for (i = 0; i < sd->entity.num_pads; i++)
drivers/media/platform/st/stm32/stm32-csi.c
727
static int stm32_csi_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-csi.c
738
static int stm32_csi_set_pad_format(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-csi.c
742
struct stm32_csi_dev *csidev = to_csidev(sd);
drivers/media/platform/st/stm32/stm32-csi.c
766
static int stm32_csi_log_status(struct v4l2_subdev *sd)
drivers/media/platform/st/stm32/stm32-csi.c
768
struct stm32_csi_dev *csidev = to_csidev(sd);
drivers/media/platform/st/stm32/stm32-csi.c
823
struct v4l2_subdev *sd = notifier->sd;
drivers/media/platform/st/stm32/stm32-csi.c
824
struct stm32_csi_dev *csidev = to_csidev(sd);
drivers/media/platform/st/stm32/stm32-csi.c
840
remote_pad, &csidev->sd.entity,
drivers/media/platform/st/stm32/stm32-csi.c
954
v4l2_async_subdev_nf_init(&csidev->notifier, &csidev->sd);
drivers/media/platform/st/stm32/stm32-dcmi.c
1426
struct v4l2_subdev *sd = dcmi->source;
drivers/media/platform/st/stm32/stm32-dcmi.c
1439
ret = v4l2_subdev_call(sd, core, s_power, 1);
drivers/media/platform/st/stm32/stm32-dcmi.c
1445
v4l2_subdev_call(sd, core, s_power, 0);
drivers/media/platform/st/stm32/stm32-dcmi.c
1457
struct v4l2_subdev *sd = dcmi->source;
drivers/media/platform/st/stm32/stm32-dcmi.c
1468
v4l2_subdev_call(sd, core, s_power, 0);
drivers/media/platform/st/stm32/stm32-dcmi.c
1795
struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
100
struct v4l2_subdev sd;
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
190
static int dcmipp_byteproc_init_state(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
195
for (i = 0; i < sd->entity.num_pads; i++) {
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
217
dcmipp_byteproc_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
242
dcmipp_byteproc_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
266
static int dcmipp_byteproc_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
273
if (v4l2_subdev_is_streaming(sd))
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
300
static int dcmipp_byteproc_get_selection(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
353
static int dcmipp_byteproc_set_selection(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
357
struct dcmipp_byteproc_device *byteproc = v4l2_get_subdevdata(sd);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
479
static int dcmipp_byteproc_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
483
struct dcmipp_byteproc_device *byteproc = v4l2_get_subdevdata(sd);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
489
s_pad = media_pad_remote_pad_first(&sd->entity.pads[0]);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
508
static int dcmipp_byteproc_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
512
struct dcmipp_byteproc_device *byteproc = v4l2_get_subdevdata(sd);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
518
s_pad = media_pad_remote_pad_first(&sd->entity.pads[0]);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
553
static void dcmipp_byteproc_release(struct v4l2_subdev *sd)
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
555
struct dcmipp_byteproc_device *byteproc = v4l2_get_subdevdata(sd);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
570
dcmipp_ent_sd_unregister(ved, &byteproc->sd);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c
591
ret = dcmipp_ent_sd_register(&byteproc->ved, &byteproc->sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
100
media_entity_cleanup(&sd->entity);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
107
dcmipp_ent_sd_unregister(struct dcmipp_ent_device *ved, struct v4l2_subdev *sd)
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
110
v4l2_device_unregister_subdev(sd);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
41
struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
60
ved->ent = &sd->entity;
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
63
v4l2_subdev_init(sd, sd_ops);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
64
sd->internal_ops = sd_int_ops;
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
65
sd->entity.function = function;
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
66
sd->entity.ops = &dcmipp_entity_ops;
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
67
sd->owner = THIS_MODULE;
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
68
strscpy(sd->name, name, sizeof(sd->name));
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
69
v4l2_set_subdevdata(sd, ved);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
72
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
73
if (sd->ctrl_handler)
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
74
sd->flags |= V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
77
ret = media_entity_pads_init(&sd->entity, num_pads, ved->pads);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
81
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c
86
ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h
140
struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h
161
struct v4l2_subdev *sd);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c
387
struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c
392
dev_dbg(dcmipp->dev, "Removing %s\n", sd->name);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
175
struct v4l2_subdev sd;
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
191
static int dcmipp_inp_init_state(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
196
for (i = 0; i < sd->entity.num_pads; i++) {
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
206
static int dcmipp_inp_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
221
static int dcmipp_inp_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
271
static int dcmipp_inp_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
275
struct dcmipp_inp_device *inp = v4l2_get_subdevdata(sd);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
278
if (v4l2_subdev_is_streaming(sd))
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
287
inp->sd.name,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
413
static int dcmipp_inp_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
418
container_of(sd, struct dcmipp_inp_device, sd);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
424
s_pad = media_pad_remote_pad_first(&sd->entity.pads[0]);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
447
static int dcmipp_inp_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
452
container_of(sd, struct dcmipp_inp_device, sd);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
458
s_pad = media_pad_remote_pad_first(&sd->entity.pads[0]);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
497
static void dcmipp_inp_release(struct v4l2_subdev *sd)
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
500
container_of(sd, struct dcmipp_inp_device, sd);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
515
dcmipp_ent_sd_unregister(ved, &inp->sd);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-input.c
537
ret = dcmipp_ent_sd_register(&inp->ved, &inp->sd, v4l2_dev,
drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c
415
struct v4l2_subdev *subdev = notifier->sd;
drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c
452
struct v4l2_subdev *subdev = notifier->sd;
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
184
static inline struct dw_mipi_csi2rx_device *to_csi2(struct v4l2_subdev *sd)
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
186
return container_of(sd, struct dw_mipi_csi2rx_device, sd);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
287
dw_mipi_csi2rx_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
291
struct dw_mipi_csi2rx_device *csi2 = to_csi2(sd);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
314
static int dw_mipi_csi2rx_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
318
struct dw_mipi_csi2rx_device *csi2 = to_csi2(sd);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
324
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
347
static int dw_mipi_csi2rx_set_routing(struct v4l2_subdev *sd,
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
354
ret = v4l2_subdev_routing_validate(sd, routing,
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
359
return v4l2_subdev_set_routing_with_fmt(sd, state, routing,
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
363
static int dw_mipi_csi2rx_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
367
struct dw_mipi_csi2rx_device *csi2 = to_csi2(sd);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
374
sink_pad = &sd->entity.pads[DW_MIPI_CSI2RX_PAD_SINK];
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
406
static int dw_mipi_csi2rx_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
410
struct dw_mipi_csi2rx_device *csi2 = to_csi2(sd);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
417
sink_pad = &sd->entity.pads[DW_MIPI_CSI2RX_PAD_SINK];
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
447
static int dw_mipi_csi2rx_init_state(struct v4l2_subdev *sd,
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
465
return v4l2_subdev_set_routing_with_fmt(sd, state, &routing,
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
474
struct v4l2_subdev *sd,
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
482
ret = v4l2_create_fwnode_links_to_pad(sd, sink_pad,
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
486
sd->name);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
502
struct v4l2_subdev *sd = &csi2->sd;
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
524
v4l2_async_subdev_nf_init(ntf, sd);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
551
struct v4l2_subdev *sd = &csi2->sd;
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
558
v4l2_subdev_init(sd, &dw_mipi_csi2rx_ops);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
559
sd->dev = csi2->dev;
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
560
sd->entity.ops = &dw_mipi_csi2rx_media_ops;
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
561
sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
562
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_STREAMS;
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
563
sd->internal_ops = &dw_mipi_csi2rx_internal_ops;
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
564
snprintf(sd->name, sizeof(sd->name), "dw-mipi-csi2rx %s",
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
570
ret = media_entity_pads_init(&sd->entity, DW_MIPI_CSI2RX_PAD_MAX, pads);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
574
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
578
ret = v4l2_async_register_subdev(sd);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
580
dev_err(sd->dev, "failed to register CSI-2 subdev\n");
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
587
v4l2_subdev_cleanup(sd);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
589
media_entity_cleanup(&sd->entity);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
599
struct v4l2_subdev *sd = &csi2->sd;
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
601
v4l2_async_unregister_subdev(sd);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
602
v4l2_subdev_cleanup(sd);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
603
media_entity_cleanup(&sd->entity);
drivers/media/platform/synopsys/dw-mipi-csi2rx.c
71
struct v4l2_subdev sd;
drivers/media/platform/ti/am437x/am437x-vpfe.c
1015
sdinfo->sd = vpfe->sd[0];
drivers/media/platform/ti/am437x/am437x-vpfe.c
1283
struct v4l2_subdev *sd = vpfe->current_subdev->sd;
drivers/media/platform/ti/am437x/am437x-vpfe.c
1291
ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &sd_fmt);
drivers/media/platform/ti/am437x/am437x-vpfe.c
1307
struct v4l2_subdev *sd = vpfe->current_subdev->sd;
drivers/media/platform/ti/am437x/am437x-vpfe.c
1317
ret = v4l2_subdev_call(sd, pad, set_fmt, NULL, &sd_fmt);
drivers/media/platform/ti/am437x/am437x-vpfe.c
1371
if (!sdinfo->sd)
drivers/media/platform/ti/am437x/am437x-vpfe.c
1391
struct v4l2_subdev *sd = vpfe->current_subdev->sd;
drivers/media/platform/ti/am437x/am437x-vpfe.c
1415
ret = v4l2_subdev_call(sd, pad, enum_frame_size,
drivers/media/platform/ti/am437x/am437x-vpfe.c
1503
struct v4l2_subdev *sd = vpfe->current_subdev->sd;
drivers/media/platform/ti/am437x/am437x-vpfe.c
1520
ret = v4l2_subdev_call(sd, pad, enum_frame_size, NULL, &fse);
drivers/media/platform/ti/am437x/am437x-vpfe.c
1576
curr_client = v4l2_get_subdevdata(vpfe->current_subdev->sd);
drivers/media/platform/ti/am437x/am437x-vpfe.c
1579
client = v4l2_get_subdevdata(sdinfo->sd);
drivers/media/platform/ti/am437x/am437x-vpfe.c
1642
sdinfo->sd = vpfe->sd[subdev_index];
drivers/media/platform/ti/am437x/am437x-vpfe.c
1647
if (sdinfo->sd) {
drivers/media/platform/ti/am437x/am437x-vpfe.c
1648
ret = v4l2_subdev_call(sdinfo->sd, video,
drivers/media/platform/ti/am437x/am437x-vpfe.c
1660
if (sdinfo->sd)
drivers/media/platform/ti/am437x/am437x-vpfe.c
1661
vpfe->v4l2_dev.ctrl_handler = sdinfo->sd->ctrl_handler;
drivers/media/platform/ti/am437x/am437x-vpfe.c
1904
ret = v4l2_subdev_call(sdinfo->sd, video, s_stream, 1);
drivers/media/platform/ti/am437x/am437x-vpfe.c
1941
ret = v4l2_subdev_call(sdinfo->sd, video, s_stream, 0);
drivers/media/platform/ti/am437x/am437x-vpfe.c
2156
vpfe->sd[i] = subdev;
drivers/media/platform/ti/am437x/am437x-vpfe.c
2157
vpfe->sd[i]->grp_id = sdinfo->grp_id;
drivers/media/platform/ti/am437x/am437x-vpfe.c
2219
vpfe->v4l2_dev.ctrl_handler = vpfe->sd[0]->ctrl_handler;
drivers/media/platform/ti/am437x/am437x-vpfe.c
2450
vpfe->sd = devm_kcalloc(&pdev->dev,
drivers/media/platform/ti/am437x/am437x-vpfe.c
2454
if (!vpfe->sd) {
drivers/media/platform/ti/am437x/am437x-vpfe.h
230
struct v4l2_subdev **sd;
drivers/media/platform/ti/am437x/am437x-vpfe.h
80
struct v4l2_subdev *sd;
drivers/media/platform/ti/cal/cal-camerarx.c
1000
v4l2_subdev_init(sd, &cal_camerarx_subdev_ops);
drivers/media/platform/ti/cal/cal-camerarx.c
1001
sd->internal_ops = &cal_camerarx_internal_ops;
drivers/media/platform/ti/cal/cal-camerarx.c
1002
sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/media/platform/ti/cal/cal-camerarx.c
1003
sd->flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_STREAMS;
drivers/media/platform/ti/cal/cal-camerarx.c
1004
snprintf(sd->name, sizeof(sd->name), "CAMERARX%u", instance);
drivers/media/platform/ti/cal/cal-camerarx.c
1005
sd->dev = cal->dev;
drivers/media/platform/ti/cal/cal-camerarx.c
1010
sd->entity.ops = &cal_camerarx_media_ops;
drivers/media/platform/ti/cal/cal-camerarx.c
1011
ret = media_entity_pads_init(&sd->entity, ARRAY_SIZE(phy->pads),
drivers/media/platform/ti/cal/cal-camerarx.c
1016
ret = v4l2_subdev_init_finalize(sd);
drivers/media/platform/ti/cal/cal-camerarx.c
1020
ret = v4l2_device_register_subdev(&cal->v4l2_dev, sd);
drivers/media/platform/ti/cal/cal-camerarx.c
1027
v4l2_subdev_cleanup(sd);
drivers/media/platform/ti/cal/cal-camerarx.c
645
static inline struct cal_camerarx *to_cal_camerarx(struct v4l2_subdev *sd)
drivers/media/platform/ti/cal/cal-camerarx.c
647
return container_of(sd, struct cal_camerarx, subdev);
drivers/media/platform/ti/cal/cal-camerarx.c
653
struct v4l2_subdev *sd;
drivers/media/platform/ti/cal/cal-camerarx.c
655
sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/ti/cal/cal-camerarx.c
656
if (!sd)
drivers/media/platform/ti/cal/cal-camerarx.c
659
return to_cal_camerarx(sd);
drivers/media/platform/ti/cal/cal-camerarx.c
662
static int cal_camerarx_sd_enable_streams(struct v4l2_subdev *sd,
drivers/media/platform/ti/cal/cal-camerarx.c
666
struct cal_camerarx *phy = to_cal_camerarx(sd);
drivers/media/platform/ti/cal/cal-camerarx.c
678
static int cal_camerarx_sd_disable_streams(struct v4l2_subdev *sd,
drivers/media/platform/ti/cal/cal-camerarx.c
682
struct cal_camerarx *phy = to_cal_camerarx(sd);
drivers/media/platform/ti/cal/cal-camerarx.c
696
static int cal_camerarx_sd_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/ti/cal/cal-camerarx.c
724
static int cal_camerarx_sd_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/ti/cal/cal-camerarx.c
764
static int cal_camerarx_sd_set_fmt(struct v4l2_subdev *sd,
drivers/media/platform/ti/cal/cal-camerarx.c
774
return v4l2_subdev_get_fmt(sd, state, format);
drivers/media/platform/ti/cal/cal-camerarx.c
814
static int cal_camerarx_set_routing(struct v4l2_subdev *sd,
drivers/media/platform/ti/cal/cal-camerarx.c
830
ret = v4l2_subdev_routing_validate(sd, routing,
drivers/media/platform/ti/cal/cal-camerarx.c
836
ret = v4l2_subdev_set_routing_with_fmt(sd, state, routing, &format);
drivers/media/platform/ti/cal/cal-camerarx.c
843
static int cal_camerarx_sd_set_routing(struct v4l2_subdev *sd,
drivers/media/platform/ti/cal/cal-camerarx.c
848
return cal_camerarx_set_routing(sd, state, routing);
drivers/media/platform/ti/cal/cal-camerarx.c
851
static int cal_camerarx_sd_init_state(struct v4l2_subdev *sd,
drivers/media/platform/ti/cal/cal-camerarx.c
868
return cal_camerarx_set_routing(sd, state, &routing);
drivers/media/platform/ti/cal/cal-camerarx.c
871
static int cal_camerarx_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/platform/ti/cal/cal-camerarx.c
874
struct cal_camerarx *phy = to_cal_camerarx(sd);
drivers/media/platform/ti/cal/cal-camerarx.c
882
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/ti/cal/cal-camerarx.c
964
struct v4l2_subdev *sd;
drivers/media/platform/ti/cal/cal-camerarx.c
999
sd = &phy->subdev;
drivers/media/platform/ti/cal/cal-video.c
111
struct v4l2_subdev *sd = ctx->phy->source;
drivers/media/platform/ti/cal/cal-video.c
114
ret = v4l2_subdev_call_state_active(sd, pad, get_fmt, &sd_fmt);
drivers/media/platform/ti/cal/cal-video.c
134
struct v4l2_subdev *sd = ctx->phy->source;
drivers/media/platform/ti/cal/cal-video.c
139
ret = v4l2_subdev_call_state_active(sd, pad, set_fmt, &sd_fmt);
drivers/media/platform/ti/cal/cal-video.c
181
struct v4l2_subdev *sd = ctx->phy->source;
drivers/media/platform/ti/cal/cal-video.c
207
ret = v4l2_subdev_call_state_active(sd, pad, enum_frame_size,
drivers/media/platform/ti/cal/cal-video.c
244
struct v4l2_subdev *sd = &ctx->phy->subdev;
drivers/media/platform/ti/cal/cal-video.c
284
v4l2_subdev_call_state_active(sd, pad, set_fmt, &sd_fmt);
drivers/media/platform/ti/cal/cal-video.c
296
struct v4l2_subdev *sd = ctx->phy->source;
drivers/media/platform/ti/cal/cal-video.c
315
ret = v4l2_subdev_call_state_active(sd, pad, enum_frame_size, &fse);
drivers/media/platform/ti/cal/cal-video.c
357
struct v4l2_subdev *sd = ctx->phy->source;
drivers/media/platform/ti/cal/cal-video.c
373
ret = v4l2_subdev_call_state_active(sd, pad, enum_frame_interval, &fie);
drivers/media/platform/ti/cal/cal-video.c
843
struct v4l2_subdev *sd = ctx->phy->source;
drivers/media/platform/ti/cal/cal-video.c
863
ret = v4l2_subdev_call_state_active(sd, pad, enum_mbus_code,
drivers/media/platform/ti/cal/cal-video.c
870
sd->name, ret);
drivers/media/platform/ti/cal/cal-video.c
876
sd->name, mbus_code.code, j);
drivers/media/platform/ti/cal/cal-video.c
894
sd->name);
drivers/media/platform/ti/davinci/vpif_capture.c
1000
ret = v4l2_subdev_call(ch->sd, pad, get_fmt, NULL, &format);
drivers/media/platform/ti/davinci/vpif_capture.c
1101
ret = v4l2_subdev_call(ch->sd, pad, enum_dv_timings, timings);
drivers/media/platform/ti/davinci/vpif_capture.c
1133
ret = v4l2_subdev_call(ch->sd, pad, query_dv_timings, 0, timings);
drivers/media/platform/ti/davinci/vpif_capture.c
1178
ret = v4l2_subdev_call(ch->sd, pad, s_dv_timings, 0, timings);
drivers/media/platform/ti/davinci/vpif_capture.c
1373
vpif_obj.sd[i] = subdev;
drivers/media/platform/ti/davinci/vpif_capture.c
1387
vpif_obj.sd[i] = subdev;
drivers/media/platform/ti/davinci/vpif_capture.c
1653
vpif_obj.sd = kzalloc_objs(*vpif_obj.sd, subdev_count);
drivers/media/platform/ti/davinci/vpif_capture.c
1654
if (!vpif_obj.sd) {
drivers/media/platform/ti/davinci/vpif_capture.c
1666
vpif_obj.sd[i] =
drivers/media/platform/ti/davinci/vpif_capture.c
1673
if (!vpif_obj.sd[i]) {
drivers/media/platform/ti/davinci/vpif_capture.c
1700
kfree(vpif_obj.sd);
drivers/media/platform/ti/davinci/vpif_capture.c
1724
kfree(vpif_obj.sd);
drivers/media/platform/ti/davinci/vpif_capture.c
189
ret = v4l2_subdev_call(ch->sd, video, s_stream, 1);
drivers/media/platform/ti/davinci/vpif_capture.c
279
ret = v4l2_subdev_call(ch->sd, video, s_stream, 0);
drivers/media/platform/ti/davinci/vpif_capture.c
695
struct v4l2_subdev *sd = NULL;
drivers/media/platform/ti/davinci/vpif_capture.c
702
sd = vpif_obj.sd[sd_index];
drivers/media/platform/ti/davinci/vpif_capture.c
710
if (sd && vpif_cfg->setup_input_path) {
drivers/media/platform/ti/davinci/vpif_capture.c
721
if (sd) {
drivers/media/platform/ti/davinci/vpif_capture.c
724
ret = v4l2_subdev_call(sd, video, s_routing,
drivers/media/platform/ti/davinci/vpif_capture.c
732
ch->sd = sd;
drivers/media/platform/ti/davinci/vpif_capture.c
758
ret = v4l2_subdev_call(ch->sd, video, querystd, std_id);
drivers/media/platform/ti/davinci/vpif_capture.c
838
ret = v4l2_subdev_call(ch->sd, video, s_std, std_id);
drivers/media/platform/ti/davinci/vpif_capture.h
102
struct v4l2_subdev **sd;
drivers/media/platform/ti/davinci/vpif_capture.h
90
struct v4l2_subdev *sd;
drivers/media/platform/ti/davinci/vpif_display.c
1143
ch->sd = vpif_obj.sd[0];
drivers/media/platform/ti/davinci/vpif_display.c
1267
vpif_obj.sd = kzalloc_objs(*vpif_obj.sd, subdev_count);
drivers/media/platform/ti/davinci/vpif_display.c
1268
if (!vpif_obj.sd) {
drivers/media/platform/ti/davinci/vpif_display.c
1275
vpif_obj.sd[i] =
drivers/media/platform/ti/davinci/vpif_display.c
1280
if (!vpif_obj.sd[i]) {
drivers/media/platform/ti/davinci/vpif_display.c
1286
vpif_obj.sd[i]->grp_id = 1 << i;
drivers/media/platform/ti/davinci/vpif_display.c
1295
kfree(vpif_obj.sd);
drivers/media/platform/ti/davinci/vpif_display.c
1314
kfree(vpif_obj.sd);
drivers/media/platform/ti/davinci/vpif_display.c
808
struct v4l2_subdev *sd = NULL;
drivers/media/platform/ti/davinci/vpif_display.c
815
sd = vpif_obj.sd[sd_index];
drivers/media/platform/ti/davinci/vpif_display.c
817
if (sd) {
drivers/media/platform/ti/davinci/vpif_display.c
820
ret = v4l2_subdev_call(sd, video, s_routing, input, output, 0);
drivers/media/platform/ti/davinci/vpif_display.c
828
ch->sd = sd;
drivers/media/platform/ti/davinci/vpif_display.c
891
ret = v4l2_subdev_call(ch->sd, pad, enum_dv_timings, timings);
drivers/media/platform/ti/davinci/vpif_display.c
935
ret = v4l2_subdev_call(ch->sd, pad, s_dv_timings, 0, timings);
drivers/media/platform/ti/davinci/vpif_display.h
100
struct v4l2_subdev *sd; /* Current output subdev(may be NULL) */
drivers/media/platform/ti/davinci/vpif_display.h
112
struct v4l2_subdev **sd;
drivers/media/platform/ti/omap3isp/isp.c
1996
struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/isp.c
2006
ret = isp_link_entity(isp, &sd->entity, bus_cfg->interface);
drivers/media/platform/ti/omap3isp/isp.h
228
v4l2_subdev_to_bus_cfg(struct v4l2_subdev *sd)
drivers/media/platform/ti/omap3isp/isp.h
232
asc = v4l2_async_connection_unique(sd);
drivers/media/platform/ti/omap3isp/ispccdc.c
1141
struct v4l2_subdev *sd =
drivers/media/platform/ti/omap3isp/ispccdc.c
1145
bus_cfg = v4l2_subdev_to_bus_cfg(sd);
drivers/media/platform/ti/omap3isp/ispccdc.c
1844
static long ccdc_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
drivers/media/platform/ti/omap3isp/ispccdc.c
1846
struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispccdc.c
1863
static int ccdc_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
drivers/media/platform/ti/omap3isp/ispccdc.c
1888
static int ccdc_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/ti/omap3isp/ispccdc.c
1890
struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispccdc.c
2127
static int ccdc_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispccdc.c
2131
struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispccdc.c
2193
static int ccdc_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispccdc.c
2197
struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispccdc.c
2234
static int ccdc_get_selection(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispccdc.c
2238
struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispccdc.c
2278
static int ccdc_set_selection(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispccdc.c
2282
struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispccdc.c
2324
static int ccdc_get_format(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispccdc.c
2328
struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispccdc.c
2348
static int ccdc_set_format(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispccdc.c
2352
struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispccdc.c
2420
static int ccdc_link_validate(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispccdc.c
2425
struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispccdc.c
2435
struct v4l2_subdev *sd =
drivers/media/platform/ti/omap3isp/ispccdc.c
2439
bus_cfg = v4l2_subdev_to_bus_cfg(sd);
drivers/media/platform/ti/omap3isp/ispccdc.c
2465
static int ccdc_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/platform/ti/omap3isp/ispccdc.c
2475
ccdc_set_format(sd, fh ? fh->state : NULL, &format);
drivers/media/platform/ti/omap3isp/ispccdc.c
2532
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/ti/omap3isp/ispccdc.c
2533
struct isp_ccdc_device *ccdc = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispccdc.c
2658
struct v4l2_subdev *sd = &ccdc->subdev;
drivers/media/platform/ti/omap3isp/ispccdc.c
2660
struct media_entity *me = &sd->entity;
drivers/media/platform/ti/omap3isp/ispccdc.c
2665
v4l2_subdev_init(sd, &ccdc_v4l2_ops);
drivers/media/platform/ti/omap3isp/ispccdc.c
2666
sd->internal_ops = &ccdc_v4l2_internal_ops;
drivers/media/platform/ti/omap3isp/ispccdc.c
2667
strscpy(sd->name, "OMAP3 ISP CCDC", sizeof(sd->name));
drivers/media/platform/ti/omap3isp/ispccdc.c
2668
sd->grp_id = 1 << 16; /* group ID for isp subdevs */
drivers/media/platform/ti/omap3isp/ispccdc.c
2669
v4l2_set_subdevdata(sd, ccdc);
drivers/media/platform/ti/omap3isp/ispccdc.c
2670
sd->flags |= V4L2_SUBDEV_FL_HAS_EVENTS | V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/ti/omap3isp/ispccdc.c
2683
ccdc_init_formats(sd, NULL);
drivers/media/platform/ti/omap3isp/ispccp2.c
1069
struct v4l2_subdev *sd = &ccp2->subdev;
drivers/media/platform/ti/omap3isp/ispccp2.c
1071
struct media_entity *me = &sd->entity;
drivers/media/platform/ti/omap3isp/ispccp2.c
1077
v4l2_subdev_init(sd, &ccp2_sd_ops);
drivers/media/platform/ti/omap3isp/ispccp2.c
1078
sd->internal_ops = &ccp2_sd_internal_ops;
drivers/media/platform/ti/omap3isp/ispccp2.c
1079
strscpy(sd->name, "OMAP3 ISP CCP2", sizeof(sd->name));
drivers/media/platform/ti/omap3isp/ispccp2.c
1080
sd->grp_id = 1 << 16; /* group ID for isp subdevs */
drivers/media/platform/ti/omap3isp/ispccp2.c
1081
v4l2_set_subdevdata(sd, ccp2);
drivers/media/platform/ti/omap3isp/ispccp2.c
1082
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/ti/omap3isp/ispccp2.c
1094
ccp2_init_formats(sd, NULL);
drivers/media/platform/ti/omap3isp/ispccp2.c
695
static int ccp2_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispccp2.c
699
struct isp_ccp2_device *ccp2 = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispccp2.c
719
static int ccp2_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispccp2.c
723
struct isp_ccp2_device *ccp2 = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispccp2.c
756
static int ccp2_get_format(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispccp2.c
760
struct isp_ccp2_device *ccp2 = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispccp2.c
778
static int ccp2_set_format(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispccp2.c
782
struct isp_ccp2_device *ccp2 = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispccp2.c
813
static int ccp2_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/platform/ti/omap3isp/ispccp2.c
823
ccp2_set_format(sd, fh ? fh->state : NULL, &format);
drivers/media/platform/ti/omap3isp/ispccp2.c
834
static int ccp2_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/ti/omap3isp/ispccp2.c
836
struct isp_ccp2_device *ccp2 = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispccp2.c
850
ret = omap3isp_csiphy_acquire(ccp2->phy, &sd->entity);
drivers/media/platform/ti/omap3isp/ispccp2.c
885
if (omap3isp_module_sync_idle(&sd->entity, &ccp2->wait,
drivers/media/platform/ti/omap3isp/ispccp2.c
887
dev_dbg(dev, "%s: module stop timeout.\n", sd->name);
drivers/media/platform/ti/omap3isp/ispccp2.c
966
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/ti/omap3isp/ispccp2.c
967
struct isp_ccp2_device *ccp2 = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispcsi2.c
1000
struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispcsi2.c
1031
static int csi2_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/platform/ti/omap3isp/ispcsi2.c
1041
csi2_set_format(sd, fh ? fh->state : NULL, &format);
drivers/media/platform/ti/omap3isp/ispcsi2.c
1053
static int csi2_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/ti/omap3isp/ispcsi2.c
1055
struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispcsi2.c
1061
if (omap3isp_csiphy_acquire(csi2->phy, &sd->entity) < 0)
drivers/media/platform/ti/omap3isp/ispcsi2.c
1087
if (omap3isp_module_sync_idle(&sd->entity, &csi2->wait,
drivers/media/platform/ti/omap3isp/ispcsi2.c
1090
sd->name);
drivers/media/platform/ti/omap3isp/ispcsi2.c
1144
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/ti/omap3isp/ispcsi2.c
1145
struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispcsi2.c
1236
struct v4l2_subdev *sd = &csi2->subdev;
drivers/media/platform/ti/omap3isp/ispcsi2.c
1238
struct media_entity *me = &sd->entity;
drivers/media/platform/ti/omap3isp/ispcsi2.c
1241
v4l2_subdev_init(sd, &csi2_ops);
drivers/media/platform/ti/omap3isp/ispcsi2.c
1242
sd->internal_ops = &csi2_internal_ops;
drivers/media/platform/ti/omap3isp/ispcsi2.c
1243
strscpy(sd->name, "OMAP3 ISP CSI2a", sizeof(sd->name));
drivers/media/platform/ti/omap3isp/ispcsi2.c
1245
sd->grp_id = 1 << 16; /* group ID for isp subdevs */
drivers/media/platform/ti/omap3isp/ispcsi2.c
1246
v4l2_set_subdevdata(sd, csi2);
drivers/media/platform/ti/omap3isp/ispcsi2.c
1247
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/ti/omap3isp/ispcsi2.c
1259
csi2_init_formats(sd, NULL);
drivers/media/platform/ti/omap3isp/ispcsi2.c
900
static int csi2_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispcsi2.c
904
struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispcsi2.c
937
static int csi2_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispcsi2.c
941
struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispcsi2.c
974
static int csi2_get_format(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispcsi2.c
978
struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispcsi2.c
996
static int csi2_set_format(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/isph3a_aewb.c
241
static long h3a_aewb_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
drivers/media/platform/ti/omap3isp/isph3a_aewb.c
243
struct ispstat *stat = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/isph3a_af.c
305
static long h3a_af_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
drivers/media/platform/ti/omap3isp/isph3a_af.c
307
struct ispstat *stat = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/isphist.c
426
static long hist_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
drivers/media/platform/ti/omap3isp/isphist.c
428
struct ispstat *stat = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/isppreview.c
1609
static long preview_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
drivers/media/platform/ti/omap3isp/isppreview.c
1611
struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/isppreview.c
1628
static int preview_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/ti/omap3isp/isppreview.c
1630
struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/isppreview.c
1667
if (omap3isp_module_sync_idle(&sd->entity, &prev->wait,
drivers/media/platform/ti/omap3isp/isppreview.c
1669
dev_dbg(dev, "%s: stop timeout.\n", sd->name);
drivers/media/platform/ti/omap3isp/isppreview.c
1863
static int preview_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/isppreview.c
1887
static int preview_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/isppreview.c
1891
struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/isppreview.c
1927
static int preview_get_selection(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/isppreview.c
1931
struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/isppreview.c
1970
static int preview_set_selection(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/isppreview.c
1974
struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/isppreview.c
2015
static int preview_get_format(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/isppreview.c
2019
struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/isppreview.c
2037
static int preview_set_format(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/isppreview.c
2041
struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/isppreview.c
2082
static int preview_init_formats(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/isppreview.c
2093
preview_set_format(sd, fh ? fh->state : NULL, &format);
drivers/media/platform/ti/omap3isp/isppreview.c
2146
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/ti/omap3isp/isppreview.c
2147
struct isp_prev_device *prev = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/isppreview.c
2263
struct v4l2_subdev *sd = &prev->subdev;
drivers/media/platform/ti/omap3isp/isppreview.c
2265
struct media_entity *me = &sd->entity;
drivers/media/platform/ti/omap3isp/isppreview.c
2270
v4l2_subdev_init(sd, &preview_v4l2_ops);
drivers/media/platform/ti/omap3isp/isppreview.c
2271
sd->internal_ops = &preview_v4l2_internal_ops;
drivers/media/platform/ti/omap3isp/isppreview.c
2272
strscpy(sd->name, "OMAP3 ISP preview", sizeof(sd->name));
drivers/media/platform/ti/omap3isp/isppreview.c
2273
sd->grp_id = 1 << 16; /* group ID for isp subdevs */
drivers/media/platform/ti/omap3isp/isppreview.c
2274
v4l2_set_subdevdata(sd, prev);
drivers/media/platform/ti/omap3isp/isppreview.c
2275
sd->flags |= V4L2_SUBDEV_FL_HAS_EVENTS | V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/ti/omap3isp/isppreview.c
2285
sd->ctrl_handler = &prev->ctrls;
drivers/media/platform/ti/omap3isp/isppreview.c
2297
preview_init_formats(sd, NULL);
drivers/media/platform/ti/omap3isp/ispresizer.c
1132
static int resizer_set_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/ti/omap3isp/ispresizer.c
1134
struct isp_res_device *res = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispresizer.c
1166
if (omap3isp_module_sync_idle(&sd->entity, &res->wait,
drivers/media/platform/ti/omap3isp/ispresizer.c
1168
dev_dbg(dev, "%s: module stop timeout.\n", sd->name);
drivers/media/platform/ti/omap3isp/ispresizer.c
1224
static int resizer_get_selection(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispresizer.c
1228
struct isp_res_device *res = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispresizer.c
1277
static int resizer_set_selection(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispresizer.c
1281
struct isp_res_device *res = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispresizer.c
1419
static int resizer_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispresizer.c
1423
struct isp_res_device *res = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispresizer.c
1443
static int resizer_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispresizer.c
1447
struct isp_res_device *res = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispresizer.c
1480
static int resizer_get_format(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispresizer.c
1484
struct isp_res_device *res = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispresizer.c
1502
static int resizer_set_format(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispresizer.c
1506
struct isp_res_device *res = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispresizer.c
1546
static int resizer_link_validate(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispresizer.c
1551
struct isp_res_device *res = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispresizer.c
1552
struct isp_pipeline *pipe = to_isp_pipeline(&sd->entity);
drivers/media/platform/ti/omap3isp/ispresizer.c
1556
return v4l2_subdev_link_validate_default(sd, link,
drivers/media/platform/ti/omap3isp/ispresizer.c
1569
static int resizer_init_formats(struct v4l2_subdev *sd,
drivers/media/platform/ti/omap3isp/ispresizer.c
1580
resizer_set_format(sd, fh ? fh->state : NULL, &format);
drivers/media/platform/ti/omap3isp/ispresizer.c
1628
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/ti/omap3isp/ispresizer.c
1629
struct isp_res_device *res = v4l2_get_subdevdata(sd);
drivers/media/platform/ti/omap3isp/ispresizer.c
1722
struct v4l2_subdev *sd = &res->subdev;
drivers/media/platform/ti/omap3isp/ispresizer.c
1724
struct media_entity *me = &sd->entity;
drivers/media/platform/ti/omap3isp/ispresizer.c
1729
v4l2_subdev_init(sd, &resizer_v4l2_ops);
drivers/media/platform/ti/omap3isp/ispresizer.c
1730
sd->internal_ops = &resizer_v4l2_internal_ops;
drivers/media/platform/ti/omap3isp/ispresizer.c
1731
strscpy(sd->name, "OMAP3 ISP resizer", sizeof(sd->name));
drivers/media/platform/ti/omap3isp/ispresizer.c
1732
sd->grp_id = 1 << 16; /* group ID for isp subdevs */
drivers/media/platform/ti/omap3isp/ispresizer.c
1733
v4l2_set_subdevdata(sd, res);
drivers/media/platform/ti/omap3isp/ispresizer.c
1734
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/platform/ti/omap3isp/ispresizer.c
1746
resizer_init_formats(sd, NULL);
drivers/media/platform/video-mux.c
100
dev_dbg(sd->dev, "going inactive\n");
drivers/media/platform/video-mux.c
117
static int video_mux_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/video-mux.c
119
struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
drivers/media/platform/video-mux.c
124
dev_err(sd->dev, "Can not start streaming on inactive mux\n");
drivers/media/platform/video-mux.c
128
pad = media_pad_remote_pad_first(&sd->entity.pads[vmux->active]);
drivers/media/platform/video-mux.c
130
dev_err(sd->dev, "Failed to find remote source pad\n");
drivers/media/platform/video-mux.c
135
dev_err(sd->dev, "Upstream entity is not a v4l2 subdev\n");
drivers/media/platform/video-mux.c
148
static int video_mux_set_format(struct v4l2_subdev *sd,
drivers/media/platform/video-mux.c
152
struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
drivers/media/platform/video-mux.c
155
u16 source_pad = sd->entity.num_pads - 1;
drivers/media/platform/video-mux.c
285
static int video_mux_init_state(struct v4l2_subdev *sd,
drivers/media/platform/video-mux.c
288
struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
drivers/media/platform/video-mux.c
294
for (i = 0; i < sd->entity.num_pads; i++) {
drivers/media/platform/video-mux.c
319
struct v4l2_subdev *sd,
drivers/media/platform/video-mux.c
324
return v4l2_create_fwnode_links(sd, &vmux->subdev);
drivers/media/platform/video-mux.c
45
static inline struct video_mux *v4l2_subdev_to_video_mux(struct v4l2_subdev *sd)
drivers/media/platform/video-mux.c
47
return container_of(sd, struct video_mux, subdev);
drivers/media/platform/video-mux.c
472
struct v4l2_subdev *sd = &vmux->subdev;
drivers/media/platform/video-mux.c
476
v4l2_async_unregister_subdev(sd);
drivers/media/platform/video-mux.c
477
v4l2_subdev_cleanup(sd);
drivers/media/platform/video-mux.c
478
media_entity_cleanup(&sd->entity);
drivers/media/platform/video-mux.c
54
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/media/platform/video-mux.c
56
struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
drivers/media/platform/video-mux.c
67
dev_dbg(sd->dev, "link setup '%s':%d->'%s':%d[%d]",
drivers/media/platform/video-mux.c
71
sd_state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/platform/video-mux.c
85
dev_dbg(sd->dev, "setting %d active\n", local->index);
drivers/media/platform/xilinx/xilinx-csi2rxss.c
389
static int xcsi2rxss_log_status(struct v4l2_subdev *sd)
drivers/media/platform/xilinx/xilinx-csi2rxss.c
391
struct xcsi2rxss_state *xcsi2rxss = to_xcsi2rxssstate(sd);
drivers/media/platform/xilinx/xilinx-csi2rxss.c
626
static int xcsi2rxss_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/platform/xilinx/xilinx-csi2rxss.c
628
struct xcsi2rxss_state *xcsi2rxss = to_xcsi2rxssstate(sd);
drivers/media/platform/xilinx/xilinx-csi2rxss.c
664
static int xcsi2rxss_init_state(struct v4l2_subdev *sd,
drivers/media/platform/xilinx/xilinx-csi2rxss.c
667
struct xcsi2rxss_state *xcsi2rxss = to_xcsi2rxssstate(sd);
drivers/media/platform/xilinx/xilinx-csi2rxss.c
681
static int xcsi2rxss_get_format(struct v4l2_subdev *sd,
drivers/media/platform/xilinx/xilinx-csi2rxss.c
685
struct xcsi2rxss_state *xcsi2rxss = to_xcsi2rxssstate(sd);
drivers/media/platform/xilinx/xilinx-csi2rxss.c
696
static int xcsi2rxss_set_format(struct v4l2_subdev *sd,
drivers/media/platform/xilinx/xilinx-csi2rxss.c
700
struct xcsi2rxss_state *xcsi2rxss = to_xcsi2rxssstate(sd);
drivers/media/platform/xilinx/xilinx-csi2rxss.c
740
static int xcsi2rxss_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/platform/xilinx/xilinx-csi2rxss.c
744
struct xcsi2rxss_state *state = to_xcsi2rxssstate(sd);
drivers/media/radio/saa7706h.c
117
struct v4l2_subdev sd;
drivers/media/radio/saa7706h.c
122
static inline struct saa7706h_state *to_state(struct v4l2_subdev *sd)
drivers/media/radio/saa7706h.c
124
return container_of(sd, struct saa7706h_state, sd);
drivers/media/radio/saa7706h.c
144
static int saa7706h_set_reg24(struct v4l2_subdev *sd, u16 reg, u32 val)
drivers/media/radio/saa7706h.c
146
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/radio/saa7706h.c
159
static int saa7706h_set_reg24_err(struct v4l2_subdev *sd, u16 reg, u32 val,
drivers/media/radio/saa7706h.c
162
return *err ? *err : saa7706h_set_reg24(sd, reg, val);
drivers/media/radio/saa7706h.c
165
static int saa7706h_set_reg16(struct v4l2_subdev *sd, u16 reg, u16 val)
drivers/media/radio/saa7706h.c
167
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/radio/saa7706h.c
179
static int saa7706h_set_reg16_err(struct v4l2_subdev *sd, u16 reg, u16 val,
drivers/media/radio/saa7706h.c
182
return *err ? *err : saa7706h_set_reg16(sd, reg, val);
drivers/media/radio/saa7706h.c
185
static int saa7706h_get_reg16(struct v4l2_subdev *sd, u16 reg)
drivers/media/radio/saa7706h.c
187
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/radio/saa7706h.c
212
static int saa7706h_unmute(struct v4l2_subdev *sd)
drivers/media/radio/saa7706h.c
214
struct saa7706h_state *state = to_state(sd);
drivers/media/radio/saa7706h.c
217
err = saa7706h_set_reg16_err(sd, SAA7706H_REG_CTRL,
drivers/media/radio/saa7706h.c
224
err = saa7706h_set_reg16_err(sd, SAA7706H_REG_CTRL,
drivers/media/radio/saa7706h.c
227
err = saa7706h_set_reg24_err(sd, SAA7706H_REG_EVALUATION, 0, &err);
drivers/media/radio/saa7706h.c
229
err = saa7706h_set_reg24_err(sd, SAA7706H_REG_CL_GEN1, 0x040022, &err);
drivers/media/radio/saa7706h.c
231
err = saa7706h_set_reg24_err(sd, SAA7706H_REG_CL_GEN2,
drivers/media/radio/saa7706h.c
234
err = saa7706h_set_reg24_err(sd, SAA7706H_REG_CL_GEN4, 0x024080, &err);
drivers/media/radio/saa7706h.c
236
err = saa7706h_set_reg24_err(sd, SAA7706H_REG_SEL, 0x200080, &err);
drivers/media/radio/saa7706h.c
238
err = saa7706h_set_reg24_err(sd, SAA7706H_REG_IAC, 0xf4caed, &err);
drivers/media/radio/saa7706h.c
240
err = saa7706h_set_reg24_err(sd, SAA7706H_REG_CLK_SET, 0x124334, &err);
drivers/media/radio/saa7706h.c
242
err = saa7706h_set_reg24_err(sd, SAA7706H_REG_CLK_COEFF, 0x004a1a,
drivers/media/radio/saa7706h.c
245
err = saa7706h_set_reg24_err(sd, SAA7706H_REG_INPUT_SENS, 0x0071c7,
drivers/media/radio/saa7706h.c
248
err = saa7706h_set_reg24_err(sd, SAA7706H_REG_PHONE_NAV_AUDIO,
drivers/media/radio/saa7706h.c
251
err = saa7706h_set_reg24_err(sd, SAA7706H_REG_IO_CONF_DSP2, 0x001ff8,
drivers/media/radio/saa7706h.c
254
err = saa7706h_set_reg24_err(sd, SAA7706H_REG_STATUS_DSP2, 0x080003,
drivers/media/radio/saa7706h.c
257
err = saa7706h_set_reg24_err(sd, SAA7706H_REG_PC_DSP2, 0x000004, &err);
drivers/media/radio/saa7706h.c
259
err = saa7706h_set_reg16_err(sd, SAA7706H_DSP1_MOD0, 0x0c6c, &err);
drivers/media/radio/saa7706h.c
261
err = saa7706h_set_reg24_err(sd, SAA7706H_DSP2_MPTR0, 0x000b4b, &err);
drivers/media/radio/saa7706h.c
263
err = saa7706h_set_reg24_err(sd, SAA7706H_DSP1_MODPNTR, 0x000600, &err);
drivers/media/radio/saa7706h.c
265
err = saa7706h_set_reg24_err(sd, SAA7706H_DSP1_MODPNTR, 0x0000c0, &err);
drivers/media/radio/saa7706h.c
267
err = saa7706h_set_reg24_err(sd, SAA7706H_DSP2_XMEM_CONTLLCW, 0x000819,
drivers/media/radio/saa7706h.c
270
err = saa7706h_set_reg24_err(sd, SAA7706H_DSP2_XMEM_CONTLLCW, 0x00085a,
drivers/media/radio/saa7706h.c
273
err = saa7706h_set_reg24_err(sd, SAA7706H_DSP2_XMEM_BUSAMP, 0x7fffff,
drivers/media/radio/saa7706h.c
276
err = saa7706h_set_reg24_err(sd, SAA7706H_DSP2_XMEM_FDACPNTR, 0x2000cb,
drivers/media/radio/saa7706h.c
279
err = saa7706h_set_reg24_err(sd, SAA7706H_DSP2_XMEM_IIS1PNTR, 0x2000cb,
drivers/media/radio/saa7706h.c
282
err = saa7706h_set_reg16_err(sd, SAA7706H_DSP2_YMEM_PVGA, 0x0f80, &err);
drivers/media/radio/saa7706h.c
284
err = saa7706h_set_reg16_err(sd, SAA7706H_DSP2_YMEM_PVAT1, 0x0800,
drivers/media/radio/saa7706h.c
287
err = saa7706h_set_reg16_err(sd, SAA7706H_DSP2_YMEM_PVAT, 0x0800, &err);
drivers/media/radio/saa7706h.c
289
err = saa7706h_set_reg24_err(sd, SAA7706H_DSP2_XMEM_CONTLLCW, 0x000905,
drivers/media/radio/saa7706h.c
296
static int saa7706h_mute(struct v4l2_subdev *sd)
drivers/media/radio/saa7706h.c
298
struct saa7706h_state *state = to_state(sd);
drivers/media/radio/saa7706h.c
301
err = saa7706h_set_reg16(sd, SAA7706H_REG_CTRL,
drivers/media/radio/saa7706h.c
317
return saa7706h_mute(&state->sd);
drivers/media/radio/saa7706h.c
318
return saa7706h_unmute(&state->sd);
drivers/media/radio/saa7706h.c
337
struct v4l2_subdev *sd;
drivers/media/radio/saa7706h.c
350
sd = &state->sd;
drivers/media/radio/saa7706h.c
351
v4l2_i2c_subdev_init(sd, client, &empty_ops);
drivers/media/radio/saa7706h.c
356
sd->ctrl_handler = &state->hdl;
drivers/media/radio/saa7706h.c
362
err = saa7706h_get_reg16(sd, SAA7706H_DSP1_ROM_VER);
drivers/media/radio/saa7706h.c
366
v4l2_warn(sd, "Unknown DSP1 ROM code version: 0x%x\n", err);
drivers/media/radio/saa7706h.c
370
err = saa7706h_mute(sd);
drivers/media/radio/saa7706h.c
377
v4l2_device_unregister_subdev(sd);
drivers/media/radio/saa7706h.c
379
kfree(to_state(sd));
drivers/media/radio/saa7706h.c
388
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/radio/saa7706h.c
389
struct saa7706h_state *state = to_state(sd);
drivers/media/radio/saa7706h.c
391
saa7706h_mute(sd);
drivers/media/radio/saa7706h.c
392
v4l2_device_unregister_subdev(sd);
drivers/media/radio/saa7706h.c
394
kfree(to_state(sd));
drivers/media/radio/si4713/radio-platform-si4713.c
140
struct v4l2_subdev *sd;
drivers/media/radio/si4713/radio-platform-si4713.c
163
sd = i2c_get_clientdata(pdata->subdev);
drivers/media/radio/si4713/radio-platform-si4713.c
164
rval = v4l2_device_register_subdev(&rsdev->v4l2_dev, sd);
drivers/media/radio/si4713/radio-platform-si4713.c
172
rsdev->radio_dev.ctrl_handler = sd->ctrl_handler;
drivers/media/radio/si4713/radio-usb-si4713.c
416
struct v4l2_subdev *sd;
drivers/media/radio/si4713/radio-usb-si4713.c
456
sd = v4l2_i2c_new_subdev_board(&radio->v4l2_dev, adapter,
drivers/media/radio/si4713/radio-usb-si4713.c
458
radio->v4l2_subdev = sd;
drivers/media/radio/si4713/radio-usb-si4713.c
459
if (!sd) {
drivers/media/radio/si4713/radio-usb-si4713.c
465
radio->vdev.ctrl_handler = sd->ctrl_handler;
drivers/media/radio/si4713/si4713.c
1046
static int si4713_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *f);
drivers/media/radio/si4713/si4713.c
1047
static int si4713_s_modulator(struct v4l2_subdev *sd, const struct v4l2_modulator *);
drivers/media/radio/si4713/si4713.c
1062
rval = si4713_s_frequency(&sdev->sd, &f);
drivers/media/radio/si4713/si4713.c
1071
si4713_s_modulator(&sdev->sd, &vm);
drivers/media/radio/si4713/si4713.c
1219
static long si4713_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
drivers/media/radio/si4713/si4713.c
1221
struct si4713_device *sdev = to_si4713_device(sd);
drivers/media/radio/si4713/si4713.c
1255
static int si4713_g_modulator(struct v4l2_subdev *sd, struct v4l2_modulator *vm)
drivers/media/radio/si4713/si4713.c
1257
struct si4713_device *sdev = to_si4713_device(sd);
drivers/media/radio/si4713/si4713.c
1301
static int si4713_s_modulator(struct v4l2_subdev *sd, const struct v4l2_modulator *vm)
drivers/media/radio/si4713/si4713.c
1303
struct si4713_device *sdev = to_si4713_device(sd);
drivers/media/radio/si4713/si4713.c
1346
static int si4713_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
drivers/media/radio/si4713/si4713.c
1348
struct si4713_device *sdev = to_si4713_device(sd);
drivers/media/radio/si4713/si4713.c
1371
static int si4713_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *f)
drivers/media/radio/si4713/si4713.c
1373
struct si4713_device *sdev = to_si4713_device(sd);
drivers/media/radio/si4713/si4713.c
1475
v4l2_i2c_subdev_init(&sdev->sd, client, &si4713_subdev_ops);
drivers/media/radio/si4713/si4713.c
1572
sdev->sd.ctrl_handler = hdl;
drivers/media/radio/si4713/si4713.c
1579
v4l2_err(&sdev->sd, "Could not request IRQ\n");
drivers/media/radio/si4713/si4713.c
1582
v4l2_dbg(1, debug, &sdev->sd, "IRQ requested.\n");
drivers/media/radio/si4713/si4713.c
1584
v4l2_warn(&sdev->sd, "IRQ not configured. Using timeouts.\n");
drivers/media/radio/si4713/si4713.c
1589
v4l2_err(&sdev->sd, "Failed to probe device information.\n");
drivers/media/radio/si4713/si4713.c
1618
v4l2_device_unregister_subdev(&sdev->sd);
drivers/media/radio/si4713/si4713.c
1628
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/radio/si4713/si4713.c
1629
struct si4713_device *sdev = to_si4713_device(sd);
drivers/media/radio/si4713/si4713.c
1636
v4l2_device_unregister_subdev(sd);
drivers/media/radio/si4713/si4713.c
1637
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/radio/si4713/si4713.c
176
v4l2_dbg(2, debug, &sdev->sd,
drivers/media/radio/si4713/si4713.c
197
struct i2c_client *client = v4l2_get_subdevdata(&sdev->sd);
drivers/media/radio/si4713/si4713.c
208
DBG_BUFFER(&sdev->sd, "Parameters", data1, argn + 1);
drivers/media/radio/si4713/si4713.c
212
v4l2_err(&sdev->sd, "Error while sending command 0x%02x\n",
drivers/media/radio/si4713/si4713.c
223
v4l2_warn(&sdev->sd,
drivers/media/radio/si4713/si4713.c
231
v4l2_err(&sdev->sd,
drivers/media/radio/si4713/si4713.c
237
DBG_BUFFER(&sdev->sd, "Response", response, respn);
drivers/media/radio/si4713/si4713.c
282
v4l2_dbg(1, debug, &sdev->sd,
drivers/media/radio/si4713/si4713.c
322
v4l2_dbg(1, debug, &sdev->sd,
drivers/media/radio/si4713/si4713.c
342
struct i2c_client *client = v4l2_get_subdevdata(&sdev->sd);
drivers/media/radio/si4713/si4713.c
360
v4l2_err(&sdev->sd, "Failed to enable vdd: %d\n", err);
drivers/media/radio/si4713/si4713.c
368
v4l2_err(&sdev->sd, "Failed to enable vio: %d\n", err);
drivers/media/radio/si4713/si4713.c
387
v4l2_dbg(1, debug, &sdev->sd, "Powerup response: 0x%02x\n",
drivers/media/radio/si4713/si4713.c
389
v4l2_dbg(1, debug, &sdev->sd, "Device in power up mode\n");
drivers/media/radio/si4713/si4713.c
403
v4l2_err(&sdev->sd, "Failed to disable vdd: %d\n", err);
drivers/media/radio/si4713/si4713.c
409
v4l2_err(&sdev->sd, "Failed to disable vio: %d\n", err);
drivers/media/radio/si4713/si4713.c
433
v4l2_dbg(1, debug, &sdev->sd, "Power down response: 0x%02x\n",
drivers/media/radio/si4713/si4713.c
435
v4l2_dbg(1, debug, &sdev->sd, "Device in reset mode\n");
drivers/media/radio/si4713/si4713.c
442
v4l2_err(&sdev->sd,
drivers/media/radio/si4713/si4713.c
450
v4l2_err(&sdev->sd,
drivers/media/radio/si4713/si4713.c
466
struct i2c_client *client = v4l2_get_subdevdata(&sdev->sd);
drivers/media/radio/si4713/si4713.c
479
v4l2_info(&sdev->sd, "chip found @ 0x%02x (%s)\n",
drivers/media/radio/si4713/si4713.c
482
v4l2_err(&sdev->sd, "Invalid product number 0x%X\n", resp[1]);
drivers/media/radio/si4713/si4713.c
496
struct i2c_client *client = v4l2_get_subdevdata(&sdev->sd);
drivers/media/radio/si4713/si4713.c
503
v4l2_warn(&sdev->sd,
drivers/media/radio/si4713/si4713.c
515
v4l2_dbg(1, debug, &sdev->sd,
drivers/media/radio/si4713/si4713.c
53
#define to_si4713_device(sd) container_of(sd, struct si4713_device, sd)
drivers/media/radio/si4713/si4713.c
560
v4l2_dbg(1, debug, &sdev->sd,
drivers/media/radio/si4713/si4713.c
611
v4l2_dbg(1, debug, &sdev->sd,
drivers/media/radio/si4713/si4713.c
660
v4l2_dbg(1, debug, &sdev->sd,
drivers/media/radio/si4713/si4713.c
699
v4l2_dbg(1, debug, &sdev->sd,
drivers/media/radio/si4713/si4713.c
706
v4l2_dbg(1, debug, &sdev->sd,
drivers/media/radio/si4713/si4713.c
745
v4l2_dbg(1, debug, &sdev->sd,
drivers/media/radio/si4713/si4713.c
748
v4l2_dbg(1, debug, &sdev->sd,
drivers/media/radio/si4713/si4713.c
783
v4l2_dbg(1, debug, &sdev->sd, "%s: status=0x%02x\n", __func__, val[0]);
drivers/media/radio/si4713/si4713.h
200
struct v4l2_subdev sd;
drivers/media/radio/tef6862.c
117
static int tef6862_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
drivers/media/radio/tef6862.c
119
struct tef6862_state *state = to_state(sd);
drivers/media/radio/tef6862.c
147
struct v4l2_subdev *sd;
drivers/media/radio/tef6862.c
161
sd = &state->sd;
drivers/media/radio/tef6862.c
162
v4l2_i2c_subdev_init(sd, client, &tef6862_ops);
drivers/media/radio/tef6862.c
169
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/radio/tef6862.c
171
v4l2_device_unregister_subdev(sd);
drivers/media/radio/tef6862.c
172
kfree(to_state(sd));
drivers/media/radio/tef6862.c
50
struct v4l2_subdev sd;
drivers/media/radio/tef6862.c
54
static inline struct tef6862_state *to_state(struct v4l2_subdev *sd)
drivers/media/radio/tef6862.c
56
return container_of(sd, struct tef6862_state, sd);
drivers/media/radio/tef6862.c
68
static int tef6862_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v)
drivers/media/radio/tef6862.c
81
v->signal = tef6862_sigstr(v4l2_get_subdevdata(sd));
drivers/media/radio/tef6862.c
86
static int tef6862_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *v)
drivers/media/radio/tef6862.c
91
static int tef6862_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *f)
drivers/media/radio/tef6862.c
93
struct tef6862_state *state = to_state(sd);
drivers/media/radio/tef6862.c
94
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/spi/gs1662.c
199
static int gs_g_register(struct v4l2_subdev *sd,
drivers/media/spi/gs1662.c
202
struct spi_device *spi = v4l2_get_subdevdata(sd);
drivers/media/spi/gs1662.c
212
static int gs_s_register(struct v4l2_subdev *sd,
drivers/media/spi/gs1662.c
215
struct spi_device *spi = v4l2_get_subdevdata(sd);
drivers/media/spi/gs1662.c
249
static inline struct gs *to_gs(struct v4l2_subdev *sd)
drivers/media/spi/gs1662.c
251
return container_of(sd, struct gs, sd);
drivers/media/spi/gs1662.c
254
static int gs_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/spi/gs1662.c
257
struct gs *gs = to_gs(sd);
drivers/media/spi/gs1662.c
271
static int gs_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/spi/gs1662.c
274
struct gs *gs = to_gs(sd);
drivers/media/spi/gs1662.c
283
static int gs_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/spi/gs1662.c
286
struct gs *gs = to_gs(sd);
drivers/media/spi/gs1662.c
326
static int gs_enum_dv_timings(struct v4l2_subdev *sd,
drivers/media/spi/gs1662.c
339
static int gs_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/spi/gs1662.c
341
struct gs *gs = to_gs(sd);
drivers/media/spi/gs1662.c
359
static int gs_g_input_status(struct v4l2_subdev *sd, u32 *status)
drivers/media/spi/gs1662.c
361
struct gs *gs = to_gs(sd);
drivers/media/spi/gs1662.c
395
static int gs_dv_timings_cap(struct v4l2_subdev *sd,
drivers/media/spi/gs1662.c
437
struct v4l2_subdev *sd;
drivers/media/spi/gs1662.c
444
sd = &gs->sd;
drivers/media/spi/gs1662.c
451
v4l2_spi_subdev_init(sd, spi, &gs_ops);
drivers/media/spi/gs1662.c
464
struct v4l2_subdev *sd = spi_get_drvdata(spi);
drivers/media/spi/gs1662.c
466
v4l2_device_unregister_subdev(sd);
drivers/media/spi/gs1662.c
48
struct v4l2_subdev sd;
drivers/media/test-drivers/vimc/vimc-common.c
244
struct v4l2_subdev *sd =
drivers/media/test-drivers/vimc/vimc-common.c
253
ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &sd_fmt);
drivers/media/test-drivers/vimc/vimc-common.c
357
struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-common.c
369
ved->ent = &sd->entity;
drivers/media/test-drivers/vimc/vimc-common.c
372
v4l2_subdev_init(sd, sd_ops);
drivers/media/test-drivers/vimc/vimc-common.c
373
sd->internal_ops = int_ops;
drivers/media/test-drivers/vimc/vimc-common.c
374
sd->entity.function = function;
drivers/media/test-drivers/vimc/vimc-common.c
375
sd->entity.ops = &vimc_ent_sd_mops;
drivers/media/test-drivers/vimc/vimc-common.c
376
sd->owner = THIS_MODULE;
drivers/media/test-drivers/vimc/vimc-common.c
377
strscpy(sd->name, name, sizeof(sd->name));
drivers/media/test-drivers/vimc/vimc-common.c
378
v4l2_set_subdevdata(sd, ved);
drivers/media/test-drivers/vimc/vimc-common.c
381
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/test-drivers/vimc/vimc-common.c
382
if (sd->ctrl_handler)
drivers/media/test-drivers/vimc/vimc-common.c
383
sd->flags |= V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/test-drivers/vimc/vimc-common.c
386
ret = media_entity_pads_init(&sd->entity, num_pads, pads);
drivers/media/test-drivers/vimc/vimc-common.c
395
if (sd->ctrl_handler)
drivers/media/test-drivers/vimc/vimc-common.c
396
sd->state_lock = sd->ctrl_handler->lock;
drivers/media/test-drivers/vimc/vimc-common.c
398
ret = v4l2_subdev_init_finalize(sd);
drivers/media/test-drivers/vimc/vimc-common.c
408
ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/media/test-drivers/vimc/vimc-common.c
419
v4l2_subdev_cleanup(sd);
drivers/media/test-drivers/vimc/vimc-common.c
421
media_entity_cleanup(&sd->entity);
drivers/media/test-drivers/vimc/vimc-common.h
225
struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-debayer.c
163
static int vimc_debayer_init_state(struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-debayer.c
178
static int vimc_debayer_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-debayer.c
197
static int vimc_debayer_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-debayer.c
242
static int vimc_debayer_set_fmt(struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-debayer.c
246
struct vimc_debayer_device *vdebayer = v4l2_get_subdevdata(sd);
drivers/media/test-drivers/vimc/vimc-debayer.c
258
return v4l2_subdev_get_fmt(sd, sd_state, fmt);
drivers/media/test-drivers/vimc/vimc-debayer.c
267
"new:%dx%d (0x%x, %d, %d, %d, %d)\n", vdebayer->sd.name,
drivers/media/test-drivers/vimc/vimc-debayer.c
316
static int vimc_debayer_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/test-drivers/vimc/vimc-debayer.c
318
struct vimc_debayer_device *vdebayer = v4l2_get_subdevdata(sd);
drivers/media/test-drivers/vimc/vimc-debayer.c
330
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/test-drivers/vimc/vimc-debayer.c
34
struct v4l2_subdev sd;
drivers/media/test-drivers/vimc/vimc-debayer.c
426
vdebayer->sd.name, lin, col, vdebayer->hw.size.height, seek);
drivers/media/test-drivers/vimc/vimc-debayer.c
459
vdebayer->sd.name, index, wlin, wcol, color);
drivers/media/test-drivers/vimc/vimc-debayer.c
470
vdebayer->sd.name, rgb[color], n_rgb[color]);
drivers/media/test-drivers/vimc/vimc-debayer.c
478
vdebayer->sd.name, lin, col, i, rgb[i], n_rgb[i]);
drivers/media/test-drivers/vimc/vimc-debayer.c
485
vdebayer->sd.name, lin, col, i, rgb[i]);
drivers/media/test-drivers/vimc/vimc-debayer.c
536
v4l2_subdev_cleanup(&vdebayer->sd);
drivers/media/test-drivers/vimc/vimc-debayer.c
575
vdebayer->sd.ctrl_handler = &vdebayer->hdl;
drivers/media/test-drivers/vimc/vimc-debayer.c
585
ret = vimc_ent_sd_register(&vdebayer->ved, &vdebayer->sd, v4l2_dev,
drivers/media/test-drivers/vimc/vimc-lens.c
19
struct v4l2_subdev sd;
drivers/media/test-drivers/vimc/vimc-lens.c
66
vlens->sd.ctrl_handler = &vlens->hdl;
drivers/media/test-drivers/vimc/vimc-lens.c
73
ret = vimc_ent_sd_register(&vlens->ved, &vlens->sd, v4l2_dev,
drivers/media/test-drivers/vimc/vimc-lens.c
95
v4l2_subdev_cleanup(&vlens->sd);
drivers/media/test-drivers/vimc/vimc-scaler.c
119
static int vimc_scaler_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-scaler.c
142
static int vimc_scaler_set_fmt(struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-scaler.c
146
struct vimc_scaler_device *vscaler = v4l2_get_subdevdata(sd);
drivers/media/test-drivers/vimc/vimc-scaler.c
206
static int vimc_scaler_get_selection(struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-scaler.c
241
static int vimc_scaler_set_selection(struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-scaler.c
245
struct vimc_scaler_device *vscaler = v4l2_get_subdevdata(sd);
drivers/media/test-drivers/vimc/vimc-scaler.c
273
static int vimc_scaler_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/test-drivers/vimc/vimc-scaler.c
275
struct vimc_scaler_device *vscaler = v4l2_get_subdevdata(sd);
drivers/media/test-drivers/vimc/vimc-scaler.c
28
struct v4l2_subdev sd;
drivers/media/test-drivers/vimc/vimc-scaler.c
286
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/test-drivers/vimc/vimc-scaler.c
382
v4l2_subdev_cleanup(&vscaler->sd);
drivers/media/test-drivers/vimc/vimc-scaler.c
403
ret = vimc_ent_sd_register(&vscaler->ved, &vscaler->sd, v4l2_dev,
drivers/media/test-drivers/vimc/vimc-scaler.c
80
static int vimc_scaler_init_state(struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-scaler.c
87
for (i = 0; i < sd->entity.num_pads; i++) {
drivers/media/test-drivers/vimc/vimc-scaler.c
98
static int vimc_scaler_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-sensor.c
137
static int vimc_sensor_set_fmt(struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-sensor.c
141
struct vimc_sensor_device *vsensor = v4l2_get_subdevdata(sd);
drivers/media/test-drivers/vimc/vimc-sensor.c
155
"new:%dx%d (0x%x, %d, %d, %d, %d)\n", vsensor->sd.name,
drivers/media/test-drivers/vimc/vimc-sensor.c
228
static int vimc_sensor_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/test-drivers/vimc/vimc-sensor.c
231
container_of(sd, struct vimc_sensor_device, sd);
drivers/media/test-drivers/vimc/vimc-sensor.c
239
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/test-drivers/vimc/vimc-sensor.c
25
struct v4l2_subdev sd;
drivers/media/test-drivers/vimc/vimc-sensor.c
339
v4l2_subdev_cleanup(&vsensor->sd);
drivers/media/test-drivers/vimc/vimc-sensor.c
406
vsensor->sd.ctrl_handler = &vsensor->hdl;
drivers/media/test-drivers/vimc/vimc-sensor.c
420
ret = vimc_ent_sd_register(&vsensor->ved, &vsensor->sd, v4l2_dev,
drivers/media/test-drivers/vimc/vimc-sensor.c
51
static int vimc_sensor_init_state(struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-sensor.c
62
static int vimc_sensor_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-sensor.c
76
static int vimc_sensor_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/test-drivers/vimc/vimc-streamer.c
102
sd = media_entity_to_v4l2_subdev(ved->ent);
drivers/media/test-drivers/vimc/vimc-streamer.c
103
ret = v4l2_subdev_call(sd, video, s_stream, 1);
drivers/media/test-drivers/vimc/vimc-streamer.c
128
sd = media_entity_to_v4l2_subdev(entity);
drivers/media/test-drivers/vimc/vimc-streamer.c
129
ved = v4l2_get_subdevdata(sd);
drivers/media/test-drivers/vimc/vimc-streamer.c
51
struct v4l2_subdev *sd;
drivers/media/test-drivers/vimc/vimc-streamer.c
61
sd = media_entity_to_v4l2_subdev(ved->ent);
drivers/media/test-drivers/vimc/vimc-streamer.c
66
if (!v4l2_subdev_is_streaming(sd))
drivers/media/test-drivers/vimc/vimc-streamer.c
68
v4l2_subdev_call(sd, video, s_stream, 0);
drivers/media/test-drivers/vimc/vimc-streamer.c
90
struct v4l2_subdev *sd;
drivers/media/tuners/e4000.c
278
static inline struct e4000_dev *e4000_subdev_to_dev(struct v4l2_subdev *sd)
drivers/media/tuners/e4000.c
280
return container_of(sd, struct e4000_dev, sd);
drivers/media/tuners/e4000.c
283
static int e4000_standby(struct v4l2_subdev *sd)
drivers/media/tuners/e4000.c
285
struct e4000_dev *dev = e4000_subdev_to_dev(sd);
drivers/media/tuners/e4000.c
295
static int e4000_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v)
drivers/media/tuners/e4000.c
297
struct e4000_dev *dev = e4000_subdev_to_dev(sd);
drivers/media/tuners/e4000.c
310
static int e4000_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *v)
drivers/media/tuners/e4000.c
312
struct e4000_dev *dev = e4000_subdev_to_dev(sd);
drivers/media/tuners/e4000.c
319
static int e4000_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
drivers/media/tuners/e4000.c
321
struct e4000_dev *dev = e4000_subdev_to_dev(sd);
drivers/media/tuners/e4000.c
329
static int e4000_s_frequency(struct v4l2_subdev *sd,
drivers/media/tuners/e4000.c
332
struct e4000_dev *dev = e4000_subdev_to_dev(sd);
drivers/media/tuners/e4000.c
343
static int e4000_enum_freq_bands(struct v4l2_subdev *sd,
drivers/media/tuners/e4000.c
346
struct e4000_dev *dev = e4000_subdev_to_dev(sd);
drivers/media/tuners/e4000.c
688
dev->sd.ctrl_handler = &dev->hdl;
drivers/media/tuners/e4000.c
691
v4l2_i2c_subdev_init(&dev->sd, client, &e4000_subdev_ops);
drivers/media/tuners/e4000.c
696
v4l2_set_subdevdata(&dev->sd, client);
drivers/media/tuners/e4000.c
697
i2c_set_clientdata(client, &dev->sd);
drivers/media/tuners/e4000.c
710
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/tuners/e4000.c
711
struct e4000_dev *dev = container_of(sd, struct e4000_dev, sd);
drivers/media/tuners/e4000_priv.h
22
struct v4l2_subdev sd;
drivers/media/tuners/fc2580.c
371
static inline struct fc2580_dev *fc2580_subdev_to_dev(struct v4l2_subdev *sd)
drivers/media/tuners/fc2580.c
373
return container_of(sd, struct fc2580_dev, subdev);
drivers/media/tuners/fc2580.c
376
static int fc2580_standby(struct v4l2_subdev *sd)
drivers/media/tuners/fc2580.c
378
struct fc2580_dev *dev = fc2580_subdev_to_dev(sd);
drivers/media/tuners/fc2580.c
388
static int fc2580_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v)
drivers/media/tuners/fc2580.c
390
struct fc2580_dev *dev = fc2580_subdev_to_dev(sd);
drivers/media/tuners/fc2580.c
403
static int fc2580_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *v)
drivers/media/tuners/fc2580.c
405
struct fc2580_dev *dev = fc2580_subdev_to_dev(sd);
drivers/media/tuners/fc2580.c
412
static int fc2580_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
drivers/media/tuners/fc2580.c
414
struct fc2580_dev *dev = fc2580_subdev_to_dev(sd);
drivers/media/tuners/fc2580.c
422
static int fc2580_s_frequency(struct v4l2_subdev *sd,
drivers/media/tuners/fc2580.c
425
struct fc2580_dev *dev = fc2580_subdev_to_dev(sd);
drivers/media/tuners/fc2580.c
436
static int fc2580_enum_freq_bands(struct v4l2_subdev *sd,
drivers/media/tuners/fc2580.c
439
struct fc2580_dev *dev = fc2580_subdev_to_dev(sd);
drivers/media/tuners/msi001.c
285
static int msi001_standby(struct v4l2_subdev *sd)
drivers/media/tuners/msi001.c
287
struct msi001_dev *dev = sd_to_msi001_dev(sd);
drivers/media/tuners/msi001.c
292
static int msi001_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v)
drivers/media/tuners/msi001.c
294
struct msi001_dev *dev = sd_to_msi001_dev(sd);
drivers/media/tuners/msi001.c
308
static int msi001_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *v)
drivers/media/tuners/msi001.c
310
struct msi001_dev *dev = sd_to_msi001_dev(sd);
drivers/media/tuners/msi001.c
317
static int msi001_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
drivers/media/tuners/msi001.c
319
struct msi001_dev *dev = sd_to_msi001_dev(sd);
drivers/media/tuners/msi001.c
32
struct v4l2_subdev sd;
drivers/media/tuners/msi001.c
327
static int msi001_s_frequency(struct v4l2_subdev *sd,
drivers/media/tuners/msi001.c
330
struct msi001_dev *dev = sd_to_msi001_dev(sd);
drivers/media/tuners/msi001.c
347
static int msi001_enum_freq_bands(struct v4l2_subdev *sd,
drivers/media/tuners/msi001.c
350
struct msi001_dev *dev = sd_to_msi001_dev(sd);
drivers/media/tuners/msi001.c
437
v4l2_spi_subdev_init(&dev->sd, spi, &msi001_ops);
drivers/media/tuners/msi001.c
45
static inline struct msi001_dev *sd_to_msi001_dev(struct v4l2_subdev *sd)
drivers/media/tuners/msi001.c
466
dev->sd.ctrl_handler = &dev->hdl;
drivers/media/tuners/msi001.c
47
return container_of(sd, struct msi001_dev, sd);
drivers/media/tuners/msi001.c
477
struct v4l2_subdev *sd = spi_get_drvdata(spi);
drivers/media/tuners/msi001.c
478
struct msi001_dev *dev = sd_to_msi001_dev(sd);
drivers/media/tuners/msi001.c
486
v4l2_device_unregister_subdev(&dev->sd);
drivers/media/tuners/qm1d1c0042.c
185
u32 a, sd;
drivers/media/tuners/qm1d1c0042.c
243
sd = b;
drivers/media/tuners/qm1d1c0042.c
245
sd = (1 << 22) + b;
drivers/media/tuners/qm1d1c0042.c
248
state->regs[0x09] |= (sd >> 16) & 0x3f;
drivers/media/tuners/qm1d1c0042.c
249
state->regs[0x0a] = (sd >> 8) & 0xff;
drivers/media/tuners/qm1d1c0042.c
250
state->regs[0x0b] = sd & 0xff;
drivers/media/usb/au0828/au0828-cards.c
206
struct v4l2_subdev *sd;
drivers/media/usb/au0828/au0828-cards.c
213
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
drivers/media/usb/au0828/au0828-cards.c
215
if (sd == NULL)
drivers/media/usb/au0828/au0828-cards.c
222
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
drivers/media/usb/au0828/au0828-cards.c
224
if (sd == NULL)
drivers/media/usb/em28xx/em28xx-video.c
2607
struct v4l2_subdev *sd;
drivers/media/usb/em28xx/em28xx-video.c
2609
sd = v4l2_i2c_new_subdev(&v4l2->v4l2_dev,
drivers/media/usb/em28xx/em28xx-video.c
2614
if (sd)
drivers/media/usb/em28xx/em28xx-video.c
2615
tuner_addr = v4l2_i2c_subdev_addr(sd);
drivers/media/usb/go7007/go7007-driver.c
201
struct v4l2_subdev *sd;
drivers/media/usb/go7007/go7007-driver.c
209
sd = v4l2_i2c_new_subdev_board(v4l2_dev, adapter, &info, NULL);
drivers/media/usb/go7007/go7007-driver.c
210
if (sd) {
drivers/media/usb/go7007/go7007-driver.c
212
go->sd_video = sd;
drivers/media/usb/go7007/go7007-driver.c
214
go->sd_audio = sd;
drivers/media/usb/go7007/s2250-board.c
112
struct v4l2_subdev sd;
drivers/media/usb/go7007/s2250-board.c
125
static inline struct s2250 *to_state(struct v4l2_subdev *sd)
drivers/media/usb/go7007/s2250-board.c
127
return container_of(sd, struct s2250, sd);
drivers/media/usb/go7007/s2250-board.c
319
static int s2250_s_video_routing(struct v4l2_subdev *sd, u32 input, u32 output,
drivers/media/usb/go7007/s2250-board.c
322
struct s2250 *state = to_state(sd);
drivers/media/usb/go7007/s2250-board.c
323
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/usb/go7007/s2250-board.c
344
static int s2250_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
drivers/media/usb/go7007/s2250-board.c
346
struct s2250 *state = to_state(sd);
drivers/media/usb/go7007/s2250-board.c
347
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/usb/go7007/s2250-board.c
366
struct i2c_client *client = v4l2_get_subdevdata(&state->sd);
drivers/media/usb/go7007/s2250-board.c
400
static int s2250_set_fmt(struct v4l2_subdev *sd,
drivers/media/usb/go7007/s2250-board.c
405
struct s2250 *state = to_state(sd);
drivers/media/usb/go7007/s2250-board.c
406
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/usb/go7007/s2250-board.c
424
static int s2250_s_audio_routing(struct v4l2_subdev *sd, u32 input, u32 output,
drivers/media/usb/go7007/s2250-board.c
427
struct s2250 *state = to_state(sd);
drivers/media/usb/go7007/s2250-board.c
447
static int s2250_log_status(struct v4l2_subdev *sd)
drivers/media/usb/go7007/s2250-board.c
449
struct s2250 *state = to_state(sd);
drivers/media/usb/go7007/s2250-board.c
451
v4l2_info(sd, "Standard: %s\n", state->std == V4L2_STD_NTSC ? "NTSC" :
drivers/media/usb/go7007/s2250-board.c
455
v4l2_info(sd, "Input: %s\n", state->input == 0 ? "Composite" :
drivers/media/usb/go7007/s2250-board.c
458
v4l2_info(sd, "Audio input: %s\n", state->audio_input == 0 ? "Line In" :
drivers/media/usb/go7007/s2250-board.c
462
return v4l2_ctrl_subdev_log_status(sd);
drivers/media/usb/go7007/s2250-board.c
502
struct v4l2_subdev *sd;
drivers/media/usb/go7007/s2250-board.c
518
sd = &state->sd;
drivers/media/usb/go7007/s2250-board.c
519
v4l2_i2c_subdev_init(sd, client, &s2250_ops);
drivers/media/usb/go7007/s2250-board.c
521
v4l2_info(sd, "initializing %s at address 0x%x on %s\n",
drivers/media/usb/go7007/s2250-board.c
533
sd->ctrl_handler = &state->hdl;
drivers/media/usb/go7007/s2250-board.c
593
v4l2_info(sd, "initialized successfully\n");
drivers/media/usb/go7007/s2250-board.c
608
v4l2_device_unregister_subdev(&state->sd);
drivers/media/usb/gspca/benq.c
258
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/conex.c
771
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/conex.c
774
jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
drivers/media/usb/gspca/conex.c
777
jpeg_set_qual(sd->jpeg_hdr, QUALITY);
drivers/media/usb/gspca/conex.c
815
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/conex.c
824
sd->jpeg_hdr, JPEG_HDR_SZ);
drivers/media/usb/gspca/conex.c
869
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/conex.c
878
setbrightness(gspca_dev, ctrl->val, sd->sat->cur.val);
drivers/media/usb/gspca/conex.c
881
setcontrast(gspca_dev, ctrl->val, sd->sat->cur.val);
drivers/media/usb/gspca/conex.c
884
setbrightness(gspca_dev, sd->brightness->cur.val, ctrl->val);
drivers/media/usb/gspca/conex.c
885
setcontrast(gspca_dev, sd->contrast->cur.val, ctrl->val);
drivers/media/usb/gspca/conex.c
897
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/conex.c
902
sd->brightness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/conex.c
904
sd->contrast = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/conex.c
906
sd->sat = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/conex.c
937
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/cpia1.c
1017
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
1018
int currentexp = sd->params.exposure.coarseExpLo +
drivers/media/usb/gspca/cpia1.c
1019
sd->params.exposure.coarseExpHi * 256;
drivers/media/usb/gspca/cpia1.c
1023
int cj = sd->params.flickerControl.coarseJump;
drivers/media/usb/gspca/cpia1.c
1024
sd->params.flickerControl.flickerMode = 1;
drivers/media/usb/gspca/cpia1.c
1025
sd->params.flickerControl.disabled = 0;
drivers/media/usb/gspca/cpia1.c
1026
if (sd->params.exposure.expMode != 2) {
drivers/media/usb/gspca/cpia1.c
1027
sd->params.exposure.expMode = 2;
drivers/media/usb/gspca/cpia1.c
1028
sd->exposure_status = EXPOSURE_NORMAL;
drivers/media/usb/gspca/cpia1.c
1030
if (sd->params.exposure.gain >= BITS_PER_TYPE(currentexp))
drivers/media/usb/gspca/cpia1.c
1032
currentexp = currentexp << sd->params.exposure.gain;
drivers/media/usb/gspca/cpia1.c
1033
sd->params.exposure.gain = 0;
drivers/media/usb/gspca/cpia1.c
1045
sd->params.exposure.coarseExpLo = startexp & 0xff;
drivers/media/usb/gspca/cpia1.c
1046
sd->params.exposure.coarseExpHi = startexp >> 8;
drivers/media/usb/gspca/cpia1.c
1050
sd->params.exposure.redComp =
drivers/media/usb/gspca/cpia1.c
1052
sd->params.exposure.green1Comp =
drivers/media/usb/gspca/cpia1.c
1054
sd->params.exposure.green2Comp =
drivers/media/usb/gspca/cpia1.c
1056
sd->params.exposure.blueComp =
drivers/media/usb/gspca/cpia1.c
1059
sd->params.exposure.redComp = COMP_RED;
drivers/media/usb/gspca/cpia1.c
1060
sd->params.exposure.green1Comp = COMP_GREEN1;
drivers/media/usb/gspca/cpia1.c
1061
sd->params.exposure.green2Comp = COMP_GREEN2;
drivers/media/usb/gspca/cpia1.c
1062
sd->params.exposure.blueComp = COMP_BLUE;
drivers/media/usb/gspca/cpia1.c
1065
sd->params.exposure.compMode = 0;
drivers/media/usb/gspca/cpia1.c
1067
sd->params.exposure.compMode = 1;
drivers/media/usb/gspca/cpia1.c
1069
sd->params.apcor.gain1 = 0x18;
drivers/media/usb/gspca/cpia1.c
1070
sd->params.apcor.gain2 = 0x18;
drivers/media/usb/gspca/cpia1.c
1071
sd->params.apcor.gain4 = 0x16;
drivers/media/usb/gspca/cpia1.c
1072
sd->params.apcor.gain8 = 0x14;
drivers/media/usb/gspca/cpia1.c
1074
sd->params.flickerControl.flickerMode = 0;
drivers/media/usb/gspca/cpia1.c
1075
sd->params.flickerControl.disabled = 1;
drivers/media/usb/gspca/cpia1.c
1078
sd->params.exposure.redComp, currentexp);
drivers/media/usb/gspca/cpia1.c
1080
sd->params.exposure.green1Comp, currentexp);
drivers/media/usb/gspca/cpia1.c
1082
sd->params.exposure.green2Comp, currentexp);
drivers/media/usb/gspca/cpia1.c
1084
sd->params.exposure.blueComp, currentexp);
drivers/media/usb/gspca/cpia1.c
1086
while (startexp > MAX_EXP && sd->params.exposure.gain <
drivers/media/usb/gspca/cpia1.c
1087
sd->params.exposure.gainMode - 1) {
drivers/media/usb/gspca/cpia1.c
1089
++sd->params.exposure.gain;
drivers/media/usb/gspca/cpia1.c
1095
sd->params.exposure.coarseExpLo = startexp & 0xff;
drivers/media/usb/gspca/cpia1.c
1096
sd->params.exposure.coarseExpHi = startexp >> 8;
drivers/media/usb/gspca/cpia1.c
1097
sd->params.exposure.redComp = COMP_RED;
drivers/media/usb/gspca/cpia1.c
1098
sd->params.exposure.green1Comp = COMP_GREEN1;
drivers/media/usb/gspca/cpia1.c
1099
sd->params.exposure.green2Comp = COMP_GREEN2;
drivers/media/usb/gspca/cpia1.c
1100
sd->params.exposure.blueComp = COMP_BLUE;
drivers/media/usb/gspca/cpia1.c
1101
sd->params.exposure.compMode = 1;
drivers/media/usb/gspca/cpia1.c
1102
sd->params.apcor.gain1 = 0x18;
drivers/media/usb/gspca/cpia1.c
1103
sd->params.apcor.gain2 = 0x16;
drivers/media/usb/gspca/cpia1.c
1104
sd->params.apcor.gain4 = 0x24;
drivers/media/usb/gspca/cpia1.c
1105
sd->params.apcor.gain8 = 0x34;
drivers/media/usb/gspca/cpia1.c
1107
sd->params.vlOffset.gain1 = 20;
drivers/media/usb/gspca/cpia1.c
1108
sd->params.vlOffset.gain2 = 24;
drivers/media/usb/gspca/cpia1.c
1109
sd->params.vlOffset.gain4 = 26;
drivers/media/usb/gspca/cpia1.c
1110
sd->params.vlOffset.gain8 = 26;
drivers/media/usb/gspca/cpia1.c
1138
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
1162
light_exp = sd->params.colourParams.brightness +
drivers/media/usb/gspca/cpia1.c
1166
dark_exp = sd->params.colourParams.brightness +
drivers/media/usb/gspca/cpia1.c
1172
old_exposure = sd->params.exposure.coarseExpHi * 256 +
drivers/media/usb/gspca/cpia1.c
1173
sd->params.exposure.coarseExpLo;
drivers/media/usb/gspca/cpia1.c
1175
if (!sd->params.flickerControl.disabled) {
drivers/media/usb/gspca/cpia1.c
1184
if (sd->exposure_status == EXPOSURE_VERY_DARK)
drivers/media/usb/gspca/cpia1.c
1185
++sd->exposure_count;
drivers/media/usb/gspca/cpia1.c
1187
sd->exposure_status =
drivers/media/usb/gspca/cpia1.c
1189
sd->exposure_count = 1;
drivers/media/usb/gspca/cpia1.c
1193
if (sd->exposure_status == EXPOSURE_DARK)
drivers/media/usb/gspca/cpia1.c
1194
++sd->exposure_count;
drivers/media/usb/gspca/cpia1.c
1196
sd->exposure_status = EXPOSURE_DARK;
drivers/media/usb/gspca/cpia1.c
1197
sd->exposure_count = 1;
drivers/media/usb/gspca/cpia1.c
1204
if (sd->exposure_status == EXPOSURE_VERY_LIGHT)
drivers/media/usb/gspca/cpia1.c
1205
++sd->exposure_count;
drivers/media/usb/gspca/cpia1.c
1207
sd->exposure_status =
drivers/media/usb/gspca/cpia1.c
1209
sd->exposure_count = 1;
drivers/media/usb/gspca/cpia1.c
1213
if (sd->exposure_status == EXPOSURE_LIGHT)
drivers/media/usb/gspca/cpia1.c
1214
++sd->exposure_count;
drivers/media/usb/gspca/cpia1.c
1216
sd->exposure_status = EXPOSURE_LIGHT;
drivers/media/usb/gspca/cpia1.c
1217
sd->exposure_count = 1;
drivers/media/usb/gspca/cpia1.c
1222
sd->exposure_status = EXPOSURE_NORMAL;
drivers/media/usb/gspca/cpia1.c
1230
if (sd->exposure_status == EXPOSURE_VERY_DARK)
drivers/media/usb/gspca/cpia1.c
1231
++sd->exposure_count;
drivers/media/usb/gspca/cpia1.c
1233
sd->exposure_status =
drivers/media/usb/gspca/cpia1.c
1235
sd->exposure_count = 1;
drivers/media/usb/gspca/cpia1.c
1239
if (sd->exposure_status == EXPOSURE_DARK)
drivers/media/usb/gspca/cpia1.c
1240
++sd->exposure_count;
drivers/media/usb/gspca/cpia1.c
1242
sd->exposure_status = EXPOSURE_DARK;
drivers/media/usb/gspca/cpia1.c
1243
sd->exposure_count = 1;
drivers/media/usb/gspca/cpia1.c
1250
if (sd->exposure_status == EXPOSURE_VERY_LIGHT)
drivers/media/usb/gspca/cpia1.c
1251
++sd->exposure_count;
drivers/media/usb/gspca/cpia1.c
1253
sd->exposure_status =
drivers/media/usb/gspca/cpia1.c
1255
sd->exposure_count = 1;
drivers/media/usb/gspca/cpia1.c
1259
if (sd->exposure_status == EXPOSURE_LIGHT)
drivers/media/usb/gspca/cpia1.c
1260
++sd->exposure_count;
drivers/media/usb/gspca/cpia1.c
1262
sd->exposure_status = EXPOSURE_LIGHT;
drivers/media/usb/gspca/cpia1.c
1263
sd->exposure_count = 1;
drivers/media/usb/gspca/cpia1.c
1268
sd->exposure_status = EXPOSURE_NORMAL;
drivers/media/usb/gspca/cpia1.c
1272
framerate = atomic_read(&sd->fps);
drivers/media/usb/gspca/cpia1.c
1276
if (!sd->params.flickerControl.disabled) {
drivers/media/usb/gspca/cpia1.c
1278
if ((sd->exposure_status == EXPOSURE_VERY_DARK ||
drivers/media/usb/gspca/cpia1.c
1279
sd->exposure_status == EXPOSURE_DARK) &&
drivers/media/usb/gspca/cpia1.c
1280
sd->exposure_count >= DARK_TIME * framerate &&
drivers/media/usb/gspca/cpia1.c
1281
sd->params.sensorFps.divisor < 2) {
drivers/media/usb/gspca/cpia1.c
1284
++sd->params.sensorFps.divisor;
drivers/media/usb/gspca/cpia1.c
1287
sd->params.flickerControl.coarseJump =
drivers/media/usb/gspca/cpia1.c
1288
flicker_jumps[sd->mainsFreq]
drivers/media/usb/gspca/cpia1.c
1289
[sd->params.sensorFps.baserate]
drivers/media/usb/gspca/cpia1.c
1290
[sd->params.sensorFps.divisor];
drivers/media/usb/gspca/cpia1.c
1293
new_exposure = sd->params.flickerControl.coarseJump-1;
drivers/media/usb/gspca/cpia1.c
1296
sd->params.flickerControl.coarseJump;
drivers/media/usb/gspca/cpia1.c
1297
sd->params.exposure.coarseExpLo = new_exposure & 0xff;
drivers/media/usb/gspca/cpia1.c
1298
sd->params.exposure.coarseExpHi = new_exposure >> 8;
drivers/media/usb/gspca/cpia1.c
1300
sd->exposure_status = EXPOSURE_NORMAL;
drivers/media/usb/gspca/cpia1.c
1303
} else if ((sd->exposure_status == EXPOSURE_VERY_LIGHT ||
drivers/media/usb/gspca/cpia1.c
1304
sd->exposure_status == EXPOSURE_LIGHT) &&
drivers/media/usb/gspca/cpia1.c
1305
sd->exposure_count >= LIGHT_TIME * framerate &&
drivers/media/usb/gspca/cpia1.c
1306
sd->params.sensorFps.divisor > 0) {
drivers/media/usb/gspca/cpia1.c
1311
--sd->params.sensorFps.divisor;
drivers/media/usb/gspca/cpia1.c
1314
sd->params.flickerControl.coarseJump =
drivers/media/usb/gspca/cpia1.c
1315
flicker_jumps[sd->mainsFreq]
drivers/media/usb/gspca/cpia1.c
1316
[sd->params.sensorFps.baserate]
drivers/media/usb/gspca/cpia1.c
1317
[sd->params.sensorFps.divisor];
drivers/media/usb/gspca/cpia1.c
1320
new_exposure = sd->params.flickerControl.coarseJump-1;
drivers/media/usb/gspca/cpia1.c
1323
sd->params.flickerControl.coarseJump < max_exp)
drivers/media/usb/gspca/cpia1.c
1325
sd->params.flickerControl.coarseJump;
drivers/media/usb/gspca/cpia1.c
1326
sd->params.exposure.coarseExpLo = new_exposure & 0xff;
drivers/media/usb/gspca/cpia1.c
1327
sd->params.exposure.coarseExpHi = new_exposure >> 8;
drivers/media/usb/gspca/cpia1.c
1329
sd->exposure_status = EXPOSURE_NORMAL;
drivers/media/usb/gspca/cpia1.c
1334
if ((sd->exposure_status == EXPOSURE_VERY_DARK ||
drivers/media/usb/gspca/cpia1.c
1335
sd->exposure_status == EXPOSURE_DARK) &&
drivers/media/usb/gspca/cpia1.c
1336
sd->exposure_count >= DARK_TIME * framerate &&
drivers/media/usb/gspca/cpia1.c
1337
sd->params.sensorFps.divisor < 2) {
drivers/media/usb/gspca/cpia1.c
1340
++sd->params.sensorFps.divisor;
drivers/media/usb/gspca/cpia1.c
1343
if (sd->params.exposure.gain > 0) {
drivers/media/usb/gspca/cpia1.c
1344
--sd->params.exposure.gain;
drivers/media/usb/gspca/cpia1.c
1347
sd->exposure_status = EXPOSURE_NORMAL;
drivers/media/usb/gspca/cpia1.c
1350
} else if ((sd->exposure_status == EXPOSURE_VERY_LIGHT ||
drivers/media/usb/gspca/cpia1.c
1351
sd->exposure_status == EXPOSURE_LIGHT) &&
drivers/media/usb/gspca/cpia1.c
1352
sd->exposure_count >= LIGHT_TIME * framerate &&
drivers/media/usb/gspca/cpia1.c
1353
sd->params.sensorFps.divisor > 0) {
drivers/media/usb/gspca/cpia1.c
1356
--sd->params.sensorFps.divisor;
drivers/media/usb/gspca/cpia1.c
1359
if (sd->params.exposure.gain <
drivers/media/usb/gspca/cpia1.c
1360
sd->params.exposure.gainMode - 1) {
drivers/media/usb/gspca/cpia1.c
1361
++sd->params.exposure.gain;
drivers/media/usb/gspca/cpia1.c
1364
sd->exposure_status = EXPOSURE_NORMAL;
drivers/media/usb/gspca/cpia1.c
1389
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
1395
cam_exposure = atomic_read(&sd->cam_exposure);
drivers/media/usb/gspca/cpia1.c
1397
if (sd->params.flickerControl.flickerMode == 0 ||
drivers/media/usb/gspca/cpia1.c
1401
old_exp = sd->params.exposure.coarseExpLo +
drivers/media/usb/gspca/cpia1.c
1402
sd->params.exposure.coarseExpHi*256;
drivers/media/usb/gspca/cpia1.c
1407
cam_exposure %= sd->params.flickerControl.coarseJump;
drivers/media/usb/gspca/cpia1.c
1408
if (!sd->params.flickerControl.disabled &&
drivers/media/usb/gspca/cpia1.c
1409
cam_exposure <= sd->params.flickerControl.coarseJump - 3) {
drivers/media/usb/gspca/cpia1.c
1411
sd->params.flickerControl.disabled = 1;
drivers/media/usb/gspca/cpia1.c
1414
if (sd->params.flickerControl.disabled &&
drivers/media/usb/gspca/cpia1.c
1415
old_exp > sd->params.flickerControl.coarseJump +
drivers/media/usb/gspca/cpia1.c
1427
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
1430
sd->mainsFreq = FREQ_DEF == V4L2_CID_POWER_LINE_FREQUENCY_60HZ;
drivers/media/usb/gspca/cpia1.c
1442
sd->params.version.firmwareVersion = 0;
drivers/media/usb/gspca/cpia1.c
1444
if (sd->params.version.firmwareVersion != 1) {
drivers/media/usb/gspca/cpia1.c
1446
sd->params.version.firmwareVersion);
drivers/media/usb/gspca/cpia1.c
1451
if (sd->params.version.firmwareRevision <= 2 &&
drivers/media/usb/gspca/cpia1.c
1452
sd->params.exposure.gainMode > 2) {
drivers/media/usb/gspca/cpia1.c
1453
sd->params.exposure.gainMode = 2;
drivers/media/usb/gspca/cpia1.c
1457
sd->params.qx3.qx3_detected = (sd->params.pnpID.vendor == 0x0813 &&
drivers/media/usb/gspca/cpia1.c
1458
sd->params.pnpID.product == 0x0001);
drivers/media/usb/gspca/cpia1.c
1465
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
1470
if (sd->params.status.systemState != WARM_BOOT_STATE) {
drivers/media/usb/gspca/cpia1.c
1472
sd->params.status.systemState);
drivers/media/usb/gspca/cpia1.c
1473
printstatus(gspca_dev, &sd->params);
drivers/media/usb/gspca/cpia1.c
1495
sd->params.version.firmwareVersion = 0;
drivers/media/usb/gspca/cpia1.c
1518
if (sd->params.status.fatalError) {
drivers/media/usb/gspca/cpia1.c
1520
sd->params.status.fatalError,
drivers/media/usb/gspca/cpia1.c
1521
sd->params.status.vpStatus);
drivers/media/usb/gspca/cpia1.c
1532
sd->params.streamStartLine = 120;
drivers/media/usb/gspca/cpia1.c
1536
sd->params.roi.colStart = 2;
drivers/media/usb/gspca/cpia1.c
1537
sd->params.roi.rowStart = 6;
drivers/media/usb/gspca/cpia1.c
1539
sd->params.roi.colStart = 0;
drivers/media/usb/gspca/cpia1.c
1540
sd->params.roi.rowStart = 0;
drivers/media/usb/gspca/cpia1.c
1544
sd->params.format.videoSize = VIDEOSIZE_QCIF;
drivers/media/usb/gspca/cpia1.c
1545
sd->params.roi.colStart /= 2;
drivers/media/usb/gspca/cpia1.c
1546
sd->params.roi.rowStart /= 2;
drivers/media/usb/gspca/cpia1.c
1547
sd->params.streamStartLine /= 2;
drivers/media/usb/gspca/cpia1.c
1549
sd->params.format.videoSize = VIDEOSIZE_CIF;
drivers/media/usb/gspca/cpia1.c
1551
sd->params.roi.colEnd = sd->params.roi.colStart +
drivers/media/usb/gspca/cpia1.c
1553
sd->params.roi.rowEnd = sd->params.roi.rowStart +
drivers/media/usb/gspca/cpia1.c
1612
sd->first_frame = 6;
drivers/media/usb/gspca/cpia1.c
1613
sd->exposure_status = EXPOSURE_NORMAL;
drivers/media/usb/gspca/cpia1.c
1614
sd->exposure_count = 0;
drivers/media/usb/gspca/cpia1.c
1615
atomic_set(&sd->cam_exposure, 0);
drivers/media/usb/gspca/cpia1.c
1616
atomic_set(&sd->fps, 0);
drivers/media/usb/gspca/cpia1.c
1623
struct sd *sd __maybe_unused = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
1638
if (sd->params.qx3.button) {
drivers/media/usb/gspca/cpia1.c
1651
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
1663
if (sd->params.qx3.qx3_detected)
drivers/media/usb/gspca/cpia1.c
1669
sd->params.version.firmwareVersion,
drivers/media/usb/gspca/cpia1.c
1670
sd->params.version.firmwareRevision,
drivers/media/usb/gspca/cpia1.c
1671
sd->params.version.vcVersion,
drivers/media/usb/gspca/cpia1.c
1672
sd->params.version.vcRevision);
drivers/media/usb/gspca/cpia1.c
1674
sd->params.pnpID.vendor, sd->params.pnpID.product,
drivers/media/usb/gspca/cpia1.c
1675
sd->params.pnpID.deviceRevision);
drivers/media/usb/gspca/cpia1.c
1677
sd->params.vpVersion.vpVersion,
drivers/media/usb/gspca/cpia1.c
1678
sd->params.vpVersion.vpRevision,
drivers/media/usb/gspca/cpia1.c
1679
sd->params.vpVersion.cameraHeadID);
drivers/media/usb/gspca/cpia1.c
1688
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
1693
data[16] == sd->params.format.videoSize &&
drivers/media/usb/gspca/cpia1.c
1694
data[17] == sd->params.format.subSample &&
drivers/media/usb/gspca/cpia1.c
1695
data[18] == sd->params.format.yuvOrder &&
drivers/media/usb/gspca/cpia1.c
1696
data[24] == sd->params.roi.colStart &&
drivers/media/usb/gspca/cpia1.c
1697
data[25] == sd->params.roi.colEnd &&
drivers/media/usb/gspca/cpia1.c
1698
data[26] == sd->params.roi.rowStart &&
drivers/media/usb/gspca/cpia1.c
1699
data[27] == sd->params.roi.rowEnd) {
drivers/media/usb/gspca/cpia1.c
1702
atomic_set(&sd->cam_exposure, data[39] * 2);
drivers/media/usb/gspca/cpia1.c
1703
atomic_set(&sd->fps, data[41]);
drivers/media/usb/gspca/cpia1.c
1725
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
1729
if (sd->first_frame) {
drivers/media/usb/gspca/cpia1.c
1730
sd->first_frame--;
drivers/media/usb/gspca/cpia1.c
1731
if (sd->first_frame == 0)
drivers/media/usb/gspca/cpia1.c
1740
if (sd->params.exposure.expMode == 2)
drivers/media/usb/gspca/cpia1.c
1752
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/cpia1.c
1761
sd->params.colourParams.brightness = ctrl->val;
drivers/media/usb/gspca/cpia1.c
1762
sd->params.flickerControl.allowableOverExposure =
drivers/media/usb/gspca/cpia1.c
1763
find_over_exposure(sd->params.colourParams.brightness);
drivers/media/usb/gspca/cpia1.c
1769
sd->params.colourParams.contrast = ctrl->val;
drivers/media/usb/gspca/cpia1.c
1773
sd->params.colourParams.saturation = ctrl->val;
drivers/media/usb/gspca/cpia1.c
1777
sd->mainsFreq = ctrl->val == V4L2_CID_POWER_LINE_FREQUENCY_60HZ;
drivers/media/usb/gspca/cpia1.c
1778
sd->params.flickerControl.coarseJump =
drivers/media/usb/gspca/cpia1.c
1779
flicker_jumps[sd->mainsFreq]
drivers/media/usb/gspca/cpia1.c
1780
[sd->params.sensorFps.baserate]
drivers/media/usb/gspca/cpia1.c
1781
[sd->params.sensorFps.divisor];
drivers/media/usb/gspca/cpia1.c
1788
sd->params.qx3.bottomlight = ctrl->val;
drivers/media/usb/gspca/cpia1.c
1792
sd->params.qx3.toplight = ctrl->val;
drivers/media/usb/gspca/cpia1.c
1796
sd->params.compressionTarget.frTargeting = ctrl->val;
drivers/media/usb/gspca/cpia1.c
1809
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/cpia1.c
1834
sd->freq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/cpia1.c
1838
if (sd->params.qx3.qx3_detected) {
drivers/media/usb/gspca/cpia1.c
1882
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/cpia1.c
214
#define FIRMWARE_VERSION(x, y) (sd->params.version.firmwareVersion == (x) && \
drivers/media/usb/gspca/cpia1.c
215
sd->params.version.firmwareRevision == (y))
drivers/media/usb/gspca/cpia1.c
442
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
480
sd->params.version.firmwareVersion = gspca_dev->usb_buf[0];
drivers/media/usb/gspca/cpia1.c
481
sd->params.version.firmwareRevision = gspca_dev->usb_buf[1];
drivers/media/usb/gspca/cpia1.c
482
sd->params.version.vcVersion = gspca_dev->usb_buf[2];
drivers/media/usb/gspca/cpia1.c
483
sd->params.version.vcRevision = gspca_dev->usb_buf[3];
drivers/media/usb/gspca/cpia1.c
486
sd->params.pnpID.vendor =
drivers/media/usb/gspca/cpia1.c
488
sd->params.pnpID.product =
drivers/media/usb/gspca/cpia1.c
490
sd->params.pnpID.deviceRevision =
drivers/media/usb/gspca/cpia1.c
494
sd->params.status.systemState = gspca_dev->usb_buf[0];
drivers/media/usb/gspca/cpia1.c
495
sd->params.status.grabState = gspca_dev->usb_buf[1];
drivers/media/usb/gspca/cpia1.c
496
sd->params.status.streamState = gspca_dev->usb_buf[2];
drivers/media/usb/gspca/cpia1.c
497
sd->params.status.fatalError = gspca_dev->usb_buf[3];
drivers/media/usb/gspca/cpia1.c
498
sd->params.status.cmdError = gspca_dev->usb_buf[4];
drivers/media/usb/gspca/cpia1.c
499
sd->params.status.debugFlags = gspca_dev->usb_buf[5];
drivers/media/usb/gspca/cpia1.c
500
sd->params.status.vpStatus = gspca_dev->usb_buf[6];
drivers/media/usb/gspca/cpia1.c
501
sd->params.status.errorCode = gspca_dev->usb_buf[7];
drivers/media/usb/gspca/cpia1.c
504
sd->params.vpVersion.vpVersion = gspca_dev->usb_buf[0];
drivers/media/usb/gspca/cpia1.c
505
sd->params.vpVersion.vpRevision = gspca_dev->usb_buf[1];
drivers/media/usb/gspca/cpia1.c
506
sd->params.vpVersion.cameraHeadID =
drivers/media/usb/gspca/cpia1.c
510
sd->params.colourParams.brightness = gspca_dev->usb_buf[0];
drivers/media/usb/gspca/cpia1.c
511
sd->params.colourParams.contrast = gspca_dev->usb_buf[1];
drivers/media/usb/gspca/cpia1.c
512
sd->params.colourParams.saturation = gspca_dev->usb_buf[2];
drivers/media/usb/gspca/cpia1.c
515
sd->params.colourBalance.redGain = gspca_dev->usb_buf[0];
drivers/media/usb/gspca/cpia1.c
516
sd->params.colourBalance.greenGain = gspca_dev->usb_buf[1];
drivers/media/usb/gspca/cpia1.c
517
sd->params.colourBalance.blueGain = gspca_dev->usb_buf[2];
drivers/media/usb/gspca/cpia1.c
520
sd->params.exposure.gain = gspca_dev->usb_buf[0];
drivers/media/usb/gspca/cpia1.c
521
sd->params.exposure.fineExp = gspca_dev->usb_buf[1];
drivers/media/usb/gspca/cpia1.c
522
sd->params.exposure.coarseExpLo = gspca_dev->usb_buf[2];
drivers/media/usb/gspca/cpia1.c
523
sd->params.exposure.coarseExpHi = gspca_dev->usb_buf[3];
drivers/media/usb/gspca/cpia1.c
524
sd->params.exposure.redComp = gspca_dev->usb_buf[4];
drivers/media/usb/gspca/cpia1.c
525
sd->params.exposure.green1Comp = gspca_dev->usb_buf[5];
drivers/media/usb/gspca/cpia1.c
526
sd->params.exposure.green2Comp = gspca_dev->usb_buf[6];
drivers/media/usb/gspca/cpia1.c
527
sd->params.exposure.blueComp = gspca_dev->usb_buf[7];
drivers/media/usb/gspca/cpia1.c
533
if (a != sd->params.qx3.button) {
drivers/media/usb/gspca/cpia1.c
538
sd->params.qx3.button = a;
drivers/media/usb/gspca/cpia1.c
540
if (sd->params.qx3.button) {
drivers/media/usb/gspca/cpia1.c
553
sd->params.qx3.cradled = ((gspca_dev->usb_buf[2] & 0x40) == 0);
drivers/media/usb/gspca/cpia1.c
619
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
620
struct cam_params *params = &sd->params;
drivers/media/usb/gspca/cpia1.c
670
flicker_jumps[sd->mainsFreq]
drivers/media/usb/gspca/cpia1.c
707
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
718
if (sd->params.status.systemState != LO_POWER_STATE) {
drivers/media/usb/gspca/cpia1.c
719
if (sd->params.status.systemState != WARM_BOOT_STATE) {
drivers/media/usb/gspca/cpia1.c
721
sd->params.status.systemState);
drivers/media/usb/gspca/cpia1.c
722
printstatus(gspca_dev, &sd->params);
drivers/media/usb/gspca/cpia1.c
733
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
749
if (sd->params.status.systemState != HI_POWER_STATE) {
drivers/media/usb/gspca/cpia1.c
751
sd->params.status.systemState);
drivers/media/usb/gspca/cpia1.c
752
printstatus(gspca_dev, &sd->params);
drivers/media/usb/gspca/cpia1.c
786
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
790
sd->params.format.videoSize,
drivers/media/usb/gspca/cpia1.c
791
sd->params.format.subSample,
drivers/media/usb/gspca/cpia1.c
792
sd->params.format.yuvOrder, 0);
drivers/media/usb/gspca/cpia1.c
797
sd->params.roi.colStart, sd->params.roi.colEnd,
drivers/media/usb/gspca/cpia1.c
798
sd->params.roi.rowStart, sd->params.roi.rowEnd);
drivers/media/usb/gspca/cpia1.c
803
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
805
sd->params.colourParams.brightness,
drivers/media/usb/gspca/cpia1.c
806
sd->params.colourParams.contrast,
drivers/media/usb/gspca/cpia1.c
807
sd->params.colourParams.saturation, 0);
drivers/media/usb/gspca/cpia1.c
812
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
814
sd->params.apcor.gain1,
drivers/media/usb/gspca/cpia1.c
815
sd->params.apcor.gain2,
drivers/media/usb/gspca/cpia1.c
816
sd->params.apcor.gain4,
drivers/media/usb/gspca/cpia1.c
817
sd->params.apcor.gain8);
drivers/media/usb/gspca/cpia1.c
822
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
824
sd->params.vlOffset.gain1,
drivers/media/usb/gspca/cpia1.c
825
sd->params.vlOffset.gain2,
drivers/media/usb/gspca/cpia1.c
826
sd->params.vlOffset.gain4,
drivers/media/usb/gspca/cpia1.c
827
sd->params.vlOffset.gain8);
drivers/media/usb/gspca/cpia1.c
832
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
836
sd->params.exposure.gainMode,
drivers/media/usb/gspca/cpia1.c
838
sd->params.exposure.compMode,
drivers/media/usb/gspca/cpia1.c
839
sd->params.exposure.centreWeight,
drivers/media/usb/gspca/cpia1.c
840
sd->params.exposure.gain,
drivers/media/usb/gspca/cpia1.c
841
sd->params.exposure.fineExp,
drivers/media/usb/gspca/cpia1.c
842
sd->params.exposure.coarseExpLo,
drivers/media/usb/gspca/cpia1.c
843
sd->params.exposure.coarseExpHi,
drivers/media/usb/gspca/cpia1.c
844
sd->params.exposure.redComp,
drivers/media/usb/gspca/cpia1.c
845
sd->params.exposure.green1Comp,
drivers/media/usb/gspca/cpia1.c
846
sd->params.exposure.green2Comp,
drivers/media/usb/gspca/cpia1.c
847
sd->params.exposure.blueComp);
drivers/media/usb/gspca/cpia1.c
851
if (sd->params.exposure.expMode != 1) {
drivers/media/usb/gspca/cpia1.c
854
sd->params.exposure.expMode,
drivers/media/usb/gspca/cpia1.c
856
sd->params.exposure.gain,
drivers/media/usb/gspca/cpia1.c
857
sd->params.exposure.fineExp,
drivers/media/usb/gspca/cpia1.c
858
sd->params.exposure.coarseExpLo,
drivers/media/usb/gspca/cpia1.c
859
sd->params.exposure.coarseExpHi,
drivers/media/usb/gspca/cpia1.c
868
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
870
if (sd->params.colourBalance.balanceMode == 1) {
drivers/media/usb/gspca/cpia1.c
875
sd->params.colourBalance.redGain,
drivers/media/usb/gspca/cpia1.c
876
sd->params.colourBalance.greenGain,
drivers/media/usb/gspca/cpia1.c
877
sd->params.colourBalance.blueGain);
drivers/media/usb/gspca/cpia1.c
884
if (sd->params.colourBalance.balanceMode == 2) {
drivers/media/usb/gspca/cpia1.c
888
if (sd->params.colourBalance.balanceMode == 3) {
drivers/media/usb/gspca/cpia1.c
898
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
901
sd->params.compressionTarget.frTargeting,
drivers/media/usb/gspca/cpia1.c
902
sd->params.compressionTarget.targetFR,
drivers/media/usb/gspca/cpia1.c
903
sd->params.compressionTarget.targetQ, 0);
drivers/media/usb/gspca/cpia1.c
908
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
911
sd->params.yuvThreshold.yThreshold,
drivers/media/usb/gspca/cpia1.c
912
sd->params.yuvThreshold.uvThreshold, 0, 0);
drivers/media/usb/gspca/cpia1.c
917
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
922
sd->params.compressionParams.hysteresis,
drivers/media/usb/gspca/cpia1.c
923
sd->params.compressionParams.threshMax,
drivers/media/usb/gspca/cpia1.c
924
sd->params.compressionParams.smallStep,
drivers/media/usb/gspca/cpia1.c
925
sd->params.compressionParams.largeStep,
drivers/media/usb/gspca/cpia1.c
926
sd->params.compressionParams.decimationHysteresis,
drivers/media/usb/gspca/cpia1.c
927
sd->params.compressionParams.frDiffStepThresh,
drivers/media/usb/gspca/cpia1.c
928
sd->params.compressionParams.qDiffStepThresh,
drivers/media/usb/gspca/cpia1.c
929
sd->params.compressionParams.decimationThreshMod);
drivers/media/usb/gspca/cpia1.c
934
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
937
sd->params.compression.mode,
drivers/media/usb/gspca/cpia1.c
938
sd->params.compression.decimation, 0, 0);
drivers/media/usb/gspca/cpia1.c
943
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
946
sd->params.sensorFps.divisor,
drivers/media/usb/gspca/cpia1.c
947
sd->params.sensorFps.baserate, 0, 0);
drivers/media/usb/gspca/cpia1.c
952
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
955
sd->params.flickerControl.flickerMode,
drivers/media/usb/gspca/cpia1.c
956
sd->params.flickerControl.coarseJump,
drivers/media/usb/gspca/cpia1.c
957
sd->params.flickerControl.allowableOverExposure,
drivers/media/usb/gspca/cpia1.c
963
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
966
sd->params.ecpTiming, 0, 0, 0);
drivers/media/usb/gspca/cpia1.c
976
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
979
0, sd->params.streamStartLine, 0, 0);
drivers/media/usb/gspca/cpia1.c
984
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/cpia1.c
987
p1 = (sd->params.qx3.bottomlight == 0) << 1;
drivers/media/usb/gspca/cpia1.c
988
p2 = (sd->params.qx3.toplight == 0) << 3;
drivers/media/usb/gspca/dtcs033.c
192
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/dtcs033.c
202
ctrl->val, sd->gain->val);
drivers/media/usb/gspca/dtcs033.c
206
sd->exposure->val, ctrl->val);
drivers/media/usb/gspca/dtcs033.c
219
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/dtcs033.c
224
sd->exposure = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/dtcs033.c
227
sd->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/dtcs033.c
236
v4l2_ctrl_cluster(2, &sd->exposure);
drivers/media/usb/gspca/dtcs033.c
264
&sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/etoms.c
398
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/etoms.c
407
if (sd->sensor == SENSOR_PAS106) {
drivers/media/usb/gspca/etoms.c
415
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/etoms.c
417
if (sd->sensor == SENSOR_PAS106) {
drivers/media/usb/gspca/etoms.c
427
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/etoms.c
429
if (sd->autogain)
drivers/media/usb/gspca/etoms.c
430
sd->ag_cnt = AG_CNT_START;
drivers/media/usb/gspca/etoms.c
432
sd->ag_cnt = -1;
drivers/media/usb/gspca/etoms.c
539
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/etoms.c
543
sd->sensor = id->driver_info;
drivers/media/usb/gspca/etoms.c
544
if (sd->sensor == SENSOR_PAS106) {
drivers/media/usb/gspca/etoms.c
551
sd->ag_cnt = -1;
drivers/media/usb/gspca/etoms.c
558
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/etoms.c
560
if (sd->sensor == SENSOR_PAS106)
drivers/media/usb/gspca/etoms.c
572
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/etoms.c
574
if (sd->sensor == SENSOR_PAS106)
drivers/media/usb/gspca/etoms.c
593
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/etoms.c
595
if (sd->sensor == SENSOR_PAS106) {
drivers/media/usb/gspca/etoms.c
606
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/etoms.c
608
if (sd->sensor == SENSOR_PAS106) {
drivers/media/usb/gspca/etoms.c
623
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/etoms.c
631
if (sd->ag_cnt < 0)
drivers/media/usb/gspca/etoms.c
633
if (--sd->ag_cnt >= 0)
drivers/media/usb/gspca/etoms.c
635
sd->ag_cnt = AG_CNT_START;
drivers/media/usb/gspca/etoms.c
689
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/etoms.c
707
sd->autogain = ctrl->val;
drivers/media/usb/gspca/etoms.c
720
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/etoms.c
729
if (sd->sensor == SENSOR_PAS106)
drivers/media/usb/gspca/etoms.c
766
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/gl860/gl860-mi1320.c
202
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
204
sd->vcur.backlight = 0;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
205
sd->vcur.brightness = 0;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
206
sd->vcur.sharpness = 6;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
207
sd->vcur.contrast = 10;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
208
sd->vcur.gamma = 20;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
209
sd->vcur.hue = 0;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
210
sd->vcur.saturation = 6;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
211
sd->vcur.whitebal = 0;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
212
sd->vcur.mirror = 0;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
213
sd->vcur.flip = 0;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
214
sd->vcur.AC50Hz = 1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
216
sd->vmax.backlight = 2;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
217
sd->vmax.brightness = 8;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
218
sd->vmax.sharpness = 7;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
219
sd->vmax.contrast = 0; /* 10 but not working with this driver */
drivers/media/usb/gspca/gl860/gl860-mi1320.c
220
sd->vmax.gamma = 40;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
221
sd->vmax.hue = 5 + 1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
222
sd->vmax.saturation = 8;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
223
sd->vmax.whitebal = 2;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
224
sd->vmax.mirror = 1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
225
sd->vmax.flip = 1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
226
sd->vmax.AC50Hz = 1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
228
sd->dev_camera_settings = mi1320_camera_settings;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
229
sd->dev_init_at_startup = mi1320_init_at_startup;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
230
sd->dev_configure_alt = mi1320_configure_alt;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
231
sd->dev_init_pre_alt = mi1320_init_pre_alt;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
232
sd->dev_post_unset_alt = mi1320_post_unset_alt;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
277
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
279
sd->mirrorMask = 0;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
281
sd->vold.backlight = -1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
282
sd->vold.brightness = -1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
283
sd->vold.sharpness = -1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
284
sd->vold.contrast = -1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
285
sd->vold.saturation = -1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
286
sd->vold.gamma = -1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
287
sd->vold.hue = -1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
288
sd->vold.whitebal = -1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
289
sd->vold.mirror = -1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
290
sd->vold.flip = -1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
291
sd->vold.AC50Hz = -1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
365
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
367
s32 backlight = sd->vcur.backlight;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
368
s32 bright = sd->vcur.brightness;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
369
s32 sharp = sd->vcur.sharpness;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
370
s32 cntr = sd->vcur.contrast;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
371
s32 gam = sd->vcur.gamma;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
372
s32 hue = sd->vcur.hue;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
373
s32 sat = sd->vcur.saturation;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
374
s32 wbal = sd->vcur.whitebal;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
375
s32 mirror = (((sd->vcur.mirror > 0) ^ sd->mirrorMask) > 0);
drivers/media/usb/gspca/gl860/gl860-mi1320.c
376
s32 flip = (((sd->vcur.flip > 0) ^ sd->mirrorMask) > 0);
drivers/media/usb/gspca/gl860/gl860-mi1320.c
377
s32 freq = (sd->vcur.AC50Hz > 0);
drivers/media/usb/gspca/gl860/gl860-mi1320.c
380
if (freq != sd->vold.AC50Hz) {
drivers/media/usb/gspca/gl860/gl860-mi1320.c
381
sd->vold.AC50Hz = freq;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
390
if (wbal != sd->vold.whitebal) {
drivers/media/usb/gspca/gl860/gl860-mi1320.c
391
sd->vold.whitebal = wbal;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
392
if (wbal < 0 || wbal > sd->vmax.whitebal)
drivers/media/usb/gspca/gl860/gl860-mi1320.c
431
if (bright != sd->vold.brightness) {
drivers/media/usb/gspca/gl860/gl860-mi1320.c
432
sd->vold.brightness = bright;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
433
if (bright < 0 || bright > sd->vmax.brightness)
drivers/media/usb/gspca/gl860/gl860-mi1320.c
443
if (sat != sd->vold.saturation) {
drivers/media/usb/gspca/gl860/gl860-mi1320.c
444
sd->vold.saturation = sat;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
445
if (sat < 0 || sat > sd->vmax.saturation)
drivers/media/usb/gspca/gl860/gl860-mi1320.c
455
if (sharp != sd->vold.sharpness) {
drivers/media/usb/gspca/gl860/gl860-mi1320.c
456
sd->vold.sharpness = sharp;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
457
if (sharp < 0 || sharp > sd->vmax.sharpness)
drivers/media/usb/gspca/gl860/gl860-mi1320.c
466
if (hue != sd->vold.hue) {
drivers/media/usb/gspca/gl860/gl860-mi1320.c
468
if (hue < 0 || hue > sd->vmax.hue)
drivers/media/usb/gspca/gl860/gl860-mi1320.c
470
if (hue == sd->vmax.hue)
drivers/media/usb/gspca/gl860/gl860-mi1320.c
471
sd->swapRB = 1;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
473
sd->swapRB = 0;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
482
if (backlight != sd->vold.backlight) {
drivers/media/usb/gspca/gl860/gl860-mi1320.c
483
sd->vold.backlight = backlight;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
484
if (backlight < 0 || backlight > sd->vmax.backlight)
drivers/media/usb/gspca/gl860/gl860-mi1320.c
497
if (hue != sd->vold.hue) {
drivers/media/usb/gspca/gl860/gl860-mi1320.c
498
sd->vold.hue = hue;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
507
if (mirror != sd->vold.mirror || flip != sd->vold.flip) {
drivers/media/usb/gspca/gl860/gl860-mi1320.c
509
sd->vold.mirror = mirror;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
510
sd->vold.flip = flip;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
517
if (gam != sd->vold.gamma) {
drivers/media/usb/gspca/gl860/gl860-mi1320.c
518
sd->vold.gamma = gam;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
519
if (gam < 0 || gam > sd->vmax.gamma)
drivers/media/usb/gspca/gl860/gl860-mi1320.c
529
if (cntr != sd->vold.contrast) {
drivers/media/usb/gspca/gl860/gl860-mi1320.c
530
sd->vold.contrast = cntr;
drivers/media/usb/gspca/gl860/gl860-mi1320.c
531
if (cntr < 0 || cntr > sd->vmax.contrast)
drivers/media/usb/gspca/gl860/gl860-mi2020.c
353
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
355
sd->vcur.backlight = 0;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
356
sd->vcur.brightness = 70;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
357
sd->vcur.sharpness = 20;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
358
sd->vcur.contrast = 0;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
359
sd->vcur.gamma = 0;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
360
sd->vcur.hue = 0;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
361
sd->vcur.saturation = 60;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
362
sd->vcur.whitebal = 0; /* 50, not done by hardware */
drivers/media/usb/gspca/gl860/gl860-mi2020.c
363
sd->vcur.mirror = 0;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
364
sd->vcur.flip = 0;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
365
sd->vcur.AC50Hz = 1;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
367
sd->vmax.backlight = 64;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
368
sd->vmax.brightness = 128;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
369
sd->vmax.sharpness = 40;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
370
sd->vmax.contrast = 3;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
371
sd->vmax.gamma = 2;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
372
sd->vmax.hue = 0 + 1; /* 200, not done by hardware */
drivers/media/usb/gspca/gl860/gl860-mi2020.c
373
sd->vmax.saturation = 0; /* 100, not done by hardware */
drivers/media/usb/gspca/gl860/gl860-mi2020.c
374
sd->vmax.whitebal = 2; /* 100, not done by hardware */
drivers/media/usb/gspca/gl860/gl860-mi2020.c
375
sd->vmax.mirror = 1;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
376
sd->vmax.flip = 1;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
377
sd->vmax.AC50Hz = 1;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
379
sd->dev_camera_settings = mi2020_camera_settings;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
380
sd->dev_init_at_startup = mi2020_init_at_startup;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
381
sd->dev_configure_alt = mi2020_configure_alt;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
382
sd->dev_init_pre_alt = mi2020_init_pre_alt;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
383
sd->dev_post_unset_alt = mi2020_post_unset_alt;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
420
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
422
sd->mirrorMask = 0;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
423
sd->vold.hue = -1;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
426
sd->vold.brightness = -1;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
427
sd->vold.sharpness = -1;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
430
sd->vold.contrast = 0;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
431
sd->vold.gamma = 0;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
432
sd->vold.backlight = 0;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
441
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
444
s32 mirror = (((sd->vcur.mirror > 0) ^ sd->mirrorMask) > 0);
drivers/media/usb/gspca/gl860/gl860-mi2020.c
445
s32 flip = (((sd->vcur.flip > 0) ^ sd->mirrorMask) > 0);
drivers/media/usb/gspca/gl860/gl860-mi2020.c
446
s32 freq = (sd->vcur.AC50Hz > 0);
drivers/media/usb/gspca/gl860/gl860-mi2020.c
447
s32 wbal = sd->vcur.whitebal;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
459
sd->nbIm = -1;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
591
sd->nbIm = 0;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
593
sd->vold.mirror = mirror;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
594
sd->vold.flip = flip;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
595
sd->vold.AC50Hz = freq;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
596
sd->vold.whitebal = wbal;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
623
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
626
s32 backlight = sd->vcur.backlight;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
627
s32 bright = sd->vcur.brightness;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
628
s32 sharp = sd->vcur.sharpness;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
629
s32 cntr = sd->vcur.contrast;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
630
s32 gam = sd->vcur.gamma;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
631
s32 hue = (sd->vcur.hue > 0);
drivers/media/usb/gspca/gl860/gl860-mi2020.c
632
s32 mirror = (((sd->vcur.mirror > 0) ^ sd->mirrorMask) > 0);
drivers/media/usb/gspca/gl860/gl860-mi2020.c
633
s32 flip = (((sd->vcur.flip > 0) ^ sd->mirrorMask) > 0);
drivers/media/usb/gspca/gl860/gl860-mi2020.c
634
s32 freq = (sd->vcur.AC50Hz > 0);
drivers/media/usb/gspca/gl860/gl860-mi2020.c
635
s32 wbal = sd->vcur.whitebal;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
649
if (sd->nbIm < 4) {
drivers/media/usb/gspca/gl860/gl860-mi2020.c
650
sd->waitSet = 1;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
653
sd->waitSet = 0;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
655
if (freq != sd->vold.AC50Hz) {
drivers/media/usb/gspca/gl860/gl860-mi2020.c
656
sd->vold.AC50Hz = freq;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
664
if (wbal != sd->vold.whitebal) {
drivers/media/usb/gspca/gl860/gl860-mi2020.c
665
sd->vold.whitebal = wbal;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
666
if (wbal < 0 || wbal > sd->vmax.whitebal)
drivers/media/usb/gspca/gl860/gl860-mi2020.c
691
if (mirror != sd->vold.mirror || flip != sd->vold.flip) {
drivers/media/usb/gspca/gl860/gl860-mi2020.c
692
sd->vold.mirror = mirror;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
693
sd->vold.flip = flip;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
720
if (bright != sd->vold.brightness) {
drivers/media/usb/gspca/gl860/gl860-mi2020.c
721
sd->vold.brightness = bright;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
722
if (bright < 0 || bright > sd->vmax.brightness)
drivers/media/usb/gspca/gl860/gl860-mi2020.c
734
if (cntr != sd->vold.contrast || gam != sd->vold.gamma) {
drivers/media/usb/gspca/gl860/gl860-mi2020.c
735
sd->vold.contrast = cntr;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
736
if (cntr < 0 || cntr > sd->vmax.contrast)
drivers/media/usb/gspca/gl860/gl860-mi2020.c
738
sd->vold.gamma = gam;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
739
if (gam < 0 || gam > sd->vmax.gamma)
drivers/media/usb/gspca/gl860/gl860-mi2020.c
755
if (backlight != sd->vold.backlight) {
drivers/media/usb/gspca/gl860/gl860-mi2020.c
756
sd->vold.backlight = backlight;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
757
if (backlight < 0 || backlight > sd->vmax.backlight)
drivers/media/usb/gspca/gl860/gl860-mi2020.c
771
if (sharp != sd->vold.sharpness) {
drivers/media/usb/gspca/gl860/gl860-mi2020.c
772
sd->vold.sharpness = sharp;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
773
if (sharp < 0 || sharp > sd->vmax.sharpness)
drivers/media/usb/gspca/gl860/gl860-mi2020.c
780
if (hue != sd->vold.hue) {
drivers/media/usb/gspca/gl860/gl860-mi2020.c
781
sd->swapRB = hue;
drivers/media/usb/gspca/gl860/gl860-mi2020.c
782
sd->vold.hue = hue;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
173
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
175
sd->vcur.backlight = 32;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
176
sd->vcur.brightness = 0;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
177
sd->vcur.sharpness = 6;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
178
sd->vcur.contrast = 0;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
179
sd->vcur.gamma = 32;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
180
sd->vcur.hue = 0;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
181
sd->vcur.saturation = 128;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
182
sd->vcur.whitebal = 64;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
183
sd->vcur.mirror = 0;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
184
sd->vcur.flip = 0;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
186
sd->vmax.backlight = 64;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
187
sd->vmax.brightness = 255;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
188
sd->vmax.sharpness = 31;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
189
sd->vmax.contrast = 255;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
190
sd->vmax.gamma = 64;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
191
sd->vmax.hue = 254 + 2;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
192
sd->vmax.saturation = 255;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
193
sd->vmax.whitebal = 128;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
194
sd->vmax.mirror = 1;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
195
sd->vmax.flip = 1;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
196
sd->vmax.AC50Hz = 0;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
198
sd->dev_camera_settings = ov2640_camera_settings;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
199
sd->dev_init_at_startup = ov2640_init_at_startup;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
200
sd->dev_configure_alt = ov2640_configure_alt;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
201
sd->dev_init_pre_alt = ov2640_init_pre_alt;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
202
sd->dev_post_unset_alt = ov2640_post_unset_alt;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
235
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
237
sd->mirrorMask = 0;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
239
sd->vold.backlight = -1;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
240
sd->vold.brightness = -1;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
241
sd->vold.sharpness = -1;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
242
sd->vold.contrast = -1;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
243
sd->vold.saturation = -1;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
244
sd->vold.gamma = -1;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
245
sd->vold.hue = -1;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
246
sd->vold.whitebal = -1;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
247
sd->vold.mirror = -1;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
248
sd->vold.flip = -1;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
337
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
339
s32 backlight = sd->vcur.backlight;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
340
s32 bright = sd->vcur.brightness;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
341
s32 sharp = sd->vcur.sharpness;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
342
s32 gam = sd->vcur.gamma;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
343
s32 cntr = sd->vcur.contrast;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
344
s32 sat = sd->vcur.saturation;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
345
s32 hue = sd->vcur.hue;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
346
s32 wbal = sd->vcur.whitebal;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
347
s32 mirror = (((sd->vcur.mirror > 0) ^ sd->mirrorMask) == 0);
drivers/media/usb/gspca/gl860/gl860-ov2640.c
348
s32 flip = (((sd->vcur.flip > 0) ^ sd->mirrorMask) == 0);
drivers/media/usb/gspca/gl860/gl860-ov2640.c
350
if (backlight != sd->vold.backlight) {
drivers/media/usb/gspca/gl860/gl860-ov2640.c
352
if (backlight < 0 || backlight > sd->vmax.backlight)
drivers/media/usb/gspca/gl860/gl860-ov2640.c
363
if (bright != sd->vold.brightness) {
drivers/media/usb/gspca/gl860/gl860-ov2640.c
364
sd->vold.brightness = bright;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
365
if (bright < 0 || bright > sd->vmax.brightness)
drivers/media/usb/gspca/gl860/gl860-ov2640.c
373
if (wbal != sd->vold.whitebal) {
drivers/media/usb/gspca/gl860/gl860-ov2640.c
374
sd->vold.whitebal = wbal;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
375
if (wbal < 0 || wbal > sd->vmax.whitebal)
drivers/media/usb/gspca/gl860/gl860-ov2640.c
383
if (cntr != sd->vold.contrast) {
drivers/media/usb/gspca/gl860/gl860-ov2640.c
384
sd->vold.contrast = cntr;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
385
if (cntr < 0 || cntr > sd->vmax.contrast)
drivers/media/usb/gspca/gl860/gl860-ov2640.c
393
if (sat != sd->vold.saturation) {
drivers/media/usb/gspca/gl860/gl860-ov2640.c
394
sd->vold.saturation = sat;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
395
if (sat < 0 || sat > sd->vmax.saturation)
drivers/media/usb/gspca/gl860/gl860-ov2640.c
403
if (sharp != sd->vold.sharpness) {
drivers/media/usb/gspca/gl860/gl860-ov2640.c
404
sd->vold.sharpness = sharp;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
405
if (sharp < 0 || sharp > sd->vmax.sharpness)
drivers/media/usb/gspca/gl860/gl860-ov2640.c
413
if (hue != sd->vold.hue) {
drivers/media/usb/gspca/gl860/gl860-ov2640.c
414
sd->vold.hue = hue;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
415
if (hue < 0 || hue > sd->vmax.hue)
drivers/media/usb/gspca/gl860/gl860-ov2640.c
423
sd->swapRB = 1;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
425
sd->swapRB = 0;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
428
if (gam != sd->vold.gamma) {
drivers/media/usb/gspca/gl860/gl860-ov2640.c
429
sd->vold.gamma = gam;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
430
if (gam < 0 || gam > sd->vmax.gamma)
drivers/media/usb/gspca/gl860/gl860-ov2640.c
438
if (mirror != sd->vold.mirror || flip != sd->vold.flip) {
drivers/media/usb/gspca/gl860/gl860-ov2640.c
439
sd->vold.mirror = mirror;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
440
sd->vold.flip = flip;
drivers/media/usb/gspca/gl860/gl860-ov2640.c
457
if (backlight != sd->vold.backlight) {
drivers/media/usb/gspca/gl860/gl860-ov2640.c
458
sd->vold.backlight = backlight;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
192
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
194
sd->vcur.backlight = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
195
sd->vcur.brightness = 128;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
196
sd->vcur.sharpness = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
197
sd->vcur.contrast = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
198
sd->vcur.gamma = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
199
sd->vcur.hue = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
200
sd->vcur.saturation = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
201
sd->vcur.whitebal = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
203
sd->vmax.backlight = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
204
sd->vmax.brightness = 255;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
205
sd->vmax.sharpness = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
206
sd->vmax.contrast = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
207
sd->vmax.gamma = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
208
sd->vmax.hue = 0 + 1;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
209
sd->vmax.saturation = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
210
sd->vmax.whitebal = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
211
sd->vmax.mirror = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
212
sd->vmax.flip = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
213
sd->vmax.AC50Hz = 0;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
215
sd->dev_camera_settings = ov9655_camera_settings;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
216
sd->dev_init_at_startup = ov9655_init_at_startup;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
217
sd->dev_configure_alt = ov9655_configure_alt;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
218
sd->dev_init_pre_alt = ov9655_init_pre_alt;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
219
sd->dev_post_unset_alt = ov9655_post_unset_alt;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
236
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
238
sd->vold.brightness = -1;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
239
sd->vold.hue = -1;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
345
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
349
s32 bright = sd->vcur.brightness;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
350
s32 hue = sd->vcur.hue;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
352
if (bright != sd->vold.brightness) {
drivers/media/usb/gspca/gl860/gl860-ov9655.c
353
sd->vold.brightness = bright;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
354
if (bright < 0 || bright > sd->vmax.brightness)
drivers/media/usb/gspca/gl860/gl860-ov9655.c
361
if (hue != sd->vold.hue) {
drivers/media/usb/gspca/gl860/gl860-ov9655.c
362
sd->vold.hue = hue;
drivers/media/usb/gspca/gl860/gl860-ov9655.c
363
sd->swapRB = (hue != 0);
drivers/media/usb/gspca/gl860/gl860.c
105
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860.c
111
if (sd->vmax.brightness)
drivers/media/usb/gspca/gl860/gl860.c
113
0, sd->vmax.brightness, 1,
drivers/media/usb/gspca/gl860/gl860.c
114
sd->vcur.brightness);
drivers/media/usb/gspca/gl860/gl860.c
116
if (sd->vmax.contrast)
drivers/media/usb/gspca/gl860/gl860.c
118
0, sd->vmax.contrast, 1,
drivers/media/usb/gspca/gl860/gl860.c
119
sd->vcur.contrast);
drivers/media/usb/gspca/gl860/gl860.c
121
if (sd->vmax.saturation)
drivers/media/usb/gspca/gl860/gl860.c
123
0, sd->vmax.saturation, 1,
drivers/media/usb/gspca/gl860/gl860.c
124
sd->vcur.saturation);
drivers/media/usb/gspca/gl860/gl860.c
126
if (sd->vmax.hue)
drivers/media/usb/gspca/gl860/gl860.c
128
0, sd->vmax.hue, 1, sd->vcur.hue);
drivers/media/usb/gspca/gl860/gl860.c
130
if (sd->vmax.gamma)
drivers/media/usb/gspca/gl860/gl860.c
132
0, sd->vmax.gamma, 1, sd->vcur.gamma);
drivers/media/usb/gspca/gl860/gl860.c
134
if (sd->vmax.mirror)
drivers/media/usb/gspca/gl860/gl860.c
136
0, sd->vmax.mirror, 1, sd->vcur.mirror);
drivers/media/usb/gspca/gl860/gl860.c
138
if (sd->vmax.flip)
drivers/media/usb/gspca/gl860/gl860.c
140
0, sd->vmax.flip, 1, sd->vcur.flip);
drivers/media/usb/gspca/gl860/gl860.c
142
if (sd->vmax.AC50Hz)
drivers/media/usb/gspca/gl860/gl860.c
145
sd->vmax.AC50Hz, 0, sd->vcur.AC50Hz);
drivers/media/usb/gspca/gl860/gl860.c
147
if (sd->vmax.whitebal)
drivers/media/usb/gspca/gl860/gl860.c
150
0, sd->vmax.whitebal, 1, sd->vcur.whitebal);
drivers/media/usb/gspca/gl860/gl860.c
152
if (sd->vmax.sharpness)
drivers/media/usb/gspca/gl860/gl860.c
154
0, sd->vmax.sharpness, 1,
drivers/media/usb/gspca/gl860/gl860.c
155
sd->vcur.sharpness);
drivers/media/usb/gspca/gl860/gl860.c
157
if (sd->vmax.backlight)
drivers/media/usb/gspca/gl860/gl860.c
160
0, sd->vmax.backlight, 1,
drivers/media/usb/gspca/gl860/gl860.c
161
sd->vcur.backlight);
drivers/media/usb/gspca/gl860/gl860.c
319
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860.c
327
sd->nbRightUp = 1;
drivers/media/usb/gspca/gl860/gl860.c
328
sd->nbIm = -1;
drivers/media/usb/gspca/gl860/gl860.c
330
sd->sensor = 0xff;
drivers/media/usb/gspca/gl860/gl860.c
332
sd->sensor = ID_MI1320;
drivers/media/usb/gspca/gl860/gl860.c
334
sd->sensor = ID_OV2640;
drivers/media/usb/gspca/gl860/gl860.c
336
sd->sensor = ID_OV9655;
drivers/media/usb/gspca/gl860/gl860.c
338
sd->sensor = ID_MI2020;
drivers/media/usb/gspca/gl860/gl860.c
346
switch (sd->sensor) {
drivers/media/usb/gspca/gl860/gl860.c
378
((struct sd *) gspca_dev)->vcur.AC50Hz = AC50Hz;
drivers/media/usb/gspca/gl860/gl860.c
386
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860.c
388
return sd->dev_init_at_startup(gspca_dev);
drivers/media/usb/gspca/gl860/gl860.c
394
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860.c
396
return sd->dev_configure_alt(gspca_dev);
drivers/media/usb/gspca/gl860/gl860.c
402
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860.c
404
return sd->dev_init_pre_alt(gspca_dev);
drivers/media/usb/gspca/gl860/gl860.c
410
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860.c
412
if (!sd->gspca_dev.present)
drivers/media/usb/gspca/gl860/gl860.c
415
return sd->dev_post_unset_alt(gspca_dev);
drivers/media/usb/gspca/gl860/gl860.c
422
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860.c
427
sd->swapRB * (gspca_dev->cam.cam_mode[mode].bytesperline + 1);
drivers/media/usb/gspca/gl860/gl860.c
434
if (sd->nbIm >= 0 && sd->nbIm < 10)
drivers/media/usb/gspca/gl860/gl860.c
435
sd->nbIm++;
drivers/media/usb/gspca/gl860/gl860.c
461
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860.c
474
if (upsideDown && sd->nbRightUp > -4) {
drivers/media/usb/gspca/gl860/gl860.c
475
if (sd->nbRightUp > 0)
drivers/media/usb/gspca/gl860/gl860.c
476
sd->nbRightUp = 0;
drivers/media/usb/gspca/gl860/gl860.c
477
if (sd->nbRightUp == -3) {
drivers/media/usb/gspca/gl860/gl860.c
478
sd->mirrorMask = 1;
drivers/media/usb/gspca/gl860/gl860.c
479
sd->waitSet = 1;
drivers/media/usb/gspca/gl860/gl860.c
481
sd->nbRightUp--;
drivers/media/usb/gspca/gl860/gl860.c
483
if (!upsideDown && sd->nbRightUp < 4) {
drivers/media/usb/gspca/gl860/gl860.c
484
if (sd->nbRightUp < 0)
drivers/media/usb/gspca/gl860/gl860.c
485
sd->nbRightUp = 0;
drivers/media/usb/gspca/gl860/gl860.c
486
if (sd->nbRightUp == 3) {
drivers/media/usb/gspca/gl860/gl860.c
487
sd->mirrorMask = 0;
drivers/media/usb/gspca/gl860/gl860.c
488
sd->waitSet = 1;
drivers/media/usb/gspca/gl860/gl860.c
490
sd->nbRightUp++;
drivers/media/usb/gspca/gl860/gl860.c
494
if (sd->waitSet)
drivers/media/usb/gspca/gl860/gl860.c
495
sd->dev_camera_settings(gspca_dev);
drivers/media/usb/gspca/gl860/gl860.c
512
&sd_desc_mi1320, sizeof(struct sd), THIS_MODULE);
drivers/media/usb/gspca/gl860/gl860.c
53
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860.c
57
sd->vcur.brightness = ctrl->val;
drivers/media/usb/gspca/gl860/gl860.c
60
sd->vcur.contrast = ctrl->val;
drivers/media/usb/gspca/gl860/gl860.c
627
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/gl860/gl860.c
63
sd->vcur.saturation = ctrl->val;
drivers/media/usb/gspca/gl860/gl860.c
631
sd->sensor = ID_MI1320;
drivers/media/usb/gspca/gl860/gl860.c
633
if (sd->sensor == 0xff) {
drivers/media/usb/gspca/gl860/gl860.c
66
sd->vcur.hue = ctrl->val;
drivers/media/usb/gspca/gl860/gl860.c
688
sd->sensor = ID_OV2640;
drivers/media/usb/gspca/gl860/gl860.c
69
sd->vcur.gamma = ctrl->val;
drivers/media/usb/gspca/gl860/gl860.c
696
sd->sensor = ID_OV9655;
drivers/media/usb/gspca/gl860/gl860.c
712
sd->sensor = ID_MI2020;
drivers/media/usb/gspca/gl860/gl860.c
72
sd->vcur.mirror = ctrl->val;
drivers/media/usb/gspca/gl860/gl860.c
75
sd->vcur.flip = ctrl->val;
drivers/media/usb/gspca/gl860/gl860.c
78
sd->vcur.AC50Hz = ctrl->val;
drivers/media/usb/gspca/gl860/gl860.c
81
sd->vcur.whitebal = ctrl->val;
drivers/media/usb/gspca/gl860/gl860.c
84
sd->vcur.sharpness = ctrl->val;
drivers/media/usb/gspca/gl860/gl860.c
87
sd->vcur.backlight = ctrl->val;
drivers/media/usb/gspca/gl860/gl860.c
94
sd->waitSet = 1;
drivers/media/usb/gspca/gl860/gl860.h
23
#define _MI1320_ (((struct sd *) gspca_dev)->sensor == ID_MI1320)
drivers/media/usb/gspca/gl860/gl860.h
24
#define _MI2020_ (((struct sd *) gspca_dev)->sensor == ID_MI2020)
drivers/media/usb/gspca/gl860/gl860.h
25
#define _OV2640_ (((struct sd *) gspca_dev)->sensor == ID_OV2640)
drivers/media/usb/gspca/gl860/gl860.h
26
#define _OV9655_ (((struct sd *) gspca_dev)->sensor == ID_OV9655)
drivers/media/usb/gspca/jeilinj.c
208
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/jeilinj.c
236
sd->blocks_left = 0;
drivers/media/usb/gspca/jeilinj.c
240
if (sd->type == SPORTSCAM_DV15)
drivers/media/usb/gspca/jeilinj.c
252
setcamquality(gspca_dev, v4l2_ctrl_g_ctrl(sd->jpegqual));
drivers/media/usb/gspca/jeilinj.c
254
setfreq(gspca_dev, v4l2_ctrl_g_ctrl(sd->freq));
drivers/media/usb/gspca/jeilinj.c
263
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/jeilinj.c
276
sd->blocks_left = data[0x0a] - 1;
drivers/media/usb/gspca/jeilinj.c
278
sd->blocks_left);
drivers/media/usb/gspca/jeilinj.c
281
sd->jpeg_hdr, JPEG_HDR_SZ);
drivers/media/usb/gspca/jeilinj.c
286
} else if (sd->blocks_left > 0) {
drivers/media/usb/gspca/jeilinj.c
288
sd->blocks_left);
drivers/media/usb/gspca/jeilinj.c
289
sd->blocks_left -= 1;
drivers/media/usb/gspca/jeilinj.c
290
if (sd->blocks_left == 0)
drivers/media/usb/gspca/jeilinj.c
309
struct sd *dev = (struct sd *) gspca_dev;
drivers/media/usb/gspca/jeilinj.c
366
struct sd *dev = (struct sd *) gspca_dev;
drivers/media/usb/gspca/jeilinj.c
392
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/jeilinj.c
416
jpeg_set_qual(sd->jpeg_hdr, ctrl->val);
drivers/media/usb/gspca/jeilinj.c
429
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/jeilinj.c
443
sd->freq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/jeilinj.c
454
sd->jpegqual = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/jeilinj.c
468
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/jeilinj.c
470
v4l2_ctrl_s_ctrl(sd->jpegqual, jcomp->quality);
drivers/media/usb/gspca/jeilinj.c
477
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/jeilinj.c
480
jcomp->quality = v4l2_ctrl_g_ctrl(sd->jpegqual);
drivers/media/usb/gspca/jeilinj.c
521
sizeof(struct sd),
drivers/media/usb/gspca/jl2005bcd.c
166
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/jl2005bcd.c
185
sd->firmware_id[i] = gspca_dev->usb_buf[0];
drivers/media/usb/gspca/jl2005bcd.c
188
sd->firmware_id[0],
drivers/media/usb/gspca/jl2005bcd.c
189
sd->firmware_id[1],
drivers/media/usb/gspca/jl2005bcd.c
190
sd->firmware_id[2],
drivers/media/usb/gspca/jl2005bcd.c
191
sd->firmware_id[3],
drivers/media/usb/gspca/jl2005bcd.c
192
sd->firmware_id[4],
drivers/media/usb/gspca/jl2005bcd.c
193
sd->firmware_id[5]);
drivers/media/usb/gspca/jl2005bcd.c
306
struct sd *dev = container_of(work, struct sd, work_struct);
drivers/media/usb/gspca/jl2005bcd.c
399
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/jl2005bcd.c
419
if ((sd->firmware_id[0] & 0xf0) == 0x40) {
drivers/media/usb/gspca/jl2005bcd.c
422
sd->block_size = 0x80;
drivers/media/usb/gspca/jl2005bcd.c
426
sd->block_size = 0x200;
drivers/media/usb/gspca/jl2005bcd.c
429
INIT_WORK(&sd->work_struct, jl2005c_dostream);
drivers/media/usb/gspca/jl2005bcd.c
443
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/jl2005bcd.c
444
sd->cap_mode = gspca_dev->cam.cam_mode;
drivers/media/usb/gspca/jl2005bcd.c
468
schedule_work(&sd->work_struct);
drivers/media/usb/gspca/jl2005bcd.c
477
struct sd *dev = (struct sd *) gspca_dev;
drivers/media/usb/gspca/jl2005bcd.c
508
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/kinect.c
123
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/kinect.c
126
uint8_t *obuf = sd->obuf;
drivers/media/usb/gspca/kinect.c
127
uint8_t *ibuf = sd->ibuf;
drivers/media/usb/gspca/kinect.c
139
chdr->tag = cpu_to_le16(sd->cam_tag);
drivers/media/usb/gspca/kinect.c
147
sd->cam_tag, cmd_len, res);
drivers/media/usb/gspca/kinect.c
193
sd->cam_tag++;
drivers/media/usb/gspca/kinect.c
223
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/kinect.c
226
sd->cam_tag = 0;
drivers/media/usb/gspca/kinect.c
228
sd->stream_flag = 0x80;
drivers/media/usb/gspca/kinect.c
249
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/kinect.c
252
sd->cam_tag = 0;
drivers/media/usb/gspca/kinect.c
254
sd->stream_flag = 0x70;
drivers/media/usb/gspca/kinect.c
381
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/kinect.c
387
uint8_t sof = sd->stream_flag | 1;
drivers/media/usb/gspca/kinect.c
388
uint8_t mof = sd->stream_flag | 2;
drivers/media/usb/gspca/kinect.c
389
uint8_t eof = sd->stream_flag | 5;
drivers/media/usb/gspca/kinect.c
396
sd->stream_flag, hdr->magic[0], hdr->magic[1]);
drivers/media/usb/gspca/kinect.c
453
sizeof(struct sd), THIS_MODULE);
drivers/media/usb/gspca/kinect.c
456
sizeof(struct sd), THIS_MODULE);
drivers/media/usb/gspca/konica.c
170
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/konica.c
176
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
drivers/media/usb/gspca/konica.c
177
alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt);
drivers/media/usb/gspca/konica.c
239
struct sd *sd __maybe_unused = (struct sd *) gspca_dev;
drivers/media/usb/gspca/konica.c
245
if (sd->snapshot_pressed) {
drivers/media/usb/gspca/konica.c
248
sd->snapshot_pressed = 0;
drivers/media/usb/gspca/konica.c
257
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/konica.c
282
sd->last_data_urb = urb;
drivers/media/usb/gspca/konica.c
287
data_urb = sd->last_data_urb;
drivers/media/usb/gspca/konica.c
288
sd->last_data_urb = NULL;
drivers/media/usb/gspca/konica.c
341
if (sd->snapshot_pressed != button_state) {
drivers/media/usb/gspca/konica.c
346
sd->snapshot_pressed = button_state;
drivers/media/usb/gspca/konica.c
462
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/m5602/m5602_bridge.h
150
struct sd *sd, const u8 address, u8 *i2c_data);
drivers/media/usb/gspca/m5602/m5602_bridge.h
153
struct sd *sd, const u8 address, const u8 i2c_data);
drivers/media/usb/gspca/m5602/m5602_bridge.h
155
int m5602_write_sensor(struct sd *sd, const u8 address,
drivers/media/usb/gspca/m5602/m5602_bridge.h
158
int m5602_read_sensor(struct sd *sd, const u8 address,
drivers/media/usb/gspca/m5602/m5602_core.c
105
err = m5602_read_bridge(sd, M5602_XB_I2C_STATUS, &data);
drivers/media/usb/gspca/m5602/m5602_core.c
110
int m5602_read_sensor(struct sd *sd, const u8 address,
drivers/media/usb/gspca/m5602/m5602_core.c
114
struct gspca_dev *gspca_dev = (struct gspca_dev *) sd;
drivers/media/usb/gspca/m5602/m5602_core.c
116
if (!len || len > sd->sensor->i2c_regW)
drivers/media/usb/gspca/m5602/m5602_core.c
119
err = m5602_wait_for_i2c(sd);
drivers/media/usb/gspca/m5602/m5602_core.c
123
err = m5602_write_bridge(sd, M5602_XB_I2C_DEV_ADDR,
drivers/media/usb/gspca/m5602/m5602_core.c
124
sd->sensor->i2c_slave_id);
drivers/media/usb/gspca/m5602/m5602_core.c
128
err = m5602_write_bridge(sd, M5602_XB_I2C_REG_ADDR, address);
drivers/media/usb/gspca/m5602/m5602_core.c
136
if (sd->sensor->i2c_regW == 1) {
drivers/media/usb/gspca/m5602/m5602_core.c
137
err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 1);
drivers/media/usb/gspca/m5602/m5602_core.c
141
err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 0x08);
drivers/media/usb/gspca/m5602/m5602_core.c
143
err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 0x18 + len);
drivers/media/usb/gspca/m5602/m5602_core.c
147
err = m5602_wait_for_i2c(sd);
drivers/media/usb/gspca/m5602/m5602_core.c
151
err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i]));
drivers/media/usb/gspca/m5602/m5602_core.c
159
int m5602_write_sensor(struct sd *sd, const u8 address,
drivers/media/usb/gspca/m5602/m5602_core.c
164
struct gspca_dev *gspca_dev = (struct gspca_dev *) sd;
drivers/media/usb/gspca/m5602/m5602_core.c
165
struct usb_device *udev = sd->gspca_dev.dev;
drivers/media/usb/gspca/m5602/m5602_core.c
166
__u8 *buf = sd->gspca_dev.usb_buf;
drivers/media/usb/gspca/m5602/m5602_core.c
169
if (len > sd->sensor->i2c_regW || !len)
drivers/media/usb/gspca/m5602/m5602_core.c
175
buf[11] = sd->sensor->i2c_slave_id;
drivers/media/usb/gspca/m5602/m5602_core.c
206
static void m5602_dump_bridge(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_core.c
211
m5602_read_bridge(sd, i, &val);
drivers/media/usb/gspca/m5602/m5602_core.c
217
static int m5602_probe_sensor(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_core.c
220
sd->sensor = &po1030;
drivers/media/usb/gspca/m5602/m5602_core.c
221
if (!sd->sensor->probe(sd))
drivers/media/usb/gspca/m5602/m5602_core.c
225
sd->sensor = &mt9m111;
drivers/media/usb/gspca/m5602/m5602_core.c
226
if (!sd->sensor->probe(sd))
drivers/media/usb/gspca/m5602/m5602_core.c
230
sd->sensor = &s5k4aa;
drivers/media/usb/gspca/m5602/m5602_core.c
231
if (!sd->sensor->probe(sd))
drivers/media/usb/gspca/m5602/m5602_core.c
235
sd->sensor = &ov9650;
drivers/media/usb/gspca/m5602/m5602_core.c
236
if (!sd->sensor->probe(sd))
drivers/media/usb/gspca/m5602/m5602_core.c
240
sd->sensor = &ov7660;
drivers/media/usb/gspca/m5602/m5602_core.c
241
if (!sd->sensor->probe(sd))
drivers/media/usb/gspca/m5602/m5602_core.c
245
sd->sensor = &s5k83a;
drivers/media/usb/gspca/m5602/m5602_core.c
246
if (!sd->sensor->probe(sd))
drivers/media/usb/gspca/m5602/m5602_core.c
251
sd->sensor = NULL;
drivers/media/usb/gspca/m5602/m5602_core.c
260
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_core.c
265
err = sd->sensor->init(sd);
drivers/media/usb/gspca/m5602/m5602_core.c
272
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_core.c
274
if (!sd->sensor->init_controls)
drivers/media/usb/gspca/m5602/m5602_core.c
277
return sd->sensor->init_controls(sd);
drivers/media/usb/gspca/m5602/m5602_core.c
282
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_core.c
283
__u8 *buf = sd->gspca_dev.usb_buf;
drivers/media/usb/gspca/m5602/m5602_core.c
289
if (sd->sensor->start)
drivers/media/usb/gspca/m5602/m5602_core.c
290
sd->sensor->start(sd);
drivers/media/usb/gspca/m5602/m5602_core.c
305
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_core.c
314
data[2] != sd->frame_id) {
drivers/media/usb/gspca/m5602/m5602_core.c
316
sd->frame_id = data[2];
drivers/media/usb/gspca/m5602/m5602_core.c
325
sd->frame_count++;
drivers/media/usb/gspca/m5602/m5602_core.c
331
sd->frame_count);
drivers/media/usb/gspca/m5602/m5602_core.c
343
sd->frame_count, len);
drivers/media/usb/gspca/m5602/m5602_core.c
357
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_core.c
360
if (sd->sensor->stop)
drivers/media/usb/gspca/m5602/m5602_core.c
361
sd->sensor->stop(sd);
drivers/media/usb/gspca/m5602/m5602_core.c
379
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_core.c
386
m5602_dump_bridge(sd);
drivers/media/usb/gspca/m5602/m5602_core.c
389
err = m5602_probe_sensor(sd);
drivers/media/usb/gspca/m5602/m5602_core.c
406
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/m5602/m5602_core.c
413
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_core.c
415
if (sd->sensor->disconnect)
drivers/media/usb/gspca/m5602/m5602_core.c
416
sd->sensor->disconnect(sd);
drivers/media/usb/gspca/m5602/m5602_core.c
52
int m5602_read_bridge(struct sd *sd, const u8 address, u8 *i2c_data)
drivers/media/usb/gspca/m5602/m5602_core.c
55
struct gspca_dev *gspca_dev = (struct gspca_dev *) sd;
drivers/media/usb/gspca/m5602/m5602_core.c
56
struct usb_device *udev = sd->gspca_dev.dev;
drivers/media/usb/gspca/m5602/m5602_core.c
57
__u8 *buf = sd->gspca_dev.usb_buf;
drivers/media/usb/gspca/m5602/m5602_core.c
74
int m5602_write_bridge(struct sd *sd, const u8 address, const u8 i2c_data)
drivers/media/usb/gspca/m5602/m5602_core.c
77
struct gspca_dev *gspca_dev = (struct gspca_dev *) sd;
drivers/media/usb/gspca/m5602/m5602_core.c
78
struct usb_device *udev = sd->gspca_dev.dev;
drivers/media/usb/gspca/m5602/m5602_core.c
79
__u8 *buf = sd->gspca_dev.usb_buf;
drivers/media/usb/gspca/m5602/m5602_core.c
99
static int m5602_wait_for_i2c(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
195
int mt9m111_probe(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
199
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
20
static void mt9m111_dump_registers(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
216
err = m5602_write_bridge(sd,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
222
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
229
if (m5602_read_sensor(sd, MT9M111_SC_CHIPVER, data, 2))
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
240
sd->gspca_dev.cam.cam_mode = mt9m111_modes;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
241
sd->gspca_dev.cam.nmodes = ARRAY_SIZE(mt9m111_modes);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
246
int mt9m111_init(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
255
err = m5602_write_bridge(sd,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
261
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
267
mt9m111_dump_registers(sd);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
272
int mt9m111_init_controls(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
274
struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
276
sd->gspca_dev.vdev.ctrl_handler = hdl;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
279
sd->auto_white_bal = v4l2_ctrl_new_std(hdl, &mt9m111_ctrl_ops,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
282
sd->green_bal = v4l2_ctrl_new_custom(hdl, &mt9m111_greenbal_cfg, NULL);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
283
sd->red_bal = v4l2_ctrl_new_std(hdl, &mt9m111_ctrl_ops,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
286
sd->blue_bal = v4l2_ctrl_new_std(hdl, &mt9m111_ctrl_ops,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
294
sd->hflip = v4l2_ctrl_new_std(hdl, &mt9m111_ctrl_ops, V4L2_CID_HFLIP,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
296
sd->vflip = v4l2_ctrl_new_std(hdl, &mt9m111_ctrl_ops, V4L2_CID_VFLIP,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
304
v4l2_ctrl_auto_cluster(4, &sd->auto_white_bal, 0, false);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
305
v4l2_ctrl_cluster(2, &sd->hflip);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
310
int mt9m111_start(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
314
struct cam *cam = &sd->gspca_dev.cam;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
315
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
317
int width = cam->cam_mode[sd->gspca_dev.curr_mode].width - 1;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
318
int height = cam->cam_mode[sd->gspca_dev.curr_mode].height;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
322
err = m5602_write_bridge(sd,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
328
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
335
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height >> 8) & 0xff);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
339
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height & 0xff));
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
344
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
348
err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
352
err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 2);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
357
err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, 0);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
361
err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
366
err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, width & 0xff);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
370
err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
386
void mt9m111_disconnect(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
388
sd->sensor = NULL;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
395
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
400
sd->hflip->val, sd->vflip->val);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
403
hflip = !sd->hflip->val;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
404
vflip = !sd->vflip->val;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
407
err = m5602_write_sensor(sd, MT9M111_PAGE_MAP, data, 2);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
421
err = m5602_write_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
429
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
433
err = m5602_read_sensor(sd, MT9M111_CP_OPERATING_MODE_CTL, data, 2);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
439
err = m5602_write_sensor(sd, MT9M111_CP_OPERATING_MODE_CTL, data, 2);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
449
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
452
err = m5602_write_sensor(sd, MT9M111_PAGE_MAP, data, 2);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
477
err = m5602_write_sensor(sd, MT9M111_SC_GLOBAL_GAIN,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
487
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
493
err = m5602_write_sensor(sd, MT9M111_SC_GREEN_1_GAIN,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
498
return m5602_write_sensor(sd, MT9M111_SC_GREEN_2_GAIN,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
505
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
512
return m5602_write_sensor(sd, MT9M111_SC_BLUE_GAIN,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
519
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
526
return m5602_write_sensor(sd, MT9M111_SC_RED_GAIN,
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
534
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
545
err = mt9m111_set_green_balance(gspca_dev, sd->green_bal->val);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
548
err = mt9m111_set_red_balance(gspca_dev, sd->red_bal->val);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
551
err = mt9m111_set_blue_balance(gspca_dev, sd->blue_bal->val);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
566
static void mt9m111_dump_registers(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
574
m5602_write_sensor(sd, MT9M111_PAGE_MAP, value, 2);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
576
m5602_read_sensor(sd, address, value, 2);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
583
m5602_write_sensor(sd, MT9M111_PAGE_MAP, value, 2);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
585
m5602_read_sensor(sd, address, value, 2);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
592
m5602_write_sensor(sd, MT9M111_PAGE_MAP, value, 2);
drivers/media/usb/gspca/m5602/m5602_mt9m111.c
594
m5602_read_sensor(sd, address, value, 2);
drivers/media/usb/gspca/m5602/m5602_mt9m111.h
107
int mt9m111_probe(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_mt9m111.h
108
int mt9m111_init(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_mt9m111.h
109
int mt9m111_init_controls(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_mt9m111.h
110
int mt9m111_start(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_mt9m111.h
111
void mt9m111_disconnect(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
193
int ov7660_probe(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_ov7660.c
20
static void ov7660_dump_registers(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
213
err = m5602_write_bridge(sd,
drivers/media/usb/gspca/m5602/m5602_ov7660.c
218
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_ov7660.c
225
if (m5602_read_sensor(sd, OV7660_PID, &prod_id, 1))
drivers/media/usb/gspca/m5602/m5602_ov7660.c
228
if (m5602_read_sensor(sd, OV7660_VER, &ver_id, 1))
drivers/media/usb/gspca/m5602/m5602_ov7660.c
240
sd->gspca_dev.cam.cam_mode = ov7660_modes;
drivers/media/usb/gspca/m5602/m5602_ov7660.c
241
sd->gspca_dev.cam.nmodes = ARRAY_SIZE(ov7660_modes);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
246
int ov7660_init(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_ov7660.c
255
err = m5602_write_bridge(sd,
drivers/media/usb/gspca/m5602/m5602_ov7660.c
260
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_ov7660.c
268
ov7660_dump_registers(sd);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
273
int ov7660_init_controls(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_ov7660.c
275
struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
drivers/media/usb/gspca/m5602/m5602_ov7660.c
277
sd->gspca_dev.vdev.ctrl_handler = hdl;
drivers/media/usb/gspca/m5602/m5602_ov7660.c
285
sd->autogain = v4l2_ctrl_new_std(hdl, &ov7660_ctrl_ops,
drivers/media/usb/gspca/m5602/m5602_ov7660.c
287
sd->gain = v4l2_ctrl_new_std(hdl, &ov7660_ctrl_ops, V4L2_CID_GAIN, 0,
drivers/media/usb/gspca/m5602/m5602_ov7660.c
290
sd->hflip = v4l2_ctrl_new_std(hdl, &ov7660_ctrl_ops, V4L2_CID_HFLIP,
drivers/media/usb/gspca/m5602/m5602_ov7660.c
292
sd->vflip = v4l2_ctrl_new_std(hdl, &ov7660_ctrl_ops, V4L2_CID_VFLIP,
drivers/media/usb/gspca/m5602/m5602_ov7660.c
300
v4l2_ctrl_auto_cluster(2, &sd->autogain, 0, false);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
301
v4l2_ctrl_cluster(2, &sd->hflip);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
306
int ov7660_start(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_ov7660.c
311
int ov7660_stop(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_ov7660.c
316
void ov7660_disconnect(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_ov7660.c
318
ov7660_stop(sd);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
320
sd->sensor = NULL;
drivers/media/usb/gspca/m5602/m5602_ov7660.c
327
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_ov7660.c
331
err = m5602_write_sensor(sd, OV7660_GAIN, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
340
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_ov7660.c
344
err = m5602_read_sensor(sd, OV7660_COM8, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
349
err = m5602_write_sensor(sd, OV7660_COM8, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
358
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_ov7660.c
362
err = m5602_read_sensor(sd, OV7660_COM8, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
368
return m5602_write_sensor(sd, OV7660_COM8, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
376
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_ov7660.c
380
err = m5602_read_sensor(sd, OV7660_COM8, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
387
return m5602_write_sensor(sd, OV7660_COM8, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
394
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_ov7660.c
397
sd->hflip->val, sd->vflip->val);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
399
i2c_data = (sd->hflip->val << 5) | (sd->vflip->val << 4);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
401
err = m5602_write_sensor(sd, OV7660_MVFP, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
410
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_ov7660.c
427
err = ov7660_set_gain(gspca_dev, sd->gain->val);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
439
static void ov7660_dump_registers(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_ov7660.c
445
m5602_read_sensor(sd, address, &value, 1);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
456
m5602_read_sensor(sd, address, &old_value, 1);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
457
m5602_write_sensor(sd, address, test_value, 1);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
458
m5602_read_sensor(sd, address, &ctrl_value, 1);
drivers/media/usb/gspca/m5602/m5602_ov7660.c
466
m5602_write_sensor(sd, address, &old_value, 1);
drivers/media/usb/gspca/m5602/m5602_ov7660.h
87
int ov7660_probe(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_ov7660.h
88
int ov7660_init(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_ov7660.h
89
int ov7660_init_controls(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_ov7660.h
90
int ov7660_start(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_ov7660.h
91
int ov7660_stop(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_ov7660.h
92
void ov7660_disconnect(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
21
static void ov9650_dump_registers(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
294
int ov9650_probe(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_ov9650.c
298
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
316
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
319
err = m5602_write_bridge(sd,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
326
if (m5602_read_sensor(sd, OV9650_PID, &prod_id, 1))
drivers/media/usb/gspca/m5602/m5602_ov9650.c
329
if (m5602_read_sensor(sd, OV9650_VER, &ver_id, 1))
drivers/media/usb/gspca/m5602/m5602_ov9650.c
339
sd->gspca_dev.cam.cam_mode = ov9650_modes;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
340
sd->gspca_dev.cam.nmodes = ARRAY_SIZE(ov9650_modes);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
345
int ov9650_init(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_ov9650.c
351
ov9650_dump_registers(sd);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
356
err = m5602_write_sensor(sd, init_ov9650[i][1],
drivers/media/usb/gspca/m5602/m5602_ov9650.c
359
err = m5602_write_bridge(sd, init_ov9650[i][1], data);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
365
int ov9650_init_controls(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_ov9650.c
367
struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
369
sd->gspca_dev.vdev.ctrl_handler = hdl;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
372
sd->auto_white_bal = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
375
sd->red_bal = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
378
sd->blue_bal = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
382
sd->autoexpo = v4l2_ctrl_new_std_menu(hdl, &ov9650_ctrl_ops,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
384
sd->expo = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, V4L2_CID_EXPOSURE,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
387
sd->autogain = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
389
sd->gain = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, V4L2_CID_GAIN, 0,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
392
sd->hflip = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, V4L2_CID_HFLIP,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
394
sd->vflip = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, V4L2_CID_VFLIP,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
402
v4l2_ctrl_auto_cluster(3, &sd->auto_white_bal, 0, false);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
403
v4l2_ctrl_auto_cluster(2, &sd->autoexpo, 0, false);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
404
v4l2_ctrl_auto_cluster(2, &sd->autogain, 0, false);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
405
v4l2_ctrl_cluster(2, &sd->hflip);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
410
int ov9650_start(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_ov9650.c
414
struct cam *cam = &sd->gspca_dev.cam;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
416
int width = cam->cam_mode[sd->gspca_dev.curr_mode].width;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
417
int height = cam->cam_mode[sd->gspca_dev.curr_mode].height;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
418
int ver_offs = cam->cam_mode[sd->gspca_dev.curr_mode].priv;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
420
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
423
sd->vflip->val) ||
drivers/media/usb/gspca/m5602/m5602_ov9650.c
425
!sd->vflip->val))
drivers/media/usb/gspca/m5602/m5602_ov9650.c
434
err = m5602_write_bridge(sd, res_init_ov9650[i][1],
drivers/media/usb/gspca/m5602/m5602_ov9650.c
438
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
445
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
450
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (ver_offs & 0xff));
drivers/media/usb/gspca/m5602/m5602_ov9650.c
454
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
458
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height >> 8) & 0xff);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
462
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height & 0xff));
drivers/media/usb/gspca/m5602/m5602_ov9650.c
467
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
471
err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
475
err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 2);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
479
err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
484
err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, hor_offs & 0xff);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
488
err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
493
err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
498
err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
508
err = m5602_write_sensor(sd, OV9650_COM7, &data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
516
err = m5602_write_sensor(sd, OV9650_COM7, &data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
524
err = m5602_write_sensor(sd, OV9650_COM7, &data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
532
err = m5602_write_sensor(sd, OV9650_COM7, &data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
538
int ov9650_stop(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_ov9650.c
541
return m5602_write_sensor(sd, OV9650_COM2, &data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
544
void ov9650_disconnect(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_ov9650.c
546
ov9650_stop(sd);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
548
sd->sensor = NULL;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
553
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
561
err = m5602_write_sensor(sd, OV9650_AECHM,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
568
err = m5602_write_sensor(sd, OV9650_AECH,
drivers/media/usb/gspca/m5602/m5602_ov9650.c
575
err = m5602_write_sensor(sd, OV9650_COM1, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
583
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
590
err = m5602_read_sensor(sd, OV9650_VREF, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
597
err = m5602_write_sensor(sd, OV9650_VREF, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
603
err = m5602_write_sensor(sd, OV9650_GAIN, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
611
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
616
err = m5602_write_sensor(sd, OV9650_RED, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
624
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
629
err = m5602_write_sensor(sd, OV9650_BLUE, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
637
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
638
int hflip = sd->hflip->val;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
639
int vflip = sd->vflip->val;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
647
err = m5602_write_sensor(sd, OV9650_MVFP, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
653
err = ov9650_start(sd);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
663
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
667
err = m5602_read_sensor(sd, OV9650_COM8, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
674
return m5602_write_sensor(sd, OV9650_COM8, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
682
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
686
err = m5602_read_sensor(sd, OV9650_COM8, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
691
err = m5602_write_sensor(sd, OV9650_COM8, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
700
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
704
err = m5602_read_sensor(sd, OV9650_COM8, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
710
return m5602_write_sensor(sd, OV9650_COM8, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
717
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_ov9650.c
728
err = ov9650_set_red_balance(gspca_dev, sd->red_bal->val);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
731
err = ov9650_set_blue_balance(gspca_dev, sd->blue_bal->val);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
737
err = ov9650_set_exposure(gspca_dev, sd->expo->val);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
743
err = ov9650_set_gain(gspca_dev, sd->gain->val);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
755
static void ov9650_dump_registers(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_ov9650.c
761
m5602_read_sensor(sd, address, &value, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
772
m5602_read_sensor(sd, address, &old_value, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
773
m5602_write_sensor(sd, address, test_value, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
774
m5602_read_sensor(sd, address, &ctrl_value, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.c
782
m5602_write_sensor(sd, address, &old_value, 1);
drivers/media/usb/gspca/m5602/m5602_ov9650.h
136
int ov9650_probe(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_ov9650.h
137
int ov9650_init(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_ov9650.h
138
int ov9650_init_controls(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_ov9650.h
139
int ov9650_start(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_ov9650.h
140
int ov9650_stop(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_ov9650.h
141
void ov9650_disconnect(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_po1030.c
155
int po1030_probe(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_po1030.c
159
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/m5602/m5602_po1030.c
177
err = m5602_write_sensor(sd, preinit_po1030[i][1],
drivers/media/usb/gspca/m5602/m5602_po1030.c
180
err = m5602_write_bridge(sd, preinit_po1030[i][1],
drivers/media/usb/gspca/m5602/m5602_po1030.c
186
if (m5602_read_sensor(sd, PO1030_DEVID_H, &dev_id_h, 1))
drivers/media/usb/gspca/m5602/m5602_po1030.c
196
sd->gspca_dev.cam.cam_mode = po1030_modes;
drivers/media/usb/gspca/m5602/m5602_po1030.c
197
sd->gspca_dev.cam.nmodes = ARRAY_SIZE(po1030_modes);
drivers/media/usb/gspca/m5602/m5602_po1030.c
20
static void po1030_dump_registers(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_po1030.c
202
int po1030_init(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_po1030.c
212
err = m5602_write_bridge(sd,
drivers/media/usb/gspca/m5602/m5602_po1030.c
219
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_po1030.c
232
po1030_dump_registers(sd);
drivers/media/usb/gspca/m5602/m5602_po1030.c
237
int po1030_init_controls(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_po1030.c
239
struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
drivers/media/usb/gspca/m5602/m5602_po1030.c
241
sd->gspca_dev.vdev.ctrl_handler = hdl;
drivers/media/usb/gspca/m5602/m5602_po1030.c
244
sd->auto_white_bal = v4l2_ctrl_new_std(hdl, &po1030_ctrl_ops,
drivers/media/usb/gspca/m5602/m5602_po1030.c
247
sd->green_bal = v4l2_ctrl_new_custom(hdl, &po1030_greenbal_cfg, NULL);
drivers/media/usb/gspca/m5602/m5602_po1030.c
248
sd->red_bal = v4l2_ctrl_new_std(hdl, &po1030_ctrl_ops,
drivers/media/usb/gspca/m5602/m5602_po1030.c
251
sd->blue_bal = v4l2_ctrl_new_std(hdl, &po1030_ctrl_ops,
drivers/media/usb/gspca/m5602/m5602_po1030.c
255
sd->autoexpo = v4l2_ctrl_new_std_menu(hdl, &po1030_ctrl_ops,
drivers/media/usb/gspca/m5602/m5602_po1030.c
257
sd->expo = v4l2_ctrl_new_std(hdl, &po1030_ctrl_ops, V4L2_CID_EXPOSURE,
drivers/media/usb/gspca/m5602/m5602_po1030.c
260
sd->gain = v4l2_ctrl_new_std(hdl, &po1030_ctrl_ops, V4L2_CID_GAIN, 0,
drivers/media/usb/gspca/m5602/m5602_po1030.c
263
sd->hflip = v4l2_ctrl_new_std(hdl, &po1030_ctrl_ops, V4L2_CID_HFLIP,
drivers/media/usb/gspca/m5602/m5602_po1030.c
265
sd->vflip = v4l2_ctrl_new_std(hdl, &po1030_ctrl_ops, V4L2_CID_VFLIP,
drivers/media/usb/gspca/m5602/m5602_po1030.c
273
v4l2_ctrl_auto_cluster(4, &sd->auto_white_bal, 0, false);
drivers/media/usb/gspca/m5602/m5602_po1030.c
274
v4l2_ctrl_auto_cluster(2, &sd->autoexpo, 0, false);
drivers/media/usb/gspca/m5602/m5602_po1030.c
275
v4l2_ctrl_cluster(2, &sd->hflip);
drivers/media/usb/gspca/m5602/m5602_po1030.c
280
int po1030_start(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_po1030.c
282
struct cam *cam = &sd->gspca_dev.cam;
drivers/media/usb/gspca/m5602/m5602_po1030.c
284
int width = cam->cam_mode[sd->gspca_dev.curr_mode].width;
drivers/media/usb/gspca/m5602/m5602_po1030.c
285
int height = cam->cam_mode[sd->gspca_dev.curr_mode].height;
drivers/media/usb/gspca/m5602/m5602_po1030.c
286
int ver_offs = cam->cam_mode[sd->gspca_dev.curr_mode].priv;
drivers/media/usb/gspca/m5602/m5602_po1030.c
292
err = m5602_write_sensor(sd, PO1030_CONTROL3, &data, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
297
err = m5602_write_sensor(sd, PO1030_WINDOWWIDTH_H, &data, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
302
err = m5602_write_sensor(sd, PO1030_WINDOWWIDTH_L, &data, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
307
err = m5602_write_sensor(sd, PO1030_WINDOWHEIGHT_H, &data, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
312
err = m5602_write_sensor(sd, PO1030_WINDOWHEIGHT_L, &data, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
320
err = m5602_write_sensor(sd, PO1030_CONTROL3, &data, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
325
err = m5602_write_sensor(sd, PO1030_WINDOWWIDTH_H, &data, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
330
err = m5602_write_sensor(sd, PO1030_WINDOWWIDTH_L, &data, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
335
err = m5602_write_sensor(sd, PO1030_WINDOWHEIGHT_H, &data, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
340
err = m5602_write_sensor(sd, PO1030_WINDOWHEIGHT_L, &data, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
346
err = m5602_write_bridge(sd, M5602_XB_SENSOR_TYPE, 0x0c);
drivers/media/usb/gspca/m5602/m5602_po1030.c
350
err = m5602_write_bridge(sd, M5602_XB_LINE_OF_FRAME_H, 0x81);
drivers/media/usb/gspca/m5602/m5602_po1030.c
354
err = m5602_write_bridge(sd, M5602_XB_PIX_OF_LINE_H, 0x82);
drivers/media/usb/gspca/m5602/m5602_po1030.c
358
err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0x01);
drivers/media/usb/gspca/m5602/m5602_po1030.c
362
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA,
drivers/media/usb/gspca/m5602/m5602_po1030.c
367
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (ver_offs & 0xff));
drivers/media/usb/gspca/m5602/m5602_po1030.c
372
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0);
drivers/media/usb/gspca/m5602/m5602_po1030.c
376
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height >> 8) & 0xff);
drivers/media/usb/gspca/m5602/m5602_po1030.c
380
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, (height & 0xff));
drivers/media/usb/gspca/m5602/m5602_po1030.c
385
err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0);
drivers/media/usb/gspca/m5602/m5602_po1030.c
388
err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0);
drivers/media/usb/gspca/m5602/m5602_po1030.c
391
err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, 0);
drivers/media/usb/gspca/m5602/m5602_po1030.c
395
err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, (width >> 8) & 0xff);
drivers/media/usb/gspca/m5602/m5602_po1030.c
399
err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, (width & 0xff));
drivers/media/usb/gspca/m5602/m5602_po1030.c
403
err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0);
drivers/media/usb/gspca/m5602/m5602_po1030.c
409
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_po1030.c
419
err = m5602_write_sensor(sd, PO1030_INTEGLINES_H,
drivers/media/usb/gspca/m5602/m5602_po1030.c
427
err = m5602_write_sensor(sd, PO1030_INTEGLINES_M,
drivers/media/usb/gspca/m5602/m5602_po1030.c
435
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_po1030.c
441
err = m5602_write_sensor(sd, PO1030_GLOBALGAIN,
drivers/media/usb/gspca/m5602/m5602_po1030.c
448
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_po1030.c
453
sd->hflip->val, sd->vflip->val);
drivers/media/usb/gspca/m5602/m5602_po1030.c
454
err = m5602_read_sensor(sd, PO1030_CONTROL2, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
458
i2c_data = (0x3f & i2c_data) | (sd->hflip->val << 7) |
drivers/media/usb/gspca/m5602/m5602_po1030.c
459
(sd->vflip->val << 6);
drivers/media/usb/gspca/m5602/m5602_po1030.c
461
err = m5602_write_sensor(sd, PO1030_CONTROL2,
drivers/media/usb/gspca/m5602/m5602_po1030.c
469
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_po1030.c
475
err = m5602_write_sensor(sd, PO1030_RED_GAIN,
drivers/media/usb/gspca/m5602/m5602_po1030.c
482
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_po1030.c
488
err = m5602_write_sensor(sd, PO1030_BLUE_GAIN,
drivers/media/usb/gspca/m5602/m5602_po1030.c
496
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_po1030.c
503
err = m5602_write_sensor(sd, PO1030_GREEN_1_GAIN,
drivers/media/usb/gspca/m5602/m5602_po1030.c
508
return m5602_write_sensor(sd, PO1030_GREEN_2_GAIN,
drivers/media/usb/gspca/m5602/m5602_po1030.c
515
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_po1030.c
519
err = m5602_read_sensor(sd, PO1030_AUTOCTRL1, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
525
err = m5602_write_sensor(sd, PO1030_AUTOCTRL1, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
532
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_po1030.c
536
err = m5602_read_sensor(sd, PO1030_AUTOCTRL1, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
543
return m5602_write_sensor(sd, PO1030_AUTOCTRL1, &i2c_data, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
546
void po1030_disconnect(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_po1030.c
548
sd->sensor = NULL;
drivers/media/usb/gspca/m5602/m5602_po1030.c
555
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_po1030.c
566
err = po1030_set_green_balance(gspca_dev, sd->green_bal->val);
drivers/media/usb/gspca/m5602/m5602_po1030.c
569
err = po1030_set_red_balance(gspca_dev, sd->red_bal->val);
drivers/media/usb/gspca/m5602/m5602_po1030.c
572
err = po1030_set_blue_balance(gspca_dev, sd->blue_bal->val);
drivers/media/usb/gspca/m5602/m5602_po1030.c
578
err = po1030_set_exposure(gspca_dev, sd->expo->val);
drivers/media/usb/gspca/m5602/m5602_po1030.c
593
static void po1030_dump_registers(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_po1030.c
600
m5602_read_sensor(sd, address, &value, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
611
m5602_read_sensor(sd, address, &old_value, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
612
m5602_write_sensor(sd, address, test_value, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
613
m5602_read_sensor(sd, address, &ctrl_value, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.c
621
m5602_write_sensor(sd, address, &old_value, 1);
drivers/media/usb/gspca/m5602/m5602_po1030.h
148
int po1030_probe(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_po1030.h
149
int po1030_init(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_po1030.h
150
int po1030_init_controls(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_po1030.h
151
int po1030_start(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_po1030.h
152
void po1030_disconnect(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
219
static void s5k4aa_dump_registers(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
339
int s5k4aa_probe(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
343
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
364
err = m5602_write_bridge(sd,
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
371
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
379
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
390
if (m5602_read_sensor(sd, 0x00, prod_id, 2))
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
392
if (m5602_read_sensor(sd, 0x02, prod_id+2, 2))
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
394
if (m5602_read_sensor(sd, 0x04, prod_id+4, 2))
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
403
sd->gspca_dev.cam.cam_mode = s5k4aa_modes;
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
404
sd->gspca_dev.cam.nmodes = ARRAY_SIZE(s5k4aa_modes);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
409
int s5k4aa_start(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
413
struct cam *cam = &sd->gspca_dev.cam;
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
414
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
416
switch (cam->cam_mode[sd->gspca_dev.curr_mode].width) {
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
423
err = m5602_write_bridge(sd,
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
430
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
438
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
456
err = m5602_write_bridge(sd,
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
463
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
471
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
489
int s5k4aa_init(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
498
err = m5602_write_bridge(sd,
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
505
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
512
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
522
s5k4aa_dump_registers(sd);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
527
int s5k4aa_init_controls(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
529
struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
531
sd->gspca_dev.vdev.ctrl_handler = hdl;
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
546
sd->hflip = v4l2_ctrl_new_std(hdl, &s5k4aa_ctrl_ops, V4L2_CID_HFLIP,
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
548
sd->vflip = v4l2_ctrl_new_std(hdl, &s5k4aa_ctrl_ops, V4L2_CID_VFLIP,
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
556
v4l2_ctrl_cluster(2, &sd->hflip);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
563
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
568
err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
572
err = m5602_write_sensor(sd, S5K4AA_EXPOSURE_HI, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
576
err = m5602_write_sensor(sd, S5K4AA_EXPOSURE_LO, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
583
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
586
int hflip = sd->hflip->val;
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
587
int vflip = sd->vflip->val;
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
590
err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
594
err = m5602_read_sensor(sd, S5K4AA_READ_MODE, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
604
err = m5602_write_sensor(sd, S5K4AA_READ_MODE, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
608
err = m5602_read_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
615
err = m5602_write_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
619
err = m5602_read_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
626
err = m5602_write_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
635
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
640
err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
645
err = m5602_write_sensor(sd, S5K4AA_GAIN, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
652
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
657
err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
662
return m5602_write_sensor(sd, S5K4AA_BRIGHTNESS, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
667
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
672
err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
677
return m5602_write_sensor(sd, S5K4AA_NOISE_SUPP, &data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
712
void s5k4aa_disconnect(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
714
sd->sensor = NULL;
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
717
static void s5k4aa_dump_registers(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
721
m5602_read_sensor(sd, S5K4AA_PAGE_MAP, &old_page, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
723
m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &page, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
728
m5602_read_sensor(sd, address, &value, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
736
m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &page, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
742
m5602_read_sensor(sd, address, &old_value, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
743
m5602_write_sensor(sd, address, &test_value, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
744
m5602_read_sensor(sd, address, &ctrl_value, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
754
m5602_write_sensor(sd, address, &old_value, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.c
758
m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &old_page, 1);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.h
66
int s5k4aa_probe(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.h
67
int s5k4aa_init(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.h
68
int s5k4aa_init_controls(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.h
69
int s5k4aa_start(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_s5k4aa.h
70
void s5k4aa_disconnect(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
164
static void s5k83a_dump_registers(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
165
static int s5k83a_get_rotation(struct sd *sd, u8 *reg_data);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
166
static int s5k83a_set_led_indication(struct sd *sd, u8 val);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
170
int s5k83a_probe(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
174
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
192
err = m5602_write_sensor(sd, preinit_s5k83a[i][1],
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
195
err = m5602_write_bridge(sd, preinit_s5k83a[i][1],
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
202
if (m5602_read_sensor(sd, 0x00, &prod_id, 1))
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
205
if (m5602_read_sensor(sd, 0x01, &ver_id, 1))
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
214
sd->gspca_dev.cam.cam_mode = s5k83a_modes;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
215
sd->gspca_dev.cam.nmodes = ARRAY_SIZE(s5k83a_modes);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
218
sd->rotation_thread = NULL;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
223
int s5k83a_init(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
232
err = m5602_write_bridge(sd,
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
239
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
246
err = m5602_write_sensor(sd,
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
256
s5k83a_dump_registers(sd);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
261
int s5k83a_init_controls(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
263
struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
265
sd->gspca_dev.vdev.ctrl_handler = hdl;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
278
sd->hflip = v4l2_ctrl_new_std(hdl, &s5k83a_ctrl_ops, V4L2_CID_HFLIP,
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
280
sd->vflip = v4l2_ctrl_new_std(hdl, &s5k83a_ctrl_ops, V4L2_CID_VFLIP,
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
288
v4l2_ctrl_cluster(2, &sd->hflip);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
295
struct sd *sd = (struct sd *) data;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
301
if (mutex_lock_interruptible(&sd->gspca_dev.usb_lock))
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
304
s5k83a_get_rotation(sd, &reg);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
309
hflip = sd->hflip->val;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
310
vflip = sd->vflip->val;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
316
s5k83a_set_flip_real((struct gspca_dev *) sd,
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
320
mutex_unlock(&sd->gspca_dev.usb_lock);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
326
hflip = sd->hflip->val;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
327
vflip = sd->vflip->val;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
328
s5k83a_set_flip_real((struct gspca_dev *) sd, vflip, hflip);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
331
sd->rotation_thread = NULL;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
335
int s5k83a_start(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
342
sd->rotation_thread = kthread_run(rotation_thread_function,
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
343
sd, "rotation thread");
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
344
if (IS_ERR(sd->rotation_thread)) {
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
345
err = PTR_ERR(sd->rotation_thread);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
346
sd->rotation_thread = NULL;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
354
err = m5602_write_sensor(sd, start_s5k83a[i][1],
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
357
err = m5602_write_bridge(sd, start_s5k83a[i][1],
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
363
return s5k83a_set_led_indication(sd, 1);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
366
int s5k83a_stop(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
368
if (sd->rotation_thread)
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
369
kthread_stop(sd->rotation_thread);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
371
return s5k83a_set_led_indication(sd, 0);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
374
void s5k83a_disconnect(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
376
s5k83a_stop(sd);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
378
sd->sensor = NULL;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
385
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
389
err = m5602_write_sensor(sd, 0x14, data, 2);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
395
err = m5602_write_sensor(sd, 0x0d, data, 2);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
403
err = m5602_write_sensor(sd, S5K83A_GAIN, data, 2);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
411
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
414
return m5602_write_sensor(sd, S5K83A_BRIGHTNESS, data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
420
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
424
return m5602_write_sensor(sd, S5K83A_EXPOSURE, data, 2);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
432
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
435
err = m5602_write_sensor(sd, S5K83A_PAGE_MAP, data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
444
err = m5602_write_sensor(sd, S5K83A_FLIP, data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
449
err = m5602_write_sensor(sd, S5K83A_VFLIP_TUNE, data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
454
err = m5602_write_sensor(sd, S5K83A_HFLIP_TUNE, data, 1);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
462
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
463
int hflip = sd->hflip->val;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
464
int vflip = sd->vflip->val;
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
466
err = s5k83a_get_rotation(sd, &reg);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
507
static int s5k83a_set_led_indication(struct sd *sd, u8 val)
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
512
err = m5602_read_bridge(sd, M5602_XB_GPIO_DAT, data);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
521
err = m5602_write_bridge(sd, M5602_XB_GPIO_DAT, data[0]);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
527
static int s5k83a_get_rotation(struct sd *sd, u8 *reg_data)
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
529
int err = m5602_read_bridge(sd, M5602_XB_GPIO_DAT, reg_data);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
534
static void s5k83a_dump_registers(struct sd *sd)
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
538
m5602_read_sensor(sd, S5K83A_PAGE_MAP, &old_page, 1);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
541
m5602_write_sensor(sd, S5K83A_PAGE_MAP, &page, 1);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
546
m5602_read_sensor(sd, address, &val, 1);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
553
m5602_write_sensor(sd, S5K83A_PAGE_MAP, &page, 1);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
559
m5602_read_sensor(sd, address, &old_val, 1);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
560
m5602_write_sensor(sd, address, &test_val, 1);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
561
m5602_read_sensor(sd, address, &ctrl_val, 1);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
571
m5602_write_sensor(sd, address, &old_val, 1);
drivers/media/usb/gspca/m5602/m5602_s5k83a.c
575
m5602_write_sensor(sd, S5K83A_PAGE_MAP, &old_page, 1);
drivers/media/usb/gspca/m5602/m5602_s5k83a.h
42
int s5k83a_probe(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_s5k83a.h
43
int s5k83a_init(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_s5k83a.h
44
int s5k83a_init_controls(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_s5k83a.h
45
int s5k83a_start(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_s5k83a.h
46
int s5k83a_stop(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_s5k83a.h
47
void s5k83a_disconnect(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_sensor.h
51
int (*probe)(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_sensor.h
54
int (*init)(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_sensor.h
57
int (*init_controls)(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_sensor.h
60
int (*start)(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_sensor.h
63
int (*stop)(struct sd *sd);
drivers/media/usb/gspca/m5602/m5602_sensor.h
66
void (*disconnect)(struct sd *sd);
drivers/media/usb/gspca/mars.c
147
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/mars.c
154
sd->illum_bottom->val = 0;
drivers/media/usb/gspca/mars.c
155
if (sd->illum_bottom->is_new && sd->illum_bottom->val)
drivers/media/usb/gspca/mars.c
156
sd->illum_top->val = 0;
drivers/media/usb/gspca/mars.c
173
setilluminators(gspca_dev, sd->illum_top->val,
drivers/media/usb/gspca/mars.c
174
sd->illum_bottom->val);
drivers/media/usb/gspca/mars.c
192
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/mars.c
197
sd->brightness = v4l2_ctrl_new_std(hdl, &mars_ctrl_ops,
drivers/media/usb/gspca/mars.c
199
sd->saturation = v4l2_ctrl_new_std(hdl, &mars_ctrl_ops,
drivers/media/usb/gspca/mars.c
201
sd->gamma = v4l2_ctrl_new_std(hdl, &mars_ctrl_ops,
drivers/media/usb/gspca/mars.c
203
sd->sharpness = v4l2_ctrl_new_std(hdl, &mars_ctrl_ops,
drivers/media/usb/gspca/mars.c
205
sd->illum_top = v4l2_ctrl_new_std(hdl, &mars_ctrl_ops,
drivers/media/usb/gspca/mars.c
207
sd->illum_top->flags |= V4L2_CTRL_FLAG_UPDATE;
drivers/media/usb/gspca/mars.c
208
sd->illum_bottom = v4l2_ctrl_new_std(hdl, &mars_ctrl_ops,
drivers/media/usb/gspca/mars.c
210
sd->illum_bottom->flags |= V4L2_CTRL_FLAG_UPDATE;
drivers/media/usb/gspca/mars.c
215
v4l2_ctrl_cluster(2, &sd->illum_top);
drivers/media/usb/gspca/mars.c
239
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/mars.c
244
jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
drivers/media/usb/gspca/mars.c
247
jpeg_set_qual(sd->jpeg_hdr, QUALITY);
drivers/media/usb/gspca/mars.c
266
data[7] = v4l2_ctrl_g_ctrl(sd->gamma) * 0x40; /* reg 0x06: gamma */
drivers/media/usb/gspca/mars.c
298
data[2] = v4l2_ctrl_g_ctrl(sd->saturation) << 3;
drivers/media/usb/gspca/mars.c
299
data[3] = ((v4l2_ctrl_g_ctrl(sd->saturation) >> 2) & 0xf8) | 0x04;
drivers/media/usb/gspca/mars.c
300
data[4] = v4l2_ctrl_g_ctrl(sd->brightness); /* reg 0x61 = brightness */
drivers/media/usb/gspca/mars.c
307
data[1] = v4l2_ctrl_g_ctrl(sd->sharpness) * 4 + 3;
drivers/media/usb/gspca/mars.c
330
setilluminators(gspca_dev, v4l2_ctrl_g_ctrl(sd->illum_top),
drivers/media/usb/gspca/mars.c
331
v4l2_ctrl_g_ctrl(sd->illum_bottom));
drivers/media/usb/gspca/mars.c
338
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/mars.c
340
if (v4l2_ctrl_g_ctrl(sd->illum_top) ||
drivers/media/usb/gspca/mars.c
341
v4l2_ctrl_g_ctrl(sd->illum_bottom)) {
drivers/media/usb/gspca/mars.c
355
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/mars.c
379
sd->jpeg_hdr, JPEG_HDR_SZ);
drivers/media/usb/gspca/mars.c
411
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/mr97310a.c
1001
v4l2_ctrl_cluster(2, &sd->exposure);
drivers/media/usb/gspca/mr97310a.c
1012
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/mr97310a.c
1015
sof = pac_find_sof(gspca_dev, &sd->sof_read, data, len);
drivers/media/usb/gspca/mr97310a.c
1061
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/mr97310a.c
178
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/mr97310a.c
183
if (sd->cam_type == CAM_TYPE_CIF) {
drivers/media/usb/gspca/mr97310a.c
185
confirm_reg = sd->sensor_type ? 0x13 : 0x11;
drivers/media/usb/gspca/mr97310a.c
341
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/mr97310a.c
348
sd->do_lcd_stop = 0;
drivers/media/usb/gspca/mr97310a.c
372
sd->cam_type = CAM_TYPE_CIF;
drivers/media/usb/gspca/mr97310a.c
397
sd->sensor_type = 0;
drivers/media/usb/gspca/mr97310a.c
400
sd->sensor_type = 1;
drivers/media/usb/gspca/mr97310a.c
408
sd->sensor_type);
drivers/media/usb/gspca/mr97310a.c
410
sd->cam_type = CAM_TYPE_VGA;
drivers/media/usb/gspca/mr97310a.c
431
sd->sensor_type = 1;
drivers/media/usb/gspca/mr97310a.c
432
sd->do_lcd_stop = 0;
drivers/media/usb/gspca/mr97310a.c
433
sd->adj_colors = 0;
drivers/media/usb/gspca/mr97310a.c
435
sd->sensor_type = 2;
drivers/media/usb/gspca/mr97310a.c
446
sd->adj_colors = 1;
drivers/media/usb/gspca/mr97310a.c
448
sd->do_lcd_stop = 1;
drivers/media/usb/gspca/mr97310a.c
451
sd->sensor_type = 0;
drivers/media/usb/gspca/mr97310a.c
465
sd->sensor_type);
drivers/media/usb/gspca/mr97310a.c
471
sd->sensor_type = !!force_sensor_type;
drivers/media/usb/gspca/mr97310a.c
473
sd->sensor_type);
drivers/media/usb/gspca/mr97310a.c
487
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/mr97310a.c
507
if (sd->sensor_type)
drivers/media/usb/gspca/mr97310a.c
519
data[8] = 0x1a + sd->sensor_type; /* reg 7, V start */
drivers/media/usb/gspca/mr97310a.c
528
data[8] = 0x06 - sd->sensor_type; /* reg 7, V start */
drivers/media/usb/gspca/mr97310a.c
535
if (!sd->sensor_type) {
drivers/media/usb/gspca/mr97310a.c
589
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/mr97310a.c
598
if (!sd->sensor_type) {
drivers/media/usb/gspca/mr97310a.c
602
if (sd->sensor_type == 2) {
drivers/media/usb/gspca/mr97310a.c
620
if (sd->sensor_type == 2) {
drivers/media/usb/gspca/mr97310a.c
624
if (sd->do_lcd_stop)
drivers/media/usb/gspca/mr97310a.c
636
if (sd->do_lcd_stop)
drivers/media/usb/gspca/mr97310a.c
645
if (!sd->sensor_type) {
drivers/media/usb/gspca/mr97310a.c
656
} else if (sd->sensor_type == 1) {
drivers/media/usb/gspca/mr97310a.c
682
if (sd->adj_colors)
drivers/media/usb/gspca/mr97310a.c
742
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/mr97310a.c
745
sd->sof_read = 0;
drivers/media/usb/gspca/mr97310a.c
759
if (sd->cam_type == CAM_TYPE_CIF) {
drivers/media/usb/gspca/mr97310a.c
772
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/mr97310a.c
777
if (sd->do_lcd_stop)
drivers/media/usb/gspca/mr97310a.c
783
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/mr97310a.c
789
if (sd->cam_type == CAM_TYPE_VGA) {
drivers/media/usb/gspca/mr97310a.c
802
if (sd->do_lcd_stop)
drivers/media/usb/gspca/mr97310a.c
810
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/mr97310a.c
814
if (sd->cam_type == CAM_TYPE_CIF && sd->sensor_type == 1) {
drivers/media/usb/gspca/mr97310a.c
820
} else if (sd->sensor_type == 2) {
drivers/media/usb/gspca/mr97310a.c
841
if (sd->cam_type == CAM_TYPE_VGA && clockdiv < 4)
drivers/media/usb/gspca/mr97310a.c
862
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/mr97310a.c
865
if (sd->cam_type == CAM_TYPE_CIF && sd->sensor_type == 1)
drivers/media/usb/gspca/mr97310a.c
867
else if (sd->cam_type == CAM_TYPE_VGA && sd->sensor_type == 2)
drivers/media/usb/gspca/mr97310a.c
885
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/mr97310a.c
900
setexposure(gspca_dev, sd->exposure->val,
drivers/media/usb/gspca/mr97310a.c
901
sd->min_clockdiv ? sd->min_clockdiv->val : 0);
drivers/media/usb/gspca/mr97310a.c
916
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/mr97310a.c
940
if (sd->cam_type == CAM_TYPE_CIF) {
drivers/media/usb/gspca/mr97310a.c
942
if (sd->sensor_type == 0)
drivers/media/usb/gspca/mr97310a.c
948
if (sd->sensor_type == 0)
drivers/media/usb/gspca/mr97310a.c
950
else if (sd->sensor_type == 2)
drivers/media/usb/gspca/mr97310a.c
952
else if (sd->do_lcd_stop)
drivers/media/usb/gspca/mr97310a.c
990
sd->exposure = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/mr97310a.c
994
sd->min_clockdiv = v4l2_ctrl_new_custom(hdl, &clockdiv, NULL);
drivers/media/usb/gspca/nw80x.c
1653
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/nw80x.c
1656
switch (sd->webcam) {
drivers/media/usb/gspca/nw80x.c
1672
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/nw80x.c
1675
switch (sd->webcam) {
drivers/media/usb/gspca/nw80x.c
1693
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/nw80x.c
1697
sd->ag_cnt = -1;
drivers/media/usb/gspca/nw80x.c
1700
sd->ag_cnt = AG_CNT_START;
drivers/media/usb/gspca/nw80x.c
1704
sd->ae_res = gspca_dev->pixfmt.width * gspca_dev->pixfmt.height;
drivers/media/usb/gspca/nw80x.c
1711
sd->ae_res = h * w;
drivers/media/usb/gspca/nw80x.c
1712
if (sd->ae_res == 0)
drivers/media/usb/gspca/nw80x.c
1713
sd->ae_res = gspca_dev->pixfmt.width *
drivers/media/usb/gspca/nw80x.c
1735
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/nw80x.c
1739
sd->webcam = webcam;
drivers/media/usb/gspca/nw80x.c
1741
sd->ag_cnt = -1;
drivers/media/usb/gspca/nw80x.c
1753
sd->bridge = BRIDGE_NW802;
drivers/media/usb/gspca/nw80x.c
1754
if (sd->webcam == Generic800)
drivers/media/usb/gspca/nw80x.c
1755
sd->webcam = Generic802;
drivers/media/usb/gspca/nw80x.c
1757
sd->bridge = BRIDGE_NW801;
drivers/media/usb/gspca/nw80x.c
1758
if (sd->webcam == Generic800)
drivers/media/usb/gspca/nw80x.c
1759
sd->webcam = P35u;
drivers/media/usb/gspca/nw80x.c
1766
if (sd->webcam == Generic800)
drivers/media/usb/gspca/nw80x.c
1767
sd->webcam = SpaceCam;
drivers/media/usb/gspca/nw80x.c
1770
if (sd->webcam == Generic800)
drivers/media/usb/gspca/nw80x.c
1771
sd->webcam = Twinkle;
drivers/media/usb/gspca/nw80x.c
1774
if (sd->webcam == Generic800)
drivers/media/usb/gspca/nw80x.c
1775
sd->webcam = SpaceCam2;
drivers/media/usb/gspca/nw80x.c
1779
if (webcam_chip[sd->webcam] != sd->bridge) {
drivers/media/usb/gspca/nw80x.c
1781
sd->webcam, sd->bridge);
drivers/media/usb/gspca/nw80x.c
1786
sd->bridge, sd->webcam);
drivers/media/usb/gspca/nw80x.c
1788
if (sd->bridge == BRIDGE_NW800) {
drivers/media/usb/gspca/nw80x.c
1789
switch (sd->webcam) {
drivers/media/usb/gspca/nw80x.c
1800
switch (sd->webcam) {
drivers/media/usb/gspca/nw80x.c
1818
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/nw80x.c
1820
switch (sd->bridge) {
drivers/media/usb/gspca/nw80x.c
1822
switch (sd->webcam) {
drivers/media/usb/gspca/nw80x.c
1832
switch (sd->webcam) {
drivers/media/usb/gspca/nw80x.c
1847
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/nw80x.c
1850
cmd = webcam_start[sd->webcam];
drivers/media/usb/gspca/nw80x.c
1852
switch (sd->webcam) {
drivers/media/usb/gspca/nw80x.c
1876
sd->exp_too_high_cnt = 0;
drivers/media/usb/gspca/nw80x.c
1877
sd->exp_too_low_cnt = 0;
drivers/media/usb/gspca/nw80x.c
1883
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/nw80x.c
1887
if (sd->bridge != BRIDGE_NW801) {
drivers/media/usb/gspca/nw80x.c
1893
switch (sd->webcam) {
drivers/media/usb/gspca/nw80x.c
1937
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/nw80x.c
1940
if (sd->ag_cnt < 0)
drivers/media/usb/gspca/nw80x.c
1942
if (--sd->ag_cnt >= 0)
drivers/media/usb/gspca/nw80x.c
1944
sd->ag_cnt = AG_CNT_START;
drivers/media/usb/gspca/nw80x.c
1947
reg_r(gspca_dev, sd->bridge == BRIDGE_NW801 ? 0x080d : 0x080c, 4);
drivers/media/usb/gspca/nw80x.c
1950
luma /= sd->ae_res;
drivers/media/usb/gspca/nw80x.c
1952
switch (sd->webcam) {
drivers/media/usb/gspca/nw80x.c
2001
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/nw80x.c
2006
switch (sd->webcam) {
drivers/media/usb/gspca/nw80x.c
2073
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/ov519.c
1989
static void reg_w(struct sd *sd, u16 index, u16 value)
drivers/media/usb/gspca/ov519.c
1991
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
1994
if (sd->gspca_dev.usb_err < 0)
drivers/media/usb/gspca/ov519.c
2000
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
2011
ret = usb_control_msg(sd->gspca_dev.dev,
drivers/media/usb/gspca/ov519.c
2012
usb_sndctrlpipe(sd->gspca_dev.dev, 0),
drivers/media/usb/gspca/ov519.c
2023
sd->gspca_dev.usb_buf[0] = value;
drivers/media/usb/gspca/ov519.c
2024
ret = usb_control_msg(sd->gspca_dev.dev,
drivers/media/usb/gspca/ov519.c
2025
usb_sndctrlpipe(sd->gspca_dev.dev, 0),
drivers/media/usb/gspca/ov519.c
2029
sd->gspca_dev.usb_buf, 1, 500);
drivers/media/usb/gspca/ov519.c
2033
sd->gspca_dev.usb_err = ret;
drivers/media/usb/gspca/ov519.c
2040
static int reg_r(struct sd *sd, u16 index)
drivers/media/usb/gspca/ov519.c
2042
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2046
if (sd->gspca_dev.usb_err < 0)
drivers/media/usb/gspca/ov519.c
2049
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
2063
ret = usb_control_msg(sd->gspca_dev.dev,
drivers/media/usb/gspca/ov519.c
2064
usb_rcvctrlpipe(sd->gspca_dev.dev, 0),
drivers/media/usb/gspca/ov519.c
2067
0, index, sd->gspca_dev.usb_buf, 1, 500);
drivers/media/usb/gspca/ov519.c
2070
ret = sd->gspca_dev.usb_buf[0];
drivers/media/usb/gspca/ov519.c
2075
sd->gspca_dev.usb_err = ret;
drivers/media/usb/gspca/ov519.c
2087
static int reg_r8(struct sd *sd,
drivers/media/usb/gspca/ov519.c
2090
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2093
if (sd->gspca_dev.usb_err < 0)
drivers/media/usb/gspca/ov519.c
2098
ret = usb_control_msg(sd->gspca_dev.dev,
drivers/media/usb/gspca/ov519.c
2099
usb_rcvctrlpipe(sd->gspca_dev.dev, 0),
drivers/media/usb/gspca/ov519.c
2102
0, index, sd->gspca_dev.usb_buf, 8, 500);
drivers/media/usb/gspca/ov519.c
2105
ret = sd->gspca_dev.usb_buf[0];
drivers/media/usb/gspca/ov519.c
2108
sd->gspca_dev.usb_err = ret;
drivers/media/usb/gspca/ov519.c
2125
static void reg_w_mask(struct sd *sd,
drivers/media/usb/gspca/ov519.c
2135
ret = reg_r(sd, index);
drivers/media/usb/gspca/ov519.c
2142
reg_w(sd, index, value);
drivers/media/usb/gspca/ov519.c
2149
static void ov518_reg_w32(struct sd *sd, u16 index, u32 value, int n)
drivers/media/usb/gspca/ov519.c
2151
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2154
if (sd->gspca_dev.usb_err < 0)
drivers/media/usb/gspca/ov519.c
2157
*((__le32 *) sd->gspca_dev.usb_buf) = __cpu_to_le32(value);
drivers/media/usb/gspca/ov519.c
2161
ret = usb_control_msg(sd->gspca_dev.dev,
drivers/media/usb/gspca/ov519.c
2162
usb_sndctrlpipe(sd->gspca_dev.dev, 0),
drivers/media/usb/gspca/ov519.c
2166
sd->gspca_dev.usb_buf, n, 500);
drivers/media/usb/gspca/ov519.c
2169
sd->gspca_dev.usb_err = ret;
drivers/media/usb/gspca/ov519.c
2173
static void ov511_i2c_w(struct sd *sd, u8 reg, u8 value)
drivers/media/usb/gspca/ov519.c
2175
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2183
reg_w(sd, R51x_I2C_SADDR_3, reg);
drivers/media/usb/gspca/ov519.c
2186
reg_w(sd, R51x_I2C_DATA, value);
drivers/media/usb/gspca/ov519.c
2189
reg_w(sd, R511_I2C_CTL, 0x01);
drivers/media/usb/gspca/ov519.c
2192
rc = reg_r(sd, R511_I2C_CTL);
drivers/media/usb/gspca/ov519.c
2207
static int ov511_i2c_r(struct sd *sd, u8 reg)
drivers/media/usb/gspca/ov519.c
2209
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2215
reg_w(sd, R51x_I2C_SADDR_2, reg);
drivers/media/usb/gspca/ov519.c
2218
reg_w(sd, R511_I2C_CTL, 0x03);
drivers/media/usb/gspca/ov519.c
2221
rc = reg_r(sd, R511_I2C_CTL);
drivers/media/usb/gspca/ov519.c
2231
reg_w(sd, R511_I2C_CTL, 0x10);
drivers/media/usb/gspca/ov519.c
2242
reg_w(sd, R511_I2C_CTL, 0x05);
drivers/media/usb/gspca/ov519.c
2245
rc = reg_r(sd, R511_I2C_CTL);
drivers/media/usb/gspca/ov519.c
2255
reg_w(sd, R511_I2C_CTL, 0x10);
drivers/media/usb/gspca/ov519.c
2263
value = reg_r(sd, R51x_I2C_DATA);
drivers/media/usb/gspca/ov519.c
2268
reg_w(sd, R511_I2C_CTL, 0x05);
drivers/media/usb/gspca/ov519.c
2278
static void ov518_i2c_w(struct sd *sd,
drivers/media/usb/gspca/ov519.c
2282
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2287
reg_w(sd, R51x_I2C_SADDR_3, reg);
drivers/media/usb/gspca/ov519.c
2290
reg_w(sd, R51x_I2C_DATA, value);
drivers/media/usb/gspca/ov519.c
2293
reg_w(sd, R518_I2C_CTL, 0x01);
drivers/media/usb/gspca/ov519.c
2297
reg_r8(sd, R518_I2C_CTL);
drivers/media/usb/gspca/ov519.c
2307
static int ov518_i2c_r(struct sd *sd, u8 reg)
drivers/media/usb/gspca/ov519.c
2309
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2313
reg_w(sd, R51x_I2C_SADDR_2, reg);
drivers/media/usb/gspca/ov519.c
2316
reg_w(sd, R518_I2C_CTL, 0x03);
drivers/media/usb/gspca/ov519.c
2317
reg_r8(sd, R518_I2C_CTL);
drivers/media/usb/gspca/ov519.c
2320
reg_w(sd, R518_I2C_CTL, 0x05);
drivers/media/usb/gspca/ov519.c
2321
reg_r8(sd, R518_I2C_CTL);
drivers/media/usb/gspca/ov519.c
2323
value = reg_r(sd, R51x_I2C_DATA);
drivers/media/usb/gspca/ov519.c
2328
static void ovfx2_i2c_w(struct sd *sd, u8 reg, u8 value)
drivers/media/usb/gspca/ov519.c
2330
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2333
if (sd->gspca_dev.usb_err < 0)
drivers/media/usb/gspca/ov519.c
2336
ret = usb_control_msg(sd->gspca_dev.dev,
drivers/media/usb/gspca/ov519.c
2337
usb_sndctrlpipe(sd->gspca_dev.dev, 0),
drivers/media/usb/gspca/ov519.c
2344
sd->gspca_dev.usb_err = ret;
drivers/media/usb/gspca/ov519.c
2350
static int ovfx2_i2c_r(struct sd *sd, u8 reg)
drivers/media/usb/gspca/ov519.c
2352
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2355
if (sd->gspca_dev.usb_err < 0)
drivers/media/usb/gspca/ov519.c
2358
ret = usb_control_msg(sd->gspca_dev.dev,
drivers/media/usb/gspca/ov519.c
2359
usb_rcvctrlpipe(sd->gspca_dev.dev, 0),
drivers/media/usb/gspca/ov519.c
2362
0, (u16) reg, sd->gspca_dev.usb_buf, 1, 500);
drivers/media/usb/gspca/ov519.c
2365
ret = sd->gspca_dev.usb_buf[0];
drivers/media/usb/gspca/ov519.c
2370
sd->gspca_dev.usb_err = ret;
drivers/media/usb/gspca/ov519.c
2376
static void i2c_w(struct sd *sd, u8 reg, u8 value)
drivers/media/usb/gspca/ov519.c
2378
if (sd->sensor_reg_cache[reg] == value)
drivers/media/usb/gspca/ov519.c
2381
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
2384
ov511_i2c_w(sd, reg, value);
drivers/media/usb/gspca/ov519.c
2389
ov518_i2c_w(sd, reg, value);
drivers/media/usb/gspca/ov519.c
2392
ovfx2_i2c_w(sd, reg, value);
drivers/media/usb/gspca/ov519.c
2395
w9968cf_i2c_w(sd, reg, value);
drivers/media/usb/gspca/ov519.c
2399
if (sd->gspca_dev.usb_err >= 0) {
drivers/media/usb/gspca/ov519.c
2402
memset(sd->sensor_reg_cache, -1,
drivers/media/usb/gspca/ov519.c
2403
sizeof(sd->sensor_reg_cache));
drivers/media/usb/gspca/ov519.c
2405
sd->sensor_reg_cache[reg] = value;
drivers/media/usb/gspca/ov519.c
2409
static int i2c_r(struct sd *sd, u8 reg)
drivers/media/usb/gspca/ov519.c
2413
if (sd->sensor_reg_cache[reg] != -1)
drivers/media/usb/gspca/ov519.c
2414
return sd->sensor_reg_cache[reg];
drivers/media/usb/gspca/ov519.c
2416
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
2419
ret = ov511_i2c_r(sd, reg);
drivers/media/usb/gspca/ov519.c
2424
ret = ov518_i2c_r(sd, reg);
drivers/media/usb/gspca/ov519.c
2427
ret = ovfx2_i2c_r(sd, reg);
drivers/media/usb/gspca/ov519.c
2430
ret = w9968cf_i2c_r(sd, reg);
drivers/media/usb/gspca/ov519.c
2435
sd->sensor_reg_cache[reg] = ret;
drivers/media/usb/gspca/ov519.c
2445
static void i2c_w_mask(struct sd *sd,
drivers/media/usb/gspca/ov519.c
2454
rc = i2c_r(sd, reg);
drivers/media/usb/gspca/ov519.c
2459
i2c_w(sd, reg, value);
drivers/media/usb/gspca/ov519.c
2464
static inline void ov51x_stop(struct sd *sd)
drivers/media/usb/gspca/ov519.c
2466
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2469
sd->stopped = 1;
drivers/media/usb/gspca/ov519.c
2470
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
2473
reg_w(sd, R51x_SYS_RESET, 0x3d);
drivers/media/usb/gspca/ov519.c
2477
reg_w_mask(sd, R51x_SYS_RESET, 0x3a, 0x3a);
drivers/media/usb/gspca/ov519.c
2480
reg_w(sd, OV519_R51_RESET1, 0x0f);
drivers/media/usb/gspca/ov519.c
2481
reg_w(sd, OV519_R51_RESET1, 0x00);
drivers/media/usb/gspca/ov519.c
2482
reg_w(sd, 0x22, 0x00); /* FRAR */
drivers/media/usb/gspca/ov519.c
2485
reg_w_mask(sd, 0x0f, 0x00, 0x02);
drivers/media/usb/gspca/ov519.c
2488
reg_w(sd, 0x3c, 0x0a05); /* stop USB transfer */
drivers/media/usb/gspca/ov519.c
2495
static inline void ov51x_restart(struct sd *sd)
drivers/media/usb/gspca/ov519.c
2497
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2500
if (!sd->stopped)
drivers/media/usb/gspca/ov519.c
2502
sd->stopped = 0;
drivers/media/usb/gspca/ov519.c
2505
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
2508
reg_w(sd, R51x_SYS_RESET, 0x00);
drivers/media/usb/gspca/ov519.c
2512
reg_w(sd, 0x2f, 0x80);
drivers/media/usb/gspca/ov519.c
2513
reg_w(sd, R51x_SYS_RESET, 0x00);
drivers/media/usb/gspca/ov519.c
2516
reg_w(sd, OV519_R51_RESET1, 0x0f);
drivers/media/usb/gspca/ov519.c
2517
reg_w(sd, OV519_R51_RESET1, 0x00);
drivers/media/usb/gspca/ov519.c
2518
reg_w(sd, 0x22, 0x1d); /* FRAR */
drivers/media/usb/gspca/ov519.c
2521
reg_w_mask(sd, 0x0f, 0x02, 0x02);
drivers/media/usb/gspca/ov519.c
2524
reg_w(sd, 0x3c, 0x8a05); /* USB FIFO enable */
drivers/media/usb/gspca/ov519.c
2529
static void ov51x_set_slave_ids(struct sd *sd, u8 slave);
drivers/media/usb/gspca/ov519.c
2534
static int init_ov_sensor(struct sd *sd, u8 slave)
drivers/media/usb/gspca/ov519.c
2537
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2539
ov51x_set_slave_ids(sd, slave);
drivers/media/usb/gspca/ov519.c
2542
i2c_w(sd, 0x12, 0x80);
drivers/media/usb/gspca/ov519.c
2548
if (i2c_r(sd, OV7610_REG_ID_HIGH) == 0x7f &&
drivers/media/usb/gspca/ov519.c
2549
i2c_r(sd, OV7610_REG_ID_LOW) == 0xa2) {
drivers/media/usb/gspca/ov519.c
2556
i2c_w(sd, 0x12, 0x80);
drivers/media/usb/gspca/ov519.c
2562
if (i2c_r(sd, 0x00) < 0)
drivers/media/usb/gspca/ov519.c
2573
static void ov51x_set_slave_ids(struct sd *sd,
drivers/media/usb/gspca/ov519.c
2576
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
2578
reg_w(sd, OVFX2_I2C_ADDR, slave);
drivers/media/usb/gspca/ov519.c
2581
sd->sensor_addr = slave;
drivers/media/usb/gspca/ov519.c
2585
reg_w(sd, R51x_I2C_W_SID, slave);
drivers/media/usb/gspca/ov519.c
2586
reg_w(sd, R51x_I2C_R_SID, slave + 1);
drivers/media/usb/gspca/ov519.c
2589
static void write_regvals(struct sd *sd,
drivers/media/usb/gspca/ov519.c
2594
reg_w(sd, regvals->reg, regvals->val);
drivers/media/usb/gspca/ov519.c
2599
static void write_i2c_regvals(struct sd *sd,
drivers/media/usb/gspca/ov519.c
2604
i2c_w(sd, regvals->reg, regvals->val);
drivers/media/usb/gspca/ov519.c
2616
static void ov_hires_configure(struct sd *sd)
drivers/media/usb/gspca/ov519.c
2618
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2621
if (sd->bridge != BRIDGE_OVFX2) {
drivers/media/usb/gspca/ov519.c
2629
high = i2c_r(sd, 0x0a);
drivers/media/usb/gspca/ov519.c
2630
low = i2c_r(sd, 0x0b);
drivers/media/usb/gspca/ov519.c
2637
sd->sensor = SEN_OV2610;
drivers/media/usb/gspca/ov519.c
2641
sd->sensor = SEN_OV2610AE;
drivers/media/usb/gspca/ov519.c
2645
sd->sensor = SEN_OV9600;
drivers/media/usb/gspca/ov519.c
2652
sd->sensor = SEN_OV3610;
drivers/media/usb/gspca/ov519.c
2664
static void ov8xx0_configure(struct sd *sd)
drivers/media/usb/gspca/ov519.c
2666
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2672
rc = i2c_r(sd, OV7610_REG_COM_I);
drivers/media/usb/gspca/ov519.c
2678
sd->sensor = SEN_OV8610;
drivers/media/usb/gspca/ov519.c
2687
static void ov7xx0_configure(struct sd *sd)
drivers/media/usb/gspca/ov519.c
2689
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2695
rc = i2c_r(sd, OV7610_REG_COM_I);
drivers/media/usb/gspca/ov519.c
2705
high = i2c_r(sd, 0x0a);
drivers/media/usb/gspca/ov519.c
2706
low = i2c_r(sd, 0x0b);
drivers/media/usb/gspca/ov519.c
2711
sd->sensor = SEN_OV7670;
drivers/media/usb/gspca/ov519.c
2714
sd->sensor = SEN_OV7610;
drivers/media/usb/gspca/ov519.c
2718
if (i2c_r(sd, 0x15) & 1) {
drivers/media/usb/gspca/ov519.c
2720
sd->sensor = SEN_OV7620AE;
drivers/media/usb/gspca/ov519.c
2723
sd->sensor = SEN_OV76BE;
drivers/media/usb/gspca/ov519.c
2727
high = i2c_r(sd, 0x0a);
drivers/media/usb/gspca/ov519.c
2732
low = i2c_r(sd, 0x0b);
drivers/media/usb/gspca/ov519.c
2745
sd->sensor = SEN_OV7640; /* FIXME */
drivers/media/usb/gspca/ov519.c
2749
sd->sensor = SEN_OV7640; /* FIXME */
drivers/media/usb/gspca/ov519.c
2753
sd->sensor = SEN_OV7648;
drivers/media/usb/gspca/ov519.c
2757
sd->sensor = SEN_OV7660;
drivers/media/usb/gspca/ov519.c
2766
sd->sensor = SEN_OV7620;
drivers/media/usb/gspca/ov519.c
2775
static void ov6xx0_configure(struct sd *sd)
drivers/media/usb/gspca/ov519.c
2777
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2783
rc = i2c_r(sd, OV7610_REG_COM_I);
drivers/media/usb/gspca/ov519.c
2794
sd->sensor = SEN_OV6630;
drivers/media/usb/gspca/ov519.c
2798
sd->sensor = SEN_OV6620;
drivers/media/usb/gspca/ov519.c
2802
sd->sensor = SEN_OV6630;
drivers/media/usb/gspca/ov519.c
2806
sd->sensor = SEN_OV66308AF;
drivers/media/usb/gspca/ov519.c
2810
sd->sensor = SEN_OV6630;
drivers/media/usb/gspca/ov519.c
2820
sd->sif = 1;
drivers/media/usb/gspca/ov519.c
2824
static void ov51x_led_control(struct sd *sd, int on)
drivers/media/usb/gspca/ov519.c
2826
if (sd->invert_led)
drivers/media/usb/gspca/ov519.c
2829
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
2832
reg_w(sd, R511_SYS_LED_CTL, on);
drivers/media/usb/gspca/ov519.c
2836
reg_w_mask(sd, R518_GPIO_OUT, 0x02 * on, 0x02);
drivers/media/usb/gspca/ov519.c
2839
reg_w_mask(sd, OV519_GPIO_DATA_OUT0, on, 1);
drivers/media/usb/gspca/ov519.c
2846
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
2848
if (!sd->snapshot_needs_reset)
drivers/media/usb/gspca/ov519.c
2854
sd->snapshot_needs_reset = 0;
drivers/media/usb/gspca/ov519.c
2856
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
2859
reg_w(sd, R51x_SYS_SNAP, 0x02);
drivers/media/usb/gspca/ov519.c
2860
reg_w(sd, R51x_SYS_SNAP, 0x00);
drivers/media/usb/gspca/ov519.c
2864
reg_w(sd, R51x_SYS_SNAP, 0x02); /* Reset */
drivers/media/usb/gspca/ov519.c
2865
reg_w(sd, R51x_SYS_SNAP, 0x01); /* Enable */
drivers/media/usb/gspca/ov519.c
2868
reg_w(sd, R51x_SYS_RESET, 0x40);
drivers/media/usb/gspca/ov519.c
2869
reg_w(sd, R51x_SYS_RESET, 0x00);
drivers/media/usb/gspca/ov519.c
2874
static void ov51x_upload_quan_tables(struct sd *sd)
drivers/media/usb/gspca/ov519.c
2912
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
2919
if (sd->bridge == BRIDGE_OV511 || sd->bridge == BRIDGE_OV511PLUS) {
drivers/media/usb/gspca/ov519.c
2935
reg_w(sd, reg, val0);
drivers/media/usb/gspca/ov519.c
2942
reg_w(sd, reg + size, val0);
drivers/media/usb/gspca/ov519.c
2951
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
2996
reg_r(sd, R51x_SYS_CUST_ID));
drivers/media/usb/gspca/ov519.c
2998
write_regvals(sd, init_511, ARRAY_SIZE(init_511));
drivers/media/usb/gspca/ov519.c
3000
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
3002
write_regvals(sd, norm_511, ARRAY_SIZE(norm_511));
drivers/media/usb/gspca/ov519.c
3005
write_regvals(sd, norm_511_p, ARRAY_SIZE(norm_511_p));
drivers/media/usb/gspca/ov519.c
3010
write_regvals(sd, compress_511, ARRAY_SIZE(compress_511));
drivers/media/usb/gspca/ov519.c
3012
ov51x_upload_quan_tables(sd);
drivers/media/usb/gspca/ov519.c
3018
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
3065
sd->revision = reg_r(sd, R51x_SYS_CUST_ID) & 0x1f;
drivers/media/usb/gspca/ov519.c
3066
gspca_dbg(gspca_dev, D_PROBE, "Device revision %d\n", sd->revision);
drivers/media/usb/gspca/ov519.c
3068
write_regvals(sd, init_518, ARRAY_SIZE(init_518));
drivers/media/usb/gspca/ov519.c
3071
reg_w_mask(sd, R518_GPIO_CTL, 0x00, 0x02);
drivers/media/usb/gspca/ov519.c
3073
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
3075
write_regvals(sd, norm_518, ARRAY_SIZE(norm_518));
drivers/media/usb/gspca/ov519.c
3078
write_regvals(sd, norm_518_p, ARRAY_SIZE(norm_518_p));
drivers/media/usb/gspca/ov519.c
3082
ov51x_upload_quan_tables(sd);
drivers/media/usb/gspca/ov519.c
3084
reg_w(sd, 0x2f, 0x80);
drivers/media/usb/gspca/ov519.c
3087
static void ov519_configure(struct sd *sd)
drivers/media/usb/gspca/ov519.c
3105
write_regvals(sd, init_519, ARRAY_SIZE(init_519));
drivers/media/usb/gspca/ov519.c
3108
static void ovfx2_configure(struct sd *sd)
drivers/media/usb/gspca/ov519.c
3120
sd->stopped = 1;
drivers/media/usb/gspca/ov519.c
3122
write_regvals(sd, init_fx2, ARRAY_SIZE(init_fx2));
drivers/media/usb/gspca/ov519.c
3127
static void ov519_set_mode(struct sd *sd)
drivers/media/usb/gspca/ov519.c
3154
write_regvals(sd, bridge_ov7660[sd->gspca_dev.curr_mode],
drivers/media/usb/gspca/ov519.c
3156
write_i2c_regvals(sd, sensor_ov7660[sd->gspca_dev.curr_mode],
drivers/media/usb/gspca/ov519.c
3158
write_i2c_regvals(sd, sensor_ov7660_2,
drivers/media/usb/gspca/ov519.c
3164
static void ov519_set_fr(struct sd *sd)
drivers/media/usb/gspca/ov519.c
3189
sd->frame_rate = frame_rate;
drivers/media/usb/gspca/ov519.c
3190
if (sd->frame_rate >= 30)
drivers/media/usb/gspca/ov519.c
3192
else if (sd->frame_rate >= 25)
drivers/media/usb/gspca/ov519.c
3194
else if (sd->frame_rate >= 20)
drivers/media/usb/gspca/ov519.c
3196
else if (sd->frame_rate >= 15)
drivers/media/usb/gspca/ov519.c
3198
else if (sd->frame_rate >= 10)
drivers/media/usb/gspca/ov519.c
3202
reg_w(sd, 0xa4, fr_tb[sd->gspca_dev.curr_mode][fr][0]);
drivers/media/usb/gspca/ov519.c
3203
reg_w(sd, 0x23, fr_tb[sd->gspca_dev.curr_mode][fr][1]);
drivers/media/usb/gspca/ov519.c
3204
clock = fr_tb[sd->gspca_dev.curr_mode][fr][2];
drivers/media/usb/gspca/ov519.c
3205
if (sd->sensor == SEN_OV7660)
drivers/media/usb/gspca/ov519.c
3207
ov518_i2c_w(sd, OV7670_R11_CLKRC, clock);
drivers/media/usb/gspca/ov519.c
3212
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
3214
i2c_w_mask(sd, 0x13, val ? 0x05 : 0x00, 0x05);
drivers/media/usb/gspca/ov519.c
3221
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
3224
sd->bridge = id->driver_info & BRIDGE_MASK;
drivers/media/usb/gspca/ov519.c
3225
sd->invert_led = (id->driver_info & BRIDGE_INVERT_LED) != 0;
drivers/media/usb/gspca/ov519.c
3227
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
3255
sd->frame_rate = 15;
drivers/media/usb/gspca/ov519.c
3263
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
3266
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
3276
ov519_configure(sd);
drivers/media/usb/gspca/ov519.c
3279
ovfx2_configure(sd);
drivers/media/usb/gspca/ov519.c
3282
w9968cf_configure(sd);
drivers/media/usb/gspca/ov519.c
3289
sd->sensor = -1;
drivers/media/usb/gspca/ov519.c
3292
if (init_ov_sensor(sd, OV7xx0_SID) >= 0) {
drivers/media/usb/gspca/ov519.c
3293
ov7xx0_configure(sd);
drivers/media/usb/gspca/ov519.c
3296
} else if (init_ov_sensor(sd, OV6xx0_SID) >= 0) {
drivers/media/usb/gspca/ov519.c
3297
ov6xx0_configure(sd);
drivers/media/usb/gspca/ov519.c
3300
} else if (init_ov_sensor(sd, OV8xx0_SID) >= 0) {
drivers/media/usb/gspca/ov519.c
3301
ov8xx0_configure(sd);
drivers/media/usb/gspca/ov519.c
3304
} else if (init_ov_sensor(sd, OV_HIRES_SID) >= 0) {
drivers/media/usb/gspca/ov519.c
3305
ov_hires_configure(sd);
drivers/media/usb/gspca/ov519.c
3311
if (sd->sensor < 0)
drivers/media/usb/gspca/ov519.c
3314
ov51x_led_control(sd, 0); /* turn LED off */
drivers/media/usb/gspca/ov519.c
3316
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
3319
if (sd->sif) {
drivers/media/usb/gspca/ov519.c
3326
if (sd->sif) {
drivers/media/usb/gspca/ov519.c
3332
if (sd->sif) {
drivers/media/usb/gspca/ov519.c
3338
switch (sd->sensor) {
drivers/media/usb/gspca/ov519.c
3353
if (sd->sif) {
drivers/media/usb/gspca/ov519.c
3361
if (sd->sif)
drivers/media/usb/gspca/ov519.c
3365
w9968cf_init(sd);
drivers/media/usb/gspca/ov519.c
3370
switch (sd->sensor) {
drivers/media/usb/gspca/ov519.c
3372
write_i2c_regvals(sd, norm_2610, ARRAY_SIZE(norm_2610));
drivers/media/usb/gspca/ov519.c
3375
i2c_w_mask(sd, 0x13, 0x27, 0x27);
drivers/media/usb/gspca/ov519.c
3378
write_i2c_regvals(sd, norm_2610ae, ARRAY_SIZE(norm_2610ae));
drivers/media/usb/gspca/ov519.c
3381
i2c_w_mask(sd, 0x13, 0x05, 0x05);
drivers/media/usb/gspca/ov519.c
3384
write_i2c_regvals(sd, norm_3620b, ARRAY_SIZE(norm_3620b));
drivers/media/usb/gspca/ov519.c
3387
i2c_w_mask(sd, 0x13, 0x27, 0x27);
drivers/media/usb/gspca/ov519.c
3390
write_i2c_regvals(sd, norm_6x20, ARRAY_SIZE(norm_6x20));
drivers/media/usb/gspca/ov519.c
3394
write_i2c_regvals(sd, norm_6x30, ARRAY_SIZE(norm_6x30));
drivers/media/usb/gspca/ov519.c
3399
write_i2c_regvals(sd, norm_7610, ARRAY_SIZE(norm_7610));
drivers/media/usb/gspca/ov519.c
3400
i2c_w_mask(sd, 0x0e, 0x00, 0x40);
drivers/media/usb/gspca/ov519.c
3404
write_i2c_regvals(sd, norm_7620, ARRAY_SIZE(norm_7620));
drivers/media/usb/gspca/ov519.c
3408
write_i2c_regvals(sd, norm_7640, ARRAY_SIZE(norm_7640));
drivers/media/usb/gspca/ov519.c
3411
i2c_w(sd, OV7670_R12_COM7, OV7670_COM7_RESET);
drivers/media/usb/gspca/ov519.c
3413
reg_w(sd, OV519_R57_SNAPSHOT, 0x23);
drivers/media/usb/gspca/ov519.c
3414
write_regvals(sd, init_519_ov7660,
drivers/media/usb/gspca/ov519.c
3416
write_i2c_regvals(sd, norm_7660, ARRAY_SIZE(norm_7660));
drivers/media/usb/gspca/ov519.c
3417
sd->gspca_dev.curr_mode = 1; /* 640x480 */
drivers/media/usb/gspca/ov519.c
3418
ov519_set_mode(sd);
drivers/media/usb/gspca/ov519.c
3419
ov519_set_fr(sd);
drivers/media/usb/gspca/ov519.c
3421
ov51x_restart(sd);
drivers/media/usb/gspca/ov519.c
3422
ov51x_stop(sd); /* not in win traces */
drivers/media/usb/gspca/ov519.c
3423
ov51x_led_control(sd, 0);
drivers/media/usb/gspca/ov519.c
3426
write_i2c_regvals(sd, norm_7670, ARRAY_SIZE(norm_7670));
drivers/media/usb/gspca/ov519.c
3429
write_i2c_regvals(sd, norm_8610, ARRAY_SIZE(norm_8610));
drivers/media/usb/gspca/ov519.c
3432
write_i2c_regvals(sd, norm_9600, ARRAY_SIZE(norm_9600));
drivers/media/usb/gspca/ov519.c
3447
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
3449
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
3464
static void ov511_mode_init_regs(struct sd *sd)
drivers/media/usb/gspca/ov519.c
3466
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
3472
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
drivers/media/usb/gspca/ov519.c
3473
alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt);
drivers/media/usb/gspca/ov519.c
3476
sd->gspca_dev.usb_err = -EIO;
drivers/media/usb/gspca/ov519.c
3481
sd->gspca_dev.usb_err = -ENODEV;
drivers/media/usb/gspca/ov519.c
3486
reg_w(sd, R51x_FIFO_PSIZE, packet_size >> 5);
drivers/media/usb/gspca/ov519.c
3488
reg_w(sd, R511_CAM_UV_EN, 0x01);
drivers/media/usb/gspca/ov519.c
3489
reg_w(sd, R511_SNAP_UV_EN, 0x01);
drivers/media/usb/gspca/ov519.c
3490
reg_w(sd, R511_SNAP_OPTS, 0x03);
drivers/media/usb/gspca/ov519.c
3495
hsegs = (sd->gspca_dev.pixfmt.width >> 3) - 1;
drivers/media/usb/gspca/ov519.c
3496
vsegs = (sd->gspca_dev.pixfmt.height >> 3) - 1;
drivers/media/usb/gspca/ov519.c
3498
reg_w(sd, R511_CAM_PXCNT, hsegs);
drivers/media/usb/gspca/ov519.c
3499
reg_w(sd, R511_CAM_LNCNT, vsegs);
drivers/media/usb/gspca/ov519.c
3500
reg_w(sd, R511_CAM_PXDIV, 0x00);
drivers/media/usb/gspca/ov519.c
3501
reg_w(sd, R511_CAM_LNDIV, 0x00);
drivers/media/usb/gspca/ov519.c
3504
reg_w(sd, R511_CAM_OPTS, 0x03);
drivers/media/usb/gspca/ov519.c
3507
reg_w(sd, R511_SNAP_PXCNT, hsegs);
drivers/media/usb/gspca/ov519.c
3508
reg_w(sd, R511_SNAP_LNCNT, vsegs);
drivers/media/usb/gspca/ov519.c
3509
reg_w(sd, R511_SNAP_PXDIV, 0x00);
drivers/media/usb/gspca/ov519.c
3510
reg_w(sd, R511_SNAP_LNDIV, 0x00);
drivers/media/usb/gspca/ov519.c
3514
sd->frame_rate = frame_rate;
drivers/media/usb/gspca/ov519.c
3516
switch (sd->sensor) {
drivers/media/usb/gspca/ov519.c
3519
sd->clockdiv = 3;
drivers/media/usb/gspca/ov519.c
3529
if (sd->gspca_dev.pixfmt.width == 320)
drivers/media/usb/gspca/ov519.c
3535
switch (sd->frame_rate) {
drivers/media/usb/gspca/ov519.c
3539
if (sd->gspca_dev.pixfmt.width != 640) {
drivers/media/usb/gspca/ov519.c
3540
sd->clockdiv = 0;
drivers/media/usb/gspca/ov519.c
3548
sd->clockdiv = 1;
drivers/media/usb/gspca/ov519.c
3551
sd->clockdiv = 2;
drivers/media/usb/gspca/ov519.c
3554
sd->clockdiv = 5;
drivers/media/usb/gspca/ov519.c
3558
sd->clockdiv = (sd->clockdiv + 1) * 2 - 1;
drivers/media/usb/gspca/ov519.c
3560
if (sd->clockdiv > 10)
drivers/media/usb/gspca/ov519.c
3561
sd->clockdiv = 10;
drivers/media/usb/gspca/ov519.c
3567
sd->clockdiv = 0;
drivers/media/usb/gspca/ov519.c
3572
fps = (interlaced ? 60 : 30) / (sd->clockdiv + 1) + 1;
drivers/media/usb/gspca/ov519.c
3573
needed = fps * sd->gspca_dev.pixfmt.width *
drivers/media/usb/gspca/ov519.c
3574
sd->gspca_dev.pixfmt.height * 3 / 2;
drivers/media/usb/gspca/ov519.c
3578
reg_w(sd, R511_COMP_EN, 0x07);
drivers/media/usb/gspca/ov519.c
3579
reg_w(sd, R511_COMP_LUT_EN, 0x03);
drivers/media/usb/gspca/ov519.c
3581
reg_w(sd, R511_COMP_EN, 0x06);
drivers/media/usb/gspca/ov519.c
3582
reg_w(sd, R511_COMP_LUT_EN, 0x00);
drivers/media/usb/gspca/ov519.c
3585
reg_w(sd, R51x_SYS_RESET, OV511_RESET_OMNICE);
drivers/media/usb/gspca/ov519.c
3586
reg_w(sd, R51x_SYS_RESET, 0);
drivers/media/usb/gspca/ov519.c
3596
static void ov518_mode_init_regs(struct sd *sd)
drivers/media/usb/gspca/ov519.c
3598
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
3603
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
drivers/media/usb/gspca/ov519.c
3604
alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt);
drivers/media/usb/gspca/ov519.c
3607
sd->gspca_dev.usb_err = -EIO;
drivers/media/usb/gspca/ov519.c
3612
sd->gspca_dev.usb_err = -ENODEV;
drivers/media/usb/gspca/ov519.c
3617
ov518_reg_w32(sd, R51x_FIFO_PSIZE, packet_size & ~7, 2);
drivers/media/usb/gspca/ov519.c
3620
reg_w(sd, 0x2b, 0);
drivers/media/usb/gspca/ov519.c
3621
reg_w(sd, 0x2c, 0);
drivers/media/usb/gspca/ov519.c
3622
reg_w(sd, 0x2d, 0);
drivers/media/usb/gspca/ov519.c
3623
reg_w(sd, 0x2e, 0);
drivers/media/usb/gspca/ov519.c
3624
reg_w(sd, 0x3b, 0);
drivers/media/usb/gspca/ov519.c
3625
reg_w(sd, 0x3c, 0);
drivers/media/usb/gspca/ov519.c
3626
reg_w(sd, 0x3d, 0);
drivers/media/usb/gspca/ov519.c
3627
reg_w(sd, 0x3e, 0);
drivers/media/usb/gspca/ov519.c
3629
if (sd->bridge == BRIDGE_OV518) {
drivers/media/usb/gspca/ov519.c
3631
reg_w_mask(sd, 0x20, 0x08, 0x08);
drivers/media/usb/gspca/ov519.c
3634
reg_w_mask(sd, 0x28, 0x80, 0xf0);
drivers/media/usb/gspca/ov519.c
3635
reg_w_mask(sd, 0x38, 0x80, 0xf0);
drivers/media/usb/gspca/ov519.c
3637
reg_w(sd, 0x28, 0x80);
drivers/media/usb/gspca/ov519.c
3638
reg_w(sd, 0x38, 0x80);
drivers/media/usb/gspca/ov519.c
3641
hsegs = sd->gspca_dev.pixfmt.width / 16;
drivers/media/usb/gspca/ov519.c
3642
vsegs = sd->gspca_dev.pixfmt.height / 4;
drivers/media/usb/gspca/ov519.c
3644
reg_w(sd, 0x29, hsegs);
drivers/media/usb/gspca/ov519.c
3645
reg_w(sd, 0x2a, vsegs);
drivers/media/usb/gspca/ov519.c
3647
reg_w(sd, 0x39, hsegs);
drivers/media/usb/gspca/ov519.c
3648
reg_w(sd, 0x3a, vsegs);
drivers/media/usb/gspca/ov519.c
3651
reg_w(sd, 0x2f, 0x80);
drivers/media/usb/gspca/ov519.c
3654
if (sd->bridge == BRIDGE_OV518PLUS && sd->revision == 0 &&
drivers/media/usb/gspca/ov519.c
3655
sd->sensor == SEN_OV7620AE)
drivers/media/usb/gspca/ov519.c
3656
sd->clockdiv = 0;
drivers/media/usb/gspca/ov519.c
3658
sd->clockdiv = 1;
drivers/media/usb/gspca/ov519.c
3662
reg_w(sd, 0x51, 0x04);
drivers/media/usb/gspca/ov519.c
3663
reg_w(sd, 0x22, 0x18);
drivers/media/usb/gspca/ov519.c
3664
reg_w(sd, 0x23, 0xff);
drivers/media/usb/gspca/ov519.c
3666
if (sd->bridge == BRIDGE_OV518PLUS) {
drivers/media/usb/gspca/ov519.c
3667
switch (sd->sensor) {
drivers/media/usb/gspca/ov519.c
3681
if (sd->revision > 0 &&
drivers/media/usb/gspca/ov519.c
3682
sd->gspca_dev.pixfmt.width == 640) {
drivers/media/usb/gspca/ov519.c
3683
reg_w(sd, 0x20, 0x60);
drivers/media/usb/gspca/ov519.c
3684
reg_w(sd, 0x21, 0x1f);
drivers/media/usb/gspca/ov519.c
3686
reg_w(sd, 0x20, 0x00);
drivers/media/usb/gspca/ov519.c
3687
reg_w(sd, 0x21, 0x19);
drivers/media/usb/gspca/ov519.c
3691
reg_w(sd, 0x20, 0x00);
drivers/media/usb/gspca/ov519.c
3692
reg_w(sd, 0x21, 0x19);
drivers/media/usb/gspca/ov519.c
3695
reg_w(sd, 0x21, 0x19);
drivers/media/usb/gspca/ov519.c
3698
reg_w(sd, 0x71, 0x17); /* Compression-related? */
drivers/media/usb/gspca/ov519.c
3702
i2c_w(sd, 0x54, 0x23);
drivers/media/usb/gspca/ov519.c
3704
reg_w(sd, 0x2f, 0x80);
drivers/media/usb/gspca/ov519.c
3706
if (sd->bridge == BRIDGE_OV518PLUS) {
drivers/media/usb/gspca/ov519.c
3707
reg_w(sd, 0x24, 0x94);
drivers/media/usb/gspca/ov519.c
3708
reg_w(sd, 0x25, 0x90);
drivers/media/usb/gspca/ov519.c
3709
ov518_reg_w32(sd, 0xc4, 400, 2); /* 190h */
drivers/media/usb/gspca/ov519.c
3710
ov518_reg_w32(sd, 0xc6, 540, 2); /* 21ch */
drivers/media/usb/gspca/ov519.c
3711
ov518_reg_w32(sd, 0xc7, 540, 2); /* 21ch */
drivers/media/usb/gspca/ov519.c
3712
ov518_reg_w32(sd, 0xc8, 108, 2); /* 6ch */
drivers/media/usb/gspca/ov519.c
3713
ov518_reg_w32(sd, 0xca, 131098, 3); /* 2001ah */
drivers/media/usb/gspca/ov519.c
3714
ov518_reg_w32(sd, 0xcb, 532, 2); /* 214h */
drivers/media/usb/gspca/ov519.c
3715
ov518_reg_w32(sd, 0xcc, 2400, 2); /* 960h */
drivers/media/usb/gspca/ov519.c
3716
ov518_reg_w32(sd, 0xcd, 32, 2); /* 20h */
drivers/media/usb/gspca/ov519.c
3717
ov518_reg_w32(sd, 0xce, 608, 2); /* 260h */
drivers/media/usb/gspca/ov519.c
3719
reg_w(sd, 0x24, 0x9f);
drivers/media/usb/gspca/ov519.c
3720
reg_w(sd, 0x25, 0x90);
drivers/media/usb/gspca/ov519.c
3721
ov518_reg_w32(sd, 0xc4, 400, 2); /* 190h */
drivers/media/usb/gspca/ov519.c
3722
ov518_reg_w32(sd, 0xc6, 381, 2); /* 17dh */
drivers/media/usb/gspca/ov519.c
3723
ov518_reg_w32(sd, 0xc7, 381, 2); /* 17dh */
drivers/media/usb/gspca/ov519.c
3724
ov518_reg_w32(sd, 0xc8, 128, 2); /* 80h */
drivers/media/usb/gspca/ov519.c
3725
ov518_reg_w32(sd, 0xca, 183331, 3); /* 2cc23h */
drivers/media/usb/gspca/ov519.c
3726
ov518_reg_w32(sd, 0xcb, 746, 2); /* 2eah */
drivers/media/usb/gspca/ov519.c
3727
ov518_reg_w32(sd, 0xcc, 1750, 2); /* 6d6h */
drivers/media/usb/gspca/ov519.c
3728
ov518_reg_w32(sd, 0xcd, 45, 2); /* 2dh */
drivers/media/usb/gspca/ov519.c
3729
ov518_reg_w32(sd, 0xce, 851, 2); /* 353h */
drivers/media/usb/gspca/ov519.c
3732
reg_w(sd, 0x2f, 0x80);
drivers/media/usb/gspca/ov519.c
3742
static void ov519_mode_init_regs(struct sd *sd)
drivers/media/usb/gspca/ov519.c
3788
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
3791
switch (sd->sensor) {
drivers/media/usb/gspca/ov519.c
3793
write_regvals(sd, mode_init_519, ARRAY_SIZE(mode_init_519));
drivers/media/usb/gspca/ov519.c
3794
if (sd->sensor == SEN_OV7640 ||
drivers/media/usb/gspca/ov519.c
3795
sd->sensor == SEN_OV7648) {
drivers/media/usb/gspca/ov519.c
3797
reg_w_mask(sd, OV519_R20_DFR, 0x10, 0x10);
drivers/media/usb/gspca/ov519.c
3803
write_regvals(sd, mode_init_519_ov7670,
drivers/media/usb/gspca/ov519.c
3808
reg_w(sd, OV519_R10_H_SIZE, sd->gspca_dev.pixfmt.width >> 4);
drivers/media/usb/gspca/ov519.c
3809
reg_w(sd, OV519_R11_V_SIZE, sd->gspca_dev.pixfmt.height >> 3);
drivers/media/usb/gspca/ov519.c
3810
if (sd->sensor == SEN_OV7670 &&
drivers/media/usb/gspca/ov519.c
3811
sd->gspca_dev.cam.cam_mode[sd->gspca_dev.curr_mode].priv)
drivers/media/usb/gspca/ov519.c
3812
reg_w(sd, OV519_R12_X_OFFSETL, 0x04);
drivers/media/usb/gspca/ov519.c
3813
else if (sd->sensor == SEN_OV7648 &&
drivers/media/usb/gspca/ov519.c
3814
sd->gspca_dev.cam.cam_mode[sd->gspca_dev.curr_mode].priv)
drivers/media/usb/gspca/ov519.c
3815
reg_w(sd, OV519_R12_X_OFFSETL, 0x01);
drivers/media/usb/gspca/ov519.c
3817
reg_w(sd, OV519_R12_X_OFFSETL, 0x00);
drivers/media/usb/gspca/ov519.c
3818
reg_w(sd, OV519_R13_X_OFFSETH, 0x00);
drivers/media/usb/gspca/ov519.c
3819
reg_w(sd, OV519_R14_Y_OFFSETL, 0x00);
drivers/media/usb/gspca/ov519.c
3820
reg_w(sd, OV519_R15_Y_OFFSETH, 0x00);
drivers/media/usb/gspca/ov519.c
3821
reg_w(sd, OV519_R16_DIVIDER, 0x00);
drivers/media/usb/gspca/ov519.c
3822
reg_w(sd, OV519_R25_FORMAT, 0x03); /* YUV422 */
drivers/media/usb/gspca/ov519.c
3823
reg_w(sd, 0x26, 0x00); /* Undocumented */
drivers/media/usb/gspca/ov519.c
3827
sd->frame_rate = frame_rate;
drivers/media/usb/gspca/ov519.c
3830
sd->clockdiv = 0;
drivers/media/usb/gspca/ov519.c
3831
switch (sd->sensor) {
drivers/media/usb/gspca/ov519.c
3834
switch (sd->frame_rate) {
drivers/media/usb/gspca/ov519.c
3837
reg_w(sd, 0xa4, 0x0c);
drivers/media/usb/gspca/ov519.c
3838
reg_w(sd, 0x23, 0xff);
drivers/media/usb/gspca/ov519.c
3841
reg_w(sd, 0xa4, 0x0c);
drivers/media/usb/gspca/ov519.c
3842
reg_w(sd, 0x23, 0x1f);
drivers/media/usb/gspca/ov519.c
3845
reg_w(sd, 0xa4, 0x0c);
drivers/media/usb/gspca/ov519.c
3846
reg_w(sd, 0x23, 0x1b);
drivers/media/usb/gspca/ov519.c
3849
reg_w(sd, 0xa4, 0x04);
drivers/media/usb/gspca/ov519.c
3850
reg_w(sd, 0x23, 0xff);
drivers/media/usb/gspca/ov519.c
3851
sd->clockdiv = 1;
drivers/media/usb/gspca/ov519.c
3854
reg_w(sd, 0xa4, 0x04);
drivers/media/usb/gspca/ov519.c
3855
reg_w(sd, 0x23, 0x1f);
drivers/media/usb/gspca/ov519.c
3856
sd->clockdiv = 1;
drivers/media/usb/gspca/ov519.c
3859
reg_w(sd, 0xa4, 0x04);
drivers/media/usb/gspca/ov519.c
3860
reg_w(sd, 0x23, 0x1b);
drivers/media/usb/gspca/ov519.c
3861
sd->clockdiv = 1;
drivers/media/usb/gspca/ov519.c
3866
switch (sd->frame_rate) {
drivers/media/usb/gspca/ov519.c
3869
reg_w(sd, 0xa4, 0x06);
drivers/media/usb/gspca/ov519.c
3870
reg_w(sd, 0x23, 0xff);
drivers/media/usb/gspca/ov519.c
3873
reg_w(sd, 0xa4, 0x06);
drivers/media/usb/gspca/ov519.c
3874
reg_w(sd, 0x23, 0x1f);
drivers/media/usb/gspca/ov519.c
3877
reg_w(sd, 0xa4, 0x06);
drivers/media/usb/gspca/ov519.c
3878
reg_w(sd, 0x23, 0x1b);
drivers/media/usb/gspca/ov519.c
3884
(sd->frame_rate == 0) ? 15 : sd->frame_rate);
drivers/media/usb/gspca/ov519.c
3885
reg_w(sd, 0xa4, 0x10);
drivers/media/usb/gspca/ov519.c
3886
switch (sd->frame_rate) {
drivers/media/usb/gspca/ov519.c
3888
reg_w(sd, 0x23, 0xff);
drivers/media/usb/gspca/ov519.c
3891
reg_w(sd, 0x23, 0x1b);
drivers/media/usb/gspca/ov519.c
3895
reg_w(sd, 0x23, 0xff);
drivers/media/usb/gspca/ov519.c
3896
sd->clockdiv = 1;
drivers/media/usb/gspca/ov519.c
3903
static void mode_init_ov_sensor_regs(struct sd *sd)
drivers/media/usb/gspca/ov519.c
3905
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/ov519.c
3912
switch (sd->sensor) {
drivers/media/usb/gspca/ov519.c
3914
i2c_w_mask(sd, 0x14, qvga ? 0x20 : 0x00, 0x20);
drivers/media/usb/gspca/ov519.c
3915
i2c_w_mask(sd, 0x28, qvga ? 0x00 : 0x20, 0x20);
drivers/media/usb/gspca/ov519.c
3916
i2c_w(sd, 0x24, qvga ? 0x20 : 0x3a);
drivers/media/usb/gspca/ov519.c
3917
i2c_w(sd, 0x25, qvga ? 0x30 : 0x60);
drivers/media/usb/gspca/ov519.c
3918
i2c_w_mask(sd, 0x2d, qvga ? 0x40 : 0x00, 0x40);
drivers/media/usb/gspca/ov519.c
3919
i2c_w_mask(sd, 0x67, qvga ? 0xf0 : 0x90, 0xf0);
drivers/media/usb/gspca/ov519.c
3920
i2c_w_mask(sd, 0x74, qvga ? 0x20 : 0x00, 0x20);
drivers/media/usb/gspca/ov519.c
3931
if (sd->frame_rate < 25)
drivers/media/usb/gspca/ov519.c
3934
if (sd->frame_rate < 10)
drivers/media/usb/gspca/ov519.c
3937
i2c_w(sd, 0x11, v);
drivers/media/usb/gspca/ov519.c
3938
i2c_w(sd, 0x12, qvga ? 0x60 : 0x20);
drivers/media/usb/gspca/ov519.c
3955
i2c_w_mask(sd, 0x12, qvga ? 0x40 : 0x00, 0xf0);
drivers/media/usb/gspca/ov519.c
3956
i2c_w_mask(sd, 0x32,
drivers/media/usb/gspca/ov519.c
3959
i2c_w_mask(sd, 0x03,
drivers/media/usb/gspca/ov519.c
3962
i2c_w(sd, 0x17, xstart >> 4);
drivers/media/usb/gspca/ov519.c
3963
i2c_w(sd, 0x18, xend >> 4);
drivers/media/usb/gspca/ov519.c
3964
i2c_w(sd, 0x19, ystart >> 3);
drivers/media/usb/gspca/ov519.c
3965
i2c_w(sd, 0x1a, yend >> 3);
drivers/media/usb/gspca/ov519.c
3969
i2c_w_mask(sd, OV7610_REG_COM_C, qvga ? (1 << 5) : 0, 1 << 5);
drivers/media/usb/gspca/ov519.c
3970
i2c_w_mask(sd, 0x13, 0x00, 0x20); /* Select 16 bit data bus */
drivers/media/usb/gspca/ov519.c
3971
i2c_w_mask(sd, 0x12, 0x04, 0x06); /* AWB: 1 Test pattern: 0 */
drivers/media/usb/gspca/ov519.c
3972
i2c_w_mask(sd, 0x2d, 0x00, 0x40); /* from windrv 090403 */
drivers/media/usb/gspca/ov519.c
3973
i2c_w_mask(sd, 0x28, 0x20, 0x20); /* progressive mode on */
drivers/media/usb/gspca/ov519.c
3976
i2c_w_mask(sd, 0x14, qvga ? 0x20 : 0x00, 0x20);
drivers/media/usb/gspca/ov519.c
3977
i2c_w(sd, 0x35, qvga ? 0x1e : 0x9e);
drivers/media/usb/gspca/ov519.c
3978
i2c_w_mask(sd, 0x13, 0x00, 0x20); /* Select 16 bit data bus */
drivers/media/usb/gspca/ov519.c
3979
i2c_w_mask(sd, 0x12, 0x04, 0x06); /* AWB: 1 Test pattern: 0 */
drivers/media/usb/gspca/ov519.c
3984
i2c_w_mask(sd, 0x14, qvga ? 0x20 : 0x00, 0x20);
drivers/media/usb/gspca/ov519.c
3985
i2c_w_mask(sd, 0x28, qvga ? 0x00 : 0x20, 0x20);
drivers/media/usb/gspca/ov519.c
3986
i2c_w(sd, 0x24, qvga ? 0x20 : 0x3a);
drivers/media/usb/gspca/ov519.c
3987
i2c_w(sd, 0x25, qvga ? 0x30 : 0x60);
drivers/media/usb/gspca/ov519.c
3988
i2c_w_mask(sd, 0x2d, qvga ? 0x40 : 0x00, 0x40);
drivers/media/usb/gspca/ov519.c
3989
i2c_w_mask(sd, 0x67, qvga ? 0xb0 : 0x90, 0xf0);
drivers/media/usb/gspca/ov519.c
3990
i2c_w_mask(sd, 0x74, qvga ? 0x20 : 0x00, 0x20);
drivers/media/usb/gspca/ov519.c
3991
i2c_w_mask(sd, 0x13, 0x00, 0x20); /* Select 16 bit data bus */
drivers/media/usb/gspca/ov519.c
3992
i2c_w_mask(sd, 0x12, 0x04, 0x06); /* AWB: 1 Test pattern: 0 */
drivers/media/usb/gspca/ov519.c
3993
if (sd->sensor == SEN_OV76BE)
drivers/media/usb/gspca/ov519.c
3994
i2c_w(sd, 0x35, qvga ? 0x1e : 0x9e);
drivers/media/usb/gspca/ov519.c
3998
i2c_w_mask(sd, 0x14, qvga ? 0x20 : 0x00, 0x20);
drivers/media/usb/gspca/ov519.c
3999
i2c_w_mask(sd, 0x28, qvga ? 0x00 : 0x20, 0x20);
drivers/media/usb/gspca/ov519.c
4002
i2c_w_mask(sd, 0x2d, qvga ? 0x40 : 0x00, 0x40);
drivers/media/usb/gspca/ov519.c
4004
i2c_w_mask(sd, 0x67, qvga ? 0xf0 : 0x90, 0xf0);
drivers/media/usb/gspca/ov519.c
4006
i2c_w_mask(sd, 0x74, qvga ? 0x20 : 0x00, 0x20);
drivers/media/usb/gspca/ov519.c
4007
i2c_w_mask(sd, 0x12, 0x04, 0x04); /* AWB: 1 */
drivers/media/usb/gspca/ov519.c
4013
i2c_w_mask(sd, OV7670_R12_COM7,
drivers/media/usb/gspca/ov519.c
4016
i2c_w_mask(sd, 0x13, 0x00, 0x20); /* Select 16 bit data bus */
drivers/media/usb/gspca/ov519.c
4017
i2c_w_mask(sd, OV7670_R13_COM8, OV7670_COM8_AWB,
drivers/media/usb/gspca/ov519.c
4033
i2c_w(sd, OV7670_R17_HSTART, xstart >> 3);
drivers/media/usb/gspca/ov519.c
4034
i2c_w(sd, OV7670_R18_HSTOP, xend >> 3);
drivers/media/usb/gspca/ov519.c
4035
v = i2c_r(sd, OV7670_R32_HREF);
drivers/media/usb/gspca/ov519.c
4039
i2c_w(sd, OV7670_R32_HREF, v);
drivers/media/usb/gspca/ov519.c
4041
i2c_w(sd, OV7670_R19_VSTART, ystart >> 2);
drivers/media/usb/gspca/ov519.c
4042
i2c_w(sd, OV7670_R1A_VSTOP, yend >> 2);
drivers/media/usb/gspca/ov519.c
4043
v = i2c_r(sd, OV7670_R03_VREF);
drivers/media/usb/gspca/ov519.c
4047
i2c_w(sd, OV7670_R03_VREF, v);
drivers/media/usb/gspca/ov519.c
4050
i2c_w_mask(sd, 0x14, qvga ? 0x20 : 0x00, 0x20);
drivers/media/usb/gspca/ov519.c
4051
i2c_w_mask(sd, 0x13, 0x00, 0x20); /* Select 16 bit data bus */
drivers/media/usb/gspca/ov519.c
4052
i2c_w_mask(sd, 0x12, 0x04, 0x06); /* AWB: 1 Test pattern: 0 */
drivers/media/usb/gspca/ov519.c
4056
i2c_w_mask(sd, 0x14, qvga ? 0x20 : 0x00, 0x20);
drivers/media/usb/gspca/ov519.c
4057
i2c_w_mask(sd, 0x12, 0x04, 0x06); /* AWB: 1 Test pattern: 0 */
drivers/media/usb/gspca/ov519.c
4078
i2c_w_mask(sd, 0x12, qvga ? 0x40 : 0x00, 0x40);
drivers/media/usb/gspca/ov519.c
4080
vals = sd->frame_rate < 30 ? vga_15 : vga_30;
drivers/media/usb/gspca/ov519.c
4082
vals = sd->frame_rate < 15 ? sxga_7_5 : sxga_15;
drivers/media/usb/gspca/ov519.c
4083
write_i2c_regvals(sd, vals, ARRAY_SIZE(sxga_15));
drivers/media/usb/gspca/ov519.c
4091
i2c_w(sd, 0x11, sd->clockdiv);
drivers/media/usb/gspca/ov519.c
4097
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4099
if (sd->gspca_dev.streaming)
drivers/media/usb/gspca/ov519.c
4100
reg_w(sd, OV519_R51_RESET1, 0x0f); /* block stream */
drivers/media/usb/gspca/ov519.c
4101
i2c_w_mask(sd, OV7670_R1E_MVFP,
drivers/media/usb/gspca/ov519.c
4104
if (sd->gspca_dev.streaming)
drivers/media/usb/gspca/ov519.c
4105
reg_w(sd, OV519_R51_RESET1, 0x00); /* restart stream */
drivers/media/usb/gspca/ov519.c
4108
static void set_ov_sensor_window(struct sd *sd)
drivers/media/usb/gspca/ov519.c
4115
switch (sd->sensor) {
drivers/media/usb/gspca/ov519.c
4121
mode_init_ov_sensor_regs(sd);
drivers/media/usb/gspca/ov519.c
4124
ov519_set_mode(sd);
drivers/media/usb/gspca/ov519.c
4125
ov519_set_fr(sd);
drivers/media/usb/gspca/ov519.c
4129
gspca_dev = &sd->gspca_dev;
drivers/media/usb/gspca/ov519.c
4135
switch (sd->sensor) {
drivers/media/usb/gspca/ov519.c
4155
if (sd->sensor == SEN_OV66308AF && qvga)
drivers/media/usb/gspca/ov519.c
4181
switch (sd->sensor) {
drivers/media/usb/gspca/ov519.c
4213
mode_init_ov_sensor_regs(sd);
drivers/media/usb/gspca/ov519.c
4215
i2c_w(sd, 0x17, hwsbase);
drivers/media/usb/gspca/ov519.c
4216
i2c_w(sd, 0x18, hwebase + (sd->sensor_width >> hwscale));
drivers/media/usb/gspca/ov519.c
4217
i2c_w(sd, 0x19, vwsbase);
drivers/media/usb/gspca/ov519.c
4218
i2c_w(sd, 0x1a, vwebase + (sd->sensor_height >> vwscale));
drivers/media/usb/gspca/ov519.c
4224
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4227
sd->sensor_width = sd->gspca_dev.pixfmt.width;
drivers/media/usb/gspca/ov519.c
4228
sd->sensor_height = sd->gspca_dev.pixfmt.height;
drivers/media/usb/gspca/ov519.c
4230
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
4233
ov511_mode_init_regs(sd);
drivers/media/usb/gspca/ov519.c
4237
ov518_mode_init_regs(sd);
drivers/media/usb/gspca/ov519.c
4240
ov519_mode_init_regs(sd);
drivers/media/usb/gspca/ov519.c
4244
w9968cf_mode_init_regs(sd);
drivers/media/usb/gspca/ov519.c
4248
set_ov_sensor_window(sd);
drivers/media/usb/gspca/ov519.c
4252
sd->snapshot_needs_reset = 1;
drivers/media/usb/gspca/ov519.c
4255
sd->first_frame = 3;
drivers/media/usb/gspca/ov519.c
4257
ov51x_restart(sd);
drivers/media/usb/gspca/ov519.c
4258
ov51x_led_control(sd, 1);
drivers/media/usb/gspca/ov519.c
4264
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4266
ov51x_stop(sd);
drivers/media/usb/gspca/ov519.c
4267
ov51x_led_control(sd, 0);
drivers/media/usb/gspca/ov519.c
4272
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4274
if (!sd->gspca_dev.present)
drivers/media/usb/gspca/ov519.c
4276
if (sd->bridge == BRIDGE_W9968CF)
drivers/media/usb/gspca/ov519.c
4277
w9968cf_stop0(sd);
drivers/media/usb/gspca/ov519.c
4281
if (sd->snapshot_pressed) {
drivers/media/usb/gspca/ov519.c
4284
sd->snapshot_pressed = 0;
drivers/media/usb/gspca/ov519.c
4287
if (sd->bridge == BRIDGE_OV519)
drivers/media/usb/gspca/ov519.c
4288
reg_w(sd, OV519_R57_SNAPSHOT, 0x23);
drivers/media/usb/gspca/ov519.c
4293
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4295
if (sd->snapshot_pressed != state) {
drivers/media/usb/gspca/ov519.c
4301
sd->snapshot_needs_reset = 1;
drivers/media/usb/gspca/ov519.c
4303
sd->snapshot_pressed = state;
drivers/media/usb/gspca/ov519.c
4308
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
4313
sd->snapshot_needs_reset = 1;
drivers/media/usb/gspca/ov519.c
4323
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4358
sd->packet_nr = 0;
drivers/media/usb/gspca/ov519.c
4373
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4381
sd->packet_nr = 0;
drivers/media/usb/gspca/ov519.c
4390
if (sd->packet_nr == data[len])
drivers/media/usb/gspca/ov519.c
4391
sd->packet_nr++;
drivers/media/usb/gspca/ov519.c
4395
else if (sd->packet_nr == 0 || data[len]) {
drivers/media/usb/gspca/ov519.c
4397
(int)data[len], (int)sd->packet_nr);
drivers/media/usb/gspca/ov519.c
4457
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4465
if (sd->first_frame) {
drivers/media/usb/gspca/ov519.c
4466
sd->first_frame--;
drivers/media/usb/gspca/ov519.c
4468
sd->gspca_dev.pixfmt.width *
drivers/media/usb/gspca/ov519.c
4469
sd->gspca_dev.pixfmt.height)
drivers/media/usb/gspca/ov519.c
4481
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4483
switch (sd->bridge) {
drivers/media/usb/gspca/ov519.c
4508
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4526
switch (sd->sensor) {
drivers/media/usb/gspca/ov519.c
4535
i2c_w(sd, OV7610_REG_BRT, val);
drivers/media/usb/gspca/ov519.c
4539
i2c_w(sd, OV7610_REG_BRT, val);
drivers/media/usb/gspca/ov519.c
4542
write_i2c_regvals(sd, brit_7660[val],
drivers/media/usb/gspca/ov519.c
4548
i2c_w(sd, OV7670_R55_BRIGHT, ov7670_abs_to_sm(val));
drivers/media/usb/gspca/ov519.c
4555
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4615
switch (sd->sensor) {
drivers/media/usb/gspca/ov519.c
4618
i2c_w(sd, OV7610_REG_CNT, val);
drivers/media/usb/gspca/ov519.c
4622
i2c_w_mask(sd, OV7610_REG_CNT, val >> 4, 0x0f);
drivers/media/usb/gspca/ov519.c
4630
i2c_w(sd, 0x64, ctab[val >> 5]);
drivers/media/usb/gspca/ov519.c
4641
i2c_w(sd, 0x64, ctab[val >> 4]);
drivers/media/usb/gspca/ov519.c
4645
write_i2c_regvals(sd, contrast_7660[val],
drivers/media/usb/gspca/ov519.c
4650
i2c_w(sd, OV7670_R56_CONTRAS, val >> 1);
drivers/media/usb/gspca/ov519.c
4657
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4659
i2c_w(sd, 0x10, val);
drivers/media/usb/gspca/ov519.c
4664
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4678
switch (sd->sensor) {
drivers/media/usb/gspca/ov519.c
4685
i2c_w(sd, OV7610_REG_SAT, val);
drivers/media/usb/gspca/ov519.c
4693
i2c_w(sd, OV7610_REG_SAT, val);
drivers/media/usb/gspca/ov519.c
4697
i2c_w(sd, OV7610_REG_SAT, val & 0xf0);
drivers/media/usb/gspca/ov519.c
4700
write_i2c_regvals(sd, colors_7660[val],
drivers/media/usb/gspca/ov519.c
4713
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4715
i2c_w_mask(sd, 0x2d, val ? 0x10 : 0x00, 0x10);
drivers/media/usb/gspca/ov519.c
4718
static void setfreq_i(struct sd *sd, s32 val)
drivers/media/usb/gspca/ov519.c
4720
if (sd->sensor == SEN_OV7660
drivers/media/usb/gspca/ov519.c
4721
|| sd->sensor == SEN_OV7670) {
drivers/media/usb/gspca/ov519.c
4724
i2c_w_mask(sd, OV7670_R13_COM8, 0, OV7670_COM8_BFILT);
drivers/media/usb/gspca/ov519.c
4727
i2c_w_mask(sd, OV7670_R13_COM8, OV7670_COM8_BFILT,
drivers/media/usb/gspca/ov519.c
4729
i2c_w_mask(sd, OV7670_R3B_COM11, 0x08, 0x18);
drivers/media/usb/gspca/ov519.c
4732
i2c_w_mask(sd, OV7670_R13_COM8, OV7670_COM8_BFILT,
drivers/media/usb/gspca/ov519.c
4734
i2c_w_mask(sd, OV7670_R3B_COM11, 0x00, 0x18);
drivers/media/usb/gspca/ov519.c
4737
i2c_w_mask(sd, OV7670_R13_COM8, OV7670_COM8_BFILT,
drivers/media/usb/gspca/ov519.c
4739
i2c_w_mask(sd, OV7670_R3B_COM11, OV7670_COM11_HZAUTO,
drivers/media/usb/gspca/ov519.c
4746
i2c_w_mask(sd, 0x2d, 0x00, 0x04);
drivers/media/usb/gspca/ov519.c
4747
i2c_w_mask(sd, 0x2a, 0x00, 0x80);
drivers/media/usb/gspca/ov519.c
4750
i2c_w_mask(sd, 0x2d, 0x04, 0x04);
drivers/media/usb/gspca/ov519.c
4751
i2c_w_mask(sd, 0x2a, 0x80, 0x80);
drivers/media/usb/gspca/ov519.c
4753
if (sd->sensor == SEN_OV6620 ||
drivers/media/usb/gspca/ov519.c
4754
sd->sensor == SEN_OV6630 ||
drivers/media/usb/gspca/ov519.c
4755
sd->sensor == SEN_OV66308AF)
drivers/media/usb/gspca/ov519.c
4756
i2c_w(sd, 0x2b, 0x5e);
drivers/media/usb/gspca/ov519.c
4758
i2c_w(sd, 0x2b, 0xac);
drivers/media/usb/gspca/ov519.c
4761
i2c_w_mask(sd, 0x2d, 0x04, 0x04);
drivers/media/usb/gspca/ov519.c
4762
if (sd->sensor == SEN_OV6620 ||
drivers/media/usb/gspca/ov519.c
4763
sd->sensor == SEN_OV6630 ||
drivers/media/usb/gspca/ov519.c
4764
sd->sensor == SEN_OV66308AF) {
drivers/media/usb/gspca/ov519.c
4766
i2c_w_mask(sd, 0x2a, 0x80, 0x80);
drivers/media/usb/gspca/ov519.c
4767
i2c_w(sd, 0x2b, 0xa8);
drivers/media/usb/gspca/ov519.c
4770
i2c_w_mask(sd, 0x2a, 0x00, 0x80);
drivers/media/usb/gspca/ov519.c
4779
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4781
setfreq_i(sd, val);
drivers/media/usb/gspca/ov519.c
4784
if (sd->bridge == BRIDGE_W9968CF)
drivers/media/usb/gspca/ov519.c
4785
w9968cf_set_crop_window(sd);
drivers/media/usb/gspca/ov519.c
4791
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4793
if (sd->bridge != BRIDGE_W9968CF)
drivers/media/usb/gspca/ov519.c
4797
jcomp->quality = v4l2_ctrl_g_ctrl(sd->jpegqual);
drivers/media/usb/gspca/ov519.c
4806
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov519.c
4808
if (sd->bridge != BRIDGE_W9968CF)
drivers/media/usb/gspca/ov519.c
4811
v4l2_ctrl_s_ctrl(sd->jpegqual, jcomp->quality);
drivers/media/usb/gspca/ov519.c
4819
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/ov519.c
4825
gspca_dev->exposure->val = i2c_r(sd, 0x10);
drivers/media/usb/gspca/ov519.c
4835
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/ov519.c
4855
if (!ctrl->val && sd->brightness->is_new)
drivers/media/usb/gspca/ov519.c
4856
setbrightness(gspca_dev, sd->brightness->val);
drivers/media/usb/gspca/ov519.c
4862
sethvflip(gspca_dev, ctrl->val, sd->vflip->val);
drivers/media/usb/gspca/ov519.c
4883
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/ov519.c
4888
if (valid_controls[sd->sensor].has_brightness)
drivers/media/usb/gspca/ov519.c
4889
sd->brightness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/ov519.c
4891
sd->sensor == SEN_OV7660 ? 6 : 255, 1,
drivers/media/usb/gspca/ov519.c
4892
sd->sensor == SEN_OV7660 ? 3 : 127);
drivers/media/usb/gspca/ov519.c
4893
if (valid_controls[sd->sensor].has_contrast) {
drivers/media/usb/gspca/ov519.c
4894
if (sd->sensor == SEN_OV7660)
drivers/media/usb/gspca/ov519.c
4900
(sd->sensor == SEN_OV6630 ||
drivers/media/usb/gspca/ov519.c
4901
sd->sensor == SEN_OV66308AF) ? 200 : 127);
drivers/media/usb/gspca/ov519.c
4903
if (valid_controls[sd->sensor].has_sat)
drivers/media/usb/gspca/ov519.c
4906
sd->sensor == SEN_OV7660 ? 4 : 255, 1,
drivers/media/usb/gspca/ov519.c
4907
sd->sensor == SEN_OV7660 ? 2 : 127);
drivers/media/usb/gspca/ov519.c
4908
if (valid_controls[sd->sensor].has_exposure)
drivers/media/usb/gspca/ov519.c
4911
if (valid_controls[sd->sensor].has_hvflip) {
drivers/media/usb/gspca/ov519.c
4912
sd->hflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/ov519.c
4914
sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/ov519.c
4917
if (valid_controls[sd->sensor].has_autobright)
drivers/media/usb/gspca/ov519.c
4918
sd->autobright = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/ov519.c
4920
if (valid_controls[sd->sensor].has_autogain)
drivers/media/usb/gspca/ov519.c
4923
if (valid_controls[sd->sensor].has_freq) {
drivers/media/usb/gspca/ov519.c
4924
if (sd->sensor == SEN_OV7670)
drivers/media/usb/gspca/ov519.c
4925
sd->freq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/ov519.c
4930
sd->freq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/ov519.c
4934
if (sd->bridge == BRIDGE_W9968CF)
drivers/media/usb/gspca/ov519.c
4935
sd->jpegqual = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/ov519.c
4945
if (sd->autobright)
drivers/media/usb/gspca/ov519.c
4946
v4l2_ctrl_auto_cluster(2, &sd->autobright, 0, false);
drivers/media/usb/gspca/ov519.c
4947
if (sd->hflip)
drivers/media/usb/gspca/ov519.c
4948
v4l2_ctrl_cluster(2, &sd->hflip);
drivers/media/usb/gspca/ov519.c
5011
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/ov534.c
1025
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
1030
if (sd->sensor == SENSOR_OV772x)
drivers/media/usb/gspca/ov534.c
1036
if (sd->sensor == SENSOR_OV772x)
drivers/media/usb/gspca/ov534.c
1044
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
1047
data = sd->sensor == SENSOR_OV767x ?
drivers/media/usb/gspca/ov534.c
1070
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
1073
if (sd->sensor == SENSOR_OV767x) {
drivers/media/usb/gspca/ov534.c
1094
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
1097
if (sd->sensor == SENSOR_OV767x) {
drivers/media/usb/gspca/ov534.c
1110
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
1118
sd->frame_rate = DEFAULT_FRAME_RATE;
drivers/media/usb/gspca/ov534.c
1125
struct sd *sd = container_of(ctrl->handler, struct sd, ctrl_handler);
drivers/media/usb/gspca/ov534.c
1126
struct gspca_dev *gspca_dev = &sd->gspca_dev;
drivers/media/usb/gspca/ov534.c
1131
if (ctrl->val && sd->gain && gspca_dev->streaming)
drivers/media/usb/gspca/ov534.c
1132
sd->gain->val = getgain(gspca_dev);
drivers/media/usb/gspca/ov534.c
1137
if (ctrl->val == V4L2_EXPOSURE_AUTO && sd->exposure &&
drivers/media/usb/gspca/ov534.c
1139
sd->exposure->val = getexposure(gspca_dev);
drivers/media/usb/gspca/ov534.c
1147
struct sd *sd = container_of(ctrl->handler, struct sd, ctrl_handler);
drivers/media/usb/gspca/ov534.c
1148
struct gspca_dev *gspca_dev = &sd->gspca_dev;
drivers/media/usb/gspca/ov534.c
1170
if (!gspca_dev->usb_err && !ctrl->val && sd->gain)
drivers/media/usb/gspca/ov534.c
1171
setgain(gspca_dev, sd->gain->val);
drivers/media/usb/gspca/ov534.c
1180
sd->exposure)
drivers/media/usb/gspca/ov534.c
1181
setexposure(gspca_dev, sd->exposure->val);
drivers/media/usb/gspca/ov534.c
1187
sethvflip(gspca_dev, ctrl->val, sd->vflip->val);
drivers/media/usb/gspca/ov534.c
1190
sethvflip(gspca_dev, sd->hflip->val, ctrl->val);
drivers/media/usb/gspca/ov534.c
1206
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
1207
struct v4l2_ctrl_handler *hdl = &sd->ctrl_handler;
drivers/media/usb/gspca/ov534.c
1222
if (sd->sensor == SENSOR_OV767x) {
drivers/media/usb/gspca/ov534.c
1254
if (sd->sensor == SENSOR_OV772x)
drivers/media/usb/gspca/ov534.c
1255
sd->hue = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
drivers/media/usb/gspca/ov534.c
1258
sd->saturation = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
drivers/media/usb/gspca/ov534.c
1261
sd->brightness = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
drivers/media/usb/gspca/ov534.c
1264
sd->contrast = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
drivers/media/usb/gspca/ov534.c
1267
if (sd->sensor == SENSOR_OV772x) {
drivers/media/usb/gspca/ov534.c
1268
sd->autogain = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
drivers/media/usb/gspca/ov534.c
1270
sd->gain = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
drivers/media/usb/gspca/ov534.c
1274
sd->autoexposure = v4l2_ctrl_new_std_menu(hdl, &ov534_ctrl_ops,
drivers/media/usb/gspca/ov534.c
1278
sd->exposure = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
drivers/media/usb/gspca/ov534.c
1282
sd->autowhitebalance = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
drivers/media/usb/gspca/ov534.c
1285
if (sd->sensor == SENSOR_OV772x)
drivers/media/usb/gspca/ov534.c
1286
sd->sharpness = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
drivers/media/usb/gspca/ov534.c
1289
sd->hflip = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
drivers/media/usb/gspca/ov534.c
1291
sd->vflip = v4l2_ctrl_new_std(hdl, &ov534_ctrl_ops,
drivers/media/usb/gspca/ov534.c
1293
sd->plfreq = v4l2_ctrl_new_std_menu(hdl, &ov534_ctrl_ops,
drivers/media/usb/gspca/ov534.c
1303
if (sd->sensor == SENSOR_OV772x)
drivers/media/usb/gspca/ov534.c
1304
v4l2_ctrl_auto_cluster(2, &sd->autogain, 0, true);
drivers/media/usb/gspca/ov534.c
1306
v4l2_ctrl_auto_cluster(2, &sd->autoexposure, V4L2_EXPOSURE_MANUAL,
drivers/media/usb/gspca/ov534.c
1315
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
1346
sd->sensor = SENSOR_OV767x;
drivers/media/usb/gspca/ov534.c
1350
sd->sensor = SENSOR_OV772x;
drivers/media/usb/gspca/ov534.c
1358
reg_w_array(gspca_dev, bridge_init[sd->sensor].val,
drivers/media/usb/gspca/ov534.c
1359
bridge_init[sd->sensor].len);
drivers/media/usb/gspca/ov534.c
1361
sccb_w_array(gspca_dev, sensor_init[sd->sensor].val,
drivers/media/usb/gspca/ov534.c
1362
sensor_init[sd->sensor].len);
drivers/media/usb/gspca/ov534.c
1372
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
1404
if (sd->sensor == SENSOR_OV767x)
drivers/media/usb/gspca/ov534.c
1409
reg_w_array(gspca_dev, bridge_start[sd->sensor][mode].val,
drivers/media/usb/gspca/ov534.c
1410
bridge_start[sd->sensor][mode].len);
drivers/media/usb/gspca/ov534.c
1411
sccb_w_array(gspca_dev, sensor_start[sd->sensor][mode].val,
drivers/media/usb/gspca/ov534.c
1412
sensor_start[sd->sensor][mode].len);
drivers/media/usb/gspca/ov534.c
1416
if (sd->hue)
drivers/media/usb/gspca/ov534.c
1417
sethue(gspca_dev, v4l2_ctrl_g_ctrl(sd->hue));
drivers/media/usb/gspca/ov534.c
1418
setsaturation(gspca_dev, v4l2_ctrl_g_ctrl(sd->saturation));
drivers/media/usb/gspca/ov534.c
1419
if (sd->autogain)
drivers/media/usb/gspca/ov534.c
1420
setagc(gspca_dev, v4l2_ctrl_g_ctrl(sd->autogain));
drivers/media/usb/gspca/ov534.c
1421
setawb(gspca_dev, v4l2_ctrl_g_ctrl(sd->autowhitebalance));
drivers/media/usb/gspca/ov534.c
1422
setaec(gspca_dev, v4l2_ctrl_g_ctrl(sd->autoexposure));
drivers/media/usb/gspca/ov534.c
1423
if (sd->gain)
drivers/media/usb/gspca/ov534.c
1424
setgain(gspca_dev, v4l2_ctrl_g_ctrl(sd->gain));
drivers/media/usb/gspca/ov534.c
1425
setexposure(gspca_dev, v4l2_ctrl_g_ctrl(sd->exposure));
drivers/media/usb/gspca/ov534.c
1426
setbrightness(gspca_dev, v4l2_ctrl_g_ctrl(sd->brightness));
drivers/media/usb/gspca/ov534.c
1427
setcontrast(gspca_dev, v4l2_ctrl_g_ctrl(sd->contrast));
drivers/media/usb/gspca/ov534.c
1428
if (sd->sharpness)
drivers/media/usb/gspca/ov534.c
1429
setsharpness(gspca_dev, v4l2_ctrl_g_ctrl(sd->sharpness));
drivers/media/usb/gspca/ov534.c
1430
sethvflip(gspca_dev, v4l2_ctrl_g_ctrl(sd->hflip),
drivers/media/usb/gspca/ov534.c
1431
v4l2_ctrl_g_ctrl(sd->vflip));
drivers/media/usb/gspca/ov534.c
1432
setlightfreq(gspca_dev, v4l2_ctrl_g_ctrl(sd->plfreq));
drivers/media/usb/gspca/ov534.c
1458
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
1495
if (this_pts != sd->last_pts || this_fid != sd->last_fid) {
drivers/media/usb/gspca/ov534.c
1499
sd->last_pts = this_pts;
drivers/media/usb/gspca/ov534.c
1500
sd->last_fid = this_fid;
drivers/media/usb/gspca/ov534.c
1505
sd->last_pts = 0;
drivers/media/usb/gspca/ov534.c
1540
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
1543
tpf->denominator = sd->frame_rate;
drivers/media/usb/gspca/ov534.c
1552
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
1555
sd->frame_rate = DEFAULT_FRAME_RATE;
drivers/media/usb/gspca/ov534.c
1557
sd->frame_rate = tpf->denominator / tpf->numerator;
drivers/media/usb/gspca/ov534.c
1564
tpf->denominator = sd->frame_rate;
drivers/media/usb/gspca/ov534.c
1592
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/ov534.c
811
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
841
if (sd->sensor != SENSOR_OV772x)
drivers/media/usb/gspca/ov534.c
851
if (sd->frame_rate >= r->fps)
drivers/media/usb/gspca/ov534.c
865
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
867
if (sd->sensor == SENSOR_OV767x) {
drivers/media/usb/gspca/ov534.c
900
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
902
if (sd->sensor == SENSOR_OV767x) {
drivers/media/usb/gspca/ov534.c
924
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
926
if (sd->sensor == SENSOR_OV767x) {
drivers/media/usb/gspca/ov534.c
937
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
939
if (sd->sensor == SENSOR_OV767x)
drivers/media/usb/gspca/ov534.c
975
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
977
if (sd->sensor == SENSOR_OV767x) {
drivers/media/usb/gspca/ov534.c
996
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534.c
998
if (sd->sensor == SENSOR_OV767x) {
drivers/media/usb/gspca/ov534_9.c
1257
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534_9.c
1261
if (sd->sensor == SENSOR_OV562x) {
drivers/media/usb/gspca/ov534_9.c
1399
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534_9.c
1423
sd->sensor = SENSOR_OV965x;
drivers/media/usb/gspca/ov534_9.c
1444
sd->sensor = SENSOR_OV971x;
drivers/media/usb/gspca/ov534_9.c
1473
sd->sensor = SENSOR_OV562x;
drivers/media/usb/gspca/ov534_9.c
1483
sd->sensor = SENSOR_OV361x;
drivers/media/usb/gspca/ov534_9.c
1546
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534_9.c
1548
if (sd->sensor == SENSOR_OV971x)
drivers/media/usb/gspca/ov534_9.c
1550
if (sd->sensor == SENSOR_OV562x)
drivers/media/usb/gspca/ov534_9.c
1552
if (sd->sensor == SENSOR_OV361x)
drivers/media/usb/gspca/ov534_9.c
1607
if (((struct sd *)gspca_dev)->sensor == SENSOR_OV361x) {
drivers/media/usb/gspca/ov534_9.c
1630
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/ov534_9.c
1667
if (this_pts != sd->last_pts || this_fid != sd->last_fid) {
drivers/media/usb/gspca/ov534_9.c
1671
sd->last_pts = this_pts;
drivers/media/usb/gspca/ov534_9.c
1672
sd->last_fid = this_fid;
drivers/media/usb/gspca/ov534_9.c
1677
sd->last_pts = 0;
drivers/media/usb/gspca/ov534_9.c
1742
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/ov534_9.c
1745
if (sd->sensor == SENSOR_OV971x)
drivers/media/usb/gspca/ov534_9.c
1747
if (sd->sensor == SENSOR_OV361x)
drivers/media/usb/gspca/ov534_9.c
1751
if (sd->sensor == SENSOR_OV562x) {
drivers/media/usb/gspca/ov534_9.c
1805
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/pac207.c
205
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/pac207.c
216
sd->autogain_ignore_frames = PAC_AUTOGAIN_IGNORE_FRAMES;
drivers/media/usb/gspca/pac207.c
247
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac207.c
253
sd->brightness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/pac207.c
278
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac207.c
293
pac207_write_reg(gspca_dev, 0x08, v4l2_ctrl_g_ctrl(sd->brightness));
drivers/media/usb/gspca/pac207.c
319
sd->sof_read = 0;
drivers/media/usb/gspca/pac207.c
320
sd->autogain_ignore_frames = 0;
drivers/media/usb/gspca/pac207.c
321
atomic_set(&sd->avg_lum, -1);
drivers/media/usb/gspca/pac207.c
342
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac207.c
343
int avg_lum = atomic_read(&sd->avg_lum);
drivers/media/usb/gspca/pac207.c
348
if (sd->autogain_ignore_frames > 0)
drivers/media/usb/gspca/pac207.c
349
sd->autogain_ignore_frames--;
drivers/media/usb/gspca/pac207.c
352
sd->autogain_ignore_frames = PAC_AUTOGAIN_IGNORE_FRAMES;
drivers/media/usb/gspca/pac207.c
359
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac207.c
362
sof = pac_find_sof(gspca_dev, &sd->sof_read, data, len);
drivers/media/usb/gspca/pac207.c
374
sd->header_read = 0;
drivers/media/usb/gspca/pac207.c
379
if (sd->header_read < 11) {
drivers/media/usb/gspca/pac207.c
383
if (sd->header_read < 5) {
drivers/media/usb/gspca/pac207.c
384
needed = 5 - sd->header_read;
drivers/media/usb/gspca/pac207.c
386
atomic_set(&sd->avg_lum, data[needed - 1]);
drivers/media/usb/gspca/pac207.c
389
needed = 11 - sd->header_read;
drivers/media/usb/gspca/pac207.c
391
sd->header_read += len;
drivers/media/usb/gspca/pac207.c
396
sd->header_read = 11;
drivers/media/usb/gspca/pac207.c
459
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/pac7302.c
357
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7302.c
365
sd->flags = id->driver_info;
drivers/media/usb/gspca/pac7302.c
371
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7302.c
383
v += (sd->brightness->val - (s32)sd->brightness->maximum)
drivers/media/usb/gspca/pac7302.c
384
* 150 / (s32)sd->brightness->maximum; /* 200 ? */
drivers/media/usb/gspca/pac7302.c
385
v -= delta[i] * sd->contrast->val / (s32)sd->contrast->maximum;
drivers/media/usb/gspca/pac7302.c
397
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7302.c
408
v = a[i] * sd->saturation->val / (s32)sd->saturation->maximum;
drivers/media/usb/gspca/pac7302.c
418
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7302.c
421
reg_w(gspca_dev, 0xc6, sd->white_balance->val);
drivers/media/usb/gspca/pac7302.c
446
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7302.c
450
rgbbalance_ctrl_to_reg_value(sd->red_balance->val));
drivers/media/usb/gspca/pac7302.c
457
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7302.c
461
rgbbalance_ctrl_to_reg_value(sd->blue_balance->val));
drivers/media/usb/gspca/pac7302.c
536
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7302.c
539
hflip = sd->hflip->val;
drivers/media/usb/gspca/pac7302.c
540
if (sd->flags & FL_HFLIP)
drivers/media/usb/gspca/pac7302.c
542
vflip = sd->vflip->val;
drivers/media/usb/gspca/pac7302.c
543
if (sd->flags & FL_VFLIP)
drivers/media/usb/gspca/pac7302.c
556
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7302.c
559
reg_w(gspca_dev, 0xb6, sd->sharpness->val);
drivers/media/usb/gspca/pac7302.c
575
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/pac7302.c
586
sd->autogain_ignore_frames = PAC_AUTOGAIN_IGNORE_FRAMES;
drivers/media/usb/gspca/pac7302.c
633
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7302.c
639
sd->brightness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/pac7302.c
641
sd->contrast = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/pac7302.c
644
sd->saturation = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/pac7302.c
646
sd->white_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/pac7302.c
649
sd->red_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/pac7302.c
654
sd->blue_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/pac7302.c
669
sd->hflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/pac7302.c
671
sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/pac7302.c
674
sd->sharpness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/pac7302.c
682
v4l2_ctrl_cluster(2, &sd->brightness);
drivers/media/usb/gspca/pac7302.c
684
v4l2_ctrl_cluster(2, &sd->hflip);
drivers/media/usb/gspca/pac7302.c
691
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7302.c
696
sd->sof_read = 0;
drivers/media/usb/gspca/pac7302.c
697
sd->autogain_ignore_frames = 0;
drivers/media/usb/gspca/pac7302.c
698
atomic_set(&sd->avg_lum, 270 + sd->brightness->val);
drivers/media/usb/gspca/pac7302.c
726
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7302.c
727
int avg_lum = atomic_read(&sd->avg_lum);
drivers/media/usb/gspca/pac7302.c
731
if (sd->autogain_ignore_frames < 0)
drivers/media/usb/gspca/pac7302.c
734
if (sd->autogain_ignore_frames > 0) {
drivers/media/usb/gspca/pac7302.c
735
sd->autogain_ignore_frames--;
drivers/media/usb/gspca/pac7302.c
737
desired_lum = 270 + sd->brightness->val;
drivers/media/usb/gspca/pac7302.c
742
sd->autogain_ignore_frames =
drivers/media/usb/gspca/pac7302.c
776
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7302.c
780
sof = pac_find_sof(gspca_dev, &sd->sof_read, data, len);
drivers/media/usb/gspca/pac7302.c
814
atomic_set(&sd->avg_lum, data[-lum_offset] +
drivers/media/usb/gspca/pac7302.c
935
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/pac7311.c
360
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/pac7311.c
371
sd->autogain_ignore_frames = PAC_AUTOGAIN_IGNORE_FRAMES;
drivers/media/usb/gspca/pac7311.c
388
sethvflip(gspca_dev, sd->hflip->val, 1);
drivers/media/usb/gspca/pac7311.c
403
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7311.c
409
sd->contrast = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/pac7311.c
419
sd->hflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/pac7311.c
434
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7311.c
436
sd->sof_read = 0;
drivers/media/usb/gspca/pac7311.c
440
setcontrast(gspca_dev, v4l2_ctrl_g_ctrl(sd->contrast));
drivers/media/usb/gspca/pac7311.c
443
sethvflip(gspca_dev, v4l2_ctrl_g_ctrl(sd->hflip), 1);
drivers/media/usb/gspca/pac7311.c
464
sd->sof_read = 0;
drivers/media/usb/gspca/pac7311.c
465
sd->autogain_ignore_frames = 0;
drivers/media/usb/gspca/pac7311.c
466
atomic_set(&sd->avg_lum, -1);
drivers/media/usb/gspca/pac7311.c
491
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7311.c
492
int avg_lum = atomic_read(&sd->avg_lum);
drivers/media/usb/gspca/pac7311.c
501
if (sd->autogain_ignore_frames > 0)
drivers/media/usb/gspca/pac7311.c
502
sd->autogain_ignore_frames--;
drivers/media/usb/gspca/pac7311.c
505
sd->autogain_ignore_frames = PAC_AUTOGAIN_IGNORE_FRAMES;
drivers/media/usb/gspca/pac7311.c
560
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/pac7311.c
564
sof = pac_find_sof(gspca_dev, &sd->sof_read, data, len);
drivers/media/usb/gspca/pac7311.c
598
atomic_set(&sd->avg_lum, data[-lum_offset] +
drivers/media/usb/gspca/pac7311.c
601
atomic_set(&sd->avg_lum, -1);
drivers/media/usb/gspca/pac7311.c
671
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/se401.c
179
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/se401.c
188
sd->expo_change_state = EXPO_CHANGED;
drivers/media/usb/gspca/se401.c
210
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/se401.c
256
sd->fmts[i].width = widths[i];
drivers/media/usb/gspca/se401.c
257
sd->fmts[i].height = heights[i];
drivers/media/usb/gspca/se401.c
258
sd->fmts[i].field = V4L2_FIELD_NONE;
drivers/media/usb/gspca/se401.c
259
sd->fmts[i].colorspace = V4L2_COLORSPACE_SRGB;
drivers/media/usb/gspca/se401.c
260
sd->fmts[i].priv = 1;
drivers/media/usb/gspca/se401.c
266
sd->fmts[i].priv = 2;
drivers/media/usb/gspca/se401.c
275
sd->fmts[i].priv = 4;
drivers/media/usb/gspca/se401.c
280
if (sd->fmts[i].priv == 1) {
drivers/media/usb/gspca/se401.c
282
sd->fmts[i].pixelformat = V4L2_PIX_FMT_SBGGR8;
drivers/media/usb/gspca/se401.c
283
sd->fmts[i].bytesperline = widths[i];
drivers/media/usb/gspca/se401.c
284
sd->fmts[i].sizeimage = widths[i] * heights[i];
drivers/media/usb/gspca/se401.c
289
sd->fmts[i].pixelformat = V4L2_PIX_FMT_SE401;
drivers/media/usb/gspca/se401.c
290
sd->fmts[i].bytesperline = 0;
drivers/media/usb/gspca/se401.c
291
sd->fmts[i].sizeimage = widths[i] * heights[i] * 3;
drivers/media/usb/gspca/se401.c
294
sd->fmts[i].priv * sd->fmts[i].priv);
drivers/media/usb/gspca/se401.c
298
cam->cam_mode = sd->fmts;
drivers/media/usb/gspca/se401.c
303
sd->resetlevel = 0x2d; /* Set initial resetlevel */
drivers/media/usb/gspca/se401.c
307
sd->has_brightness = !!gspca_dev->usb_err;
drivers/media/usb/gspca/se401.c
330
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/se401.c
367
se401_set_feature(gspca_dev, HV7131_REG_ARLV, sd->resetlevel);
drivers/media/usb/gspca/se401.c
369
sd->packet_read = 0;
drivers/media/usb/gspca/se401.c
370
sd->pixels_read = 0;
drivers/media/usb/gspca/se401.c
371
sd->restart_stream = 0;
drivers/media/usb/gspca/se401.c
372
sd->resetlevel_frame_count = 0;
drivers/media/usb/gspca/se401.c
373
sd->resetlevel_adjust_dir = 0;
drivers/media/usb/gspca/se401.c
374
sd->expo_change_state = EXPO_NO_CHANGE;
drivers/media/usb/gspca/se401.c
390
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/se401.c
395
if (sd->restart_stream) {
drivers/media/usb/gspca/se401.c
398
sd->restart_stream = 0;
drivers/media/usb/gspca/se401.c
404
sd->resetlevel_frame_count++;
drivers/media/usb/gspca/se401.c
405
if (sd->resetlevel_frame_count < 20)
drivers/media/usb/gspca/se401.c
420
oldreset = sd->resetlevel;
drivers/media/usb/gspca/se401.c
422
while (alrc >= 10 && sd->resetlevel < 63) {
drivers/media/usb/gspca/se401.c
423
sd->resetlevel++;
drivers/media/usb/gspca/se401.c
427
while (ahrc >= 20 && sd->resetlevel > 0) {
drivers/media/usb/gspca/se401.c
428
sd->resetlevel--;
drivers/media/usb/gspca/se401.c
433
if (sd->resetlevel > oldreset)
drivers/media/usb/gspca/se401.c
437
if (sd->resetlevel_adjust_dir &&
drivers/media/usb/gspca/se401.c
438
sd->resetlevel_adjust_dir != adjust_dir)
drivers/media/usb/gspca/se401.c
439
sd->resetlevel = oldreset + (sd->resetlevel - oldreset) / 2;
drivers/media/usb/gspca/se401.c
441
if (sd->resetlevel != oldreset) {
drivers/media/usb/gspca/se401.c
442
sd->resetlevel_adjust_dir = adjust_dir;
drivers/media/usb/gspca/se401.c
443
se401_set_feature(gspca_dev, HV7131_REG_ARLV, sd->resetlevel);
drivers/media/usb/gspca/se401.c
446
sd->resetlevel_frame_count = 0;
drivers/media/usb/gspca/se401.c
451
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/se401.c
453
switch (sd->expo_change_state) {
drivers/media/usb/gspca/se401.c
457
sd->expo_change_state = EXPO_DROP_FRAME;
drivers/media/usb/gspca/se401.c
463
sd->expo_change_state = EXPO_NO_CHANGE;
drivers/media/usb/gspca/se401.c
473
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/se401.c
477
if (sd->restart_stream)
drivers/media/usb/gspca/se401.c
489
if (sd->packet_read < 4) {
drivers/media/usb/gspca/se401.c
490
count = 4 - sd->packet_read;
drivers/media/usb/gspca/se401.c
493
memcpy(&sd->packet[sd->packet_read], &data[i], count);
drivers/media/usb/gspca/se401.c
494
sd->packet_read += count;
drivers/media/usb/gspca/se401.c
496
if (sd->packet_read < 4)
drivers/media/usb/gspca/se401.c
499
bits = sd->packet[3] + (sd->packet[2] << 8);
drivers/media/usb/gspca/se401.c
500
pixels = sd->packet[1] + ((sd->packet[0] & 0x3f) << 8);
drivers/media/usb/gspca/se401.c
501
info = (sd->packet[0] & 0xc0) >> 6;
drivers/media/usb/gspca/se401.c
515
count = plen - sd->packet_read;
drivers/media/usb/gspca/se401.c
518
memcpy(&sd->packet[sd->packet_read], &data[i], count);
drivers/media/usb/gspca/se401.c
519
sd->packet_read += count;
drivers/media/usb/gspca/se401.c
521
if (sd->packet_read < plen)
drivers/media/usb/gspca/se401.c
524
sd->pixels_read += pixels;
drivers/media/usb/gspca/se401.c
525
sd->packet_read = 0;
drivers/media/usb/gspca/se401.c
529
gspca_frame_add(gspca_dev, INTER_PACKET, sd->packet,
drivers/media/usb/gspca/se401.c
533
if (sd->pixels_read != imagesize) {
drivers/media/usb/gspca/se401.c
535
sd->pixels_read, imagesize);
drivers/media/usb/gspca/se401.c
538
sd_complete_frame(gspca_dev, sd->packet, plen);
drivers/media/usb/gspca/se401.c
541
gspca_frame_add(gspca_dev, FIRST_PACKET, sd->packet,
drivers/media/usb/gspca/se401.c
543
sd->pixels_read = pixels;
drivers/media/usb/gspca/se401.c
550
sd->restart_stream = 1;
drivers/media/usb/gspca/se401.c
591
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/se401.c
605
if (sd->button_state != state) {
drivers/media/usb/gspca/se401.c
608
sd->button_state = state;
drivers/media/usb/gspca/se401.c
619
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/se401.c
634
setexposure(gspca_dev, ctrl->val, sd->freq->val);
drivers/media/usb/gspca/se401.c
646
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/se401.c
651
if (sd->has_brightness)
drivers/media/usb/gspca/se401.c
657
sd->exposure = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/se401.c
659
sd->freq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/se401.c
667
v4l2_ctrl_cluster(2, &sd->exposure);
drivers/media/usb/gspca/se401.c
702
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/sn9c2028.c
168
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c2028.c
174
sd->model = id->idProduct;
drivers/media/usb/gspca/sn9c2028.c
176
switch (sd->model) {
drivers/media/usb/gspca/sn9c2028.c
201
switch (sd->model) {
drivers/media/usb/gspca/sn9c2028.c
255
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c2028.c
264
switch (sd->model) {
drivers/media/usb/gspca/sn9c2028.c
279
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/sn9c2028.c
293
set_gain(gspca_dev, sd->gain->val);
drivers/media/usb/gspca/sn9c2028.c
307
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/sn9c2028.c
312
switch (sd->model) {
drivers/media/usb/gspca/sn9c2028.c
314
sd->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c2028.c
316
sd->autogain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c2028.c
610
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c2028.c
714
if (sd->gain)
drivers/media/usb/gspca/sn9c2028.c
715
set_gain(gspca_dev, v4l2_ctrl_g_ctrl(sd->gain));
drivers/media/usb/gspca/sn9c2028.c
804
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c2028.c
807
sd->sof_read = 0;
drivers/media/usb/gspca/sn9c2028.c
809
switch (sd->model) {
drivers/media/usb/gspca/sn9c2028.c
833
sd->avg_lum = -1;
drivers/media/usb/gspca/sn9c2028.c
856
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c2028.c
857
s32 cur_gain = v4l2_ctrl_g_ctrl(sd->gain);
drivers/media/usb/gspca/sn9c2028.c
863
if (cur_gain == sd->gain->maximum)
drivers/media/usb/gspca/sn9c2028.c
866
v4l2_ctrl_s_ctrl(sd->gain, cur_gain);
drivers/media/usb/gspca/sn9c2028.c
869
if (cur_gain == sd->gain->minimum)
drivers/media/usb/gspca/sn9c2028.c
872
v4l2_ctrl_s_ctrl(sd->gain, cur_gain);
drivers/media/usb/gspca/sn9c2028.c
879
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c2028.c
881
if (sd->autogain == NULL || !v4l2_ctrl_g_ctrl(sd->autogain))
drivers/media/usb/gspca/sn9c2028.c
884
do_autogain(gspca_dev, sd->avg_lum);
drivers/media/usb/gspca/sn9c2028.c
947
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/sn9c2028.h
23
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c2028.h
28
if ((m[i] == sn9c2028_sof_marker[sd->sof_read]) ||
drivers/media/usb/gspca/sn9c2028.h
29
(sd->sof_read > 5)) {
drivers/media/usb/gspca/sn9c2028.h
30
sd->sof_read++;
drivers/media/usb/gspca/sn9c2028.h
31
if (sd->sof_read == 11)
drivers/media/usb/gspca/sn9c2028.h
32
sd->avg_lum_l = m[i];
drivers/media/usb/gspca/sn9c2028.h
33
if (sd->sof_read == 12)
drivers/media/usb/gspca/sn9c2028.h
34
sd->avg_lum = (m[i] << 8) + sd->avg_lum_l;
drivers/media/usb/gspca/sn9c2028.h
35
if (sd->sof_read == sizeof(sn9c2028_sof_marker)) {
drivers/media/usb/gspca/sn9c2028.h
39
sd->sof_read = 0;
drivers/media/usb/gspca/sn9c2028.h
43
sd->sof_read = 0;
drivers/media/usb/gspca/sn9c20x.c
1012
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1019
row[0] = sd->i2c_intf | (3 << 4);
drivers/media/usb/gspca/sn9c20x.c
1020
row[1] = sd->i2c_addr;
drivers/media/usb/gspca/sn9c20x.c
1042
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1045
row[0] = sd->i2c_intf | (1 << 4);
drivers/media/usb/gspca/sn9c20x.c
1046
row[1] = sd->i2c_addr;
drivers/media/usb/gspca/sn9c20x.c
1054
row[0] = sd->i2c_intf | (1 << 4) | 0x02;
drivers/media/usb/gspca/sn9c20x.c
1063
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1066
row[0] = sd->i2c_intf | (1 << 4);
drivers/media/usb/gspca/sn9c20x.c
1067
row[1] = sd->i2c_addr;
drivers/media/usb/gspca/sn9c20x.c
1075
row[0] = sd->i2c_intf | (2 << 4) | 0x02;
drivers/media/usb/gspca/sn9c20x.c
1085
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1102
sd->hstart = 1;
drivers/media/usb/gspca/sn9c20x.c
1103
sd->vstart = 7;
drivers/media/usb/gspca/sn9c20x.c
1108
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1116
sd->hstart = 1;
drivers/media/usb/gspca/sn9c20x.c
1117
sd->vstart = 2;
drivers/media/usb/gspca/sn9c20x.c
1122
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1130
sd->hstart = 60;
drivers/media/usb/gspca/sn9c20x.c
1131
sd->vstart = 11;
drivers/media/usb/gspca/sn9c20x.c
1136
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1143
sd->hstart = 3;
drivers/media/usb/gspca/sn9c20x.c
1144
sd->vstart = 3;
drivers/media/usb/gspca/sn9c20x.c
1149
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1157
sd->hstart = 0;
drivers/media/usb/gspca/sn9c20x.c
1158
sd->vstart = 1;
drivers/media/usb/gspca/sn9c20x.c
1163
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1166
sd->i2c_addr = 0x5d;
drivers/media/usb/gspca/sn9c20x.c
1175
sd->hstart = 2;
drivers/media/usb/gspca/sn9c20x.c
1176
sd->vstart = 2;
drivers/media/usb/gspca/sn9c20x.c
1177
sd->sensor = SENSOR_MT9V011;
drivers/media/usb/gspca/sn9c20x.c
1183
sd->i2c_addr = 0x5c;
drivers/media/usb/gspca/sn9c20x.c
1193
sd->hstart = 2;
drivers/media/usb/gspca/sn9c20x.c
1194
sd->vstart = 2;
drivers/media/usb/gspca/sn9c20x.c
1195
sd->sensor = SENSOR_MT9V111;
drivers/media/usb/gspca/sn9c20x.c
1201
sd->i2c_addr = 0x5d;
drivers/media/usb/gspca/sn9c20x.c
1205
sd->i2c_addr = 0x48;
drivers/media/usb/gspca/sn9c20x.c
1216
sd->hstart = 6;
drivers/media/usb/gspca/sn9c20x.c
1217
sd->vstart = 2;
drivers/media/usb/gspca/sn9c20x.c
1218
sd->sensor = SENSOR_MT9V112;
drivers/media/usb/gspca/sn9c20x.c
1228
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1234
sd->hstart = 0;
drivers/media/usb/gspca/sn9c20x.c
1235
sd->vstart = 2;
drivers/media/usb/gspca/sn9c20x.c
1240
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1246
sd->hstart = 0;
drivers/media/usb/gspca/sn9c20x.c
1247
sd->vstart = 2;
drivers/media/usb/gspca/sn9c20x.c
1252
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1278
sd->hstart = 1;
drivers/media/usb/gspca/sn9c20x.c
1279
sd->vstart = 1;
drivers/media/usb/gspca/sn9c20x.c
1284
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1290
sd->hstart = 0;
drivers/media/usb/gspca/sn9c20x.c
1291
sd->vstart = 1;
drivers/media/usb/gspca/sn9c20x.c
1369
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1371
if ((sd->flags & FLIP_DETECT) && dmi_check_system(flip_dmi_table)) {
drivers/media/usb/gspca/sn9c20x.c
1376
switch (sd->sensor) {
drivers/media/usb/gspca/sn9c20x.c
1383
sd->vstart = 2;
drivers/media/usb/gspca/sn9c20x.c
1385
sd->vstart = 3;
drivers/media/usb/gspca/sn9c20x.c
1387
reg_w1(gspca_dev, 0x1182, sd->vstart);
drivers/media/usb/gspca/sn9c20x.c
1438
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1439
u8 exp[8] = {sd->i2c_intf, sd->i2c_addr,
drivers/media/usb/gspca/sn9c20x.c
1446
switch (sd->sensor) {
drivers/media/usb/gspca/sn9c20x.c
1494
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1495
u8 gain[8] = {sd->i2c_intf, sd->i2c_addr,
drivers/media/usb/gspca/sn9c20x.c
1501
switch (sd->sensor) {
drivers/media/usb/gspca/sn9c20x.c
1547
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1549
jpeg_set_qual(sd->jpeg_hdr, val);
drivers/media/usb/gspca/sn9c20x.c
1551
reg_w1(gspca_dev, 0x10e0, sd->fmt | 0x20); /* write QTAB */
drivers/media/usb/gspca/sn9c20x.c
1552
reg_w(gspca_dev, 0x1100, &sd->jpeg_hdr[JPEG_QT0_OFFSET], 64);
drivers/media/usb/gspca/sn9c20x.c
1553
reg_w(gspca_dev, 0x1140, &sd->jpeg_hdr[JPEG_QT1_OFFSET], 64);
drivers/media/usb/gspca/sn9c20x.c
1555
reg_w1(gspca_dev, 0x10e0, sd->fmt);
drivers/media/usb/gspca/sn9c20x.c
1556
sd->fmt ^= 0x0c; /* invert QTAB use + write */
drivers/media/usb/gspca/sn9c20x.c
1557
reg_w1(gspca_dev, 0x10e0, sd->fmt);
drivers/media/usb/gspca/sn9c20x.c
1564
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1575
if (sd->sensor >= SENSOR_MT9V011 &&
drivers/media/usb/gspca/sn9c20x.c
1576
sd->sensor <= SENSOR_MT9M112) {
drivers/media/usb/gspca/sn9c20x.c
1590
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1599
if (sd->sensor >= SENSOR_MT9V011 &&
drivers/media/usb/gspca/sn9c20x.c
1600
sd->sensor <= SENSOR_MT9M112) {
drivers/media/usb/gspca/sn9c20x.c
1624
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1630
sd->sensor = id->driver_info >> 8;
drivers/media/usb/gspca/sn9c20x.c
1631
sd->i2c_addr = id->driver_info;
drivers/media/usb/gspca/sn9c20x.c
1632
sd->flags = id->driver_info >> 16;
drivers/media/usb/gspca/sn9c20x.c
1633
sd->i2c_intf = 0x80; /* i2c 100 Kb/s */
drivers/media/usb/gspca/sn9c20x.c
1635
switch (sd->sensor) {
drivers/media/usb/gspca/sn9c20x.c
1648
sd->i2c_intf = 0x81; /* i2c 400 Kb/s */
drivers/media/usb/gspca/sn9c20x.c
1656
sd->old_step = 0;
drivers/media/usb/gspca/sn9c20x.c
1657
sd->older_step = 0;
drivers/media/usb/gspca/sn9c20x.c
1658
sd->exposure_step = 16;
drivers/media/usb/gspca/sn9c20x.c
1660
INIT_WORK(&sd->work, qual_upd);
drivers/media/usb/gspca/sn9c20x.c
1669
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1679
set_cmatrix(gspca_dev, sd->brightness->val,
drivers/media/usb/gspca/sn9c20x.c
1680
sd->contrast->val, sd->saturation->val, sd->hue->val);
drivers/media/usb/gspca/sn9c20x.c
1687
set_redblue(gspca_dev, sd->blue->val, sd->red->val);
drivers/media/usb/gspca/sn9c20x.c
1691
set_hvflip(gspca_dev, sd->hflip->val, sd->vflip->val);
drivers/media/usb/gspca/sn9c20x.c
1703
if (sd->sensor == SENSOR_SOI968)
drivers/media/usb/gspca/sn9c20x.c
1704
set_gain(gspca_dev, sd->gain->val);
drivers/media/usb/gspca/sn9c20x.c
1706
set_exposure(gspca_dev, sd->exposure->val);
drivers/media/usb/gspca/sn9c20x.c
1724
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1730
sd->brightness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c20x.c
1732
sd->contrast = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c20x.c
1734
sd->saturation = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c20x.c
1736
sd->hue = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c20x.c
1739
sd->gamma = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c20x.c
1742
sd->blue = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c20x.c
1744
sd->red = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c20x.c
1747
if (sd->sensor != SENSOR_OV9655 && sd->sensor != SENSOR_SOI968 &&
drivers/media/usb/gspca/sn9c20x.c
1748
sd->sensor != SENSOR_OV7670 && sd->sensor != SENSOR_MT9M001 &&
drivers/media/usb/gspca/sn9c20x.c
1749
sd->sensor != SENSOR_MT9VPRB) {
drivers/media/usb/gspca/sn9c20x.c
1750
sd->hflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c20x.c
1752
sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c20x.c
1756
if (sd->sensor != SENSOR_SOI968 && sd->sensor != SENSOR_MT9VPRB &&
drivers/media/usb/gspca/sn9c20x.c
1757
sd->sensor != SENSOR_MT9M112 && sd->sensor != SENSOR_MT9M111 &&
drivers/media/usb/gspca/sn9c20x.c
1758
sd->sensor != SENSOR_MT9V111)
drivers/media/usb/gspca/sn9c20x.c
1759
sd->exposure = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c20x.c
1762
if (sd->sensor != SENSOR_MT9VPRB && sd->sensor != SENSOR_MT9M112 &&
drivers/media/usb/gspca/sn9c20x.c
1763
sd->sensor != SENSOR_MT9M111 && sd->sensor != SENSOR_MT9V111) {
drivers/media/usb/gspca/sn9c20x.c
1764
sd->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c20x.c
1766
sd->autogain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c20x.c
1770
sd->jpegqual = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c20x.c
1773
if (sd->flags & HAS_LED_TORCH)
drivers/media/usb/gspca/sn9c20x.c
1774
sd->led_mode = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sn9c20x.c
1783
v4l2_ctrl_cluster(4, &sd->brightness);
drivers/media/usb/gspca/sn9c20x.c
1784
v4l2_ctrl_cluster(2, &sd->blue);
drivers/media/usb/gspca/sn9c20x.c
1785
if (sd->hflip)
drivers/media/usb/gspca/sn9c20x.c
1786
v4l2_ctrl_cluster(2, &sd->hflip);
drivers/media/usb/gspca/sn9c20x.c
1787
if (sd->autogain) {
drivers/media/usb/gspca/sn9c20x.c
1788
if (sd->sensor == SENSOR_SOI968)
drivers/media/usb/gspca/sn9c20x.c
1792
v4l2_ctrl_auto_cluster(3, &sd->autogain, 0, false);
drivers/media/usb/gspca/sn9c20x.c
1795
v4l2_ctrl_auto_cluster(2, &sd->autogain, 0, false);
drivers/media/usb/gspca/sn9c20x.c
1802
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1806
0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03
drivers/media/usb/gspca/sn9c20x.c
1818
if (sd->flags & LED_REVERSE)
drivers/media/usb/gspca/sn9c20x.c
1829
switch (sd->sensor) {
drivers/media/usb/gspca/sn9c20x.c
1898
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
1901
switch (sd->sensor) {
drivers/media/usb/gspca/sn9c20x.c
1909
sd->hstart = 140;
drivers/media/usb/gspca/sn9c20x.c
1910
sd->vstart = 19;
drivers/media/usb/gspca/sn9c20x.c
1917
sd->hstart = 60;
drivers/media/usb/gspca/sn9c20x.c
1918
sd->vstart = 11;
drivers/media/usb/gspca/sn9c20x.c
2001
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
2007
jpeg_define(sd->jpeg_hdr, height, width,
drivers/media/usb/gspca/sn9c20x.c
2009
jpeg_set_qual(sd->jpeg_hdr, v4l2_ctrl_g_ctrl(sd->jpegqual));
drivers/media/usb/gspca/sn9c20x.c
2017
sd->fmt = fmt;
drivers/media/usb/gspca/sn9c20x.c
2039
reg_w(gspca_dev, 0x1100, &sd->jpeg_hdr[JPEG_QT0_OFFSET], 64);
drivers/media/usb/gspca/sn9c20x.c
2040
reg_w(gspca_dev, 0x1140, &sd->jpeg_hdr[JPEG_QT1_OFFSET], 64);
drivers/media/usb/gspca/sn9c20x.c
2042
reg_w(gspca_dev, 0x1180, HW_WIN(mode, sd->hstart, sd->vstart), 6);
drivers/media/usb/gspca/sn9c20x.c
2046
set_cmatrix(gspca_dev, v4l2_ctrl_g_ctrl(sd->brightness),
drivers/media/usb/gspca/sn9c20x.c
2047
v4l2_ctrl_g_ctrl(sd->contrast),
drivers/media/usb/gspca/sn9c20x.c
2048
v4l2_ctrl_g_ctrl(sd->saturation),
drivers/media/usb/gspca/sn9c20x.c
2049
v4l2_ctrl_g_ctrl(sd->hue));
drivers/media/usb/gspca/sn9c20x.c
2050
set_gamma(gspca_dev, v4l2_ctrl_g_ctrl(sd->gamma));
drivers/media/usb/gspca/sn9c20x.c
2051
set_redblue(gspca_dev, v4l2_ctrl_g_ctrl(sd->blue),
drivers/media/usb/gspca/sn9c20x.c
2052
v4l2_ctrl_g_ctrl(sd->red));
drivers/media/usb/gspca/sn9c20x.c
2053
if (sd->gain)
drivers/media/usb/gspca/sn9c20x.c
2054
set_gain(gspca_dev, v4l2_ctrl_g_ctrl(sd->gain));
drivers/media/usb/gspca/sn9c20x.c
2055
if (sd->exposure)
drivers/media/usb/gspca/sn9c20x.c
2056
set_exposure(gspca_dev, v4l2_ctrl_g_ctrl(sd->exposure));
drivers/media/usb/gspca/sn9c20x.c
2057
if (sd->hflip)
drivers/media/usb/gspca/sn9c20x.c
2058
set_hvflip(gspca_dev, v4l2_ctrl_g_ctrl(sd->hflip),
drivers/media/usb/gspca/sn9c20x.c
2059
v4l2_ctrl_g_ctrl(sd->vflip));
drivers/media/usb/gspca/sn9c20x.c
2066
sd->pktsz = sd->npkt = 0;
drivers/media/usb/gspca/sn9c20x.c
2067
sd->nchg = 0;
drivers/media/usb/gspca/sn9c20x.c
2069
if (sd->led_mode)
drivers/media/usb/gspca/sn9c20x.c
2070
v4l2_ctrl_s_ctrl(sd->led_mode, 0);
drivers/media/usb/gspca/sn9c20x.c
2085
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
2088
flush_work(&sd->work);
drivers/media/usb/gspca/sn9c20x.c
2094
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
2095
s32 cur_exp = v4l2_ctrl_g_ctrl(sd->exposure);
drivers/media/usb/gspca/sn9c20x.c
2096
s32 max = sd->exposure->maximum - sd->exposure_step;
drivers/media/usb/gspca/sn9c20x.c
2097
s32 min = sd->exposure->minimum + sd->exposure_step;
drivers/media/usb/gspca/sn9c20x.c
2109
new_exp = cur_exp + sd->exposure_step;
drivers/media/usb/gspca/sn9c20x.c
2114
v4l2_ctrl_s_ctrl(sd->exposure, new_exp);
drivers/media/usb/gspca/sn9c20x.c
2116
sd->older_step = sd->old_step;
drivers/media/usb/gspca/sn9c20x.c
2117
sd->old_step = 1;
drivers/media/usb/gspca/sn9c20x.c
2119
if (sd->old_step ^ sd->older_step)
drivers/media/usb/gspca/sn9c20x.c
2120
sd->exposure_step /= 2;
drivers/media/usb/gspca/sn9c20x.c
2122
sd->exposure_step += 2;
drivers/media/usb/gspca/sn9c20x.c
2127
new_exp = cur_exp - sd->exposure_step;
drivers/media/usb/gspca/sn9c20x.c
2132
v4l2_ctrl_s_ctrl(sd->exposure, new_exp);
drivers/media/usb/gspca/sn9c20x.c
2133
sd->older_step = sd->old_step;
drivers/media/usb/gspca/sn9c20x.c
2134
sd->old_step = 0;
drivers/media/usb/gspca/sn9c20x.c
2136
if (sd->old_step ^ sd->older_step)
drivers/media/usb/gspca/sn9c20x.c
2137
sd->exposure_step /= 2;
drivers/media/usb/gspca/sn9c20x.c
2139
sd->exposure_step += 2;
drivers/media/usb/gspca/sn9c20x.c
2145
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
2146
s32 cur_gain = v4l2_ctrl_g_ctrl(sd->gain);
drivers/media/usb/gspca/sn9c20x.c
2148
if (avg_lum < MIN_AVG_LUM && cur_gain < sd->gain->maximum)
drivers/media/usb/gspca/sn9c20x.c
2149
v4l2_ctrl_s_ctrl(sd->gain, cur_gain + 1);
drivers/media/usb/gspca/sn9c20x.c
2150
if (avg_lum > MAX_AVG_LUM && cur_gain > sd->gain->minimum)
drivers/media/usb/gspca/sn9c20x.c
2151
v4l2_ctrl_s_ctrl(sd->gain, cur_gain - 1);
drivers/media/usb/gspca/sn9c20x.c
2156
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
2159
if (sd->autogain == NULL || !v4l2_ctrl_g_ctrl(sd->autogain))
drivers/media/usb/gspca/sn9c20x.c
2162
avg_lum = atomic_read(&sd->avg_lum);
drivers/media/usb/gspca/sn9c20x.c
2163
if (sd->sensor == SENSOR_SOI968)
drivers/media/usb/gspca/sn9c20x.c
2173
struct sd *sd = container_of(work, struct sd, work);
drivers/media/usb/gspca/sn9c20x.c
2174
struct gspca_dev *gspca_dev = &sd->gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
2175
s32 qual = v4l2_ctrl_g_ctrl(sd->jpegqual);
drivers/media/usb/gspca/sn9c20x.c
2190
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
2192
if (!(sd->flags & HAS_NO_BUTTON) && len == 1) {
drivers/media/usb/gspca/sn9c20x.c
2207
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
2219
r = (sd->pktsz * 100) /
drivers/media/usb/gspca/sn9c20x.c
2220
(sd->npkt *
drivers/media/usb/gspca/sn9c20x.c
2228
sd->nchg += new_qual;
drivers/media/usb/gspca/sn9c20x.c
2229
if (sd->nchg < -6 || sd->nchg >= 12) {
drivers/media/usb/gspca/sn9c20x.c
2233
s32 curqual = sd->jpegqual->cur.val;
drivers/media/usb/gspca/sn9c20x.c
2234
sd->nchg = 0;
drivers/media/usb/gspca/sn9c20x.c
2236
if (new_qual < sd->jpegqual->minimum)
drivers/media/usb/gspca/sn9c20x.c
2237
new_qual = sd->jpegqual->minimum;
drivers/media/usb/gspca/sn9c20x.c
2238
else if (new_qual > sd->jpegqual->maximum)
drivers/media/usb/gspca/sn9c20x.c
2239
new_qual = sd->jpegqual->maximum;
drivers/media/usb/gspca/sn9c20x.c
2241
sd->jpegqual->cur.val = new_qual;
drivers/media/usb/gspca/sn9c20x.c
2242
schedule_work(&sd->work);
drivers/media/usb/gspca/sn9c20x.c
2246
sd->nchg = 0;
drivers/media/usb/gspca/sn9c20x.c
2248
sd->pktsz = sd->npkt = 0;
drivers/media/usb/gspca/sn9c20x.c
2255
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
2261
is_jpeg = (sd->fmt & 0x03) == 0;
drivers/media/usb/gspca/sn9c20x.c
2288
atomic_set(&sd->avg_lum, avg_lum);
drivers/media/usb/gspca/sn9c20x.c
2302
sd->jpeg_hdr, JPEG_HDR_SZ);
drivers/media/usb/gspca/sn9c20x.c
2312
sd->npkt++;
drivers/media/usb/gspca/sn9c20x.c
2313
sd->pktsz += len;
drivers/media/usb/gspca/sn9c20x.c
2393
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/sn9c20x.c
982
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sn9c20x.c
989
row[0] = sd->i2c_intf | (2 << 4);
drivers/media/usb/gspca/sn9c20x.c
990
row[1] = sd->i2c_addr;
drivers/media/usb/gspca/sonixb.c
1000
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixb.c
1006
if (sd->sensor == SENSOR_OV6650 || sd->sensor == SENSOR_OV7630 ||
drivers/media/usb/gspca/sonixb.c
1007
sd->sensor == SENSOR_PAS106 || sd->sensor == SENSOR_PAS202)
drivers/media/usb/gspca/sonixb.c
1008
sd->brightness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sonixb.c
1012
switch (sd->sensor) {
drivers/media/usb/gspca/sonixb.c
1034
if (sd->bridge == BRIDGE_103) {
drivers/media/usb/gspca/sonixb.c
1044
switch (sd->sensor) {
drivers/media/usb/gspca/sonixb.c
1048
sd->exposure_knee = 964;
drivers/media/usb/gspca/sonixb.c
1056
sd->exposure_knee = 200;
drivers/media/usb/gspca/sonixb.c
1070
if (sd->sensor == SENSOR_OV6650 || sd->sensor == SENSOR_OV7630)
drivers/media/usb/gspca/sonixb.c
1071
sd->plfreq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sonixb.c
1090
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixb.c
1097
memcpy(&regs[0x01], sensor_data[sd->sensor].bridge_init, 0x19);
drivers/media/usb/gspca/sonixb.c
1102
if (sd->bridge == BRIDGE_103) {
drivers/media/usb/gspca/sonixb.c
1112
if (sensor_data[sd->sensor].flags & F_SIF) {
drivers/media/usb/gspca/sonixb.c
1134
switch (sd->sensor) {
drivers/media/usb/gspca/sonixb.c
1147
if (sd->bridge == BRIDGE_103) {
drivers/media/usb/gspca/sonixb.c
1155
if (sd->bridge == BRIDGE_103)
drivers/media/usb/gspca/sonixb.c
1177
(sd->bridge == BRIDGE_103) ? 0x30 : 0x1f);
drivers/media/usb/gspca/sonixb.c
1180
i2c_w_vector(gspca_dev, sensor_data[sd->sensor].sensor_init,
drivers/media/usb/gspca/sonixb.c
1181
sensor_data[sd->sensor].sensor_init_size);
drivers/media/usb/gspca/sonixb.c
1184
switch (sd->sensor) {
drivers/media/usb/gspca/sonixb.c
1196
if (sd->bridge == BRIDGE_103) {
drivers/media/usb/gspca/sonixb.c
1224
sd->reg11 = -1;
drivers/media/usb/gspca/sonixb.c
1231
sd->frames_to_drop = 0;
drivers/media/usb/gspca/sonixb.c
1232
sd->autogain_ignore_frames = 0;
drivers/media/usb/gspca/sonixb.c
1235
atomic_set(&sd->avg_lum, -1);
drivers/media/usb/gspca/sonixb.c
1246
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixb.c
1247
int i, header_size = (sd->bridge == BRIDGE_103) ? 18 : 12;
drivers/media/usb/gspca/sonixb.c
1259
switch (sd->header_read) {
drivers/media/usb/gspca/sonixb.c
1262
sd->header_read++;
drivers/media/usb/gspca/sonixb.c
1266
sd->header_read++;
drivers/media/usb/gspca/sonixb.c
1268
sd->header_read = 0;
drivers/media/usb/gspca/sonixb.c
1272
sd->header_read++;
drivers/media/usb/gspca/sonixb.c
1274
sd->header_read = 0;
drivers/media/usb/gspca/sonixb.c
1278
sd->header_read++;
drivers/media/usb/gspca/sonixb.c
1280
sd->header_read = 1;
drivers/media/usb/gspca/sonixb.c
1282
sd->header_read = 0;
drivers/media/usb/gspca/sonixb.c
1286
sd->header_read++;
drivers/media/usb/gspca/sonixb.c
1288
sd->header_read = 1;
drivers/media/usb/gspca/sonixb.c
1290
sd->header_read = 0;
drivers/media/usb/gspca/sonixb.c
1294
sd->header_read++;
drivers/media/usb/gspca/sonixb.c
1296
sd->header_read = 1;
drivers/media/usb/gspca/sonixb.c
1298
sd->header_read = 0;
drivers/media/usb/gspca/sonixb.c
1301
sd->header[sd->header_read - 6] = data[i];
drivers/media/usb/gspca/sonixb.c
1302
sd->header_read++;
drivers/media/usb/gspca/sonixb.c
1303
if (sd->header_read == header_size) {
drivers/media/usb/gspca/sonixb.c
1304
sd->header_read = 0;
drivers/media/usb/gspca/sonixb.c
1317
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixb.c
1323
if (sd->bridge == BRIDGE_103) {
drivers/media/usb/gspca/sonixb.c
1351
int lum = sd->header[lum_offset] +
drivers/media/usb/gspca/sonixb.c
1352
(sd->header[lum_offset + 1] << 8);
drivers/media/usb/gspca/sonixb.c
1361
if (lum == 0 && sd->prev_avg_lum != 0) {
drivers/media/usb/gspca/sonixb.c
1363
sd->frames_to_drop = 2;
drivers/media/usb/gspca/sonixb.c
1364
sd->prev_avg_lum = 0;
drivers/media/usb/gspca/sonixb.c
1366
sd->prev_avg_lum = lum;
drivers/media/usb/gspca/sonixb.c
1367
atomic_set(&sd->avg_lum, lum);
drivers/media/usb/gspca/sonixb.c
1369
if (sd->frames_to_drop)
drivers/media/usb/gspca/sonixb.c
1370
sd->frames_to_drop--;
drivers/media/usb/gspca/sonixb.c
1453
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/sonixb.c
535
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixb.c
537
switch (sd->sensor) {
drivers/media/usb/gspca/sonixb.c
544
i2cOV[1] = sensor_data[sd->sensor].sensor_addr;
drivers/media/usb/gspca/sonixb.c
545
i2cOV[3] = sd->brightness->val;
drivers/media/usb/gspca/sonixb.c
557
if (sd->sensor == SENSOR_PAS106) {
drivers/media/usb/gspca/sonixb.c
562
if (sd->brightness->val < 127) {
drivers/media/usb/gspca/sonixb.c
566
i2cpbright[4] = 127 - sd->brightness->val;
drivers/media/usb/gspca/sonixb.c
568
i2cpbright[4] = sd->brightness->val - 127;
drivers/media/usb/gspca/sonixb.c
581
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixb.c
584
switch (sd->sensor) {
drivers/media/usb/gspca/sonixb.c
629
if (sd->sensor == SENSOR_OV7630 && gain >= 32)
drivers/media/usb/gspca/sonixb.c
632
i2c[1] = sensor_data[sd->sensor].sensor_addr;
drivers/media/usb/gspca/sonixb.c
647
if (sd->sensor == SENSOR_PAS106) {
drivers/media/usb/gspca/sonixb.c
666
if (sd->bridge == BRIDGE_103) {
drivers/media/usb/gspca/sonixb.c
680
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixb.c
682
switch (sd->sensor) {
drivers/media/usb/gspca/sonixb.c
730
if (sd->sensor == SENSOR_OV6650) {
drivers/media/usb/gspca/sonixb.c
764
i2c[1] = sensor_data[sd->sensor].sensor_addr;
drivers/media/usb/gspca/sonixb.c
769
if (sd->reg11 == reg11)
drivers/media/usb/gspca/sonixb.c
774
sd->reg11 = reg11;
drivers/media/usb/gspca/sonixb.c
851
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixb.c
853
if (sd->sensor == SENSOR_OV6650 || sd->sensor == SENSOR_OV7630) {
drivers/media/usb/gspca/sonixb.c
859
switch (sd->plfreq->val) {
drivers/media/usb/gspca/sonixb.c
866
i2c[3] = (sd->sensor == SENSOR_OV6650)
drivers/media/usb/gspca/sonixb.c
870
i2c[1] = sensor_data[sd->sensor].sensor_addr;
drivers/media/usb/gspca/sonixb.c
877
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixb.c
880
avg_lum = atomic_read(&sd->avg_lum);
drivers/media/usb/gspca/sonixb.c
884
if (sd->autogain_ignore_frames > 0) {
drivers/media/usb/gspca/sonixb.c
885
sd->autogain_ignore_frames--;
drivers/media/usb/gspca/sonixb.c
891
if (sensor_data[sd->sensor].flags & F_SIF) {
drivers/media/usb/gspca/sonixb.c
900
if (sd->brightness)
drivers/media/usb/gspca/sonixb.c
901
desired_avg_lum = sd->brightness->val * desired_avg_lum / 127;
drivers/media/usb/gspca/sonixb.c
906
sd->autogain_ignore_frames = AUTOGAIN_IGNORE_FRAMES;
drivers/media/usb/gspca/sonixb.c
910
deadzone, gain_knee, sd->exposure_knee))
drivers/media/usb/gspca/sonixb.c
911
sd->autogain_ignore_frames = AUTOGAIN_IGNORE_FRAMES;
drivers/media/usb/gspca/sonixb.c
919
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixb.c
927
sd->sensor = id->driver_info >> 8;
drivers/media/usb/gspca/sonixb.c
928
sd->bridge = id->driver_info & 0xff;
drivers/media/usb/gspca/sonixb.c
931
if (!(sensor_data[sd->sensor].flags & F_SIF)) {
drivers/media/usb/gspca/sonixb.c
957
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/sonixb.c
968
sd->autogain_ignore_frames = AUTOGAIN_IGNORE_FRAMES;
drivers/media/usb/gspca/sonixj.c
1230
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1236
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
1246
gspca_dev->usb_buf[1] = sd->i2c_addr;
drivers/media/usb/gspca/sonixj.c
1296
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1299
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
1309
mode[1] = sd->i2c_addr;
drivers/media/usb/gspca/sonixj.c
1359
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1397
sd->sensor = SENSOR_MI0360B;
drivers/media/usb/gspca/sonixj.c
1401
sd->sensor = SENSOR_MT9V111;
drivers/media/usb/gspca/sonixj.c
1415
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1421
sd->i2c_addr = 0x21;
drivers/media/usb/gspca/sonixj.c
1429
sd->sensor = SENSOR_SOI768;
drivers/media/usb/gspca/sonixj.c
1441
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1447
sd->i2c_addr = 0x21;
drivers/media/usb/gspca/sonixj.c
1460
sd->i2c_addr = 0x6e;
drivers/media/usb/gspca/sonixj.c
1469
sd->sensor = SENSOR_PO1030;
drivers/media/usb/gspca/sonixj.c
1478
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1485
sd->i2c_addr = 0x21;
drivers/media/usb/gspca/sonixj.c
1492
sd->sensor = SENSOR_GC0307;
drivers/media/usb/gspca/sonixj.c
1499
sd->i2c_addr = 0x6e;
drivers/media/usb/gspca/sonixj.c
1518
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1521
sd->bridge = id->driver_info >> 16;
drivers/media/usb/gspca/sonixj.c
1522
sd->sensor = id->driver_info >> 8;
drivers/media/usb/gspca/sonixj.c
1523
sd->flags = id->driver_info;
drivers/media/usb/gspca/sonixj.c
1526
if (sd->sensor == SENSOR_ADCM1700) {
drivers/media/usb/gspca/sonixj.c
1535
sd->ag_cnt = -1;
drivers/media/usb/gspca/sonixj.c
1536
sd->quality = QUALITY_DEF;
drivers/media/usb/gspca/sonixj.c
1538
INIT_WORK(&sd->work, qual_upd);
drivers/media/usb/gspca/sonixj.c
1546
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1562
switch (sd->bridge) {
drivers/media/usb/gspca/sonixj.c
1575
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
1590
switch (sd->bridge) {
drivers/media/usb/gspca/sonixj.c
1604
sn9c1xx = sn_tb[sd->sensor];
drivers/media/usb/gspca/sonixj.c
1605
sd->i2c_addr = sn9c1xx[9];
drivers/media/usb/gspca/sonixj.c
1619
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1625
sd->brightness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sonixj.c
1628
sd->contrast = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sonixj.c
1631
sd->saturation = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sonixj.c
1633
sd->red_bal = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sonixj.c
1635
sd->blue_bal = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sonixj.c
1638
sd->gamma = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sonixj.c
1641
if (sd->sensor == SENSOR_OM6802)
drivers/media/usb/gspca/sonixj.c
1642
sd->sharpness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sonixj.c
1645
sd->sharpness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sonixj.c
1648
if (sd->flags & F_ILLUM)
drivers/media/usb/gspca/sonixj.c
1649
sd->illum = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sonixj.c
1652
if (sd->sensor == SENSOR_PO2030N) {
drivers/media/usb/gspca/sonixj.c
1657
sd->hflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sonixj.c
1661
if (sd->sensor != SENSOR_ADCM1700 && sd->sensor != SENSOR_OV7660 &&
drivers/media/usb/gspca/sonixj.c
1662
sd->sensor != SENSOR_PO1030 && sd->sensor != SENSOR_SOI768 &&
drivers/media/usb/gspca/sonixj.c
1663
sd->sensor != SENSOR_SP80708)
drivers/media/usb/gspca/sonixj.c
1667
if (sd->sensor == SENSOR_HV7131R || sd->sensor == SENSOR_OV7630 ||
drivers/media/usb/gspca/sonixj.c
1668
sd->sensor == SENSOR_OV7648 || sd->sensor == SENSOR_PO2030N)
drivers/media/usb/gspca/sonixj.c
1669
sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sonixj.c
1672
if (sd->sensor == SENSOR_OV7630 || sd->sensor == SENSOR_OV7648 ||
drivers/media/usb/gspca/sonixj.c
1673
sd->sensor == SENSOR_OV7660)
drivers/media/usb/gspca/sonixj.c
1674
sd->freq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sonixj.c
1684
v4l2_ctrl_cluster(2, &sd->red_bal);
drivers/media/usb/gspca/sonixj.c
1685
if (sd->sensor == SENSOR_PO2030N) {
drivers/media/usb/gspca/sonixj.c
1686
v4l2_ctrl_cluster(2, &sd->vflip);
drivers/media/usb/gspca/sonixj.c
1696
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1698
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
1799
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1801
int brightness = sd->brightness->val;
drivers/media/usb/gspca/sonixj.c
1805
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
1816
sd->exposure = expo_adjust(gspca_dev, expo);
drivers/media/usb/gspca/sonixj.c
1821
sd->exposure = expo_adjust(gspca_dev, expo);
drivers/media/usb/gspca/sonixj.c
1825
sd->exposure = expo_adjust(gspca_dev, expo);
drivers/media/usb/gspca/sonixj.c
1829
sd->exposure = expo_adjust(gspca_dev, expo);
drivers/media/usb/gspca/sonixj.c
1833
sd->exposure = expo_adjust(gspca_dev, expo);
drivers/media/usb/gspca/sonixj.c
1837
sd->exposure = expo_adjust(gspca_dev, expo);
drivers/media/usb/gspca/sonixj.c
1846
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1850
k2 = sd->contrast->val * 37 / (CONTRAST_MAX + 1)
drivers/media/usb/gspca/sonixj.c
1863
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1876
colors = sd->saturation->val;
drivers/media/usb/gspca/sonixj.c
1877
if (sd->sensor == SENSOR_MI0360B)
drivers/media/usb/gspca/sonixj.c
1891
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1893
if (sd->sensor == SENSOR_PO2030N) {
drivers/media/usb/gspca/sonixj.c
1898
rg1b[3] = sd->red_bal->val * 2;
drivers/media/usb/gspca/sonixj.c
1899
rg1b[5] = sd->blue_bal->val * 2;
drivers/media/usb/gspca/sonixj.c
1903
reg_w1(gspca_dev, 0x05, sd->red_bal->val);
drivers/media/usb/gspca/sonixj.c
1905
reg_w1(gspca_dev, 0x06, sd->blue_bal->val);
drivers/media/usb/gspca/sonixj.c
1910
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1919
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
1939
val = sd->gamma->val;
drivers/media/usb/gspca/sonixj.c
1948
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1950
if (sd->sensor == SENSOR_PO2030N) {
drivers/media/usb/gspca/sonixj.c
1965
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1967
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
1972
if (sd->sensor == SENSOR_OV7630)
drivers/media/usb/gspca/sonixj.c
1978
i2c_w1(&sd->gspca_dev, 0x13, comb);
drivers/media/usb/gspca/sonixj.c
1983
sd->ag_cnt = AG_CNT_START;
drivers/media/usb/gspca/sonixj.c
1985
sd->ag_cnt = -1;
drivers/media/usb/gspca/sonixj.c
1990
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
1992
if (sd->sensor == SENSOR_PO2030N) {
drivers/media/usb/gspca/sonixj.c
2003
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
2006
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
2009
if (sd->vflip->val)
drivers/media/usb/gspca/sonixj.c
2015
if (!sd->vflip->val)
drivers/media/usb/gspca/sonixj.c
2021
if (sd->vflip->val)
drivers/media/usb/gspca/sonixj.c
2035
if (sd->hflip->val)
drivers/media/usb/gspca/sonixj.c
2037
if (sd->vflip->val)
drivers/media/usb/gspca/sonixj.c
2039
i2c_w1(&sd->gspca_dev, 0x1e, comn);
drivers/media/usb/gspca/sonixj.c
2046
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
2048
reg_w1(gspca_dev, 0x99, sd->sharpness->val);
drivers/media/usb/gspca/sonixj.c
2053
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
2055
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
2058
sd->illum->val ? 0x64 : 0x60);
drivers/media/usb/gspca/sonixj.c
2062
sd->illum->val ? 0x77 : 0x74);
drivers/media/usb/gspca/sonixj.c
2072
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
2074
if (sd->sensor == SENSOR_OV7660) {
drivers/media/usb/gspca/sonixj.c
2078
switch (sd->freq->val) {
drivers/media/usb/gspca/sonixj.c
2095
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
2106
switch (sd->freq->val) {
drivers/media/usb/gspca/sonixj.c
2127
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
2129
jpeg_set_qual(sd->jpeg_hdr, sd->quality);
drivers/media/usb/gspca/sonixj.c
2133
memcpy(gspca_dev->usb_buf, &sd->jpeg_hdr[JPEG_QT0_OFFSET], 64);
drivers/media/usb/gspca/sonixj.c
2141
memcpy(gspca_dev->usb_buf, &sd->jpeg_hdr[JPEG_QT1_OFFSET], 64);
drivers/media/usb/gspca/sonixj.c
2150
sd->reg18 ^= 0x40;
drivers/media/usb/gspca/sonixj.c
2151
reg_w1(gspca_dev, 0x18, sd->reg18);
drivers/media/usb/gspca/sonixj.c
2158
struct sd *sd = container_of(work, struct sd, work);
drivers/media/usb/gspca/sonixj.c
2159
struct gspca_dev *gspca_dev = &sd->gspca_dev;
drivers/media/usb/gspca/sonixj.c
2163
gspca_dbg(gspca_dev, D_STREAM, "qual_upd %d%%\n", sd->quality);
drivers/media/usb/gspca/sonixj.c
2172
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
2200
jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
drivers/media/usb/gspca/sonixj.c
2205
sn9c1xx = sn_tb[sd->sensor];
drivers/media/usb/gspca/sonixj.c
2210
if (sd->flags & F_PDN_INV)
drivers/media/usb/gspca/sonixj.c
2222
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
2242
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
2267
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
2287
i2c_w_seq(gspca_dev, sensor_init[sd->sensor]);
drivers/media/usb/gspca/sonixj.c
2294
if (sd->sensor == SENSOR_ADCM1700) {
drivers/media/usb/gspca/sonixj.c
2303
if (sd->sensor == SENSOR_ADCM1700) {
drivers/media/usb/gspca/sonixj.c
2311
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
2331
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
2366
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
2436
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
2449
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
2470
sd->reg18 = sn9c1xx[0x18] | (mode << 4) | 0x40;
drivers/media/usb/gspca/sonixj.c
2471
reg_w1(gspca_dev, 0x18, sd->reg18);
drivers/media/usb/gspca/sonixj.c
2476
sd->reg01 = reg01;
drivers/media/usb/gspca/sonixj.c
2477
sd->reg17 = reg17;
drivers/media/usb/gspca/sonixj.c
2479
sd->pktsz = sd->npkt = 0;
drivers/media/usb/gspca/sonixj.c
2480
sd->nchg = sd->short_mark = 0;
drivers/media/usb/gspca/sonixj.c
2487
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
2499
reg01 = sd->reg01;
drivers/media/usb/gspca/sonixj.c
2500
reg17 = sd->reg17 & ~SEN_CLK_EN;
drivers/media/usb/gspca/sonixj.c
2501
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
2562
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
2565
flush_work(&sd->work);
drivers/media/usb/gspca/sonixj.c
2571
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
2578
if (sd->ag_cnt < 0)
drivers/media/usb/gspca/sonixj.c
2580
if (--sd->ag_cnt >= 0)
drivers/media/usb/gspca/sonixj.c
2582
sd->ag_cnt = AG_CNT_START;
drivers/media/usb/gspca/sonixj.c
2584
delta = atomic_read(&sd->avg_lum);
drivers/media/usb/gspca/sonixj.c
2587
if (sd->sensor == SENSOR_PO2030N) {
drivers/media/usb/gspca/sonixj.c
2595
switch (sd->sensor) {
drivers/media/usb/gspca/sonixj.c
2597
expotimes = sd->exposure;
drivers/media/usb/gspca/sonixj.c
2601
sd->exposure = expo_adjust(gspca_dev,
drivers/media/usb/gspca/sonixj.c
2605
expotimes = sd->exposure >> 8;
drivers/media/usb/gspca/sonixj.c
2609
sd->exposure = expo_adjust(gspca_dev,
drivers/media/usb/gspca/sonixj.c
2614
expotimes = sd->exposure;
drivers/media/usb/gspca/sonixj.c
2618
sd->exposure = expo_adjust(gspca_dev,
drivers/media/usb/gspca/sonixj.c
2626
expotimes = sd->exposure;
drivers/media/usb/gspca/sonixj.c
2630
sd->exposure = expo_adjust(gspca_dev,
drivers/media/usb/gspca/sonixj.c
2639
static void set_lum(struct sd *sd,
drivers/media/usb/gspca/sonixj.c
2658
atomic_set(&sd->avg_lum, avg_lum);
drivers/media/usb/gspca/sonixj.c
2667
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sonixj.c
2687
sd->npkt++;
drivers/media/usb/gspca/sonixj.c
2688
sd->pktsz += len;
drivers/media/usb/gspca/sonixj.c
2695
i = sd->short_mark;
drivers/media/usb/gspca/sonixj.c
2697
sd->short_mark = 0;
drivers/media/usb/gspca/sonixj.c
2729
sd->short_mark = -1;
drivers/media/usb/gspca/sonixj.c
2732
sd->jpeg_hdr, JPEG_HDR_SZ);
drivers/media/usb/gspca/sonixj.c
2758
r = (sd->pktsz * 100) /
drivers/media/usb/gspca/sonixj.c
2759
(sd->npkt *
drivers/media/usb/gspca/sonixj.c
2767
sd->nchg += new_qual;
drivers/media/usb/gspca/sonixj.c
2768
if (sd->nchg < -6 || sd->nchg >= 12) {
drivers/media/usb/gspca/sonixj.c
2769
sd->nchg = 0;
drivers/media/usb/gspca/sonixj.c
2770
new_qual += sd->quality;
drivers/media/usb/gspca/sonixj.c
2775
if (new_qual != sd->quality) {
drivers/media/usb/gspca/sonixj.c
2776
sd->quality = new_qual;
drivers/media/usb/gspca/sonixj.c
2777
schedule_work(&sd->work);
drivers/media/usb/gspca/sonixj.c
2781
sd->nchg = 0;
drivers/media/usb/gspca/sonixj.c
2783
sd->pktsz = sd->npkt = 0;
drivers/media/usb/gspca/sonixj.c
2788
sd->short_mark = i + 62 - len;
drivers/media/usb/gspca/sonixj.c
2791
if (sd->ag_cnt >= 0)
drivers/media/usb/gspca/sonixj.c
2792
set_lum(sd, data + i);
drivers/media/usb/gspca/sonixj.c
2800
sd->jpeg_hdr, JPEG_HDR_SZ);
drivers/media/usb/gspca/sonixj.c
2965
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/spca1528.c
248
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca1528.c
251
jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
drivers/media/usb/gspca/spca1528.c
256
jpeg_set_qual(sd->jpeg_hdr, 85);
drivers/media/usb/gspca/spca1528.c
268
sd->pkt_seq = 0;
drivers/media/usb/gspca/spca1528.c
306
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca1528.c
319
sd->pkt_seq = !(data[1] & 1);
drivers/media/usb/gspca/spca1528.c
325
if ((data[1] & 1) != sd->pkt_seq)
drivers/media/usb/gspca/spca1528.c
329
sd->jpeg_hdr, JPEG_HDR_SZ);
drivers/media/usb/gspca/spca1528.c
422
return gspca_dev_probe2(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/spca500.c
561
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca500.c
565
sd->subtype = id->driver_info;
drivers/media/usb/gspca/spca500.c
566
if (sd->subtype != LogitechClickSmart310) {
drivers/media/usb/gspca/spca500.c
579
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca500.c
583
if (sd->subtype == LogitechClickSmart310)
drivers/media/usb/gspca/spca500.c
593
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca500.c
599
jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
drivers/media/usb/gspca/spca500.c
602
jpeg_set_qual(sd->jpeg_hdr, QUALITY);
drivers/media/usb/gspca/spca500.c
604
if (sd->subtype == LogitechClickSmart310) {
drivers/media/usb/gspca/spca500.c
620
switch (sd->subtype) {
drivers/media/usb/gspca/spca500.c
823
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca500.c
838
sd->jpeg_hdr, JPEG_HDR_SZ);
drivers/media/usb/gspca/spca500.c
963
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/spca501.c
1811
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca501.c
1817
sd->subtype = id->driver_info;
drivers/media/usb/gspca/spca501.c
1825
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca501.c
1827
switch (sd->subtype) {
drivers/media/usb/gspca/spca501.c
1853
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca501.c
1856
switch (sd->subtype) {
drivers/media/usb/gspca/spca501.c
2020
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/spca505.c
590
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca505.c
595
sd->subtype = id->driver_info;
drivers/media/usb/gspca/spca505.c
596
if (sd->subtype != IntelPCCameraPro)
drivers/media/usb/gspca/spca505.c
607
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca505.c
610
sd->subtype == Nxultra
drivers/media/usb/gspca/spca505.c
625
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca505.c
636
if (sd->subtype == Nxultra)
drivers/media/usb/gspca/spca505.c
775
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/spca506.c
114
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca506.c
145
sd->norme = norme;
drivers/media/usb/gspca/spca506.c
146
sd->channel = channel;
drivers/media/usb/gspca/spca506.c
155
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca506.c
159
*norme = sd->norme;
drivers/media/usb/gspca/spca506.c
160
*channel = sd->channel;
drivers/media/usb/gspca/spca506.c
583
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/spca508.c
1341
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca508.c
1376
sd->subtype = id->driver_info;
drivers/media/usb/gspca/spca508.c
1378
init_data = init_data_tb[sd->subtype];
drivers/media/usb/gspca/spca508.c
1510
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/spca561.c
395
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca561.c
422
sd->chip_revision = id->driver_info;
drivers/media/usb/gspca/spca561.c
423
if (sd->chip_revision == Rev012A) {
drivers/media/usb/gspca/spca561.c
430
sd->expo12a = EXPO12A_DEF;
drivers/media/usb/gspca/spca561.c
456
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca561.c
459
if (sd->chip_revision == Rev012A)
drivers/media/usb/gspca/spca561.c
472
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca561.c
479
if (sd->chip_revision == Rev012A) {
drivers/media/usb/gspca/spca561.c
549
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca561.c
552
sd->ag_cnt = AG_CNT_START;
drivers/media/usb/gspca/spca561.c
554
sd->ag_cnt = -1;
drivers/media/usb/gspca/spca561.c
592
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca561.c
621
setwhite(gspca_dev, v4l2_ctrl_g_ctrl(sd->hue),
drivers/media/usb/gspca/spca561.c
622
v4l2_ctrl_g_ctrl(sd->contrast));
drivers/media/usb/gspca/spca561.c
624
setautogain(gspca_dev, v4l2_ctrl_g_ctrl(sd->autogain));
drivers/media/usb/gspca/spca561.c
631
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca561.c
633
if (sd->chip_revision == Rev012A) {
drivers/media/usb/gspca/spca561.c
645
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca561.c
655
if (sd->ag_cnt < 0)
drivers/media/usb/gspca/spca561.c
657
if (--sd->ag_cnt >= 0)
drivers/media/usb/gspca/spca561.c
659
sd->ag_cnt = AG_CNT_START;
drivers/media/usb/gspca/spca561.c
661
switch (sd->chip_revision) {
drivers/media/usb/gspca/spca561.c
705
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/spca561.c
733
if (sd->chip_revision == Rev012A) {
drivers/media/usb/gspca/spca561.c
753
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/spca561.c
766
setwhite(gspca_dev, sd->hue->val, ctrl->val);
drivers/media/usb/gspca/spca561.c
813
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/spca561.c
818
sd->contrast = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/spca561.c
820
sd->hue = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/spca561.c
824
sd->autogain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/spca561.c
831
v4l2_ctrl_cluster(2, &sd->contrast);
drivers/media/usb/gspca/spca561.c
895
sizeof(struct sd),
drivers/media/usb/gspca/sq905.c
200
struct sd *dev = container_of(work, struct sd, work_struct);
drivers/media/usb/gspca/sq905.c
289
struct sd *dev = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq905.c
304
struct sd *dev = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq905.c
356
struct sd *dev = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq905.c
412
sizeof(struct sd),
drivers/media/usb/gspca/sq905c.c
123
struct sd *dev = container_of(work, struct sd, work_struct);
drivers/media/usb/gspca/sq905c.c
197
struct sd *dev = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq905c.c
235
struct sd *dev = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq905c.c
255
struct sd *dev = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq905c.c
314
sizeof(struct sd),
drivers/media/usb/gspca/sq930x.c
1000
i2c_write(sd, mt9v111_init_3,
drivers/media/usb/gspca/sq930x.c
1002
i2c_write(sd, mt9v111_init_4,
drivers/media/usb/gspca/sq930x.c
1011
if (sd->sensor == SENSOR_MT9V111)
drivers/media/usb/gspca/sq930x.c
1012
gpio_set(sd, SQ930_GPIO_DFL_LED, SQ930_GPIO_DFL_LED);
drivers/media/usb/gspca/sq930x.c
1014
sd->do_ctrl = 1; /* set the exposure */
drivers/media/usb/gspca/sq930x.c
1021
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq930x.c
1023
if (sd->sensor == SENSOR_MT9V111)
drivers/media/usb/gspca/sq930x.c
1024
gpio_set(sd, 0, SQ930_GPIO_DFL_LED);
drivers/media/usb/gspca/sq930x.c
1032
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq930x.c
1035
if (!sd->do_ctrl || gspca_dev->cam.bulk_nurbs != 0)
drivers/media/usb/gspca/sq930x.c
1037
sd->do_ctrl = 0;
drivers/media/usb/gspca/sq930x.c
1039
setexposure(gspca_dev, v4l2_ctrl_g_ctrl(sd->exposure),
drivers/media/usb/gspca/sq930x.c
1040
v4l2_ctrl_g_ctrl(sd->gain));
drivers/media/usb/gspca/sq930x.c
1055
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq930x.c
1057
if (sd->do_ctrl)
drivers/media/usb/gspca/sq930x.c
1068
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq930x.c
1077
setexposure(gspca_dev, ctrl->val, sd->gain->val);
drivers/media/usb/gspca/sq930x.c
1090
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq930x.c
1094
sd->exposure = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sq930x.c
1096
sd->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/sq930x.c
1103
v4l2_ctrl_cluster(2, &sd->exposure);
drivers/media/usb/gspca/sq930x.c
1140
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/sq930x.c
479
static void i2c_write(struct sd *sd,
drivers/media/usb/gspca/sq930x.c
483
struct gspca_dev *gspca_dev = &sd->gspca_dev;
drivers/media/usb/gspca/sq930x.c
492
sensor = &sensor_tb[sd->sensor];
drivers/media/usb/gspca/sq930x.c
584
static void gpio_set(struct sd *sd, u16 val, u16 mask)
drivers/media/usb/gspca/sq930x.c
586
struct gspca_dev *gspca_dev = &sd->gspca_dev;
drivers/media/usb/gspca/sq930x.c
589
sd->gpio[0] &= ~mask;
drivers/media/usb/gspca/sq930x.c
590
sd->gpio[0] |= val;
drivers/media/usb/gspca/sq930x.c
592
~sd->gpio[0] << 8);
drivers/media/usb/gspca/sq930x.c
597
sd->gpio[1] &= ~mask;
drivers/media/usb/gspca/sq930x.c
598
sd->gpio[1] |= val;
drivers/media/usb/gspca/sq930x.c
600
~sd->gpio[1] << 8);
drivers/media/usb/gspca/sq930x.c
604
static void gpio_init(struct sd *sd,
drivers/media/usb/gspca/sq930x.c
607
gpio_set(sd, *gpio++, 0x000f);
drivers/media/usb/gspca/sq930x.c
608
gpio_set(sd, *gpio++, 0x000f);
drivers/media/usb/gspca/sq930x.c
609
gpio_set(sd, *gpio++, 0x000f);
drivers/media/usb/gspca/sq930x.c
610
gpio_set(sd, *gpio++, 0x000f);
drivers/media/usb/gspca/sq930x.c
611
gpio_set(sd, *gpio, 0x000f);
drivers/media/usb/gspca/sq930x.c
614
static void bridge_init(struct sd *sd)
drivers/media/usb/gspca/sq930x.c
620
ucbus_write(&sd->gspca_dev, &clkfreq_cmd, 1, 1);
drivers/media/usb/gspca/sq930x.c
622
gpio_set(sd, SQ930_GPIO_POWER, 0xff00);
drivers/media/usb/gspca/sq930x.c
627
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq930x.c
640
ucbus_write(&sd->gspca_dev, sensor->cmd, sensor->cmd_len, 8);
drivers/media/usb/gspca/sq930x.c
641
gpio_init(sd, sensor->gpio);
drivers/media/usb/gspca/sq930x.c
653
sd->sensor = probe_order[i];
drivers/media/usb/gspca/sq930x.c
654
switch (sd->sensor) {
drivers/media/usb/gspca/sq930x.c
658
sensor_tb[sd->sensor].name);
drivers/media/usb/gspca/sq930x.c
699
static void global_init(struct sd *sd, int first_time)
drivers/media/usb/gspca/sq930x.c
701
switch (sd->sensor) {
drivers/media/usb/gspca/sq930x.c
704
ucbus_write(&sd->gspca_dev,
drivers/media/usb/gspca/sq930x.c
707
gpio_init(sd, sensor_tb[sd->sensor].gpio);
drivers/media/usb/gspca/sq930x.c
710
if (sd->type != Creative_live_motion)
drivers/media/usb/gspca/sq930x.c
711
gpio_set(sd, SQ930_GPIO_EXTRA1, 0x00ff);
drivers/media/usb/gspca/sq930x.c
713
gpio_set(sd, 0, 0x00ff);
drivers/media/usb/gspca/sq930x.c
716
ucbus_write(&sd->gspca_dev,
drivers/media/usb/gspca/sq930x.c
719
gpio_init(sd, sensor_tb[sd->sensor].gpio);
drivers/media/usb/gspca/sq930x.c
723
ucbus_write(&sd->gspca_dev,
drivers/media/usb/gspca/sq930x.c
727
gpio_init(sd, sensor_tb[sd->sensor].gpio);
drivers/media/usb/gspca/sq930x.c
728
gpio_set(sd, SQ930_GPIO_EXTRA2, SQ930_GPIO_EXTRA2);
drivers/media/usb/gspca/sq930x.c
733
mt9v111_init(&sd->gspca_dev);
drivers/media/usb/gspca/sq930x.c
735
gpio_init(sd, sensor_tb[sd->sensor].gpio);
drivers/media/usb/gspca/sq930x.c
740
static void lz24bp_ppl(struct sd *sd, u16 ppl)
drivers/media/usb/gspca/sq930x.c
747
ucbus_write(&sd->gspca_dev, cmds, ARRAY_SIZE(cmds), 2);
drivers/media/usb/gspca/sq930x.c
752
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq930x.c
762
switch (sd->sensor) {
drivers/media/usb/gspca/sq930x.c
765
min_frclk = sd->sensor == SENSOR_ICX098BQ ? 0x210 : 0x26f;
drivers/media/usb/gspca/sq930x.c
783
sensor = &sensor_tb[sd->sensor];
drivers/media/usb/gspca/sq930x.c
808
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq930x.c
811
sd->sensor = id->driver_info >> 8;
drivers/media/usb/gspca/sq930x.c
812
sd->type = id->driver_info;
drivers/media/usb/gspca/sq930x.c
825
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq930x.c
827
sd->gpio[0] = sd->gpio[1] = 0xff; /* force gpio rewrite */
drivers/media/usb/gspca/sq930x.c
858
bridge_init(sd);
drivers/media/usb/gspca/sq930x.c
860
if (sd->sensor == SENSOR_MI0360) {
drivers/media/usb/gspca/sq930x.c
864
sd->sensor = SENSOR_ICX098BQ;
drivers/media/usb/gspca/sq930x.c
870
sensor_tb[sd->sensor].name);
drivers/media/usb/gspca/sq930x.c
871
global_init(sd, 1);
drivers/media/usb/gspca/sq930x.c
879
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq930x.c
884
cap = &capconfig[sd->sensor][mode];
drivers/media/usb/gspca/sq930x.c
898
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq930x.c
901
sd->do_ctrl = 0;
drivers/media/usb/gspca/sq930x.c
910
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sq930x.c
913
bridge_init(sd);
drivers/media/usb/gspca/sq930x.c
914
global_init(sd, 0);
drivers/media/usb/gspca/sq930x.c
917
switch (sd->sensor) {
drivers/media/usb/gspca/sq930x.c
932
gpio_set(sd, SQ930_GPIO_EXTRA2 | SQ930_GPIO_RSTBAR, 0x00ff);
drivers/media/usb/gspca/sq930x.c
935
gpio_set(sd, 0x7f, 0x00ff);
drivers/media/usb/gspca/sq930x.c
939
gpio_set(sd, SQ930_GPIO_EXTRA2 | SQ930_GPIO_RSTBAR, 0x00ff);
drivers/media/usb/gspca/sq930x.c
945
if (sd->type != Creative_live_motion)
drivers/media/usb/gspca/sq930x.c
957
lz24bp_ppl(sd, mode == 1 ? 0x0564 : 0x0310);
drivers/media/usb/gspca/sq930x.c
964
i2c_write(sd, mi0360_init_23,
drivers/media/usb/gspca/sq930x.c
966
i2c_write(sd, mi0360_init_24,
drivers/media/usb/gspca/sq930x.c
968
i2c_write(sd, mi0360_init_25,
drivers/media/usb/gspca/sq930x.c
973
i2c_write(sd, mi0360_start_2,
drivers/media/usb/gspca/sq930x.c
975
i2c_write(sd, mi0360_start_3,
drivers/media/usb/gspca/sq930x.c
983
i2c_write(sd,
drivers/media/usb/gspca/sq930x.c
991
i2c_write(sd, mt9v111_init_0,
drivers/media/usb/gspca/sq930x.c
993
i2c_write(sd, mt9v111_init_1,
drivers/media/usb/gspca/sq930x.c
995
i2c_write(sd, mt9v111_init_2,
drivers/media/usb/gspca/stk014.c
236
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stk014.c
240
jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
drivers/media/usb/gspca/stk014.c
243
jpeg_set_qual(sd->jpeg_hdr, QUALITY);
drivers/media/usb/gspca/stk014.c
313
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stk014.c
331
sd->jpeg_hdr, JPEG_HDR_SZ);
drivers/media/usb/gspca/stk014.c
418
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/stk1135.c
169
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stk1135.c
171
if (page != sd->sensor_page) {
drivers/media/usb/gspca/stk1135.c
173
sd->sensor_page = page;
drivers/media/usb/gspca/stk1135.c
386
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stk1135.c
412
sd->sensor_page = 0xff;
drivers/media/usb/gspca/stk1135.c
432
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stk1135.c
466
sd->pkt_seq = 0;
drivers/media/usb/gspca/stk1135.c
486
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stk1135.c
501
if (sd->flip_status != flip)
drivers/media/usb/gspca/stk1135.c
502
sd->flip_debounce++;
drivers/media/usb/gspca/stk1135.c
504
sd->flip_debounce = 0;
drivers/media/usb/gspca/stk1135.c
509
if (seq != sd->pkt_seq) {
drivers/media/usb/gspca/stk1135.c
512
sd->pkt_seq = seq;
drivers/media/usb/gspca/stk1135.c
517
sd->pkt_seq++;
drivers/media/usb/gspca/stk1135.c
518
if (sd->pkt_seq > STK1135_HDR_SEQ_MASK)
drivers/media/usb/gspca/stk1135.c
519
sd->pkt_seq = 0;
drivers/media/usb/gspca/stk1135.c
534
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stk1135.c
536
if (sd->flip_status)
drivers/media/usb/gspca/stk1135.c
543
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stk1135.c
545
if (sd->flip_status)
drivers/media/usb/gspca/stk1135.c
552
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stk1135.c
554
if (sd->flip_debounce > 100) {
drivers/media/usb/gspca/stk1135.c
555
sd->flip_status = !sd->flip_status;
drivers/media/usb/gspca/stk1135.c
556
sethflip(gspca_dev, v4l2_ctrl_g_ctrl(sd->hflip));
drivers/media/usb/gspca/stk1135.c
557
setvflip(gspca_dev, v4l2_ctrl_g_ctrl(sd->vflip));
drivers/media/usb/gspca/stk1135.c
589
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stk1135.c
594
sd->hflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/stk1135.c
596
sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/stk1135.c
660
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/stv0680.c
115
sd->current_mode = mode;
drivers/media/usb/gspca/stv0680.c
125
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv0680.c
169
sd->video_mode = 0x00; /* CIF */
drivers/media/usb/gspca/stv0680.c
171
sd->video_mode = 0x03; /* QVGA */
drivers/media/usb/gspca/stv0680.c
185
sd->current_mode = sd->orig_mode = ret;
drivers/media/usb/gspca/stv0680.c
187
ret = stv0680_set_video_mode(gspca_dev, sd->video_mode);
drivers/media/usb/gspca/stv0680.c
201
sd->mode.width = (gspca_dev->usb_buf[4] << 8) |
drivers/media/usb/gspca/stv0680.c
203
sd->mode.height = (gspca_dev->usb_buf[6] << 8) |
drivers/media/usb/gspca/stv0680.c
205
sd->mode.pixelformat = V4L2_PIX_FMT_STV0680;
drivers/media/usb/gspca/stv0680.c
206
sd->mode.field = V4L2_FIELD_NONE;
drivers/media/usb/gspca/stv0680.c
207
sd->mode.bytesperline = sd->mode.width;
drivers/media/usb/gspca/stv0680.c
208
sd->mode.sizeimage = cam->bulk_size;
drivers/media/usb/gspca/stv0680.c
209
sd->mode.colorspace = V4L2_COLORSPACE_SRGB;
drivers/media/usb/gspca/stv0680.c
213
cam->cam_mode = &sd->mode;
drivers/media/usb/gspca/stv0680.c
217
ret = stv0680_set_video_mode(gspca_dev, sd->orig_mode);
drivers/media/usb/gspca/stv0680.c
240
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv0680.c
242
ret = stv0680_set_video_mode(gspca_dev, sd->video_mode);
drivers/media/usb/gspca/stv0680.c
253
if (stv_sndctrl(gspca_dev, 1, 0x09, sd->video_mode << 8, 0x0) != 0x0)
drivers/media/usb/gspca/stv0680.c
268
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv0680.c
270
if (!sd->gspca_dev.present)
drivers/media/usb/gspca/stv0680.c
273
stv0680_set_video_mode(gspca_dev, sd->orig_mode);
drivers/media/usb/gspca/stv0680.c
280
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv0680.c
286
if (len != sd->mode.sizeimage) {
drivers/media/usb/gspca/stv0680.c
323
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/stv0680.c
96
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv0680.c
98
if (sd->current_mode == mode)
drivers/media/usb/gspca/stv06xx/stv06xx.c
100
int stv06xx_write_sensor_bytes(struct sd *sd, const u8 *data, u8 len)
drivers/media/usb/gspca/stv06xx/stv06xx.c
103
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/stv06xx/stv06xx.c
104
struct usb_device *udev = sd->gspca_dev.dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
105
__u8 *buf = sd->gspca_dev.usb_buf;
drivers/media/usb/gspca/stv06xx/stv06xx.c
118
buf[0x20] = sd->sensor->i2c_addr;
drivers/media/usb/gspca/stv06xx/stv06xx.c
128
return stv06xx_write_sensor_finish(sd);
drivers/media/usb/gspca/stv06xx/stv06xx.c
131
int stv06xx_write_sensor_words(struct sd *sd, const u16 *data, u8 len)
drivers/media/usb/gspca/stv06xx/stv06xx.c
134
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/stv06xx/stv06xx.c
135
struct usb_device *udev = sd->gspca_dev.dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
136
__u8 *buf = sd->gspca_dev.usb_buf;
drivers/media/usb/gspca/stv06xx/stv06xx.c
151
buf[0x20] = sd->sensor->i2c_addr;
drivers/media/usb/gspca/stv06xx/stv06xx.c
161
return stv06xx_write_sensor_finish(sd);
drivers/media/usb/gspca/stv06xx/stv06xx.c
164
int stv06xx_read_sensor(struct sd *sd, const u8 address, u16 *value)
drivers/media/usb/gspca/stv06xx/stv06xx.c
167
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/stv06xx/stv06xx.c
168
struct usb_device *udev = sd->gspca_dev.dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
169
__u8 *buf = sd->gspca_dev.usb_buf;
drivers/media/usb/gspca/stv06xx/stv06xx.c
171
err = stv06xx_write_bridge(sd, STV_I2C_FLUSH, sd->sensor->i2c_flush);
drivers/media/usb/gspca/stv06xx/stv06xx.c
179
buf[0x20] = sd->sensor->i2c_addr;
drivers/media/usb/gspca/stv06xx/stv06xx.c
194
0x04, 0xc0, 0x1410, 0, buf, sd->sensor->i2c_len,
drivers/media/usb/gspca/stv06xx/stv06xx.c
196
if (sd->sensor->i2c_len == 2)
drivers/media/usb/gspca/stv06xx/stv06xx.c
208
static void stv06xx_dump_bridge(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx.c
215
stv06xx_read_bridge(sd, i, &data);
drivers/media/usb/gspca/stv06xx/stv06xx.c
222
stv06xx_read_bridge(sd, i, &data);
drivers/media/usb/gspca/stv06xx/stv06xx.c
225
stv06xx_write_bridge(sd, i, 0xff);
drivers/media/usb/gspca/stv06xx/stv06xx.c
226
stv06xx_read_bridge(sd, i, &data);
drivers/media/usb/gspca/stv06xx/stv06xx.c
235
stv06xx_write_bridge(sd, i, buf);
drivers/media/usb/gspca/stv06xx/stv06xx.c
242
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
251
err = sd->sensor->init(sd);
drivers/media/usb/gspca/stv06xx/stv06xx.c
253
if (dump_sensor && sd->sensor->dump)
drivers/media/usb/gspca/stv06xx/stv06xx.c
254
sd->sensor->dump(sd);
drivers/media/usb/gspca/stv06xx/stv06xx.c
262
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
267
return sd->sensor->init_controls(sd);
drivers/media/usb/gspca/stv06xx/stv06xx.c
273
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
278
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
drivers/media/usb/gspca/stv06xx/stv06xx.c
279
alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt);
drivers/media/usb/gspca/stv06xx/stv06xx.c
289
err = stv06xx_write_bridge(sd, STV_ISO_SIZE_L, packet_size);
drivers/media/usb/gspca/stv06xx/stv06xx.c
29
int stv06xx_write_bridge(struct sd *sd, u16 address, u16 i2c_data)
drivers/media/usb/gspca/stv06xx/stv06xx.c
294
err = sd->sensor->start(sd);
drivers/media/usb/gspca/stv06xx/stv06xx.c
299
err = stv06xx_write_bridge(sd, STV_ISO_ENABLE, 1);
drivers/media/usb/gspca/stv06xx/stv06xx.c
314
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
32
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/stv06xx/stv06xx.c
328
cpu_to_le16(sd->sensor->max_packet_size[gspca_dev->curr_mode]);
drivers/media/usb/gspca/stv06xx/stv06xx.c
33
struct usb_device *udev = sd->gspca_dev.dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
337
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
34
__u8 *buf = sd->gspca_dev.usb_buf;
drivers/media/usb/gspca/stv06xx/stv06xx.c
345
min_packet_size = sd->sensor->min_packet_size[gspca_dev->curr_mode];
drivers/media/usb/gspca/stv06xx/stv06xx.c
364
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
367
err = stv06xx_write_bridge(sd, STV_ISO_ENABLE, 0);
drivers/media/usb/gspca/stv06xx/stv06xx.c
371
err = sd->sensor->stop(sd);
drivers/media/usb/gspca/stv06xx/stv06xx.c
396
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
428
if (sd->bridge == BRIDGE_ST6422 && (id & 0xff00) == 0x0200)
drivers/media/usb/gspca/stv06xx/stv06xx.c
437
if (sd->to_skip) {
drivers/media/usb/gspca/stv06xx/stv06xx.c
438
int skip = (sd->to_skip < chunk_len) ?
drivers/media/usb/gspca/stv06xx/stv06xx.c
439
sd->to_skip : chunk_len;
drivers/media/usb/gspca/stv06xx/stv06xx.c
443
sd->to_skip -= skip;
drivers/media/usb/gspca/stv06xx/stv06xx.c
460
if (sd->bridge == BRIDGE_ST6422)
drivers/media/usb/gspca/stv06xx/stv06xx.c
461
sd->to_skip = gspca_dev->pixfmt.width * 4;
drivers/media/usb/gspca/stv06xx/stv06xx.c
51
int stv06xx_read_bridge(struct sd *sd, u16 address, u8 *i2c_data)
drivers/media/usb/gspca/stv06xx/stv06xx.c
534
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
536
kfree(sd->sensor_priv);
drivers/media/usb/gspca/stv06xx/stv06xx.c
537
sd->sensor_priv = NULL;
drivers/media/usb/gspca/stv06xx/stv06xx.c
54
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/stv06xx/stv06xx.c
55
struct usb_device *udev = sd->gspca_dev.dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
56
__u8 *buf = sd->gspca_dev.usb_buf;
drivers/media/usb/gspca/stv06xx/stv06xx.c
561
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
565
sd->bridge = id->driver_info;
drivers/media/usb/gspca/stv06xx/stv06xx.c
569
stv06xx_dump_bridge(sd);
drivers/media/usb/gspca/stv06xx/stv06xx.c
571
sd->sensor = &stv06xx_sensor_st6422;
drivers/media/usb/gspca/stv06xx/stv06xx.c
572
if (!sd->sensor->probe(sd))
drivers/media/usb/gspca/stv06xx/stv06xx.c
575
sd->sensor = &stv06xx_sensor_vv6410;
drivers/media/usb/gspca/stv06xx/stv06xx.c
576
if (!sd->sensor->probe(sd))
drivers/media/usb/gspca/stv06xx/stv06xx.c
579
sd->sensor = &stv06xx_sensor_hdcs1x00;
drivers/media/usb/gspca/stv06xx/stv06xx.c
580
if (!sd->sensor->probe(sd))
drivers/media/usb/gspca/stv06xx/stv06xx.c
583
sd->sensor = &stv06xx_sensor_hdcs1020;
drivers/media/usb/gspca/stv06xx/stv06xx.c
584
if (!sd->sensor->probe(sd))
drivers/media/usb/gspca/stv06xx/stv06xx.c
587
sd->sensor = &stv06xx_sensor_pb0100;
drivers/media/usb/gspca/stv06xx/stv06xx.c
588
if (!sd->sensor->probe(sd))
drivers/media/usb/gspca/stv06xx/stv06xx.c
591
sd->sensor = NULL;
drivers/media/usb/gspca/stv06xx/stv06xx.c
613
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/stv06xx/stv06xx.c
620
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
621
void *priv = sd->sensor_priv;
drivers/media/usb/gspca/stv06xx/stv06xx.c
624
sd->sensor = NULL;
drivers/media/usb/gspca/stv06xx/stv06xx.c
72
int stv06xx_write_sensor(struct sd *sd, u8 address, u16 value)
drivers/media/usb/gspca/stv06xx/stv06xx.c
74
if (sd->sensor->i2c_len == 2) {
drivers/media/usb/gspca/stv06xx/stv06xx.c
76
return stv06xx_write_sensor_words(sd, data, 1);
drivers/media/usb/gspca/stv06xx/stv06xx.c
79
return stv06xx_write_sensor_bytes(sd, data, 1);
drivers/media/usb/gspca/stv06xx/stv06xx.c
83
static int stv06xx_write_sensor_finish(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx.c
87
if (sd->bridge == BRIDGE_STV610) {
drivers/media/usb/gspca/stv06xx/stv06xx.c
88
struct usb_device *udev = sd->gspca_dev.dev;
drivers/media/usb/gspca/stv06xx/stv06xx.c
89
__u8 *buf = sd->gspca_dev.usb_buf;
drivers/media/usb/gspca/stv06xx/stv06xx.h
100
int stv06xx_read_sensor(struct sd *sd, const u8 address, u16 *value);
drivers/media/usb/gspca/stv06xx/stv06xx.h
101
int stv06xx_write_sensor(struct sd *sd, u8 address, u16 value);
drivers/media/usb/gspca/stv06xx/stv06xx.h
94
int stv06xx_write_bridge(struct sd *sd, u16 address, u16 i2c_data);
drivers/media/usb/gspca/stv06xx/stv06xx.h
95
int stv06xx_read_bridge(struct sd *sd, u16 address, u8 *i2c_data);
drivers/media/usb/gspca/stv06xx/stv06xx.h
97
int stv06xx_write_sensor_bytes(struct sd *sd, const u8 *data, u8 len);
drivers/media/usb/gspca/stv06xx/stv06xx.h
98
int stv06xx_write_sensor_words(struct sd *sd, const u16 *data, u8 len);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
102
static int hdcs_set_state(struct sd *sd, enum hdcs_power_state state)
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
104
struct hdcs *hdcs = sd->sensor_priv;
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
113
ret = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), 0);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
136
ret = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), val);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
145
static int hdcs_reset(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
147
struct hdcs *hdcs = sd->sensor_priv;
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
150
err = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), 1);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
154
err = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), 0);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
163
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
164
struct hdcs *hdcs = sd->sensor_priv;
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
193
if (IS_1020(sd)) {
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
212
if (IS_1020(sd)) {
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
225
err = stv06xx_write_sensor_bytes(sd, exp, 6);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
241
err = stv06xx_write_sensor_bytes(sd, exp, 7);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
250
static int hdcs_set_gains(struct sd *sd, u8 g)
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
264
err = hdcs_reg_write_seq(sd, HDCS_ERECPGA, gains, 4);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
271
return hdcs_set_gains((struct sd *) gspca_dev,
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
275
static int hdcs_set_size(struct sd *sd,
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
278
struct hdcs *hdcs = sd->sensor_priv;
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
290
if (IS_1020(sd)) {
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
313
err = hdcs_reg_write_seq(sd, HDCS_FWROW, win, 4);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
344
static int hdcs_init_controls(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
346
struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
356
static int hdcs_probe_1x00(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
362
ret = stv06xx_read_sensor(sd, HDCS_IDENT, &sensor);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
368
sd->gspca_dev.cam.cam_mode = hdcs1x00_mode;
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
369
sd->gspca_dev.cam.nmodes = ARRAY_SIZE(hdcs1x00_mode);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
406
hdcs->psmp = (sd->bridge == BRIDGE_STV602) ? 20 : 5;
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
408
sd->sensor_priv = hdcs;
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
413
static int hdcs_probe_1020(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
419
ret = stv06xx_read_sensor(sd, HDCS_IDENT, &sensor);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
425
sd->gspca_dev.cam.cam_mode = hdcs1020_mode;
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
426
sd->gspca_dev.cam.nmodes = ARRAY_SIZE(hdcs1020_mode);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
450
sd->sensor_priv = hdcs;
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
455
static int hdcs_start(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
457
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
461
return hdcs_set_state(sd, HDCS_STATE_RUN);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
464
static int hdcs_stop(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
466
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
470
return hdcs_set_state(sd, HDCS_STATE_SLEEP);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
473
static int hdcs_init(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
475
struct hdcs *hdcs = sd->sensor_priv;
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
479
if (sd->bridge == BRIDGE_STV602)
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
480
stv06xx_write_bridge(sd, STV_STV0600_EMULATION, 1);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
484
err = stv06xx_write_bridge(sd, stv_bridge_init[i][0],
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
491
hdcs_reset(sd);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
495
err = stv06xx_write_sensor(sd, stv_sensor_init[i][0],
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
502
err = stv06xx_write_sensor(sd, HDCS_REG_CONFIG(sd), BIT(3));
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
508
if (IS_1020(sd))
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
509
err = stv06xx_write_sensor(sd, HDCS_TCTRL,
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
512
err = stv06xx_write_sensor(sd, HDCS_TCTRL,
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
517
return hdcs_set_size(sd, hdcs->array.width, hdcs->array.height);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
520
static int hdcs_dump(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
528
err = stv06xx_read_sensor(sd, reg, &val);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
82
static int hdcs_reg_write_seq(struct sd *sd, u8 reg, u8 *vals, u8 len)
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c
99
return stv06xx_write_sensor_bytes(sd, regs, len);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h
117
static int hdcs_probe_1x00(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h
118
static int hdcs_probe_1020(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h
119
static int hdcs_start(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h
120
static int hdcs_init(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h
121
static int hdcs_init_controls(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h
122
static int hdcs_stop(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h
123
static int hdcs_dump(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h
23
#define HDCS_REG_CONFIG(sd) (IS_1020(sd) ? HDCS20_CONFIG : HDCS00_CONFIG)
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h
24
#define HDCS_REG_CONTROL(sd) (IS_1020(sd) ? HDCS20_CONTROL : HDCS00_CONTROL)
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
106
static int pb0100_init_controls(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
108
struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
150
sd->sensor_priv = ctrls;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
155
static int pb0100_probe(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
160
err = stv06xx_read_sensor(sd, PB_IDENT, &sensor);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
169
sd->gspca_dev.cam.cam_mode = pb0100_mode;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
170
sd->gspca_dev.cam.nmodes = ARRAY_SIZE(pb0100_mode);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
175
static int pb0100_start(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
180
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
181
struct cam *cam = &sd->gspca_dev.cam;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
182
u32 mode = cam->cam_mode[sd->gspca_dev.curr_mode].priv;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
184
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
185
alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
195
max_packet_size = sd->sensor->max_packet_size[sd->gspca_dev.curr_mode];
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
197
stv06xx_write_sensor(sd, PB_ROWSPEED, BIT(4)|BIT(3)|BIT(1));
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
199
stv06xx_write_sensor(sd, PB_ROWSPEED, BIT(5)|BIT(3)|BIT(1));
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
203
stv06xx_write_sensor(sd, PB_RSTART, 30);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
204
stv06xx_write_sensor(sd, PB_CSTART, 20);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
205
stv06xx_write_sensor(sd, PB_RWSIZE, 240 - 1);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
206
stv06xx_write_sensor(sd, PB_CWSIZE, 320 - 1);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
208
stv06xx_write_sensor(sd, PB_RSTART, 8);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
209
stv06xx_write_sensor(sd, PB_CSTART, 4);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
210
stv06xx_write_sensor(sd, PB_RWSIZE, 288 - 1);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
211
stv06xx_write_sensor(sd, PB_CWSIZE, 352 - 1);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
215
stv06xx_write_bridge(sd, STV_Y_CTRL, 0x02); /* Wrong, FIXME */
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
216
stv06xx_write_bridge(sd, STV_X_CTRL, 0x06);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
218
stv06xx_write_bridge(sd, STV_SCAN_RATE, 0x10);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
220
stv06xx_write_bridge(sd, STV_Y_CTRL, 0x01);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
221
stv06xx_write_bridge(sd, STV_X_CTRL, 0x0a);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
223
stv06xx_write_bridge(sd, STV_SCAN_RATE, 0x20);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
226
err = stv06xx_write_sensor(sd, PB_CONTROL, BIT(5)|BIT(3)|BIT(1));
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
232
static int pb0100_stop(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
234
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
237
err = stv06xx_write_sensor(sd, PB_ABORTFRAME, 1);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
243
err = stv06xx_write_sensor(sd, PB_CONTROL, BIT(5)|BIT(3));
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
254
static int pb0100_init(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
256
stv06xx_write_bridge(sd, STV_REG00, 1);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
257
stv06xx_write_bridge(sd, STV_SCAN_RATE, 0);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
260
stv06xx_write_sensor(sd, PB_RESET, 1);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
261
stv06xx_write_sensor(sd, PB_RESET, 0);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
264
stv06xx_write_sensor(sd, PB_CONTROL, BIT(5)|BIT(3));
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
267
stv06xx_write_sensor(sd, PB_PREADCTRL, BIT(12)|BIT(10)|BIT(6));
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
268
stv06xx_write_sensor(sd, PB_ADCGLOBALGAIN, 12);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
273
stv06xx_write_sensor(sd, PB_R28, 12);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
275
stv06xx_write_sensor(sd, PB_ADCMAXGAIN, 180);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
277
stv06xx_write_sensor(sd, PB_ADCMINGAIN, 12);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
280
stv06xx_write_sensor(sd, PB_R54, 3);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
283
stv06xx_write_sensor(sd, PB_R55, 0);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
284
stv06xx_write_sensor(sd, PB_UPDATEINT, 1);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
286
stv06xx_write_sensor(sd, PB_R15, 800);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
288
stv06xx_write_sensor(sd, PB_R17, 10);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
290
stv06xx_write_sensor(sd, PB_EXPGAIN, 0);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
293
stv06xx_write_sensor(sd, PB_VOFFSET, 0);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
295
stv06xx_write_sensor(sd, PB_ADCGAINH, 11);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
297
stv06xx_write_sensor(sd, PB_ADCGAINL, 0);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
300
stv06xx_write_bridge(sd, STV_REG00, 0x11);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
301
stv06xx_write_bridge(sd, STV_REG03, 0x45);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
302
stv06xx_write_bridge(sd, STV_REG04, 0x07);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
305
stv06xx_write_sensor(sd, PB_ROWSPEED, BIT(4)|BIT(3)|BIT(1));
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
306
stv06xx_write_sensor(sd, PB_CFILLIN, 14);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
307
stv06xx_write_sensor(sd, PB_VBL, 0);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
308
stv06xx_write_sensor(sd, PB_FINTTIME, 0);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
309
stv06xx_write_sensor(sd, PB_RINTTIME, 123);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
311
stv06xx_write_bridge(sd, STV_REG01, 0xc2);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
312
stv06xx_write_bridge(sd, STV_REG02, 0xb0);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
316
static int pb0100_dump(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
324
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
325
struct pb0100_ctrls *ctrls = sd->sensor_priv;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
327
err = stv06xx_write_sensor(sd, PB_G1GAIN, val);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
329
err = stv06xx_write_sensor(sd, PB_G2GAIN, val);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
344
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
345
struct pb0100_ctrls *ctrls = sd->sensor_priv;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
353
err = stv06xx_write_sensor(sd, PB_RGAIN, val);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
363
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
364
struct pb0100_ctrls *ctrls = sd->sensor_priv;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
372
err = stv06xx_write_sensor(sd, PB_BGAIN, val);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
381
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
384
err = stv06xx_write_sensor(sd, PB_RINTTIME, val);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
394
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
395
struct pb0100_ctrls *ctrls = sd->sensor_priv;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
405
err = stv06xx_write_sensor(sd, PB_EXPGAIN, val);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
415
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
424
err = stv06xx_write_sensor(sd, PB_R21, brightpixels);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
426
err = stv06xx_write_sensor(sd, PB_R22, darkpixels);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
79
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
80
struct pb0100_ctrls *ctrls = sd->sensor_priv;
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h
100
static int pb0100_start(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h
101
static int pb0100_init(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h
102
static int pb0100_init_controls(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h
103
static int pb0100_stop(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h
104
static int pb0100_dump(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h
99
static int pb0100_probe(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h
22
#define IS_1020(sd) ((sd)->sensor == &stv06xx_sensor_hdcs1020)
drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h
48
int (*probe)(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h
51
int (*init)(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h
54
int (*init_controls)(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h
57
int (*read_sensor)(struct sd *sd, const u8 address,
drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h
61
int (*write_sensor)(struct sd *sd, const u8 address,
drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h
65
int (*start)(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h
68
int (*stop)(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h
71
int (*dump)(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
104
static int st6422_probe(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
106
if (sd->bridge != BRIDGE_ST6422)
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
111
sd->gspca_dev.cam.cam_mode = st6422_mode;
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
112
sd->gspca_dev.cam.nmodes = ARRAY_SIZE(st6422_mode);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
116
static int st6422_init(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
194
err = stv06xx_write_bridge(sd, st6422_bridge_init[i][0],
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
201
static int setbrightness(struct sd *sd, s32 val)
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
204
return stv06xx_write_bridge(sd, 0x1432, val);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
207
static int setcontrast(struct sd *sd, s32 val)
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
210
return stv06xx_write_bridge(sd, 0x143a, val | 0xf0);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
213
static int setgain(struct sd *sd, u8 gain)
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
218
err = stv06xx_write_bridge(sd, 0x0509, gain);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
222
err = stv06xx_write_bridge(sd, 0x050a, gain);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
226
err = stv06xx_write_bridge(sd, 0x050b, gain);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
231
err = stv06xx_write_bridge(sd, 0x050c, 0x2a);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
235
return stv06xx_write_bridge(sd, 0x050d, 0x01);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
238
static int setexposure(struct sd *sd, s16 expo)
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
242
err = stv06xx_write_bridge(sd, 0x143d, expo & 0xff);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
246
return stv06xx_write_bridge(sd, 0x143e, expo >> 8);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
249
static int st6422_start(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
252
struct cam *cam = &sd->gspca_dev.cam;
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
254
if (cam->cam_mode[sd->gspca_dev.curr_mode].priv)
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
255
err = stv06xx_write_bridge(sd, 0x1505, 0x0f);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
257
err = stv06xx_write_bridge(sd, 0x1505, 0x02);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
262
err = stv06xx_write_bridge(sd, 0x143f, 0x01);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
266
static int st6422_stop(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
268
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
49
static int setbrightness(struct sd *sd, s32 val);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
50
static int setcontrast(struct sd *sd, s32 val);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
51
static int setgain(struct sd *sd, u8 gain);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
52
static int setexposure(struct sd *sd, s16 expo);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
58
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
63
err = setbrightness(sd, ctrl->val);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
66
err = setcontrast(sd, ctrl->val);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
69
err = setgain(sd, ctrl->val);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
72
err = setexposure(sd, ctrl->val);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
78
err = stv06xx_write_bridge(sd, 0x143f, 0x01);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
79
sd->gspca_dev.usb_err = err;
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
87
static int st6422_init_controls(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
89
struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h
20
static int st6422_probe(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h
21
static int st6422_start(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h
22
static int st6422_init(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h
23
static int st6422_init_controls(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h
24
static int st6422_stop(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
103
static int vv6410_init(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
108
stv06xx_write_bridge(sd, stv_bridge_init[i].addr, stv_bridge_init[i].data);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
110
err = stv06xx_write_sensor_bytes(sd, (u8 *) vv6410_sensor_init,
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
115
static int vv6410_start(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
118
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
119
struct cam *cam = &sd->gspca_dev.cam;
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
120
u32 priv = cam->cam_mode[sd->gspca_dev.curr_mode].priv;
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
124
stv06xx_write_bridge(sd, STV_Y_CTRL, 0x02);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
125
stv06xx_write_bridge(sd, STV_X_CTRL, 0x06);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
127
stv06xx_write_bridge(sd, STV_SCAN_RATE, 0x10);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
129
stv06xx_write_bridge(sd, STV_Y_CTRL, 0x01);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
130
stv06xx_write_bridge(sd, STV_X_CTRL, 0x0a);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
131
stv06xx_write_bridge(sd, STV_SCAN_RATE, 0x00);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
136
err = stv06xx_write_bridge(sd, STV_LED_CTRL, LED_ON);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
140
err = stv06xx_write_sensor(sd, VV6410_SETUP0, 0);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
149
static int vv6410_stop(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
151
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
155
err = stv06xx_write_bridge(sd, STV_LED_CTRL, LED_OFF);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
159
err = stv06xx_write_sensor(sd, VV6410_SETUP0, VV6410_LOW_POWER_MODE);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
168
static int vv6410_dump(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
176
err = stv06xx_read_sensor(sd, i, &data);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
186
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
188
err = stv06xx_read_sensor(sd, VV6410_DATAFORMAT, &i2c_data);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
198
err = stv06xx_write_sensor(sd, VV6410_DATAFORMAT, i2c_data);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
207
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
209
err = stv06xx_read_sensor(sd, VV6410_DATAFORMAT, &i2c_data);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
219
err = stv06xx_write_sensor(sd, VV6410_DATAFORMAT, i2c_data);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
227
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
230
err = stv06xx_write_sensor(sd, VV6410_ANALOGGAIN, 0xf0 | (val & 0xf));
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
238
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
249
err = stv06xx_write_sensor(sd, VV6410_FINEH, fine >> 8);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
253
err = stv06xx_write_sensor(sd, VV6410_FINEL, fine & 0xff);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
257
err = stv06xx_write_sensor(sd, VV6410_COARSEH, coarse >> 8);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
261
err = stv06xx_write_sensor(sd, VV6410_COARSEL, coarse & 0xff);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
65
static int vv6410_probe(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
70
err = stv06xx_read_sensor(sd, VV6410_DEVICEH, &data);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
79
sd->gspca_dev.cam.cam_mode = vv6410_mode;
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
80
sd->gspca_dev.cam.nmodes = ARRAY_SIZE(vv6410_mode);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
84
static int vv6410_init_controls(struct sd *sd)
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
86
struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler;
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h
165
static int vv6410_probe(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h
166
static int vv6410_start(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h
167
static int vv6410_init(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h
168
static int vv6410_init_controls(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h
169
static int vv6410_stop(struct sd *sd);
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h
170
static int vv6410_dump(struct sd *sd);
drivers/media/usb/gspca/sunplus.c
1057
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/sunplus.c
448
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sunplus.c
452
switch (sd->bridge) {
drivers/media/usb/gspca/sunplus.c
482
if (sd->subtype == AiptekMiniPenCam13) {
drivers/media/usb/gspca/sunplus.c
524
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sunplus.c
527
reg = sd->bridge == BRIDGE_SPCA536 ? 0x20f0 : 0x21a7;
drivers/media/usb/gspca/sunplus.c
533
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sunplus.c
536
reg = sd->bridge == BRIDGE_SPCA536 ? 0x20f1 : 0x21a8;
drivers/media/usb/gspca/sunplus.c
542
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sunplus.c
545
reg = sd->bridge == BRIDGE_SPCA536 ? 0x20f6 : 0x21ae;
drivers/media/usb/gspca/sunplus.c
551
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sunplus.c
554
switch (sd->bridge) {
drivers/media/usb/gspca/sunplus.c
580
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sunplus.c
585
sd->bridge = id->driver_info >> 8;
drivers/media/usb/gspca/sunplus.c
586
sd->subtype = id->driver_info;
drivers/media/usb/gspca/sunplus.c
588
if (sd->subtype == AiptekMiniPenCam13) {
drivers/media/usb/gspca/sunplus.c
597
sd->bridge = BRIDGE_SPCA504B;
drivers/media/usb/gspca/sunplus.c
598
sd->subtype = 0;
drivers/media/usb/gspca/sunplus.c
605
switch (sd->bridge) {
drivers/media/usb/gspca/sunplus.c
615
if (sd->subtype == MegaImageVI) /* 320x240 only */
drivers/media/usb/gspca/sunplus.c
631
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sunplus.c
633
switch (sd->bridge) {
drivers/media/usb/gspca/sunplus.c
660
if (sd->subtype == LogitechClickSmart420)
drivers/media/usb/gspca/sunplus.c
672
if (sd->subtype == AiptekMiniPenCam13) {
drivers/media/usb/gspca/sunplus.c
711
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sunplus.c
715
jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
drivers/media/usb/gspca/sunplus.c
718
jpeg_set_qual(sd->jpeg_hdr, QUALITY);
drivers/media/usb/gspca/sunplus.c
720
if (sd->bridge == BRIDGE_SPCA504B)
drivers/media/usb/gspca/sunplus.c
723
switch (sd->bridge) {
drivers/media/usb/gspca/sunplus.c
728
switch (sd->subtype) {
drivers/media/usb/gspca/sunplus.c
745
if (sd->subtype == AiptekMiniPenCam13) {
drivers/media/usb/gspca/sunplus.c
768
if (sd->subtype == LogitechClickSmart420) {
drivers/media/usb/gspca/sunplus.c
776
enable = (sd->autogain ? 0x04 : 0x01);
drivers/media/usb/gspca/sunplus.c
794
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sunplus.c
796
switch (sd->bridge) {
drivers/media/usb/gspca/sunplus.c
809
if (sd->subtype == AiptekMiniPenCam13) {
drivers/media/usb/gspca/sunplus.c
829
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/sunplus.c
834
switch (sd->bridge) {
drivers/media/usb/gspca/sunplus.c
900
sd->jpeg_hdr, JPEG_HDR_SZ);
drivers/media/usb/gspca/sunplus.c
923
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/sunplus.c
941
sd->autogain = ctrl->val;
drivers/media/usb/gspca/t613.c
1025
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/t613.c
491
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/t613.c
496
green_gain = sd->gain->val;
drivers/media/usb/gspca/t613.c
498
red_gain = green_gain + sd->red_balance->val;
drivers/media/usb/gspca/t613.c
504
blue_gain = green_gain + sd->blue_balance->val;
drivers/media/usb/gspca/t613.c
513
all_gain_reg[7] = sensor_data[sd->sensor].reg80;
drivers/media/usb/gspca/t613.c
514
if (!sd->awb->val)
drivers/media/usb/gspca/t613.c
531
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/t613.c
535
switch (sd->sensor) {
drivers/media/usb/gspca/t613.c
568
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/t613.c
587
sd->sensor = SENSOR_TAS5130A;
drivers/media/usb/gspca/t613.c
591
sd->sensor = SENSOR_LT168G;
drivers/media/usb/gspca/t613.c
595
sd->sensor = SENSOR_OTHER;
drivers/media/usb/gspca/t613.c
599
sd->sensor = SENSOR_OM6802;
drivers/media/usb/gspca/t613.c
606
if (sd->sensor == SENSOR_OM6802) {
drivers/media/usb/gspca/t613.c
631
sensor = &sensor_data[sd->sensor];
drivers/media/usb/gspca/t613.c
635
if (sd->sensor == SENSOR_LT168G) {
drivers/media/usb/gspca/t613.c
657
if (sd->sensor == SENSOR_LT168G) {
drivers/media/usb/gspca/t613.c
739
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/t613.c
765
switch (sd->sensor) {
drivers/media/usb/gspca/t613.c
785
sensor = &sensor_data[sd->sensor];
drivers/media/usb/gspca/t613.c
786
setfreq(gspca_dev, v4l2_ctrl_g_ctrl(sd->freq));
drivers/media/usb/gspca/t613.c
795
if (sd->sensor == SENSOR_OM6802)
drivers/media/usb/gspca/t613.c
803
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/t613.c
805
reg_w_buf(gspca_dev, sensor_data[sd->sensor].stream,
drivers/media/usb/gspca/t613.c
806
sizeof sensor_data[sd->sensor].stream);
drivers/media/usb/gspca/t613.c
807
reg_w_buf(gspca_dev, sensor_data[sd->sensor].stream,
drivers/media/usb/gspca/t613.c
808
sizeof sensor_data[sd->sensor].stream);
drivers/media/usb/gspca/t613.c
809
if (sd->sensor == SENSOR_OM6802) {
drivers/media/usb/gspca/t613.c
815
if (sd->button_pressed) {
drivers/media/usb/gspca/t613.c
818
sd->button_pressed = 0;
drivers/media/usb/gspca/t613.c
827
struct sd *sd __maybe_unused = (struct sd *) gspca_dev;
drivers/media/usb/gspca/t613.c
834
if (sd->button_pressed != state) {
drivers/media/usb/gspca/t613.c
838
sd->button_pressed = state;
drivers/media/usb/gspca/t613.c
862
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/t613.c
887
sd->gain->val = green_gain;
drivers/media/usb/gspca/t613.c
888
sd->red_balance->val = red_gain - green_gain;
drivers/media/usb/gspca/t613.c
889
sd->blue_balance->val = blue_gain - green_gain;
drivers/media/usb/gspca/t613.c
947
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/t613.c
964
if (sd->sensor == SENSOR_TAS5130A)
drivers/media/usb/gspca/t613.c
967
sd->awb = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/t613.c
969
sd->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/t613.c
971
sd->blue_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/t613.c
973
sd->red_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/t613.c
985
sd->freq = v4l2_ctrl_new_std_menu(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/t613.c
995
v4l2_ctrl_auto_cluster(4, &sd->awb, 0, true);
drivers/media/usb/gspca/topro.c
1021
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
1027
if (sd->bridge == BRIDGE_TP6800)
drivers/media/usb/gspca/topro.c
1048
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
1056
if (sd->bridge == BRIDGE_TP6800)
drivers/media/usb/gspca/topro.c
1401
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
1403
if (sd->sensor == SENSOR_CX0342) {
drivers/media/usb/gspca/topro.c
1407
if (sd->bridge == BRIDGE_TP6800)
drivers/media/usb/gspca/topro.c
1411
if (sd->bridge == BRIDGE_TP6800)
drivers/media/usb/gspca/topro.c
1415
if (sd->sensor == SENSOR_CX0342) {
drivers/media/usb/gspca/topro.c
1416
if (sd->bridge == BRIDGE_TP6800)
drivers/media/usb/gspca/topro.c
1420
if (sd->bridge == BRIDGE_TP6800)
drivers/media/usb/gspca/topro.c
1426
sd->bridge == BRIDGE_TP6800 ? 0x80 : 0x81);
drivers/media/usb/gspca/topro.c
1441
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
1444
gspca_dbg(gspca_dev, D_STREAM, "q %d -> %d\n", sd->quality, q);
drivers/media/usb/gspca/topro.c
1445
sd->quality = q;
drivers/media/usb/gspca/topro.c
1448
if (sd->sensor == SENSOR_SOI763A)
drivers/media/usb/gspca/topro.c
1449
jpeg_set_qual(sd->jpeg_hdr, jpeg_q[q]);
drivers/media/usb/gspca/topro.c
1451
memcpy(&sd->jpeg_hdr[JPEG_QT0_OFFSET - 1],
drivers/media/usb/gspca/topro.c
1458
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
1468
if (q == 15 && sd->bridge == BRIDGE_TP6810) {
drivers/media/usb/gspca/topro.c
1492
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
3814
if (sd->bridge == BRIDGE_TP6810)
drivers/media/usb/gspca/topro.c
3820
if (sd->bridge == BRIDGE_TP6810) {
drivers/media/usb/gspca/topro.c
3846
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
3848
if (sd->bridge == BRIDGE_TP6800) {
drivers/media/usb/gspca/topro.c
3863
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
3865
sd->ag_cnt = val ? AG_CNT_START : -1;
drivers/media/usb/gspca/topro.c
3871
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
3898
setgamma(gspca_dev, v4l2_ctrl_g_ctrl(sd->gamma));
drivers/media/usb/gspca/topro.c
3899
if (sd->sensor == SENSOR_SOI763A)
drivers/media/usb/gspca/topro.c
3900
setquality(gspca_dev, v4l2_ctrl_g_ctrl(sd->jpegqual));
drivers/media/usb/gspca/topro.c
3906
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
3909
if (sd->bridge == BRIDGE_TP6800) {
drivers/media/usb/gspca/topro.c
3911
if (sd->framerate >= rates[i])
drivers/media/usb/gspca/topro.c
3922
if (sd->framerate >= rates_6810[i])
drivers/media/usb/gspca/topro.c
3938
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
3943
if (sd->bridge == BRIDGE_TP6810) {
drivers/media/usb/gspca/topro.c
3946
sd->sensor == SENSOR_CX0342 ? 0x10 : 0x90);
drivers/media/usb/gspca/topro.c
3953
if (sd->sensor == SENSOR_CX0342)
drivers/media/usb/gspca/topro.c
3966
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
3969
if (sd->sensor == SENSOR_CX0342) {
drivers/media/usb/gspca/topro.c
3973
sd->blue->val = sd->blue->val * val / old;
drivers/media/usb/gspca/topro.c
3974
if (sd->blue->val > 4095)
drivers/media/usb/gspca/topro.c
3975
sd->blue->val = 4095;
drivers/media/usb/gspca/topro.c
3976
sd->red->val = sd->red->val * val / old;
drivers/media/usb/gspca/topro.c
3977
if (sd->red->val > 4095)
drivers/media/usb/gspca/topro.c
3978
sd->red->val = 4095;
drivers/media/usb/gspca/topro.c
3981
if (sd->sensor == SENSOR_CX0342)
drivers/media/usb/gspca/topro.c
3984
sd->blue->val, sd->red->val);
drivers/media/usb/gspca/topro.c
4003
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
4005
sd->bridge = id->driver_info;
drivers/media/usb/gspca/topro.c
4009
gspca_dev->cam.mode_framerates = sd->bridge == BRIDGE_TP6800 ?
drivers/media/usb/gspca/topro.c
4012
sd->framerate = DEFAULT_FRAME_RATE;
drivers/media/usb/gspca/topro.c
4019
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
4036
if (sd->bridge == BRIDGE_TP6800)
drivers/media/usb/gspca/topro.c
4054
sd->sensor = force_sensor;
drivers/media/usb/gspca/topro.c
4056
if (sd->bridge == BRIDGE_TP6800) {
drivers/media/usb/gspca/topro.c
4060
sd->sensor = SENSOR_SOI763A;
drivers/media/usb/gspca/topro.c
4063
sd->sensor = SENSOR_CX0342;
drivers/media/usb/gspca/topro.c
4075
sd->sensor = sensor;
drivers/media/usb/gspca/topro.c
4078
if (sd->sensor == SENSOR_SOI763A) {
drivers/media/usb/gspca/topro.c
4080
if (sd->bridge == BRIDGE_TP6810) {
drivers/media/usb/gspca/topro.c
4085
if (sd->bridge == BRIDGE_TP6810) {
drivers/media/usb/gspca/topro.c
4097
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
4124
if (sd->bridge == BRIDGE_TP6800)
drivers/media/usb/gspca/topro.c
4126
if (sd->sensor == SENSOR_CX0342) {
drivers/media/usb/gspca/topro.c
4163
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
4236
if (sd->sensor == SENSOR_CX0342)
drivers/media/usb/gspca/topro.c
4239
v4l2_ctrl_g_ctrl(sd->blue),
drivers/media/usb/gspca/topro.c
4240
v4l2_ctrl_g_ctrl(sd->red));
drivers/media/usb/gspca/topro.c
4250
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
4331
setgamma(gspca_dev, v4l2_ctrl_g_ctrl(sd->gamma));
drivers/media/usb/gspca/topro.c
4334
setsharpness(gspca_dev, v4l2_ctrl_g_ctrl(sd->sharpness));
drivers/media/usb/gspca/topro.c
4350
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
4450
setsharpness(gspca_dev, v4l2_ctrl_g_ctrl(sd->sharpness));
drivers/media/usb/gspca/topro.c
4456
if (sd->sensor == SENSOR_CX0342)
drivers/media/usb/gspca/topro.c
4459
v4l2_ctrl_g_ctrl(sd->blue),
drivers/media/usb/gspca/topro.c
4460
v4l2_ctrl_g_ctrl(sd->red));
drivers/media/usb/gspca/topro.c
4464
if (sd->sensor == SENSOR_SOI763A)
drivers/media/usb/gspca/topro.c
4465
setquality(gspca_dev, v4l2_ctrl_g_ctrl(sd->jpegqual));
drivers/media/usb/gspca/topro.c
4466
setgamma(gspca_dev, v4l2_ctrl_g_ctrl(sd->gamma));
drivers/media/usb/gspca/topro.c
4471
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
4495
if (sd->sensor == SENSOR_CX0342)
drivers/media/usb/gspca/topro.c
4498
v4l2_ctrl_g_ctrl(sd->blue),
drivers/media/usb/gspca/topro.c
4499
v4l2_ctrl_g_ctrl(sd->red));
drivers/media/usb/gspca/topro.c
4516
setgamma(gspca_dev, v4l2_ctrl_g_ctrl(sd->gamma));
drivers/media/usb/gspca/topro.c
4527
setsharpness(gspca_dev, v4l2_ctrl_g_ctrl(sd->sharpness));
drivers/media/usb/gspca/topro.c
4532
if (sd->sensor == SENSOR_CX0342)
drivers/media/usb/gspca/topro.c
4535
v4l2_ctrl_g_ctrl(sd->blue),
drivers/media/usb/gspca/topro.c
4536
v4l2_ctrl_g_ctrl(sd->red));
drivers/media/usb/gspca/topro.c
4546
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
4548
jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
drivers/media/usb/gspca/topro.c
4550
set_dqt(gspca_dev, sd->quality);
drivers/media/usb/gspca/topro.c
4551
if (sd->bridge == BRIDGE_TP6800) {
drivers/media/usb/gspca/topro.c
4552
if (sd->sensor == SENSOR_CX0342)
drivers/media/usb/gspca/topro.c
4557
if (sd->sensor == SENSOR_CX0342)
drivers/media/usb/gspca/topro.c
4566
if (sd->sensor == SENSOR_CX0342)
drivers/media/usb/gspca/topro.c
4570
v4l2_ctrl_g_ctrl(sd->blue),
drivers/media/usb/gspca/topro.c
4571
v4l2_ctrl_g_ctrl(sd->red));
drivers/media/usb/gspca/topro.c
4576
if (sd->sensor == SENSOR_SOI763A)
drivers/media/usb/gspca/topro.c
4578
v4l2_ctrl_g_ctrl(sd->jpegqual));
drivers/media/usb/gspca/topro.c
4579
if (sd->bridge == BRIDGE_TP6810)
drivers/media/usb/gspca/topro.c
4591
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
4593
if (sd->bridge == BRIDGE_TP6800)
drivers/media/usb/gspca/topro.c
4603
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
4612
if (sd->bridge == BRIDGE_TP6810) {
drivers/media/usb/gspca/topro.c
4635
if ((data[6] & 0x0f) != sd->quality)
drivers/media/usb/gspca/topro.c
4638
sd->jpeg_hdr, JPEG_HDR_SZ);
drivers/media/usb/gspca/topro.c
4663
if (data[7] != sd->quality)
drivers/media/usb/gspca/topro.c
4666
sd->jpeg_hdr, JPEG_HDR_SZ);
drivers/media/usb/gspca/topro.c
4685
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
4689
if (sd->ag_cnt < 0)
drivers/media/usb/gspca/topro.c
4691
if (--sd->ag_cnt > 5)
drivers/media/usb/gspca/topro.c
4693
switch (sd->ag_cnt) {
drivers/media/usb/gspca/topro.c
4750
sd->ag_cnt = AG_CNT_START;
drivers/media/usb/gspca/topro.c
4751
if (sd->bridge == BRIDGE_TP6810) {
drivers/media/usb/gspca/topro.c
4766
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
4774
if (sd->bridge == BRIDGE_TP6800)
drivers/media/usb/gspca/topro.c
4788
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
4794
sd->framerate = DEFAULT_FRAME_RATE;
drivers/media/usb/gspca/topro.c
4796
sd->framerate = tpf->denominator / tpf->numerator;
drivers/media/usb/gspca/topro.c
4814
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
4816
if (sd->sensor != SENSOR_SOI763A)
drivers/media/usb/gspca/topro.c
4818
v4l2_ctrl_s_ctrl(sd->jpegqual, jcomp->quality);
drivers/media/usb/gspca/topro.c
4825
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/topro.c
4827
if (sd->sensor != SENSOR_SOI763A)
drivers/media/usb/gspca/topro.c
4830
jcomp->quality = v4l2_ctrl_g_ctrl(sd->jpegqual);
drivers/media/usb/gspca/topro.c
4840
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/topro.c
4869
jpeg_set_qual(sd->jpeg_hdr, ctrl->val);
drivers/media/usb/gspca/topro.c
4881
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/topro.c
4888
if (sd->sensor == SENSOR_CX0342) {
drivers/media/usb/gspca/topro.c
4889
sd->red = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/topro.c
4891
sd->blue = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/topro.c
4894
if (sd->sensor == SENSOR_SOI763A)
drivers/media/usb/gspca/topro.c
4900
sd->sharpness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/topro.c
4902
sd->gamma = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/topro.c
4904
(sd->sensor == SENSOR_SOI763A &&
drivers/media/usb/gspca/topro.c
4905
sd->bridge == BRIDGE_TP6800) ? 0 : 1);
drivers/media/usb/gspca/topro.c
4906
if (sd->bridge == BRIDGE_TP6810)
drivers/media/usb/gspca/topro.c
4909
if (sd->sensor == SENSOR_SOI763A)
drivers/media/usb/gspca/topro.c
4910
sd->jpegqual = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/topro.c
4912
0, 15, 1, (sd->bridge == BRIDGE_TP6810) ? 0 : 13);
drivers/media/usb/gspca/topro.c
4952
return gspca_dev_probe(interface, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/touptek.c
537
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/touptek.c
540
sd->this_f = 0;
drivers/media/usb/gspca/touptek.c
556
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/touptek.c
560
if (sd->this_f + len == gspca_dev->pixfmt.sizeimage) {
drivers/media/usb/gspca/touptek.c
563
sd->this_f, gspca_dev->pixfmt.sizeimage, len);
drivers/media/usb/gspca/touptek.c
568
sd->this_f, gspca_dev->pixfmt.sizeimage, len);
drivers/media/usb/gspca/touptek.c
570
sd->this_f = 0;
drivers/media/usb/gspca/touptek.c
572
if (sd->this_f == 0)
drivers/media/usb/gspca/touptek.c
576
sd->this_f += len;
drivers/media/usb/gspca/touptek.c
589
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/touptek.c
605
sd->blue->val = ctrl->val;
drivers/media/usb/gspca/touptek.c
606
setbgain(gspca_dev, sd->blue->val, gspca_dev->gain->val);
drivers/media/usb/gspca/touptek.c
609
sd->red->val = ctrl->val;
drivers/media/usb/gspca/touptek.c
610
setrgain(gspca_dev, sd->red->val, gspca_dev->gain->val);
drivers/media/usb/gspca/touptek.c
622
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/touptek.c
634
sd->blue = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/touptek.c
636
sd->red = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/touptek.c
697
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/tv8532.c
205
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/tv8532.c
237
sd->packet = 0; /* ignore the first packets */
drivers/media/usb/gspca/tv8532.c
251
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/tv8532.c
257
sd->packet = gspca_dev->pixfmt.height / 2;
drivers/media/usb/gspca/tv8532.c
259
} else if (sd->packet == 0)
drivers/media/usb/gspca/tv8532.c
261
sd->packet--;
drivers/media/usb/gspca/tv8532.c
262
if (sd->packet == 0)
drivers/media/usb/gspca/tv8532.c
349
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/vc032x.c
3002
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/vc032x.c
3008
if (sd->flags & FL_SAMSUNG) {
drivers/media/usb/gspca/vc032x.c
3016
sd->bridge == BRIDGE_VC0321 ? 1 : 3, gspca_dev->usb_buf[0]);
drivers/media/usb/gspca/vc032x.c
3017
if (sd->bridge == BRIDGE_VC0321) {
drivers/media/usb/gspca/vc032x.c
3130
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/vc032x.c
3132
sd->bridge = id->driver_info >> 8;
drivers/media/usb/gspca/vc032x.c
3133
sd->flags = id->driver_info & 0xff;
drivers/media/usb/gspca/vc032x.c
3137
sd->sensor = SENSOR_POxxxx; /* no probe */
drivers/media/usb/gspca/vc032x.c
3145
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/vc032x.c
3162
if (sd->sensor != SENSOR_POxxxx)
drivers/media/usb/gspca/vc032x.c
3165
sensor = sd->sensor;
drivers/media/usb/gspca/vc032x.c
3176
sd->bridge = BRIDGE_VC0323;
drivers/media/usb/gspca/vc032x.c
3203
sd->sensor = sensor;
drivers/media/usb/gspca/vc032x.c
3206
if (sd->bridge == BRIDGE_VC0321) {
drivers/media/usb/gspca/vc032x.c
3233
cam->npkt = npkt[sd->sensor];
drivers/media/usb/gspca/vc032x.c
3235
if (sd->sensor == SENSOR_OV7670)
drivers/media/usb/gspca/vc032x.c
3236
sd->flags |= FL_HFLIP | FL_VFLIP;
drivers/media/usb/gspca/vc032x.c
3238
if (sd->bridge == BRIDGE_VC0321) {
drivers/media/usb/gspca/vc032x.c
3243
if (sd->sensor == SENSOR_POxxxx) {
drivers/media/usb/gspca/vc032x.c
3283
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/vc032x.c
3286
if (sd->flags & FL_HFLIP)
drivers/media/usb/gspca/vc032x.c
3288
if (sd->flags & FL_VFLIP)
drivers/media/usb/gspca/vc032x.c
3290
switch (sd->sensor) {
drivers/media/usb/gspca/vc032x.c
3296
data[0] = sd->sensor == SENSOR_MI1310_SOC ? 0x03 : 0x01;
drivers/media/usb/gspca/vc032x.c
3303
data[0] = sd->sensor == SENSOR_OV7660 ? 0x01 : 0x07;
drivers/media/usb/gspca/vc032x.c
3321
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/vc032x.c
3325
if (sd->sensor != SENSOR_OV7660)
drivers/media/usb/gspca/vc032x.c
3332
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/vc032x.c
3335
switch (sd->sensor) {
drivers/media/usb/gspca/vc032x.c
3422
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/vc032x.c
3434
if (sd->flags & FL_SAMSUNG) {
drivers/media/usb/gspca/vc032x.c
3441
if (sd->bridge == BRIDGE_VC0321) {
drivers/media/usb/gspca/vc032x.c
3446
sd->image_offset = 46;
drivers/media/usb/gspca/vc032x.c
3450
sd->image_offset = 0;
drivers/media/usb/gspca/vc032x.c
3452
sd->image_offset = 32;
drivers/media/usb/gspca/vc032x.c
3456
switch (sd->sensor) {
drivers/media/usb/gspca/vc032x.c
3553
switch (sd->sensor) {
drivers/media/usb/gspca/vc032x.c
3564
switch (sd->sensor) {
drivers/media/usb/gspca/vc032x.c
3582
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/vc032x.c
3584
switch (sd->sensor) {
drivers/media/usb/gspca/vc032x.c
3591
if (!(sd->flags & FL_SAMSUNG))
drivers/media/usb/gspca/vc032x.c
3602
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/vc032x.c
3607
if (sd->sensor == SENSOR_MI1310_SOC)
drivers/media/usb/gspca/vc032x.c
3609
else if (!(sd->flags & FL_SAMSUNG))
drivers/media/usb/gspca/vc032x.c
3612
if (sd->sensor == SENSOR_POxxxx) {
drivers/media/usb/gspca/vc032x.c
3623
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/vc032x.c
3629
data += sd->image_offset;
drivers/media/usb/gspca/vc032x.c
3630
len -= sd->image_offset;
drivers/media/usb/gspca/vc032x.c
3637
if (sd->bridge == BRIDGE_VC0321) {
drivers/media/usb/gspca/vc032x.c
3652
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/vc032x.c
3670
sethvflip(gspca_dev, sd->hflip->val, sd->vflip->val);
drivers/media/usb/gspca/vc032x.c
3700
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/vc032x.c
3713
switch (sd->sensor) {
drivers/media/usb/gspca/vc032x.c
3749
sd->hflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/vc032x.c
3751
sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/vc032x.c
3779
if (sd->hflip)
drivers/media/usb/gspca/vc032x.c
3780
v4l2_ctrl_cluster(2, &sd->hflip);
drivers/media/usb/gspca/vc032x.c
3822
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/gspca/vicam.c
169
struct sd *sd = container_of(work, struct sd, work_struct);
drivers/media/usb/gspca/vicam.c
170
struct gspca_dev *gspca_dev = &sd->gspca_dev;
drivers/media/usb/gspca/vicam.c
210
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/vicam.c
218
INIT_WORK(&sd->work_struct, vicam_dostream);
drivers/media/usb/gspca/vicam.c
266
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/vicam.c
273
schedule_work(&sd->work_struct);
drivers/media/usb/gspca/vicam.c
282
struct sd *dev = (struct sd *)gspca_dev;
drivers/media/usb/gspca/vicam.c
337
sizeof(struct sd),
drivers/media/usb/gspca/w996Xcf.c
104
sd->gspca_dev.usb_err = ret;
drivers/media/usb/gspca/w996Xcf.c
112
static int w9968cf_read_sb(struct sd *sd)
drivers/media/usb/gspca/w996Xcf.c
116
if (sd->gspca_dev.usb_err < 0)
drivers/media/usb/gspca/w996Xcf.c
124
ret = usb_control_msg(sd->gspca_dev.dev,
drivers/media/usb/gspca/w996Xcf.c
125
usb_rcvctrlpipe(sd->gspca_dev.dev, 0),
drivers/media/usb/gspca/w996Xcf.c
128
0, 0x01, sd->gspca_dev.usb_buf, 2, 500);
drivers/media/usb/gspca/w996Xcf.c
130
ret = sd->gspca_dev.usb_buf[0] |
drivers/media/usb/gspca/w996Xcf.c
131
(sd->gspca_dev.usb_buf[1] << 8);
drivers/media/usb/gspca/w996Xcf.c
134
sd->gspca_dev.usb_err = ret;
drivers/media/usb/gspca/w996Xcf.c
139
memset(sd->gspca_dev.usb_buf, 0, 2);
drivers/media/usb/gspca/w996Xcf.c
152
static void w9968cf_upload_quantizationtables(struct sd *sd)
drivers/media/usb/gspca/w996Xcf.c
157
reg_w(sd, 0x39, 0x0010); /* JPEG clock enable */
drivers/media/usb/gspca/w996Xcf.c
162
reg_w(sd, 0x40 + i, a);
drivers/media/usb/gspca/w996Xcf.c
163
reg_w(sd, 0x60 + i, b);
drivers/media/usb/gspca/w996Xcf.c
165
reg_w(sd, 0x39, 0x0012); /* JPEG encoder enable */
drivers/media/usb/gspca/w996Xcf.c
176
static void w9968cf_smbus_start(struct sd *sd)
drivers/media/usb/gspca/w996Xcf.c
178
w9968cf_write_sb(sd, 0x0011); /* SDE=1, SDA=0, SCL=1 */
drivers/media/usb/gspca/w996Xcf.c
179
w9968cf_write_sb(sd, 0x0010); /* SDE=1, SDA=0, SCL=0 */
drivers/media/usb/gspca/w996Xcf.c
182
static void w9968cf_smbus_stop(struct sd *sd)
drivers/media/usb/gspca/w996Xcf.c
184
w9968cf_write_sb(sd, 0x0010); /* SDE=1, SDA=0, SCL=0 */
drivers/media/usb/gspca/w996Xcf.c
185
w9968cf_write_sb(sd, 0x0011); /* SDE=1, SDA=0, SCL=1 */
drivers/media/usb/gspca/w996Xcf.c
186
w9968cf_write_sb(sd, 0x0013); /* SDE=1, SDA=1, SCL=1 */
drivers/media/usb/gspca/w996Xcf.c
189
static void w9968cf_smbus_write_byte(struct sd *sd, u8 v)
drivers/media/usb/gspca/w996Xcf.c
198
w9968cf_write_sb(sd, 0x10 | sda);
drivers/media/usb/gspca/w996Xcf.c
200
w9968cf_write_sb(sd, 0x11 | sda);
drivers/media/usb/gspca/w996Xcf.c
202
w9968cf_write_sb(sd, 0x10 | sda);
drivers/media/usb/gspca/w996Xcf.c
206
static void w9968cf_smbus_read_byte(struct sd *sd, u8 *v)
drivers/media/usb/gspca/w996Xcf.c
216
w9968cf_write_sb(sd, 0x0013);
drivers/media/usb/gspca/w996Xcf.c
217
*v |= (w9968cf_read_sb(sd) & 0x0008) ? 1 : 0;
drivers/media/usb/gspca/w996Xcf.c
219
w9968cf_write_sb(sd, 0x0012);
drivers/media/usb/gspca/w996Xcf.c
223
static void w9968cf_smbus_write_nack(struct sd *sd)
drivers/media/usb/gspca/w996Xcf.c
227
w9968cf_write_sb(sd, 0x0013); /* SDE=1, SDA=1, SCL=1 */
drivers/media/usb/gspca/w996Xcf.c
228
w9968cf_write_sb(sd, 0x0012); /* SDE=1, SDA=1, SCL=0 */
drivers/media/usb/gspca/w996Xcf.c
23
#define Y_QUANTABLE (&sd->jpeg_hdr[JPEG_QT0_OFFSET])
drivers/media/usb/gspca/w996Xcf.c
231
static void w9968cf_smbus_read_ack(struct sd *sd)
drivers/media/usb/gspca/w996Xcf.c
233
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/w996Xcf.c
237
w9968cf_write_sb(sd, 0x0012); /* SDE=1, SDA=1, SCL=0 */
drivers/media/usb/gspca/w996Xcf.c
238
w9968cf_write_sb(sd, 0x0013); /* SDE=1, SDA=1, SCL=1 */
drivers/media/usb/gspca/w996Xcf.c
239
sda = w9968cf_read_sb(sd);
drivers/media/usb/gspca/w996Xcf.c
24
#define UV_QUANTABLE (&sd->jpeg_hdr[JPEG_QT1_OFFSET])
drivers/media/usb/gspca/w996Xcf.c
240
w9968cf_write_sb(sd, 0x0012); /* SDE=1, SDA=1, SCL=0 */
drivers/media/usb/gspca/w996Xcf.c
243
sd->gspca_dev.usb_err = -EIO;
drivers/media/usb/gspca/w996Xcf.c
248
static void w9968cf_i2c_w(struct sd *sd, u8 reg, u8 value)
drivers/media/usb/gspca/w996Xcf.c
250
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/w996Xcf.c
251
u16* data = (u16 *)sd->gspca_dev.usb_buf;
drivers/media/usb/gspca/w996Xcf.c
253
data[0] = 0x082f | ((sd->sensor_addr & 0x80) ? 0x1500 : 0x0);
drivers/media/usb/gspca/w996Xcf.c
254
data[0] |= (sd->sensor_addr & 0x40) ? 0x4000 : 0x0;
drivers/media/usb/gspca/w996Xcf.c
255
data[1] = 0x2082 | ((sd->sensor_addr & 0x40) ? 0x0005 : 0x0);
drivers/media/usb/gspca/w996Xcf.c
256
data[1] |= (sd->sensor_addr & 0x20) ? 0x0150 : 0x0;
drivers/media/usb/gspca/w996Xcf.c
257
data[1] |= (sd->sensor_addr & 0x10) ? 0x5400 : 0x0;
drivers/media/usb/gspca/w996Xcf.c
258
data[2] = 0x8208 | ((sd->sensor_addr & 0x08) ? 0x0015 : 0x0);
drivers/media/usb/gspca/w996Xcf.c
259
data[2] |= (sd->sensor_addr & 0x04) ? 0x0540 : 0x0;
drivers/media/usb/gspca/w996Xcf.c
260
data[2] |= (sd->sensor_addr & 0x02) ? 0x5000 : 0x0;
drivers/media/usb/gspca/w996Xcf.c
261
data[3] = 0x1d20 | ((sd->sensor_addr & 0x02) ? 0x0001 : 0x0);
drivers/media/usb/gspca/w996Xcf.c
262
data[3] |= (sd->sensor_addr & 0x01) ? 0x0054 : 0x0;
drivers/media/usb/gspca/w996Xcf.c
264
w9968cf_write_fsb(sd, data);
drivers/media/usb/gspca/w996Xcf.c
278
w9968cf_write_fsb(sd, data);
drivers/media/usb/gspca/w996Xcf.c
292
w9968cf_write_fsb(sd, data);
drivers/media/usb/gspca/w996Xcf.c
298
static int w9968cf_i2c_r(struct sd *sd, u8 reg)
drivers/media/usb/gspca/w996Xcf.c
300
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
drivers/media/usb/gspca/w996Xcf.c
305
w9968cf_write_sb(sd, 0x0013); /* don't change ! */
drivers/media/usb/gspca/w996Xcf.c
307
w9968cf_smbus_start(sd);
drivers/media/usb/gspca/w996Xcf.c
308
w9968cf_smbus_write_byte(sd, sd->sensor_addr);
drivers/media/usb/gspca/w996Xcf.c
309
w9968cf_smbus_read_ack(sd);
drivers/media/usb/gspca/w996Xcf.c
310
w9968cf_smbus_write_byte(sd, reg);
drivers/media/usb/gspca/w996Xcf.c
311
w9968cf_smbus_read_ack(sd);
drivers/media/usb/gspca/w996Xcf.c
312
w9968cf_smbus_stop(sd);
drivers/media/usb/gspca/w996Xcf.c
313
w9968cf_smbus_start(sd);
drivers/media/usb/gspca/w996Xcf.c
314
w9968cf_smbus_write_byte(sd, sd->sensor_addr + 1);
drivers/media/usb/gspca/w996Xcf.c
315
w9968cf_smbus_read_ack(sd);
drivers/media/usb/gspca/w996Xcf.c
316
w9968cf_smbus_read_byte(sd, &value);
drivers/media/usb/gspca/w996Xcf.c
320
w9968cf_smbus_write_nack(sd);
drivers/media/usb/gspca/w996Xcf.c
321
w9968cf_smbus_stop(sd);
drivers/media/usb/gspca/w996Xcf.c
324
w9968cf_write_sb(sd, 0x0030);
drivers/media/usb/gspca/w996Xcf.c
326
if (sd->gspca_dev.usb_err >= 0) {
drivers/media/usb/gspca/w996Xcf.c
340
static void w9968cf_configure(struct sd *sd)
drivers/media/usb/gspca/w996Xcf.c
342
reg_w(sd, 0x00, 0xff00); /* power-down */
drivers/media/usb/gspca/w996Xcf.c
343
reg_w(sd, 0x00, 0xbf17); /* reset everything */
drivers/media/usb/gspca/w996Xcf.c
344
reg_w(sd, 0x00, 0xbf10); /* normal operation */
drivers/media/usb/gspca/w996Xcf.c
345
reg_w(sd, 0x01, 0x0010); /* serial bus, SDS high */
drivers/media/usb/gspca/w996Xcf.c
346
reg_w(sd, 0x01, 0x0000); /* serial bus, SDS low */
drivers/media/usb/gspca/w996Xcf.c
347
reg_w(sd, 0x01, 0x0010); /* ..high 'beep-beep' */
drivers/media/usb/gspca/w996Xcf.c
348
reg_w(sd, 0x01, 0x0030); /* Set sda scl to FSB mode */
drivers/media/usb/gspca/w996Xcf.c
350
sd->stopped = 1;
drivers/media/usb/gspca/w996Xcf.c
353
static void w9968cf_init(struct sd *sd)
drivers/media/usb/gspca/w996Xcf.c
355
unsigned long hw_bufsize = sd->sif ? (352 * 288 * 2) : (640 * 480 * 2),
drivers/media/usb/gspca/w996Xcf.c
363
reg_w(sd, 0x00, 0xff00); /* power off */
drivers/media/usb/gspca/w996Xcf.c
364
reg_w(sd, 0x00, 0xbf10); /* power on */
drivers/media/usb/gspca/w996Xcf.c
366
reg_w(sd, 0x03, 0x405d); /* DRAM timings */
drivers/media/usb/gspca/w996Xcf.c
367
reg_w(sd, 0x04, 0x0030); /* SDRAM timings */
drivers/media/usb/gspca/w996Xcf.c
369
reg_w(sd, 0x20, y0 & 0xffff); /* Y buf.0, low */
drivers/media/usb/gspca/w996Xcf.c
370
reg_w(sd, 0x21, y0 >> 16); /* Y buf.0, high */
drivers/media/usb/gspca/w996Xcf.c
371
reg_w(sd, 0x24, u0 & 0xffff); /* U buf.0, low */
drivers/media/usb/gspca/w996Xcf.c
372
reg_w(sd, 0x25, u0 >> 16); /* U buf.0, high */
drivers/media/usb/gspca/w996Xcf.c
373
reg_w(sd, 0x28, v0 & 0xffff); /* V buf.0, low */
drivers/media/usb/gspca/w996Xcf.c
374
reg_w(sd, 0x29, v0 >> 16); /* V buf.0, high */
drivers/media/usb/gspca/w996Xcf.c
376
reg_w(sd, 0x22, y1 & 0xffff); /* Y buf.1, low */
drivers/media/usb/gspca/w996Xcf.c
377
reg_w(sd, 0x23, y1 >> 16); /* Y buf.1, high */
drivers/media/usb/gspca/w996Xcf.c
378
reg_w(sd, 0x26, u1 & 0xffff); /* U buf.1, low */
drivers/media/usb/gspca/w996Xcf.c
379
reg_w(sd, 0x27, u1 >> 16); /* U buf.1, high */
drivers/media/usb/gspca/w996Xcf.c
380
reg_w(sd, 0x2a, v1 & 0xffff); /* V buf.1, low */
drivers/media/usb/gspca/w996Xcf.c
381
reg_w(sd, 0x2b, v1 >> 16); /* V buf.1, high */
drivers/media/usb/gspca/w996Xcf.c
383
reg_w(sd, 0x32, y1 & 0xffff); /* JPEG buf 0 low */
drivers/media/usb/gspca/w996Xcf.c
384
reg_w(sd, 0x33, y1 >> 16); /* JPEG buf 0 high */
drivers/media/usb/gspca/w996Xcf.c
386
reg_w(sd, 0x34, y1 & 0xffff); /* JPEG buf 1 low */
drivers/media/usb/gspca/w996Xcf.c
387
reg_w(sd, 0x35, y1 >> 16); /* JPEG bug 1 high */
drivers/media/usb/gspca/w996Xcf.c
389
reg_w(sd, 0x36, 0x0000);/* JPEG restart interval */
drivers/media/usb/gspca/w996Xcf.c
390
reg_w(sd, 0x37, 0x0804);/*JPEG VLE FIFO threshold*/
drivers/media/usb/gspca/w996Xcf.c
391
reg_w(sd, 0x38, 0x0000);/* disable hw up-scaling */
drivers/media/usb/gspca/w996Xcf.c
392
reg_w(sd, 0x3f, 0x0000); /* JPEG/MCTL test data */
drivers/media/usb/gspca/w996Xcf.c
395
static void w9968cf_set_crop_window(struct sd *sd)
drivers/media/usb/gspca/w996Xcf.c
400
if (sd->sif) {
drivers/media/usb/gspca/w996Xcf.c
408
if (sd->sensor == SEN_OV7620) {
drivers/media/usb/gspca/w996Xcf.c
416
if (sd->freq->val == 1) {
drivers/media/usb/gspca/w996Xcf.c
432
fw = SC(sd->gspca_dev.pixfmt.width) / max_width;
drivers/media/usb/gspca/w996Xcf.c
433
fh = SC(sd->gspca_dev.pixfmt.height) / max_height;
drivers/media/usb/gspca/w996Xcf.c
435
cw = (fw >= fh) ? max_width : SC(sd->gspca_dev.pixfmt.width) / fh;
drivers/media/usb/gspca/w996Xcf.c
436
ch = (fw >= fh) ? SC(sd->gspca_dev.pixfmt.height) / fw : max_height;
drivers/media/usb/gspca/w996Xcf.c
438
sd->sensor_width = max_width;
drivers/media/usb/gspca/w996Xcf.c
439
sd->sensor_height = max_height;
drivers/media/usb/gspca/w996Xcf.c
444
reg_w(sd, 0x10, start_cropx + x);
drivers/media/usb/gspca/w996Xcf.c
445
reg_w(sd, 0x11, start_cropy + y);
drivers/media/usb/gspca/w996Xcf.c
446
reg_w(sd, 0x12, start_cropx + x + cw);
drivers/media/usb/gspca/w996Xcf.c
447
reg_w(sd, 0x13, start_cropy + y + ch);
drivers/media/usb/gspca/w996Xcf.c
450
static void w9968cf_mode_init_regs(struct sd *sd)
drivers/media/usb/gspca/w996Xcf.c
454
w9968cf_set_crop_window(sd);
drivers/media/usb/gspca/w996Xcf.c
456
reg_w(sd, 0x14, sd->gspca_dev.pixfmt.width);
drivers/media/usb/gspca/w996Xcf.c
457
reg_w(sd, 0x15, sd->gspca_dev.pixfmt.height);
drivers/media/usb/gspca/w996Xcf.c
460
reg_w(sd, 0x30, sd->gspca_dev.pixfmt.width);
drivers/media/usb/gspca/w996Xcf.c
461
reg_w(sd, 0x31, sd->gspca_dev.pixfmt.height);
drivers/media/usb/gspca/w996Xcf.c
464
if (w9968cf_vga_mode[sd->gspca_dev.curr_mode].pixelformat ==
drivers/media/usb/gspca/w996Xcf.c
466
reg_w(sd, 0x2c, sd->gspca_dev.pixfmt.width / 2);
drivers/media/usb/gspca/w996Xcf.c
467
reg_w(sd, 0x2d, sd->gspca_dev.pixfmt.width / 4);
drivers/media/usb/gspca/w996Xcf.c
469
reg_w(sd, 0x2c, sd->gspca_dev.pixfmt.width);
drivers/media/usb/gspca/w996Xcf.c
471
reg_w(sd, 0x00, 0xbf17); /* reset everything */
drivers/media/usb/gspca/w996Xcf.c
472
reg_w(sd, 0x00, 0xbf10); /* normal operation */
drivers/media/usb/gspca/w996Xcf.c
475
val = sd->gspca_dev.pixfmt.width * sd->gspca_dev.pixfmt.height;
drivers/media/usb/gspca/w996Xcf.c
476
reg_w(sd, 0x3d, val & 0xffff); /* low bits */
drivers/media/usb/gspca/w996Xcf.c
477
reg_w(sd, 0x3e, val >> 16); /* high bits */
drivers/media/usb/gspca/w996Xcf.c
479
if (w9968cf_vga_mode[sd->gspca_dev.curr_mode].pixelformat ==
drivers/media/usb/gspca/w996Xcf.c
482
jpeg_define(sd->jpeg_hdr, sd->gspca_dev.pixfmt.height,
drivers/media/usb/gspca/w996Xcf.c
483
sd->gspca_dev.pixfmt.width, 0x22); /* JPEG 420 */
drivers/media/usb/gspca/w996Xcf.c
484
jpeg_set_qual(sd->jpeg_hdr, v4l2_ctrl_g_ctrl(sd->jpegqual));
drivers/media/usb/gspca/w996Xcf.c
485
w9968cf_upload_quantizationtables(sd);
drivers/media/usb/gspca/w996Xcf.c
486
v4l2_ctrl_grab(sd->jpegqual, true);
drivers/media/usb/gspca/w996Xcf.c
49
static void reg_w(struct sd *sd, u16 index, u16 value);
drivers/media/usb/gspca/w996Xcf.c
490
if (sd->sensor == SEN_OV7620) {
drivers/media/usb/gspca/w996Xcf.c
505
if (w9968cf_vga_mode[sd->gspca_dev.curr_mode].pixelformat ==
drivers/media/usb/gspca/w996Xcf.c
518
reg_w(sd, 0x16, val);
drivers/media/usb/gspca/w996Xcf.c
520
sd->gspca_dev.empty_packet = 0;
drivers/media/usb/gspca/w996Xcf.c
523
static void w9968cf_stop0(struct sd *sd)
drivers/media/usb/gspca/w996Xcf.c
525
v4l2_ctrl_grab(sd->jpegqual, false);
drivers/media/usb/gspca/w996Xcf.c
526
reg_w(sd, 0x39, 0x0000); /* disable JPEG encoder */
drivers/media/usb/gspca/w996Xcf.c
527
reg_w(sd, 0x16, 0x0000); /* stop video capture */
drivers/media/usb/gspca/w996Xcf.c
542
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/w996Xcf.c
55
static void w9968cf_write_fsb(struct sd *sd, u16* data)
drivers/media/usb/gspca/w996Xcf.c
552
sd->jpeg_hdr, JPEG_HDR_SZ);
drivers/media/usb/gspca/w996Xcf.c
57
struct usb_device *udev = sd->gspca_dev.dev;
drivers/media/usb/gspca/w996Xcf.c
61
if (sd->gspca_dev.usb_err < 0)
drivers/media/usb/gspca/w996Xcf.c
65
memcpy(sd->gspca_dev.usb_buf, data, 6);
drivers/media/usb/gspca/w996Xcf.c
71
value, 0x06, sd->gspca_dev.usb_buf, 6, 500);
drivers/media/usb/gspca/w996Xcf.c
74
sd->gspca_dev.usb_err = ret;
drivers/media/usb/gspca/w996Xcf.c
82
static void w9968cf_write_sb(struct sd *sd, u16 value)
drivers/media/usb/gspca/w996Xcf.c
86
if (sd->gspca_dev.usb_err < 0)
drivers/media/usb/gspca/w996Xcf.c
94
ret = usb_control_msg(sd->gspca_dev.dev,
drivers/media/usb/gspca/w996Xcf.c
95
usb_sndctrlpipe(sd->gspca_dev.dev, 0),
drivers/media/usb/gspca/xirlink_cit.c
1121
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
1123
switch (sd->model) {
drivers/media/usb/gspca/xirlink_cit.c
1143
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
1146
switch (sd->model) {
drivers/media/usb/gspca/xirlink_cit.c
1183
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
1185
switch (sd->model) {
drivers/media/usb/gspca/xirlink_cit.c
1246
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
1248
switch (sd->model) {
drivers/media/usb/gspca/xirlink_cit.c
1298
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
1300
switch (sd->model) {
drivers/media/usb/gspca/xirlink_cit.c
1366
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
1368
switch (sd->model) {
drivers/media/usb/gspca/xirlink_cit.c
1386
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
1388
switch (sd->model) {
drivers/media/usb/gspca/xirlink_cit.c
1406
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
1408
switch (sd->model) {
drivers/media/usb/gspca/xirlink_cit.c
1428
sd->sof_read = 0;
drivers/media/usb/gspca/xirlink_cit.c
1533
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
1690
v4l2_ctrl_g_ctrl(sd->lighting));
drivers/media/usb/gspca/xirlink_cit.c
1735
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
1756
sd->sof_len = 10;
drivers/media/usb/gspca/xirlink_cit.c
1764
sd->sof_len = 2;
drivers/media/usb/gspca/xirlink_cit.c
1773
sd->sof_len = 2;
drivers/media/usb/gspca/xirlink_cit.c
1782
sd->sof_len = 2;
drivers/media/usb/gspca/xirlink_cit.c
1914
cit_model2_Packet1(gspca_dev, 0x0028, v4l2_ctrl_g_ctrl(sd->lighting));
drivers/media/usb/gspca/xirlink_cit.c
1916
v4l2_ctrl_grab(sd->lighting, true);
drivers/media/usb/gspca/xirlink_cit.c
2173
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
2265
sd->sof_len = 2;
drivers/media/usb/gspca/xirlink_cit.c
2320
sd->sof_len = 2;
drivers/media/usb/gspca/xirlink_cit.c
2377
sd->sof_len = 10;
drivers/media/usb/gspca/xirlink_cit.c
2432
sd->sof_len = 2;
drivers/media/usb/gspca/xirlink_cit.c
2487
sd->sof_len = 2;
drivers/media/usb/gspca/xirlink_cit.c
2593
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
2600
switch (sd->model) {
drivers/media/usb/gspca/xirlink_cit.c
2708
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
2713
switch (sd->model) {
drivers/media/usb/gspca/xirlink_cit.c
2727
v4l2_ctrl_grab(sd->lighting, false);
drivers/media/usb/gspca/xirlink_cit.c
2774
if (sd->button_state) {
drivers/media/usb/gspca/xirlink_cit.c
2777
sd->button_state = 0;
drivers/media/usb/gspca/xirlink_cit.c
2784
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
2788
switch (sd->model) {
drivers/media/usb/gspca/xirlink_cit.c
2817
if (sd->model <= CIT_MODEL1)
drivers/media/usb/gspca/xirlink_cit.c
2823
if (sd->model == CIT_MODEL0 && sd->sof_read != i)
drivers/media/usb/gspca/xirlink_cit.c
2826
switch (sd->sof_read) {
drivers/media/usb/gspca/xirlink_cit.c
2829
sd->sof_read++;
drivers/media/usb/gspca/xirlink_cit.c
2833
sd->sof_read++;
drivers/media/usb/gspca/xirlink_cit.c
2835
sd->sof_read = 1;
drivers/media/usb/gspca/xirlink_cit.c
2837
sd->sof_read = 0;
drivers/media/usb/gspca/xirlink_cit.c
2841
sd->sof_read++;
drivers/media/usb/gspca/xirlink_cit.c
2843
sd->sof_read = 1;
drivers/media/usb/gspca/xirlink_cit.c
2845
sd->sof_read = 0;
drivers/media/usb/gspca/xirlink_cit.c
2849
sd->sof_read = 0;
drivers/media/usb/gspca/xirlink_cit.c
2850
return data + i + (sd->sof_len - 3);
drivers/media/usb/gspca/xirlink_cit.c
2853
sd->sof_read = 2;
drivers/media/usb/gspca/xirlink_cit.c
2855
sd->sof_read = 1;
drivers/media/usb/gspca/xirlink_cit.c
2857
sd->sof_read = 0;
drivers/media/usb/gspca/xirlink_cit.c
2867
switch (sd->sof_read) {
drivers/media/usb/gspca/xirlink_cit.c
2870
sd->sof_read++;
drivers/media/usb/gspca/xirlink_cit.c
2873
sd->sof_read = 0;
drivers/media/usb/gspca/xirlink_cit.c
2887
return data + i + (sd->sof_len - 1);
drivers/media/usb/gspca/xirlink_cit.c
2900
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
2909
if (n > sd->sof_len)
drivers/media/usb/gspca/xirlink_cit.c
2910
n -= sd->sof_len;
drivers/media/usb/gspca/xirlink_cit.c
2927
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
2929
switch (sd->model) {
drivers/media/usb/gspca/xirlink_cit.c
2947
if (sd->button_state != new_button_state) {
drivers/media/usb/gspca/xirlink_cit.c
2951
sd->button_state = new_button_state;
drivers/media/usb/gspca/xirlink_cit.c
2960
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
2967
if (sd->stop_on_control_change)
drivers/media/usb/gspca/xirlink_cit.c
2989
if (sd->stop_on_control_change)
drivers/media/usb/gspca/xirlink_cit.c
3000
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
3011
switch (sd->model) {
drivers/media/usb/gspca/xirlink_cit.c
3048
sd->lighting = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
drivers/media/usb/gspca/xirlink_cit.c
3134
return gspca_dev_probe2(intf, id, desc, sizeof(struct sd), THIS_MODULE);
drivers/media/usb/gspca/xirlink_cit.c
857
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/xirlink_cit.c
860
sd->model = id->driver_info;
drivers/media/usb/gspca/xirlink_cit.c
861
if (sd->model == CIT_MODEL3 && ibm_netcam_pro)
drivers/media/usb/gspca/xirlink_cit.c
862
sd->model = CIT_IBM_NETCAM_PRO;
drivers/media/usb/gspca/xirlink_cit.c
865
switch (sd->model) {
drivers/media/usb/gspca/xirlink_cit.c
869
sd->sof_len = 4;
drivers/media/usb/gspca/xirlink_cit.c
874
sd->sof_len = 4;
drivers/media/usb/gspca/xirlink_cit.c
883
sd->stop_on_control_change = 1;
drivers/media/usb/gspca/xirlink_cit.c
884
sd->sof_len = 4;
drivers/media/usb/gspca/xirlink_cit.c
894
sd->stop_on_control_change = 1;
drivers/media/usb/gspca/xirlink_cit.c
895
sd->sof_len = 4;
drivers/media/usb/gspca/zc3xx.c
5645
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
5686
matrix = matrix_tb[sd->sensor];
drivers/media/usb/gspca/zc3xx.c
5768
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
5770
switch (sd->sensor) {
drivers/media/usb/gspca/zc3xx.c
5784
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
5786
switch (sd->sensor) {
drivers/media/usb/gspca/zc3xx.c
5800
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
5801
jpeg_set_qual(sd->jpeg_hdr, jpeg_qual[sd->reg08 >> 1]);
drivers/media/usb/gspca/zc3xx.c
5802
reg_w(gspca_dev, sd->reg08, ZC3XX_R008_CLOCKSETTING);
drivers/media/usb/gspca/zc3xx.c
5813
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
5899
zc3_freq = freq_tb[sd->sensor][i];
drivers/media/usb/gspca/zc3xx.c
5903
switch (sd->sensor) {
drivers/media/usb/gspca/zc3xx.c
5926
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
5928
if (sd->sensor == SENSOR_OV7620)
drivers/media/usb/gspca/zc3xx.c
5940
struct sd *sd = container_of(work, struct sd, work);
drivers/media/usb/gspca/zc3xx.c
5941
struct gspca_dev *gspca_dev = &sd->gspca_dev;
drivers/media/usb/gspca/zc3xx.c
6172
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
6205
sd->chip_revision = retword;
drivers/media/usb/gspca/zc3xx.c
6296
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
6299
switch (sd->sensor) {
drivers/media/usb/gspca/zc3xx.c
6321
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
6324
sd->bridge = BRIDGE_ZC301;
drivers/media/usb/gspca/zc3xx.c
6326
sd->bridge = BRIDGE_ZC303;
drivers/media/usb/gspca/zc3xx.c
6329
sd->sensor = id->driver_info;
drivers/media/usb/gspca/zc3xx.c
6331
sd->reg08 = REG08_DEF;
drivers/media/usb/gspca/zc3xx.c
6333
INIT_WORK(&sd->work, transfer_update);
drivers/media/usb/gspca/zc3xx.c
6342
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/zc3xx.c
6347
if (ctrl->val && sd->exposure && gspca_dev->streaming)
drivers/media/usb/gspca/zc3xx.c
6348
sd->exposure->val = getexposure(gspca_dev);
drivers/media/usb/gspca/zc3xx.c
6358
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/zc3xx.c
6364
qual = sd->reg08 >> 1;
drivers/media/usb/gspca/zc3xx.c
6378
sd->reg08 = (i << 1) | 1;
drivers/media/usb/gspca/zc3xx.c
6388
setcontrast(gspca_dev, sd->gamma->val,
drivers/media/usb/gspca/zc3xx.c
6389
sd->brightness->val, sd->contrast->val);
drivers/media/usb/gspca/zc3xx.c
6394
if (!gspca_dev->usb_err && !ctrl->val && sd->exposure)
drivers/media/usb/gspca/zc3xx.c
6395
setexposure(gspca_dev, sd->exposure->val);
drivers/media/usb/gspca/zc3xx.c
6417
struct sd *sd = (struct sd *)gspca_dev;
drivers/media/usb/gspca/zc3xx.c
6443
sd->brightness = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
drivers/media/usb/gspca/zc3xx.c
6445
sd->contrast = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
drivers/media/usb/gspca/zc3xx.c
6447
sd->gamma = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
drivers/media/usb/gspca/zc3xx.c
6448
V4L2_CID_GAMMA, 1, 6, 1, gamma[sd->sensor]);
drivers/media/usb/gspca/zc3xx.c
6449
if (sd->sensor == SENSOR_HV7131R)
drivers/media/usb/gspca/zc3xx.c
6450
sd->exposure = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
drivers/media/usb/gspca/zc3xx.c
6452
else if (sd->sensor == SENSOR_OV7620)
drivers/media/usb/gspca/zc3xx.c
6453
sd->exposure = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
drivers/media/usb/gspca/zc3xx.c
6455
sd->autogain = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
drivers/media/usb/gspca/zc3xx.c
6457
if (sd->sensor != SENSOR_OV7630C)
drivers/media/usb/gspca/zc3xx.c
6458
sd->plfreq = v4l2_ctrl_new_std_menu(hdl, &zcxx_ctrl_ops,
drivers/media/usb/gspca/zc3xx.c
6462
sd->sharpness = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
drivers/media/usb/gspca/zc3xx.c
6464
sd->sensor == SENSOR_PO2030 ? 0 : 2);
drivers/media/usb/gspca/zc3xx.c
6465
sd->jpegqual = v4l2_ctrl_new_std(hdl, &zcxx_ctrl_ops,
drivers/media/usb/gspca/zc3xx.c
6473
v4l2_ctrl_cluster(3, &sd->gamma);
drivers/media/usb/gspca/zc3xx.c
6474
if (sd->sensor == SENSOR_HV7131R || sd->sensor == SENSOR_OV7620)
drivers/media/usb/gspca/zc3xx.c
6475
v4l2_ctrl_auto_cluster(2, &sd->autogain, 0, true);
drivers/media/usb/gspca/zc3xx.c
6482
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
6511
sd->sensor = force_sensor;
drivers/media/usb/gspca/zc3xx.c
6517
switch (sd->sensor) {
drivers/media/usb/gspca/zc3xx.c
6526
sd->sensor = SENSOR_TAS5130C;
drivers/media/usb/gspca/zc3xx.c
6538
sd->sensor = SENSOR_HV7131B;
drivers/media/usb/gspca/zc3xx.c
6543
sd->sensor = SENSOR_HV7131R;
drivers/media/usb/gspca/zc3xx.c
6549
sd->sensor = SENSOR_TAS5130C;
drivers/media/usb/gspca/zc3xx.c
6553
sd->sensor = SENSOR_CS2102;
drivers/media/usb/gspca/zc3xx.c
6557
sd->sensor = SENSOR_HDCS2020;
drivers/media/usb/gspca/zc3xx.c
6562
sd->chip_revision);
drivers/media/usb/gspca/zc3xx.c
6563
sd->sensor = SENSOR_PB0330;
drivers/media/usb/gspca/zc3xx.c
6567
sd->sensor = SENSOR_ICM105A;
drivers/media/usb/gspca/zc3xx.c
6571
sd->sensor = SENSOR_PAS202B;
drivers/media/usb/gspca/zc3xx.c
6575
sd->sensor = SENSOR_PAS106;
drivers/media/usb/gspca/zc3xx.c
6580
sd->sensor = SENSOR_TAS5130C;
drivers/media/usb/gspca/zc3xx.c
6584
sd->sensor = SENSOR_HV7131R;
drivers/media/usb/gspca/zc3xx.c
6590
sd->chip_revision);
drivers/media/usb/gspca/zc3xx.c
6591
sd->sensor = sd->bridge == BRIDGE_ZC301
drivers/media/usb/gspca/zc3xx.c
6598
sd->chip_revision);
drivers/media/usb/gspca/zc3xx.c
6599
sd->sensor = SENSOR_CS2102K;
drivers/media/usb/gspca/zc3xx.c
6603
sd->sensor = SENSOR_ADCM2700;
drivers/media/usb/gspca/zc3xx.c
6607
sd->sensor = SENSOR_GC0305;
drivers/media/usb/gspca/zc3xx.c
6611
sd->sensor = SENSOR_GC0303;
drivers/media/usb/gspca/zc3xx.c
6615
sd->sensor = SENSOR_PO2030;
drivers/media/usb/gspca/zc3xx.c
6619
sd->sensor = SENSOR_OV7620;
drivers/media/usb/gspca/zc3xx.c
6623
sd->sensor = SENSOR_OV7630C;
drivers/media/usb/gspca/zc3xx.c
6627
sd->sensor = SENSOR_OV7620; /* same sensor (?) */
drivers/media/usb/gspca/zc3xx.c
6641
switch (mode_tb[sd->sensor]) {
drivers/media/usb/gspca/zc3xx.c
6664
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
6665
gspca_dev->cam.needs_full_bandwidth = (sd->reg08 >= 4) ? 1 : 0;
drivers/media/usb/gspca/zc3xx.c
6671
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
6715
jpeg_define(sd->jpeg_hdr, gspca_dev->pixfmt.height,
drivers/media/usb/gspca/zc3xx.c
6720
switch (sd->sensor) {
drivers/media/usb/gspca/zc3xx.c
6728
usb_exchange(gspca_dev, init_tb[sd->sensor][mode]);
drivers/media/usb/gspca/zc3xx.c
6730
switch (sd->sensor) {
drivers/media/usb/gspca/zc3xx.c
6741
if (sd->sensor == SENSOR_TAS5130C)
drivers/media/usb/gspca/zc3xx.c
6752
if (sd->sensor == SENSOR_HV7131R)
drivers/media/usb/gspca/zc3xx.c
6758
switch (sd->sensor) {
drivers/media/usb/gspca/zc3xx.c
6774
setsharpness(gspca_dev, v4l2_ctrl_g_ctrl(sd->sharpness));
drivers/media/usb/gspca/zc3xx.c
6777
switch (sd->sensor) {
drivers/media/usb/gspca/zc3xx.c
6783
setcontrast(gspca_dev, v4l2_ctrl_g_ctrl(sd->gamma),
drivers/media/usb/gspca/zc3xx.c
6784
v4l2_ctrl_g_ctrl(sd->brightness),
drivers/media/usb/gspca/zc3xx.c
6785
v4l2_ctrl_g_ctrl(sd->contrast));
drivers/media/usb/gspca/zc3xx.c
6789
switch (sd->sensor) {
drivers/media/usb/gspca/zc3xx.c
6799
if (sd->plfreq)
drivers/media/usb/gspca/zc3xx.c
6800
setlightfreq(gspca_dev, v4l2_ctrl_g_ctrl(sd->plfreq));
drivers/media/usb/gspca/zc3xx.c
6802
switch (sd->sensor) {
drivers/media/usb/gspca/zc3xx.c
6811
setexposure(gspca_dev, v4l2_ctrl_g_ctrl(sd->exposure));
drivers/media/usb/gspca/zc3xx.c
6835
setautogain(gspca_dev, v4l2_ctrl_g_ctrl(sd->autogain));
drivers/media/usb/gspca/zc3xx.c
6841
schedule_work(&sd->work);
drivers/media/usb/gspca/zc3xx.c
6850
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
6853
flush_work(&sd->work);
drivers/media/usb/gspca/zc3xx.c
6857
send_unknown(gspca_dev, sd->sensor);
drivers/media/usb/gspca/zc3xx.c
6864
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
6879
sd->jpeg_hdr, JPEG_HDR_SZ);
drivers/media/usb/gspca/zc3xx.c
6896
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
6898
return v4l2_ctrl_s_ctrl(sd->jpegqual, jcomp->quality);
drivers/media/usb/gspca/zc3xx.c
6904
struct sd *sd = (struct sd *) gspca_dev;
drivers/media/usb/gspca/zc3xx.c
6907
jcomp->quality = v4l2_ctrl_g_ctrl(sd->jpegqual);
drivers/media/usb/gspca/zc3xx.c
7008
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
drivers/media/usb/msi2500/msi2500.c
1163
struct v4l2_subdev *sd;
drivers/media/usb/msi2500/msi2500.c
1239
sd = v4l2_spi_new_subdev(&dev->v4l2_dev, ctlr, &board_info);
drivers/media/usb/msi2500/msi2500.c
1240
dev->v4l2_subdev = sd;
drivers/media/usb/msi2500/msi2500.c
1241
if (sd == NULL) {
drivers/media/usb/msi2500/msi2500.c
1256
v4l2_ctrl_add_handler(&dev->hdl, sd->ctrl_handler, NULL, true);
drivers/media/usb/pvrusb2/pvrusb2-audio.c
46
void pvr2_msp3400_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
drivers/media/usb/pvrusb2/pvrusb2-audio.c
67
sd->ops->audio->s_routing(sd, input,
drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c
47
void pvr2_cs53l32a_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c
66
sd->ops->audio->s_routing(sd, input, 0, 0);
drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
135
void pvr2_cx25840_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
159
sd->ops->video->s_routing(sd, (u32)vid_input, 0, 0);
drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
160
sd->ops->audio->s_routing(sd, (u32)aud_input, 0, 0);
drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.h
25
void pvr2_cx25840_subdev_update(struct pvr2_hdw *, struct v4l2_subdev *sd);
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
1977
struct v4l2_subdev *sd;
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
2022
sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap,
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
2028
sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap,
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
2032
if (!sd) {
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
2042
sd->grp_id = mid;
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
2808
struct v4l2_subdev *sd;
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
2815
v4l2_device_for_each_subdev(sd, &hdw->v4l2_dev)
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
2816
v4l2_s_ctrl(NULL, sd->ctrl_handler, &ctrl);
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
2837
struct v4l2_subdev *sd;
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
2954
v4l2_device_for_each_subdev(sd, &hdw->v4l2_dev) {
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
2955
id = sd->grp_id;
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
2959
(*fp)(hdw, sd);
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
4823
struct v4l2_subdev *sd;
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
4832
v4l2_device_for_each_subdev(sd, &hdw->v4l2_dev) {
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
4833
id = sd->grp_id;
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
4844
client = v4l2_get_subdevdata(sd);
drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c
64
void pvr2_saa7115_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c
85
sd->ops->video->s_routing(sd, input, 0, 0);
drivers/media/usb/pvrusb2/pvrusb2-wm8775.c
24
void pvr2_wm8775_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
drivers/media/usb/pvrusb2/pvrusb2-wm8775.c
41
sd->ops->audio->s_routing(sd, input, 0, 0);
drivers/media/usb/pvrusb2/pvrusb2-wm8775.h
25
void pvr2_wm8775_subdev_update(struct pvr2_hdw *, struct v4l2_subdev *sd);
drivers/media/v4l2-core/tuner-core.c
1138
static int tuner_s_radio(struct v4l2_subdev *sd)
drivers/media/v4l2-core/tuner-core.c
1140
struct tuner *t = to_tuner(sd);
drivers/media/v4l2-core/tuner-core.c
1155
static int tuner_standby(struct v4l2_subdev *sd)
drivers/media/v4l2-core/tuner-core.c
1157
struct tuner *t = to_tuner(sd);
drivers/media/v4l2-core/tuner-core.c
1167
static int tuner_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
drivers/media/v4l2-core/tuner-core.c
1169
struct tuner *t = to_tuner(sd);
drivers/media/v4l2-core/tuner-core.c
1181
static int tuner_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *f)
drivers/media/v4l2-core/tuner-core.c
1183
struct tuner *t = to_tuner(sd);
drivers/media/v4l2-core/tuner-core.c
1200
static int tuner_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
drivers/media/v4l2-core/tuner-core.c
1202
struct tuner *t = to_tuner(sd);
drivers/media/v4l2-core/tuner-core.c
1231
static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
drivers/media/v4l2-core/tuner-core.c
1233
struct tuner *t = to_tuner(sd);
drivers/media/v4l2-core/tuner-core.c
1284
static int tuner_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
drivers/media/v4l2-core/tuner-core.c
1286
struct tuner *t = to_tuner(sd);
drivers/media/v4l2-core/tuner-core.c
1308
static int tuner_log_status(struct v4l2_subdev *sd)
drivers/media/v4l2-core/tuner-core.c
1310
struct tuner *t = to_tuner(sd);
drivers/media/v4l2-core/tuner-core.c
1354
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/media/v4l2-core/tuner-core.c
1361
return tuner_s_config(sd, arg);
drivers/media/v4l2-core/tuner-core.c
152
struct v4l2_subdev sd;
drivers/media/v4l2-core/tuner-core.c
227
static inline struct tuner *to_tuner(struct v4l2_subdev *sd)
drivers/media/v4l2-core/tuner-core.c
229
return container_of(sd, struct tuner, sd);
drivers/media/v4l2-core/tuner-core.c
474
t->sd.entity.name = t->name;
drivers/media/v4l2-core/tuner-core.c
520
static int tuner_s_type_addr(struct v4l2_subdev *sd,
drivers/media/v4l2-core/tuner-core.c
523
struct tuner *t = to_tuner(sd);
drivers/media/v4l2-core/tuner-core.c
524
struct i2c_client *c = v4l2_get_subdevdata(sd);
drivers/media/v4l2-core/tuner-core.c
554
static int tuner_s_config(struct v4l2_subdev *sd,
drivers/media/v4l2-core/tuner-core.c
557
struct tuner *t = to_tuner(sd);
drivers/media/v4l2-core/tuner-core.c
639
v4l2_i2c_subdev_init(&t->sd, client, &tuner_ops);
drivers/media/v4l2-core/tuner-core.c
726
t->sd.entity.name = t->name;
drivers/media/v4l2-core/tuner-core.c
737
ret = media_entity_pads_init(&t->sd.entity,
drivers/media/v4l2-core/tuner-core.c
740
t->sd.entity.function = MEDIA_ENT_F_IF_VID_DECODER;
drivers/media/v4l2-core/tuner-core.c
748
ret = media_entity_pads_init(&t->sd.entity, TUNER_NUM_PADS,
drivers/media/v4l2-core/tuner-core.c
750
t->sd.entity.function = MEDIA_ENT_F_TUNER;
drivers/media/v4l2-core/tuner-core.c
784
v4l2_device_unregister_subdev(&t->sd);
drivers/media/v4l2-core/tuner-core.c
865
struct i2c_client *client = v4l2_get_subdevdata(&t->sd);
drivers/media/v4l2-core/v4l2-async.c
130
struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-async.c
135
dev_fwnode(notifier_dev(notifier)), sd->fwnode);
drivers/media/v4l2-core/v4l2-async.c
137
if (!list_empty(&sd->async_subdev_endpoint_list)) {
drivers/media/v4l2-core/v4l2-async.c
140
dev_dbg(sd->dev,
drivers/media/v4l2-core/v4l2-async.c
144
list_for_each_entry(ase, &sd->async_subdev_endpoint_list,
drivers/media/v4l2-core/v4l2-async.c
148
dev_dbg(sd->dev,
drivers/media/v4l2-core/v4l2-async.c
156
dev_dbg(sd->dev, "async: no endpoint matched\n");
drivers/media/v4l2-core/v4l2-async.c
161
if (match_fwnode_one(notifier, sd, sd->fwnode, match))
drivers/media/v4l2-core/v4l2-async.c
165
if (IS_ERR_OR_NULL(sd->fwnode->secondary))
drivers/media/v4l2-core/v4l2-async.c
171
return match_fwnode_one(notifier, sd, sd->fwnode->secondary, match);
drivers/media/v4l2-core/v4l2-async.c
180
struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-async.c
183
struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-async.c
203
if (match(notifier, sd, &asc->match))
drivers/media/v4l2-core/v4l2-async.c
232
v4l2_async_find_subdev_notifier(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-async.c
237
if (n->sd == sd)
drivers/media/v4l2-core/v4l2-async.c
266
v4l2_async_find_subdev_notifier(asc->sd);
drivers/media/v4l2-core/v4l2-async.c
289
if (notifier->sd)
drivers/media/v4l2-core/v4l2-async.c
317
struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-async.c
322
if (sd->entity.function != MEDIA_ENT_F_LENS &&
drivers/media/v4l2-core/v4l2-async.c
323
sd->entity.function != MEDIA_ENT_F_FLASH)
drivers/media/v4l2-core/v4l2-async.c
326
if (!n->sd) {
drivers/media/v4l2-core/v4l2-async.c
329
dev_name(sd->dev));
drivers/media/v4l2-core/v4l2-async.c
333
link = media_create_ancillary_link(&n->sd->entity, &sd->entity);
drivers/media/v4l2-core/v4l2-async.c
343
struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-async.c
349
if (list_empty(&sd->asc_list)) {
drivers/media/v4l2-core/v4l2-async.c
350
ret = __v4l2_device_register_subdev(v4l2_dev, sd, sd->owner);
drivers/media/v4l2-core/v4l2-async.c
356
ret = v4l2_async_nf_call_bound(notifier, sd, asc);
drivers/media/v4l2-core/v4l2-async.c
372
ret = v4l2_async_create_ancillary_links(notifier, sd);
drivers/media/v4l2-core/v4l2-async.c
382
list_add(&asc->asc_subdev_entry, &sd->asc_list);
drivers/media/v4l2-core/v4l2-async.c
383
asc->sd = sd;
drivers/media/v4l2-core/v4l2-async.c
389
dev_name(sd->dev), ret);
drivers/media/v4l2-core/v4l2-async.c
394
v4l2_async_nf_call_unbind(notifier, sd, asc);
drivers/media/v4l2-core/v4l2-async.c
399
v4l2_device_unregister_subdev(sd);
drivers/media/v4l2-core/v4l2-async.c
406
struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-async.c
413
subdev_notifier = v4l2_async_find_subdev_notifier(sd);
drivers/media/v4l2-core/v4l2-async.c
433
struct v4l2_subdev *sd;
drivers/media/v4l2-core/v4l2-async.c
441
list_for_each_entry(sd, &subdev_list, async_list) {
drivers/media/v4l2-core/v4l2-async.c
445
asc = v4l2_async_find_match(notifier, sd);
drivers/media/v4l2-core/v4l2-async.c
450
"v4l2-async: match found, subdev %s\n", sd->name);
drivers/media/v4l2-core/v4l2-async.c
452
ret = v4l2_async_match_notify(notifier, v4l2_dev, sd, asc);
drivers/media/v4l2-core/v4l2-async.c
456
ret = v4l2_async_nf_try_subdev_notifier(notifier, sd);
drivers/media/v4l2-core/v4l2-async.c
477
v4l2_async_nf_call_unbind(notifier, asc->sd, asc);
drivers/media/v4l2-core/v4l2-async.c
478
v4l2_device_unregister_subdev(asc->sd);
drivers/media/v4l2-core/v4l2-async.c
479
asc->sd = NULL;
drivers/media/v4l2-core/v4l2-async.c
493
v4l2_async_find_subdev_notifier(asc->sd);
drivers/media/v4l2-core/v4l2-async.c
591
struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-async.c
596
notifier->sd = sd;
drivers/media/v4l2-core/v4l2-async.c
642
if (WARN_ON(!notifier->v4l2_dev == !notifier->sd))
drivers/media/v4l2-core/v4l2-async.c
652
if (!notifier || (!notifier->v4l2_dev && !notifier->sd))
drivers/media/v4l2-core/v4l2-async.c
67
struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-async.c
689
notifier->sd = NULL;
drivers/media/v4l2-core/v4l2-async.c
71
struct i2c_client *client = i2c_verify_client(sd->dev);
drivers/media/v4l2-core/v4l2-async.c
777
int v4l2_async_subdev_endpoint_add(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-async.c
788
&sd->async_subdev_endpoint_list);
drivers/media/v4l2-core/v4l2-async.c
795
v4l2_async_connection_unique(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-async.c
797
if (!list_is_singular(&sd->asc_list))
drivers/media/v4l2-core/v4l2-async.c
800
return list_first_entry(&sd->asc_list,
drivers/media/v4l2-core/v4l2-async.c
805
int __v4l2_async_register_subdev(struct v4l2_subdev *sd, struct module *module)
drivers/media/v4l2-core/v4l2-async.c
812
INIT_LIST_HEAD(&sd->asc_list);
drivers/media/v4l2-core/v4l2-async.c
822
if (!sd->fwnode && sd->dev) {
drivers/media/v4l2-core/v4l2-async.c
823
sd->fwnode = dev_fwnode(sd->dev);
drivers/media/v4l2-core/v4l2-async.c
824
} else if (fwnode_graph_is_endpoint(sd->fwnode)) {
drivers/media/v4l2-core/v4l2-async.c
825
dev_warn(sd->dev, "sub-device fwnode is an endpoint!\n");
drivers/media/v4l2-core/v4l2-async.c
829
sd->owner = module;
drivers/media/v4l2-core/v4l2-async.c
83
if (notifier->sd)
drivers/media/v4l2-core/v4l2-async.c
84
return notifier->sd->dev;
drivers/media/v4l2-core/v4l2-async.c
840
while ((asc = v4l2_async_find_match(notifier, sd))) {
drivers/media/v4l2-core/v4l2-async.c
841
ret = v4l2_async_match_notify(notifier, v4l2_dev, sd,
drivers/media/v4l2-core/v4l2-async.c
846
ret = v4l2_async_nf_try_subdev_notifier(notifier, sd);
drivers/media/v4l2-core/v4l2-async.c
857
list_add(&sd->async_list, &subdev_list);
drivers/media/v4l2-core/v4l2-async.c
868
subdev_notifier = v4l2_async_find_subdev_notifier(sd);
drivers/media/v4l2-core/v4l2-async.c
878
sd->owner = NULL;
drivers/media/v4l2-core/v4l2-async.c
884
void v4l2_async_unregister_subdev(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-async.c
888
if (!sd->async_list.next)
drivers/media/v4l2-core/v4l2-async.c
891
v4l2_subdev_put_privacy_led(sd);
drivers/media/v4l2-core/v4l2-async.c
895
__v4l2_async_nf_unregister(sd->subdev_notifier);
drivers/media/v4l2-core/v4l2-async.c
896
__v4l2_async_nf_cleanup(sd->subdev_notifier);
drivers/media/v4l2-core/v4l2-async.c
897
kfree(sd->subdev_notifier);
drivers/media/v4l2-core/v4l2-async.c
898
sd->subdev_notifier = NULL;
drivers/media/v4l2-core/v4l2-async.c
900
if (sd->asc_list.next) {
drivers/media/v4l2-core/v4l2-async.c
901
list_for_each_entry_safe(asc, asc_tmp, &sd->asc_list,
drivers/media/v4l2-core/v4l2-async.c
907
list_del(&sd->async_list);
drivers/media/v4l2-core/v4l2-async.c
908
sd->async_list.next = NULL;
drivers/media/v4l2-core/v4l2-async.c
94
struct v4l2_subdev *sd, struct fwnode_handle *sd_fwnode,
drivers/media/v4l2-core/v4l2-async.c
944
else if (notifier->sd)
drivers/media/v4l2-core/v4l2-async.c
945
return notifier->sd->name;
drivers/media/v4l2-core/v4l2-common.c
198
struct v4l2_subdev *sd, struct v4l2_streamparm *a)
drivers/media/v4l2-core/v4l2-common.c
209
if (v4l2_subdev_has_op(sd, pad, get_frame_interval))
drivers/media/v4l2-core/v4l2-common.c
211
ret = v4l2_subdev_call_state_active(sd, pad, get_frame_interval, &ival);
drivers/media/v4l2-core/v4l2-common.c
219
struct v4l2_subdev *sd, struct v4l2_streamparm *a)
drivers/media/v4l2-core/v4l2-common.c
236
if (v4l2_subdev_has_op(sd, pad, get_frame_interval))
drivers/media/v4l2-core/v4l2-common.c
238
ret = v4l2_subdev_call_state_active(sd, pad, set_frame_interval, &ival);
drivers/media/v4l2-core/v4l2-common.c
557
struct v4l2_subdev *sd;
drivers/media/v4l2-core/v4l2-common.c
560
sd = media_entity_to_v4l2_subdev(pad->entity);
drivers/media/v4l2-core/v4l2-common.c
561
ret = v4l2_subdev_call(sd, pad, get_mbus_config, pad->index,
drivers/media/v4l2-core/v4l2-common.c
573
return v4l2_get_link_freq_ctrl(sd->ctrl_handler, mul, div);
drivers/media/v4l2-core/v4l2-common.c
581
struct v4l2_subdev *sd;
drivers/media/v4l2-core/v4l2-common.c
585
sd = media_entity_to_v4l2_subdev(pad->entity);
drivers/media/v4l2-core/v4l2-common.c
586
ret = v4l2_subdev_call(sd, pad, get_mbus_config, pad->index,
drivers/media/v4l2-core/v4l2-common.c
597
dev_dbg(sd->dev, "Active data lanes (%u) exceeds max (%u)\n",
drivers/media/v4l2-core/v4l2-ctrls-api.c
1266
int v4l2_ctrl_subdev_log_status(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-ctrls-api.c
1268
v4l2_ctrl_handler_log_status(sd->ctrl_handler, sd->name);
drivers/media/v4l2-core/v4l2-ctrls-api.c
1338
int v4l2_ctrl_subdev_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
drivers/media/v4l2-core/v4l2-ctrls-api.c
1341
if (!sd->ctrl_handler)
drivers/media/v4l2-core/v4l2-device.c
100
v4l2_device_unregister_subdev(sd);
drivers/media/v4l2-core/v4l2-device.c
101
if (sd->flags & V4L2_SUBDEV_FL_IS_I2C)
drivers/media/v4l2-core/v4l2-device.c
102
v4l2_i2c_subdev_unregister(sd);
drivers/media/v4l2-core/v4l2-device.c
103
else if (sd->flags & V4L2_SUBDEV_FL_IS_SPI)
drivers/media/v4l2-core/v4l2-device.c
104
v4l2_spi_subdev_unregister(sd);
drivers/media/v4l2-core/v4l2-device.c
112
struct v4l2_subdev *sd, struct module *module)
drivers/media/v4l2-core/v4l2-device.c
117
if (!v4l2_dev || !sd || sd->v4l2_dev || !sd->name[0])
drivers/media/v4l2-core/v4l2-device.c
127
sd->owner_v4l2_dev = v4l2_dev->dev && v4l2_dev->dev->driver &&
drivers/media/v4l2-core/v4l2-device.c
130
if (!sd->owner_v4l2_dev && !try_module_get(module))
drivers/media/v4l2-core/v4l2-device.c
133
sd->v4l2_dev = v4l2_dev;
drivers/media/v4l2-core/v4l2-device.c
135
err = v4l2_ctrl_add_handler(v4l2_dev->ctrl_handler, sd->ctrl_handler,
drivers/media/v4l2-core/v4l2-device.c
143
err = media_device_register_entity(v4l2_dev->mdev, &sd->entity);
drivers/media/v4l2-core/v4l2-device.c
149
if (sd->internal_ops && sd->internal_ops->registered) {
drivers/media/v4l2-core/v4l2-device.c
150
err = sd->internal_ops->registered(sd);
drivers/media/v4l2-core/v4l2-device.c
155
sd->owner = module;
drivers/media/v4l2-core/v4l2-device.c
158
list_add_tail(&sd->list, &v4l2_dev->subdevs);
drivers/media/v4l2-core/v4l2-device.c
165
media_device_unregister_entity(&sd->entity);
drivers/media/v4l2-core/v4l2-device.c
168
if (!sd->owner_v4l2_dev)
drivers/media/v4l2-core/v4l2-device.c
169
module_put(sd->owner);
drivers/media/v4l2-core/v4l2-device.c
170
sd->v4l2_dev = NULL;
drivers/media/v4l2-core/v4l2-device.c
175
static void v4l2_subdev_release(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-device.c
177
struct module *owner = !sd->owner_v4l2_dev ? sd->owner : NULL;
drivers/media/v4l2-core/v4l2-device.c
179
if (sd->internal_ops && sd->internal_ops->release)
drivers/media/v4l2-core/v4l2-device.c
180
sd->internal_ops->release(sd);
drivers/media/v4l2-core/v4l2-device.c
181
sd->devnode = NULL;
drivers/media/v4l2-core/v4l2-device.c
195
struct v4l2_subdev *sd;
drivers/media/v4l2-core/v4l2-device.c
201
list_for_each_entry(sd, &v4l2_dev->subdevs, list) {
drivers/media/v4l2-core/v4l2-device.c
202
if (!(sd->flags & V4L2_SUBDEV_FL_HAS_DEVNODE))
drivers/media/v4l2-core/v4l2-device.c
205
if (sd->devnode)
drivers/media/v4l2-core/v4l2-device.c
214
video_set_drvdata(vdev, sd);
drivers/media/v4l2-core/v4l2-device.c
215
strscpy(vdev->name, sd->name, sizeof(vdev->name));
drivers/media/v4l2-core/v4l2-device.c
216
vdev->dev_parent = sd->dev;
drivers/media/v4l2-core/v4l2-device.c
220
vdev->ctrl_handler = sd->ctrl_handler;
drivers/media/v4l2-core/v4l2-device.c
223
sd->devnode = vdev;
drivers/media/v4l2-core/v4l2-device.c
225
sd->owner);
drivers/media/v4l2-core/v4l2-device.c
227
sd->devnode = NULL;
drivers/media/v4l2-core/v4l2-device.c
232
sd->entity.info.dev.major = VIDEO_MAJOR;
drivers/media/v4l2-core/v4l2-device.c
233
sd->entity.info.dev.minor = vdev->minor;
drivers/media/v4l2-core/v4l2-device.c
239
link = media_create_intf_link(&sd->entity,
drivers/media/v4l2-core/v4l2-device.c
253
list_for_each_entry(sd, &v4l2_dev->subdevs, list) {
drivers/media/v4l2-core/v4l2-device.c
254
if (!sd->devnode)
drivers/media/v4l2-core/v4l2-device.c
256
video_unregister_device(sd->devnode);
drivers/media/v4l2-core/v4l2-device.c
263
void v4l2_device_unregister_subdev(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-device.c
268
if (sd == NULL || sd->v4l2_dev == NULL)
drivers/media/v4l2-core/v4l2-device.c
271
v4l2_dev = sd->v4l2_dev;
drivers/media/v4l2-core/v4l2-device.c
274
list_del(&sd->list);
drivers/media/v4l2-core/v4l2-device.c
277
if (sd->internal_ops && sd->internal_ops->unregistered)
drivers/media/v4l2-core/v4l2-device.c
278
sd->internal_ops->unregistered(sd);
drivers/media/v4l2-core/v4l2-device.c
279
sd->v4l2_dev = NULL;
drivers/media/v4l2-core/v4l2-device.c
287
media_device_unregister_entity(&sd->entity);
drivers/media/v4l2-core/v4l2-device.c
290
if (sd->devnode)
drivers/media/v4l2-core/v4l2-device.c
291
video_unregister_device(sd->devnode);
drivers/media/v4l2-core/v4l2-device.c
293
v4l2_subdev_release(sd);
drivers/media/v4l2-core/v4l2-device.c
90
struct v4l2_subdev *sd, *next;
drivers/media/v4l2-core/v4l2-device.c
99
list_for_each_entry_safe(sd, next, &v4l2_dev->subdevs, list) {
drivers/media/v4l2-core/v4l2-event.c
332
int v4l2_event_subdev_unsubscribe(struct v4l2_subdev *sd, struct v4l2_fh *fh,
drivers/media/v4l2-core/v4l2-event.c
368
int v4l2_src_change_event_subdev_subscribe(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-flash-led-class.c
438
v4l2_flash->ctrls = devm_kcalloc(v4l2_flash->sd.dev,
drivers/media/v4l2-core/v4l2-flash-led-class.c
496
v4l2_flash->sd.ctrl_handler = &v4l2_flash->hdl;
drivers/media/v4l2-core/v4l2-flash-led-class.c
563
static int v4l2_flash_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/v4l2-core/v4l2-flash-led-class.c
565
struct v4l2_flash *v4l2_flash = v4l2_subdev_to_v4l2_flash(sd);
drivers/media/v4l2-core/v4l2-flash-led-class.c
613
static int v4l2_flash_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/media/v4l2-core/v4l2-flash-led-class.c
615
struct v4l2_flash *v4l2_flash = v4l2_subdev_to_v4l2_flash(sd);
drivers/media/v4l2-core/v4l2-flash-led-class.c
658
struct v4l2_subdev *sd;
drivers/media/v4l2-core/v4l2-flash-led-class.c
668
sd = &v4l2_flash->sd;
drivers/media/v4l2-core/v4l2-flash-led-class.c
672
sd->dev = dev;
drivers/media/v4l2-core/v4l2-flash-led-class.c
673
sd->fwnode = fwn ? fwn : dev_fwnode(dev);
drivers/media/v4l2-core/v4l2-flash-led-class.c
674
v4l2_subdev_init(sd, &v4l2_flash_subdev_ops);
drivers/media/v4l2-core/v4l2-flash-led-class.c
675
sd->internal_ops = &v4l2_flash_subdev_internal_ops;
drivers/media/v4l2-core/v4l2-flash-led-class.c
676
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/v4l2-core/v4l2-flash-led-class.c
677
strscpy(sd->name, config->dev_name, sizeof(sd->name));
drivers/media/v4l2-core/v4l2-flash-led-class.c
679
ret = media_entity_pads_init(&sd->entity, 0, NULL);
drivers/media/v4l2-core/v4l2-flash-led-class.c
683
sd->entity.function = MEDIA_ENT_F_FLASH;
drivers/media/v4l2-core/v4l2-flash-led-class.c
689
fwnode_handle_get(sd->fwnode);
drivers/media/v4l2-core/v4l2-flash-led-class.c
691
ret = v4l2_async_register_subdev(sd);
drivers/media/v4l2-core/v4l2-flash-led-class.c
698
fwnode_handle_put(sd->fwnode);
drivers/media/v4l2-core/v4l2-flash-led-class.c
699
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/v4l2-core/v4l2-flash-led-class.c
701
media_entity_cleanup(&sd->entity);
drivers/media/v4l2-core/v4l2-flash-led-class.c
727
struct v4l2_subdev *sd;
drivers/media/v4l2-core/v4l2-flash-led-class.c
732
sd = &v4l2_flash->sd;
drivers/media/v4l2-core/v4l2-flash-led-class.c
734
v4l2_async_unregister_subdev(sd);
drivers/media/v4l2-core/v4l2-flash-led-class.c
736
fwnode_handle_put(sd->fwnode);
drivers/media/v4l2-core/v4l2-flash-led-class.c
738
v4l2_ctrl_handler_free(sd->ctrl_handler);
drivers/media/v4l2-core/v4l2-flash-led-class.c
739
media_entity_cleanup(&sd->entity);
drivers/media/v4l2-core/v4l2-fwnode.c
1252
int v4l2_async_register_subdev_sensor(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-fwnode.c
1257
if (WARN_ON(!sd->dev))
drivers/media/v4l2-core/v4l2-fwnode.c
1264
v4l2_async_subdev_nf_init(notifier, sd);
drivers/media/v4l2-core/v4l2-fwnode.c
1266
ret = v4l2_subdev_get_privacy_led(sd);
drivers/media/v4l2-core/v4l2-fwnode.c
1270
ret = v4l2_async_nf_parse_fwnode_sensor(sd->dev, notifier);
drivers/media/v4l2-core/v4l2-fwnode.c
1278
ret = v4l2_async_register_subdev(sd);
drivers/media/v4l2-core/v4l2-fwnode.c
1282
sd->subdev_notifier = notifier;
drivers/media/v4l2-core/v4l2-fwnode.c
1290
v4l2_subdev_put_privacy_led(sd);
drivers/media/v4l2-core/v4l2-i2c.c
104
if (__v4l2_device_register_subdev(v4l2_dev, sd, sd->owner))
drivers/media/v4l2-core/v4l2-i2c.c
105
sd = NULL;
drivers/media/v4l2-core/v4l2-i2c.c
114
if (!IS_ERR(client) && !sd)
drivers/media/v4l2-core/v4l2-i2c.c
116
return sd;
drivers/media/v4l2-core/v4l2-i2c.c
12
void v4l2_i2c_subdev_unregister(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-i2c.c
14
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/v4l2-core/v4l2-i2c.c
142
unsigned short v4l2_i2c_subdev_addr(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-i2c.c
144
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/media/v4l2-core/v4l2-i2c.c
32
void v4l2_i2c_subdev_set_name(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-i2c.c
41
snprintf(sd->name, sizeof(sd->name), "%s%s %d-%04x", devname, postfix,
drivers/media/v4l2-core/v4l2-i2c.c
46
void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client,
drivers/media/v4l2-core/v4l2-i2c.c
49
v4l2_subdev_init(sd, ops);
drivers/media/v4l2-core/v4l2-i2c.c
50
sd->flags |= V4L2_SUBDEV_FL_IS_I2C;
drivers/media/v4l2-core/v4l2-i2c.c
52
sd->owner = client->dev.driver->owner;
drivers/media/v4l2-core/v4l2-i2c.c
53
sd->dev = &client->dev;
drivers/media/v4l2-core/v4l2-i2c.c
55
v4l2_set_subdevdata(sd, client);
drivers/media/v4l2-core/v4l2-i2c.c
56
i2c_set_clientdata(client, sd);
drivers/media/v4l2-core/v4l2-i2c.c
57
v4l2_i2c_subdev_set_name(sd, client, NULL, NULL);
drivers/media/v4l2-core/v4l2-i2c.c
68
struct v4l2_subdev *sd = NULL;
drivers/media/v4l2-core/v4l2-i2c.c
98
sd = i2c_get_clientdata(client);
drivers/media/v4l2-core/v4l2-ioctl.c
2656
struct v4l2_subdev *sd;
drivers/media/v4l2-core/v4l2-ioctl.c
2664
v4l2_device_for_each_subdev(sd, vfd->v4l2_dev)
drivers/media/v4l2-core/v4l2-ioctl.c
2666
return v4l2_subdev_call(sd, core, g_register, p);
drivers/media/v4l2-core/v4l2-ioctl.c
2684
struct v4l2_subdev *sd;
drivers/media/v4l2-core/v4l2-ioctl.c
2692
v4l2_device_for_each_subdev(sd, vfd->v4l2_dev)
drivers/media/v4l2-core/v4l2-ioctl.c
2694
return v4l2_subdev_call(sd, core, s_register, p);
drivers/media/v4l2-core/v4l2-ioctl.c
2712
struct v4l2_subdev *sd;
drivers/media/v4l2-core/v4l2-ioctl.c
2731
v4l2_device_for_each_subdev(sd, vfd->v4l2_dev) {
drivers/media/v4l2-core/v4l2-ioctl.c
2734
if (sd->ops->core && sd->ops->core->s_register)
drivers/media/v4l2-core/v4l2-ioctl.c
2736
if (sd->ops->core && sd->ops->core->g_register)
drivers/media/v4l2-core/v4l2-ioctl.c
2738
strscpy(p->name, sd->name, sizeof(p->name));
drivers/media/v4l2-core/v4l2-spi.c
11
void v4l2_spi_subdev_unregister(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-spi.c
13
struct spi_device *spi = v4l2_get_subdevdata(sd);
drivers/media/v4l2-core/v4l2-spi.c
19
void v4l2_spi_subdev_init(struct v4l2_subdev *sd, struct spi_device *spi,
drivers/media/v4l2-core/v4l2-spi.c
22
v4l2_subdev_init(sd, ops);
drivers/media/v4l2-core/v4l2-spi.c
23
sd->flags |= V4L2_SUBDEV_FL_IS_SPI;
drivers/media/v4l2-core/v4l2-spi.c
25
sd->owner = spi->dev.driver->owner;
drivers/media/v4l2-core/v4l2-spi.c
26
sd->dev = &spi->dev;
drivers/media/v4l2-core/v4l2-spi.c
28
v4l2_set_subdevdata(sd, spi);
drivers/media/v4l2-core/v4l2-spi.c
29
spi_set_drvdata(spi, sd);
drivers/media/v4l2-core/v4l2-spi.c
31
snprintf(sd->name, sizeof(sd->name), "%s %s",
drivers/media/v4l2-core/v4l2-spi.c
40
struct v4l2_subdev *sd = NULL;
drivers/media/v4l2-core/v4l2-spi.c
56
sd = spi_get_drvdata(spi);
drivers/media/v4l2-core/v4l2-spi.c
62
if (__v4l2_device_register_subdev(v4l2_dev, sd, sd->owner))
drivers/media/v4l2-core/v4l2-spi.c
63
sd = NULL;
drivers/media/v4l2-core/v4l2-spi.c
73
if (!sd)
drivers/media/v4l2-core/v4l2-spi.c
76
return sd;
drivers/media/v4l2-core/v4l2-subdev-priv.h
11
int v4l2_subdev_get_privacy_led(struct v4l2_subdev *sd);
drivers/media/v4l2-core/v4l2-subdev-priv.h
12
void v4l2_subdev_put_privacy_led(struct v4l2_subdev *sd);
drivers/media/v4l2-core/v4l2-subdev.c
1008
if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS))
drivers/media/v4l2-core/v4l2-subdev.c
1035
if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS))
drivers/media/v4l2-core/v4l2-subdev.c
1048
const struct media_pad *pads = sd->entity.pads;
drivers/media/v4l2-core/v4l2-subdev.c
1054
if (route->sink_pad >= sd->entity.num_pads)
drivers/media/v4l2-core/v4l2-subdev.c
106
ret = subdev_fh_init(subdev_fh, sd);
drivers/media/v4l2-core/v4l2-subdev.c
1061
if (route->source_pad >= sd->entity.num_pads)
drivers/media/v4l2-core/v4l2-subdev.c
1086
if (!v4l2_subdev_has_op(sd, pad, set_routing)) {
drivers/media/v4l2-core/v4l2-subdev.c
1100
rval = v4l2_subdev_call(sd, pad, set_routing, state,
drivers/media/v4l2-core/v4l2-subdev.c
1143
return v4l2_subdev_call(sd, core, ioctl, cmd, arg);
drivers/media/v4l2-core/v4l2-subdev.c
115
if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
drivers/media/v4l2-core/v4l2-subdev.c
1159
struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
drivers/media/v4l2-core/v4l2-subdev.c
1164
state = subdev_ioctl_get_state(sd, subdev_fh, cmd, arg);
drivers/media/v4l2-core/v4l2-subdev.c
118
owner = sd->entity.graph_obj.mdev->dev->driver->owner;
drivers/media/v4l2-core/v4l2-subdev.c
1191
struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
drivers/media/v4l2-core/v4l2-subdev.c
1193
return v4l2_subdev_call(sd, core, compat_ioctl32, cmd, arg);
drivers/media/v4l2-core/v4l2-subdev.c
1216
struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
drivers/media/v4l2-core/v4l2-subdev.c
1219
if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS))
drivers/media/v4l2-core/v4l2-subdev.c
1247
struct v4l2_subdev *sd;
drivers/media/v4l2-core/v4l2-subdev.c
1252
sd = media_entity_to_v4l2_subdev(entity);
drivers/media/v4l2-core/v4l2-subdev.c
1257
if (device_match_fwnode(sd->dev, fwnode))
drivers/media/v4l2-core/v4l2-subdev.c
126
if (sd->internal_ops && sd->internal_ops->open) {
drivers/media/v4l2-core/v4l2-subdev.c
1264
int v4l2_subdev_link_validate_default(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
127
ret = sd->internal_ops->open(sd, subdev_fh);
drivers/media/v4l2-core/v4l2-subdev.c
1273
dev_dbg(sd->entity.graph_obj.mdev->dev,
drivers/media/v4l2-core/v4l2-subdev.c
1281
dev_dbg(sd->entity.graph_obj.mdev->dev,
drivers/media/v4l2-core/v4l2-subdev.c
1289
dev_dbg(sd->entity.graph_obj.mdev->dev,
drivers/media/v4l2-core/v4l2-subdev.c
1302
dev_dbg(sd->entity.graph_obj.mdev->dev,
drivers/media/v4l2-core/v4l2-subdev.c
1312
dev_dbg(sd->entity.graph_obj.mdev->dev,
drivers/media/v4l2-core/v4l2-subdev.c
1327
struct v4l2_subdev *sd;
drivers/media/v4l2-core/v4l2-subdev.c
1330
sd = media_entity_to_v4l2_subdev(pad->entity);
drivers/media/v4l2-core/v4l2-subdev.c
1337
state = v4l2_subdev_get_locked_active_state(sd);
drivers/media/v4l2-core/v4l2-subdev.c
1339
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/v4l2-core/v4l2-subdev.c
1341
ret = v4l2_subdev_call(sd, pad, get_fmt, state, fmt);
drivers/media/v4l2-core/v4l2-subdev.c
147
struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
drivers/media/v4l2-core/v4l2-subdev.c
151
if (sd->internal_ops && sd->internal_ops->close)
drivers/media/v4l2-core/v4l2-subdev.c
152
sd->internal_ops->close(sd, subdev_fh);
drivers/media/v4l2-core/v4l2-subdev.c
1574
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/media/v4l2-core/v4l2-subdev.c
1579
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/v4l2-core/v4l2-subdev.c
1603
__v4l2_subdev_state_alloc(struct v4l2_subdev *sd, const char *lock_name,
drivers/media/v4l2-core/v4l2-subdev.c
1614
if (sd->state_lock)
drivers/media/v4l2-core/v4l2-subdev.c
1615
state->lock = sd->state_lock;
drivers/media/v4l2-core/v4l2-subdev.c
1619
state->sd = sd;
drivers/media/v4l2-core/v4l2-subdev.c
1622
if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS) && sd->entity.num_pads) {
drivers/media/v4l2-core/v4l2-subdev.c
1623
state->pads = kvzalloc_objs(*state->pads, sd->entity.num_pads);
drivers/media/v4l2-core/v4l2-subdev.c
1630
if (sd->internal_ops && sd->internal_ops->init_state) {
drivers/media/v4l2-core/v4l2-subdev.c
1636
ret = sd->internal_ops->init_state(sd, state);
drivers/media/v4l2-core/v4l2-subdev.c
1669
int __v4l2_subdev_init_finalize(struct v4l2_subdev *sd, const char *name,
drivers/media/v4l2-core/v4l2-subdev.c
1673
struct device *dev = sd->dev;
drivers/media/v4l2-core/v4l2-subdev.c
1680
has_s_stream = v4l2_subdev_has_op(sd, video, s_stream);
drivers/media/v4l2-core/v4l2-subdev.c
1681
has_enable_streams = v4l2_subdev_has_op(sd, pad, enable_streams);
drivers/media/v4l2-core/v4l2-subdev.c
1682
has_disable_streams = v4l2_subdev_has_op(sd, pad, disable_streams);
drivers/media/v4l2-core/v4l2-subdev.c
1687
sd->name);
drivers/media/v4l2-core/v4l2-subdev.c
1691
if (sd->flags & V4L2_SUBDEV_FL_STREAMS) {
drivers/media/v4l2-core/v4l2-subdev.c
1695
sd->name);
drivers/media/v4l2-core/v4l2-subdev.c
1701
if (sd->ctrl_handler)
drivers/media/v4l2-core/v4l2-subdev.c
1702
sd->flags |= V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/media/v4l2-core/v4l2-subdev.c
1704
state = __v4l2_subdev_state_alloc(sd, name, key);
drivers/media/v4l2-core/v4l2-subdev.c
1708
sd->active_state = state;
drivers/media/v4l2-core/v4l2-subdev.c
1714
void v4l2_subdev_cleanup(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-subdev.c
1718
__v4l2_subdev_state_free(sd->active_state);
drivers/media/v4l2-core/v4l2-subdev.c
1719
sd->active_state = NULL;
drivers/media/v4l2-core/v4l2-subdev.c
1722
if (!sd->async_subdev_endpoint_list.next)
drivers/media/v4l2-core/v4l2-subdev.c
1725
list_for_each_entry_safe(ase, ase_tmp, &sd->async_subdev_endpoint_list,
drivers/media/v4l2-core/v4l2-subdev.c
173
static void v4l2_subdev_enable_privacy_led(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-subdev.c
1748
if (pad >= state->sd->entity.num_pads)
drivers/media/v4l2-core/v4l2-subdev.c
176
if (!IS_ERR_OR_NULL(sd->privacy_led))
drivers/media/v4l2-core/v4l2-subdev.c
177
led_set_brightness(sd->privacy_led,
drivers/media/v4l2-core/v4l2-subdev.c
178
sd->privacy_led->max_brightness);
drivers/media/v4l2-core/v4l2-subdev.c
1782
if (pad >= state->sd->entity.num_pads)
drivers/media/v4l2-core/v4l2-subdev.c
1816
if (pad >= state->sd->entity.num_pads)
drivers/media/v4l2-core/v4l2-subdev.c
182
static void v4l2_subdev_disable_privacy_led(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-subdev.c
185
if (!IS_ERR_OR_NULL(sd->privacy_led))
drivers/media/v4l2-core/v4l2-subdev.c
1852
if (pad >= state->sd->entity.num_pads)
drivers/media/v4l2-core/v4l2-subdev.c
186
led_set_brightness(sd->privacy_led, 0);
drivers/media/v4l2-core/v4l2-subdev.c
1922
int v4l2_subdev_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_state *state,
drivers/media/v4l2-core/v4l2-subdev.c
1937
int v4l2_subdev_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
1953
int v4l2_subdev_set_routing(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
199
static inline int check_pad(struct v4l2_subdev *sd, u32 pad)
drivers/media/v4l2-core/v4l2-subdev.c
2011
int v4l2_subdev_set_routing_with_fmt(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
202
if (sd->entity.num_pads) {
drivers/media/v4l2-core/v4l2-subdev.c
2020
ret = v4l2_subdev_set_routing(sd, state, routing);
drivers/media/v4l2-core/v4l2-subdev.c
203
if (pad >= sd->entity.num_pads)
drivers/media/v4l2-core/v4l2-subdev.c
2107
int v4l2_subdev_routing_validate(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
2117
remote_pads = kcalloc(sd->entity.num_pads, sizeof(*remote_pads),
drivers/media/v4l2-core/v4l2-subdev.c
2122
for (i = 0; i < sd->entity.num_pads; ++i)
drivers/media/v4l2-core/v4l2-subdev.c
2130
if (route->sink_pad >= sd->entity.num_pads ||
drivers/media/v4l2-core/v4l2-subdev.c
2131
!(sd->entity.pads[route->sink_pad].flags & MEDIA_PAD_FL_SINK)) {
drivers/media/v4l2-core/v4l2-subdev.c
2132
dev_dbg(sd->dev, "route %u sink (%u) is not a sink pad\n",
drivers/media/v4l2-core/v4l2-subdev.c
2137
if (route->source_pad >= sd->entity.num_pads ||
drivers/media/v4l2-core/v4l2-subdev.c
2138
!(sd->entity.pads[route->source_pad].flags & MEDIA_PAD_FL_SOURCE)) {
drivers/media/v4l2-core/v4l2-subdev.c
2139
dev_dbg(sd->dev, "route %u source (%u) is not a source pad\n",
drivers/media/v4l2-core/v4l2-subdev.c
214
static int check_state(struct v4l2_subdev *sd, struct v4l2_subdev_state *state,
drivers/media/v4l2-core/v4l2-subdev.c
2151
dev_dbg(sd->dev,
drivers/media/v4l2-core/v4l2-subdev.c
2165
dev_dbg(sd->dev,
drivers/media/v4l2-core/v4l2-subdev.c
217
if (sd->flags & V4L2_SUBDEV_FL_STREAMS) {
drivers/media/v4l2-core/v4l2-subdev.c
2179
dev_dbg(sd->dev,
drivers/media/v4l2-core/v4l2-subdev.c
2193
dev_dbg(sd->dev,
drivers/media/v4l2-core/v4l2-subdev.c
2215
dev_dbg(sd->dev,
drivers/media/v4l2-core/v4l2-subdev.c
2229
dev_dbg(sd->dev,
drivers/media/v4l2-core/v4l2-subdev.c
2246
static void v4l2_subdev_collect_streams(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
2252
if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS)) {
drivers/media/v4l2-core/v4l2-subdev.c
2255
(sd->enabled_pads & BIT_ULL(pad)) ? BIT_ULL(0) : 0;
drivers/media/v4l2-core/v4l2-subdev.c
2256
dev_dbg(sd->dev,
drivers/media/v4l2-core/v4l2-subdev.c
2258
sd->entity.name);
drivers/media/v4l2-core/v4l2-subdev.c
2277
dev_dbg(sd->dev,
drivers/media/v4l2-core/v4l2-subdev.c
2279
sd->entity.name, pad, *found_streams, *enabled_streams);
drivers/media/v4l2-core/v4l2-subdev.c
2282
static void v4l2_subdev_set_streams_enabled(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
2287
if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS)) {
drivers/media/v4l2-core/v4l2-subdev.c
2289
sd->enabled_pads |= BIT_ULL(pad);
drivers/media/v4l2-core/v4l2-subdev.c
2291
sd->enabled_pads &= ~BIT_ULL(pad);
drivers/media/v4l2-core/v4l2-subdev.c
2304
int v4l2_subdev_enable_streams(struct v4l2_subdev *sd, u32 pad,
drivers/media/v4l2-core/v4l2-subdev.c
2307
struct device *dev = sd->entity.graph_obj.mdev->dev;
drivers/media/v4l2-core/v4l2-subdev.c
2315
dev_dbg(dev, "enable streams \"%s\":%u/%#llx\n", sd->entity.name, pad,
drivers/media/v4l2-core/v4l2-subdev.c
2319
if (pad >= sd->entity.num_pads)
drivers/media/v4l2-core/v4l2-subdev.c
2322
if (!(sd->entity.pads[pad].flags & MEDIA_PAD_FL_SOURCE))
drivers/media/v4l2-core/v4l2-subdev.c
2329
if (pad >= sizeof(sd->enabled_pads) * BITS_PER_BYTE)
drivers/media/v4l2-core/v4l2-subdev.c
2336
use_s_stream = !v4l2_subdev_has_op(sd, pad, enable_streams);
drivers/media/v4l2-core/v4l2-subdev.c
2339
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/v4l2-core/v4l2-subdev.c
2348
v4l2_subdev_collect_streams(sd, state, pad, streams_mask,
drivers/media/v4l2-core/v4l2-subdev.c
2353
streams_mask & ~found_streams, sd->entity.name, pad);
drivers/media/v4l2-core/v4l2-subdev.c
236
static inline int check_format(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
2360
enabled_streams, sd->entity.name, pad);
drivers/media/v4l2-core/v4l2-subdev.c
2365
already_streaming = v4l2_subdev_is_streaming(sd);
drivers/media/v4l2-core/v4l2-subdev.c
2369
ret = v4l2_subdev_call(sd, pad, enable_streams, state, pad,
drivers/media/v4l2-core/v4l2-subdev.c
2374
ret = v4l2_subdev_call(sd, video, s_stream, 1);
drivers/media/v4l2-core/v4l2-subdev.c
2386
v4l2_subdev_set_streams_enabled(sd, state, pad, streams_mask, true);
drivers/media/v4l2-core/v4l2-subdev.c
2396
v4l2_subdev_enable_privacy_led(sd);
drivers/media/v4l2-core/v4l2-subdev.c
2406
int v4l2_subdev_disable_streams(struct v4l2_subdev *sd, u32 pad,
drivers/media/v4l2-core/v4l2-subdev.c
2409
struct device *dev = sd->entity.graph_obj.mdev->dev;
drivers/media/v4l2-core/v4l2-subdev.c
2416
dev_dbg(dev, "disable streams \"%s\":%u/%#llx\n", sd->entity.name, pad,
drivers/media/v4l2-core/v4l2-subdev.c
2420
if (pad >= sd->entity.num_pads)
drivers/media/v4l2-core/v4l2-subdev.c
2423
if (!(sd->entity.pads[pad].flags & MEDIA_PAD_FL_SOURCE))
drivers/media/v4l2-core/v4l2-subdev.c
243
return check_which(format->which) ? : check_pad(sd, format->pad) ? :
drivers/media/v4l2-core/v4l2-subdev.c
2430
if (pad >= sizeof(sd->enabled_pads) * BITS_PER_BYTE)
drivers/media/v4l2-core/v4l2-subdev.c
2437
use_s_stream = !v4l2_subdev_has_op(sd, pad, disable_streams);
drivers/media/v4l2-core/v4l2-subdev.c
244
check_state(sd, state, format->which, format->pad, format->stream);
drivers/media/v4l2-core/v4l2-subdev.c
2440
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/v4l2-core/v4l2-subdev.c
2449
v4l2_subdev_collect_streams(sd, state, pad, streams_mask,
drivers/media/v4l2-core/v4l2-subdev.c
2454
streams_mask & ~found_streams, sd->entity.name, pad);
drivers/media/v4l2-core/v4l2-subdev.c
2461
streams_mask & ~enabled_streams, sd->entity.name, pad);
drivers/media/v4l2-core/v4l2-subdev.c
2468
ret = v4l2_subdev_call(sd, pad, disable_streams, state, pad,
drivers/media/v4l2-core/v4l2-subdev.c
247
static int call_get_fmt(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
2473
if (!(sd->enabled_pads & ~BIT_ULL(pad)))
drivers/media/v4l2-core/v4l2-subdev.c
2474
ret = v4l2_subdev_call(sd, video, s_stream, 0);
drivers/media/v4l2-core/v4l2-subdev.c
2485
v4l2_subdev_set_streams_enabled(sd, state, pad, streams_mask, false);
drivers/media/v4l2-core/v4l2-subdev.c
2489
if (!v4l2_subdev_is_streaming(sd))
drivers/media/v4l2-core/v4l2-subdev.c
2490
v4l2_subdev_disable_privacy_led(sd);
drivers/media/v4l2-core/v4l2-subdev.c
2499
int v4l2_subdev_s_stream_helper(struct v4l2_subdev *sd, int enable)
drivers/media/v4l2-core/v4l2-subdev.c
251
return check_format(sd, state, format) ? :
drivers/media/v4l2-core/v4l2-subdev.c
2512
media_entity_for_each_pad(&sd->entity, pad) {
drivers/media/v4l2-core/v4l2-subdev.c
252
sd->ops->pad->get_fmt(sd, state, format);
drivers/media/v4l2-core/v4l2-subdev.c
2522
if (sd->flags & V4L2_SUBDEV_FL_STREAMS) {
drivers/media/v4l2-core/v4l2-subdev.c
2527
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/media/v4l2-core/v4l2-subdev.c
2542
return v4l2_subdev_enable_streams(sd, pad_index, source_mask);
drivers/media/v4l2-core/v4l2-subdev.c
2544
return v4l2_subdev_disable_streams(sd, pad_index, source_mask);
drivers/media/v4l2-core/v4l2-subdev.c
255
static int call_set_fmt(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
2552
void v4l2_subdev_init(struct v4l2_subdev *sd, const struct v4l2_subdev_ops *ops)
drivers/media/v4l2-core/v4l2-subdev.c
2554
INIT_LIST_HEAD(&sd->list);
drivers/media/v4l2-core/v4l2-subdev.c
2556
sd->ops = ops;
drivers/media/v4l2-core/v4l2-subdev.c
2557
sd->v4l2_dev = NULL;
drivers/media/v4l2-core/v4l2-subdev.c
2558
sd->flags = 0;
drivers/media/v4l2-core/v4l2-subdev.c
2559
sd->name[0] = '\0';
drivers/media/v4l2-core/v4l2-subdev.c
2560
sd->grp_id = 0;
drivers/media/v4l2-core/v4l2-subdev.c
2561
sd->dev_priv = NULL;
drivers/media/v4l2-core/v4l2-subdev.c
2562
sd->host_priv = NULL;
drivers/media/v4l2-core/v4l2-subdev.c
2563
sd->privacy_led = NULL;
drivers/media/v4l2-core/v4l2-subdev.c
2564
INIT_LIST_HEAD(&sd->async_subdev_endpoint_list);
drivers/media/v4l2-core/v4l2-subdev.c
2566
sd->entity.name = sd->name;
drivers/media/v4l2-core/v4l2-subdev.c
2567
sd->entity.obj_type = MEDIA_ENTITY_TYPE_V4L2_SUBDEV;
drivers/media/v4l2-core/v4l2-subdev.c
2568
sd->entity.function = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN;
drivers/media/v4l2-core/v4l2-subdev.c
2573
void v4l2_subdev_notify_event(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
2576
v4l2_event_queue(sd->devnode, ev);
drivers/media/v4l2-core/v4l2-subdev.c
2577
v4l2_subdev_notify(sd, V4L2_DEVICE_NOTIFY_EVENT, (void *)ev);
drivers/media/v4l2-core/v4l2-subdev.c
2581
bool v4l2_subdev_is_streaming(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-subdev.c
2585
if (!v4l2_subdev_has_op(sd, pad, enable_streams))
drivers/media/v4l2-core/v4l2-subdev.c
2586
return sd->s_stream_enabled;
drivers/media/v4l2-core/v4l2-subdev.c
2588
if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS))
drivers/media/v4l2-core/v4l2-subdev.c
2589
return !!sd->enabled_pads;
drivers/media/v4l2-core/v4l2-subdev.c
259
return check_format(sd, state, format) ? :
drivers/media/v4l2-core/v4l2-subdev.c
2591
state = v4l2_subdev_get_locked_active_state(sd);
drivers/media/v4l2-core/v4l2-subdev.c
260
sd->ops->pad->set_fmt(sd, state, format);
drivers/media/v4l2-core/v4l2-subdev.c
2606
int v4l2_subdev_get_privacy_led(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-subdev.c
2609
sd->privacy_led = led_get(sd->dev, "privacy");
drivers/media/v4l2-core/v4l2-subdev.c
2610
if (IS_ERR(sd->privacy_led) && PTR_ERR(sd->privacy_led) != -ENOENT)
drivers/media/v4l2-core/v4l2-subdev.c
2611
return dev_err_probe(sd->dev, PTR_ERR(sd->privacy_led),
drivers/media/v4l2-core/v4l2-subdev.c
2614
if (!IS_ERR_OR_NULL(sd->privacy_led)) {
drivers/media/v4l2-core/v4l2-subdev.c
2615
mutex_lock(&sd->privacy_led->led_access);
drivers/media/v4l2-core/v4l2-subdev.c
2616
led_sysfs_disable(sd->privacy_led);
drivers/media/v4l2-core/v4l2-subdev.c
2617
led_trigger_remove(sd->privacy_led);
drivers/media/v4l2-core/v4l2-subdev.c
2618
led_set_brightness(sd->privacy_led, 0);
drivers/media/v4l2-core/v4l2-subdev.c
2619
mutex_unlock(&sd->privacy_led->led_access);
drivers/media/v4l2-core/v4l2-subdev.c
2626
void v4l2_subdev_put_privacy_led(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-subdev.c
2629
if (!IS_ERR_OR_NULL(sd->privacy_led)) {
drivers/media/v4l2-core/v4l2-subdev.c
263
static int call_enum_mbus_code(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
2630
mutex_lock(&sd->privacy_led->led_access);
drivers/media/v4l2-core/v4l2-subdev.c
2631
led_sysfs_enable(sd->privacy_led);
drivers/media/v4l2-core/v4l2-subdev.c
2632
mutex_unlock(&sd->privacy_led->led_access);
drivers/media/v4l2-core/v4l2-subdev.c
2633
led_put(sd->privacy_led);
drivers/media/v4l2-core/v4l2-subdev.c
270
return check_which(code->which) ? : check_pad(sd, code->pad) ? :
drivers/media/v4l2-core/v4l2-subdev.c
271
check_state(sd, state, code->which, code->pad, code->stream) ? :
drivers/media/v4l2-core/v4l2-subdev.c
272
sd->ops->pad->enum_mbus_code(sd, state, code);
drivers/media/v4l2-core/v4l2-subdev.c
275
static int call_enum_frame_size(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
282
return check_which(fse->which) ? : check_pad(sd, fse->pad) ? :
drivers/media/v4l2-core/v4l2-subdev.c
283
check_state(sd, state, fse->which, fse->pad, fse->stream) ? :
drivers/media/v4l2-core/v4l2-subdev.c
284
sd->ops->pad->enum_frame_size(sd, state, fse);
drivers/media/v4l2-core/v4l2-subdev.c
287
static int call_enum_frame_interval(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
294
return check_which(fie->which) ? : check_pad(sd, fie->pad) ? :
drivers/media/v4l2-core/v4l2-subdev.c
295
check_state(sd, state, fie->which, fie->pad, fie->stream) ? :
drivers/media/v4l2-core/v4l2-subdev.c
296
sd->ops->pad->enum_frame_interval(sd, state, fie);
drivers/media/v4l2-core/v4l2-subdev.c
299
static inline int check_selection(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
306
return check_which(sel->which) ? : check_pad(sd, sel->pad) ? :
drivers/media/v4l2-core/v4l2-subdev.c
307
check_state(sd, state, sel->which, sel->pad, sel->stream);
drivers/media/v4l2-core/v4l2-subdev.c
310
static int call_get_selection(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
314
return check_selection(sd, state, sel) ? :
drivers/media/v4l2-core/v4l2-subdev.c
315
sd->ops->pad->get_selection(sd, state, sel);
drivers/media/v4l2-core/v4l2-subdev.c
318
static int call_set_selection(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
322
return check_selection(sd, state, sel) ? :
drivers/media/v4l2-core/v4l2-subdev.c
323
sd->ops->pad->set_selection(sd, state, sel);
drivers/media/v4l2-core/v4l2-subdev.c
326
static inline int check_frame_interval(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
333
return check_which(fi->which) ? : check_pad(sd, fi->pad) ? :
drivers/media/v4l2-core/v4l2-subdev.c
334
check_state(sd, state, fi->which, fi->pad, fi->stream);
drivers/media/v4l2-core/v4l2-subdev.c
337
static int call_get_frame_interval(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
341
return check_frame_interval(sd, state, fi) ? :
drivers/media/v4l2-core/v4l2-subdev.c
342
sd->ops->pad->get_frame_interval(sd, state, fi);
drivers/media/v4l2-core/v4l2-subdev.c
345
static int call_set_frame_interval(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
349
return check_frame_interval(sd, state, fi) ? :
drivers/media/v4l2-core/v4l2-subdev.c
350
sd->ops->pad->set_frame_interval(sd, state, fi);
drivers/media/v4l2-core/v4l2-subdev.c
353
static int call_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/v4l2-core/v4l2-subdev.c
360
if (!(sd->entity.pads[pad].flags & MEDIA_PAD_FL_SOURCE))
drivers/media/v4l2-core/v4l2-subdev.c
366
ret = sd->ops->pad->get_frame_desc(sd, pad, fd);
drivers/media/v4l2-core/v4l2-subdev.c
370
dev_dbg(sd->dev, "Frame descriptor on pad %u, type %s\n", pad,
drivers/media/v4l2-core/v4l2-subdev.c
385
dev_dbg(sd->dev,
drivers/media/v4l2-core/v4l2-subdev.c
394
static inline int check_edid(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
403
return check_pad(sd, edid->pad);
drivers/media/v4l2-core/v4l2-subdev.c
406
static int call_get_edid(struct v4l2_subdev *sd, struct v4l2_subdev_edid *edid)
drivers/media/v4l2-core/v4l2-subdev.c
408
return check_edid(sd, edid) ? : sd->ops->pad->get_edid(sd, edid);
drivers/media/v4l2-core/v4l2-subdev.c
411
static int call_set_edid(struct v4l2_subdev *sd, struct v4l2_subdev_edid *edid)
drivers/media/v4l2-core/v4l2-subdev.c
413
return check_edid(sd, edid) ? : sd->ops->pad->set_edid(sd, edid);
drivers/media/v4l2-core/v4l2-subdev.c
416
static int call_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/v4l2-core/v4l2-subdev.c
422
return check_pad(sd, pad) ? :
drivers/media/v4l2-core/v4l2-subdev.c
423
sd->ops->pad->s_dv_timings(sd, pad, timings);
drivers/media/v4l2-core/v4l2-subdev.c
426
static int call_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/v4l2-core/v4l2-subdev.c
432
return check_pad(sd, pad) ? :
drivers/media/v4l2-core/v4l2-subdev.c
433
sd->ops->pad->g_dv_timings(sd, pad, timings);
drivers/media/v4l2-core/v4l2-subdev.c
436
static int call_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/v4l2-core/v4l2-subdev.c
442
return check_pad(sd, pad) ? :
drivers/media/v4l2-core/v4l2-subdev.c
443
sd->ops->pad->query_dv_timings(sd, pad, timings);
drivers/media/v4l2-core/v4l2-subdev.c
446
static int call_dv_timings_cap(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
452
return check_pad(sd, cap->pad) ? :
drivers/media/v4l2-core/v4l2-subdev.c
453
sd->ops->pad->dv_timings_cap(sd, cap);
drivers/media/v4l2-core/v4l2-subdev.c
456
static int call_enum_dv_timings(struct v4l2_subdev *sd,
drivers/media/v4l2-core/v4l2-subdev.c
462
return check_pad(sd, dvt->pad) ? :
drivers/media/v4l2-core/v4l2-subdev.c
463
sd->ops->pad->enum_dv_timings(sd, dvt);
drivers/media/v4l2-core/v4l2-subdev.c
466
static int call_get_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
drivers/media/v4l2-core/v4l2-subdev.c
471
return check_pad(sd, pad) ? :
drivers/media/v4l2-core/v4l2-subdev.c
472
sd->ops->pad->get_mbus_config(sd, pad, config);
drivers/media/v4l2-core/v4l2-subdev.c
475
static int call_s_stream(struct v4l2_subdev *sd, int enable)
drivers/media/v4l2-core/v4l2-subdev.c
484
if (WARN_ON(sd->s_stream_enabled == !!enable))
drivers/media/v4l2-core/v4l2-subdev.c
487
ret = sd->ops->video->s_stream(sd, enable);
drivers/media/v4l2-core/v4l2-subdev.c
490
dev_warn(sd->dev, "disabling streaming failed (%d)\n", ret);
drivers/media/v4l2-core/v4l2-subdev.c
495
sd->s_stream_enabled = enable;
drivers/media/v4l2-core/v4l2-subdev.c
498
v4l2_subdev_enable_privacy_led(sd);
drivers/media/v4l2-core/v4l2-subdev.c
500
v4l2_subdev_disable_privacy_led(sd);
drivers/media/v4l2-core/v4l2-subdev.c
513
static int call_##f##_state(struct v4l2_subdev *sd, \
drivers/media/v4l2-core/v4l2-subdev.c
520
state = v4l2_subdev_lock_and_get_active_state(sd); \
drivers/media/v4l2-core/v4l2-subdev.c
521
ret = call_##f(sd, state, arg); \
drivers/media/v4l2-core/v4l2-subdev.c
530
static int call_##f##_state(struct v4l2_subdev *sd, \
drivers/media/v4l2-core/v4l2-subdev.c
534
return call_##f(sd, state, arg); \
drivers/media/v4l2-core/v4l2-subdev.c
581
subdev_ioctl_get_state(struct v4l2_subdev *sd, struct v4l2_subdev_fh *subdev_fh,
drivers/media/v4l2-core/v4l2-subdev.c
629
v4l2_subdev_get_unlocked_active_state(sd);
drivers/media/v4l2-core/v4l2-subdev.c
636
struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
drivers/media/v4l2-core/v4l2-subdev.c
640
bool streams_subdev = sd->flags & V4L2_SUBDEV_FL_STREAMS;
drivers/media/v4l2-core/v4l2-subdev.c
702
vdev, sd->v4l2_dev->mdev, arg);
drivers/media/v4l2-core/v4l2-subdev.c
708
vdev, sd->v4l2_dev->mdev, arg);
drivers/media/v4l2-core/v4l2-subdev.c
714
vdev, sd->v4l2_dev->mdev, arg);
drivers/media/v4l2-core/v4l2-subdev.c
717
if (!(sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS))
drivers/media/v4l2-core/v4l2-subdev.c
723
if (v4l2_subdev_has_op(sd, core, subscribe_event))
drivers/media/v4l2-core/v4l2-subdev.c
724
return v4l2_subdev_call(sd, core, subscribe_event,
drivers/media/v4l2-core/v4l2-subdev.c
727
if ((sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS) &&
drivers/media/v4l2-core/v4l2-subdev.c
729
return v4l2_ctrl_subdev_subscribe_event(sd, vfh, arg);
drivers/media/v4l2-core/v4l2-subdev.c
734
if (v4l2_subdev_has_op(sd, core, unsubscribe_event))
drivers/media/v4l2-core/v4l2-subdev.c
735
return v4l2_subdev_call(sd, core, unsubscribe_event,
drivers/media/v4l2-core/v4l2-subdev.c
738
if (sd->flags & V4L2_SUBDEV_FL_HAS_EVENTS)
drivers/media/v4l2-core/v4l2-subdev.c
739
return v4l2_event_subdev_unsubscribe(sd, vfh, arg);
drivers/media/v4l2-core/v4l2-subdev.c
75
static int subdev_fh_init(struct v4l2_subdev_fh *fh, struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-subdev.c
750
return v4l2_subdev_call(sd, core, g_register, p);
drivers/media/v4l2-core/v4l2-subdev.c
758
return v4l2_subdev_call(sd, core, s_register, p);
drivers/media/v4l2-core/v4l2-subdev.c
766
if (sd->ops->core && sd->ops->core->s_register)
drivers/media/v4l2-core/v4l2-subdev.c
768
if (sd->ops->core && sd->ops->core->g_register)
drivers/media/v4l2-core/v4l2-subdev.c
770
strscpy(p->name, sd->name, sizeof(p->name));
drivers/media/v4l2-core/v4l2-subdev.c
779
sd->name);
drivers/media/v4l2-core/v4l2-subdev.c
780
ret = v4l2_subdev_call(sd, core, log_status);
drivers/media/v4l2-core/v4l2-subdev.c
782
sd->name);
drivers/media/v4l2-core/v4l2-subdev.c
794
return v4l2_subdev_call(sd, pad, get_fmt, state, format);
drivers/media/v4l2-core/v4l2-subdev.c
80
state = __v4l2_subdev_state_alloc(sd, "fh->state->lock", &key);
drivers/media/v4l2-core/v4l2-subdev.c
808
return v4l2_subdev_call(sd, pad, set_fmt, state, format);
drivers/media/v4l2-core/v4l2-subdev.c
826
sd, pad, get_selection, state, &sel);
drivers/media/v4l2-core/v4l2-subdev.c
852
sd, pad, set_selection, state, &sel);
drivers/media/v4l2-core/v4l2-subdev.c
866
return v4l2_subdev_call(sd, pad, enum_mbus_code, state,
drivers/media/v4l2-core/v4l2-subdev.c
877
return v4l2_subdev_call(sd, pad, enum_frame_size, state,
drivers/media/v4l2-core/v4l2-subdev.c
888
return v4l2_subdev_call(sd, pad, get_frame_interval, state, fi);
drivers/media/v4l2-core/v4l2-subdev.c
901
return v4l2_subdev_call(sd, pad, set_frame_interval, state, fi);
drivers/media/v4l2-core/v4l2-subdev.c
911
return v4l2_subdev_call(sd, pad, enum_frame_interval, state,
drivers/media/v4l2-core/v4l2-subdev.c
923
sd, pad, get_selection, state, sel);
drivers/media/v4l2-core/v4l2-subdev.c
937
sd, pad, set_selection, state, sel);
drivers/media/v4l2-core/v4l2-subdev.c
943
return v4l2_subdev_call(sd, pad, get_edid, edid);
drivers/media/v4l2-core/v4l2-subdev.c
949
return v4l2_subdev_call(sd, pad, set_edid, edid);
drivers/media/v4l2-core/v4l2-subdev.c
955
return v4l2_subdev_call(sd, pad, dv_timings_cap, cap);
drivers/media/v4l2-core/v4l2-subdev.c
961
return v4l2_subdev_call(sd, pad, enum_dv_timings, dvt);
drivers/media/v4l2-core/v4l2-subdev.c
965
return v4l2_subdev_call(sd, pad, query_dv_timings, 0, arg);
drivers/media/v4l2-core/v4l2-subdev.c
968
return v4l2_subdev_call(sd, pad, g_dv_timings, 0, arg);
drivers/media/v4l2-core/v4l2-subdev.c
974
return v4l2_subdev_call(sd, pad, s_dv_timings, 0, arg);
drivers/media/v4l2-core/v4l2-subdev.c
977
return v4l2_subdev_call(sd, video, g_std, arg);
drivers/media/v4l2-core/v4l2-subdev.c
98
struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
drivers/media/v4l2-core/v4l2-subdev.c
985
return v4l2_subdev_call(sd, video, s_std, *std);
drivers/media/v4l2-core/v4l2-subdev.c
992
if (v4l2_subdev_call(sd, video, g_tvnorms, &id))
drivers/media/v4l2-core/v4l2-subdev.c
999
return v4l2_subdev_call(sd, video, querystd, arg);
drivers/mfd/max77759.c
432
const struct max77759_i2c_subdev *sd)
drivers/mfd/max77759.c
443
if (sd->i2c_address) {
drivers/mfd/max77759.c
446
sd->i2c_address);
drivers/mfd/max77759.c
451
sd->cfg->name);
drivers/mfd/max77759.c
454
regmap = devm_regmap_init_i2c(sub, sd->cfg);
drivers/mfd/max77759.c
458
sd->cfg->name);
drivers/mfd/max77759.c
460
ret = regmap_attach_dev(&client->dev, regmap, sd->cfg);
drivers/mfd/max77759.c
464
sd->cfg->name);
drivers/mfd/max77759.c
466
if (sd->id == MAX77759_I2C_SUBDEV_ID_MAXQ)
drivers/mfd/max77759.c
468
else if (sd->id == MAX77759_I2C_SUBDEV_ID_CHARGER)
drivers/misc/enclosure.c
201
if (cdev->dev->kobj.sd)
drivers/misc/enclosure.c
204
if (cdev->cdev.kobj.sd)
drivers/net/ethernet/chelsio/cxgb3/sge.c
1096
struct tx_sw_desc *sd = &q->sdesc[pidx];
drivers/net/ethernet/chelsio/cxgb3/sge.c
1098
sd->skb = skb;
drivers/net/ethernet/chelsio/cxgb3/sge.c
1100
sd->fragidx = 0;
drivers/net/ethernet/chelsio/cxgb3/sge.c
1101
sd->addr_idx = 0;
drivers/net/ethernet/chelsio/cxgb3/sge.c
1102
sd->sflit = flits;
drivers/net/ethernet/chelsio/cxgb3/sge.c
1106
sd->eop = 1;
drivers/net/ethernet/chelsio/cxgb3/sge.c
1134
sd->eop = 0;
drivers/net/ethernet/chelsio/cxgb3/sge.c
1135
sd++;
drivers/net/ethernet/chelsio/cxgb3/sge.c
1140
sd = q->sdesc;
drivers/net/ethernet/chelsio/cxgb3/sge.c
1143
sd->skb = skb;
drivers/net/ethernet/chelsio/cxgb3/sge.c
1153
sd->eop = 1;
drivers/net/ethernet/chelsio/cxgb3/sge.c
2137
struct rx_sw_desc *sd = &fl->sdesc[fl->cidx];
drivers/net/ethernet/chelsio/cxgb3/sge.c
2153
dma_unmap_addr(sd, dma_addr),
drivers/net/ethernet/chelsio/cxgb3/sge.c
2156
(*sd->pg_chunk.p_cnt)--;
drivers/net/ethernet/chelsio/cxgb3/sge.c
2157
if (!*sd->pg_chunk.p_cnt && sd->pg_chunk.page != fl->pg_chunk.page)
drivers/net/ethernet/chelsio/cxgb3/sge.c
2158
dma_unmap_page(&adap->pdev->dev, sd->pg_chunk.mapping,
drivers/net/ethernet/chelsio/cxgb3/sge.c
2162
put_page(sd->pg_chunk.page);
drivers/net/ethernet/chelsio/cxgb3/sge.c
2173
cpl = qs->lro_va = sd->pg_chunk.va + 2;
drivers/net/ethernet/chelsio/cxgb3/sge.c
2187
skb_frag_fill_page_desc(rx_frag, sd->pg_chunk.page,
drivers/net/ethernet/chelsio/cxgb3/sge.c
2188
sd->pg_chunk.offset + offset, len);
drivers/net/ethernet/chelsio/cxgb3/sge.c
408
struct rx_desc *d, struct rx_sw_desc *sd,
drivers/net/ethernet/chelsio/cxgb3/sge.c
417
dma_unmap_addr_set(sd, dma_addr, mapping);
drivers/net/ethernet/chelsio/cxgb3/sge.c
439
struct rx_sw_desc *sd, gfp_t gfp,
drivers/net/ethernet/chelsio/cxgb3/sge.c
461
sd->pg_chunk = q->pg_chunk;
drivers/net/ethernet/chelsio/cxgb3/sge.c
463
prefetch(sd->pg_chunk.p_cnt);
drivers/net/ethernet/chelsio/cxgb3/sge.c
473
if (sd->pg_chunk.offset == 0)
drivers/net/ethernet/chelsio/cxgb3/sge.c
474
*sd->pg_chunk.p_cnt = 1;
drivers/net/ethernet/chelsio/cxgb3/sge.c
476
*sd->pg_chunk.p_cnt += 1;
drivers/net/ethernet/chelsio/cxgb3/sge.c
503
struct rx_sw_desc *sd = &q->sdesc[q->pidx];
drivers/net/ethernet/chelsio/cxgb3/sge.c
512
if (unlikely(alloc_pg_chunk(adap, q, sd, gfp,
drivers/net/ethernet/chelsio/cxgb3/sge.c
517
mapping = sd->pg_chunk.mapping + sd->pg_chunk.offset;
drivers/net/ethernet/chelsio/cxgb3/sge.c
518
dma_unmap_addr_set(sd, dma_addr, mapping);
drivers/net/ethernet/chelsio/cxgb3/sge.c
531
sd->skb = skb;
drivers/net/ethernet/chelsio/cxgb3/sge.c
533
err = add_one_rx_buf(buf_start, q->buf_size, d, sd,
drivers/net/ethernet/chelsio/cxgb3/sge.c
536
clear_rx_desc(adap->pdev, q, sd);
drivers/net/ethernet/chelsio/cxgb3/sge.c
542
sd++;
drivers/net/ethernet/chelsio/cxgb3/sge.c
546
sd = q->sdesc;
drivers/net/ethernet/chelsio/cxgb3/sge.c
783
struct rx_sw_desc *sd = &fl->sdesc[fl->cidx];
drivers/net/ethernet/chelsio/cxgb3/sge.c
785
prefetch(sd->skb->data);
drivers/net/ethernet/chelsio/cxgb3/sge.c
793
dma_unmap_addr(sd, dma_addr),
drivers/net/ethernet/chelsio/cxgb3/sge.c
795
memcpy(skb->data, sd->skb->data, len);
drivers/net/ethernet/chelsio/cxgb3/sge.c
797
dma_unmap_addr(sd, dma_addr),
drivers/net/ethernet/chelsio/cxgb3/sge.c
812
dma_unmap_single(&adap->pdev->dev, dma_unmap_addr(sd, dma_addr),
drivers/net/ethernet/chelsio/cxgb3/sge.c
814
skb = sd->skb;
drivers/net/ethernet/chelsio/cxgb3/sge.c
844
struct rx_sw_desc *sd = &fl->sdesc[fl->cidx];
drivers/net/ethernet/chelsio/cxgb3/sge.c
846
dma_addr_t dma_addr = dma_unmap_addr(sd, dma_addr);
drivers/net/ethernet/chelsio/cxgb3/sge.c
855
memcpy(newskb->data, sd->pg_chunk.va, len);
drivers/net/ethernet/chelsio/cxgb3/sge.c
870
prefetch(sd->pg_chunk.p_cnt);
drivers/net/ethernet/chelsio/cxgb3/sge.c
883
(*sd->pg_chunk.p_cnt)--;
drivers/net/ethernet/chelsio/cxgb3/sge.c
884
if (!*sd->pg_chunk.p_cnt && sd->pg_chunk.page != fl->pg_chunk.page)
drivers/net/ethernet/chelsio/cxgb3/sge.c
885
dma_unmap_page(&adap->pdev->dev, sd->pg_chunk.mapping,
drivers/net/ethernet/chelsio/cxgb3/sge.c
889
memcpy(newskb->data, sd->pg_chunk.va, SGE_RX_PULL_LEN);
drivers/net/ethernet/chelsio/cxgb3/sge.c
890
skb_fill_page_desc(newskb, 0, sd->pg_chunk.page,
drivers/net/ethernet/chelsio/cxgb3/sge.c
891
sd->pg_chunk.offset + SGE_RX_PULL_LEN,
drivers/net/ethernet/chelsio/cxgb3/sge.c
898
sd->pg_chunk.page,
drivers/net/ethernet/chelsio/cxgb3/sge.c
899
sd->pg_chunk.offset, len);
drivers/net/ethernet/chelsio/cxgb4/sge.c
514
static inline void set_rx_sw_desc(struct rx_sw_desc *sd, struct page *pg,
drivers/net/ethernet/chelsio/cxgb4/sge.c
517
sd->page = pg;
drivers/net/ethernet/chelsio/cxgb4/sge.c
518
sd->dma_addr = mapping; /* includes size low bits */
drivers/net/ethernet/chelsio/cxgb4/sge.c
543
struct rx_sw_desc *sd = &q->sdesc[q->pidx];
drivers/net/ethernet/chelsio/cxgb4/sge.c
578
set_rx_sw_desc(sd, pg, mapping);
drivers/net/ethernet/chelsio/cxgb4/sge.c
579
sd++;
drivers/net/ethernet/chelsio/cxgb4/sge.c
584
sd = q->sdesc;
drivers/net/ethernet/chelsio/cxgb4/sge.c
607
set_rx_sw_desc(sd, pg, mapping);
drivers/net/ethernet/chelsio/cxgb4/sge.c
608
sd++;
drivers/net/ethernet/chelsio/cxgb4/sge.c
613
sd = q->sdesc;
drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h
70
return dev->sd;
drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h
73
static inline void mlx5_set_sd(struct mlx5_core_dev *dev, struct mlx5_sd *sd)
drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h
75
dev->sd = sd;
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
152
struct mlx5_sd *sd;
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
190
sd = kzalloc_obj(*sd);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
191
if (!sd)
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
194
sd->host_buses = host_buses;
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
195
sd->group_id = group_id;
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
197
mlx5_set_sd(dev, sd);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
204
struct mlx5_sd *sd = mlx5_get_sd(dev);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
207
kfree(sd);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
215
struct mlx5_sd *sd, *primary_sd;
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
218
sd = mlx5_get_sd(dev);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
219
attr.key.val = sd->group_id;
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
227
sd->devcom = devcom;
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
229
if (mlx5_devcom_comp_get_size(devcom) != sd->host_buses)
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
262
mlx5_devcom_comp_lock(sd->devcom);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
263
mlx5_devcom_comp_set_ready(sd->devcom, false);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
264
mlx5_devcom_comp_unlock(sd->devcom);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
265
mlx5_devcom_unregister_component(sd->devcom);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
271
struct mlx5_sd *sd = mlx5_get_sd(dev);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
273
mlx5_devcom_comp_lock(sd->devcom);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
274
mlx5_devcom_comp_set_ready(sd->devcom, false);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
275
mlx5_devcom_comp_unlock(sd->devcom);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
276
mlx5_devcom_unregister_component(sd->devcom);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
282
struct mlx5_sd *sd = mlx5_get_sd(primary);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
297
sd->tx_ft = ft;
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
315
struct mlx5_sd *sd = mlx5_get_sd(primary);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
317
mlx5_destroy_flow_table(sd->tx_ft);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
346
struct mlx5_sd *sd = mlx5_get_sd(secondary);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
348
mlx5_cmd_alias_obj_destroy(secondary, sd->alias_obj_id,
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
357
struct mlx5_sd *sd = mlx5_get_sd(secondary);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
36
struct mlx5_sd *sd = mlx5_get_sd(dev);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
365
&sd->alias_obj_id, alias_key);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
369
err = mlx5_fs_cmd_set_tx_flow_table_root(secondary, sd->alias_obj_id, false);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
38
if (!sd)
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
391
struct mlx5_sd *sd = mlx5_get_sd(primary);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
396
sd->group_id, pci_name(primary->pdev),
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
400
sd->group_id, i - 1, pci_name(pos->pdev),
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
41
return sd->host_buses;
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
427
struct mlx5_sd *sd = mlx5_get_sd(dev);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
435
sd = mlx5_get_sd(dev);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
436
if (!sd)
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
443
if (!mlx5_devcom_comp_is_ready(sd->devcom))
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
455
sd->dfs = debugfs_create_dir("multi-pf", mlx5_debugfs_get_dev_root(primary));
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
456
debugfs_create_x32("group_id", 0400, sd->dfs, &sd->group_id);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
457
debugfs_create_file("primary", 0400, sd->dfs, primary, &dev_fops);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
46
struct mlx5_sd *sd = mlx5_get_sd(dev);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
467
debugfs_create_file(name, 0400, sd->dfs, pos, &dev_fops);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
472
sd->group_id, mlx5_devcom_comp_get_size(sd->devcom));
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
48
if (!sd)
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
482
debugfs_remove_recursive(sd->dfs);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
492
struct mlx5_sd *sd = mlx5_get_sd(dev);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
496
if (!sd)
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
499
if (!mlx5_devcom_comp_is_ready(sd->devcom))
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
506
debugfs_remove_recursive(sd->dfs);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
508
sd_info(primary, "group id %#x, uncombined\n", sd->group_id);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
51
return sd->primary ? dev : sd->primary_dev;
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
518
struct mlx5_sd *sd = mlx5_get_sd(dev);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
521
if (!sd)
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
524
if (!mlx5_devcom_comp_is_ready(sd->devcom))
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
57
struct mlx5_sd *sd;
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
65
sd = mlx5_get_sd(primary);
drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c
66
return sd->secondaries[idx - 1];
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
520
if (dev->sd)
drivers/net/ethernet/via/via-rhine.c
1201
struct rhine_skb_dma *sd)
drivers/net/ethernet/via/via-rhine.c
1207
sd->skb = netdev_alloc_skb(dev, size);
drivers/net/ethernet/via/via-rhine.c
1208
if (!sd->skb)
drivers/net/ethernet/via/via-rhine.c
1211
sd->dma = dma_map_single(hwdev, sd->skb->data, size, DMA_FROM_DEVICE);
drivers/net/ethernet/via/via-rhine.c
1212
if (unlikely(dma_mapping_error(hwdev, sd->dma))) {
drivers/net/ethernet/via/via-rhine.c
1214
dev_kfree_skb_any(sd->skb);
drivers/net/ethernet/via/via-rhine.c
1232
struct rhine_skb_dma *sd, int entry)
drivers/net/ethernet/via/via-rhine.c
1234
rp->rx_skbuff_dma[entry] = sd->dma;
drivers/net/ethernet/via/via-rhine.c
1235
rp->rx_skbuff[entry] = sd->skb;
drivers/net/ethernet/via/via-rhine.c
1237
rp->rx_ring[entry].addr = cpu_to_le32(sd->dma);
drivers/net/ethernet/via/via-rhine.c
1265
struct rhine_skb_dma sd;
drivers/net/ethernet/via/via-rhine.c
1267
rc = rhine_skb_dma_init(dev, &sd);
drivers/net/ethernet/via/via-rhine.c
1273
rhine_skb_dma_nic_store(rp, &sd, i);
drivers/net/ethernet/via/via-rhine.c
2110
struct rhine_skb_dma sd;
drivers/net/ethernet/via/via-rhine.c
2112
if (unlikely(rhine_skb_dma_init(dev, &sd) < 0))
drivers/net/ethernet/via/via-rhine.c
2121
rhine_skb_dma_nic_store(rp, &sd, entry);
drivers/net/fddi/defza.h
790
u8 sd; /* starting delimiter */
drivers/net/phy/mscc/mscc_main.c
404
u32 vdd, sd;
drivers/net/phy/mscc/mscc_main.c
416
if (of_property_read_u32(of_node, "vsc8531,edge-slowdown", &sd))
drivers/net/phy/mscc/mscc_main.c
417
sd = 0;
drivers/net/phy/mscc/mscc_main.c
422
if (edge_table[i].slowdown[j] == sd)
drivers/nvdimm/dimm_devs.c
656
nvdimm->sec.overwrite_state = sysfs_get_dirent(dev->kobj.sd, "security");
drivers/nvdimm/pmem.c
580
pmem->bb_state = sysfs_get_dirent(disk_to_dev(disk)->kobj.sd,
drivers/nvdimm/region.c
41
sysfs_get_dirent(nd_region->dev.kobj.sd, "badblocks");
drivers/of/kobj.c
47
while (i < 16 && (kn = sysfs_get_dirent(kobj->sd, name))) {
drivers/pci/controller/vmd.c
776
struct pci_sysdata *sd = &vmd->sysdata;
drivers/pci/controller/vmd.c
890
sd->vmd_dev = vmd->dev;
drivers/pci/controller/vmd.c
898
sd->domain = pci_bus_find_emul_domain_nr(0, 0x10000, INT_MAX);
drivers/pci/controller/vmd.c
899
if (sd->domain < 0)
drivers/pci/controller/vmd.c
900
return sd->domain;
drivers/pci/controller/vmd.c
902
sd->node = pcibus_to_node(vmd->dev->bus);
drivers/pci/controller/vmd.c
905
&vmd_ops, sd, &resources);
drivers/pci/controller/vmd.c
907
pci_bus_release_emul_domain_nr(sd->domain);
drivers/pci/iov.c
421
if (virtfn->dev.kobj.sd)
drivers/pci/xen-pcifront.c
187
struct pcifront_sd *sd = bus->sysdata;
drivers/pci/xen-pcifront.c
188
struct pcifront_device *pdev = pcifront_get_pdev(sd);
drivers/pci/xen-pcifront.c
224
struct pcifront_sd *sd = bus->sysdata;
drivers/pci/xen-pcifront.c
225
struct pcifront_device *pdev = pcifront_get_pdev(sd);
drivers/pci/xen-pcifront.c
253
struct pcifront_sd *sd = dev->bus->sysdata;
drivers/pci/xen-pcifront.c
254
struct pcifront_device *pdev = pcifront_get_pdev(sd);
drivers/pci/xen-pcifront.c
305
struct pcifront_sd *sd = dev->bus->sysdata;
drivers/pci/xen-pcifront.c
306
struct pcifront_device *pdev = pcifront_get_pdev(sd);
drivers/pci/xen-pcifront.c
324
struct pcifront_sd *sd = dev->bus->sysdata;
drivers/pci/xen-pcifront.c
325
struct pcifront_device *pdev = pcifront_get_pdev(sd);
drivers/pci/xen-pcifront.c
353
struct pcifront_sd *sd = dev->bus->sysdata;
drivers/pci/xen-pcifront.c
354
struct pcifront_device *pdev = pcifront_get_pdev(sd);
drivers/pci/xen-pcifront.c
442
struct pcifront_sd *sd = NULL;
drivers/pci/xen-pcifront.c
466
sd = kzalloc_obj(*sd);
drivers/pci/xen-pcifront.c
467
if (!bus_entry || !sd) {
drivers/pci/xen-pcifront.c
474
pcifront_init_sd(sd, domain, bus, pdev);
drivers/pci/xen-pcifront.c
479
&pcifront_bus_ops, sd, &resources);
drivers/pci/xen-pcifront.c
510
kfree(sd);
drivers/pci/xen-pcifront.c
57
struct pci_sysdata sd;
drivers/pci/xen-pcifront.c
62
pcifront_get_pdev(struct pcifront_sd *sd)
drivers/pci/xen-pcifront.c
64
return sd->pdev;
drivers/pci/xen-pcifront.c
67
static inline void pcifront_init_sd(struct pcifront_sd *sd,
drivers/pci/xen-pcifront.c
72
sd->sd.node = first_online_node;
drivers/pci/xen-pcifront.c
73
sd->sd.domain = domain;
drivers/pci/xen-pcifront.c
74
sd->pdev = pdev;
drivers/phy/ti/phy-ti-pipe3.c
134
u8 sd;
drivers/phy/ti/phy-ti-pipe3.c
435
val |= dpll_params->sd << PLL_SD_SHIFT;
drivers/pinctrl/realtek/pinctrl-rtd1315e.c
683
RTD1315E_FUNC(sd),
drivers/pinctrl/realtek/pinctrl-rtd1319d.c
738
RTD1319D_FUNC(sd),
drivers/pinctrl/realtek/pinctrl-rtd1619b.c
753
RTD1619B_FUNC(sd),
drivers/pinctrl/renesas/pfc-emev2.c
1377
SH_PFC_FUNCTION(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
745
UNIPHIER_PINCTRL_GROUP(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
843
UNIPHIER_PINMUX_FUNCTION(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
637
UNIPHIER_PINCTRL_GROUP(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
691
UNIPHIER_PINMUX_FUNCTION(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
850
UNIPHIER_PINCTRL_GROUP(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
912
UNIPHIER_PINMUX_FUNCTION(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-nx1.c
389
UNIPHIER_PINCTRL_GROUP(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-nx1.c
440
UNIPHIER_PINMUX_FUNCTION(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
1135
UNIPHIER_PINCTRL_GROUP(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
1205
UNIPHIER_PINMUX_FUNCTION(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
908
UNIPHIER_PINCTRL_GROUP(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
975
UNIPHIER_PINMUX_FUNCTION(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
894
UNIPHIER_PINCTRL_GROUP(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
977
UNIPHIER_PINMUX_FUNCTION(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c
1015
UNIPHIER_PINMUX_FUNCTION(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c
937
UNIPHIER_PINCTRL_GROUP(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
567
UNIPHIER_PINCTRL_GROUP(sd),
drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
623
UNIPHIER_PINMUX_FUNCTION(sd),
drivers/pmdomain/mediatek/mtk-scpsys.c
1108
const struct scp_subdomain *sd;
drivers/pmdomain/mediatek/mtk-scpsys.c
1125
for (i = 0, sd = soc->subdomains; i < soc->num_subdomains; i++, sd++) {
drivers/pmdomain/mediatek/mtk-scpsys.c
1126
ret = pm_genpd_add_subdomain(pd_data->domains[sd->origin],
drivers/pmdomain/mediatek/mtk-scpsys.c
1127
pd_data->domains[sd->subdomain]);
drivers/regulator/as3711-regulator.c
139
AS3711_REG(SD_1, SD_CONTROL, 0, 0x7f, sd),
drivers/regulator/as3711-regulator.c
140
AS3711_REG(SD_2, SD_CONTROL, 1, 0x7f, sd),
drivers/regulator/as3711-regulator.c
141
AS3711_REG(SD_3, SD_CONTROL, 2, 0x7f, sd),
drivers/regulator/as3711-regulator.c
142
AS3711_REG(SD_4, SD_CONTROL, 3, 0x7f, sd),
drivers/scsi/aic7xxx/aic7770.c
256
struct seeprom_descriptor sd;
drivers/scsi/aic7xxx/aic7770.c
261
sd.sd_ahc = ahc;
drivers/scsi/aic7xxx/aic7770.c
262
sd.sd_control_offset = SEECTL_2840;
drivers/scsi/aic7xxx/aic7770.c
263
sd.sd_status_offset = STATUS_2840;
drivers/scsi/aic7xxx/aic7770.c
264
sd.sd_dataout_offset = STATUS_2840;
drivers/scsi/aic7xxx/aic7770.c
265
sd.sd_chip = C46;
drivers/scsi/aic7xxx/aic7770.c
266
sd.sd_MS = 0;
drivers/scsi/aic7xxx/aic7770.c
267
sd.sd_RDY = EEPROM_TF;
drivers/scsi/aic7xxx/aic7770.c
268
sd.sd_CS = CS_2840;
drivers/scsi/aic7xxx/aic7770.c
269
sd.sd_CK = CK_2840;
drivers/scsi/aic7xxx/aic7770.c
270
sd.sd_DO = DO_2840;
drivers/scsi/aic7xxx/aic7770.c
271
sd.sd_DI = DI_2840;
drivers/scsi/aic7xxx/aic7770.c
276
have_seeprom = ahc_read_seeprom(&sd, (uint16_t *)sc,
drivers/scsi/aic7xxx/aic7xxx.h
1269
struct seeprom_descriptor *sd);
drivers/scsi/aic7xxx/aic7xxx.h
1270
void ahc_release_seeprom(struct seeprom_descriptor *sd);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
105
send_seeprom_cmd(struct seeprom_descriptor *sd, const struct seeprom_cmd *cmd)
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
111
temp = sd->sd_MS ^ sd->sd_CS;
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
112
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
113
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
117
temp ^= sd->sd_DO;
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
118
SEEPROM_OUTB(sd, temp);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
119
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
120
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
121
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
123
temp ^= sd->sd_DO;
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
131
reset_seeprom(struct seeprom_descriptor *sd)
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
135
temp = sd->sd_MS;
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
136
SEEPROM_OUTB(sd, temp);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
137
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
138
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
139
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
140
SEEPROM_OUTB(sd, temp);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
141
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
149
ahc_read_seeprom(struct seeprom_descriptor *sd, uint16_t *buf,
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
166
send_seeprom_cmd(sd, &seeprom_read);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
169
temp = sd->sd_MS ^ sd->sd_CS;
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
170
for (i = (sd->sd_chip - 1); i >= 0; i--) {
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
172
temp ^= sd->sd_DO;
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
173
SEEPROM_OUTB(sd, temp);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
174
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
175
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
176
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
178
temp ^= sd->sd_DO;
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
189
SEEPROM_OUTB(sd, temp);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
190
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
192
if (SEEPROM_DATA_INB(sd) & sd->sd_DI)
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
194
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
195
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
201
reset_seeprom(sd);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
221
ahc_write_seeprom(struct seeprom_descriptor *sd, uint16_t *buf,
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
230
if (sd->sd_chip == C46) {
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
233
} else if (sd->sd_chip == C56_66) {
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
238
sd->sd_chip);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
242
send_seeprom_cmd(sd, ewen);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
243
reset_seeprom(sd);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
246
temp = sd->sd_MS ^ sd->sd_CS;
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
249
send_seeprom_cmd(sd, &seeprom_write);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
252
for (i = (sd->sd_chip - 1); i >= 0; i--) {
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
254
temp ^= sd->sd_DO;
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
255
SEEPROM_OUTB(sd, temp);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
256
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
257
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
258
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
260
temp ^= sd->sd_DO;
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
267
temp ^= sd->sd_DO;
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
268
SEEPROM_OUTB(sd, temp);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
269
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
270
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
271
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
273
temp ^= sd->sd_DO;
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
277
temp = sd->sd_MS;
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
278
SEEPROM_OUTB(sd, temp);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
279
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
280
temp = sd->sd_MS ^ sd->sd_CS;
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
282
SEEPROM_OUTB(sd, temp);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
283
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
284
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
285
CLOCK_PULSE(sd, sd->sd_RDY);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
286
} while ((SEEPROM_DATA_INB(sd) & sd->sd_DI) == 0);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
288
reset_seeprom(sd);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
292
send_seeprom_cmd(sd, ewds);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
293
reset_seeprom(sd);
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
95
#define CLOCK_PULSE(sd, rdy) \
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
96
while ((SEEPROM_STATUS_INB(sd) & rdy) == 0) { \
drivers/scsi/aic7xxx/aic7xxx_93cx6.c
99
(void)SEEPROM_INB(sd); /* Clear clock */
drivers/scsi/aic7xxx/aic7xxx_93cx6.h
83
#define SEEPROM_INB(sd) \
drivers/scsi/aic7xxx/aic7xxx_93cx6.h
84
ahc_inb(sd->sd_ahc, sd->sd_control_offset)
drivers/scsi/aic7xxx/aic7xxx_93cx6.h
85
#define SEEPROM_OUTB(sd, value) \
drivers/scsi/aic7xxx/aic7xxx_93cx6.h
87
ahc_outb(sd->sd_ahc, sd->sd_control_offset, value); \
drivers/scsi/aic7xxx/aic7xxx_93cx6.h
88
ahc_flush_device_writes(sd->sd_ahc); \
drivers/scsi/aic7xxx/aic7xxx_93cx6.h
91
#define SEEPROM_STATUS_INB(sd) \
drivers/scsi/aic7xxx/aic7xxx_93cx6.h
92
ahc_inb(sd->sd_ahc, sd->sd_status_offset)
drivers/scsi/aic7xxx/aic7xxx_93cx6.h
93
#define SEEPROM_DATA_INB(sd) \
drivers/scsi/aic7xxx/aic7xxx_93cx6.h
94
ahc_inb(sd->sd_ahc, sd->sd_dataout_offset)
drivers/scsi/aic7xxx/aic7xxx_93cx6.h
96
int ahc_read_seeprom(struct seeprom_descriptor *sd, uint16_t *buf,
drivers/scsi/aic7xxx/aic7xxx_93cx6.h
98
int ahc_write_seeprom(struct seeprom_descriptor *sd, uint16_t *buf,
drivers/scsi/aic7xxx/aic7xxx_pci.c
1255
struct seeprom_descriptor sd;
drivers/scsi/aic7xxx/aic7xxx_pci.c
1260
sd.sd_ahc = ahc;
drivers/scsi/aic7xxx/aic7xxx_pci.c
1261
sd.sd_control_offset = SEECTL;
drivers/scsi/aic7xxx/aic7xxx_pci.c
1262
sd.sd_status_offset = SEECTL;
drivers/scsi/aic7xxx/aic7xxx_pci.c
1263
sd.sd_dataout_offset = SEECTL;
drivers/scsi/aic7xxx/aic7xxx_pci.c
1273
sd.sd_chip = C56_66;
drivers/scsi/aic7xxx/aic7xxx_pci.c
1275
sd.sd_chip = C46;
drivers/scsi/aic7xxx/aic7xxx_pci.c
1277
sd.sd_MS = SEEMS;
drivers/scsi/aic7xxx/aic7xxx_pci.c
1278
sd.sd_RDY = SEERDY;
drivers/scsi/aic7xxx/aic7xxx_pci.c
1279
sd.sd_CS = SEECS;
drivers/scsi/aic7xxx/aic7xxx_pci.c
1280
sd.sd_CK = SEECK;
drivers/scsi/aic7xxx/aic7xxx_pci.c
1281
sd.sd_DO = SEEDO;
drivers/scsi/aic7xxx/aic7xxx_pci.c
1282
sd.sd_DI = SEEDI;
drivers/scsi/aic7xxx/aic7xxx_pci.c
1284
have_seeprom = ahc_acquire_seeprom(ahc, &sd);
drivers/scsi/aic7xxx/aic7xxx_pci.c
1295
have_seeprom = ahc_read_seeprom(&sd, (uint16_t *)sc,
drivers/scsi/aic7xxx/aic7xxx_pci.c
1302
if (have_seeprom != 0 || sd.sd_chip == C56_66) {
drivers/scsi/aic7xxx/aic7xxx_pci.c
1311
sd.sd_chip = C56_66;
drivers/scsi/aic7xxx/aic7xxx_pci.c
1313
ahc_release_seeprom(&sd);
drivers/scsi/aic7xxx/aic7xxx_pci.c
1316
if (sd.sd_chip == C56_66)
drivers/scsi/aic7xxx/aic7xxx_pci.c
1387
ahc_acquire_seeprom(ahc, &sd);
drivers/scsi/aic7xxx/aic7xxx_pci.c
1388
configure_termination(ahc, &sd, sc->adapter_control, sxfrctl1);
drivers/scsi/aic7xxx/aic7xxx_pci.c
1389
ahc_release_seeprom(&sd);
drivers/scsi/aic7xxx/aic7xxx_pci.c
1521
struct seeprom_descriptor *sd,
drivers/scsi/aic7xxx/aic7xxx_pci.c
1540
SEEPROM_OUTB(sd, sd->sd_MS | sd->sd_CS);
drivers/scsi/aic7xxx/aic7xxx_pci.c
1742
SEEPROM_OUTB(sd, sd->sd_MS); /* Clear CS */
drivers/scsi/aic7xxx/aic7xxx_pci.c
1832
ahc_acquire_seeprom(struct ahc_softc *ahc, struct seeprom_descriptor *sd)
drivers/scsi/aic7xxx/aic7xxx_pci.c
1847
SEEPROM_OUTB(sd, sd->sd_MS);
drivers/scsi/aic7xxx/aic7xxx_pci.c
1849
while (--wait && ((SEEPROM_STATUS_INB(sd) & sd->sd_RDY) == 0)) {
drivers/scsi/aic7xxx/aic7xxx_pci.c
1852
if ((SEEPROM_STATUS_INB(sd) & sd->sd_RDY) == 0) {
drivers/scsi/aic7xxx/aic7xxx_pci.c
1853
SEEPROM_OUTB(sd, 0);
drivers/scsi/aic7xxx/aic7xxx_pci.c
1860
ahc_release_seeprom(struct seeprom_descriptor *sd)
drivers/scsi/aic7xxx/aic7xxx_pci.c
1863
SEEPROM_OUTB(sd, 0);
drivers/scsi/aic7xxx/aic7xxx_pci.c
2027
struct seeprom_descriptor sd;
drivers/scsi/aic7xxx/aic7xxx_pci.c
2030
sd.sd_ahc = ahc;
drivers/scsi/aic7xxx/aic7xxx_pci.c
2031
sd.sd_control_offset = SEECTL;
drivers/scsi/aic7xxx/aic7xxx_pci.c
2032
sd.sd_status_offset = SEECTL;
drivers/scsi/aic7xxx/aic7xxx_pci.c
2033
sd.sd_dataout_offset = SEECTL;
drivers/scsi/aic7xxx/aic7xxx_pci.c
2035
ahc_acquire_seeprom(ahc, &sd);
drivers/scsi/aic7xxx/aic7xxx_pci.c
2036
configure_termination(ahc, &sd,
drivers/scsi/aic7xxx/aic7xxx_pci.c
2039
ahc_release_seeprom(&sd);
drivers/scsi/aic7xxx/aic7xxx_pci.c
607
struct seeprom_descriptor *sd,
drivers/scsi/aic7xxx/aic7xxx_proc.c
191
struct seeprom_descriptor sd;
drivers/scsi/aic7xxx/aic7xxx_proc.c
215
sd.sd_ahc = ahc;
drivers/scsi/aic7xxx/aic7xxx_proc.c
218
sd.sd_control_offset = SEECTL;
drivers/scsi/aic7xxx/aic7xxx_proc.c
219
sd.sd_status_offset = SEECTL;
drivers/scsi/aic7xxx/aic7xxx_proc.c
220
sd.sd_dataout_offset = SEECTL;
drivers/scsi/aic7xxx/aic7xxx_proc.c
222
sd.sd_chip = C56_66;
drivers/scsi/aic7xxx/aic7xxx_proc.c
224
sd.sd_chip = C46;
drivers/scsi/aic7xxx/aic7xxx_proc.c
225
sd.sd_MS = SEEMS;
drivers/scsi/aic7xxx/aic7xxx_proc.c
226
sd.sd_RDY = SEERDY;
drivers/scsi/aic7xxx/aic7xxx_proc.c
227
sd.sd_CS = SEECS;
drivers/scsi/aic7xxx/aic7xxx_proc.c
228
sd.sd_CK = SEECK;
drivers/scsi/aic7xxx/aic7xxx_proc.c
229
sd.sd_DO = SEEDO;
drivers/scsi/aic7xxx/aic7xxx_proc.c
230
sd.sd_DI = SEEDI;
drivers/scsi/aic7xxx/aic7xxx_proc.c
231
have_seeprom = ahc_acquire_seeprom(ahc, &sd);
drivers/scsi/aic7xxx/aic7xxx_proc.c
235
sd.sd_control_offset = SEECTL_2840;
drivers/scsi/aic7xxx/aic7xxx_proc.c
236
sd.sd_status_offset = STATUS_2840;
drivers/scsi/aic7xxx/aic7xxx_proc.c
237
sd.sd_dataout_offset = STATUS_2840;
drivers/scsi/aic7xxx/aic7xxx_proc.c
238
sd.sd_chip = C46;
drivers/scsi/aic7xxx/aic7xxx_proc.c
239
sd.sd_MS = 0;
drivers/scsi/aic7xxx/aic7xxx_proc.c
240
sd.sd_RDY = EEPROM_TF;
drivers/scsi/aic7xxx/aic7xxx_proc.c
241
sd.sd_CS = CS_2840;
drivers/scsi/aic7xxx/aic7xxx_proc.c
242
sd.sd_CK = CK_2840;
drivers/scsi/aic7xxx/aic7xxx_proc.c
243
sd.sd_DO = DO_2840;
drivers/scsi/aic7xxx/aic7xxx_proc.c
244
sd.sd_DI = DI_2840;
drivers/scsi/aic7xxx/aic7xxx_proc.c
268
ahc_write_seeprom(&sd, (u_int16_t *)buffer, start_addr,
drivers/scsi/aic7xxx/aic7xxx_proc.c
270
ahc_read_seeprom(&sd, (uint16_t *)ahc->seep_config,
drivers/scsi/aic7xxx/aic7xxx_proc.c
274
ahc_release_seeprom(&sd);
drivers/scsi/ch.c
896
static int ch_probe(struct scsi_device *sd)
drivers/scsi/ch.c
898
struct device *dev = &sd->sdev_gendev;
drivers/scsi/ch.c
903
if (sd->type != TYPE_MEDIUM_CHANGER)
drivers/scsi/ch.c
924
ret = scsi_device_get(sd);
drivers/scsi/ch.c
926
sdev_printk(KERN_WARNING, sd, "ch%d: failed to get device\n",
drivers/scsi/ch.c
933
ch->device = sd;
drivers/scsi/ch.c
938
sdev_printk(KERN_WARNING, sd, "ch%d: device_create failed\n",
drivers/scsi/ch.c
955
sdev_printk(KERN_INFO, sd, "Attached scsi changer %s\n", ch->name);
drivers/scsi/ch.c
961
scsi_device_put(sd);
drivers/scsi/ch.c
969
static void ch_remove(struct scsi_device *sd)
drivers/scsi/ch.c
971
struct device *dev = &sd->sdev_gendev;
drivers/scsi/esas2r/esas2r_ioctl.c
1523
int esas2r_ioctl(struct scsi_device *sd, unsigned int cmd, void __user *arg)
drivers/scsi/esas2r/esas2r_ioctl.c
1525
return esas2r_ioctl_handler(sd->host->hostdata, cmd, arg);
drivers/scsi/hpsa.c
1286
struct hpsa_scsi_dev_t *sd;
drivers/scsi/hpsa.c
1321
sd = h->dev[i];
drivers/scsi/hpsa.c
1322
memcpy(addr2, sd->scsi3addr, 8);
drivers/scsi/hpsa.c
1327
device->bus = sd->bus;
drivers/scsi/hpsa.c
1328
device->target = sd->target;
drivers/scsi/hpsa.c
1441
struct hpsa_scsi_dev_t *sd;
drivers/scsi/hpsa.c
1445
sd = h->dev[entry];
drivers/scsi/hpsa.c
1452
hpsa_show_dev_msg(KERN_INFO, h, sd, "removed");
drivers/scsi/hpsa.c
1612
struct hpsa_scsi_dev_t *sd)
drivers/scsi/hpsa.c
1614
if (sd->volume_offline == HPSA_VPD_LV_STATUS_UNSUPPORTED)
drivers/scsi/hpsa.c
1618
sd->bus, sd->target, sd->lun);
drivers/scsi/hpsa.c
1619
switch (sd->volume_offline) {
drivers/scsi/hpsa.c
1626
sd->bus, sd->target, sd->lun);
drivers/scsi/hpsa.c
1632
sd->bus, sd->target, sd->lun);
drivers/scsi/hpsa.c
1638
sd->bus, sd->target, sd->lun);
drivers/scsi/hpsa.c
1644
sd->bus, sd->target, sd->lun);
drivers/scsi/hpsa.c
1650
sd->bus, sd->target, sd->lun);
drivers/scsi/hpsa.c
1656
sd->bus, sd->target, sd->lun);
drivers/scsi/hpsa.c
1662
sd->bus, sd->target, sd->lun);
drivers/scsi/hpsa.c
1668
sd->bus, sd->target, sd->lun);
drivers/scsi/hpsa.c
1674
sd->bus, sd->target, sd->lun);
drivers/scsi/hpsa.c
1680
sd->bus, sd->target, sd->lun);
drivers/scsi/hpsa.c
1686
sd->bus, sd->target, sd->lun);
drivers/scsi/hpsa.c
1915
struct hpsa_scsi_dev_t *sd[], int nsds)
drivers/scsi/hpsa.c
1962
device_change = hpsa_scsi_find_entry(csd, sd, nsds, &entry);
drivers/scsi/hpsa.c
1969
hpsa_scsi_replace_entry(h, i, sd[entry],
drivers/scsi/hpsa.c
1974
sd[entry] = NULL;
drivers/scsi/hpsa.c
1976
hpsa_scsi_update_entry(h, i, sd[entry]);
drivers/scsi/hpsa.c
1986
if (!sd[i]) /* if already added above. */
drivers/scsi/hpsa.c
1994
if (sd[i]->volume_offline) {
drivers/scsi/hpsa.c
1995
hpsa_show_volume_status(h, sd[i]);
drivers/scsi/hpsa.c
1996
hpsa_show_dev_msg(KERN_INFO, h, sd[i], "offline");
drivers/scsi/hpsa.c
2000
device_change = hpsa_scsi_find_entry(sd[i], h->dev,
drivers/scsi/hpsa.c
2004
if (hpsa_scsi_add_entry(h, sd[i], added, &nadded) != 0)
drivers/scsi/hpsa.c
2006
sd[i] = NULL; /* prevent from being freed later. */
drivers/scsi/hpsa.c
2038
if (!sd[i]) /* if already added above. */
drivers/scsi/hpsa.c
2040
if (sd[i]->volume_offline)
drivers/scsi/hpsa.c
2041
hpsa_monitor_offline_device(h, sd[i]->scsi3addr);
drivers/scsi/hpsa.c
2094
struct hpsa_scsi_dev_t *sd;
drivers/scsi/hpsa.c
2097
sd = h->dev[i];
drivers/scsi/hpsa.c
2098
if (sd->bus == bus && sd->target == target && sd->lun == lun)
drivers/scsi/hpsa.c
2099
return sd;
drivers/scsi/hpsa.c
2106
struct hpsa_scsi_dev_t *sd = NULL;
drivers/scsi/hpsa.c
2118
sd = hpsa_find_device_by_sas_rphy(h, rphy);
drivers/scsi/hpsa.c
2119
if (sd) {
drivers/scsi/hpsa.c
2120
sd->target = sdev_id(sdev);
drivers/scsi/hpsa.c
2121
sd->lun = sdev->lun;
drivers/scsi/hpsa.c
2124
if (!sd)
drivers/scsi/hpsa.c
2125
sd = lookup_hpsa_scsi_dev(h, sdev_channel(sdev),
drivers/scsi/hpsa.c
2128
if (sd && sd->expose_device) {
drivers/scsi/hpsa.c
2129
atomic_set(&sd->ioaccel_cmds_out, 0);
drivers/scsi/hpsa.c
2130
sdev->hostdata = sd;
drivers/scsi/hpsa.c
2142
struct hpsa_scsi_dev_t *sd;
drivers/scsi/hpsa.c
2145
sd = sdev->hostdata;
drivers/scsi/hpsa.c
2146
sdev->no_uld_attach = !sd || !sd->expose_device;
drivers/scsi/hpsa.c
2148
if (sd) {
drivers/scsi/hpsa.c
2149
sd->was_removed = 0;
drivers/scsi/hpsa.c
2150
queue_depth = sd->queue_depth != 0 ?
drivers/scsi/hpsa.c
2151
sd->queue_depth : sdev->host->can_queue;
drivers/scsi/hpsa.c
2152
if (sd->external) {
drivers/scsi/hpsa.c
2158
if (is_hba_lunid(sd->scsi3addr)) {
drivers/scsi/hpsa.c
9835
struct hpsa_scsi_dev_t *sd;
drivers/scsi/hpsa.c
9845
sd = hpsa_find_device_by_sas_rphy(h, rphy);
drivers/scsi/hpsa.c
9846
if (!sd)
drivers/scsi/hpsa.c
9849
*identifier = sd->eli;
drivers/scsi/sd_trace.h
6
#define TRACE_SYSTEM sd
drivers/siox/siox-core.c
873
sdevice->status_errors_kn = sysfs_get_dirent(sdevice->dev.kobj.sd,
drivers/siox/siox-core.c
875
sdevice->watchdog_kn = sysfs_get_dirent(sdevice->dev.kobj.sd,
drivers/siox/siox-core.c
877
sdevice->watchdog_errors_kn = sysfs_get_dirent(sdevice->dev.kobj.sd,
drivers/siox/siox-core.c
879
sdevice->connected_kn = sysfs_get_dirent(sdevice->dev.kobj.sd,
drivers/soc/fsl/dpio/qbman-portal.c
211
u8 epm, int sd, int sp, int se,
drivers/soc/fsl/dpio/qbman-portal.c
220
sd << SWP_CFG_SD_SHIFT |
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
213
static long __gc2235_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
217
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
249
static int gc2235_set_exposure(struct v4l2_subdev *sd, int exposure,
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
252
struct gc2235_device *dev = to_gc2235_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
256
ret = __gc2235_set_exposure(sd, exposure, gain, digitgain);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
262
static long gc2235_s_exposure(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
271
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
277
return gc2235_set_exposure(sd, exp, gain, digitgain);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
280
static long gc2235_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
284
return gc2235_s_exposure(sd, arg);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
295
static int gc2235_q_exposure(struct v4l2_subdev *sd, s32 *value)
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
297
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
329
ret = gc2235_q_exposure(&dev->sd, &ctrl->val);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
356
static int __gc2235_init(struct v4l2_subdev *sd)
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
358
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
369
static int power_ctrl(struct v4l2_subdev *sd, bool flag)
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
372
struct gc2235_device *dev = to_gc2235_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
378
ret = dev->platform_data->v1p8_ctrl(sd, 1);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
381
ret |= dev->platform_data->v2p8_ctrl(sd, 1);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
383
ret = dev->platform_data->v1p8_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
384
ret |= dev->platform_data->v2p8_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
389
static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
391
struct gc2235_device *dev = to_gc2235_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
397
ret = dev->platform_data->gpio1_ctrl(sd, !flag);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
399
ret |= dev->platform_data->gpio0_ctrl(sd, flag);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
404
static int power_up(struct v4l2_subdev *sd)
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
406
struct gc2235_device *dev = to_gc2235_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
407
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
416
ret = power_ctrl(sd, 1);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
423
ret = dev->platform_data->flisclk_ctrl(sd, 1);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
429
ret = gpio_ctrl(sd, 1);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
431
ret = gpio_ctrl(sd, 1);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
440
gpio_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
442
power_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
448
static int power_down(struct v4l2_subdev *sd)
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
450
struct gc2235_device *dev = to_gc2235_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
451
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
460
ret = gpio_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
462
ret = gpio_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
467
ret = dev->platform_data->flisclk_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
472
ret = power_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
479
static int gc2235_s_power(struct v4l2_subdev *sd, int on)
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
484
ret = power_down(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
486
ret = power_up(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
488
ret = __gc2235_init(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
494
static int gc2235_startup(struct v4l2_subdev *sd)
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
496
struct gc2235_device *dev = to_gc2235_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
497
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
507
power_down(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
508
power_up(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
522
static int gc2235_set_fmt(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
527
struct gc2235_device *dev = to_gc2235_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
528
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
533
gc2235_info = v4l2_get_subdev_hostdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
559
ret = gc2235_startup(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
570
static int gc2235_get_fmt(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
575
struct gc2235_device *dev = to_gc2235_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
612
static int gc2235_s_stream(struct v4l2_subdev *sd, int enable)
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
614
struct gc2235_device *dev = to_gc2235_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
615
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
629
static int gc2235_s_config(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
632
struct gc2235_device *dev = to_gc2235_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
633
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
648
ret = power_down(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
654
ret = power_up(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
660
ret = dev->platform_data->csi_cfg(sd, 1);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
672
ret = power_down(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
682
dev->platform_data->csi_cfg(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
684
power_down(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
691
static int gc2235_get_frame_interval(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
695
struct gc2235_device *dev = to_gc2235_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
710
static int gc2235_enum_mbus_code(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
721
static int gc2235_enum_frame_size(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
738
static int gc2235_g_skip_frames(struct v4l2_subdev *sd, u32 *frames)
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
740
struct gc2235_device *dev = to_gc2235_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
779
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
780
struct gc2235_device *dev = to_gc2235_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
782
dev->platform_data->csi_cfg(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
784
v4l2_device_unregister_subdev(sd);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
785
media_entity_cleanup(&dev->sd.entity);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
804
v4l2_i2c_subdev_init(&dev->sd, client, &gc2235_ops);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
806
gcpdev = gmin_camera_platform_data(&dev->sd,
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
810
ret = gc2235_s_config(&dev->sd, client->irq, gcpdev);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
814
dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
817
dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
837
dev->sd.ctrl_handler = &dev->ctrl_handler;
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
839
ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
843
return atomisp_register_i2c_module(&dev->sd, gcpdev);
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
846
v4l2_device_unregister_subdev(&dev->sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
254
static long __ov2722_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
258
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
259
struct ov2722_device *dev = to_ov2722_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
325
static int ov2722_set_exposure(struct v4l2_subdev *sd, int exposure,
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
328
struct ov2722_device *dev = to_ov2722_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
332
ret = __ov2722_set_exposure(sd, exposure, gain, digitgain);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
338
static long ov2722_s_exposure(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
347
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
353
return ov2722_set_exposure(sd, exp, gain, digitgain);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
356
static long ov2722_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
360
return ov2722_s_exposure(sd, arg);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
370
static int ov2722_q_exposure(struct v4l2_subdev *sd, s32 *value)
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
372
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
410
ret = ov2722_q_exposure(&dev->sd, &ctrl->val);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
455
static int ov2722_init(struct v4l2_subdev *sd)
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
457
struct ov2722_device *dev = to_ov2722_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
470
static int power_ctrl(struct v4l2_subdev *sd, bool flag)
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
473
struct ov2722_device *dev = to_ov2722_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
479
ret = dev->platform_data->v1p8_ctrl(sd, 1);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
481
ret = dev->platform_data->v2p8_ctrl(sd, 1);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
483
dev->platform_data->v1p8_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
486
ret = dev->platform_data->v1p8_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
487
ret |= dev->platform_data->v2p8_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
493
static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
495
struct ov2722_device *dev = to_ov2722_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
504
ret = dev->platform_data->gpio0_ctrl(sd, flag);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
505
ret |= dev->platform_data->gpio1_ctrl(sd, flag);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
509
static int power_up(struct v4l2_subdev *sd)
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
511
struct ov2722_device *dev = to_ov2722_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
512
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
522
ret = power_ctrl(sd, 1);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
530
ret = gpio_ctrl(sd, 1);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
532
ret = gpio_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
538
ret = dev->platform_data->flisclk_ctrl(sd, 1);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
548
gpio_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
550
power_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
556
static int power_down(struct v4l2_subdev *sd)
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
558
struct ov2722_device *dev = to_ov2722_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
559
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
568
ret = dev->platform_data->flisclk_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
573
ret = gpio_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
575
ret = gpio_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
581
ret = power_ctrl(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
588
static int ov2722_s_power(struct v4l2_subdev *sd, int on)
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
593
return power_down(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
595
ret = power_up(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
597
return ov2722_init(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
603
static int ov2722_startup(struct v4l2_subdev *sd)
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
605
struct ov2722_device *dev = to_ov2722_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
606
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
625
static int ov2722_set_fmt(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
630
struct ov2722_device *dev = to_ov2722_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
631
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
640
ov2722_info = v4l2_get_subdev_hostdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
665
ret = ov2722_startup(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
674
power_down(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
675
ret = power_up(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
680
ret = ov2722_startup(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
699
static int ov2722_get_fmt(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
704
struct ov2722_device *dev = to_ov2722_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
749
static int ov2722_s_stream(struct v4l2_subdev *sd, int enable)
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
751
struct ov2722_device *dev = to_ov2722_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
752
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
765
static int ov2722_s_config(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
768
struct ov2722_device *dev = to_ov2722_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
769
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
784
ret = power_down(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
790
ret = power_up(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
796
ret = dev->platform_data->csi_cfg(sd, 1);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
808
ret = power_down(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
818
dev->platform_data->csi_cfg(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
820
power_down(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
827
static int ov2722_get_frame_interval(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
831
struct ov2722_device *dev = to_ov2722_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
846
static int ov2722_enum_mbus_code(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
857
static int ov2722_enum_frame_size(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
874
static int ov2722_g_skip_frames(struct v4l2_subdev *sd, u32 *frames)
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
876
struct ov2722_device *dev = to_ov2722_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
915
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
916
struct ov2722_device *dev = to_ov2722_sensor(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
918
dev->platform_data->csi_cfg(sd, 0);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
920
v4l2_device_unregister_subdev(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
922
atomisp_gmin_remove_subdev(sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
924
media_entity_cleanup(&dev->sd.entity);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
944
dev->sd.ctrl_handler = hdl;
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
962
v4l2_i2c_subdev_init(&dev->sd, client, &ov2722_ops);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
964
ovpdev = gmin_camera_platform_data(&dev->sd,
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
968
ret = ov2722_s_config(&dev->sd, client->irq, ovpdev);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
976
dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
979
dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
981
ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
985
return atomisp_register_i2c_module(&dev->sd, ovpdev);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
991
atomisp_gmin_remove_subdev(&dev->sd);
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
992
v4l2_device_unregister_subdev(&dev->sd);
drivers/staging/media/atomisp/i2c/gc2235.h
134
struct v4l2_subdev sd;
drivers/staging/media/atomisp/i2c/gc2235.h
168
#define to_gc2235_sensor(x) container_of(x, struct gc2235_device, sd)
drivers/staging/media/atomisp/i2c/ov2722.h
183
struct v4l2_subdev sd;
drivers/staging/media/atomisp/i2c/ov2722.h
221
#define to_ov2722_sensor(x) container_of(x, struct ov2722_device, sd)
drivers/staging/media/atomisp/include/linux/atomisp_gmin_platform.h
14
int atomisp_gmin_remove_subdev(struct v4l2_subdev *sd);
drivers/staging/media/atomisp/pci/atomisp_cmd.c
68
struct camera_mipi_info *atomisp_to_sensor_mipi_info(struct v4l2_subdev *sd)
drivers/staging/media/atomisp/pci/atomisp_cmd.c
70
return (struct camera_mipi_info *)v4l2_get_subdev_hostdata(sd);
drivers/staging/media/atomisp/pci/atomisp_cmd.h
37
struct camera_mipi_info *atomisp_to_sensor_mipi_info(struct v4l2_subdev *sd);
drivers/staging/media/atomisp/pci/atomisp_csi2.c
105
return atomisp_csi2_set_ffmt(sd, sd_state, which,
drivers/staging/media/atomisp/pci/atomisp_csi2.c
125
static int csi2_set_format(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_csi2.c
129
return atomisp_csi2_set_ffmt(sd, sd_state, fmt->which, fmt->pad,
drivers/staging/media/atomisp/pci/atomisp_csi2.c
159
struct v4l2_subdev *sd = &csi2->subdev;
drivers/staging/media/atomisp/pci/atomisp_csi2.c
161
struct media_entity *me = &sd->entity;
drivers/staging/media/atomisp/pci/atomisp_csi2.c
164
v4l2_subdev_init(sd, &csi2_ops);
drivers/staging/media/atomisp/pci/atomisp_csi2.c
165
snprintf(sd->name, sizeof(sd->name), "ATOM ISP CSI2-port%d", port);
drivers/staging/media/atomisp/pci/atomisp_csi2.c
167
v4l2_set_subdevdata(sd, csi2);
drivers/staging/media/atomisp/pci/atomisp_csi2.c
168
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/staging/media/atomisp/pci/atomisp_csi2.c
33
static int csi2_enum_mbus_code(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_csi2.c
59
static int csi2_get_format(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_csi2.c
63
struct atomisp_mipi_csi2_device *csi2 = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/pci/atomisp_csi2.c
73
int atomisp_csi2_set_ffmt(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_csi2.c
78
struct atomisp_mipi_csi2_device *csi2 = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/pci/atomisp_csi2.h
36
int atomisp_csi2_set_ffmt(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c
454
struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c
471
ret = ipu_bridge_instantiate_vcm(sd->dev);
drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c
475
isp->sensor_subdevs[s_asd->port] = sd;
drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c
481
struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
1000
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
1001
struct gmin_subdev *gs = find_gmin_subdev(sd);
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
1007
return camera_sensor_csi_alloc(sd, gs->csi_port, gs->csi_lanes,
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
1009
camera_sensor_csi_free(sd);
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
182
int atomisp_gmin_remove_subdev(struct v4l2_subdev *sd)
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
186
if (!sd)
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
190
if (pdata_subdevs[i].subdev == sd) {
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
194
if (gmin_subdevs[i].subdev == sd) {
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
966
static int camera_sensor_csi_alloc(struct v4l2_subdev *sd, u32 port, u32 lanes,
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
969
struct i2c_client *client = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
980
v4l2_set_subdev_hostdata(sd, csi);
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
990
static void camera_sensor_csi_free(struct v4l2_subdev *sd)
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
994
csi = v4l2_get_subdev_hostdata(sd);
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
998
static int gmin_csi_cfg(struct v4l2_subdev *sd, int flag)
drivers/staging/media/atomisp/pci/atomisp_subdev.c
135
static long isp_subdev_ioctl(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
141
static int isp_subdev_subscribe_event(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
145
struct atomisp_sub_device *isp_sd = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/pci/atomisp_subdev.c
171
static int isp_subdev_enum_mbus_code(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
183
static int isp_subdev_validate_rect(struct v4l2_subdev *sd, uint32_t pad,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
204
struct v4l2_rect *atomisp_subdev_get_rect(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
209
struct atomisp_sub_device *isp_sd = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/pci/atomisp_subdev.c
231
*atomisp_subdev_get_ffmt(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
235
struct atomisp_sub_device *isp_sd = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/pci/atomisp_subdev.c
243
static void isp_get_fmt_rect(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
253
ffmt[i] = atomisp_subdev_get_ffmt(sd, sd_state, which, i);
drivers/staging/media/atomisp/pci/atomisp_subdev.c
254
crop[i] = atomisp_subdev_get_rect(sd, sd_state, which, i,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
256
comp[i] = atomisp_subdev_get_rect(sd, sd_state, which, i,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
261
static int isp_subdev_get_selection(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
266
int rval = isp_subdev_validate_rect(sd, sel->pad, sel->target);
drivers/staging/media/atomisp/pci/atomisp_subdev.c
271
rec = atomisp_subdev_get_rect(sd, sd_state, sel->which, sel->pad,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
292
int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
297
struct atomisp_sub_device *isp_sd = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/pci/atomisp_subdev.c
307
isp_get_fmt_rect(sd, sd_state, which, ffmt, crop, comp);
drivers/staging/media/atomisp/pci/atomisp_subdev.c
353
atomisp_subdev_set_selection(sd, sd_state, which,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
444
if (!atomisp_subdev_get_rect(sd, sd_state, which, pad, target))
drivers/staging/media/atomisp/pci/atomisp_subdev.c
446
*r = *atomisp_subdev_get_rect(sd, sd_state, which, pad, target);
drivers/staging/media/atomisp/pci/atomisp_subdev.c
454
static int isp_subdev_set_selection(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
458
int rval = isp_subdev_validate_rect(sd, sel->pad, sel->target);
drivers/staging/media/atomisp/pci/atomisp_subdev.c
463
return atomisp_subdev_set_selection(sd, sd_state, sel->which,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
468
void atomisp_subdev_set_ffmt(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
473
struct atomisp_sub_device *isp_sd = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/pci/atomisp_subdev.c
476
atomisp_subdev_get_ffmt(sd, sd_state, which, pad);
drivers/staging/media/atomisp/pci/atomisp_subdev.c
502
atomisp_subdev_set_selection(sd, sd_state, which, pad,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
537
static int isp_subdev_get_format(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
541
fmt->format = *atomisp_subdev_get_ffmt(sd, sd_state, fmt->which,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
557
static int isp_subdev_set_format(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
561
atomisp_subdev_set_ffmt(sd, sd_state, fmt->which, fmt->pad,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
613
struct v4l2_subdev *sd = container_of(entity, struct v4l2_subdev,
drivers/staging/media/atomisp/pci/atomisp_subdev.c
615
struct atomisp_sub_device *asd = v4l2_get_subdevdata(sd);
drivers/staging/media/atomisp/pci/atomisp_subdev.c
621
v4l2_err(sd, "Error pad %d does not support changing flags\n",
drivers/staging/media/atomisp/pci/atomisp_subdev.c
632
v4l2_err(sd, "Error no sensor for selected CSI receiver\n");
drivers/staging/media/atomisp/pci/atomisp_subdev.c
805
struct v4l2_subdev *sd = &asd->subdev;
drivers/staging/media/atomisp/pci/atomisp_subdev.c
807
struct media_entity *me = &sd->entity;
drivers/staging/media/atomisp/pci/atomisp_subdev.c
810
v4l2_subdev_init(sd, &isp_subdev_v4l2_ops);
drivers/staging/media/atomisp/pci/atomisp_subdev.c
811
sprintf(sd->name, "Atom ISP");
drivers/staging/media/atomisp/pci/atomisp_subdev.c
812
v4l2_set_subdevdata(sd, asd);
drivers/staging/media/atomisp/pci/atomisp_subdev.c
813
sd->flags |= V4L2_SUBDEV_FL_HAS_EVENTS | V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/staging/media/atomisp/pci/atomisp_subdev.h
317
*atomisp_subdev_get_ffmt(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_subdev.h
320
struct v4l2_rect *atomisp_subdev_get_rect(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_subdev.h
324
int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_subdev.h
329
void atomisp_subdev_set_ffmt(struct v4l2_subdev *sd,
drivers/staging/media/atomisp/pci/atomisp_v4l2.c
806
struct v4l2_subdev *sd, *next;
drivers/staging/media/atomisp/pci/atomisp_v4l2.c
812
list_for_each_entry_safe(sd, next, &isp->v4l2_dev.subdevs, list)
drivers/staging/media/atomisp/pci/atomisp_v4l2.c
813
v4l2_device_unregister_subdev(sd);
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
1006
ret = v4l2_subdev_call(isc->current_subdev->sd, pad,
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
1084
return v4l2_g_parm_cap(video_devdata(file), isc->current_subdev->sd, a);
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
1091
return v4l2_s_parm_cap(video_devdata(file), isc->current_subdev->sd, a);
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
1160
struct v4l2_subdev *sd = isc->current_subdev->sd;
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
1173
ret = v4l2_subdev_call(sd, core, s_power, 1);
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
1181
v4l2_subdev_call(sd, core, s_power, 0);
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
1193
struct v4l2_subdev *sd = isc->current_subdev->sd;
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
1204
v4l2_subdev_call(sd, core, s_power, 0);
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
1738
subdev_entity->sd = subdev;
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
1776
struct v4l2_subdev *subdev = isc->current_subdev->sd;
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
346
ret = v4l2_subdev_call(isc->current_subdev->sd, video, s_stream, 1);
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
391
v4l2_subdev_call(isc->current_subdev->sd, video, s_stream, 0);
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
428
ret = v4l2_subdev_call(isc->current_subdev->sd, video, s_stream, 0);
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
837
ret = v4l2_subdev_call(isc->current_subdev->sd, pad, enum_frame_size,
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
962
ret = v4l2_subdev_call(isc->current_subdev->sd, pad, set_fmt,
drivers/staging/media/deprecated/atmel/atmel-isc.h
46
struct v4l2_subdev *sd;
drivers/staging/media/imx/imx-ic-common.c
51
v4l2_subdev_init(&priv->sd, ic_ops[priv->task_id]->subdev_ops);
drivers/staging/media/imx/imx-ic-common.c
52
v4l2_set_subdevdata(&priv->sd, priv);
drivers/staging/media/imx/imx-ic-common.c
53
priv->sd.internal_ops = ic_ops[priv->task_id]->internal_ops;
drivers/staging/media/imx/imx-ic-common.c
54
priv->sd.entity.ops = ic_ops[priv->task_id]->entity_ops;
drivers/staging/media/imx/imx-ic-common.c
55
priv->sd.entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER;
drivers/staging/media/imx/imx-ic-common.c
56
priv->sd.owner = ipu_dev->driver->owner;
drivers/staging/media/imx/imx-ic-common.c
57
priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/staging/media/imx/imx-ic-common.c
58
priv->sd.grp_id = grp_id;
drivers/staging/media/imx/imx-ic-common.c
59
imx_media_grp_id_to_sd_name(priv->sd.name, sizeof(priv->sd.name),
drivers/staging/media/imx/imx-ic-common.c
60
priv->sd.grp_id, ipu_get_num(ipu));
drivers/staging/media/imx/imx-ic-common.c
66
ret = v4l2_device_register_subdev(v4l2_dev, &priv->sd);
drivers/staging/media/imx/imx-ic-common.c
72
return &priv->sd;
drivers/staging/media/imx/imx-ic-common.c
75
int imx_media_ic_unregister(struct v4l2_subdev *sd)
drivers/staging/media/imx/imx-ic-common.c
77
struct imx_ic_priv *priv = container_of(sd, struct imx_ic_priv, sd);
drivers/staging/media/imx/imx-ic-common.c
79
v4l2_info(sd, "Removing\n");
drivers/staging/media/imx/imx-ic-common.c
83
v4l2_device_unregister_subdev(sd);
drivers/staging/media/imx/imx-ic-common.c
84
media_entity_cleanup(&sd->entity);
drivers/staging/media/imx/imx-ic-prp.c
128
static int prp_get_fmt(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-ic-prp.c
132
struct prp_priv *priv = sd_to_priv(sd);
drivers/staging/media/imx/imx-ic-prp.c
153
static int prp_set_fmt(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-ic-prp.c
157
struct prp_priv *priv = sd_to_priv(sd);
drivers/staging/media/imx/imx-ic-prp.c
214
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/staging/media/imx/imx-ic-prp.c
215
struct imx_ic_priv *ic_priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-ic-prp.c
221
ic_priv->sd.name, remote->entity->name, local->entity->name);
drivers/staging/media/imx/imx-ic-prp.c
289
static int prp_link_validate(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-ic-prp.c
294
struct imx_ic_priv *ic_priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-ic-prp.c
299
ret = v4l2_subdev_link_validate_default(sd, link,
drivers/staging/media/imx/imx-ic-prp.c
304
csi = imx_media_pipeline_subdev(&ic_priv->sd.entity,
drivers/staging/media/imx/imx-ic-prp.c
348
static int prp_s_stream(struct v4l2_subdev *sd, int enable)
drivers/staging/media/imx/imx-ic-prp.c
350
struct imx_ic_priv *ic_priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-ic-prp.c
368
dev_dbg(ic_priv->ipu_dev, "%s: stream %s\n", sd->name,
drivers/staging/media/imx/imx-ic-prp.c
396
static int prp_get_frame_interval(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-ic-prp.c
400
struct prp_priv *priv = sd_to_priv(sd);
drivers/staging/media/imx/imx-ic-prp.c
419
static int prp_set_frame_interval(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-ic-prp.c
423
struct prp_priv *priv = sd_to_priv(sd);
drivers/staging/media/imx/imx-ic-prp.c
448
static int prp_registered(struct v4l2_subdev *sd)
drivers/staging/media/imx/imx-ic-prp.c
450
struct prp_priv *priv = sd_to_priv(sd);
drivers/staging/media/imx/imx-ic-prp.c
511
return media_entity_pads_init(&ic_priv->sd.entity, PRP_NUM_PADS,
drivers/staging/media/imx/imx-ic-prp.c
57
static inline struct prp_priv *sd_to_priv(struct v4l2_subdev *sd)
drivers/staging/media/imx/imx-ic-prp.c
59
struct imx_ic_priv *ic_priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-ic-prp.c
95
static int prp_enum_mbus_code(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-ic-prp.c
99
struct prp_priv *priv = sd_to_priv(sd);
drivers/staging/media/imx/imx-ic-prpencvf.c
1014
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/staging/media/imx/imx-ic-prpencvf.c
1015
struct imx_ic_priv *ic_priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-ic-prpencvf.c
1021
ic_priv->sd.name, remote->entity->name, local->entity->name);
drivers/staging/media/imx/imx-ic-prpencvf.c
1096
v4l2_err(&ic_priv->sd, "Invalid control\n");
drivers/staging/media/imx/imx-ic-prpencvf.c
1152
ic_priv->sd.ctrl_handler = hdlr;
drivers/staging/media/imx/imx-ic-prpencvf.c
1167
static int prp_s_stream(struct v4l2_subdev *sd, int enable)
drivers/staging/media/imx/imx-ic-prpencvf.c
1169
struct imx_ic_priv *ic_priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-ic-prpencvf.c
1187
dev_dbg(ic_priv->ipu_dev, "%s: stream %s\n", sd->name,
drivers/staging/media/imx/imx-ic-prpencvf.c
1206
static int prp_get_frame_interval(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-ic-prpencvf.c
1210
struct prp_priv *priv = sd_to_priv(sd);
drivers/staging/media/imx/imx-ic-prpencvf.c
1229
static int prp_set_frame_interval(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-ic-prpencvf.c
1233
struct prp_priv *priv = sd_to_priv(sd);
drivers/staging/media/imx/imx-ic-prpencvf.c
124
static inline struct prp_priv *sd_to_priv(struct v4l2_subdev *sd)
drivers/staging/media/imx/imx-ic-prpencvf.c
1258
static int prp_registered(struct v4l2_subdev *sd)
drivers/staging/media/imx/imx-ic-prpencvf.c
126
struct imx_ic_priv *ic_priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-ic-prpencvf.c
1260
struct prp_priv *priv = sd_to_priv(sd);
drivers/staging/media/imx/imx-ic-prpencvf.c
1282
&ic_priv->sd,
drivers/staging/media/imx/imx-ic-prpencvf.c
1304
static void prp_unregistered(struct v4l2_subdev *sd)
drivers/staging/media/imx/imx-ic-prpencvf.c
1306
struct prp_priv *priv = sd_to_priv(sd);
drivers/staging/media/imx/imx-ic-prpencvf.c
1365
ret = media_entity_pads_init(&ic_priv->sd.entity, PRPENCVF_NUM_PADS,
drivers/staging/media/imx/imx-ic-prpencvf.c
159
v4l2_err(&ic_priv->sd, "failed to get IC\n");
drivers/staging/media/imx/imx-ic-prpencvf.c
167
v4l2_err(&ic_priv->sd, "could not get IDMAC channel %u\n",
drivers/staging/media/imx/imx-ic-prpencvf.c
176
v4l2_err(&ic_priv->sd, "could not get IDMAC channel %u\n",
drivers/staging/media/imx/imx-ic-prpencvf.c
185
v4l2_err(&ic_priv->sd, "could not get IDMAC channel %u\n",
drivers/staging/media/imx/imx-ic-prpencvf.c
282
v4l2_err(&ic_priv->sd, "NFB4EOF\n");
drivers/staging/media/imx/imx-ic-prpencvf.c
302
v4l2_err(&ic_priv->sd, "EOF timeout\n");
drivers/staging/media/imx/imx-ic-prpencvf.c
470
v4l2_err(&ic_priv->sd, "ipu_ic_calc_csc failed, %d\n",
drivers/staging/media/imx/imx-ic-prpencvf.c
478
v4l2_err(&ic_priv->sd, "failed to alloc rot_buf[0], %d\n", ret);
drivers/staging/media/imx/imx-ic-prpencvf.c
484
v4l2_err(&ic_priv->sd, "failed to alloc rot_buf[1], %d\n", ret);
drivers/staging/media/imx/imx-ic-prpencvf.c
492
v4l2_err(&ic_priv->sd, "ipu_ic_task_init failed, %d\n", ret);
drivers/staging/media/imx/imx-ic-prpencvf.c
501
v4l2_err(&ic_priv->sd,
drivers/staging/media/imx/imx-ic-prpencvf.c
511
v4l2_err(&ic_priv->sd,
drivers/staging/media/imx/imx-ic-prpencvf.c
523
v4l2_err(&ic_priv->sd,
drivers/staging/media/imx/imx-ic-prpencvf.c
599
v4l2_err(&ic_priv->sd, "ipu_ic_calc_csc failed, %d\n",
drivers/staging/media/imx/imx-ic-prpencvf.c
608
v4l2_err(&ic_priv->sd, "ipu_ic_task_init failed, %d\n", ret);
drivers/staging/media/imx/imx-ic-prpencvf.c
618
v4l2_err(&ic_priv->sd,
drivers/staging/media/imx/imx-ic-prpencvf.c
701
v4l2_err(&ic_priv->sd,
drivers/staging/media/imx/imx-ic-prpencvf.c
717
v4l2_err(&ic_priv->sd,
drivers/staging/media/imx/imx-ic-prpencvf.c
726
v4l2_err(&ic_priv->sd,
drivers/staging/media/imx/imx-ic-prpencvf.c
768
v4l2_warn(&ic_priv->sd, "wait last EOF timeout\n");
drivers/staging/media/imx/imx-ic-prpencvf.c
773
v4l2_warn(&ic_priv->sd,
drivers/staging/media/imx/imx-ic-prpencvf.c
841
static int prp_enum_mbus_code(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-ic-prpencvf.c
852
static int prp_get_fmt(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-ic-prpencvf.c
856
struct prp_priv *priv = sd_to_priv(sd);
drivers/staging/media/imx/imx-ic-prpencvf.c
921
static int prp_set_fmt(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-ic-prpencvf.c
925
struct prp_priv *priv = sd_to_priv(sd);
drivers/staging/media/imx/imx-ic-prpencvf.c
971
static int prp_enum_frame_size(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-ic-prpencvf.c
975
struct prp_priv *priv = sd_to_priv(sd);
drivers/staging/media/imx/imx-ic.h
15
struct v4l2_subdev sd;
drivers/staging/media/imx/imx-media-capture.c
909
struct v4l2_subdev *sd = priv->src_sd;
drivers/staging/media/imx/imx-media-capture.c
910
struct v4l2_device *v4l2_dev = sd->v4l2_dev;
drivers/staging/media/imx/imx-media-capture.c
937
ret = media_create_pad_link(&sd->entity, priv->src_sd_pad,
drivers/staging/media/imx/imx-media-csi.c
1027
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/staging/media/imx/imx-media-csi.c
1028
struct csi_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-csi.c
1117
static int csi_link_validate(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-csi.c
1122
struct csi_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-csi.c
1127
ret = v4l2_subdev_link_validate_default(sd, link,
drivers/staging/media/imx/imx-media-csi.c
1134
v4l2_err(&priv->sd,
drivers/staging/media/imx/imx-media-csi.c
120
return container_of(sdev, struct csi_priv, sd);
drivers/staging/media/imx/imx-media-csi.c
1232
static int csi_enum_mbus_code(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-csi.c
1236
struct csi_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-csi.c
1256
v4l2_err(&priv->sd,
drivers/staging/media/imx/imx-media-csi.c
1286
static int csi_enum_frame_size(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-csi.c
1290
struct csi_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-csi.c
1320
static int csi_enum_frame_interval(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-csi.c
1324
struct csi_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-csi.c
1356
static int csi_get_fmt(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-csi.c
1360
struct csi_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-csi.c
1515
static int csi_set_fmt(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-csi.c
1519
struct csi_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-csi.c
1531
v4l2_err(&priv->sd,
drivers/staging/media/imx/imx-media-csi.c
1583
static int csi_get_selection(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-csi.c
1587
struct csi_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-csi.c
1647
static int csi_set_selection(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-csi.c
1651
struct csi_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-csi.c
1662
v4l2_err(&priv->sd,
drivers/staging/media/imx/imx-media-csi.c
170
struct v4l2_subdev *sd, *remote_sd;
drivers/staging/media/imx/imx-media-csi.c
1743
static int csi_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
drivers/staging/media/imx/imx-media-csi.c
1754
static int csi_registered(struct v4l2_subdev *sd)
drivers/staging/media/imx/imx-media-csi.c
1756
struct csi_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-csi.c
1764
v4l2_err(&priv->sd, "failed to get CSI%d\n", priv->csi_id);
drivers/staging/media/imx/imx-media-csi.c
177
sd = priv->src_sd;
drivers/staging/media/imx/imx-media-csi.c
179
switch (sd->grp_id) {
drivers/staging/media/imx/imx-media-csi.c
1796
priv->fim = imx_media_fim_init(&priv->sd);
drivers/staging/media/imx/imx-media-csi.c
1802
priv->vdev = imx_media_capture_device_init(priv->sd.dev, &priv->sd,
drivers/staging/media/imx/imx-media-csi.c
1825
static void csi_unregistered(struct v4l2_subdev *sd)
drivers/staging/media/imx/imx-media-csi.c
1827
struct csi_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-csi.c
1846
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/staging/media/imx/imx-media-csi.c
1847
struct csi_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-csi.c
186
sd = imx_media_pipeline_subdev(&sd->entity,
drivers/staging/media/imx/imx-media-csi.c
189
if (IS_ERR(sd))
drivers/staging/media/imx/imx-media-csi.c
190
sd = priv->src_sd;
drivers/staging/media/imx/imx-media-csi.c
1902
struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-csi.c
1906
struct media_pad *sink = &priv->sd.entity.pads[CSI_SINK_PAD];
drivers/staging/media/imx/imx-media-csi.c
1912
if (sd->entity.function == MEDIA_ENT_F_VID_MUX)
drivers/staging/media/imx/imx-media-csi.c
1913
sd->grp_id = IMX_MEDIA_GRP_ID_CSI_MUX;
drivers/staging/media/imx/imx-media-csi.c
1915
return v4l2_create_fwnode_links_to_pad(sd, sink, 0);
drivers/staging/media/imx/imx-media-csi.c
1929
v4l2_async_subdev_nf_init(&priv->notifier, &priv->sd);
drivers/staging/media/imx/imx-media-csi.c
1959
return v4l2_async_register_subdev(&priv->sd);
drivers/staging/media/imx/imx-media-csi.c
1973
platform_set_drvdata(pdev, &priv->sd);
drivers/staging/media/imx/imx-media-csi.c
199
sd = &priv->sd;
drivers/staging/media/imx/imx-media-csi.c
1993
v4l2_subdev_init(&priv->sd, &csi_subdev_ops);
drivers/staging/media/imx/imx-media-csi.c
1994
v4l2_set_subdevdata(&priv->sd, priv);
drivers/staging/media/imx/imx-media-csi.c
1995
priv->sd.internal_ops = &csi_internal_ops;
drivers/staging/media/imx/imx-media-csi.c
1996
priv->sd.entity.ops = &csi_entity_ops;
drivers/staging/media/imx/imx-media-csi.c
1997
priv->sd.entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
drivers/staging/media/imx/imx-media-csi.c
1998
priv->sd.dev = &pdev->dev;
drivers/staging/media/imx/imx-media-csi.c
1999
priv->sd.fwnode = of_fwnode_handle(pdata->of_node);
drivers/staging/media/imx/imx-media-csi.c
2000
priv->sd.owner = THIS_MODULE;
drivers/staging/media/imx/imx-media-csi.c
2001
priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
drivers/staging/media/imx/imx-media-csi.c
2002
priv->sd.grp_id = priv->csi_id ?
drivers/staging/media/imx/imx-media-csi.c
2004
imx_media_grp_id_to_sd_name(priv->sd.name, sizeof(priv->sd.name),
drivers/staging/media/imx/imx-media-csi.c
2005
priv->sd.grp_id, ipu_get_num(priv->ipu));
drivers/staging/media/imx/imx-media-csi.c
2011
ret = media_entity_pads_init(&priv->sd.entity, CSI_NUM_PADS,
drivers/staging/media/imx/imx-media-csi.c
2019
priv->sd.ctrl_handler = &priv->ctrl_hdlr;
drivers/staging/media/imx/imx-media-csi.c
204
remote_pad = media_entity_remote_pad_unique(&sd->entity,
drivers/staging/media/imx/imx-media-csi.c
2054
struct v4l2_subdev *sd = platform_get_drvdata(pdev);
drivers/staging/media/imx/imx-media-csi.c
2055
struct csi_priv *priv = sd_to_dev(sd);
drivers/staging/media/imx/imx-media-csi.c
2061
v4l2_async_unregister_subdev(sd);
drivers/staging/media/imx/imx-media-csi.c
2062
media_entity_cleanup(&sd->entity);
drivers/staging/media/imx/imx-media-csi.c
214
v4l2_err(&priv->sd,
drivers/staging/media/imx/imx-media-csi.c
242
v4l2_err(&priv->sd, "failed to get SMFC\n");
drivers/staging/media/imx/imx-media-csi.c
250
v4l2_err(&priv->sd, "could not get IDMAC channel %u\n",
drivers/staging/media/imx/imx-media-csi.c
346
v4l2_err(&priv->sd, "NFB4EOF\n");
drivers/staging/media/imx/imx-media-csi.c
362
v4l2_err(&priv->sd, "EOF timeout\n");
drivers/staging/media/imx/imx-media-csi.c
59
struct v4l2_subdev sd;
drivers/staging/media/imx/imx-media-csi.c
624
v4l2_err(&priv->sd, "csi_idmac_setup failed: %d\n", ret);
drivers/staging/media/imx/imx-media-csi.c
635
v4l2_err(&priv->sd,
drivers/staging/media/imx/imx-media-csi.c
647
v4l2_err(&priv->sd,
drivers/staging/media/imx/imx-media-csi.c
685
v4l2_warn(&priv->sd, "wait last EOF timeout\n");
drivers/staging/media/imx/imx-media-csi.c
787
v4l2_err(&priv->sd, "CSI enable error: %d\n", ret);
drivers/staging/media/imx/imx-media-csi.c
905
static int csi_get_frame_interval(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-csi.c
909
struct csi_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-csi.c
930
static int csi_set_frame_interval(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-csi.c
934
struct csi_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-csi.c
985
static int csi_s_stream(struct v4l2_subdev *sd, int enable)
drivers/staging/media/imx/imx-media-csi.c
987
struct csi_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-dev-common.c
125
struct v4l2_subdev *sd;
drivers/staging/media/imx/imx-media-dev-common.c
128
list_for_each_entry(sd, &imxmd->v4l2_dev.subdevs, list) {
drivers/staging/media/imx/imx-media-dev-common.c
129
entity = &sd->entity;
drivers/staging/media/imx/imx-media-dev-common.c
137
sd->host_priv = vdev_lists;
drivers/staging/media/imx/imx-media-dev-common.c
140
INIT_LIST_HEAD(to_pad_vdev_list(sd, i));
drivers/staging/media/imx/imx-media-dev-common.c
203
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/staging/media/imx/imx-media-dev-common.c
207
vfd->entity.name, sd->entity.name);
drivers/staging/media/imx/imx-media-dev-common.c
210
sd->ctrl_handler,
drivers/staging/media/imx/imx-media-dev-common.c
244
struct v4l2_subdev *sd;
drivers/staging/media/imx/imx-media-dev-common.c
255
sd = media_entity_to_v4l2_subdev(source);
drivers/staging/media/imx/imx-media-dev-common.c
258
pad_vdev_list = to_pad_vdev_list(sd, pad_idx);
drivers/staging/media/imx/imx-media-dev-common.c
26
struct v4l2_subdev *sd, *csi2 = NULL;
drivers/staging/media/imx/imx-media-dev-common.c
28
list_for_each_entry(sd, &imxmd->v4l2_dev.subdevs, list) {
drivers/staging/media/imx/imx-media-dev-common.c
29
if (sd->grp_id == IMX_MEDIA_GRP_ID_CSI2) {
drivers/staging/media/imx/imx-media-dev-common.c
30
csi2 = sd;
drivers/staging/media/imx/imx-media-dev-common.c
302
static void imx_media_notify(struct v4l2_subdev *sd, unsigned int notification,
drivers/staging/media/imx/imx-media-dev-common.c
305
struct media_entity *entity = &sd->entity;
drivers/staging/media/imx/imx-media-dev-common.c
316
pad_vdev_list = to_pad_vdev_list(sd, pad->index);
drivers/staging/media/imx/imx-media-dev-common.c
37
list_for_each_entry(sd, &imxmd->v4l2_dev.subdevs, list) {
drivers/staging/media/imx/imx-media-dev-common.c
39
if (!(sd->grp_id & IMX_MEDIA_GRP_ID_IPU_CSI) &&
drivers/staging/media/imx/imx-media-dev-common.c
40
!(sd->grp_id & IMX_MEDIA_GRP_ID_CSI_MUX))
drivers/staging/media/imx/imx-media-dev-common.c
43
v4l2_create_fwnode_links(csi2, sd);
drivers/staging/media/imx/imx-media-dev-common.c
59
struct v4l2_subdev *sd;
drivers/staging/media/imx/imx-media-dev-common.c
66
sd = media_entity_to_v4l2_subdev(entity);
drivers/staging/media/imx/imx-media-dev-common.c
68
pad_vdev_list = to_pad_vdev_list(sd, srcpad->index);
drivers/staging/media/imx/imx-media-dev.c
22
struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-dev.c
28
if (sd->grp_id & IMX_MEDIA_GRP_ID_IPU_CSI) {
drivers/staging/media/imx/imx-media-dev.c
30
ret = imx_media_register_ipu_internal_subdevs(imxmd, sd);
drivers/staging/media/imx/imx-media-dev.c
35
dev_dbg(imxmd->md.dev, "subdev %s bound\n", sd->name);
drivers/staging/media/imx/imx-media-fim.c
137
v4l2_subdev_notify_event(fim->sd, &ev);
drivers/staging/media/imx/imx-media-fim.c
165
dev_dbg(fim->sd->dev,
drivers/staging/media/imx/imx-media-fim.c
180
dev_dbg(fim->sd->dev, "FIM: error: %lu usec%s\n",
drivers/staging/media/imx/imx-media-fim.c
212
v4l2_warn(fim->sd, "wait first icap event timeout\n");
drivers/staging/media/imx/imx-media-fim.c
403
return v4l2_ctrl_add_handler(fim->sd->ctrl_handler,
drivers/staging/media/imx/imx-media-fim.c
408
struct imx_media_fim *imx_media_fim_init(struct v4l2_subdev *sd)
drivers/staging/media/imx/imx-media-fim.c
41
struct v4l2_subdev *sd;
drivers/staging/media/imx/imx-media-fim.c
413
fim = devm_kzalloc(sd->dev, sizeof(*fim), GFP_KERNEL);
drivers/staging/media/imx/imx-media-fim.c
417
fim->sd = sd;
drivers/staging/media/imx/imx-media-fim.c
80
dev_dbg(fim->sd->dev, "no frame interval, FIM disabled\n");
drivers/staging/media/imx/imx-media-fim.c
88
dev_dbg(fim->sd->dev, "FI=%lu usec\n", fim->nominal);
drivers/staging/media/imx/imx-media-internal-sd.c
159
struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-internal-sd.c
168
for (i = 0; i < sd->entity.num_pads; i++) {
drivers/staging/media/imx/imx-media-internal-sd.c
170
pad = &sd->entity.pads[i];
drivers/staging/media/imx/imx-media-internal-sd.c
181
ret = create_internal_link(imxmd, sd, sink, link);
drivers/staging/media/imx/imx-media-internal-sd.c
195
struct v4l2_subdev *sd;
drivers/staging/media/imx/imx-media-internal-sd.c
221
sd = imxmd->sync_sd[ipu_id][i];
drivers/staging/media/imx/imx-media-internal-sd.c
227
if (sd || !intsd->sync_register)
drivers/staging/media/imx/imx-media-internal-sd.c
231
sd = intsd->sync_register(&imxmd->v4l2_dev, ipu_dev, ipu,
drivers/staging/media/imx/imx-media-internal-sd.c
234
if (IS_ERR(sd)) {
drivers/staging/media/imx/imx-media-internal-sd.c
235
ret = PTR_ERR(sd);
drivers/staging/media/imx/imx-media-internal-sd.c
239
imxmd->sync_sd[ipu_id][i] = sd;
drivers/staging/media/imx/imx-media-internal-sd.c
250
sd = csi;
drivers/staging/media/imx/imx-media-internal-sd.c
252
sd = imxmd->sync_sd[ipu_id][i];
drivers/staging/media/imx/imx-media-internal-sd.c
253
if (!sd)
drivers/staging/media/imx/imx-media-internal-sd.c
257
ret = create_ipu_internal_links(imxmd, intsd, sd, ipu_id);
drivers/staging/media/imx/imx-media-internal-sd.c
271
sd = imxmd->sync_sd[ipu_id][i];
drivers/staging/media/imx/imx-media-internal-sd.c
272
if (!sd || !intsd->sync_unregister)
drivers/staging/media/imx/imx-media-internal-sd.c
275
intsd->sync_unregister(sd);
drivers/staging/media/imx/imx-media-internal-sd.c
286
struct v4l2_subdev *sd;
drivers/staging/media/imx/imx-media-internal-sd.c
294
sd = imxmd->sync_sd[i][j];
drivers/staging/media/imx/imx-media-internal-sd.c
296
if (!sd || !intsd->sync_unregister)
drivers/staging/media/imx/imx-media-internal-sd.c
300
intsd->sync_unregister(sd);
drivers/staging/media/imx/imx-media-internal-sd.c
38
int (*sync_unregister)(struct v4l2_subdev *sd);
drivers/staging/media/imx/imx-media-utils.c
431
int imx_media_init_state(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-utils.c
438
for (pad = 0; pad < sd->entity.num_pads; pad++) {
drivers/staging/media/imx/imx-media-utils.c
444
ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &format);
drivers/staging/media/imx/imx-media-utils.c
661
struct v4l2_subdev *sd;
drivers/staging/media/imx/imx-media-utils.c
677
sd = media_entity_to_v4l2_subdev(pad->entity);
drivers/staging/media/imx/imx-media-utils.c
678
if (sd->grp_id & grp_id)
drivers/staging/media/imx/imx-media-utils.c
712
struct v4l2_subdev *sd;
drivers/staging/media/imx/imx-media-utils.c
715
sd = media_entity_to_v4l2_subdev(start);
drivers/staging/media/imx/imx-media-utils.c
716
if (sd->grp_id & grp_id)
drivers/staging/media/imx/imx-media-utils.c
717
return &sd->entity;
drivers/staging/media/imx/imx-media-utils.c
755
struct v4l2_subdev *sd;
drivers/staging/media/imx/imx-media-utils.c
760
sd = media_entity_to_v4l2_subdev(entity);
drivers/staging/media/imx/imx-media-utils.c
768
ret = v4l2_subdev_call(sd, video, s_stream, 1);
drivers/staging/media/imx/imx-media-utils.c
772
v4l2_subdev_call(sd, video, s_stream, 0);
drivers/staging/media/imx/imx-media-vdic.c
142
v4l2_err(&priv->sd, "failed to get VDIC\n");
drivers/staging/media/imx/imx-media-vdic.c
177
v4l2_err(&priv->sd, "could not get IDMAC channel %u\n", err_chan);
drivers/staging/media/imx/imx-media-vdic.c
380
v4l2_err(&priv->sd, "Invalid control\n");
drivers/staging/media/imx/imx-media-vdic.c
412
priv->sd.ctrl_handler = hdlr;
drivers/staging/media/imx/imx-media-vdic.c
427
static int vdic_s_stream(struct v4l2_subdev *sd, int enable)
drivers/staging/media/imx/imx-media-vdic.c
429
struct vdic_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-vdic.c
450
dev_dbg(priv->ipu_dev, "%s: stream %s\n", sd->name,
drivers/staging/media/imx/imx-media-vdic.c
490
static int vdic_enum_mbus_code(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-vdic.c
501
static int vdic_get_fmt(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-vdic.c
505
struct vdic_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-vdic.c
568
static int vdic_set_fmt(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-vdic.c
572
struct vdic_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-vdic.c
622
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/staging/media/imx/imx-media-vdic.c
623
struct vdic_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-vdic.c
628
sd->name, remote->entity->name, local->entity->name);
drivers/staging/media/imx/imx-media-vdic.c
64
struct v4l2_subdev sd;
drivers/staging/media/imx/imx-media-vdic.c
704
static int vdic_link_validate(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-vdic.c
709
struct vdic_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-vdic.c
712
ret = v4l2_subdev_link_validate_default(sd, link,
drivers/staging/media/imx/imx-media-vdic.c
720
v4l2_err(&priv->sd,
drivers/staging/media/imx/imx-media-vdic.c
729
static int vdic_get_frame_interval(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-vdic.c
733
struct vdic_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-vdic.c
754
static int vdic_set_frame_interval(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media-vdic.c
758
struct vdic_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-vdic.c
808
static int vdic_registered(struct v4l2_subdev *sd)
drivers/staging/media/imx/imx-media-vdic.c
810
struct vdic_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-vdic.c
839
static void vdic_unregistered(struct v4l2_subdev *sd)
drivers/staging/media/imx/imx-media-vdic.c
841
struct vdic_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-vdic.c
890
v4l2_subdev_init(&priv->sd, &vdic_subdev_ops);
drivers/staging/media/imx/imx-media-vdic.c
891
v4l2_set_subdevdata(&priv->sd, priv);
drivers/staging/media/imx/imx-media-vdic.c
892
priv->sd.internal_ops = &vdic_internal_ops;
drivers/staging/media/imx/imx-media-vdic.c
893
priv->sd.entity.ops = &vdic_entity_ops;
drivers/staging/media/imx/imx-media-vdic.c
894
priv->sd.entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
drivers/staging/media/imx/imx-media-vdic.c
895
priv->sd.owner = ipu_dev->driver->owner;
drivers/staging/media/imx/imx-media-vdic.c
896
priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/staging/media/imx/imx-media-vdic.c
897
priv->sd.grp_id = grp_id;
drivers/staging/media/imx/imx-media-vdic.c
898
imx_media_grp_id_to_sd_name(priv->sd.name, sizeof(priv->sd.name),
drivers/staging/media/imx/imx-media-vdic.c
899
priv->sd.grp_id, ipu_get_num(ipu));
drivers/staging/media/imx/imx-media-vdic.c
907
ret = media_entity_pads_init(&priv->sd.entity, VDIC_NUM_PADS,
drivers/staging/media/imx/imx-media-vdic.c
912
ret = v4l2_device_register_subdev(v4l2_dev, &priv->sd);
drivers/staging/media/imx/imx-media-vdic.c
916
return &priv->sd;
drivers/staging/media/imx/imx-media-vdic.c
922
int imx_media_vdic_unregister(struct v4l2_subdev *sd)
drivers/staging/media/imx/imx-media-vdic.c
924
struct vdic_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/imx/imx-media-vdic.c
926
v4l2_info(sd, "Removing\n");
drivers/staging/media/imx/imx-media-vdic.c
928
v4l2_device_unregister_subdev(sd);
drivers/staging/media/imx/imx-media-vdic.c
930
media_entity_cleanup(&sd->entity);
drivers/staging/media/imx/imx-media.h
131
to_pad_vdev_list(struct v4l2_subdev *sd, int pad_index)
drivers/staging/media/imx/imx-media.h
133
struct list_head *vdev_list = sd->host_priv;
drivers/staging/media/imx/imx-media.h
195
int imx_media_init_state(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx-media.h
243
struct imx_media_fim *imx_media_fim_init(struct v4l2_subdev *sd);
drivers/staging/media/imx/imx-media.h
260
int imx_media_vdic_unregister(struct v4l2_subdev *sd);
drivers/staging/media/imx/imx-media.h
267
int imx_media_ic_unregister(struct v4l2_subdev *sd);
drivers/staging/media/imx/imx6-mipi-csi2.c
239
v4l2_err(&csi2->sd, "ULP timeout, phy_state = 0x%08x\n", reg);
drivers/staging/media/imx/imx6-mipi-csi2.c
247
v4l2_err(&csi2->sd, "stable bus timeout, err1 = 0x%08x\n", reg);
drivers/staging/media/imx/imx6-mipi-csi2.c
265
v4l2_warn(&csi2->sd, "LP-11 wait timeout, likely a sensor driver bug, expect capture failures.\n");
drivers/staging/media/imx/imx6-mipi-csi2.c
266
v4l2_warn(&csi2->sd, "phy_state = 0x%08x\n", reg);
drivers/staging/media/imx/imx6-mipi-csi2.c
279
v4l2_err(&csi2->sd, "clock lane timeout, phy_state = 0x%08x\n",
drivers/staging/media/imx/imx6-mipi-csi2.c
39
struct v4l2_subdev sd;
drivers/staging/media/imx/imx6-mipi-csi2.c
411
static int csi2_s_stream(struct v4l2_subdev *sd, int enable)
drivers/staging/media/imx/imx6-mipi-csi2.c
413
struct csi2_dev *csi2 = sd_to_dev(sd);
drivers/staging/media/imx/imx6-mipi-csi2.c
460
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
drivers/staging/media/imx/imx6-mipi-csi2.c
461
struct csi2_dev *csi2 = sd_to_dev(sd);
drivers/staging/media/imx/imx6-mipi-csi2.c
509
static int csi2_get_fmt(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx6-mipi-csi2.c
513
struct csi2_dev *csi2 = sd_to_dev(sd);
drivers/staging/media/imx/imx6-mipi-csi2.c
527
static int csi2_set_fmt(struct v4l2_subdev *sd,
drivers/staging/media/imx/imx6-mipi-csi2.c
531
struct csi2_dev *csi2 = sd_to_dev(sd);
drivers/staging/media/imx/imx6-mipi-csi2.c
557
static int csi2_registered(struct v4l2_subdev *sd)
drivers/staging/media/imx/imx6-mipi-csi2.c
559
struct csi2_dev *csi2 = sd_to_dev(sd);
drivers/staging/media/imx/imx6-mipi-csi2.c
570
static int csi2_log_status(struct v4l2_subdev *sd)
drivers/staging/media/imx/imx6-mipi-csi2.c
572
struct csi2_dev *csi2 = sd_to_dev(sd);
drivers/staging/media/imx/imx6-mipi-csi2.c
574
v4l2_info(sd, "-----MIPI CSI status-----\n");
drivers/staging/media/imx/imx6-mipi-csi2.c
575
v4l2_info(sd, "VERSION: 0x%x\n",
drivers/staging/media/imx/imx6-mipi-csi2.c
577
v4l2_info(sd, "N_LANES: 0x%x\n",
drivers/staging/media/imx/imx6-mipi-csi2.c
579
v4l2_info(sd, "PHY_SHUTDOWNZ: 0x%x\n",
drivers/staging/media/imx/imx6-mipi-csi2.c
581
v4l2_info(sd, "DPHY_RSTZ: 0x%x\n",
drivers/staging/media/imx/imx6-mipi-csi2.c
583
v4l2_info(sd, "RESETN: 0x%x\n",
drivers/staging/media/imx/imx6-mipi-csi2.c
585
v4l2_info(sd, "PHY_STATE: 0x%x\n",
drivers/staging/media/imx/imx6-mipi-csi2.c
587
v4l2_info(sd, "DATA_IDS_1: 0x%x\n",
drivers/staging/media/imx/imx6-mipi-csi2.c
589
v4l2_info(sd, "DATA_IDS_2: 0x%x\n",
drivers/staging/media/imx/imx6-mipi-csi2.c
591
v4l2_info(sd, "ERR1: 0x%x\n",
drivers/staging/media/imx/imx6-mipi-csi2.c
593
v4l2_info(sd, "ERR2: 0x%x\n",
drivers/staging/media/imx/imx6-mipi-csi2.c
595
v4l2_info(sd, "MSK1: 0x%x\n",
drivers/staging/media/imx/imx6-mipi-csi2.c
597
v4l2_info(sd, "MSK2: 0x%x\n",
drivers/staging/media/imx/imx6-mipi-csi2.c
599
v4l2_info(sd, "PHY_TST_CTRL0: 0x%x\n",
drivers/staging/media/imx/imx6-mipi-csi2.c
601
v4l2_info(sd, "PHY_TST_CTRL1: 0x%x\n",
drivers/staging/media/imx/imx6-mipi-csi2.c
638
struct v4l2_subdev *sd,
drivers/staging/media/imx/imx6-mipi-csi2.c
642
struct media_pad *sink = &csi2->sd.entity.pads[CSI2_SINK_PAD];
drivers/staging/media/imx/imx6-mipi-csi2.c
645
pad = media_entity_get_fwnode_pad(&sd->entity, asd->match.fwnode,
drivers/staging/media/imx/imx6-mipi-csi2.c
648
dev_err(csi2->dev, "Failed to find pad for %s\n", sd->name);
drivers/staging/media/imx/imx6-mipi-csi2.c
652
csi2->remote = sd;
drivers/staging/media/imx/imx6-mipi-csi2.c
655
dev_dbg(csi2->dev, "Bound %s pad: %d\n", sd->name, pad);
drivers/staging/media/imx/imx6-mipi-csi2.c
657
return v4l2_create_fwnode_links_to_pad(sd, sink, 0);
drivers/staging/media/imx/imx6-mipi-csi2.c
661
struct v4l2_subdev *sd,
drivers/staging/media/imx/imx6-mipi-csi2.c
683
v4l2_async_subdev_nf_init(&csi2->notifier, &csi2->sd);
drivers/staging/media/imx/imx6-mipi-csi2.c
712
return v4l2_async_register_subdev(&csi2->sd);
drivers/staging/media/imx/imx6-mipi-csi2.c
730
v4l2_subdev_init(&csi2->sd, &csi2_subdev_ops);
drivers/staging/media/imx/imx6-mipi-csi2.c
731
v4l2_set_subdevdata(&csi2->sd, &pdev->dev);
drivers/staging/media/imx/imx6-mipi-csi2.c
732
csi2->sd.internal_ops = &csi2_internal_ops;
drivers/staging/media/imx/imx6-mipi-csi2.c
733
csi2->sd.entity.ops = &csi2_entity_ops;
drivers/staging/media/imx/imx6-mipi-csi2.c
734
csi2->sd.dev = &pdev->dev;
drivers/staging/media/imx/imx6-mipi-csi2.c
735
csi2->sd.owner = THIS_MODULE;
drivers/staging/media/imx/imx6-mipi-csi2.c
736
csi2->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/staging/media/imx/imx6-mipi-csi2.c
737
strscpy(csi2->sd.name, DEVICE_NAME, sizeof(csi2->sd.name));
drivers/staging/media/imx/imx6-mipi-csi2.c
738
csi2->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/staging/media/imx/imx6-mipi-csi2.c
739
csi2->sd.grp_id = IMX_MEDIA_GRP_ID_CSI2;
drivers/staging/media/imx/imx6-mipi-csi2.c
746
ret = media_entity_pads_init(&csi2->sd.entity, CSI2_NUM_PADS,
drivers/staging/media/imx/imx6-mipi-csi2.c
753
v4l2_err(&csi2->sd, "failed to get pll reference clock\n");
drivers/staging/media/imx/imx6-mipi-csi2.c
759
v4l2_err(&csi2->sd, "failed to get dphy clock\n");
drivers/staging/media/imx/imx6-mipi-csi2.c
765
v4l2_err(&csi2->sd, "failed to get pixel clock\n");
drivers/staging/media/imx/imx6-mipi-csi2.c
779
v4l2_err(&csi2->sd, "failed to enable pllref_clk\n");
drivers/staging/media/imx/imx6-mipi-csi2.c
785
v4l2_err(&csi2->sd, "failed to enable dphy_clk\n");
drivers/staging/media/imx/imx6-mipi-csi2.c
789
platform_set_drvdata(pdev, &csi2->sd);
drivers/staging/media/imx/imx6-mipi-csi2.c
808
struct v4l2_subdev *sd = platform_get_drvdata(pdev);
drivers/staging/media/imx/imx6-mipi-csi2.c
809
struct csi2_dev *csi2 = sd_to_dev(sd);
drivers/staging/media/imx/imx6-mipi-csi2.c
813
v4l2_async_unregister_subdev(sd);
drivers/staging/media/imx/imx6-mipi-csi2.c
816
media_entity_cleanup(&sd->entity);
drivers/staging/media/imx/imx6-mipi-csi2.c
96
return container_of(sdev, struct csi2_dev, sd);
drivers/staging/media/ipu3/ipu3-v4l2.c
1151
struct v4l2_subdev *sd = &imgu_pipe->imgu_sd.subdev;
drivers/staging/media/ipu3/ipu3-v4l2.c
123
static int imgu_subdev_get_fmt(struct v4l2_subdev *sd,
drivers/staging/media/ipu3/ipu3-v4l2.c
1254
r = media_create_pad_link(&vdev->entity, 0, &sd->entity,
drivers/staging/media/ipu3/ipu3-v4l2.c
1262
r = media_create_pad_link(&sd->entity, node_num, &vdev->entity,
drivers/staging/media/ipu3/ipu3-v4l2.c
127
struct imgu_device *imgu = v4l2_get_subdevdata(sd);
drivers/staging/media/ipu3/ipu3-v4l2.c
131
struct imgu_v4l2_subdev *imgu_sd = container_of(sd,
drivers/staging/media/ipu3/ipu3-v4l2.c
147
static int imgu_subdev_set_fmt(struct v4l2_subdev *sd,
drivers/staging/media/ipu3/ipu3-v4l2.c
152
struct imgu_device *imgu = v4l2_get_subdevdata(sd);
drivers/staging/media/ipu3/ipu3-v4l2.c
153
struct imgu_v4l2_subdev *imgu_sd = container_of(sd,
drivers/staging/media/ipu3/ipu3-v4l2.c
19
static int imgu_subdev_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
drivers/staging/media/ipu3/ipu3-v4l2.c
193
imgu_subdev_get_crop(struct imgu_v4l2_subdev *sd,
drivers/staging/media/ipu3/ipu3-v4l2.c
200
return &sd->rect.eff;
drivers/staging/media/ipu3/ipu3-v4l2.c
204
imgu_subdev_get_compose(struct imgu_v4l2_subdev *sd,
drivers/staging/media/ipu3/ipu3-v4l2.c
21
struct imgu_v4l2_subdev *imgu_sd = container_of(sd,
drivers/staging/media/ipu3/ipu3-v4l2.c
211
return &sd->rect.bds;
drivers/staging/media/ipu3/ipu3-v4l2.c
214
static int imgu_subdev_get_selection(struct v4l2_subdev *sd,
drivers/staging/media/ipu3/ipu3-v4l2.c
219
container_of(sd, struct imgu_v4l2_subdev, subdev);
drivers/staging/media/ipu3/ipu3-v4l2.c
238
static int imgu_subdev_set_selection(struct v4l2_subdev *sd,
drivers/staging/media/ipu3/ipu3-v4l2.c
24
struct imgu_device *imgu = v4l2_get_subdevdata(sd);
drivers/staging/media/ipu3/ipu3-v4l2.c
242
struct imgu_device *imgu = v4l2_get_subdevdata(sd);
drivers/staging/media/ipu3/ipu3-v4l2.c
244
container_of(sd, struct imgu_v4l2_subdev, subdev);
drivers/staging/media/ipu3/ipu3-v4l2.c
279
struct v4l2_subdev *sd = container_of(entity, struct v4l2_subdev,
drivers/staging/media/ipu3/ipu3-v4l2.c
281
struct imgu_device *imgu = v4l2_get_subdevdata(sd);
drivers/staging/media/ipu3/ipu3-v4l2.c
282
struct imgu_v4l2_subdev *imgu_sd = container_of(sd,
drivers/staging/media/ipu3/ipu3-v4l2.c
54
static int imgu_subdev_s_stream(struct v4l2_subdev *sd, int enable)
drivers/staging/media/ipu3/ipu3-v4l2.c
59
struct imgu_device *imgu = v4l2_get_subdevdata(sd);
drivers/staging/media/ipu3/ipu3-v4l2.c
60
struct imgu_v4l2_subdev *imgu_sd = container_of(sd,
drivers/staging/media/ipu7/ipu7-isys-csi-phy.c
309
pad = media_entity_remote_source_pad_unique(&csi2->asd.sd.entity);
drivers/staging/media/ipu7/ipu7-isys-csi-phy.c
312
csi2->asd.sd.name, pad);
drivers/staging/media/ipu7/ipu7-isys-csi2.c
192
static int ipu7_isys_csi2_set_sel(struct v4l2_subdev *sd,
drivers/staging/media/ipu7/ipu7-isys-csi2.c
196
struct ipu7_isys_subdev *asd = to_ipu7_isys_subdev(sd);
drivers/staging/media/ipu7/ipu7-isys-csi2.c
237
sd->name, sel->r.left, sel->r.top, sel->r.width, sel->r.height,
drivers/staging/media/ipu7/ipu7-isys-csi2.c
243
static int ipu7_isys_csi2_get_sel(struct v4l2_subdev *sd,
drivers/staging/media/ipu7/ipu7-isys-csi2.c
251
if (sd->entity.pads[sel->pad].flags & MEDIA_PAD_FL_SINK)
drivers/staging/media/ipu7/ipu7-isys-csi2.c
288
static int ipu7_isys_csi2_enable_streams(struct v4l2_subdev *sd,
drivers/staging/media/ipu7/ipu7-isys-csi2.c
292
struct ipu7_isys_subdev *asd = to_ipu7_isys_subdev(sd);
drivers/staging/media/ipu7/ipu7-isys-csi2.c
318
rp = media_pad_remote_pad_first(&sd->entity.pads[IPU7_CSI2_PAD_SINK]);
drivers/staging/media/ipu7/ipu7-isys-csi2.c
334
static int ipu7_isys_csi2_disable_streams(struct v4l2_subdev *sd,
drivers/staging/media/ipu7/ipu7-isys-csi2.c
338
struct ipu7_isys_subdev *asd = to_ipu7_isys_subdev(sd);
drivers/staging/media/ipu7/ipu7-isys-csi2.c
355
rp = media_pad_remote_pad_first(&sd->entity.pads[IPU7_CSI2_PAD_SINK]);
drivers/staging/media/ipu7/ipu7-isys-csi2.c
397
v4l2_device_unregister_subdev(&csi2->asd.sd);
drivers/staging/media/ipu7/ipu7-isys-csi2.c
398
v4l2_subdev_cleanup(&csi2->asd.sd);
drivers/staging/media/ipu7/ipu7-isys-csi2.c
422
csi2->asd.sd.entity.ops = &csi2_entity_ops;
drivers/staging/media/ipu7/ipu7-isys-csi2.c
433
snprintf(csi2->asd.sd.name, sizeof(csi2->asd.sd.name),
drivers/staging/media/ipu7/ipu7-isys-csi2.c
435
v4l2_set_subdevdata(&csi2->asd.sd, &csi2->asd);
drivers/staging/media/ipu7/ipu7-isys-csi2.c
437
ret = v4l2_subdev_init_finalize(&csi2->asd.sd);
drivers/staging/media/ipu7/ipu7-isys-csi2.c
443
ret = v4l2_device_register_subdev(&isys->v4l2_dev, &csi2->asd.sd);
drivers/staging/media/ipu7/ipu7-isys-csi2.c
452
v4l2_subdev_cleanup(&csi2->asd.sd);
drivers/staging/media/ipu7/ipu7-isys-csi2.c
463
struct video_device *vdev = csi2->asd.sd.devnode;
drivers/staging/media/ipu7/ipu7-isys-csi2.c
55
src_pad = media_entity_remote_source_pad_unique(&csi2->asd.sd.entity);
drivers/staging/media/ipu7/ipu7-isys-csi2.c
59
csi2->asd.sd.name, src_pad);
drivers/staging/media/ipu7/ipu7-isys-csi2.c
66
static int csi2_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
drivers/staging/media/ipu7/ipu7-isys-csi2.c
69
struct ipu7_isys_subdev *asd = to_ipu7_isys_subdev(sd);
drivers/staging/media/ipu7/ipu7-isys-csi2.c
80
return v4l2_ctrl_subdev_subscribe_event(sd, fh, sub);
drivers/staging/media/ipu7/ipu7-isys-queue.c
444
struct v4l2_subdev *sd;
drivers/staging/media/ipu7/ipu7-isys-queue.c
451
sd = media_entity_to_v4l2_subdev(remote_pad->entity);
drivers/staging/media/ipu7/ipu7-isys-queue.c
453
ret = ipu7_isys_get_stream_pad_fmt(sd, remote_pad->index, r_stream,
drivers/staging/media/ipu7/ipu7-isys-queue.c
457
sd->entity.name, remote_pad->index, r_stream);
drivers/staging/media/ipu7/ipu7-isys-subdev.c
101
int ipu7_isys_subdev_set_fmt(struct v4l2_subdev *sd,
drivers/staging/media/ipu7/ipu7-isys-subdev.c
105
struct ipu7_isys_subdev *asd = to_ipu7_isys_subdev(sd);
drivers/staging/media/ipu7/ipu7-isys-subdev.c
114
if ((sd->entity.pads[format->pad].flags & MEDIA_PAD_FL_SOURCE) &&
drivers/staging/media/ipu7/ipu7-isys-subdev.c
115
sd->entity.num_pads > 1)
drivers/staging/media/ipu7/ipu7-isys-subdev.c
116
return v4l2_subdev_get_fmt(sd, state, format);
drivers/staging/media/ipu7/ipu7-isys-subdev.c
140
if (!(sd->entity.pads[format->pad].flags & MEDIA_PAD_FL_SINK))
drivers/staging/media/ipu7/ipu7-isys-subdev.c
169
int ipu7_isys_subdev_enum_mbus_code(struct v4l2_subdev *sd,
drivers/staging/media/ipu7/ipu7-isys-subdev.c
173
struct ipu7_isys_subdev *asd = to_ipu7_isys_subdev(sd);
drivers/staging/media/ipu7/ipu7-isys-subdev.c
187
static int subdev_set_routing(struct v4l2_subdev *sd,
drivers/staging/media/ipu7/ipu7-isys-subdev.c
200
ret = v4l2_subdev_routing_validate(sd, routing,
drivers/staging/media/ipu7/ipu7-isys-subdev.c
213
return v4l2_subdev_set_routing_with_fmt(sd, state, routing, &fmt);
drivers/staging/media/ipu7/ipu7-isys-subdev.c
216
int ipu7_isys_get_stream_pad_fmt(struct v4l2_subdev *sd, u32 pad, u32 stream,
drivers/staging/media/ipu7/ipu7-isys-subdev.c
222
if (!sd || !format)
drivers/staging/media/ipu7/ipu7-isys-subdev.c
225
state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/staging/media/ipu7/ipu7-isys-subdev.c
234
static int ipu7_isys_subdev_init_state(struct v4l2_subdev *sd,
drivers/staging/media/ipu7/ipu7-isys-subdev.c
249
return subdev_set_routing(sd, state, &routing);
drivers/staging/media/ipu7/ipu7-isys-subdev.c
252
int ipu7_isys_subdev_set_routing(struct v4l2_subdev *sd,
drivers/staging/media/ipu7/ipu7-isys-subdev.c
257
return subdev_set_routing(sd, state, routing);
drivers/staging/media/ipu7/ipu7-isys-subdev.c
274
v4l2_subdev_init(&asd->sd, ops);
drivers/staging/media/ipu7/ipu7-isys-subdev.c
276
asd->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
drivers/staging/media/ipu7/ipu7-isys-subdev.c
279
asd->sd.owner = THIS_MODULE;
drivers/staging/media/ipu7/ipu7-isys-subdev.c
280
asd->sd.dev = &asd->isys->adev->auxdev.dev;
drivers/staging/media/ipu7/ipu7-isys-subdev.c
281
asd->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/staging/media/ipu7/ipu7-isys-subdev.c
282
asd->sd.internal_ops = &ipu7_isys_subdev_internal_ops;
drivers/staging/media/ipu7/ipu7-isys-subdev.c
296
ret = media_entity_pads_init(&asd->sd.entity, num_pads, asd->pad);
drivers/staging/media/ipu7/ipu7-isys-subdev.c
307
asd->ctrl_init(&asd->sd);
drivers/staging/media/ipu7/ipu7-isys-subdev.c
313
asd->sd.ctrl_handler = &asd->ctrl_handler;
drivers/staging/media/ipu7/ipu7-isys-subdev.c
324
media_entity_cleanup(&asd->sd.entity);
drivers/staging/media/ipu7/ipu7-isys-subdev.c
331
media_entity_cleanup(&asd->sd.entity);
drivers/staging/media/ipu7/ipu7-isys-subdev.h
18
struct v4l2_subdev sd;
drivers/staging/media/ipu7/ipu7-isys-subdev.h
23
void (*ctrl_init)(struct v4l2_subdev *sd);
drivers/staging/media/ipu7/ipu7-isys-subdev.h
28
container_of(__sd, struct ipu7_isys_subdev, sd)
drivers/staging/media/ipu7/ipu7-isys-subdev.h
33
int ipu7_isys_subdev_set_fmt(struct v4l2_subdev *sd,
drivers/staging/media/ipu7/ipu7-isys-subdev.h
36
int ipu7_isys_subdev_enum_mbus_code(struct v4l2_subdev *sd,
drivers/staging/media/ipu7/ipu7-isys-subdev.h
40
int ipu7_isys_get_stream_pad_fmt(struct v4l2_subdev *sd, u32 pad, u32 stream,
drivers/staging/media/ipu7/ipu7-isys-subdev.h
42
int ipu7_isys_subdev_set_routing(struct v4l2_subdev *sd,
drivers/staging/media/ipu7/ipu7-isys-video.c
355
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(src_pad->entity);
drivers/staging/media/ipu7/ipu7-isys-video.c
370
ret = ipu7_isys_get_stream_pad_fmt(sd, src_pad->index, src_stream,
drivers/staging/media/ipu7/ipu7-isys-video.c
783
struct v4l2_subdev *sd;
drivers/staging/media/ipu7/ipu7-isys-video.c
792
sd = &stream->asd->sd;
drivers/staging/media/ipu7/ipu7-isys-video.c
799
sd->name, r_pad->index, BIT_ULL(r_stream));
drivers/staging/media/ipu7/ipu7-isys-video.c
800
ret = v4l2_subdev_disable_streams(sd, r_pad->index,
drivers/staging/media/ipu7/ipu7-isys-video.c
804
sd->name, ret);
drivers/staging/media/ipu7/ipu7-isys-video.c
818
sd->name, r_pad->index, BIT_ULL(r_stream));
drivers/staging/media/ipu7/ipu7-isys-video.c
819
ret = v4l2_subdev_enable_streams(sd, r_pad->index,
drivers/staging/media/ipu7/ipu7-isys-video.c
823
sd->name, ret);
drivers/staging/media/ipu7/ipu7-isys.c
144
struct v4l2_subdev *sd,
drivers/staging/media/ipu7/ipu7-isys.c
154
ret = ipu_bridge_instantiate_vcm(sd->dev);
drivers/staging/media/ipu7/ipu7-isys.c
161
sd->name, s_asd->csi2.nlanes, s_asd->csi2.port);
drivers/staging/media/ipu7/ipu7-isys.c
162
isys_complete_ext_device_registration(isys, sd, &s_asd->csi2);
drivers/staging/media/ipu7/ipu7-isys.c
350
struct media_entity *sd;
drivers/staging/media/ipu7/ipu7-isys.c
355
sd = &isys->csi2[i].asd.sd.entity;
drivers/staging/media/ipu7/ipu7-isys.c
360
ret = media_create_pad_link(sd, IPU7_CSI2_PAD_SRC + j,
drivers/staging/media/ipu7/ipu7-isys.c
54
struct v4l2_subdev *sd,
drivers/staging/media/ipu7/ipu7-isys.c
61
v4l2_set_subdev_hostdata(sd, csi2);
drivers/staging/media/ipu7/ipu7-isys.c
63
for (i = 0; i < sd->entity.num_pads; i++) {
drivers/staging/media/ipu7/ipu7-isys.c
64
if (sd->entity.pads[i].flags & MEDIA_PAD_FL_SOURCE)
drivers/staging/media/ipu7/ipu7-isys.c
68
if (i == sd->entity.num_pads) {
drivers/staging/media/ipu7/ipu7-isys.c
74
ret = media_create_pad_link(&sd->entity, i,
drivers/staging/media/ipu7/ipu7-isys.c
75
&isys->csi2[csi2->port].asd.sd.entity,
drivers/staging/media/ipu7/ipu7-isys.c
92
v4l2_device_unregister_subdev(sd);
drivers/staging/media/max96712/max96712.c
221
static int max96712_s_stream(struct v4l2_subdev *sd, int enable)
drivers/staging/media/max96712/max96712.c
223
struct max96712_priv *priv = v4l2_get_subdevdata(sd);
drivers/staging/media/max96712/max96712.c
240
static int max96712_init_state(struct v4l2_subdev *sd,
drivers/staging/media/max96712/max96712.c
304
priv->sd.internal_ops = &max96712_internal_ops;
drivers/staging/media/max96712/max96712.c
305
v4l2_i2c_subdev_init(&priv->sd, priv->client, &max96712_subdev_ops);
drivers/staging/media/max96712/max96712.c
306
priv->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/staging/media/max96712/max96712.c
307
priv->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
drivers/staging/media/max96712/max96712.c
324
priv->sd.ctrl_handler = &priv->ctrl_handler;
drivers/staging/media/max96712/max96712.c
330
ret = media_entity_pads_init(&priv->sd.entity, 1, priv->pads);
drivers/staging/media/max96712/max96712.c
334
v4l2_set_subdevdata(&priv->sd, priv);
drivers/staging/media/max96712/max96712.c
336
priv->sd.state_lock = priv->ctrl_handler.lock;
drivers/staging/media/max96712/max96712.c
337
ret = v4l2_subdev_init_finalize(&priv->sd);
drivers/staging/media/max96712/max96712.c
341
ret = v4l2_async_register_subdev(&priv->sd);
drivers/staging/media/max96712/max96712.c
43
struct v4l2_subdev sd;
drivers/staging/media/max96712/max96712.c
450
struct v4l2_subdev *sd = i2c_get_clientdata(client);
drivers/staging/media/max96712/max96712.c
451
struct max96712_priv *priv = container_of(sd, struct max96712_priv, sd);
drivers/staging/media/max96712/max96712.c
453
v4l2_async_unregister_subdev(&priv->sd);
drivers/staging/media/starfive/camss/stf-isp.c
109
static int isp_enum_mbus_code(struct v4l2_subdev *sd,
drivers/staging/media/starfive/camss/stf-isp.c
113
struct stf_isp_dev *isp_dev = v4l2_get_subdevdata(sd);
drivers/staging/media/starfive/camss/stf-isp.c
13
static int isp_set_selection(struct v4l2_subdev *sd,
drivers/staging/media/starfive/camss/stf-isp.c
140
static int isp_set_format(struct v4l2_subdev *sd,
drivers/staging/media/starfive/camss/stf-isp.c
144
struct stf_isp_dev *isp_dev = v4l2_get_subdevdata(sd);
drivers/staging/media/starfive/camss/stf-isp.c
167
isp_set_selection(sd, state, &sel);
drivers/staging/media/starfive/camss/stf-isp.c
198
static int isp_get_selection(struct v4l2_subdev *sd,
drivers/staging/media/starfive/camss/stf-isp.c
235
static int isp_set_selection(struct v4l2_subdev *sd,
drivers/staging/media/starfive/camss/stf-isp.c
239
struct stf_isp_dev *isp_dev = v4l2_get_subdevdata(sd);
drivers/staging/media/starfive/camss/stf-isp.c
261
isp_set_selection(sd, state, &crop);
drivers/staging/media/starfive/camss/stf-isp.c
278
isp_set_format(sd, state, &fmt);
drivers/staging/media/starfive/camss/stf-isp.c
287
static int isp_init_formats(struct v4l2_subdev *sd,
drivers/staging/media/starfive/camss/stf-isp.c
300
return isp_set_format(sd, sd_state, &format);
drivers/staging/media/starfive/camss/stf-isp.c
330
struct v4l2_subdev *sd = &isp_dev->subdev;
drivers/staging/media/starfive/camss/stf-isp.c
334
v4l2_subdev_init(sd, &isp_v4l2_ops);
drivers/staging/media/starfive/camss/stf-isp.c
335
sd->internal_ops = &isp_internal_ops;
drivers/staging/media/starfive/camss/stf-isp.c
336
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/staging/media/starfive/camss/stf-isp.c
337
snprintf(sd->name, ARRAY_SIZE(sd->name), "stf_isp");
drivers/staging/media/starfive/camss/stf-isp.c
338
v4l2_set_subdevdata(sd, isp_dev);
drivers/staging/media/starfive/camss/stf-isp.c
343
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_ISP;
drivers/staging/media/starfive/camss/stf-isp.c
344
sd->entity.ops = &isp_media_ops;
drivers/staging/media/starfive/camss/stf-isp.c
345
ret = media_entity_pads_init(&sd->entity, STF_ISP_PAD_MAX, pads);
drivers/staging/media/starfive/camss/stf-isp.c
352
ret = v4l2_subdev_init_finalize(sd);
drivers/staging/media/starfive/camss/stf-isp.c
356
ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/staging/media/starfive/camss/stf-isp.c
366
v4l2_subdev_cleanup(sd);
drivers/staging/media/starfive/camss/stf-isp.c
368
media_entity_cleanup(&sd->entity);
drivers/staging/media/starfive/camss/stf-isp.c
58
static int isp_set_stream(struct v4l2_subdev *sd, int enable)
drivers/staging/media/starfive/camss/stf-isp.c
60
struct stf_isp_dev *isp_dev = v4l2_get_subdevdata(sd);
drivers/staging/media/starfive/camss/stf-isp.c
65
sd_state = v4l2_subdev_lock_and_get_active_state(sd);
drivers/staging/media/tegra-video/csi.c
650
void tegra_csi_error_recover(struct v4l2_subdev *sd)
drivers/staging/media/tegra-video/csi.c
652
struct tegra_csi_channel *csi_chan = to_csi_chan(sd);
drivers/staging/media/tegra-video/video.c
29
static void tegra_v4l2_dev_notify(struct v4l2_subdev *sd,
drivers/staging/media/tegra-video/video.c
38
chan = v4l2_get_subdev_hostdata(sd);
drivers/target/loopback/tcm_loop.c
645
struct scsi_device *sd;
drivers/target/loopback/tcm_loop.c
652
sd = scsi_device_lookup(tl_hba->sh, 0, tl_tpg->tl_tpgt,
drivers/target/loopback/tcm_loop.c
654
if (!sd) {
drivers/target/loopback/tcm_loop.c
662
scsi_remove_device(sd);
drivers/target/loopback/tcm_loop.c
663
scsi_device_put(sd);
drivers/target/target_core_pscsi.c
284
struct scsi_device *sd)
drivers/target/target_core_pscsi.c
287
struct request_queue *q = sd->request_queue;
drivers/target/target_core_pscsi.c
289
pdv->pdv_sd = sd;
drivers/target/target_core_pscsi.c
291
if (!sd->queue_depth) {
drivers/target/target_core_pscsi.c
292
sd->queue_depth = PSCSI_DEFAULT_QUEUEDEPTH;
drivers/target/target_core_pscsi.c
295
" queue_depth to %d\n", sd->channel, sd->id,
drivers/target/target_core_pscsi.c
296
sd->lun, sd->queue_depth);
drivers/target/target_core_pscsi.c
300
min_not_zero((int)sd->sector_size, 512);
drivers/target/target_core_pscsi.c
302
min_not_zero(sd->host->max_sectors, queue_max_hw_sectors(q));
drivers/target/target_core_pscsi.c
303
dev->dev_attrib.hw_queue_depth = sd->queue_depth;
drivers/target/target_core_pscsi.c
308
pscsi_set_inquiry_info(sd, &dev->t10_wwn);
drivers/target/target_core_pscsi.c
314
if (!pscsi_get_inquiry_vpd_serial(sd, &dev->t10_wwn)) {
drivers/target/target_core_pscsi.c
319
pscsi_get_inquiry_vpd_device_ident(sd, &dev->t10_wwn);
drivers/target/target_core_pscsi.c
325
if (sd->type == TYPE_TAPE) {
drivers/target/target_core_pscsi.c
326
pscsi_tape_read_blocksize(dev, sd);
drivers/target/target_core_pscsi.c
327
dev->dev_attrib.hw_block_size = sd->sector_size;
drivers/target/target_core_pscsi.c
350
static int pscsi_create_type_disk(struct se_device *dev, struct scsi_device *sd)
drivers/target/target_core_pscsi.c
355
struct Scsi_Host *sh = sd->host;
drivers/target/target_core_pscsi.c
359
if (scsi_device_get(sd)) {
drivers/target/target_core_pscsi.c
361
sh->host_no, sd->channel, sd->id, sd->lun);
drivers/target/target_core_pscsi.c
374
scsi_device_put(sd);
drivers/target/target_core_pscsi.c
379
ret = pscsi_add_device_to_list(dev, sd);
drivers/target/target_core_pscsi.c
382
scsi_device_put(sd);
drivers/target/target_core_pscsi.c
387
phv->phv_host_id, sd->type == TYPE_DISK ? "DISK" : "ZBC",
drivers/target/target_core_pscsi.c
388
sh->host_no, sd->channel, sd->id, sd->lun);
drivers/target/target_core_pscsi.c
395
static int pscsi_create_type_nondisk(struct se_device *dev, struct scsi_device *sd)
drivers/target/target_core_pscsi.c
399
struct Scsi_Host *sh = sd->host;
drivers/target/target_core_pscsi.c
402
if (scsi_device_get(sd)) {
drivers/target/target_core_pscsi.c
404
sh->host_no, sd->channel, sd->id, sd->lun);
drivers/target/target_core_pscsi.c
410
ret = pscsi_add_device_to_list(dev, sd);
drivers/target/target_core_pscsi.c
412
scsi_device_put(sd);
drivers/target/target_core_pscsi.c
416
phv->phv_host_id, scsi_device_type(sd->type), sh->host_no,
drivers/target/target_core_pscsi.c
417
sd->channel, sd->id, sd->lun);
drivers/target/target_core_pscsi.c
426
struct scsi_device *sd;
drivers/target/target_core_pscsi.c
495
list_for_each_entry(sd, &sh->__devices, siblings) {
drivers/target/target_core_pscsi.c
496
if ((pdv->pdv_channel_id != sd->channel) ||
drivers/target/target_core_pscsi.c
497
(pdv->pdv_target_id != sd->id) ||
drivers/target/target_core_pscsi.c
498
(pdv->pdv_lun_id != sd->lun))
drivers/target/target_core_pscsi.c
505
switch (sd->type) {
drivers/target/target_core_pscsi.c
508
ret = pscsi_create_type_disk(dev, sd);
drivers/target/target_core_pscsi.c
511
ret = pscsi_create_type_nondisk(dev, sd);
drivers/target/target_core_pscsi.c
559
struct scsi_device *sd = pdv->pdv_sd;
drivers/target/target_core_pscsi.c
561
if (sd) {
drivers/target/target_core_pscsi.c
567
if ((sd->type == TYPE_DISK || sd->type == TYPE_ZBC) &&
drivers/target/target_core_pscsi.c
582
scsi_device_put(sd);
drivers/target/target_core_pscsi.c
592
struct scsi_device *sd = pdv->pdv_sd;
drivers/target/target_core_pscsi.c
633
if (sd->type != TYPE_TAPE || !cmd->data_length)
drivers/target/target_core_pscsi.c
669
sd->sector_size = blocksize;
drivers/target/target_core_pscsi.c
682
if (sd->type == TYPE_TAPE && valid_data &&
drivers/target/target_core_pscsi.c
792
struct scsi_device *sd = pdv->pdv_sd;
drivers/target/target_core_pscsi.c
806
if (sd) {
drivers/target/target_core_pscsi.c
808
__stringify(INQUIRY_VENDOR_LEN) "s", sd->vendor);
drivers/target/target_core_pscsi.c
810
__stringify(INQUIRY_MODEL_LEN) "s", sd->model);
drivers/target/target_core_pscsi.c
812
__stringify(INQUIRY_REVISION_LEN) "s\n", sd->rev);
drivers/target/target_core_pscsi.c
990
struct scsi_device *sd = pdv->pdv_sd;
drivers/target/target_core_pscsi.c
992
return (sd) ? sd->type : TYPE_NO_LUN;
drivers/target/target_core_transport.c
3509
const struct sense_detail *sd;
drivers/target/target_core_transport.c
3516
sd = &sense_detail_table[r];
drivers/target/target_core_transport.c
3518
sd = &sense_detail_table[(__force int)
drivers/target/target_core_transport.c
3521
key = sd->key;
drivers/target/target_core_transport.c
3529
WARN_ON_ONCE(sd->asc == 0);
drivers/target/target_core_transport.c
3530
asc = sd->asc;
drivers/target/target_core_transport.c
3531
ascq = sd->ascq;
drivers/target/target_core_transport.c
3538
if (sd->add_sense_info)
drivers/usb/core/port.c
775
port_dev->state_kn = sysfs_get_dirent(port_dev->dev.kobj.sd, "state");
drivers/usb/gadget/function/f_mass_storage.c
1088
u32 sd, sdinfo;
drivers/usb/gadget/function/f_mass_storage.c
1115
sd = SS_LOGICAL_UNIT_NOT_SUPPORTED;
drivers/usb/gadget/function/f_mass_storage.c
1119
sd = curlun->sense_data;
drivers/usb/gadget/function/f_mass_storage.c
1129
buf[2] = SK(sd);
drivers/usb/gadget/function/f_mass_storage.c
1132
buf[12] = ASC(sd);
drivers/usb/gadget/function/f_mass_storage.c
1133
buf[13] = ASCQ(sd);
drivers/usb/gadget/function/f_mass_storage.c
1671
u32 sd, sdinfo = 0;
drivers/usb/gadget/function/f_mass_storage.c
1680
sd = curlun->sense_data;
drivers/usb/gadget/function/f_mass_storage.c
1683
sd = SS_NO_SENSE;
drivers/usb/gadget/function/f_mass_storage.c
1685
sd = SS_LOGICAL_UNIT_NOT_SUPPORTED;
drivers/usb/gadget/function/f_mass_storage.c
1690
sd = SS_INVALID_COMMAND;
drivers/usb/gadget/function/f_mass_storage.c
1691
} else if (sd != SS_NO_SENSE) {
drivers/usb/gadget/function/f_mass_storage.c
1696
SK(sd), ASC(sd), ASCQ(sd), sdinfo);
drivers/usb/serial/usb-serial.c
1470
struct usb_serial_driver * const *sd;
drivers/usb/serial/usb-serial.c
1498
for (sd = serial_drivers; *sd; ++sd) {
drivers/usb/serial/usb-serial.c
1499
if ((*sd)->reset_resume) {
drivers/usb/serial/usb-serial.c
1509
for (sd = serial_drivers; *sd; ++sd) {
drivers/usb/serial/usb-serial.c
1510
(*sd)->usb_driver = udriver;
drivers/usb/serial/usb-serial.c
1511
(*sd)->driver.owner = owner;
drivers/usb/serial/usb-serial.c
1512
rc = usb_serial_register(*sd);
drivers/usb/serial/usb-serial.c
1523
while (sd-- > serial_drivers)
drivers/usb/serial/usb-serial.c
1524
usb_serial_deregister(*sd);
drivers/video/fbdev/aty/radeon_pm.c
50
#define BUGFIX(model, sv, sd, pm, fn) { \
drivers/video/fbdev/aty/radeon_pm.c
53
.subsystem_device = sd, \
drivers/video/fbdev/omap2/omapfb/dss/dss.h
119
u16 sd;
drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c
45
unsigned n, m, mf, m2, sd;
drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c
82
sd = DIV_ROUND_UP(fint * m, 250000000);
drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c
85
n, m, mf, m2, sd);
drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c
92
pi->sd = sd;
drivers/video/fbdev/omap2/omapfb/dss/pll.c
357
l = FLD_MOD(l, cinfo->sd, 17, 10); /* PLL_REGSD */
fs/befs/debug.c
207
befs_dump_small_data(const struct super_block *sb, befs_small_data *sd)
fs/configfs/configfs_internal.h
104
struct configfs_dirent * sd = dentry->d_fsdata;
fs/configfs/configfs_internal.h
105
return ((struct config_item *) sd->s_element);
fs/configfs/configfs_internal.h
110
struct configfs_dirent * sd = dentry->d_fsdata;
fs/configfs/configfs_internal.h
111
return ((struct configfs_attribute *) sd->s_element);
fs/configfs/configfs_internal.h
127
struct configfs_dirent * sd = dentry->d_fsdata;
fs/configfs/configfs_internal.h
128
item = config_item_get(sd->s_element);
fs/configfs/configfs_internal.h
135
static inline void release_configfs_dirent(struct configfs_dirent * sd)
fs/configfs/configfs_internal.h
137
if (!(sd->s_type & CONFIGFS_ROOT)) {
fs/configfs/configfs_internal.h
138
kfree(sd->s_iattr);
fs/configfs/configfs_internal.h
139
put_fragment(sd->s_frag);
fs/configfs/configfs_internal.h
140
kmem_cache_free(configfs_dir_cachep, sd);
fs/configfs/configfs_internal.h
144
static inline struct configfs_dirent * configfs_get(struct configfs_dirent * sd)
fs/configfs/configfs_internal.h
146
if (sd) {
fs/configfs/configfs_internal.h
147
WARN_ON(!atomic_read(&sd->s_count));
fs/configfs/configfs_internal.h
148
atomic_inc(&sd->s_count);
fs/configfs/configfs_internal.h
150
return sd;
fs/configfs/configfs_internal.h
153
static inline void configfs_put(struct configfs_dirent * sd)
fs/configfs/configfs_internal.h
155
WARN_ON(!atomic_read(&sd->s_count));
fs/configfs/configfs_internal.h
156
if (atomic_dec_and_test(&sd->s_count))
fs/configfs/configfs_internal.h
157
release_configfs_dirent(sd);
fs/configfs/configfs_internal.h
78
extern const unsigned char * configfs_get_name(struct configfs_dirent *sd);
fs/configfs/configfs_internal.h
79
extern void configfs_drop_dentry(struct configfs_dirent *sd, struct dentry *parent);
fs/configfs/dir.c
104
sd->s_depth = parent_depth + 1;
fs/configfs/dir.c
1071
struct configfs_dirent *child_sd, *sd;
fs/configfs/dir.c
1075
sd = origin->d_fsdata;
fs/configfs/dir.c
1077
if (sd->s_element == target) /* Boo-yah */
fs/configfs/dir.c
108
configfs_adjust_dir_dirent_depth_before_populate(struct configfs_dirent *sd)
fs/configfs/dir.c
1080
list_for_each_entry(child_sd, &sd->s_children, s_sibling) {
fs/configfs/dir.c
1194
struct configfs_dirent *sd;
fs/configfs/dir.c
120
if (sd->s_depth == -1)
fs/configfs/dir.c
1202
sd = target->ci_dentry->d_fsdata;
fs/configfs/dir.c
1203
BUG_ON(sd->s_dependent_count < 1);
fs/configfs/dir.c
1205
sd->s_dependent_count -= 1;
fs/configfs/dir.c
125
sd->s_depth = 0;
fs/configfs/dir.c
129
configfs_adjust_dir_dirent_depth_after_populate(struct configfs_dirent *sd)
fs/configfs/dir.c
1297
struct configfs_dirent *sd;
fs/configfs/dir.c
1303
sd = dentry->d_parent->d_fsdata;
fs/configfs/dir.c
1309
if (!configfs_dirent_is_ready(sd)) {
fs/configfs/dir.c
1314
if (!(sd->s_type & CONFIGFS_USET_DIR)) {
fs/configfs/dir.c
132
sd->s_depth = -1;
fs/configfs/dir.c
137
static void configfs_init_dirent_depth(struct configfs_dirent *sd)
fs/configfs/dir.c
142
struct configfs_dirent *sd)
fs/configfs/dir.c
1423
sd->s_type |= CONFIGFS_USET_IN_MKDIR;
fs/configfs/dir.c
1432
sd->s_type &= ~CONFIGFS_USET_IN_MKDIR;
fs/configfs/dir.c
147
configfs_adjust_dir_dirent_depth_before_populate(struct configfs_dirent *sd)
fs/configfs/dir.c
1477
struct configfs_dirent *sd;
fs/configfs/dir.c
1482
sd = dentry->d_fsdata;
fs/configfs/dir.c
1483
if (sd->s_type & CONFIGFS_USET_DEFAULT)
fs/configfs/dir.c
1514
ret = sd->s_dependent_count ? -EBUSY : 0;
fs/configfs/dir.c
152
configfs_adjust_dir_dirent_depth_after_populate(struct configfs_dirent *sd)
fs/configfs/dir.c
1536
frag = sd->s_frag;
fs/configfs/dir.c
1556
if (sd->s_type & CONFIGFS_USET_DIR) {
fs/configfs/dir.c
1713
struct configfs_dirent *sd = dentry->d_fsdata;
fs/configfs/dir.c
1720
p = sd->s_children.next;
fs/configfs/dir.c
1721
while (n && p != &sd->s_children) {
fs/configfs/dir.c
1804
struct configfs_dirent *sd = dentry->d_fsdata;
fs/configfs/dir.c
1805
struct configfs_fragment *frag = sd->s_frag;
fs/configfs/dir.c
1881
struct configfs_dirent *sd;
fs/configfs/dir.c
1897
sd = root->d_fsdata;
fs/configfs/dir.c
1899
link_group(to_config_group(sd->s_element), group);
fs/configfs/dir.c
191
struct configfs_dirent * sd;
fs/configfs/dir.c
1911
err = configfs_attach_group(sd->s_element,
fs/configfs/dir.c
193
sd = kmem_cache_zalloc(configfs_dir_cachep, GFP_KERNEL);
fs/configfs/dir.c
194
if (!sd)
fs/configfs/dir.c
1943
struct configfs_dirent *sd = dentry->d_fsdata;
fs/configfs/dir.c
1944
struct configfs_fragment *frag = sd->s_frag;
fs/configfs/dir.c
197
atomic_set(&sd->s_count, 1);
fs/configfs/dir.c
198
INIT_LIST_HEAD(&sd->s_children);
fs/configfs/dir.c
199
sd->s_element = element;
fs/configfs/dir.c
200
sd->s_type = type;
fs/configfs/dir.c
201
configfs_init_dirent_depth(sd);
fs/configfs/dir.c
205
kmem_cache_free(configfs_dir_cachep, sd);
fs/configfs/dir.c
208
sd->s_frag = get_fragment(frag);
fs/configfs/dir.c
216
if (sd->s_type & CONFIGFS_PINNED)
fs/configfs/dir.c
217
list_add_tail(&sd->s_sibling, &parent_sd->s_children);
fs/configfs/dir.c
219
list_add(&sd->s_sibling, &parent_sd->s_children);
fs/configfs/dir.c
222
return sd;
fs/configfs/dir.c
236
struct configfs_dirent *sd;
fs/configfs/dir.c
238
list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
fs/configfs/dir.c
239
if (sd->s_element) {
fs/configfs/dir.c
240
const unsigned char *existing = configfs_get_name(sd);
fs/configfs/dir.c
256
struct configfs_dirent * sd;
fs/configfs/dir.c
258
sd = configfs_new_dirent(parent_sd, element, type, frag);
fs/configfs/dir.c
259
if (IS_ERR(sd))
fs/configfs/dir.c
260
return PTR_ERR(sd);
fs/configfs/dir.c
262
sd->s_mode = mode;
fs/configfs/dir.c
263
sd->s_dentry = dentry;
fs/configfs/dir.c
265
dentry->d_fsdata = configfs_get(sd);
fs/configfs/dir.c
272
struct configfs_dirent *sd = dentry->d_fsdata;
fs/configfs/dir.c
274
if (!sd)
fs/configfs/dir.c
277
list_del_init(&sd->s_sibling);
fs/configfs/dir.c
279
configfs_put(sd);
fs/configfs/dir.c
337
static void configfs_dir_set_ready(struct configfs_dirent *sd)
fs/configfs/dir.c
341
sd->s_type &= ~CONFIGFS_USET_CREATING;
fs/configfs/dir.c
342
list_for_each_entry(child_sd, &sd->s_children, s_sibling)
fs/configfs/dir.c
357
int configfs_dirent_is_ready(struct configfs_dirent *sd)
fs/configfs/dir.c
362
ret = !(sd->s_type & CONFIGFS_USET_CREATING);
fs/configfs/dir.c
447
struct configfs_dirent * sd;
fs/configfs/dir.c
465
list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
fs/configfs/dir.c
471
if (sd->s_type & CONFIGFS_PINNED)
fs/configfs/dir.c
478
if ((sd->s_type & CONFIGFS_NOT_PINNED) &&
fs/configfs/dir.c
479
!strcmp(configfs_get_name(sd), dentry->d_name.name)) {
fs/configfs/dir.c
48
struct configfs_dirent *sd = dentry->d_fsdata;
fs/configfs/dir.c
480
struct configfs_attribute *attr = sd->s_element;
fs/configfs/dir.c
483
dentry->d_fsdata = configfs_get(sd);
fs/configfs/dir.c
484
sd->s_dentry = dentry;
fs/configfs/dir.c
489
configfs_put(sd);
fs/configfs/dir.c
492
if (sd->s_type & CONFIGFS_ITEM_BIN_ATTR) {
fs/configfs/dir.c
50
if (sd) {
fs/configfs/dir.c
519
struct configfs_dirent *sd;
fs/configfs/dir.c
530
list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
fs/configfs/dir.c
531
if (!sd->s_element ||
fs/configfs/dir.c
532
(sd->s_type & CONFIGFS_NOT_PINNED))
fs/configfs/dir.c
534
if (sd->s_type & CONFIGFS_USET_DEFAULT) {
fs/configfs/dir.c
536
if (sd->s_type & CONFIGFS_USET_IN_MKDIR) {
fs/configfs/dir.c
538
*wait= dget(sd->s_dentry);
fs/configfs/dir.c
546
ret = configfs_detach_prep(sd->s_dentry, wait);
fs/configfs/dir.c
566
struct configfs_dirent *sd;
fs/configfs/dir.c
570
list_for_each_entry(sd, &parent_sd->s_children, s_sibling)
fs/configfs/dir.c
571
if (sd->s_type & CONFIGFS_USET_DEFAULT)
fs/configfs/dir.c
572
configfs_detach_rollback(sd->s_dentry);
fs/configfs/dir.c
579
struct configfs_dirent * sd, * tmp;
fs/configfs/dir.c
588
list_for_each_entry_safe(sd, tmp, &parent_sd->s_children, s_sibling) {
fs/configfs/dir.c
589
if (!sd->s_element || !(sd->s_type & CONFIGFS_NOT_PINNED))
fs/configfs/dir.c
59
if (sd->s_dentry == dentry)
fs/configfs/dir.c
592
list_del_init(&sd->s_sibling);
fs/configfs/dir.c
594
configfs_drop_dentry(sd, dentry);
fs/configfs/dir.c
595
configfs_put(sd);
fs/configfs/dir.c
60
sd->s_dentry = NULL;
fs/configfs/dir.c
63
configfs_put(sd);
fs/configfs/dir.c
655
struct configfs_dirent *sd, *tmp;
fs/configfs/dir.c
661
list_for_each_entry_safe(sd, tmp, &parent_sd->s_children, s_sibling) {
fs/configfs/dir.c
662
if (!sd->s_element ||
fs/configfs/dir.c
663
!(sd->s_type & CONFIGFS_USET_DEFAULT))
fs/configfs/dir.c
666
child = sd->s_dentry;
fs/configfs/dir.c
670
configfs_detach_group(sd->s_element);
fs/configfs/dir.c
699
struct configfs_dirent *sd;
fs/configfs/dir.c
714
sd = child->d_fsdata;
fs/configfs/dir.c
715
sd->s_type |= CONFIGFS_USET_DEFAULT;
fs/configfs/dir.c
886
struct configfs_dirent *sd;
fs/configfs/dir.c
890
sd = dentry->d_fsdata;
fs/configfs/dir.c
891
sd->s_type |= CONFIGFS_USET_DIR;
fs/configfs/dir.c
903
configfs_adjust_dir_dirent_depth_before_populate(sd);
fs/configfs/dir.c
910
configfs_adjust_dir_dirent_depth_after_populate(sd);
fs/configfs/dir.c
93
static void configfs_init_dirent_depth(struct configfs_dirent *sd)
fs/configfs/dir.c
95
sd->s_depth = -1;
fs/configfs/dir.c
974
static void configfs_dump_one(struct configfs_dirent *sd, int level)
fs/configfs/dir.c
976
pr_info("%*s\"%s\":\n", level, " ", configfs_get_name(sd));
fs/configfs/dir.c
978
#define type_print(_type) if (sd->s_type & _type) pr_info("%*s %s\n", level, " ", #_type)
fs/configfs/dir.c
989
static int configfs_dump(struct configfs_dirent *sd, int level)
fs/configfs/dir.c
99
struct configfs_dirent *sd)
fs/configfs/dir.c
994
configfs_dump_one(sd, level);
fs/configfs/dir.c
996
if (!(sd->s_type & (CONFIGFS_DIR|CONFIGFS_ROOT)))
fs/configfs/dir.c
999
list_for_each_entry(child_sd, &sd->s_children, s_sibling) {
fs/configfs/file.c
51
struct configfs_dirent *sd = file->f_path.dentry->d_fsdata;
fs/configfs/file.c
53
return sd->s_frag;
fs/configfs/inode.c
104
struct inode *configfs_new_inode(umode_t mode, struct configfs_dirent *sd,
fs/configfs/inode.c
113
if (sd->s_iattr) {
fs/configfs/inode.c
118
set_inode_attr(inode, sd->s_iattr);
fs/configfs/inode.c
127
static void configfs_set_inode_lock_class(struct configfs_dirent *sd,
fs/configfs/inode.c
130
int depth = sd->s_depth;
fs/configfs/inode.c
149
static void configfs_set_inode_lock_class(struct configfs_dirent *sd,
fs/configfs/inode.c
159
struct configfs_dirent *sd;
fs/configfs/inode.c
168
sd = dentry->d_fsdata;
fs/configfs/inode.c
169
inode = configfs_new_inode(mode, sd, dentry->d_sb);
fs/configfs/inode.c
175
configfs_set_inode_lock_class(sd, inode);
fs/configfs/inode.c
182
const unsigned char * configfs_get_name(struct configfs_dirent *sd)
fs/configfs/inode.c
186
BUG_ON(!sd || !sd->s_element);
fs/configfs/inode.c
189
if (sd->s_type & (CONFIGFS_DIR | CONFIGFS_ITEM_LINK))
fs/configfs/inode.c
190
return sd->s_dentry->d_name.name;
fs/configfs/inode.c
192
if (sd->s_type & (CONFIGFS_ITEM_ATTR | CONFIGFS_ITEM_BIN_ATTR)) {
fs/configfs/inode.c
193
attr = sd->s_element;
fs/configfs/inode.c
204
void configfs_drop_dentry(struct configfs_dirent * sd, struct dentry * parent)
fs/configfs/inode.c
206
struct dentry * dentry = sd->s_dentry;
fs/configfs/inode.c
39
struct configfs_dirent * sd = dentry->d_fsdata;
fs/configfs/inode.c
44
if (!sd)
fs/configfs/inode.c
47
sd_iattr = sd->s_iattr;
fs/configfs/inode.c
54
sd_iattr->ia_mode = sd->s_mode;
fs/configfs/inode.c
59
sd->s_iattr = sd_iattr;
fs/configfs/inode.c
82
sd_iattr->ia_mode = sd->s_mode = mode;
fs/configfs/symlink.c
139
struct configfs_dirent *sd;
fs/configfs/symlink.c
144
sd = dentry->d_parent->d_fsdata;
fs/configfs/symlink.c
149
if (!configfs_dirent_is_ready(sd))
fs/configfs/symlink.c
215
struct configfs_dirent *sd = dentry->d_fsdata, *target_sd;
fs/configfs/symlink.c
221
if (!(sd->s_type & CONFIGFS_ITEM_LINK))
fs/configfs/symlink.c
224
target_sd = sd->s_element;
fs/configfs/symlink.c
230
list_del_init(&sd->s_sibling);
fs/configfs/symlink.c
232
configfs_drop_dentry(sd, dentry->d_parent);
fs/configfs/symlink.c
234
configfs_put(sd);
fs/crypto/hooks.c
290
struct fscrypt_symlink_data *sd;
fs/crypto/hooks.c
303
sd = (struct fscrypt_symlink_data *)disk_link->name;
fs/crypto/hooks.c
305
sd = kmalloc(disk_link->len, GFP_NOFS);
fs/crypto/hooks.c
306
if (!sd)
fs/crypto/hooks.c
309
ciphertext_len = disk_link->len - sizeof(*sd) - 1;
fs/crypto/hooks.c
310
sd->len = cpu_to_le16(ciphertext_len);
fs/crypto/hooks.c
312
err = fscrypt_fname_encrypt(inode, &iname, sd->encrypted_path,
fs/crypto/hooks.c
322
sd->encrypted_path[ciphertext_len] = '\0';
fs/crypto/hooks.c
331
disk_link->name = (unsigned char *)sd;
fs/crypto/hooks.c
336
kfree(sd);
fs/crypto/hooks.c
359
const struct fscrypt_symlink_data *sd;
fs/crypto/hooks.c
387
if (max_size < sizeof(*sd) + 1)
fs/crypto/hooks.c
389
sd = caddr;
fs/crypto/hooks.c
390
cstr.name = (unsigned char *)sd->encrypted_path;
fs/crypto/hooks.c
391
cstr.len = le16_to_cpu(sd->len);
fs/crypto/hooks.c
396
if (cstr.len + sizeof(*sd) > max_size)
fs/nfsd/vfs.c
1004
struct splice_desc *sd)
fs/nfsd/vfs.c
1006
struct svc_rqst *rqstp = sd->u.data;
fs/nfsd/vfs.c
1011
last_page = page + (offset + sd->len - 1) / PAGE_SIZE;
fs/nfsd/vfs.c
1027
rqstp->rq_res.page_len += sd->len;
fs/nfsd/vfs.c
1028
return sd->len;
fs/nfsd/vfs.c
1032
struct splice_desc *sd)
fs/nfsd/vfs.c
1034
return __splice_from_pipe(pipe, sd, nfsd_splice_actor);
fs/nfsd/vfs.c
1082
struct splice_desc sd = {
fs/nfsd/vfs.c
1093
host_err = splice_direct_to_actor(file, &sd,
fs/ntfs3/fsntfs.c
1022
static inline __le32 security_hash(const void *sd, size_t bytes)
fs/ntfs3/fsntfs.c
1025
const __le32 *ptr = sd;
fs/ntfs3/fsntfs.c
1789
bool is_sd_valid(const struct SECURITY_DESCRIPTOR_RELATIVE *sd, u32 len)
fs/ntfs3/fsntfs.c
1796
if (sd->Revision != 1)
fs/ntfs3/fsntfs.c
1799
if (sd->Sbz1)
fs/ntfs3/fsntfs.c
1802
if (!(sd->Control & SE_SELF_RELATIVE))
fs/ntfs3/fsntfs.c
1805
sd_owner = le32_to_cpu(sd->Owner);
fs/ntfs3/fsntfs.c
1807
const struct SID *owner = Add2Ptr(sd, sd_owner);
fs/ntfs3/fsntfs.c
1819
sd_group = le32_to_cpu(sd->Group);
fs/ntfs3/fsntfs.c
1821
const struct SID *group = Add2Ptr(sd, sd_group);
fs/ntfs3/fsntfs.c
1833
sd_sacl = le32_to_cpu(sd->Sacl);
fs/ntfs3/fsntfs.c
1835
const struct ACL *sacl = Add2Ptr(sd, sd_sacl);
fs/ntfs3/fsntfs.c
1844
sd_dacl = le32_to_cpu(sd->Dacl);
fs/ntfs3/fsntfs.c
1846
const struct ACL *dacl = Add2Ptr(sd, sd_dacl);
fs/ntfs3/fsntfs.c
1982
struct SECURITY_DESCRIPTOR_RELATIVE **sd,
fs/ntfs3/fsntfs.c
1996
*sd = NULL;
fs/ntfs3/fsntfs.c
2059
*sd = p;
fs/ntfs3/fsntfs.c
2082
const struct SECURITY_DESCRIPTOR_RELATIVE *sd,
fs/ntfs3/fsntfs.c
2105
hash_key.hash = security_hash(sd, size_sd);
fs/ntfs3/fsntfs.c
2157
!memcmp(d_security + 1, sd, size_sd)) {
fs/ntfs3/fsntfs.c
2202
memcpy(d_security + 1, sd, size_sd);
fs/ntfs3/inode.c
1257
const void *sd;
fs/ntfs3/inode.c
1381
sd = s_default_security;
fs/ntfs3/inode.c
1390
!ntfs_insert_security(sbi, sd, sd_size,
fs/ntfs3/inode.c
1465
memcpy(Add2Ptr(attr, SIZEOF_RESIDENT), sd, sd_size);
fs/ntfs3/ntfs_fs.h
707
bool is_sd_valid(const struct SECURITY_DESCRIPTOR_RELATIVE *sd, u32 len);
fs/ntfs3/ntfs_fs.h
710
struct SECURITY_DESCRIPTOR_RELATIVE **sd,
fs/ntfs3/ntfs_fs.h
713
const struct SECURITY_DESCRIPTOR_RELATIVE *sd,
fs/ntfs3/xattr.c
810
struct SECURITY_DESCRIPTOR_RELATIVE *sd = NULL;
fs/ntfs3/xattr.c
824
&sd, &sd_size);
fs/ntfs3/xattr.c
828
if (!is_sd_valid(sd, sd_size)) {
fs/ntfs3/xattr.c
841
memcpy(buffer, sd, sd_size);
fs/ntfs3/xattr.c
843
kfree(sd);
fs/ocfs2/cluster/netdebug.c
236
struct o2net_sock_debug *sd = seq->private;
fs/ocfs2/cluster/netdebug.c
237
struct o2net_sock_container *sc, *dummy_sc = sd->dbg_sock;
fs/ocfs2/cluster/netdebug.c
248
struct o2net_sock_debug *sd = seq->private;
fs/ocfs2/cluster/netdebug.c
249
struct o2net_sock_container *sc, *dummy_sc = sd->dbg_sock;
fs/ocfs2/cluster/netdebug.c
349
struct o2net_sock_debug *sd = seq->private;
fs/ocfs2/cluster/netdebug.c
350
struct o2net_sock_container *sc, *dummy_sc = sd->dbg_sock;
fs/ocfs2/cluster/netdebug.c
356
if (sd->dbg_ctxt == SHOW_SOCK_CONTAINERS)
fs/ocfs2/cluster/netdebug.c
380
struct o2net_sock_debug *sd;
fs/ocfs2/cluster/netdebug.c
387
sd = __seq_open_private(file, &sc_seq_ops, sizeof(*sd));
fs/ocfs2/cluster/netdebug.c
388
if (!sd) {
fs/ocfs2/cluster/netdebug.c
393
sd->dbg_ctxt = ctxt;
fs/ocfs2/cluster/netdebug.c
394
sd->dbg_sock = dummy_sc;
fs/ocfs2/cluster/netdebug.c
404
struct o2net_sock_debug *sd = seq->private;
fs/ocfs2/cluster/netdebug.c
405
struct o2net_sock_container *dummy_sc = sd->dbg_sock;
fs/smb/client/misc.c
893
struct super_cb_data *sd = arg;
fs/smb/client/misc.c
895
struct cifs_tcon *t1 = sd->data, *t2;
fs/smb/client/misc.c
897
if (sd->sb)
fs/smb/client/misc.c
909
sd->sb = sb;
fs/smb/client/misc.c
916
struct super_cb_data sd = {
fs/smb/client/misc.c
925
iterate_supers_type(*fs_type, f, &sd);
fs/smb/client/misc.c
926
if (sd.sb) {
fs/smb/client/misc.c
932
cifs_sb_active(sd.sb);
fs/smb/client/misc.c
933
return sd.sb;
fs/smb/client/netmisc.c
167
SMB_DATE *sd = (SMB_DATE *)&date;
fs/smb/client/netmisc.c
179
day = sd->Day;
fs/smb/client/netmisc.c
180
month = sd->Month;
fs/smb/client/netmisc.c
189
year = sd->Year;
fs/smb/client/smb2pdu.c
2707
owner_offset = ptr - (__u8 *)&buf->sd;
fs/smb/client/smb2pdu.c
2708
buf->sd.OffsetOwner = cpu_to_le32(owner_offset);
fs/smb/client/smb2pdu.c
2710
buf->sd.OffsetGroup = cpu_to_le32(group_offset);
fs/smb/client/smb2pdu.c
2715
buf->sd.OffsetOwner = 0;
fs/smb/client/smb2pdu.c
2716
buf->sd.OffsetGroup = 0;
fs/smb/client/smb2pdu.c
2719
buf->ccontext.DataOffset = cpu_to_le16(offsetof(struct crt_sd_ctxt, sd));
fs/smb/client/smb2pdu.c
2727
buf->sd.Revision = 1; /* Must be one see MS-DTYP 2.4.6 */
fs/smb/client/smb2pdu.c
2733
buf->sd.Control = cpu_to_le16(ACL_CONTROL_SR | ACL_CONTROL_DP);
fs/smb/client/smb2pdu.c
2736
buf->sd.OffsetDacl = cpu_to_le32(ptr - (__u8 *)&buf->sd);
fs/smb/client/smb2pdu.c
2767
buf->ccontext.DataLength = cpu_to_le32(ptr - (__u8 *)&buf->sd);
fs/smb/client/smb2pdu.h
153
struct smb3_sd sd;
fs/splice.c
1025
ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
fs/splice.c
1065
len = sd->total_len;
fs/splice.c
1068
flags = sd->flags;
fs/splice.c
1069
sd->flags &= ~SPLICE_F_NONBLOCK;
fs/splice.c
1075
more = sd->flags & SPLICE_F_MORE;
fs/splice.c
1076
sd->flags |= SPLICE_F_MORE;
fs/splice.c
1082
loff_t pos = sd->pos, prev_pos = pos;
fs/splice.c
1089
sd->total_len = read_len;
fs/splice.c
1096
sd->flags &= ~SPLICE_F_MORE;
fs/splice.c
1103
ret = actor(pipe, sd);
fs/splice.c
1105
sd->pos = prev_pos;
fs/splice.c
1111
sd->pos = pos;
fs/splice.c
1114
sd->pos = prev_pos + ret;
fs/splice.c
1132
do_splice_eof(sd);
fs/splice.c
1153
struct splice_desc *sd)
fs/splice.c
1155
struct file *file = sd->u.file;
fs/splice.c
1159
ret = do_splice_from(pipe, file, sd->opos, sd->total_len, sd->flags);
fs/splice.c
1165
struct splice_desc *sd)
fs/splice.c
1167
struct file *file = sd->u.file;
fs/splice.c
1169
return do_splice_from(pipe, file, sd->opos, sd->total_len, sd->flags);
fs/splice.c
1172
static void direct_file_splice_eof(struct splice_desc *sd)
fs/splice.c
1174
struct file *file = sd->u.file;
fs/splice.c
1185
struct splice_desc sd = {
fs/splice.c
1202
ret = splice_direct_to_actor(in, &sd, actor);
fs/splice.c
1204
*ppos = sd.pos;
fs/splice.c
1491
struct splice_desc *sd)
fs/splice.c
1493
int n = copy_page_to_iter(buf->page, buf->offset, sd->len, sd->u.data);
fs/splice.c
1494
return n == sd->len ? n : -EFAULT;
fs/splice.c
1505
struct splice_desc sd = {
fs/splice.c
1517
if (sd.total_len) {
fs/splice.c
1519
ret = __splice_from_pipe(pipe, &sd, pipe_to_user);
fs/splice.c
442
static int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_desc *sd,
fs/splice.c
452
sd->len = buf->len;
fs/splice.c
453
if (sd->len > sd->total_len)
fs/splice.c
454
sd->len = sd->total_len;
fs/splice.c
463
ret = actor(pipe, buf, sd);
fs/splice.c
470
sd->num_spliced += ret;
fs/splice.c
471
sd->len -= ret;
fs/splice.c
472
sd->pos += ret;
fs/splice.c
473
sd->total_len -= ret;
fs/splice.c
480
sd->need_wakeup = true;
fs/splice.c
483
if (!sd->total_len)
fs/splice.c
515
static int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_desc *sd)
fs/splice.c
529
if (sd->num_spliced)
fs/splice.c
532
if (sd->flags & SPLICE_F_NONBLOCK)
fs/splice.c
538
if (sd->need_wakeup) {
fs/splice.c
540
sd->need_wakeup = false;
fs/splice.c
561
static void splice_from_pipe_begin(struct splice_desc *sd)
fs/splice.c
563
sd->num_spliced = 0;
fs/splice.c
564
sd->need_wakeup = false;
fs/splice.c
577
static void splice_from_pipe_end(struct pipe_inode_info *pipe, struct splice_desc *sd)
fs/splice.c
579
if (sd->need_wakeup)
fs/splice.c
596
ssize_t __splice_from_pipe(struct pipe_inode_info *pipe, struct splice_desc *sd,
fs/splice.c
601
splice_from_pipe_begin(sd);
fs/splice.c
604
ret = splice_from_pipe_next(pipe, sd);
fs/splice.c
606
ret = splice_from_pipe_feed(pipe, sd, actor);
fs/splice.c
608
splice_from_pipe_end(pipe, sd);
fs/splice.c
610
return sd->num_spliced ? sd->num_spliced : ret;
fs/splice.c
633
struct splice_desc sd = {
fs/splice.c
641
ret = __splice_from_pipe(pipe, &sd, actor);
fs/splice.c
665
struct splice_desc sd = {
fs/splice.c
684
splice_from_pipe_begin(&sd);
fs/splice.c
685
while (sd.total_len) {
fs/splice.c
692
ret = splice_from_pipe_next(pipe, &sd);
fs/splice.c
710
left = sd.total_len;
fs/splice.c
733
iov_iter_bvec(&from, ITER_SOURCE, array, n, sd.total_len - left);
fs/splice.c
735
kiocb.ki_pos = sd.pos;
fs/splice.c
737
sd.pos = kiocb.ki_pos;
fs/splice.c
740
WARN_ONCE(ret > sd.total_len - left,
fs/splice.c
742
ret, sd.total_len, left);
fs/splice.c
744
sd.num_spliced += ret;
fs/splice.c
745
sd.total_len -= ret;
fs/splice.c
746
*ppos = sd.pos;
fs/splice.c
759
sd.need_wakeup = true;
fs/splice.c
769
splice_from_pipe_end(pipe, &sd);
fs/splice.c
773
if (sd.num_spliced)
fs/splice.c
774
ret = sd.num_spliced;
fs/splice.c
944
static void do_splice_eof(struct splice_desc *sd)
fs/splice.c
946
if (sd->splice_eof)
fs/splice.c
947
sd->splice_eof(sd);
fs/sysfs/dir.c
111
parent = kernfs_get_parent(kobj->sd);
fs/sysfs/dir.c
112
ret = kernfs_rename_ns(kobj->sd, parent, new_name, new_ns);
fs/sysfs/dir.c
120
struct kernfs_node *kn = kobj->sd;
fs/sysfs/dir.c
123
new_parent = new_parent_kobj && new_parent_kobj->sd ?
fs/sysfs/dir.c
124
new_parent_kobj->sd : sysfs_root_kn;
fs/sysfs/dir.c
136
struct kernfs_node *kn, *parent = parent_kobj->sd;
fs/sysfs/dir.c
157
struct kernfs_node *parent = parent_kobj->sd;
fs/sysfs/dir.c
50
parent = kobj->parent->sd;
fs/sysfs/dir.c
67
kobj->sd = kn;
fs/sysfs/dir.c
81
struct kernfs_node *kn = kobj->sd;
fs/sysfs/dir.c
96
kobj->sd = NULL;
fs/sysfs/file.c
200
struct kernfs_node *kn = kobj->sd, *tmp;
fs/sysfs/file.c
370
if (WARN_ON(!kobj || !kobj->sd || !attr))
fs/sysfs/file.c
374
return sysfs_add_file_mode_ns(kobj->sd, attr, attr->mode, uid, gid, ns);
fs/sysfs/file.c
407
parent = kernfs_find_and_get(kobj->sd, group);
fs/sysfs/file.c
409
parent = kobj->sd;
fs/sysfs/file.c
439
kn = kernfs_find_and_get(kobj->sd, attr->name);
fs/sysfs/file.c
469
kn = kernfs_find_and_get(kobj->sd, attr->name);
fs/sysfs/file.c
510
struct kernfs_node *parent = kobj->sd;
fs/sysfs/file.c
525
struct kernfs_node *parent = kobj->sd;
fs/sysfs/file.c
561
parent = kernfs_find_and_get(kobj->sd, group);
fs/sysfs/file.c
563
parent = kobj->sd;
fs/sysfs/file.c
585
if (WARN_ON(!kobj || !kobj->sd || !attr))
fs/sysfs/file.c
589
return sysfs_add_bin_file_mode_ns(kobj->sd, attr, attr->attr.mode,
fs/sysfs/file.c
602
kernfs_remove_by_name(kobj->sd, attr->attr.name);
fs/sysfs/file.c
641
kn = kernfs_find_and_get_ns(kobj->sd, name, targ->sd->ns);
fs/sysfs/file.c
682
kn = kernfs_find_and_get(kobj->sd, name);
fs/sysfs/file.c
720
error = internal_change_owner(kobj->sd, kuid, kgid);
fs/sysfs/group.c
137
if (WARN_ON(!kobj || (!update && !kobj->sd)))
fs/sysfs/group.c
141
if (unlikely(update && !kobj->sd))
fs/sysfs/group.c
160
kn = kernfs_find_and_get(kobj->sd, grp->name);
fs/sysfs/group.c
176
kn = kernfs_create_dir_ns(kobj->sd, grp->name, mode,
fs/sysfs/group.c
180
sysfs_warn_dup(kobj->sd, grp->name);
fs/sysfs/group.c
185
kn = kobj->sd;
fs/sysfs/group.c
313
struct kernfs_node *parent = kobj->sd;
fs/sysfs/group.c
375
parent = kernfs_find_and_get(kobj->sd, grp->name);
fs/sysfs/group.c
405
parent = kernfs_find_and_get(kobj->sd, grp->name);
fs/sysfs/group.c
427
parent = kernfs_find_and_get(kobj->sd, group_name);
fs/sysfs/group.c
449
parent = kernfs_find_and_get(kobj->sd, group_name);
fs/sysfs/group.c
481
target = target_kobj->sd;
fs/sysfs/group.c
497
link = kernfs_create_link(kobj->sd, symlink_name, entry);
fs/sysfs/group.c
499
sysfs_warn_dup(kobj->sd, symlink_name);
fs/sysfs/group.c
588
grp_kn = kernfs_find_and_get(kobj->sd, grp->name);
fs/sysfs/group.c
590
kernfs_get(kobj->sd);
fs/sysfs/group.c
591
grp_kn = kobj->sd;
fs/sysfs/symlink.c
132
if (targ->sd && kernfs_ns_enabled(kobj->sd))
fs/sysfs/symlink.c
133
ns = targ->sd->ns;
fs/sysfs/symlink.c
135
kernfs_remove_by_name_ns(kobj->sd, name, ns);
fs/sysfs/symlink.c
150
parent = kobj->sd;
fs/sysfs/symlink.c
176
parent = kobj->sd;
fs/sysfs/symlink.c
178
if (targ->sd)
fs/sysfs/symlink.c
179
old_ns = targ->sd->ns;
fs/sysfs/symlink.c
35
if (target_kobj->sd) {
fs/sysfs/symlink.c
36
target = target_kobj->sd;
fs/sysfs/symlink.c
75
parent = kobj->sd;
fs/xfs/scrub/dir.c
1003
sd->need_revalidate = true;
fs/xfs/scrub/dir.c
1012
error = xchk_dir_revalidate_dirent(sd, xname, dirent->ino);
fs/xfs/scrub/dir.c
1021
error = xchk_dir_parent_pointer(sd, xname, ip);
fs/xfs/scrub/dir.c
1032
struct xchk_dir *sd)
fs/xfs/scrub/dir.c
1037
foreach_xfarray_idx(sd->dir_entries, array_cur) {
fs/xfs/scrub/dir.c
1040
if (sd->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
fs/xfs/scrub/dir.c
1043
error = xfarray_load(sd->dir_entries, array_cur, &dirent);
fs/xfs/scrub/dir.c
1047
error = xfblob_loadname(sd->dir_names, dirent.name_cookie,
fs/xfs/scrub/dir.c
1048
&sd->xname, dirent.namelen);
fs/xfs/scrub/dir.c
1052
error = xchk_dir_slow_dirent(sd, &dirent, &sd->xname);
fs/xfs/scrub/dir.c
1065
struct xchk_dir *sd;
fs/xfs/scrub/dir.c
1098
sd = kvzalloc_obj(struct xchk_dir, XCHK_GFP_FLAGS);
fs/xfs/scrub/dir.c
1099
if (!sd)
fs/xfs/scrub/dir.c
1101
sd->sc = sc;
fs/xfs/scrub/dir.c
1102
sd->xname.name = sd->namebuf;
fs/xfs/scrub/dir.c
1110
sizeof(struct xchk_dirent), &sd->dir_entries);
fs/xfs/scrub/dir.c
1115
&sd->dir_names);
fs/xfs/scrub/dir.c
1121
error = xchk_dir_walk(sc, sc->ip, xchk_dir_actor, sd);
fs/xfs/scrub/dir.c
1128
error = xchk_dir_finish_slow_dirents(sd);
fs/xfs/scrub/dir.c
1139
if (sd->dir_names)
fs/xfs/scrub/dir.c
1140
xfblob_destroy(sd->dir_names);
fs/xfs/scrub/dir.c
1142
if (sd->dir_entries)
fs/xfs/scrub/dir.c
1143
xfarray_destroy(sd->dir_entries);
fs/xfs/scrub/dir.c
1145
kvfree(sd);
fs/xfs/scrub/dir.c
146
struct xchk_dir *sd,
fs/xfs/scrub/dir.c
150
struct xfs_scrub *sc = sd->sc;
fs/xfs/scrub/dir.c
153
xfs_inode_to_parent_rec(&sd->pptr_rec, sc->ip);
fs/xfs/scrub/dir.c
154
error = xfs_parent_lookup(sc->tp, ip, name, &sd->pptr_rec,
fs/xfs/scrub/dir.c
155
&sd->pptr_args);
fs/xfs/scrub/dir.c
165
struct xchk_dir *sd,
fs/xfs/scrub/dir.c
170
struct xfs_scrub *sc = sd->sc;
fs/xfs/scrub/dir.c
196
error = xfblob_storename(sd->dir_names, &save_de.name_cookie,
fs/xfs/scrub/dir.c
202
error = xfarray_append(sd->dir_entries, &save_de);
fs/xfs/scrub/dir.c
210
error = xchk_dir_parent_pointer(sd, name, ip);
fs/xfs/scrub/dir.c
232
struct xchk_dir *sd = priv;
fs/xfs/scrub/dir.c
301
error = xchk_dir_check_pptr_fast(sd, dapos, name, ip);
fs/xfs/scrub/dir.c
931
struct xchk_dir *sd,
fs/xfs/scrub/dir.c
935
struct xfs_scrub *sc = sd->sc;
fs/xfs/scrub/dir.c
961
struct xchk_dir *sd,
fs/xfs/scrub/dir.c
965
struct xfs_scrub *sc = sd->sc;
fs/xfs/scrub/dir.c
971
if (sd->need_revalidate) {
fs/xfs/scrub/dir.c
972
error = xchk_dir_revalidate_dirent(sd, xname, dirent->ino);
include/linux/iio/adc/ad_sigma_delta.h
133
static inline bool ad_sigma_delta_has_spi_offload(struct ad_sigma_delta *sd)
include/linux/iio/adc/ad_sigma_delta.h
135
return sd->offload != NULL;
include/linux/iio/adc/ad_sigma_delta.h
138
static inline int ad_sigma_delta_set_channel(struct ad_sigma_delta *sd,
include/linux/iio/adc/ad_sigma_delta.h
141
if (sd->info->set_channel)
include/linux/iio/adc/ad_sigma_delta.h
142
return sd->info->set_channel(sd, channel);
include/linux/iio/adc/ad_sigma_delta.h
147
static inline int ad_sigma_delta_append_status(struct ad_sigma_delta *sd, bool append)
include/linux/iio/adc/ad_sigma_delta.h
151
if (sd->info->append_status) {
include/linux/iio/adc/ad_sigma_delta.h
152
ret = sd->info->append_status(sd, append);
include/linux/iio/adc/ad_sigma_delta.h
156
sd->status_appended = append;
include/linux/iio/adc/ad_sigma_delta.h
162
static inline int ad_sigma_delta_disable_all(struct ad_sigma_delta *sd)
include/linux/iio/adc/ad_sigma_delta.h
164
if (sd->info->disable_all)
include/linux/iio/adc/ad_sigma_delta.h
165
return sd->info->disable_all(sd);
include/linux/iio/adc/ad_sigma_delta.h
170
static inline int ad_sigma_delta_disable_one(struct ad_sigma_delta *sd,
include/linux/iio/adc/ad_sigma_delta.h
173
if (sd->info->disable_one)
include/linux/iio/adc/ad_sigma_delta.h
174
return sd->info->disable_one(sd, chan);
include/linux/iio/adc/ad_sigma_delta.h
179
static inline int ad_sigma_delta_set_mode(struct ad_sigma_delta *sd,
include/linux/iio/adc/ad_sigma_delta.h
182
if (sd->info->set_mode)
include/linux/iio/adc/ad_sigma_delta.h
183
return sd->info->set_mode(sd, mode);
include/linux/iio/adc/ad_sigma_delta.h
188
static inline int ad_sigma_delta_postprocess_sample(struct ad_sigma_delta *sd,
include/linux/iio/adc/ad_sigma_delta.h
191
if (sd->info->postprocess_sample)
include/linux/iio/adc/ad_sigma_delta.h
192
return sd->info->postprocess_sample(sd, raw_sample);
include/linux/kobject.h
70
struct kernfs_node *sd; /* sysfs directory entry */
include/linux/mlx5/driver.h
797
struct mlx5_sd *sd;
include/linux/pci-acpi.h
83
void *sd);
include/linux/sched/topology.h
153
static inline struct cpumask *sched_domain_span(struct sched_domain *sd)
include/linux/sched/topology.h
155
return to_cpumask(sd->span);
include/linux/sched/topology.h
173
struct sched_domain *__percpu *sd;
include/linux/splice.h
41
void (*splice_eof)(struct splice_desc *sd); /* Unexpected EOF handler */
include/linux/splice.h
75
struct splice_desc *sd, splice_actor *actor);
include/linux/splice.h
82
ssize_t splice_direct_to_actor(struct file *file, struct splice_desc *sd,
include/media/i2c/adp1653.h
86
int (*power)(struct v4l2_subdev *sd, int on);
include/media/i2c/adp1653.h
96
#define to_adp1653_flash(sd) container_of(sd, struct adp1653_flash, subdev)
include/media/v4l2-async.h
121
struct v4l2_subdev *sd;
include/media/v4l2-async.h
174
struct v4l2_subdev *sd);
include/media/v4l2-async.h
262
int v4l2_async_subdev_endpoint_add(struct v4l2_subdev *sd,
include/media/v4l2-async.h
274
v4l2_async_connection_unique(struct v4l2_subdev *sd);
include/media/v4l2-async.h
313
#define v4l2_async_register_subdev(sd) \
include/media/v4l2-async.h
314
__v4l2_async_register_subdev(sd, THIS_MODULE)
include/media/v4l2-async.h
315
int __v4l2_async_register_subdev(struct v4l2_subdev *sd, struct module *module);
include/media/v4l2-async.h
337
v4l2_async_register_subdev_sensor(struct v4l2_subdev *sd);
include/media/v4l2-async.h
345
void v4l2_async_unregister_subdev(struct v4l2_subdev *sd);
include/media/v4l2-async.h
84
struct v4l2_subdev *sd;
include/media/v4l2-common.h
184
void v4l2_i2c_subdev_set_name(struct v4l2_subdev *sd, struct i2c_client *client,
include/media/v4l2-common.h
195
void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client,
include/media/v4l2-common.h
205
unsigned short v4l2_i2c_subdev_addr(struct v4l2_subdev *sd);
include/media/v4l2-common.h
222
void v4l2_i2c_subdev_unregister(struct v4l2_subdev *sd);
include/media/v4l2-common.h
243
v4l2_i2c_subdev_set_name(struct v4l2_subdev *sd, struct i2c_client *client,
include/media/v4l2-common.h
248
v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client,
include/media/v4l2-common.h
252
static inline unsigned short v4l2_i2c_subdev_addr(struct v4l2_subdev *sd)
include/media/v4l2-common.h
263
static inline void v4l2_i2c_subdev_unregister(struct v4l2_subdev *sd)
include/media/v4l2-common.h
298
void v4l2_spi_subdev_init(struct v4l2_subdev *sd, struct spi_device *spi,
include/media/v4l2-common.h
306
void v4l2_spi_subdev_unregister(struct v4l2_subdev *sd);
include/media/v4l2-common.h
318
v4l2_spi_subdev_init(struct v4l2_subdev *sd, struct spi_device *spi,
include/media/v4l2-common.h
322
static inline void v4l2_spi_subdev_unregister(struct v4l2_subdev *sd)
include/media/v4l2-common.h
472
struct v4l2_subdev *sd, struct v4l2_streamparm *a);
include/media/v4l2-common.h
485
struct v4l2_subdev *sd, struct v4l2_streamparm *a);
include/media/v4l2-ctrls.h
1553
int v4l2_ctrl_subdev_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
include/media/v4l2-ctrls.h
1562
int v4l2_ctrl_subdev_log_status(struct v4l2_subdev *sd);
include/media/v4l2-device.h
159
#define v4l2_device_register_subdev(v4l2_dev, sd) \
include/media/v4l2-device.h
160
__v4l2_device_register_subdev(v4l2_dev, sd, THIS_MODULE)
include/media/v4l2-device.h
162
struct v4l2_subdev *sd,
include/media/v4l2-device.h
175
void v4l2_device_unregister_subdev(struct v4l2_subdev *sd);
include/media/v4l2-device.h
238
static inline void v4l2_subdev_notify(struct v4l2_subdev *sd,
include/media/v4l2-device.h
241
if (sd && sd->v4l2_dev && sd->v4l2_dev->notify)
include/media/v4l2-device.h
242
sd->v4l2_dev->notify(sd, notification, arg);
include/media/v4l2-device.h
270
#define v4l2_device_for_each_subdev(sd, v4l2_dev) \
include/media/v4l2-device.h
271
list_for_each_entry(sd, &(v4l2_dev)->subdevs, list)
include/media/v4l2-device.h
293
#define __v4l2_device_call_subdevs_p(v4l2_dev, sd, cond, o, f, args...) \
include/media/v4l2-device.h
295
list_for_each_entry((sd), &(v4l2_dev)->subdevs, list) \
include/media/v4l2-device.h
296
if ((cond) && (sd)->ops->o && (sd)->ops->o->f) \
include/media/v4l2-device.h
297
(sd)->ops->o->f((sd) , ##args); \
include/media/v4l2-device.h
350
#define __v4l2_device_call_subdevs_until_err_p(v4l2_dev, sd, cond, o, f, args...) \
include/media/v4l2-device.h
354
list_for_each_entry((sd), &(v4l2_dev)->subdevs, list) { \
include/media/v4l2-device.h
355
if ((cond) && (sd)->ops->o && (sd)->ops->o->f) \
include/media/v4l2-device.h
356
__err = (sd)->ops->o->f((sd) , ##args); \
include/media/v4l2-device.h
51
void (*notify)(struct v4l2_subdev *sd,
include/media/v4l2-event.h
185
int v4l2_event_subdev_unsubscribe(struct v4l2_subdev *sd,
include/media/v4l2-event.h
205
int v4l2_src_change_event_subdev_subscribe(struct v4l2_subdev *sd,
include/media/v4l2-flash-led-class.h
100
return container_of(sd, struct v4l2_flash, sd);
include/media/v4l2-flash-led-class.h
86
struct v4l2_subdev sd;
include/media/v4l2-flash-led-class.h
98
struct v4l2_subdev *sd)
include/media/v4l2-subdev.h
1153
static inline void v4l2_set_subdevdata(struct v4l2_subdev *sd, void *p)
include/media/v4l2-subdev.h
1155
sd->dev_priv = p;
include/media/v4l2-subdev.h
1165
static inline void *v4l2_get_subdevdata(const struct v4l2_subdev *sd)
include/media/v4l2-subdev.h
1167
return sd->dev_priv;
include/media/v4l2-subdev.h
1176
static inline void v4l2_set_subdev_hostdata(struct v4l2_subdev *sd, void *p)
include/media/v4l2-subdev.h
1178
sd->host_priv = p;
include/media/v4l2-subdev.h
1188
static inline void *v4l2_get_subdev_hostdata(const struct v4l2_subdev *sd)
include/media/v4l2-subdev.h
1190
return sd->host_priv;
include/media/v4l2-subdev.h
1223
int v4l2_subdev_link_validate_default(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
1276
struct v4l2_subdev_state *__v4l2_subdev_state_alloc(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
1303
#define v4l2_subdev_init_finalize(sd) \
include/media/v4l2-subdev.h
1308
__v4l2_subdev_init_finalize(sd, name, &__key); \
include/media/v4l2-subdev.h
1311
int __v4l2_subdev_init_finalize(struct v4l2_subdev *sd, const char *name,
include/media/v4l2-subdev.h
1322
void v4l2_subdev_cleanup(struct v4l2_subdev *sd);
include/media/v4l2-subdev.h
1458
int v4l2_subdev_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_state *state,
include/media/v4l2-subdev.h
1475
int v4l2_subdev_get_frame_interval(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
1491
int v4l2_subdev_set_routing(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
1519
int v4l2_subdev_set_routing_with_fmt(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
1640
int v4l2_subdev_routing_validate(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
1673
int v4l2_subdev_enable_streams(struct v4l2_subdev *sd, u32 pad,
include/media/v4l2-subdev.h
1705
int v4l2_subdev_disable_streams(struct v4l2_subdev *sd, u32 pad,
include/media/v4l2-subdev.h
1723
int v4l2_subdev_s_stream_helper(struct v4l2_subdev *sd, int enable);
include/media/v4l2-subdev.h
1806
v4l2_subdev_get_unlocked_active_state(struct v4l2_subdev *sd)
include/media/v4l2-subdev.h
1808
if (sd->active_state)
include/media/v4l2-subdev.h
1809
lockdep_assert_not_held(sd->active_state->lock);
include/media/v4l2-subdev.h
1810
return sd->active_state;
include/media/v4l2-subdev.h
1827
v4l2_subdev_get_locked_active_state(struct v4l2_subdev *sd)
include/media/v4l2-subdev.h
1829
if (sd->active_state)
include/media/v4l2-subdev.h
1830
lockdep_assert_held(sd->active_state->lock);
include/media/v4l2-subdev.h
1831
return sd->active_state;
include/media/v4l2-subdev.h
1845
v4l2_subdev_lock_and_get_active_state(struct v4l2_subdev *sd)
include/media/v4l2-subdev.h
1847
if (sd->active_state)
include/media/v4l2-subdev.h
1848
v4l2_subdev_lock_state(sd->active_state);
include/media/v4l2-subdev.h
1849
return sd->active_state;
include/media/v4l2-subdev.h
1858
void v4l2_subdev_init(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
1876
#define v4l2_subdev_call(sd, o, f, args...) \
include/media/v4l2-subdev.h
1878
struct v4l2_subdev *__sd = (sd); \
include/media/v4l2-subdev.h
1910
#define v4l2_subdev_call_state_active(sd, o, f, args...) \
include/media/v4l2-subdev.h
1914
state = v4l2_subdev_get_unlocked_active_state(sd); \
include/media/v4l2-subdev.h
1917
__result = v4l2_subdev_call(sd, o, f, state, ##args); \
include/media/v4l2-subdev.h
1942
#define v4l2_subdev_call_state_try(sd, o, f, args...) \
include/media/v4l2-subdev.h
1949
__v4l2_subdev_state_alloc(sd, name, &__key); \
include/media/v4l2-subdev.h
1954
__result = v4l2_subdev_call(sd, o, f, state, ##args); \
include/media/v4l2-subdev.h
1969
#define v4l2_subdev_has_op(sd, o, f) \
include/media/v4l2-subdev.h
197
int (*log_status)(struct v4l2_subdev *sd);
include/media/v4l2-subdev.h
1970
((sd)->ops->o && (sd)->ops->o->f)
include/media/v4l2-subdev.h
198
int (*s_io_pin_config)(struct v4l2_subdev *sd, size_t n,
include/media/v4l2-subdev.h
1982
void v4l2_subdev_notify_event(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
1996
bool v4l2_subdev_is_streaming(struct v4l2_subdev *sd);
include/media/v4l2-subdev.h
200
int (*init)(struct v4l2_subdev *sd, u32 val);
include/media/v4l2-subdev.h
201
int (*load_fw)(struct v4l2_subdev *sd);
include/media/v4l2-subdev.h
202
int (*reset)(struct v4l2_subdev *sd, u32 val);
include/media/v4l2-subdev.h
203
int (*s_gpio)(struct v4l2_subdev *sd, u32 val);
include/media/v4l2-subdev.h
204
long (*command)(struct v4l2_subdev *sd, unsigned int cmd, void *arg);
include/media/v4l2-subdev.h
205
long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg);
include/media/v4l2-subdev.h
207
long (*compat_ioctl32)(struct v4l2_subdev *sd, unsigned int cmd,
include/media/v4l2-subdev.h
211
int (*g_register)(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg);
include/media/v4l2-subdev.h
212
int (*s_register)(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg);
include/media/v4l2-subdev.h
214
int (*s_power)(struct v4l2_subdev *sd, int on);
include/media/v4l2-subdev.h
215
int (*interrupt_service_routine)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
217
int (*subscribe_event)(struct v4l2_subdev *sd, struct v4l2_fh *fh,
include/media/v4l2-subdev.h
219
int (*unsubscribe_event)(struct v4l2_subdev *sd, struct v4l2_fh *fh,
include/media/v4l2-subdev.h
274
int (*standby)(struct v4l2_subdev *sd);
include/media/v4l2-subdev.h
275
int (*s_radio)(struct v4l2_subdev *sd);
include/media/v4l2-subdev.h
276
int (*s_frequency)(struct v4l2_subdev *sd, const struct v4l2_frequency *freq);
include/media/v4l2-subdev.h
277
int (*g_frequency)(struct v4l2_subdev *sd, struct v4l2_frequency *freq);
include/media/v4l2-subdev.h
278
int (*enum_freq_bands)(struct v4l2_subdev *sd, struct v4l2_frequency_band *band);
include/media/v4l2-subdev.h
279
int (*g_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
include/media/v4l2-subdev.h
280
int (*s_tuner)(struct v4l2_subdev *sd, const struct v4l2_tuner *vt);
include/media/v4l2-subdev.h
281
int (*g_modulator)(struct v4l2_subdev *sd, struct v4l2_modulator *vm);
include/media/v4l2-subdev.h
282
int (*s_modulator)(struct v4l2_subdev *sd, const struct v4l2_modulator *vm);
include/media/v4l2-subdev.h
283
int (*s_type_addr)(struct v4l2_subdev *sd, struct tuner_setup *type);
include/media/v4l2-subdev.h
284
int (*s_config)(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *config);
include/media/v4l2-subdev.h
314
int (*s_clock_freq)(struct v4l2_subdev *sd, u32 freq);
include/media/v4l2-subdev.h
315
int (*s_i2s_clock_freq)(struct v4l2_subdev *sd, u32 freq);
include/media/v4l2-subdev.h
316
int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config);
include/media/v4l2-subdev.h
317
int (*s_stream)(struct v4l2_subdev *sd, int enable);
include/media/v4l2-subdev.h
482
int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config);
include/media/v4l2-subdev.h
483
int (*s_crystal_freq)(struct v4l2_subdev *sd, u32 freq, u32 flags);
include/media/v4l2-subdev.h
484
int (*g_std)(struct v4l2_subdev *sd, v4l2_std_id *norm);
include/media/v4l2-subdev.h
485
int (*s_std)(struct v4l2_subdev *sd, v4l2_std_id norm);
include/media/v4l2-subdev.h
486
int (*s_std_output)(struct v4l2_subdev *sd, v4l2_std_id std);
include/media/v4l2-subdev.h
487
int (*g_std_output)(struct v4l2_subdev *sd, v4l2_std_id *std);
include/media/v4l2-subdev.h
488
int (*querystd)(struct v4l2_subdev *sd, v4l2_std_id *std);
include/media/v4l2-subdev.h
489
int (*g_tvnorms)(struct v4l2_subdev *sd, v4l2_std_id *std);
include/media/v4l2-subdev.h
490
int (*g_tvnorms_output)(struct v4l2_subdev *sd, v4l2_std_id *std);
include/media/v4l2-subdev.h
491
int (*g_input_status)(struct v4l2_subdev *sd, u32 *status);
include/media/v4l2-subdev.h
492
int (*s_stream)(struct v4l2_subdev *sd, int enable);
include/media/v4l2-subdev.h
493
int (*s_rx_buffer)(struct v4l2_subdev *sd, void *buf,
include/media/v4l2-subdev.h
495
int (*pre_streamon)(struct v4l2_subdev *sd, u32 flags);
include/media/v4l2-subdev.h
496
int (*post_streamoff)(struct v4l2_subdev *sd);
include/media/v4l2-subdev.h
535
int (*decode_vbi_line)(struct v4l2_subdev *sd, struct v4l2_decode_vbi_line *vbi_line);
include/media/v4l2-subdev.h
536
int (*s_vbi_data)(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *vbi_data);
include/media/v4l2-subdev.h
537
int (*g_vbi_data)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_data *vbi_data);
include/media/v4l2-subdev.h
538
int (*g_sliced_vbi_cap)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_cap *cap);
include/media/v4l2-subdev.h
539
int (*s_raw_fmt)(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt);
include/media/v4l2-subdev.h
540
int (*g_sliced_fmt)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt);
include/media/v4l2-subdev.h
541
int (*s_sliced_fmt)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt);
include/media/v4l2-subdev.h
555
int (*g_skip_top_lines)(struct v4l2_subdev *sd, u32 *lines);
include/media/v4l2-subdev.h
556
int (*g_skip_frames)(struct v4l2_subdev *sd, u32 *frames);
include/media/v4l2-subdev.h
654
int (*rx_read)(struct v4l2_subdev *sd, u8 *buf, size_t count,
include/media/v4l2-subdev.h
657
int (*rx_g_parameters)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
659
int (*rx_s_parameters)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
663
int (*tx_write)(struct v4l2_subdev *sd, u8 *buf, size_t count,
include/media/v4l2-subdev.h
666
int (*tx_g_parameters)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
668
int (*tx_s_parameters)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
731
struct v4l2_subdev *sd;
include/media/v4l2-subdev.h
828
int (*enum_mbus_code)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
831
int (*enum_frame_size)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
834
int (*enum_frame_interval)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
837
int (*get_fmt)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
840
int (*set_fmt)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
843
int (*get_selection)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
846
int (*set_selection)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
849
int (*get_frame_interval)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
852
int (*set_frame_interval)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
855
int (*get_edid)(struct v4l2_subdev *sd, struct v4l2_edid *edid);
include/media/v4l2-subdev.h
856
int (*set_edid)(struct v4l2_subdev *sd, struct v4l2_edid *edid);
include/media/v4l2-subdev.h
857
int (*s_dv_timings)(struct v4l2_subdev *sd, unsigned int pad,
include/media/v4l2-subdev.h
859
int (*g_dv_timings)(struct v4l2_subdev *sd, unsigned int pad,
include/media/v4l2-subdev.h
861
int (*query_dv_timings)(struct v4l2_subdev *sd, unsigned int pad,
include/media/v4l2-subdev.h
863
int (*dv_timings_cap)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
865
int (*enum_dv_timings)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
868
int (*link_validate)(struct v4l2_subdev *sd, struct media_link *link,
include/media/v4l2-subdev.h
872
int (*get_frame_desc)(struct v4l2_subdev *sd, unsigned int pad,
include/media/v4l2-subdev.h
874
int (*set_frame_desc)(struct v4l2_subdev *sd, unsigned int pad,
include/media/v4l2-subdev.h
876
int (*get_mbus_config)(struct v4l2_subdev *sd, unsigned int pad,
include/media/v4l2-subdev.h
878
int (*set_routing)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
882
int (*enable_streams)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
885
int (*disable_streams)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
943
int (*init_state)(struct v4l2_subdev *sd,
include/media/v4l2-subdev.h
945
int (*registered)(struct v4l2_subdev *sd);
include/media/v4l2-subdev.h
946
void (*unregistered)(struct v4l2_subdev *sd);
include/media/v4l2-subdev.h
947
int (*open)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh);
include/media/v4l2-subdev.h
948
int (*close)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh);
include/media/v4l2-subdev.h
949
void (*release)(struct v4l2_subdev *sd);
include/net/rps.h
180
static inline u32 rps_input_queue_tail_incr(struct softnet_data *sd)
include/net/rps.h
183
return ++sd->input_queue_tail;
include/net/rps.h
196
static inline void rps_input_queue_head_add(struct softnet_data *sd, int val)
include/net/rps.h
199
WRITE_ONCE(sd->input_queue_head, sd->input_queue_head + val);
include/net/rps.h
203
static inline void rps_input_queue_head_incr(struct softnet_data *sd)
include/net/rps.h
205
rps_input_queue_head_add(sd, 1);
include/net/xfrm.h
2068
void xfrm_dev_backlog(struct softnet_data *sd);
include/net/xfrm.h
2133
static inline void xfrm_dev_backlog(struct softnet_data *sd)
include/uapi/linux/sctp.h
1075
int sd;
kernel/entry/syscall_user_dispatch.c
140
struct syscall_user_dispatch *sd = &task->syscall_dispatch;
kernel/entry/syscall_user_dispatch.c
151
cfg.offset = sd->offset;
kernel/entry/syscall_user_dispatch.c
152
cfg.len = sd->len;
kernel/entry/syscall_user_dispatch.c
153
cfg.selector = (__u64)(uintptr_t)sd->selector;
kernel/entry/syscall_user_dispatch.c
37
struct syscall_user_dispatch *sd = &current->syscall_dispatch;
kernel/entry/syscall_user_dispatch.c
40
if (likely(instruction_pointer(regs) - sd->offset < sd->len))
kernel/entry/syscall_user_dispatch.c
46
if (likely(sd->selector)) {
kernel/entry/syscall_user_dispatch.c
51
if (unlikely(__get_user(state, sd->selector))) {
kernel/entry/syscall_user_dispatch.c
65
sd->on_dispatch = true;
kernel/events/core.c
3331
struct stop_event_data *sd = info;
kernel/events/core.c
3332
struct perf_event *event = sd->event;
kernel/events/core.c
3359
if (sd->restart)
kernel/events/core.c
3367
struct stop_event_data sd = {
kernel/events/core.c
3386
__perf_event_stop, &sd);
kernel/events/core.c
9021
struct stop_event_data sd = {
kernel/events/core.c
9042
ro->err = __perf_event_stop(&sd);
kernel/irq/debugfs.c
13
const struct irq_bit_descr *sd, int size)
kernel/irq/debugfs.c
17
for (i = 0; i < size; i++, sd++) {
kernel/irq/debugfs.c
18
if (state & sd->mask)
kernel/irq/debugfs.c
19
seq_printf(m, "%*s%s\n", ind + 12, "", sd->name);
kernel/irq/internals.h
387
const struct irq_bit_descr *sd, int size);
kernel/rcu/rcutorture.c
3285
int sd;
kernel/rcu/rcutorture.c
3308
sd = cur_ops->stall_dur() + 1;
kernel/rcu/rcutorture.c
3309
sd4 = (sd + fwd_progress_div - 1) / fwd_progress_div;
kernel/rcu/rcutorture.c
3310
dur = sd4 + torture_random(&trs) % (sd - sd4);
kernel/sched/core.c
1208
struct sched_domain *sd;
kernel/sched/core.c
1221
for_each_domain(cpu, sd) {
kernel/sched/core.c
1222
for_each_cpu_and(i, sched_domain_span(sd), hk_mask) {
kernel/sched/core.c
3602
struct sched_domain *sd;
kernel/sched/core.c
3607
for_each_domain(rq->cpu, sd) {
kernel/sched/core.c
3608
if (cpumask_test_cpu(cpu, sched_domain_span(sd))) {
kernel/sched/core.c
3609
__schedstat_inc(sd->ttwu_wake_remote);
kernel/sched/core.c
6301
static bool steal_cookie_task(int cpu, struct sched_domain *sd)
kernel/sched/core.c
6305
for_each_cpu_wrap(i, sched_domain_span(sd), cpu + 1) {
kernel/sched/core.c
6322
struct sched_domain *sd;
kernel/sched/core.c
6329
for_each_domain(cpu, sd) {
kernel/sched/core.c
6333
if (steal_cookie_task(cpu, sd))
kernel/sched/core.c
8711
rq->sd = NULL;
kernel/sched/deadline.c
2717
struct sched_domain *sd;
kernel/sched/deadline.c
2758
for_each_domain(cpu, sd) {
kernel/sched/deadline.c
2759
if (sd->flags & SD_WAKE_AFFINE) {
kernel/sched/deadline.c
2767
cpumask_test_cpu(this_cpu, sched_domain_span(sd))) {
kernel/sched/deadline.c
2773
sched_domain_span(sd));
kernel/sched/debug.c
667
static void register_sd(struct sched_domain *sd, struct dentry *parent)
kernel/sched/debug.c
670
debugfs_create_##type(#member, mode, parent, &sd->member)
kernel/sched/debug.c
682
debugfs_create_file("flags", 0444, parent, &sd->flags, &sd_flags_fops);
kernel/sched/debug.c
683
debugfs_create_file("groups_flags", 0444, parent, &sd->groups->flags, &sd_flags_fops);
kernel/sched/debug.c
684
debugfs_create_u32("level", 0444, parent, (u32 *)&sd->level);
kernel/sched/debug.c
686
if (sd->flags & SD_ASYM_PACKING)
kernel/sched/debug.c
688
(u32 *)&sd->groups->asym_prefer_cpu);
kernel/sched/debug.c
720
struct sched_domain *sd;
kernel/sched/debug.c
729
for_each_domain(cpu, sd) {
kernel/sched/debug.c
735
register_sd(sd, d_sd);
kernel/sched/ext_idle.c
233
struct sched_domain *sd;
kernel/sched/ext_idle.c
235
sd = rcu_dereference(per_cpu(sd_llc, cpu));
kernel/sched/ext_idle.c
236
if (!sd)
kernel/sched/ext_idle.c
239
return sd->span_weight;
kernel/sched/ext_idle.c
248
struct sched_domain *sd;
kernel/sched/ext_idle.c
250
sd = rcu_dereference(per_cpu(sd_llc, cpu));
kernel/sched/ext_idle.c
251
if (!sd)
kernel/sched/ext_idle.c
254
return sched_domain_span(sd);
kernel/sched/ext_idle.c
263
struct sched_domain *sd;
kernel/sched/ext_idle.c
266
sd = rcu_dereference(per_cpu(sd_numa, cpu));
kernel/sched/ext_idle.c
267
if (!sd)
kernel/sched/ext_idle.c
269
sg = sd->groups;
kernel/sched/ext_idle.c
282
struct sched_domain *sd;
kernel/sched/ext_idle.c
285
sd = rcu_dereference(per_cpu(sd_numa, cpu));
kernel/sched/ext_idle.c
286
if (!sd)
kernel/sched/ext_idle.c
288
sg = sd->groups;
kernel/sched/fair.c
10115
static void update_cpu_capacity(struct sched_domain *sd, int cpu)
kernel/sched/fair.c
10118
struct sched_group *sdg = sd->groups;
kernel/sched/fair.c
10131
void update_group_capacity(struct sched_domain *sd, int cpu)
kernel/sched/fair.c
10133
struct sched_domain *child = sd->child;
kernel/sched/fair.c
10134
struct sched_group *group, *sdg = sd->groups;
kernel/sched/fair.c
10138
interval = msecs_to_jiffies(sd->balance_interval);
kernel/sched/fair.c
10143
update_cpu_capacity(sd, cpu);
kernel/sched/fair.c
10192
check_cpu_capacity(struct rq *rq, struct sched_domain *sd)
kernel/sched/fair.c
10194
return ((rq->cpu_capacity * sd->imbalance_pct) <
kernel/sched/fair.c
10329
static bool sched_use_asym_prio(struct sched_domain *sd, int cpu)
kernel/sched/fair.c
10331
if (!(sd->flags & SD_ASYM_PACKING))
kernel/sched/fair.c
10337
return sd->flags & SD_SHARE_CPUCAPACITY || is_core_idle(cpu);
kernel/sched/fair.c
10340
static inline bool sched_asym(struct sched_domain *sd, int dst_cpu, int src_cpu)
kernel/sched/fair.c
10346
return sched_use_asym_prio(sd, dst_cpu) &&
kernel/sched/fair.c
10373
return sched_asym(env->sd, env->dst_cpu, READ_ONCE(group->asym_prefer_cpu));
kernel/sched/fair.c
10442
sched_reduced_capacity(struct rq *rq, struct sched_domain *sd)
kernel/sched/fair.c
10451
return check_cpu_capacity(rq, sd);
kernel/sched/fair.c
10470
int i, nr_running, local_group, sd_flags = env->sd->flags;
kernel/sched/fair.c
10471
bool balancing_at_rd = !env->sd->parent;
kernel/sched/fair.c
10521
} else if (env->idle && sched_reduced_capacity(rq, env->sd)) {
kernel/sched/fair.c
10541
sgs->group_type = group_classify(env->sd->imbalance_pct, group, sgs);
kernel/sched/fair.c
10579
if ((env->sd->flags & SD_ASYM_CPUCAPACITY) &&
kernel/sched/fair.c
10693
if ((env->sd->flags & SD_ASYM_CPUCAPACITY) &&
kernel/sched/fair.c
10783
static inline void update_sg_wakeup_stats(struct sched_domain *sd,
kernel/sched/fair.c
10793
if (sd->flags & SD_ASYM_CPUCAPACITY)
kernel/sched/fair.c
10816
if (sd->flags & SD_ASYM_CPUCAPACITY &&
kernel/sched/fair.c
10827
sgs->group_type = group_classify(sd->imbalance_pct, group, sgs);
kernel/sched/fair.c
10898
sched_balance_find_dst_group(struct sched_domain *sd, struct task_struct *p, int this_cpu)
kernel/sched/fair.c
10900
struct sched_group *idlest = NULL, *local = NULL, *group = sd->groups;
kernel/sched/fair.c
10931
update_sg_wakeup_stats(sd, group, sgs, p);
kernel/sched/fair.c
10938
} while (group = group->next, group != sd->groups);
kernel/sched/fair.c
10969
(sd->imbalance_pct-100) / 100;
kernel/sched/fair.c
10980
if ((sd->flags & SD_NUMA) &&
kernel/sched/fair.c
10991
if (100 * local_sgs.avg_load <= sd->imbalance_pct * idlest_sgs.avg_load)
kernel/sched/fair.c
11009
if (sd->flags & SD_NUMA) {
kernel/sched/fair.c
11010
int imb_numa_nr = sd->imb_numa_nr;
kernel/sched/fair.c
11036
imb_numa_nr = min(w, sd->imb_numa_nr);
kernel/sched/fair.c
11080
if (env->sd->span_weight != llc_weight)
kernel/sched/fair.c
11120
pct = env->sd->imbalance_pct;
kernel/sched/fair.c
11141
struct sched_group *sg = env->sd->groups;
kernel/sched/fair.c
11158
update_group_capacity(env->sd, env->dst_cpu);
kernel/sched/fair.c
11174
} while (sg != env->sd->groups);
kernel/sched/fair.c
11185
if (env->sd->flags & SD_NUMA)
kernel/sched/fair.c
11188
if (!env->sd->parent) {
kernel/sched/fair.c
11215
if (env->sd->flags & SD_ASYM_CPUCAPACITY) {
kernel/sched/fair.c
11265
!(env->sd->flags & SD_SHARE_LLC)) {
kernel/sched/fair.c
11313
if (env->sd->flags & SD_NUMA) {
kernel/sched/fair.c
11316
env->sd->imb_numa_nr);
kernel/sched/fair.c
11484
env->sd->imbalance_pct * local->avg_load)
kernel/sched/fair.c
11597
if (env->sd->flags & SD_ASYM_CPUCAPACITY &&
kernel/sched/fair.c
11609
if (sched_asym(env->sd, i, env->dst_cpu) && nr_running == 1)
kernel/sched/fair.c
11621
!check_cpu_capacity(rq, env->sd))
kernel/sched/fair.c
11705
return env->idle && sched_use_asym_prio(env->sd, env->dst_cpu) &&
kernel/sched/fair.c
11707
!sched_use_asym_prio(env->sd, env->src_cpu));
kernel/sched/fair.c
11713
struct sched_domain *sd = env->sd;
kernel/sched/fair.c
11721
(sd->nr_balance_failed > sd->cache_nice_tries+2))
kernel/sched/fair.c
11729
struct sched_domain *sd = env->sd;
kernel/sched/fair.c
11745
if ((check_cpu_capacity(env->src_rq, sd)) &&
kernel/sched/fair.c
11746
(capacity_of(env->src_cpu)*sd->imbalance_pct < capacity_of(env->dst_cpu)*100))
kernel/sched/fair.c
11761
struct sched_group *sg = env->sd->groups;
kernel/sched/fair.c
11795
if (!(env->sd->flags & SD_SHARE_CPUCAPACITY) && !is_core_idle(cpu)) {
kernel/sched/fair.c
11824
static void update_lb_imbalance_stat(struct lb_env *env, struct sched_domain *sd,
kernel/sched/fair.c
11832
__schedstat_add(sd->lb_imbalance_load[idle], env->imbalance);
kernel/sched/fair.c
11835
__schedstat_add(sd->lb_imbalance_util[idle], env->imbalance);
kernel/sched/fair.c
11838
__schedstat_add(sd->lb_imbalance_task[idle], env->imbalance);
kernel/sched/fair.c
11841
__schedstat_add(sd->lb_imbalance_misfit[idle], env->imbalance);
kernel/sched/fair.c
11866
struct sched_domain *sd, enum cpu_idle_type idle,
kernel/sched/fair.c
11870
struct sched_domain *sd_parent = sd->parent;
kernel/sched/fair.c
11876
.sd = sd,
kernel/sched/fair.c
11879
.dst_grpmask = group_balance_mask(sd->groups),
kernel/sched/fair.c
11888
cpumask_and(cpus, sched_domain_span(sd), cpu_active_mask);
kernel/sched/fair.c
11890
schedstat_inc(sd->lb_count[idle]);
kernel/sched/fair.c
11898
if (!need_unlock && (sd->flags & SD_SERIALIZE)) {
kernel/sched/fair.c
11908
schedstat_inc(sd->lb_nobusyg[idle]);
kernel/sched/fair.c
11914
schedstat_inc(sd->lb_nobusyq[idle]);
kernel/sched/fair.c
11920
update_lb_imbalance_stat(&env, sd, idle);
kernel/sched/fair.c
12037
schedstat_inc(sd->lb_failed[idle]);
kernel/sched/fair.c
12049
sd->nr_balance_failed++;
kernel/sched/fair.c
12090
sd->nr_balance_failed = 0;
kernel/sched/fair.c
12095
sd->balance_interval = sd->min_interval;
kernel/sched/fair.c
12119
schedstat_inc(sd->lb_balanced[idle]);
kernel/sched/fair.c
12121
sd->nr_balance_failed = 0;
kernel/sched/fair.c
12142
sd->balance_interval < MAX_PINNED_INTERVAL) ||
kernel/sched/fair.c
12143
sd->balance_interval < sd->max_interval)
kernel/sched/fair.c
12144
sd->balance_interval *= 2;
kernel/sched/fair.c
12153
get_sd_balance_interval(struct sched_domain *sd, int cpu_busy)
kernel/sched/fair.c
12155
unsigned long interval = sd->balance_interval;
kernel/sched/fair.c
12158
interval *= sd->busy_factor;
kernel/sched/fair.c
12177
update_next_balance(struct sched_domain *sd, unsigned long *next_balance)
kernel/sched/fair.c
12182
interval = get_sd_balance_interval(sd, 0);
kernel/sched/fair.c
12183
next = sd->last_balance + interval;
kernel/sched/fair.c
12201
struct sched_domain *sd;
kernel/sched/fair.c
12232
for_each_domain(target_cpu, sd) {
kernel/sched/fair.c
12233
if (cpumask_test_cpu(busiest_cpu, sched_domain_span(sd)))
kernel/sched/fair.c
12237
if (likely(sd)) {
kernel/sched/fair.c
12239
.sd = sd,
kernel/sched/fair.c
12248
schedstat_inc(sd->alb_count);
kernel/sched/fair.c
12253
schedstat_inc(sd->alb_pushed);
kernel/sched/fair.c
12255
sd->nr_balance_failed = 0;
kernel/sched/fair.c
12257
schedstat_inc(sd->alb_failed);
kernel/sched/fair.c
12282
static inline void update_newidle_stats(struct sched_domain *sd, unsigned int success)
kernel/sched/fair.c
12284
sd->newidle_call++;
kernel/sched/fair.c
12285
sd->newidle_success += success;
kernel/sched/fair.c
12287
if (sd->newidle_call >= 1024) {
kernel/sched/fair.c
12288
sd->newidle_ratio = sd->newidle_success;
kernel/sched/fair.c
12289
sd->newidle_call /= 2;
kernel/sched/fair.c
12290
sd->newidle_success /= 2;
kernel/sched/fair.c
12295
update_newidle_cost(struct sched_domain *sd, u64 cost, unsigned int success)
kernel/sched/fair.c
12297
unsigned long next_decay = sd->last_decay_max_lb_cost + HZ;
kernel/sched/fair.c
12301
update_newidle_stats(sd, success);
kernel/sched/fair.c
12303
if (cost > sd->max_newidle_lb_cost) {
kernel/sched/fair.c
12308
sd->max_newidle_lb_cost = cost;
kernel/sched/fair.c
12309
sd->last_decay_max_lb_cost = now;
kernel/sched/fair.c
12317
sd->max_newidle_lb_cost = (sd->max_newidle_lb_cost * 253) / 256;
kernel/sched/fair.c
12318
sd->last_decay_max_lb_cost = now;
kernel/sched/fair.c
12337
struct sched_domain *sd;
kernel/sched/fair.c
12345
for_each_domain(cpu, sd) {
kernel/sched/fair.c
12350
need_decay = update_newidle_cost(sd, 0, 0);
kernel/sched/fair.c
12351
max_cost += sd->max_newidle_lb_cost;
kernel/sched/fair.c
12364
interval = get_sd_balance_interval(sd, busy);
kernel/sched/fair.c
12365
if (time_after_eq(jiffies, sd->last_balance + interval)) {
kernel/sched/fair.c
12366
if (sched_balance_rq(cpu, rq, sd, idle, &continue_balancing)) {
kernel/sched/fair.c
12375
sd->last_balance = jiffies;
kernel/sched/fair.c
12376
interval = get_sd_balance_interval(sd, busy);
kernel/sched/fair.c
12378
if (time_after(next_balance, sd->last_balance + interval)) {
kernel/sched/fair.c
12379
next_balance = sd->last_balance + interval;
kernel/sched/fair.c
12405
return unlikely(!rcu_dereference_sched(rq->sd));
kernel/sched/fair.c
12488
struct sched_domain *sd;
kernel/sched/fair.c
12531
sd = rcu_dereference_all(rq->sd);
kernel/sched/fair.c
12532
if (sd) {
kernel/sched/fair.c
12537
if (rq->cfs.h_nr_runnable >= 1 && check_cpu_capacity(rq, sd)) {
kernel/sched/fair.c
12543
sd = rcu_dereference_all(per_cpu(sd_asym_packing, cpu));
kernel/sched/fair.c
12544
if (sd) {
kernel/sched/fair.c
12553
for_each_cpu_and(i, sched_domain_span(sd), nohz.idle_cpus_mask) {
kernel/sched/fair.c
12554
if (sched_asym(sd, i, cpu)) {
kernel/sched/fair.c
12561
sd = rcu_dereference_all(per_cpu(sd_asym_cpucapacity, cpu));
kernel/sched/fair.c
12562
if (sd) {
kernel/sched/fair.c
12611
struct sched_domain *sd;
kernel/sched/fair.c
12614
sd = rcu_dereference_all(per_cpu(sd_llc, cpu));
kernel/sched/fair.c
12616
if (!sd || !sd->nohz_idle)
kernel/sched/fair.c
12618
sd->nohz_idle = 0;
kernel/sched/fair.c
12620
atomic_inc(&sd->shared->nr_busy_cpus);
kernel/sched/fair.c
12640
struct sched_domain *sd;
kernel/sched/fair.c
12643
sd = rcu_dereference_all(per_cpu(sd_llc, cpu));
kernel/sched/fair.c
12645
if (!sd || sd->nohz_idle)
kernel/sched/fair.c
12647
sd->nohz_idle = 1;
kernel/sched/fair.c
12649
atomic_dec(&sd->shared->nr_busy_cpus);
kernel/sched/fair.c
12929
struct sched_domain *sd;
kernel/sched/fair.c
12962
sd = rcu_dereference_sched_domain(this_rq->sd);
kernel/sched/fair.c
12963
if (!sd)
kernel/sched/fair.c
12967
this_rq->avg_idle < sd->max_newidle_lb_cost) {
kernel/sched/fair.c
12969
update_next_balance(sd, &next_balance);
kernel/sched/fair.c
12984
for_each_domain(this_cpu, sd) {
kernel/sched/fair.c
12987
update_next_balance(sd, &next_balance);
kernel/sched/fair.c
12989
if (this_rq->avg_idle < curr_cost + sd->max_newidle_lb_cost)
kernel/sched/fair.c
12992
if (sd->flags & SD_BALANCE_NEWIDLE) {
kernel/sched/fair.c
13002
weight = 1 + sd->newidle_ratio;
kernel/sched/fair.c
13004
update_newidle_stats(sd, 0);
kernel/sched/fair.c
13011
sd, CPU_NEWLY_IDLE,
kernel/sched/fair.c
13023
update_newidle_cost(sd, domain_cost, weight * !!pulled_task);
kernel/sched/fair.c
2577
struct sched_domain *sd;
kernel/sched/fair.c
2592
sd = rcu_dereference_all(per_cpu(sd_numa, env.src_cpu));
kernel/sched/fair.c
2593
if (sd) {
kernel/sched/fair.c
2594
env.imbalance_pct = 100 + (sd->imbalance_pct - 100) / 2;
kernel/sched/fair.c
2595
env.imb_numa_nr = sd->imb_numa_nr;
kernel/sched/fair.c
2605
if (unlikely(!sd)) {
kernel/sched/fair.c
7377
wake_affine_weight(struct sched_domain *sd, struct task_struct *p,
kernel/sched/fair.c
7404
prev_eff_load *= 100 + (sd->imbalance_pct - 100) / 2;
kernel/sched/fair.c
7419
static int wake_affine(struct sched_domain *sd, struct task_struct *p,
kernel/sched/fair.c
7428
target = wake_affine_weight(sd, p, this_cpu, prev_cpu, sync);
kernel/sched/fair.c
7434
schedstat_inc(sd->ttwu_move_affine);
kernel/sched/fair.c
7440
sched_balance_find_dst_group(struct sched_domain *sd, struct task_struct *p, int this_cpu);
kernel/sched/fair.c
7502
static inline int sched_balance_find_dst_cpu(struct sched_domain *sd, struct task_struct *p,
kernel/sched/fair.c
7507
if (!cpumask_intersects(sched_domain_span(sd), p->cpus_ptr))
kernel/sched/fair.c
7517
while (sd) {
kernel/sched/fair.c
7522
if (!(sd->flags & sd_flag)) {
kernel/sched/fair.c
7523
sd = sd->child;
kernel/sched/fair.c
7527
group = sched_balance_find_dst_group(sd, p, cpu);
kernel/sched/fair.c
7529
sd = sd->child;
kernel/sched/fair.c
7536
sd = sd->child;
kernel/sched/fair.c
7542
weight = sd->span_weight;
kernel/sched/fair.c
7543
sd = NULL;
kernel/sched/fair.c
7548
sd = tmp;
kernel/sched/fair.c
7653
static int select_idle_smt(struct task_struct *p, struct sched_domain *sd, int target)
kernel/sched/fair.c
7664
if (!cpumask_test_cpu(cpu, sched_domain_span(sd)))
kernel/sched/fair.c
7689
static inline int select_idle_smt(struct task_struct *p, struct sched_domain *sd, int target)
kernel/sched/fair.c
7701
static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool has_idle_core, int target)
kernel/sched/fair.c
7707
cpumask_and(cpus, sched_domain_span(sd), p->cpus_ptr);
kernel/sched/fair.c
7721
struct sched_group *sg = sd->groups;
kernel/sched/fair.c
7771
select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target)
kernel/sched/fair.c
7779
cpumask_and(cpus, sched_domain_span(sd), p->cpus_ptr);
kernel/sched/fair.c
7839
struct sched_domain *sd;
kernel/sched/fair.c
7916
sd = rcu_dereference_all(per_cpu(sd_asym_cpucapacity, target));
kernel/sched/fair.c
7925
if (sd) {
kernel/sched/fair.c
7926
i = select_idle_capacity(p, sd, target);
kernel/sched/fair.c
7931
sd = rcu_dereference_all(per_cpu(sd_llc, target));
kernel/sched/fair.c
7932
if (!sd)
kernel/sched/fair.c
7939
i = select_idle_smt(p, sd, prev);
kernel/sched/fair.c
7945
i = select_idle_cpu(p, sd, has_idle_core, target);
kernel/sched/fair.c
8395
struct sched_domain *sd;
kernel/sched/fair.c
8408
sd = rcu_dereference_all(*this_cpu_ptr(&sd_asym_cpucapacity));
kernel/sched/fair.c
8409
while (sd && !cpumask_test_cpu(prev_cpu, sched_domain_span(sd)))
kernel/sched/fair.c
8410
sd = sd->parent;
kernel/sched/fair.c
8411
if (!sd)
kernel/sched/fair.c
8446
if (!cpumask_test_cpu(cpu, sched_domain_span(sd)))
kernel/sched/fair.c
8583
struct sched_domain *tmp, *sd = NULL;
kernel/sched/fair.c
8622
sd = NULL; /* Prefer wake_affine over balance flags */
kernel/sched/fair.c
8632
sd = tmp;
kernel/sched/fair.c
8637
if (unlikely(sd)) {
kernel/sched/fair.c
8639
new_cpu = sched_balance_find_dst_cpu(sd, p, cpu, prev_cpu, sd_flag);
kernel/sched/fair.c
9326
struct sched_domain *sd;
kernel/sched/fair.c
9368
if (env->sd->flags & SD_SHARE_CPUCAPACITY)
kernel/sched/fair.c
9411
if (!p->numa_faults || !(env->sd->flags & SD_NUMA))
kernel/sched/fair.c
9513
if (!env->sd->nr_balance_failed &&
kernel/sched/fair.c
9581
if (!hot || env->sd->nr_balance_failed > env->sd->cache_nice_tries) {
kernel/sched/fair.c
9600
schedstat_inc(env->sd->lb_hot_gained[env->idle]);
kernel/sched/fair.c
9636
schedstat_inc(env->sd->lb_gained[env->idle]);
kernel/sched/fair.c
9706
load < 16 && !env->sd->nr_balance_failed)
kernel/sched/fair.c
9715
if (shr_bound(load, env->sd->nr_balance_failed) > env->imbalance)
kernel/sched/fair.c
9724
if (shr_bound(util, env->sd->nr_balance_failed) > env->imbalance)
kernel/sched/fair.c
9778
schedstat_add(env->sd->lb_gained[env->idle], detached);
kernel/sched/rt.c
1765
struct sched_domain *sd;
kernel/sched/rt.c
1815
for_each_domain(cpu, sd) {
kernel/sched/rt.c
1816
if (sd->flags & SD_WAKE_AFFINE) {
kernel/sched/rt.c
1824
cpumask_test_cpu(this_cpu, sched_domain_span(sd))) {
kernel/sched/rt.c
1830
sched_domain_span(sd));
kernel/sched/sched.h
1234
struct sched_domain __rcu *sd;
kernel/sched/sched.h
2097
for (__sd = rcu_dereference_sched_domain(cpu_rq(cpu)->sd); \
kernel/sched/sched.h
2119
struct sched_domain *sd, *hsd = NULL;
kernel/sched/sched.h
2121
for_each_domain(cpu, sd) {
kernel/sched/sched.h
2122
if (sd->flags & flag) {
kernel/sched/sched.h
2123
hsd = sd;
kernel/sched/sched.h
2140
struct sched_domain *sd;
kernel/sched/sched.h
2142
for_each_domain(cpu, sd) {
kernel/sched/sched.h
2143
if (sd->flags & flag)
kernel/sched/sched.h
2147
return sd;
kernel/sched/sched.h
2794
extern void update_group_capacity(struct sched_domain *sd, int cpu);
kernel/sched/stats.c
118
struct sched_domain *sd;
kernel/sched/stats.c
136
for_each_domain(cpu, sd) {
kernel/sched/stats.c
139
seq_printf(seq, "domain%d %s %*pb", dcount++, sd->name,
kernel/sched/stats.c
140
cpumask_pr_args(sched_domain_span(sd)));
kernel/sched/stats.c
143
sd->lb_count[itype],
kernel/sched/stats.c
144
sd->lb_balanced[itype],
kernel/sched/stats.c
145
sd->lb_failed[itype],
kernel/sched/stats.c
146
sd->lb_imbalance_load[itype],
kernel/sched/stats.c
147
sd->lb_imbalance_util[itype],
kernel/sched/stats.c
148
sd->lb_imbalance_task[itype],
kernel/sched/stats.c
149
sd->lb_imbalance_misfit[itype],
kernel/sched/stats.c
150
sd->lb_gained[itype],
kernel/sched/stats.c
151
sd->lb_hot_gained[itype],
kernel/sched/stats.c
152
sd->lb_nobusyq[itype],
kernel/sched/stats.c
153
sd->lb_nobusyg[itype]);
kernel/sched/stats.c
157
sd->alb_count, sd->alb_failed, sd->alb_pushed,
kernel/sched/stats.c
158
sd->sbe_count, sd->sbe_balanced, sd->sbe_pushed,
kernel/sched/stats.c
159
sd->sbf_count, sd->sbf_balanced, sd->sbf_pushed,
kernel/sched/stats.c
160
sd->ttwu_wake_remote, sd->ttwu_move_affine,
kernel/sched/stats.c
161
sd->ttwu_move_balance);
kernel/sched/topology.c
1005
find_descended_sibling(struct sched_domain *sd, struct sched_domain *sibling)
kernel/sched/topology.c
1013
sched_domain_span(sd)))
kernel/sched/topology.c
1030
build_overlap_sched_groups(struct sched_domain *sd, int cpu)
kernel/sched/topology.c
1033
const struct cpumask *span = sched_domain_span(sd);
kernel/sched/topology.c
1035
struct sd_data *sdd = sd->private;
kernel/sched/topology.c
1047
sibling = *per_cpu_ptr(sdd->sd, i);
kernel/sched/topology.c
105
if ((sd->flags & SD_NUMA) &&
kernel/sched/topology.c
1095
sibling = find_descended_sibling(sd, sibling);
kernel/sched/topology.c
1113
sd->groups = first;
kernel/sched/topology.c
114
if (group == sd->groups && sd->child &&
kernel/sched/topology.c
115
!cpumask_equal(sched_domain_span(sd->child),
kernel/sched/topology.c
1197
struct sched_domain *sd = *per_cpu_ptr(sdd->sd, cpu);
kernel/sched/topology.c
1198
struct sched_domain *child = sd->child;
kernel/sched/topology.c
124
if (group != sd->groups)
kernel/sched/topology.c
1241
build_sched_groups(struct sched_domain *sd, int cpu)
kernel/sched/topology.c
1244
struct sd_data *sdd = sd->private;
kernel/sched/topology.c
1245
const struct cpumask *span = sched_domain_span(sd);
kernel/sched/topology.c
127
} while (group != sd->groups);
kernel/sched/topology.c
1271
sd->groups = first;
kernel/sched/topology.c
1286
static void init_sched_groups_capacity(int cpu, struct sched_domain *sd)
kernel/sched/topology.c
1288
struct sched_group *sg = sd->groups;
kernel/sched/topology.c
130
if (!cpumask_equal(sched_domain_span(sd), groupmask))
kernel/sched/topology.c
1307
if (!(sd->flags & SD_ASYM_PACKING))
kernel/sched/topology.c
1320
} while (sg != sd->groups);
kernel/sched/topology.c
1325
update_group_capacity(sd, cpu);
kernel/sched/topology.c
133
if (sd->parent &&
kernel/sched/topology.c
1332
struct sched_domain *sd;
kernel/sched/topology.c
1336
for_each_domain(cpu, sd) {
kernel/sched/topology.c
134
!cpumask_subset(groupmask, sched_domain_span(sd->parent)))
kernel/sched/topology.c
1340
if (!(sd->flags & SD_ASYM_PACKING))
kernel/sched/topology.c
1352
WARN_ON_ONCE(sd->flags & SD_NUMA);
kernel/sched/topology.c
1354
sg = sd->groups;
kernel/sched/topology.c
139
static void sched_domain_debug(struct sched_domain *sd, int cpu)
kernel/sched/topology.c
146
if (!sd) {
kernel/sched/topology.c
1516
static void set_domain_attribute(struct sched_domain *sd,
kernel/sched/topology.c
1528
if (sd->level >= request) {
kernel/sched/topology.c
1530
sd->flags &= ~(SD_BALANCE_WAKE|SD_BALANCE_NEWIDLE);
kernel/sched/topology.c
154
if (sched_domain_debug_one(sd, cpu, level, sched_domains_tmpmask))
kernel/sched/topology.c
1546
free_percpu(d->sd);
kernel/sched/topology.c
1563
d->sd = alloc_percpu(struct sched_domain *);
kernel/sched/topology.c
1564
if (!d->sd)
kernel/sched/topology.c
157
sd = sd->parent;
kernel/sched/topology.c
1578
static void claim_allocations(int cpu, struct sched_domain *sd)
kernel/sched/topology.c
158
if (!sd)
kernel/sched/topology.c
1580
struct sd_data *sdd = sd->private;
kernel/sched/topology.c
1582
WARN_ON_ONCE(*per_cpu_ptr(sdd->sd, cpu) != sd);
kernel/sched/topology.c
1583
*per_cpu_ptr(sdd->sd, cpu) = NULL;
kernel/sched/topology.c
1642
struct sched_domain *sd = *per_cpu_ptr(sdd->sd, cpu);
kernel/sched/topology.c
1654
*sd = (struct sched_domain){
kernel/sched/topology.c
1689
sd_span = sched_domain_span(sd);
kernel/sched/topology.c
1693
sd->flags |= asym_cpu_capacity_classify(sd_span, cpu_map);
kernel/sched/topology.c
1695
WARN_ONCE((sd->flags & (SD_SHARE_CPUCAPACITY | SD_ASYM_CPUCAPACITY)) ==
kernel/sched/topology.c
170
static int sd_degenerate(struct sched_domain *sd)
kernel/sched/topology.c
1703
if ((sd->flags & SD_ASYM_CPUCAPACITY) && sd->child)
kernel/sched/topology.c
1704
sd->child->flags &= ~SD_PREFER_SIBLING;
kernel/sched/topology.c
1706
if (sd->flags & SD_SHARE_CPUCAPACITY) {
kernel/sched/topology.c
1707
sd->imbalance_pct = 110;
kernel/sched/topology.c
1709
} else if (sd->flags & SD_SHARE_LLC) {
kernel/sched/topology.c
1710
sd->imbalance_pct = 117;
kernel/sched/topology.c
1711
sd->cache_nice_tries = 1;
kernel/sched/topology.c
1714
} else if (sd->flags & SD_NUMA) {
kernel/sched/topology.c
1715
sd->cache_nice_tries = 2;
kernel/sched/topology.c
1717
sd->flags &= ~SD_PREFER_SIBLING;
kernel/sched/topology.c
1718
sd->flags |= SD_SERIALIZE;
kernel/sched/topology.c
172
if (cpumask_weight(sched_domain_span(sd)) == 1)
kernel/sched/topology.c
1720
sd->flags &= ~(SD_BALANCE_EXEC |
kernel/sched/topology.c
1727
sd->cache_nice_tries = 1;
kernel/sched/topology.c
1734
if (sd->flags & SD_SHARE_LLC) {
kernel/sched/topology.c
1735
sd->shared = *per_cpu_ptr(sdd->sds, sd_id);
kernel/sched/topology.c
1736
atomic_inc(&sd->shared->ref);
kernel/sched/topology.c
1737
atomic_set(&sd->shared->nr_busy_cpus, sd_weight);
kernel/sched/topology.c
1740
sd->private = sdd;
kernel/sched/topology.c
1742
return sd;
kernel/sched/topology.c
176
if ((sd->flags & SD_DEGENERATE_GROUPS_MASK) &&
kernel/sched/topology.c
177
(sd->groups != sd->groups->next))
kernel/sched/topology.c
181
if (sd->flags & (SD_WAKE_AFFINE))
kernel/sched/topology.c
188
sd_parent_degenerate(struct sched_domain *sd, struct sched_domain *parent)
kernel/sched/topology.c
190
unsigned long cflags = sd->flags, pflags = parent->flags;
kernel/sched/topology.c
195
if (!cpumask_equal(sched_domain_span(sd), sched_domain_span(parent)))
kernel/sched/topology.c
2371
sdd->sd = alloc_percpu(struct sched_domain *);
kernel/sched/topology.c
2372
if (!sdd->sd)
kernel/sched/topology.c
2388
struct sched_domain *sd;
kernel/sched/topology.c
2393
sd = kzalloc_node(sizeof(struct sched_domain) + cpumask_size(),
kernel/sched/topology.c
2395
if (!sd)
kernel/sched/topology.c
2398
*per_cpu_ptr(sdd->sd, j) = sd;
kernel/sched/topology.c
2439
struct sched_domain *sd;
kernel/sched/topology.c
2441
if (sdd->sd) {
kernel/sched/topology.c
2442
sd = *per_cpu_ptr(sdd->sd, j);
kernel/sched/topology.c
2443
if (sd && (sd->flags & SD_NUMA))
kernel/sched/topology.c
2444
free_sched_groups(sd->groups, 0);
kernel/sched/topology.c
2445
kfree(*per_cpu_ptr(sdd->sd, j));
kernel/sched/topology.c
2455
free_percpu(sdd->sd);
kernel/sched/topology.c
2456
sdd->sd = NULL;
kernel/sched/topology.c
2470
struct sched_domain *sd = sd_init(tl, cpu_map, child, cpu);
kernel/sched/topology.c
2473
sd->level = child->level + 1;
kernel/sched/topology.c
2474
sched_domain_level_max = max(sched_domain_level_max, sd->level);
kernel/sched/topology.c
2475
child->parent = sd;
kernel/sched/topology.c
2478
sched_domain_span(sd))) {
kernel/sched/topology.c
2481
child->name, sd->name);
kernel/sched/topology.c
2483
cpumask_or(sched_domain_span(sd),
kernel/sched/topology.c
2484
sched_domain_span(sd),
kernel/sched/topology.c
2489
set_domain_attribute(sd, attr);
kernel/sched/topology.c
2491
return sd;
kernel/sched/topology.c
2559
struct sched_domain *sd;
kernel/sched/topology.c
2577
sd = NULL;
kernel/sched/topology.c
2580
sd = build_sched_domain(tl, cpu_map, attr, sd, i);
kernel/sched/topology.c
2582
has_asym |= sd->flags & SD_ASYM_CPUCAPACITY;
kernel/sched/topology.c
2585
*per_cpu_ptr(d.sd, i) = sd;
kernel/sched/topology.c
2586
if (cpumask_equal(cpu_map, sched_domain_span(sd)))
kernel/sched/topology.c
2596
for (sd = *per_cpu_ptr(d.sd, i); sd; sd = sd->parent) {
kernel/sched/topology.c
2597
sd->span_weight = cpumask_weight(sched_domain_span(sd));
kernel/sched/topology.c
2598
if (sd->flags & SD_NUMA) {
kernel/sched/topology.c
2599
if (build_overlap_sched_groups(sd, i))
kernel/sched/topology.c
2602
if (build_sched_groups(sd, i))
kernel/sched/topology.c
2616
for (sd = *per_cpu_ptr(d.sd, i); sd; sd = sd->parent) {
kernel/sched/topology.c
2617
struct sched_domain *child = sd->child;
kernel/sched/topology.c
2619
if (!(sd->flags & SD_SHARE_LLC) && child &&
kernel/sched/topology.c
2644
nr_llcs = sd->span_weight / child->span_weight;
kernel/sched/topology.c
2646
imb = sd->span_weight >> 3;
kernel/sched/topology.c
2650
sd->imb_numa_nr = imb;
kernel/sched/topology.c
2653
top_p = sd->parent;
kernel/sched/topology.c
2657
imb_span = top_p ? top_p->span_weight : sd->span_weight;
kernel/sched/topology.c
2659
int factor = max(1U, (sd->span_weight / imb_span));
kernel/sched/topology.c
2661
sd->imb_numa_nr = imb * factor;
kernel/sched/topology.c
2671
for (sd = *per_cpu_ptr(d.sd, i); sd; sd = sd->parent) {
kernel/sched/topology.c
2672
claim_allocations(i, sd);
kernel/sched/topology.c
2673
init_sched_groups_capacity(i, sd);
kernel/sched/topology.c
2681
sd = *per_cpu_ptr(d.sd, i);
kernel/sched/topology.c
2683
cpu_attach_domain(sd, d.rd, i);
kernel/sched/topology.c
43
static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
kernel/sched/topology.c
46
struct sched_group *group = sd->groups;
kernel/sched/topology.c
47
unsigned long flags = sd->flags;
kernel/sched/topology.c
54
cpumask_pr_args(sched_domain_span(sd)), sd->name);
kernel/sched/topology.c
56
if (!cpumask_test_cpu(cpu, sched_domain_span(sd))) {
kernel/sched/topology.c
624
static void destroy_sched_domain(struct sched_domain *sd)
kernel/sched/topology.c
631
free_sched_groups(sd->groups, 1);
kernel/sched/topology.c
633
if (sd->shared && atomic_dec_and_test(&sd->shared->ref))
kernel/sched/topology.c
634
kfree(sd->shared);
kernel/sched/topology.c
635
kfree(sd);
kernel/sched/topology.c
640
struct sched_domain *sd = container_of(rcu, struct sched_domain, rcu);
kernel/sched/topology.c
642
while (sd) {
kernel/sched/topology.c
643
struct sched_domain *parent = sd->parent;
kernel/sched/topology.c
644
destroy_sched_domain(sd);
kernel/sched/topology.c
645
sd = parent;
kernel/sched/topology.c
649
static void destroy_sched_domains(struct sched_domain *sd)
kernel/sched/topology.c
651
if (sd)
kernel/sched/topology.c
652
call_rcu(&sd->rcu, destroy_sched_domains_rcu);
kernel/sched/topology.c
67
if ((meta_flags & SDF_SHARED_CHILD) && sd->child &&
kernel/sched/topology.c
679
struct sched_domain *sd;
kernel/sched/topology.c
68
!(sd->child->flags & flag))
kernel/sched/topology.c
683
sd = highest_flag_domain(cpu, SD_SHARE_LLC);
kernel/sched/topology.c
684
if (sd) {
kernel/sched/topology.c
685
id = cpumask_first(sched_domain_span(sd));
kernel/sched/topology.c
686
size = cpumask_weight(sched_domain_span(sd));
kernel/sched/topology.c
687
sds = sd->shared;
kernel/sched/topology.c
690
rcu_assign_pointer(per_cpu(sd_llc, cpu), sd);
kernel/sched/topology.c
695
sd = lowest_flag_domain(cpu, SD_CLUSTER);
kernel/sched/topology.c
696
if (sd)
kernel/sched/topology.c
697
id = cpumask_first(sched_domain_span(sd));
kernel/sched/topology.c
706
sd = lowest_flag_domain(cpu, SD_NUMA);
kernel/sched/topology.c
707
rcu_assign_pointer(per_cpu(sd_numa, cpu), sd);
kernel/sched/topology.c
709
sd = highest_flag_domain(cpu, SD_ASYM_PACKING);
kernel/sched/topology.c
710
rcu_assign_pointer(per_cpu(sd_asym_packing, cpu), sd);
kernel/sched/topology.c
712
sd = lowest_flag_domain(cpu, SD_ASYM_CPUCAPACITY_FULL);
kernel/sched/topology.c
713
rcu_assign_pointer(per_cpu(sd_asym_cpucapacity, cpu), sd);
kernel/sched/topology.c
72
if ((meta_flags & SDF_SHARED_PARENT) && sd->parent &&
kernel/sched/topology.c
721
cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)
kernel/sched/topology.c
727
for (tmp = sd; tmp; ) {
kernel/sched/topology.c
73
!(sd->parent->flags & flag))
kernel/sched/topology.c
752
if (sd && sd_degenerate(sd)) {
kernel/sched/topology.c
753
tmp = sd;
kernel/sched/topology.c
754
sd = sd->parent;
kernel/sched/topology.c
756
if (sd) {
kernel/sched/topology.c
757
struct sched_group *sg = sd->groups;
kernel/sched/topology.c
766
} while (sg != sd->groups);
kernel/sched/topology.c
768
sd->child = NULL;
kernel/sched/topology.c
772
sched_domain_debug(sd, cpu);
kernel/sched/topology.c
775
tmp = rq->sd;
kernel/sched/topology.c
776
rcu_assign_pointer(rq->sd, sd);
kernel/sched/topology.c
784
struct sched_domain * __percpu *sd;
kernel/sched/topology.c
916
build_balance_mask(struct sched_domain *sd, struct sched_group *sg, struct cpumask *mask)
kernel/sched/topology.c
919
struct sd_data *sdd = sd->private;
kernel/sched/topology.c
92
if (!(sd->flags & SD_NUMA) &&
kernel/sched/topology.c
926
sibling = *per_cpu_ptr(sdd->sd, i);
kernel/sched/topology.c
953
build_group_from_child_sched_domain(struct sched_domain *sd, int cpu)
kernel/sched/topology.c
965
if (sd->child) {
kernel/sched/topology.c
966
cpumask_copy(sg_span, sched_domain_span(sd->child));
kernel/sched/topology.c
967
sg->flags = sd->child->flags;
kernel/sched/topology.c
969
cpumask_copy(sg_span, sched_domain_span(sd));
kernel/sched/topology.c
976
static void init_overlap_sched_group(struct sched_domain *sd,
kernel/sched/topology.c
980
struct sd_data *sdd = sd->private;
kernel/sched/topology.c
984
build_balance_mask(sd, sg, mask);
kernel/seccomp.c
1165
const struct seccomp_data *sd)
kernel/seccomp.c
1180
n.data = sd;
kernel/seccomp.c
1262
struct seccomp_data sd;
kernel/seccomp.c
1272
populate_seccomp_data(&sd);
kernel/seccomp.c
1274
filter_ret = seccomp_run_filters(&sd, &match);
kernel/seccomp.c
1338
if (seccomp_do_user_notification(this_syscall, match, &sd))
kernel/seccomp.c
178
const struct seccomp_data *sd)
kernel/seccomp.c
244
static void populate_seccomp_data(struct seccomp_data *sd)
kernel/seccomp.c
254
sd->nr = syscall_get_nr(task, regs);
kernel/seccomp.c
255
sd->arch = syscall_get_arch(task);
kernel/seccomp.c
257
sd->args[0] = args[0];
kernel/seccomp.c
258
sd->args[1] = args[1];
kernel/seccomp.c
259
sd->args[2] = args[2];
kernel/seccomp.c
260
sd->args[3] = args[3];
kernel/seccomp.c
261
sd->args[4] = args[4];
kernel/seccomp.c
262
sd->args[5] = args[5];
kernel/seccomp.c
263
sd->instruction_pointer = KSTK_EIP(task);
kernel/seccomp.c
368
const struct seccomp_data *sd)
kernel/seccomp.c
370
int syscall_nr = sd->nr;
kernel/seccomp.c
379
if (likely(sd->arch == SECCOMP_ARCH_NATIVE))
kernel/seccomp.c
383
if (likely(sd->arch == SECCOMP_ARCH_COMPAT))
kernel/seccomp.c
404
static u32 seccomp_run_filters(const struct seccomp_data *sd,
kernel/seccomp.c
416
if (seccomp_cache_check_allow(f, sd))
kernel/seccomp.c
424
u32 cur_ret = bpf_prog_run_pin_on_cpu(f->prog, sd);
kernel/seccomp.c
744
static bool seccomp_uprobe_exception(struct seccomp_data *sd)
kernel/seccomp.c
748
if (sd->arch == SECCOMP_ARCH_NATIVE)
kernel/seccomp.c
752
if (sd->nr == __NR_uretprobe)
kernel/seccomp.c
756
if (sd->nr == __NR_uprobe)
kernel/seccomp.c
771
struct seccomp_data *sd)
kernel/seccomp.c
781
if (seccomp_uprobe_exception(sd))
kernel/seccomp.c
793
reg_value = sd->nr;
kernel/seccomp.c
796
reg_value = sd->arch;
kernel/seccomp.c
852
struct seccomp_data sd;
kernel/seccomp.c
868
sd.nr = nr;
kernel/seccomp.c
869
sd.arch = arch;
kernel/seccomp.c
872
if (seccomp_is_const_allow(fprog, &sd))
kernel/trace/bpf_trace.c
617
struct perf_sample_data *sd)
kernel/trace/bpf_trace.c
642
perf_sample_save_raw_data(sd, event, raw);
kernel/trace/bpf_trace.c
644
return perf_event_output(event, sd, regs);
kernel/trace/bpf_trace.c
667
struct perf_sample_data *sd;
kernel/trace/bpf_trace.c
679
sd = &sds->sds[nest_level - 1];
kernel/trace/bpf_trace.c
686
perf_sample_data_init(sd, 0, 0);
kernel/trace/bpf_trace.c
688
err = __bpf_perf_event_output(regs, map, flags, &raw, sd);
kernel/trace/bpf_trace.c
730
struct perf_sample_data *sd;
kernel/trace/bpf_trace.c
742
sd = this_cpu_ptr(&bpf_misc_sds.sds[nest_level - 1]);
kernel/trace/bpf_trace.c
746
perf_sample_data_init(sd, 0, 0);
kernel/trace/bpf_trace.c
748
ret = __bpf_perf_event_output(regs, map, flags, &raw, sd);
lib/kobject.c
100
sysfs_enable_ns(kobj->sd);
lib/kobject.c
588
struct kernfs_node *sd;
lib/kobject.c
591
sd = kobj->sd;
lib/kobject.c
605
sysfs_put(sd);
lib/kobject.c
89
sysfs_get(kobj->sd);
net/core/dev.c
12705
struct softnet_data *sd, *oldsd, *remsd = NULL;
net/core/dev.c
12709
sd = &per_cpu(softnet_data, cpu);
net/core/dev.c
12713
list_skb = &sd->completion_queue;
net/core/dev.c
12722
*sd->output_queue_tailp = oldsd->output_queue;
net/core/dev.c
12723
sd->output_queue_tailp = oldsd->output_queue_tailp;
net/core/dev.c
12740
____napi_schedule(sd, napi);
net/core/dev.c
13187
struct softnet_data *sd = per_cpu_ptr(&softnet_data, cpu);
net/core/dev.c
13188
struct napi_struct *napi = &sd->backlog;
net/core/dev.c
13195
struct softnet_data *sd = per_cpu_ptr(&softnet_data, cpu);
net/core/dev.c
13197
napi_threaded_poll_loop(&sd->backlog, NULL);
net/core/dev.c
13202
struct softnet_data *sd = per_cpu_ptr(&softnet_data, cpu);
net/core/dev.c
13203
struct napi_struct *napi = &sd->backlog;
net/core/dev.c
13250
struct softnet_data *sd = &per_cpu(softnet_data, i);
net/core/dev.c
13252
skb_queue_head_init(&sd->input_pkt_queue);
net/core/dev.c
13253
skb_queue_head_init(&sd->process_queue);
net/core/dev.c
13255
skb_queue_head_init(&sd->xfrm_backlog);
net/core/dev.c
13257
INIT_LIST_HEAD(&sd->poll_list);
net/core/dev.c
13258
sd->output_queue_tailp = &sd->output_queue;
net/core/dev.c
13260
INIT_CSD(&sd->csd, rps_trigger_softirq, sd);
net/core/dev.c
13261
sd->cpu = i;
net/core/dev.c
13263
INIT_CSD(&sd->defer_csd, trigger_rx_softirq, sd);
net/core/dev.c
13265
gro_init(&sd->backlog.gro);
net/core/dev.c
13266
sd->backlog.poll = process_backlog;
net/core/dev.c
13267
sd->backlog.weight = weight_p;
net/core/dev.c
13268
INIT_LIST_HEAD(&sd->backlog.poll_list);
net/core/dev.c
231
static inline void backlog_lock_irq_save(struct softnet_data *sd,
net/core/dev.c
235
spin_lock_irqsave(&sd->input_pkt_queue.lock, *flags);
net/core/dev.c
239
spin_lock(&sd->input_pkt_queue.lock);
net/core/dev.c
243
static inline void backlog_lock_irq_disable(struct softnet_data *sd)
net/core/dev.c
246
spin_lock_irq(&sd->input_pkt_queue.lock);
net/core/dev.c
251
static inline void backlog_unlock_irq_restore(struct softnet_data *sd,
net/core/dev.c
255
spin_unlock_irqrestore(&sd->input_pkt_queue.lock, flags);
net/core/dev.c
258
spin_unlock(&sd->input_pkt_queue.lock);
net/core/dev.c
263
static inline void backlog_unlock_irq_enable(struct softnet_data *sd)
net/core/dev.c
266
spin_unlock_irq(&sd->input_pkt_queue.lock);
net/core/dev.c
3382
struct softnet_data *sd;
net/core/dev.c
3386
sd = this_cpu_ptr(&softnet_data);
net/core/dev.c
3388
*sd->output_queue_tailp = q;
net/core/dev.c
3389
sd->output_queue_tailp = &q->next_sched;
net/core/dev.c
4942
static inline void ____napi_schedule(struct softnet_data *sd,
net/core/dev.c
4969
list_add_tail(&napi->poll_list, &sd->poll_list);
net/core/dev.c
4974
if (!sd->in_net_rx_action)
net/core/dev.c
5228
struct softnet_data *sd = data;
net/core/dev.c
5230
____napi_schedule(sd, &sd->backlog);
net/core/dev.c
5232
WRITE_ONCE(sd->received_rps, sd->received_rps + 1);
net/core/dev.c
5240
struct softnet_data *sd = data;
net/core/dev.c
5243
smp_store_release(&sd->defer_ipi_scheduled, 0);
net/core/dev.c
5256
static void napi_schedule_rps(struct softnet_data *sd)
net/core/dev.c
5261
if (sd != mysd) {
net/core/dev.c
5263
__napi_schedule_irqoff(&sd->backlog);
net/core/dev.c
5267
sd->rps_ipi_next = mysd->rps_ipi_list;
net/core/dev.c
5268
mysd->rps_ipi_list = sd;
net/core/dev.c
5283
struct softnet_data *sd = &per_cpu(softnet_data, cpu);
net/core/dev.c
5287
backlog_lock_irq_save(sd, &flags);
net/core/dev.c
5289
if (!__test_and_set_bit(NAPI_STATE_SCHED, &sd->backlog.state))
net/core/dev.c
5290
__napi_schedule_irqoff(&sd->backlog);
net/core/dev.c
5292
backlog_unlock_irq_restore(sd, flags);
net/core/dev.c
5294
} else if (!cmpxchg(&sd->defer_ipi_scheduled, 0, 1)) {
net/core/dev.c
5295
smp_call_function_single_async(cpu, &sd->defer_csd);
net/core/dev.c
5308
const struct softnet_data *sd;
net/core/dev.c
5314
sd = this_cpu_ptr(&softnet_data);
net/core/dev.c
5317
fl = rcu_dereference(sd->flow_limit);
net/core/dev.c
5349
struct softnet_data *sd;
net/core/dev.c
5359
sd = &per_cpu(softnet_data, cpu);
net/core/dev.c
5361
qlen = skb_queue_len_lockless(&sd->input_pkt_queue);
net/core/dev.c
5366
backlog_lock_irq_save(sd, &flags);
net/core/dev.c
5367
qlen = skb_queue_len(&sd->input_pkt_queue);
net/core/dev.c
5374
&sd->backlog.state))
net/core/dev.c
5375
napi_schedule_rps(sd);
net/core/dev.c
5377
__skb_queue_tail(&sd->input_pkt_queue, skb);
net/core/dev.c
5378
tail = rps_input_queue_tail_incr(sd);
net/core/dev.c
5379
backlog_unlock_irq_restore(sd, flags);
net/core/dev.c
5386
backlog_unlock_irq_restore(sd, flags);
net/core/dev.c
5390
numa_drop_add(&sd->drop_counters, 1);
net/core/dev.c
5754
struct softnet_data *sd = this_cpu_ptr(&softnet_data);
net/core/dev.c
5756
if (sd->completion_queue) {
net/core/dev.c
5760
clist = sd->completion_queue;
net/core/dev.c
5761
sd->completion_queue = NULL;
net/core/dev.c
5784
if (sd->output_queue) {
net/core/dev.c
5788
head = sd->output_queue;
net/core/dev.c
5789
sd->output_queue = NULL;
net/core/dev.c
5790
sd->output_queue_tailp = &sd->output_queue;
net/core/dev.c
5834
xfrm_dev_backlog(sd);
net/core/dev.c
6476
struct softnet_data *sd;
net/core/dev.c
6480
sd = this_cpu_ptr(&softnet_data);
net/core/dev.c
6482
backlog_lock_irq_disable(sd);
net/core/dev.c
6483
skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) {
net/core/dev.c
6485
__skb_unlink(skb, &sd->input_pkt_queue);
net/core/dev.c
6487
rps_input_queue_head_incr(sd);
net/core/dev.c
6490
backlog_unlock_irq_enable(sd);
net/core/dev.c
6493
skb_queue_walk_safe(&sd->process_queue, skb, tmp) {
net/core/dev.c
6495
__skb_unlink(skb, &sd->process_queue);
net/core/dev.c
6497
rps_input_queue_head_incr(sd);
net/core/dev.c
6509
struct softnet_data *sd = &per_cpu(softnet_data, cpu);
net/core/dev.c
6512
backlog_lock_irq_disable(sd);
net/core/dev.c
6517
do_flush = !skb_queue_empty(&sd->input_pkt_queue) ||
net/core/dev.c
6518
!skb_queue_empty_lockless(&sd->process_queue);
net/core/dev.c
6519
backlog_unlock_irq_enable(sd);
net/core/dev.c
6597
static void net_rps_action_and_irq_enable(struct softnet_data *sd)
net/core/dev.c
6600
struct softnet_data *remsd = sd->rps_ipi_list;
net/core/dev.c
6603
sd->rps_ipi_list = NULL;
net/core/dev.c
6614
static bool sd_has_rps_ipi_waiting(struct softnet_data *sd)
net/core/dev.c
6617
return !use_backlog_threads() && sd->rps_ipi_list;
net/core/dev.c
6625
struct softnet_data *sd = container_of(napi, struct softnet_data, backlog);
net/core/dev.c
6632
if (sd_has_rps_ipi_waiting(sd)) {
net/core/dev.c
6634
net_rps_action_and_irq_enable(sd);
net/core/dev.c
6642
while ((skb = __skb_dequeue(&sd->process_queue))) {
net/core/dev.c
6648
rps_input_queue_head_add(sd, work);
net/core/dev.c
6656
backlog_lock_irq_disable(sd);
net/core/dev.c
6657
if (skb_queue_empty(&sd->input_pkt_queue)) {
net/core/dev.c
6670
skb_queue_splice_tail_init(&sd->input_pkt_queue,
net/core/dev.c
6671
&sd->process_queue);
net/core/dev.c
6674
backlog_unlock_irq_enable(sd);
net/core/dev.c
6678
rps_input_queue_head_add(sd, work);
net/core/dev.c
7816
struct softnet_data *sd;
net/core/dev.c
7825
sd = this_cpu_ptr(&softnet_data);
net/core/dev.c
7826
sd->in_napi_threaded_poll = true;
net/core/dev.c
7832
sd->in_napi_threaded_poll = false;
net/core/dev.c
7835
if (sd_has_rps_ipi_waiting(sd)) {
net/core/dev.c
7837
net_rps_action_and_irq_enable(sd);
net/core/dev.c
7892
struct softnet_data *sd = this_cpu_ptr(&softnet_data);
net/core/dev.c
7902
sd->in_net_rx_action = true;
net/core/dev.c
7904
list_splice_init(&sd->poll_list, &list);
net/core/dev.c
7914
sd->in_net_rx_action = false;
net/core/dev.c
7920
if (!list_empty(&sd->poll_list))
net/core/dev.c
7922
if (!sd_has_rps_ipi_waiting(sd))
net/core/dev.c
7938
WRITE_ONCE(sd->time_squeeze, sd->time_squeeze + 1);
net/core/dev.c
7945
list_splice_tail_init(&sd->poll_list, &list);
net/core/dev.c
7947
list_splice(&list, &sd->poll_list);
net/core/dev.c
7948
if (!list_empty(&sd->poll_list))
net/core/dev.c
7951
sd->in_net_rx_action = false;
net/core/dev.c
7953
net_rps_action_and_irq_enable(sd);
net/core/net-procfs.c
101
sd = &per_cpu(softnet_data, *pos);
net/core/net-procfs.c
105
return sd;
net/core/net-procfs.c
125
struct softnet_data *sd = v;
net/core/net-procfs.c
126
u32 input_qlen = softnet_input_pkt_queue_len(sd);
net/core/net-procfs.c
127
u32 process_qlen = softnet_process_queue_len(sd);
net/core/net-procfs.c
134
fl = rcu_dereference(sd->flow_limit);
net/core/net-procfs.c
148
READ_ONCE(sd->processed),
net/core/net-procfs.c
149
numa_drop_read(&sd->drop_counters),
net/core/net-procfs.c
150
READ_ONCE(sd->time_squeeze), 0,
net/core/net-procfs.c
153
READ_ONCE(sd->received_rps), flow_limit_count,
net/core/net-procfs.c
85
static u32 softnet_input_pkt_queue_len(struct softnet_data *sd)
net/core/net-procfs.c
87
return skb_queue_len_lockless(&sd->input_pkt_queue);
net/core/net-procfs.c
90
static u32 softnet_process_queue_len(struct softnet_data *sd)
net/core/net-procfs.c
92
return skb_queue_len_lockless(&sd->process_queue);
net/core/net-procfs.c
97
struct softnet_data *sd = NULL;
net/core/netpoll.c
246
struct softnet_data *sd = &get_cpu_var(softnet_data);
net/core/netpoll.c
248
if (sd->completion_queue) {
net/core/netpoll.c
252
clist = sd->completion_queue;
net/core/netpoll.c
253
sd->completion_queue = NULL;
net/core/sysctl_net_core.c
214
struct softnet_data *sd;
net/core/sysctl_net_core.c
229
sd = &per_cpu(softnet_data, i);
net/core/sysctl_net_core.c
230
cur = rcu_dereference_protected(sd->flow_limit,
net/core/sysctl_net_core.c
233
RCU_INIT_POINTER(sd->flow_limit, NULL);
net/core/sysctl_net_core.c
244
rcu_assign_pointer(sd->flow_limit, cur);
net/core/sysctl_net_core.c
253
sd = &per_cpu(softnet_data, i);
net/core/sysctl_net_core.c
254
if (rcu_dereference(sd->flow_limit))
net/sctp/socket.c
5748
peeloff->sd = retval;
net/sunrpc/auth_gss/svcauth_gss.c
658
struct gss_svc_seq_data *sd = &rsci->seqdata;
net/sunrpc/auth_gss/svcauth_gss.c
661
spin_lock(&sd->sd_lock);
net/sunrpc/auth_gss/svcauth_gss.c
662
if (seq_num > sd->sd_max) {
net/sunrpc/auth_gss/svcauth_gss.c
663
if (seq_num >= sd->sd_max + GSS_SEQ_WIN) {
net/sunrpc/auth_gss/svcauth_gss.c
664
memset(sd->sd_win, 0, sizeof(sd->sd_win));
net/sunrpc/auth_gss/svcauth_gss.c
665
sd->sd_max = seq_num;
net/sunrpc/auth_gss/svcauth_gss.c
666
} else while (sd->sd_max < seq_num) {
net/sunrpc/auth_gss/svcauth_gss.c
667
sd->sd_max++;
net/sunrpc/auth_gss/svcauth_gss.c
668
__clear_bit(sd->sd_max % GSS_SEQ_WIN, sd->sd_win);
net/sunrpc/auth_gss/svcauth_gss.c
670
__set_bit(seq_num % GSS_SEQ_WIN, sd->sd_win);
net/sunrpc/auth_gss/svcauth_gss.c
672
} else if (seq_num + GSS_SEQ_WIN <= sd->sd_max) {
net/sunrpc/auth_gss/svcauth_gss.c
675
if (__test_and_set_bit(seq_num % GSS_SEQ_WIN, sd->sd_win))
net/sunrpc/auth_gss/svcauth_gss.c
681
spin_unlock(&sd->sd_lock);
net/sunrpc/auth_gss/svcauth_gss.c
686
sd->sd_max - GSS_SEQ_WIN,
net/sunrpc/auth_gss/svcauth_gss.c
687
sd->sd_max);
net/xfrm/xfrm_device.c
120
struct softnet_data *sd;
net/xfrm/xfrm_device.c
149
sd = this_cpu_ptr(&softnet_data);
net/xfrm/xfrm_device.c
150
err = !skb_queue_empty(&sd->xfrm_backlog);
net/xfrm/xfrm_device.c
472
struct softnet_data *sd;
net/xfrm/xfrm_device.c
485
sd = this_cpu_ptr(&softnet_data);
net/xfrm/xfrm_device.c
486
skb_queue_tail(&sd->xfrm_backlog, skb);
net/xfrm/xfrm_device.c
494
void xfrm_dev_backlog(struct softnet_data *sd)
net/xfrm/xfrm_device.c
496
struct sk_buff_head *xfrm_backlog = &sd->xfrm_backlog;
samples/bpf/tracex5.bpf.c
48
struct seccomp_data sd;
samples/bpf/tracex5.bpf.c
50
bpf_core_read(&sd, sizeof(sd), (void *)PT_REGS_PARM2(ctx));
samples/bpf/tracex5.bpf.c
51
if (sd.args[2] == 512) {
samples/bpf/tracex5.bpf.c
54
sd.args[0], sd.args[1], sd.args[2]);
samples/bpf/tracex5.bpf.c
61
struct seccomp_data sd;
samples/bpf/tracex5.bpf.c
63
bpf_core_read(&sd, sizeof(sd), (void *)PT_REGS_PARM2(ctx));
samples/bpf/tracex5.bpf.c
64
if (sd.args[2] > 128 && sd.args[2] <= 1024) {
samples/bpf/tracex5.bpf.c
67
sd.args[0], sd.args[1], sd.args[2]);
sound/core/oss/pcm_oss.c
711
int sd;
sound/core/oss/pcm_oss.c
719
sd = 4;
sound/core/oss/pcm_oss.c
720
if (oss_period_size / sd > 4096)
sound/core/oss/pcm_oss.c
721
sd *= 2;
sound/core/oss/pcm_oss.c
722
if (oss_period_size / sd < 4096)
sound/core/oss/pcm_oss.c
723
sd = 1;
sound/core/oss/pcm_oss.c
725
sd = runtime->oss.subdivision;
sound/core/oss/pcm_oss.c
726
oss_period_size /= sd;
sound/core/sound_kunit.c
131
valid_fmt[i].sd < 0 ? -EINVAL : valid_fmt[i].sd);
sound/core/sound_kunit.c
133
valid_fmt[i].sd < 0 ? -EINVAL : 1 - valid_fmt[i].sd);
sound/core/sound_kunit.c
16
.width = wd, .le = endianness, .sd = signd, .silence = silence_arr, \
sound/core/sound_kunit.c
36
int sd;
sound/pci/oxygen/oxygen.h
55
#define OXYGEN_PCI_SUBID(sv, sd) \
sound/pci/oxygen/oxygen.h
59
.subdevice = sd
tools/accounting/delaytop.c
419
static int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
tools/accounting/delaytop.c
451
while ((r = sendto(sd, buf, buflen, 0, (struct sockaddr *) &nladdr,
tools/accounting/delaytop.c
463
static int get_family_id(int sd)
tools/accounting/delaytop.c
478
rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY,
tools/accounting/delaytop.c
486
rep_len = recv(sd, &ans, sizeof(ans), 0);
tools/accounting/getdelays.c
119
static int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
tools/accounting/getdelays.c
147
while ((r = sendto(sd, buf, buflen, 0, (struct sockaddr *) &nladdr,
tools/accounting/getdelays.c
163
static int get_family_id(int sd)
tools/accounting/getdelays.c
176
rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY,
tools/accounting/getdelays.c
182
rep_len = recv(sd, &ans, sizeof(ans), 0);
tools/accounting/procacct.c
125
static int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
tools/accounting/procacct.c
153
while ((r = sendto(sd, buf, buflen, 0, (struct sockaddr *) &nladdr,
tools/accounting/procacct.c
169
static int get_family_id(int sd)
tools/accounting/procacct.c
182
rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY,
tools/accounting/procacct.c
188
rep_len = recv(sd, &ans, sizeof(ans), 0);
tools/perf/util/sort.c
2575
static void sort_dimension_add_dynamic_header(struct sort_dimension *sd, struct perf_env *env)
tools/perf/util/sort.c
2577
sd->entry->se_header = arch_perf_header_entry(sd->entry->se_header, env);
tools/perf/util/sort.c
2875
__sort_dimension__alloc_hpp(struct sort_dimension *sd, int level)
tools/perf/util/sort.c
2885
hse->se = sd->entry;
tools/perf/util/sort.c
2886
hse->hpp.name = sd->entry->se_header;
tools/perf/util/sort.c
2960
static int __sort_dimension__add_hpp_sort(struct sort_dimension *sd,
tools/perf/util/sort.c
2964
struct hpp_sort_entry *hse = __sort_dimension__alloc_hpp(sd, level);
tools/perf/util/sort.c
2973
static int __sort_dimension__add_hpp_output(struct sort_dimension *sd,
tools/perf/util/sort.c
2977
struct hpp_sort_entry *hse = __sort_dimension__alloc_hpp(sd, level);
tools/perf/util/sort.c
3548
static int __sort_dimension__update(struct sort_dimension *sd,
tools/perf/util/sort.c
3551
if (sd->entry == &sort_parent && parent_pattern) {
tools/perf/util/sort.c
3561
} else if (sd->entry == &sort_sym) {
tools/perf/util/sort.c
3570
sd->entry->se_collapse = sort__sym_sort;
tools/perf/util/sort.c
3572
} else if (sd->entry == &sort_sym_offset) {
tools/perf/util/sort.c
3574
} else if (sd->entry == &sort_dso) {
tools/perf/util/sort.c
3576
} else if (sd->entry == &sort_socket) {
tools/perf/util/sort.c
3578
} else if (sd->entry == &sort_thread) {
tools/perf/util/sort.c
3580
} else if (sd->entry == &sort_comm) {
tools/perf/util/sort.c
3582
} else if (sd->entry == &sort_type_offset) {
tools/perf/util/sort.c
3584
} else if (sd->entry == &sort_sym_from || sd->entry == &sort_sym_to) {
tools/perf/util/sort.c
3586
} else if (sd->entry == &sort_mem_dcacheline && cacheline_size() == 0) {
tools/perf/util/sort.c
3588
} else if (sd->entry == &sort_mem_daddr_sym) {
tools/perf/util/sort.c
3592
if (sd->entry->se_collapse)
tools/perf/util/sort.c
3598
static int __sort_dimension__add(struct sort_dimension *sd,
tools/perf/util/sort.c
3602
if (sd->taken)
tools/perf/util/sort.c
3605
if (__sort_dimension__add_hpp_sort(sd, list, level) < 0)
tools/perf/util/sort.c
3608
if (__sort_dimension__update(sd, list) < 0)
tools/perf/util/sort.c
3611
sd->taken = 1;
tools/perf/util/sort.c
3636
struct sort_dimension *sd,
tools/perf/util/sort.c
3639
if (sd->taken)
tools/perf/util/sort.c
3642
if (__sort_dimension__add_hpp_output(sd, list, level) < 0)
tools/perf/util/sort.c
3645
if (__sort_dimension__update(sd, list) < 0)
tools/perf/util/sort.c
3648
sd->taken = 1;
tools/perf/util/sort.c
3701
struct sort_dimension *sd = &common_sort_dimensions[i];
tools/perf/util/sort.c
3703
if (!sd->name || strncasecmp(tok, sd->name, strlen(tok)))
tools/perf/util/sort.c
3707
if (sd->name && !strcmp(dynamic_headers[j], sd->name))
tools/perf/util/sort.c
3708
sort_dimension_add_dynamic_header(sd, env);
tools/perf/util/sort.c
3711
return __sort_dimension__add(sd, list, level);
tools/perf/util/sort.c
3715
struct sort_dimension *sd = &bstack_sort_dimensions[i];
tools/perf/util/sort.c
3717
if (!sd->name || strncasecmp(tok, sd->name, strlen(tok)))
tools/perf/util/sort.c
3729
__sort_dimension__add(sd, list, level);
tools/perf/util/sort.c
3734
struct sort_dimension *sd = &memory_sort_dimensions[i];
tools/perf/util/sort.c
3736
if (!sd->name || strncasecmp(tok, sd->name, strlen(tok)))
tools/perf/util/sort.c
3742
__sort_dimension__add(sd, list, level);
tools/perf/util/sort.c
3774
struct sort_dimension *sd = &common_sort_dimensions[i];
tools/perf/util/sort.c
3776
if (sd->name && !strncasecmp(key, sd->name, strlen(key)))
tools/perf/util/sort.c
4130
struct sort_dimension *sd = &common_sort_dimensions[i];
tools/perf/util/sort.c
4132
if (!sd->name || strncasecmp(tok, sd->name, strlen(tok)))
tools/perf/util/sort.c
4135
return __sort_dimension__add_output(list, sd, *level);
tools/perf/util/sort.c
4139
struct sort_dimension *sd = &bstack_sort_dimensions[i];
tools/perf/util/sort.c
4141
if (!sd->name || strncasecmp(tok, sd->name, strlen(tok)))
tools/perf/util/sort.c
4147
return __sort_dimension__add_output(list, sd, *level);
tools/perf/util/sort.c
4151
struct sort_dimension *sd = &memory_sort_dimensions[i];
tools/perf/util/sort.c
4153
if (!sd->name || strncasecmp(tok, sd->name, strlen(tok)))
tools/perf/util/sort.c
4159
return __sort_dimension__add_output(list, sd, *level);
tools/perf/util/stat-display.c
1447
double sd = stddev_stats(config->walltime_nsecs_stats) / NSEC_PER_SEC;
tools/perf/util/stat-display.c
1452
fprintf(output, " %17.9f +- %.9f seconds time elapsed", avg, sd);
tools/perf/util/stat-display.c
1454
print_noise_pct(config, NULL, sd, avg, /*before_metric=*/false);
tools/testing/selftests/bpf/progs/test_access_variable_array.c
12
struct sched_domain *sd)
tools/testing/selftests/bpf/progs/test_access_variable_array.c
14
span = sd->span[0];
tools/testing/selftests/landlock/tsync_test.c
173
struct signaler_data *sd = data;
tools/testing/selftests/landlock/tsync_test.c
175
while (!sd->stop)
tools/testing/selftests/landlock/tsync_test.c
176
pthread_kill(sd->target, SIGUSR1);
tools/testing/selftests/landlock/tsync_test.c
207
struct signaler_data sd;
tools/testing/selftests/landlock/tsync_test.c
228
sd.target = pthread_self();
tools/testing/selftests/landlock/tsync_test.c
229
sd.stop = false;
tools/testing/selftests/landlock/tsync_test.c
230
ASSERT_EQ(0, pthread_create(&signaler, NULL, signaler_thread, &sd));
tools/testing/selftests/landlock/tsync_test.c
239
sd.stop = true;
tools/testing/selftests/nci/nci_dev.c
111
static int send_cmd_mt_nla(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
tools/testing/selftests/nci/nci_dev.c
148
while ((r = sendto(sd, buf, buflen, 0, (struct sockaddr *)&nladdr,
tools/testing/selftests/nci/nci_dev.c
160
static int send_get_nfc_family(int sd, __u32 pid)
tools/testing/selftests/nci/nci_dev.c
171
return send_cmd_mt_nla(sd, GENL_ID_CTRL, pid, CTRL_CMD_GETFAMILY,
tools/testing/selftests/nci/nci_dev.c
176
static int get_family_id(int sd, __u32 pid, __u32 *event_group)
tools/testing/selftests/nci/nci_dev.c
189
rc = send_get_nfc_family(sd, pid);
tools/testing/selftests/nci/nci_dev.c
194
resp_len = recv(sd, &ans, sizeof(ans), 0);
tools/testing/selftests/nci/nci_dev.c
240
static int send_cmd_with_idx(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
tools/testing/selftests/nci/nci_dev.c
247
return send_cmd_mt_nla(sd, nlmsg_type, nlmsg_pid, genl_cmd, 1,
tools/testing/selftests/nci/nci_dev.c
251
static int get_nci_devid(int sd, __u16 fid, __u32 pid, int dev_id, struct msgtemplate *msg)
tools/testing/selftests/nci/nci_dev.c
255
rc = send_cmd_with_idx(sd, fid, pid, NFC_CMD_GET_DEVICE, dev_id);
tools/testing/selftests/nci/nci_dev.c
261
resp_len = recv(sd, msg, sizeof(*msg), 0);
tools/testing/selftests/nci/nci_dev.c
306
int sd;
tools/testing/selftests/nci/nci_dev.c
414
self->sd = create_nl_socket();
tools/testing/selftests/nci/nci_dev.c
415
ASSERT_NE(self->sd, -1);
tools/testing/selftests/nci/nci_dev.c
418
self->fid = get_family_id(self->sd, self->pid, &event_group);
tools/testing/selftests/nci/nci_dev.c
424
rc = setsockopt(self->sd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &event_group,
tools/testing/selftests/nci/nci_dev.c
431
rc = get_nci_devid(self->sd, self->fid, self->pid, self->dev_idex, &msg);
tools/testing/selftests/nci/nci_dev.c
443
rc = send_cmd_with_idx(self->sd, self->fid, self->pid,
tools/testing/selftests/nci/nci_dev.c
513
rc = send_cmd_with_idx(self->sd, self->fid, self->pid,
tools/testing/selftests/nci/nci_dev.c
521
close(self->sd);
tools/testing/selftests/nci/nci_dev.c
531
rc = get_nci_devid(self->sd, self->fid, self->pid, self->dev_idex,
tools/testing/selftests/nci/nci_dev.c
581
int start_polling(int dev_idx, int proto, int virtual_fd, int sd, int fid, int pid)
tools/testing/selftests/nci/nci_dev.c
596
rc = send_cmd_mt_nla(sd, fid, pid, NFC_CMD_START_POLL, 2, nla_start_poll_type,
tools/testing/selftests/nci/nci_dev.c
605
int stop_polling(int dev_idx, int virtual_fd, int sd, int fid, int pid)
tools/testing/selftests/nci/nci_dev.c
616
rc = send_cmd_with_idx(sd, fid, pid,
tools/testing/selftests/nci/nci_dev.c
630
self->sd, self->fid, self->pid);
tools/testing/selftests/nci/nci_dev.c
633
status = stop_polling(self->dev_idex, self->virtual_nci_fd, self->sd,
tools/testing/selftests/nci/nci_dev.c
638
int get_taginfo(int dev_idx, int sd, int fid, int pid)
tools/testing/selftests/nci/nci_dev.c
661
send_cmd_mt_nla(sd, fid, pid, NFC_CMD_GET_TARGET, 1, &tagid_type,
tools/testing/selftests/nci/nci_dev.c
663
resp_len = recv(sd, &ans, sizeof(ans), 0);
tools/testing/selftests/nci/nci_dev.c
719
int connect_tag(int dev_idx, int virtual_fd, int sd, int fid, int pid)
tools/testing/selftests/nci/nci_dev.c
729
resp_len = recv(sd, evt_data, sizeof(evt_data), 0);
tools/testing/selftests/nci/nci_dev.c
739
target_idx = get_taginfo(dev_idx, sd, fid, pid);
tools/testing/selftests/nci/nci_dev.c
845
self->sd, self->fid, self->pid);
tools/testing/selftests/nci/nci_dev.c
848
nfc_sock = connect_tag(self->dev_idex, self->virtual_nci_fd, self->sd,
tools/testing/selftests/nci/nci_dev.c
866
rc = get_nci_devid(self->sd, self->fid, self->pid, self->dev_idex,
tools/testing/selftests/nci/nci_dev.c
879
rc = send_cmd_with_idx(self->sd, self->fid, self->pid,
tools/testing/selftests/nci/nci_dev.c
887
rc = get_nci_devid(self->sd, self->fid, self->pid, self->dev_idex,
tools/testing/selftests/nci/nci_dev.c
899
rc = send_cmd_with_idx(self->sd, self->fid, self->pid,
tools/testing/selftests/net/netfilter/sctp_collision.c
15
int sd, ret;
tools/testing/selftests/net/netfilter/sctp_collision.c
23
sd = socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
tools/testing/selftests/net/netfilter/sctp_collision.c
24
if (sd < 0) {
tools/testing/selftests/net/netfilter/sctp_collision.c
33
ret = bind(sd, (struct sockaddr *)&saddr, sizeof(saddr));
tools/testing/selftests/net/netfilter/sctp_collision.c
39
ret = listen(sd, 5);
tools/testing/selftests/net/netfilter/sctp_collision.c
50
ret = setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
tools/testing/selftests/net/netfilter/sctp_collision.c
58
ret = connect(sd, (struct sockaddr *)&daddr, len);
tools/testing/selftests/net/netfilter/sctp_collision.c
63
ret = recvfrom(sd, buf, sizeof(buf), 0, (struct sockaddr *)&daddr, &len);
tools/testing/selftests/net/netfilter/sctp_collision.c
68
ret = sendto(sd, buf, strlen(buf) + 1, 0, (struct sockaddr *)&daddr, len);
tools/testing/selftests/net/netfilter/sctp_collision.c
78
ret = connect(sd, (struct sockaddr *)&daddr, len);
tools/testing/selftests/net/netfilter/sctp_collision.c
84
ret = sendto(sd, buf, strlen(buf) + 1, 0, (struct sockaddr *)&daddr, len);
tools/testing/selftests/net/netfilter/sctp_collision.c
89
ret = recvfrom(sd, buf, sizeof(buf), 0, (struct sockaddr *)&daddr, &len);
tools/testing/selftests/net/netfilter/sctp_collision.c
98
close(sd);
tools/testing/selftests/net/nettest.c
1006
err = sendmsg(sd, &m, 0);
tools/testing/selftests/net/nettest.c
1010
if (!set_broadcast(sd))
tools/testing/selftests/net/nettest.c
1023
static int send_msg(int sd, void *addr, socklen_t alen, struct sock_args *args)
tools/testing/selftests/net/nettest.c
1026
if (write(sd, msg, msglen) < 0) {
tools/testing/selftests/net/nettest.c
1031
if (send(sd, msg, msglen, 0) < 0) {
tools/testing/selftests/net/nettest.c
1036
if (send_msg_cmsg(sd, addr, alen, args->ifindex, args->version))
tools/testing/selftests/net/nettest.c
1039
if (send_msg_no_cmsg(sd, addr, alen))
tools/testing/selftests/net/nettest.c
1049
static int socket_read_dgram(int sd, struct sock_args *args)
tools/testing/selftests/net/nettest.c
1074
len = recvmsg(sd, &m, 0);
tools/testing/selftests/net/nettest.c
1115
if (send_msg_cmsg(sd, addr, alen,
tools/testing/selftests/net/nettest.c
1128
if (sendto(sd, buf, len, 0,
tools/testing/selftests/net/nettest.c
1137
if (sendmsg(sd, &m, 0) < 0)
tools/testing/selftests/net/nettest.c
1143
err = sendmsg(sd, &m, 0);
tools/testing/selftests/net/nettest.c
1147
if (!set_broadcast(sd))
tools/testing/selftests/net/nettest.c
1164
static int socket_read_stream(int sd)
tools/testing/selftests/net/nettest.c
1169
len = read(sd, buf, sizeof(buf)-1);
tools/testing/selftests/net/nettest.c
1183
if (write(sd, buf, len) < 0) {
tools/testing/selftests/net/nettest.c
1194
static int socket_read(int sd, struct sock_args *args)
tools/testing/selftests/net/nettest.c
1197
return socket_read_stream(sd);
tools/testing/selftests/net/nettest.c
1199
return socket_read_dgram(sd, args);
tools/testing/selftests/net/nettest.c
1202
static int stdin_to_socket(int sd, int type, void *addr, socklen_t alen)
tools/testing/selftests/net/nettest.c
1212
if (write(sd, buf, len) < 0) {
tools/testing/selftests/net/nettest.c
1220
err = sendto(sd, buf, len, 0, addr, alen);
tools/testing/selftests/net/nettest.c
1224
if (!set_broadcast(sd))
tools/testing/selftests/net/nettest.c
1238
static void set_recv_attr(int sd, int version)
tools/testing/selftests/net/nettest.c
1241
set_recvpktinfo_v6(sd);
tools/testing/selftests/net/nettest.c
1242
set_recverr_v6(sd);
tools/testing/selftests/net/nettest.c
1244
set_pktinfo_v4(sd);
tools/testing/selftests/net/nettest.c
1245
set_recverr_v4(sd);
tools/testing/selftests/net/nettest.c
1249
static int msg_loop(int client, int sd, void *addr, socklen_t alen,
tools/testing/selftests/net/nettest.c
1258
set_recv_attr(sd, args->version);
tools/testing/selftests/net/nettest.c
1265
if (send_msg(sd, addr, alen, args))
tools/testing/selftests/net/nettest.c
1275
nfds = interactive ? MAX(fileno(stdin), sd) + 1 : sd + 1;
tools/testing/selftests/net/nettest.c
1278
FD_SET(sd, &rfds);
tools/testing/selftests/net/nettest.c
1296
if (FD_ISSET(sd, &rfds)) {
tools/testing/selftests/net/nettest.c
1297
rc = socket_read(sd, args);
tools/testing/selftests/net/nettest.c
1309
if (stdin_to_socket(sd, args->type, addr, alen) <= 0)
tools/testing/selftests/net/nettest.c
1326
if (send_msg(sd, addr, alen, args)) {
tools/testing/selftests/net/nettest.c
1344
int sd;
tools/testing/selftests/net/nettest.c
1349
sd = socket(PF_INET, SOCK_DGRAM, 0);
tools/testing/selftests/net/nettest.c
1350
if (sd < 0) {
tools/testing/selftests/net/nettest.c
1355
if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR,
tools/testing/selftests/net/nettest.c
1361
if (setsockopt(sd, SOL_SOCKET, SO_BROADCAST,
tools/testing/selftests/net/nettest.c
1365
if (set_dsfield(sd, AF_INET, args->dsfield) != 0)
tools/testing/selftests/net/nettest.c
1369
if (args->server_dontroute && set_dontroute(sd) != 0)
tools/testing/selftests/net/nettest.c
1372
if (args->client_dontroute && set_dontroute(sd) != 0)
tools/testing/selftests/net/nettest.c
1376
if (args->dev && bind_to_device(sd, args->dev) != 0)
tools/testing/selftests/net/nettest.c
1379
set_multicast_if(sd, args->ifindex))
tools/testing/selftests/net/nettest.c
1384
if (bind(sd, (struct sockaddr *) &laddr, sizeof(laddr)) < 0) {
tools/testing/selftests/net/nettest.c
1390
set_membership(sd, args->grp.s_addr,
tools/testing/selftests/net/nettest.c
1394
return sd;
tools/testing/selftests/net/nettest.c
1396
close(sd);
tools/testing/selftests/net/nettest.c
1410
static int bind_socket(int sd, struct sock_args *args)
tools/testing/selftests/net/nettest.c
1444
if (bind(sd, addr, alen) < 0) {
tools/testing/selftests/net/nettest.c
1452
static int config_xfrm_policy(int sd, struct sock_args *args)
tools/testing/selftests/net/nettest.c
1472
if (setsockopt(sd, level, xfrm_af, &policy, sizeof(policy)) < 0)
tools/testing/selftests/net/nettest.c
1476
if (setsockopt(sd, level, xfrm_af, &policy, sizeof(policy)) < 0)
tools/testing/selftests/net/nettest.c
1479
if (setsockopt(sd, IPPROTO_UDP, UDP_ENCAP, &type, sizeof(type)) < 0) {
tools/testing/selftests/net/nettest.c
1490
int sd;
tools/testing/selftests/net/nettest.c
1492
sd = socket(args->version, args->type, args->protocol);
tools/testing/selftests/net/nettest.c
1493
if (sd < 0) {
tools/testing/selftests/net/nettest.c
1498
if (set_reuseaddr(sd) != 0)
tools/testing/selftests/net/nettest.c
1501
if (set_reuseport(sd) != 0)
tools/testing/selftests/net/nettest.c
1504
if (set_dsfield(sd, args->version, args->dsfield) != 0)
tools/testing/selftests/net/nettest.c
1507
if (args->server_dontroute && set_dontroute(sd) != 0)
tools/testing/selftests/net/nettest.c
1510
if (args->dev && bind_to_device(sd, args->dev) != 0)
tools/testing/selftests/net/nettest.c
1513
set_unicast_if(sd, args->ifindex, args->version))
tools/testing/selftests/net/nettest.c
1516
if (args->use_freebind && set_freebind(sd, args->version))
tools/testing/selftests/net/nettest.c
1519
if (bind_socket(sd, args))
tools/testing/selftests/net/nettest.c
1525
if (args->type == SOCK_STREAM && listen(sd, 1) < 0) {
tools/testing/selftests/net/nettest.c
1530
flags = fcntl(sd, F_GETFL);
tools/testing/selftests/net/nettest.c
1531
if ((flags < 0) || (fcntl(sd, F_SETFL, flags|O_NONBLOCK) < 0)) {
tools/testing/selftests/net/nettest.c
1536
if (fcntl(sd, F_SETFD, FD_CLOEXEC) < 0)
tools/testing/selftests/net/nettest.c
1539
if (args->use_xfrm && config_xfrm_policy(sd, args)) {
tools/testing/selftests/net/nettest.c
1545
return sd;
tools/testing/selftests/net/nettest.c
1548
close(sd);
tools/testing/selftests/net/nettest.c
1668
static int wait_for_connect(int sd)
tools/testing/selftests/net/nettest.c
1676
FD_SET(sd, &wfd);
tools/testing/selftests/net/nettest.c
1690
if (getsockopt(sd, SOL_SOCKET, SO_ERROR, &val, (socklen_t *)&sz) < 0) {
tools/testing/selftests/net/nettest.c
1705
int sd, rc = -1;
tools/testing/selftests/net/nettest.c
1708
sd = socket(args->version, args->type, args->protocol);
tools/testing/selftests/net/nettest.c
1709
if (sd < 0) {
tools/testing/selftests/net/nettest.c
1714
flags = fcntl(sd, F_GETFL);
tools/testing/selftests/net/nettest.c
1715
if ((flags < 0) || (fcntl(sd, F_SETFL, flags|O_NONBLOCK) < 0)) {
tools/testing/selftests/net/nettest.c
1720
if (set_reuseport(sd) != 0)
tools/testing/selftests/net/nettest.c
1723
if (set_dsfield(sd, args->version, args->dsfield) != 0)
tools/testing/selftests/net/nettest.c
1726
if (args->client_dontroute && set_dontroute(sd) != 0)
tools/testing/selftests/net/nettest.c
1729
if (args->dev && bind_to_device(sd, args->dev) != 0)
tools/testing/selftests/net/nettest.c
1732
set_unicast_if(sd, args->ifindex, args->version))
tools/testing/selftests/net/nettest.c
1735
if (args->has_local_ip && bind_socket(sd, args))
tools/testing/selftests/net/nettest.c
1741
if (args->password && tcp_md5sig(sd, addr, alen, args))
tools/testing/selftests/net/nettest.c
1747
if (connect(sd, addr, alen) < 0) {
tools/testing/selftests/net/nettest.c
1753
rc = wait_for_connect(sd);
tools/testing/selftests/net/nettest.c
1758
return sd;
tools/testing/selftests/net/nettest.c
1761
close(sd);
tools/testing/selftests/net/nettest.c
1776
int sd;
tools/testing/selftests/net/nettest.c
1825
sd = msock_client(args);
tools/testing/selftests/net/nettest.c
1827
sd = connectsock(addr, alen, args);
tools/testing/selftests/net/nettest.c
1829
if (sd < 0)
tools/testing/selftests/net/nettest.c
1830
return -sd;
tools/testing/selftests/net/nettest.c
1836
rc = show_sockstat(sd, args);
tools/testing/selftests/net/nettest.c
1841
rc = msg_loop(1, sd, addr, alen, args);
tools/testing/selftests/net/nettest.c
1844
close(sd);
tools/testing/selftests/net/nettest.c
265
static int tcp_md5sig(int sd, void *addr, socklen_t alen, struct sock_args *args)
tools/testing/selftests/net/nettest.c
294
rc = setsockopt(sd, IPPROTO_TCP, opt, &md5sig, sizeof(md5sig));
tools/testing/selftests/net/nettest.c
306
static int tcp_md5_remote(int sd, struct sock_args *args)
tools/testing/selftests/net/nettest.c
335
if (tcp_md5sig(sd, addr, alen, args))
tools/testing/selftests/net/nettest.c
344
int sd, rc;
tools/testing/selftests/net/nettest.c
353
sd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
tools/testing/selftests/net/nettest.c
354
if (sd < 0) {
tools/testing/selftests/net/nettest.c
359
rc = ioctl(sd, SIOCGIFINDEX, (char *)&ifdata);
tools/testing/selftests/net/nettest.c
360
close(sd);
tools/testing/selftests/net/nettest.c
369
static int bind_to_device(int sd, const char *name)
tools/testing/selftests/net/nettest.c
373
rc = setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, strlen(name)+1);
tools/testing/selftests/net/nettest.c
380
static int get_bind_to_device(int sd, char *name, size_t len)
tools/testing/selftests/net/nettest.c
386
rc = getsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, &optlen);
tools/testing/selftests/net/nettest.c
393
static int check_device(int sd, struct sock_args *args)
tools/testing/selftests/net/nettest.c
398
if (get_bind_to_device(sd, name, sizeof(name)))
tools/testing/selftests/net/nettest.c
421
static int set_pktinfo_v4(int sd)
tools/testing/selftests/net/nettest.c
426
rc = setsockopt(sd, SOL_IP, IP_PKTINFO, &one, sizeof(one));
tools/testing/selftests/net/nettest.c
433
static int set_recvpktinfo_v6(int sd)
tools/testing/selftests/net/nettest.c
438
rc = setsockopt(sd, SOL_IPV6, IPV6_RECVPKTINFO, &one, sizeof(one));
tools/testing/selftests/net/nettest.c
445
static int set_recverr_v4(int sd)
tools/testing/selftests/net/nettest.c
450
rc = setsockopt(sd, SOL_IP, IP_RECVERR, &one, sizeof(one));
tools/testing/selftests/net/nettest.c
457
static int set_recverr_v6(int sd)
tools/testing/selftests/net/nettest.c
462
rc = setsockopt(sd, SOL_IPV6, IPV6_RECVERR, &one, sizeof(one));
tools/testing/selftests/net/nettest.c
469
static int set_unicast_if(int sd, int ifindex, int version)
tools/testing/selftests/net/nettest.c
481
rc = setsockopt(sd, level, opt, &ifindex, sizeof(ifindex));
tools/testing/selftests/net/nettest.c
488
static int set_multicast_if(int sd, int ifindex)
tools/testing/selftests/net/nettest.c
493
rc = setsockopt(sd, SOL_IP, IP_MULTICAST_IF, &mreq, sizeof(mreq));
tools/testing/selftests/net/nettest.c
500
static int set_membership(int sd, uint32_t grp, uint32_t addr, int ifindex)
tools/testing/selftests/net/nettest.c
515
rc = setsockopt(sd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));
tools/testing/selftests/net/nettest.c
524
static int set_freebind(int sd, int version)
tools/testing/selftests/net/nettest.c
531
if (setsockopt(sd, SOL_IP, IP_FREEBIND, &one, sizeof(one))) {
tools/testing/selftests/net/nettest.c
537
if (setsockopt(sd, SOL_IPV6, IPV6_FREEBIND, &one, sizeof(one))) {
tools/testing/selftests/net/nettest.c
547
static int set_broadcast(int sd)
tools/testing/selftests/net/nettest.c
552
if (setsockopt(sd, SOL_SOCKET, SO_BROADCAST, &one, sizeof(one)) != 0) {
tools/testing/selftests/net/nettest.c
560
static int set_reuseport(int sd)
tools/testing/selftests/net/nettest.c
565
if (setsockopt(sd, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)) != 0) {
tools/testing/selftests/net/nettest.c
573
static int set_reuseaddr(int sd)
tools/testing/selftests/net/nettest.c
578
if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) != 0) {
tools/testing/selftests/net/nettest.c
586
static int set_dsfield(int sd, int version, int dsfield)
tools/testing/selftests/net/nettest.c
593
if (setsockopt(sd, SOL_IP, IP_TOS, &dsfield,
tools/testing/selftests/net/nettest.c
601
if (setsockopt(sd, SOL_IPV6, IPV6_TCLASS, &dsfield,
tools/testing/selftests/net/nettest.c
616
static int set_dontroute(int sd)
tools/testing/selftests/net/nettest.c
620
if (setsockopt(sd, SOL_SOCKET, SO_DONTROUTE, &one, sizeof(one)) < 0) {
tools/testing/selftests/net/nettest.c
715
static int show_sockstat(int sd, struct sock_args *args)
tools/testing/selftests/net/nettest.c
725
if (getsockname(sd, sa, &alen) == 0) {
tools/testing/selftests/net/nettest.c
738
if (getpeername(sd, sa, &alen) == 0) {
tools/testing/selftests/net/nettest.c
940
static int send_msg_no_cmsg(int sd, void *addr, socklen_t alen)
tools/testing/selftests/net/nettest.c
945
err = sendto(sd, msg, msglen, 0, addr, alen);
tools/testing/selftests/net/nettest.c
949
if (!set_broadcast(sd))
tools/testing/selftests/net/nettest.c
961
static int send_msg_cmsg(int sd, void *addr, socklen_t alen,