<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create v4l2 subdevice  in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891592#M134804</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, i am not able to access the link.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/79313i0041ABF3CC9C68DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Apr 2019 05:43:38 GMT</pubDate>
    <dc:creator>nikhil3karale</dc:creator>
    <dc:date>2019-04-11T05:43:38Z</dc:date>
    <item>
      <title>How to create v4l2 subdevice</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891590#M134802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I working on interfacing own camera chip with iMX8M processor using linux kernel 4.14.78.&lt;/P&gt;&lt;P&gt;I have written the camera driver for chip and it probes successfully as a video subdevice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to program the chip from the user application, i need to define some custom controls in my v4l2 sub-device driver As per the following link &lt;A class="link-titled" href="https://linuxtv.org/downloads/v4l-dvb-apis/kapi/v4l2-subdev.html#v4l2-sub-device-userspace-api" title="https://linuxtv.org/downloads/v4l-dvb-apis/kapi/v4l2-subdev.html#v4l2-sub-device-userspace-api"&gt;1.7. V4L2 sub-devices — Linux Media Subsystem Documentation documentation&lt;/A&gt;&amp;nbsp; , subdevice must get created in /dev/ directory but in my case i am not able to generate the subdevice nodes &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does iMX platforms support v4l2 subdevice creation for the video device...?&lt;/P&gt;&lt;P&gt;Can anoyne help me to create v4l2 subdevice entry for my camera driver...?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2019 13:11:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891590#M134802</guid>
      <dc:creator>nikhil3karale</dc:creator>
      <dc:date>2019-04-10T13:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to create v4l2 subdevice</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891591#M134803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nikhil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes sudev supported, for general steps for creating it for new sensor one can check&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/498620"&gt;MIPI RAW12 Configuration for AR0330 on i.mx8mq&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2019 23:12:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891591#M134803</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2019-04-10T23:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to create v4l2 subdevice</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891592#M134804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, i am not able to access the link.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/79313i0041ABF3CC9C68DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2019 05:43:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891592#M134804</guid>
      <dc:creator>nikhil3karale</dc:creator>
      <dc:date>2019-04-11T05:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create v4l2 subdevice</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891593#M134805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry correct link&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/498568"&gt;iMX8M MIPI-CSI 4-lane configuration&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2019 09:26:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891593#M134805</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2019-04-11T09:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to create v4l2 subdevice</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891594#M134806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;I went through the above link but i have not found information about creating v4l2 subdevices.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Apr 2019 05:56:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891594#M134806</guid>
      <dc:creator>nikhil3karale</dc:creator>
      <dc:date>2019-04-12T05:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to create v4l2 subdevice</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891595#M134807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;unfortunately such documentation for&amp;nbsp;creating v4l2 subdevices is not available.&lt;/P&gt;&lt;P&gt;If you have difficulities, NXP has special service for software porting&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/support/support/nxp-professional-services:PROFESSIONAL-SERVICE" title="https://www.nxp.com/support/support/nxp-professional-services:PROFESSIONAL-SERVICE"&gt;NXP Professional Services | NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Apr 2019 07:27:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891595#M134807</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2019-04-12T07:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to create v4l2 subdevice</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891596#M134808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you still struggling with this? I noticed that with Kernel 4.9 I was able to create a subdevice, but when upgrading to 4.14, my driver stopped creating it for whatever reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know which Kernel you are running, and I can post some snippets here from the working one on 4.9 and I will try to resolve the problem with the 4.14 today, hopefully I will be able to help you.&lt;/P&gt;&lt;P&gt;(as this forum is not entirely helpful at all times :smileyhappy:&amp;nbsp;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2019 13:47:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891596#M134808</guid>
      <dc:creator>krisztianbakos8</dc:creator>
      <dc:date>2019-06-06T13:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to create v4l2 subdevice</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891597#M134809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the meantime I figured out that it does work with my 4.14 (and saw you are using the same kernel), so here is what needs to be done:&lt;/P&gt;&lt;P&gt;You initialize your subdevice with your subdev_ops pointer:&lt;/P&gt;&lt;DIV style="color: #a7dbf7; background-color: #011627; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #87aff4;"&gt;v4l2_i2c_subdev_init&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;sensor&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;subdev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;, client, &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;ar0330_subdev_ops);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can fill up the _HAS_DEVNODE flag, which tells V4L2 that your device wishes to expose the /dev/v4l-subdevX:&lt;/P&gt;&lt;DIV style="color: #a7dbf7; background-color: #011627; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;sensor&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;subdev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;flags&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;|=&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; V4L2_SUBDEV_FL_HAS_DEVNODE;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;sensor&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;subdev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;grp_id&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #8dec95;"&gt;678&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And only then, you actually register your subdevice (so the _HAS_DEVNODE can take effect):&lt;/P&gt;&lt;DIV style="color: #a7dbf7; background-color: #011627; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;ret &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #87aff4;"&gt;v4l2_async_register_subdev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;sensor&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;subdev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After this, if you are using the driver from NXP for MIPI (mxc-mipi-csi2_yav.c), then &lt;STRONG&gt;only after the first streaming command&lt;/STRONG&gt; your device will register in the /dev/ folder, because in that driver, they don't have a callback to when the subdevice actually registers, so they have just put it in the s_stream callback (see &lt;SPAN style="color: #87aff4;"&gt;v4l2_device_register_subdev_nodes())&lt;/SPAN&gt;:&lt;/P&gt;&lt;DIV style="color: #a7dbf7; background-color: #011627; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #00bff9;"&gt;static&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;int&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #87aff4;"&gt;mipi_csi2_s_stream&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;struct&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; v4l2_subdev &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="color: #d7dbe0;"&gt;sd&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;int&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d7dbe0;"&gt;enable&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;struct&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; mxc_mipi_csi2_dev &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;csi2dev &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #87aff4;"&gt;sd_to_mxc_mipi_csi2_dev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;(sd);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;struct&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; device &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;dev &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;csi2dev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;pdev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;dev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;struct&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; v4l2_subdev &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;sensor_sd &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;csi2dev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;sensor_sd&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;int&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; ret &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #8dec95;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #87aff4;"&gt;dev_dbg&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;csi2dev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;pdev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;dev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6bff81;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #82aaff;"&gt;%s&lt;/SPAN&gt;&lt;SPAN style="color: #d3eed6;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #82aaff;"&gt;%d&lt;/SPAN&gt;&lt;SPAN style="color: #d3eed6;"&gt;, csi2dev: 0x&lt;/SPAN&gt;&lt;SPAN style="color: #82aaff;"&gt;%x\n&lt;/SPAN&gt;&lt;SPAN style="color: #6bff81;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;__func__, enable, &lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;csi2dev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;flags&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;csi2dev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;registered&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #92b6f4;"&gt;false&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;csi2dev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;registered&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #92b6f4;"&gt;true&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #87aff4;"&gt;v4l2_info&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;csi2dev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;v4l2_dev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6bff81;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #d3eed6;"&gt;Registering subdevice nodes&lt;/SPAN&gt;&lt;SPAN style="color: #6bff81;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ret &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #87aff4;"&gt;v4l2_device_register_subdev_nodes&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;csi2dev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;v4l2_dev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;(ret &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #8dec95;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; ){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #87aff4;"&gt;v4l2_info&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;csi2dev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a4ceee;"&gt;v4l2_dev&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6bff81;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #d3eed6;"&gt;Error registering subdevice nodes&lt;/SPAN&gt;&lt;SPAN style="color: #6bff81;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #00bff9;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #a7dbf7;"&gt;EINVAL; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #a7dbf7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2019 16:39:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/891597#M134809</guid>
      <dc:creator>krisztianbakos8</dc:creator>
      <dc:date>2019-06-06T16:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to create v4l2 subdevice</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/1358989#M181843</link>
      <description>&lt;P&gt;I am trying to do the same. But having problem creating the device node. I am using the kernel 5.4.&lt;/P&gt;&lt;P&gt;I have integrated custom camera sensor, and trying to add ioctl calls and access it from user-space.&lt;/P&gt;&lt;P&gt;Got this in dmesg&lt;/P&gt;&lt;P&gt;CSI: Registered sensor subdevice: mxc_mipi-csi.0&lt;/P&gt;&lt;P&gt;Seems like the camera sensor sub-device is registered. I have added a ioctl, can you please tell me which device node I should access to call those IOCTLs? I see /dev/v4l-subdev0 is not being created.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 23:47:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-create-v4l2-subdevice/m-p/1358989#M181843</guid>
      <dc:creator>avijitnsec</dc:creator>
      <dc:date>2021-10-20T23:47:05Z</dc:date>
    </item>
  </channel>
</rss>

