How to set "devname" on a custom module?

Hi, all.

Now, I’m trying to add a custom module.

Here is part of my device-tree.

tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";
		num_csi_lanes = <4>;
		max_lane_speed = <1500000>;
		min_bits_per_pixel = <12>;
		vi_peak_byte_per_pixel = <2>;
		vi_bw_margin_pct = <25>;
		max_pixel_rate = <160000>;
		isp_peak_byte_per_pixel = <5>;
		isp_bw_margin_pct = <25>;

		modules {
			module0 {
				badge = "imx556_bottom_liimx556";
				position = "bottom";
				orientation = "0";
				drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "imx556 2-0057";
					proc-device-tree = "/proc/device-tree/i2c@3180000/imx556_a@57";

My question is how to define devname node value.

I set to devname value as “imx556 2-0057” because I think it is defined as (Module Name) (I2C Bus)-(Sensor Slave Addr).

Is that right? or are there any other rules?

Thank you.

hello pisces1204,

this module{} information were used to describe for sensor identity when you have driver implementation,

  1. you should specify the devname with respect to its device name and i2c address.
  2. the proc-device-tree property represent the path of the camera sensor device node.
  3. if your system has multiple modules that are identical, create an unique badge name for each module. for example, if you have one module for a rear facing camera and an identical module for a front facing camera, you can call the rear camera module imx185_rear and the front camera module imx185_front.

hello JerryChang,

Thank you for your response.

I understood.