Zephyr new device binding

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:

  1. create a new file renesas,mydevice.yaml
  2. Copy it in my root path "dts\bindings\sensor"
  3. In .dts file:

&i2c1 {
	compatible = "nordic,nrf-twim";
	status = "okay";
	sda-pin = <34>;
	scl-pin = <35>;

	mydevice@53{
		compatible = "renesas,mydevice";
		label = "MYDEVICE";
		reg = <0x53>;
	};
};

where i2c1 is the node defined in .dtsi.

Well, I can build my project and I can use my custom library to communicate with it.

My issue regarding the device that provide also an interrupt when data is ready, then how can I proceed?

  • Must I define the interrupt properties in my binding file? If yes, what is the best way?
  • Or, Can I maintain the current implementation and manage interrupt in .dts as gpio?

Thank you in advance.

Parents Reply Children
Related