This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM355: manage ccdc through ioctl

Hello!

Can I manage ccdc through ioctl?

I have looked kernel/drivers/media/davinci/ccdc_dm355.c and its structure different from mt9t001 driver.

Driver for mt9t001 created with possibility of work as kernel module or kernel driver.

I have read LSP 1.20 DaVinci Linux CCDC Driver (SPRUEP7.pdf), but I need read/write variable registr directly from userspace.

What do I need to keep in mind to maked possible manage it through ioctl?

Or how else can I manage it from userspace?

  • Hello!

    I have tryed modify kernel/drivers/media/davinci/ccdc_dm355.c for work through ioctl.

    But when I run make uImage I get error:

    ~/mv_pro_4.0.1/kernel$ make uImage
      CHK     include/linux/version.h
      SPLIT   include/linux/autoconf.h -> include/config/*
      SYMLINK include/asm-arm/arch -> include/asm-arm/arch-davinci
    make[1]: `arch/arm/kernel/asm-offsets.s' is up to date.
    make[1]: `include/asm-arm/mach-types.h' is up to date.
      CHK     include/linux/compile.h
      CHK     usr/initramfs_list
      LD      drivers/media/video/davinci/built-in.o
    drivers/media/video/davinci/davinci_capture.o(.text+0x94): In function `device_ioctl':
    davinci_vpfe.c: multiple definition of `device_ioctl'
    drivers/media/video/davinci/mt9t001.o(.text+0x3178):mt9t001.c: first defined here
    arm_v5t_le-ld: Warning: size of symbol `device_ioctl' changed from 160 in drivers/media/video/davinci/mt9t001.o to 84 in drivers/media/video/davinci/davinci_capture.o
    drivers/media/video/davinci/davinci_capture.o(.data+0x1464): multiple definition of `Fops'
    drivers/media/video/davinci/mt9t001.o(.data+0x0): first defined here
    make[4]: *** [drivers/media/video/davinci/built-in.o] Error 1
    make[3]: *** [drivers/media/video/davinci] Error 2
    make[2]: *** [drivers/media/video] Error 2
    make[1]: *** [drivers/media] Error 2
    make: *** [drivers] Error 2

    How can I solve this problem?

    Thank you.

  • It sounds like you are defining things in ccdc_dm355.c that are already defined in mt9t001.c, so the solution would be to either modify the objects that are already in mt9t001.c instead of making new ones in ccdc_dm355.c or remove/comment out the objects that you are now defining in ccdc_dm355.c from mt9t001.c (or just remove mt9t001.c from the build all together if you are no longer using it).