diff options
author | 2023-06-06 14:31:36 +0100 | |
---|---|---|
committer | 2023-06-09 15:48:20 +0100 | |
commit | f7c487366b3a82ced30923e591aaab0cdf1e4199 (patch) | |
tree | 9e4870d93557225e3a5a3171feb2a29a9327c946 /drivers/staging/media/atomisp/pci/atomisp_csi2.h | |
parent | media: atomisp: Add testing instructions to TODO file (diff) | |
download | wireguard-linux-f7c487366b3a82ced30923e591aaab0cdf1e4199.tar.xz wireguard-linux-f7c487366b3a82ced30923e591aaab0cdf1e4199.zip |
media: atomisp: csi2-bridge: Add support for setting "clock-" and "link-frequencies" props
Some standard v4l2 sensor drivers from drivers/media/i2c expect a
"clock-frequency" property on the device indicating the frequency
of the extclk for the sensor. Example of such drivers are the
ov2680 and ov5693 drivers.
The standard ov5693 sensor also expects a "link-frequencies" property.
Add support for setting both properties.
Note the "clock-frequency" prop is added before the "rotation" prop while
the "link-frequencies" are added at the end to match the ipu3 cio2-bridge
code from which this is derived.
Link: https://lore.kernel.org/r/20230606133136.23619-1-hdegoede@redhat.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp_csi2.h')
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp_csi2.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_csi2.h b/drivers/staging/media/atomisp/pci/atomisp_csi2.h index b389ccda5e98..16ddb3ab2963 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_csi2.h +++ b/drivers/staging/media/atomisp/pci/atomisp_csi2.h @@ -31,6 +31,7 @@ #define CSI2_PADS_NUM 2 #define CSI2_MAX_LANES 4 +#define CSI2_MAX_LINK_FREQS 3 #define CSI2_MAX_ACPI_GPIOS 2u @@ -64,10 +65,12 @@ enum atomisp_csi2_sensor_swnodes { }; struct atomisp_csi2_property_names { + char clock_frequency[16]; char rotation[9]; char bus_type[9]; char data_lanes[11]; char remote_endpoint[16]; + char link_frequencies[17]; }; struct atomisp_csi2_node_names { @@ -79,6 +82,8 @@ struct atomisp_csi2_node_names { struct atomisp_csi2_sensor_config { const char *hid; int lanes; + int nr_link_freqs; + u64 link_freqs[CSI2_MAX_LINK_FREQS]; }; struct atomisp_csi2_sensor { @@ -93,10 +98,10 @@ struct atomisp_csi2_sensor { struct software_node swnodes[SWNODE_COUNT]; struct atomisp_csi2_node_names node_names; struct atomisp_csi2_property_names prop_names; - /* "rotation" + terminating entry */ - struct property_entry dev_properties[2]; - /* "bus-type", "data-lanes", "remote-endpoint" + terminating entry */ - struct property_entry ep_properties[4]; + /* "clock-frequency", "rotation" + terminating entry */ + struct property_entry dev_properties[3]; + /* "bus-type", "data-lanes", "remote-endpoint" + "link-freq" + terminating entry */ + struct property_entry ep_properties[5]; /* "data-lanes", "remote-endpoint" + terminating entry */ struct property_entry csi2_properties[3]; struct software_node_ref_args local_ref[1]; |