<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Zephyr new device binding</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90832/zephyr-new-device-binding</link><description>Hello, 
 My development requires new device binding and I want to share the steps followed and my issue. 
 My device is Renesas and commuicate via I2C protocol. 
 Based on vendors available,I have to proceed with the following step: 
 
 create a new file</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 Dec 2022 12:52:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90832/zephyr-new-device-binding" /><item><title>RE: Zephyr new device binding</title><link>https://devzone.nordicsemi.com/thread/400381?ContentTypeID=1</link><pubDate>Tue, 13 Dec 2022 12:52:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea0c96e1-8598-47ef-bdf2-fd67cb34170b</guid><dc:creator>MPDeveloper89</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Issue can be considered closed.&lt;/p&gt;
&lt;p&gt;Your suggestion has been very useful and functional.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;MP&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr new device binding</title><link>https://devzone.nordicsemi.com/thread/380872?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2022 15:03:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d64c51ae-e82c-41fe-ac57-506086a17b15</guid><dc:creator>MPDeveloper89</dc:creator><description>&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So, in my .yaml file the include file was missing and I had the following &amp;quot;issue&amp;quot;:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1660057177893v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Let me say, It&amp;#39;s no an issue because building was ok and I device was reachable using I2C scan.&lt;/p&gt;
&lt;p&gt;Anyway, adding the include field the red underline disappear. Thank you.&lt;/p&gt;
&lt;p&gt;For the interrupt, I will try with your advice and I will back.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr new device binding</title><link>https://devzone.nordicsemi.com/thread/380867?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2022 14:51:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:879a260d-e5df-4d3f-b0bd-2c33761b6d90</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What does your .yaml file look like? I would expect it to have a compatible field with &amp;quot;renesas,mydevice&amp;quot; and an include field with i2c-device.yaml.&lt;/p&gt;
&lt;p&gt;If that is the case, just add a property for the interrupt gpio:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;compatible: &amp;quot;renesas,mydevice&amp;quot;

include: i2c-device.yaml

properties:
    int-gpios:
      type: phandle-array
      required: true
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then you can assign a gpio pin to your mydevice node in the dts file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;i2c1 {
	compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	sda-pin = &amp;lt;34&amp;gt;;
	scl-pin = &amp;lt;35&amp;gt;;

	mydevice@53{
		compatible = &amp;quot;renesas,mydevice&amp;quot;;
		label = &amp;quot;MYDEVICE&amp;quot;;
		reg = &amp;lt;0x53&amp;gt;;
		int-gpios = &amp;lt;&amp;amp;gpio1 4 0&amp;gt;;
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;For implementation, you can try looking at the driver for the adt7420, which seems to make use of an interrupt pin.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1-1/drivers/sensor/adt7420/adt7420.c#L223-L231"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1-1/drivers/sensor/adt7420/adt7420.c#L223-L231&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>