Post Go back to editing

adv7282m driver!

I have a driver for adv7282m, but it base on linux kernel 3.14.xx or more. now, i need a driver for 3.10.17. because, in the process of compiling don't found function v4l2_async_register_subdev and v4l2_async_unregister_subdev. if you have a driver for this. please send to me or to help me solve problem. thaks.

  • Hi,

    Just remove the lines that call v4l2_async_register_subdev() and v4l2_async_unregister_subdev(). You wont need them if you don't want to use async probing.

    Alternatively if you want to use the async probing feature you can import the patches from the v4l2-async-3.10 branch from the ADI linux repository. This has all the dependencies for the v4l2-async framework on top of v3.10.

    - Lars

  • Hi,

    Asynchronous probing is a new feature of the V4L2 subsystem that allow you to independently probe the host part of the video pipeline and the sensor part (the adv7282-m in this case). This is for example useful if you use devicetree for probing your devices.

    Those two lines (v4l2_async_register_subdev()/v4l2_async_unregister_subdev()) add support for asynchronous probing to the driver. If you remove those lines all that is affected is the capability to perform asynchronous probing, the driver will otherwise continue to work just as expected. So there is no risk.

    If you want to use asynchronous probing in your system you need to keep those two lines and add support for asynchronous probing to your tree. This is done by merging the v4l2-async-3.10 branch into your tree. Anything that does not use asynchronous probing is not affected by this. So there is no risk.

    - Lars

  • Hi, larsc:

         thank you. I have two question.

         1. if i remove this two lines. the risk is? driver can work?

         2. if i patch the kernel. the risk is?

         Would you recommend that kind of method.

  • Hi, lars:

         First, thanks for your patience.

         (1) Now, when the machine working. I can found adv7282m driver in the /sys/. But, i can't found the adv7282 i2c device in the /sys/. I guess that the .dts configure is error. Can you give me a available .dts configure or sample.

         (2) Can you give me a immediate contacts?

        

    - John Ding

  • Hi,

    There are no special requirements for the devicetree for the adv7282m. Something like

    YOUR_I2C_CONTROLLER {

        adv7282m {

            compatible = "adi,adv7282-m";

            reg = <YOUR_ADDR>;

        };

    };

    should be enough to get the device instantiated.

    But you'll need to find a way to link it up to your host image processor.

    - Lars

  • Hi, lars:

         Thanks!

         We have tried to add a devicetree configuration, which like that sample. But, it just to config i2c device. Just as the following.

         (1) We need to config mipi also.

         (2) On the adv7282m i2c bus. there have 3 address of this chip. It mean that there need to config 3 times.

      

    - John

  • Hi,

    The driver automatically creates I2C devices for the two other interfaces and configures them accordingly. In the devicetree you only need to specify the main interface.

    The configuration of the MIPI link will depend on your host system. The device node in /dev/ will be created by the so called bridge-driver which links together the host MIPI receiver to the adv7282-m. You should not need any special udev rules.

    - Lars

  • Hi, lars:  

         Thanks! 

         (1) If i setup driver correct. Can i found the node in the /dev/?

         (2) Do i need to config udev rules?

  • Hi, lars:

         Now the status is that, we can found the i2c device in /sys/. Such as, /sys/bus/i2c/device/2-0021 /sys/bus/i2c/device/2-0042 /sys/bus/i2c/device/2-0044. It mean that, the function probe is run ok. And in /sys/bus/i2c/driver/, we also found the adv7282m file. In original system, there are four video devices already. We guess that the adv7180m device must be hung up on it. But, when we use v4l2 application to read it. The result is failure. Can you give me some advice or method to debug it?


    - John

  • Hi,

    It looks like you are trying to register two different adv7180 drivers. You are using the Freescale SDK it seems, in this SDK there is a different adv7180 driver and both drivers are probably enabled in your kernel build.

    The other thing is that the Freescale i.MX CSI-2 drivers use non-standard kernel interfaces for connecting the converter to the host and configuring the link. While the upstream adv7282-m driver uses standard interfaces. Making both of them work together is not that straight forward.

    Other people have succeeded at getting the adv7282-m to work with the iMX (probably using a custom driver). Maybe this thread will help you.

    - Lars