Commit f04eedb9 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

media: atomisp: csi2-bridge: Switch to new common ipu_bridge_init()

Remove the duplicate IPU ACPI bridge code and use the new
shared ipu_bridge_init() functionality.

Note this will also use / assume v4l2-async device instantiation for
ov5693 sensors on atomisp devices since ipu_supported_sensors[]
already contains a match for this.

This is fine since recent atomisp improvements allow the atomisp code
to work with generic v4l2 sensor drivers and using an unmodified
drivers/media/i2c/ov5693.c has been successfully tested on
an Acer Iconia W4 820 tablet with an ISP2400 + OV5693 sensor.
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: default avatarDaniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 8e3e916e
......@@ -12,9 +12,12 @@ menuconfig INTEL_ATOMISP
config VIDEO_ATOMISP
tristate "Intel Atom Image Signal Processor Driver"
depends on VIDEO_DEV && INTEL_ATOMISP
depends on MEDIA_PCI_SUPPORT
depends on PMIC_OPREGION
depends on I2C
select V4L2_FWNODE
select IOSF_MBI
select IPU_BRIDGE
select VIDEOBUF2_VMALLOC
select VIDEO_V4L2_SUBDEV_API
help
......
......@@ -30,9 +30,6 @@
#define CSI2_PAD_SOURCE 1
#define CSI2_PADS_NUM 2
#define CSI2_MAX_LANES 4
#define CSI2_MAX_LINK_FREQS 3
#define CSI2_MAX_ACPI_GPIOS 2u
struct acpi_device;
......@@ -55,70 +52,6 @@ struct atomisp_csi2_acpi_gpio_parsing_data {
unsigned int map_count;
};
enum atomisp_csi2_sensor_swnodes {
SWNODE_SENSOR,
SWNODE_SENSOR_PORT,
SWNODE_SENSOR_ENDPOINT,
SWNODE_CSI2_PORT,
SWNODE_CSI2_ENDPOINT,
SWNODE_COUNT
};
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 {
char port[7];
char endpoint[11];
char remote_port[7];
};
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 {
/* Append port in "-%u" format as suffix of HID */
char name[ACPI_ID_LEN + 4];
struct acpi_device *adev;
int port;
int lanes;
/* SWNODE_COUNT + 1 for terminating NULL */
const struct software_node *group[SWNODE_COUNT + 1];
struct software_node swnodes[SWNODE_COUNT];
struct atomisp_csi2_node_names node_names;
struct atomisp_csi2_property_names prop_names;
/* "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];
struct software_node_ref_args remote_ref[1];
struct software_node_ref_args vcm_ref[1];
/* GPIO mappings storage */
struct atomisp_csi2_acpi_gpio_map gpio_map;
};
struct atomisp_csi2_bridge {
struct software_node csi2_node;
char csi2_node_name[14];
u32 data_lanes[CSI2_MAX_LANES];
unsigned int n_sensors;
struct atomisp_csi2_sensor sensors[ATOMISP_CAMERA_NR_PORTS];
};
struct atomisp_mipi_csi2_device {
struct v4l2_subdev subdev;
struct media_pad pads[CSI2_PADS_NUM];
......
......@@ -1615,3 +1615,4 @@ MODULE_AUTHOR("Wen Wang <wen.w.wang@intel.com>");
MODULE_AUTHOR("Xiaolin Zhang <xiaolin.zhang@intel.com>");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Intel ATOM Platform ISP Driver");
MODULE_IMPORT_NS(INTEL_IPU_BRIDGE);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment