aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@iki.fi>2015-03-25 18:57:30 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-02 15:41:01 -0400
commit6890874772e4c5e2925187f262893df0eb0322ba (patch)
tree474cac6b5ec549f201648746b428a6fa8b6df1ef /include/media
parent4c8f14861cccb7b19cfd582e135847aa772f3854 (diff)
[media] omap3isp: Refactor device configuration structs for Device Tree
Make omap3isp configuration data structures more suitable for consumption by the DT by separating the I2C bus information of all the sub-devices in a group and the ISP bus information from each other. The ISP bus information is made a pointer instead of being directly embedded in the struct. In the case of the DT only the sensor specific information on the ISP bus configuration is retained. The structs are renamed to reflect that. After this change the structs needed to describe device configuration can be allocated and accessed separately without those needed only in the case of platform data. The platform data related structs can be later removed once the support for platform data can be removed. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Igor Grinberg <grinberg@compulab.co.il> (for cm-t35) Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/omap3isp.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/include/media/omap3isp.h b/include/media/omap3isp.h
index 398279dd1922..39e0748b0d31 100644
--- a/include/media/omap3isp.h
+++ b/include/media/omap3isp.h
@@ -45,7 +45,7 @@ enum {
45}; 45};
46 46
47/** 47/**
48 * struct isp_parallel_platform_data - Parallel interface platform data 48 * struct isp_parallel_cfg - Parallel interface configuration
49 * @data_lane_shift: Data lane shifter 49 * @data_lane_shift: Data lane shifter
50 * ISP_LANE_SHIFT_0 - CAMEXT[13:0] -> CAM[13:0] 50 * ISP_LANE_SHIFT_0 - CAMEXT[13:0] -> CAM[13:0]
51 * ISP_LANE_SHIFT_2 - CAMEXT[13:2] -> CAM[11:0] 51 * ISP_LANE_SHIFT_2 - CAMEXT[13:2] -> CAM[11:0]
@@ -62,7 +62,7 @@ enum {
62 * @data_pol: Data polarity 62 * @data_pol: Data polarity
63 * 0 - Normal, 1 - One's complement 63 * 0 - Normal, 1 - One's complement
64 */ 64 */
65struct isp_parallel_platform_data { 65struct isp_parallel_cfg {
66 unsigned int data_lane_shift:2; 66 unsigned int data_lane_shift:2;
67 unsigned int clk_pol:1; 67 unsigned int clk_pol:1;
68 unsigned int hs_pol:1; 68 unsigned int hs_pol:1;
@@ -105,7 +105,7 @@ struct isp_csiphy_lanes_cfg {
105}; 105};
106 106
107/** 107/**
108 * struct isp_ccp2_platform_data - CCP2 interface platform data 108 * struct isp_ccp2_cfg - CCP2 interface configuration
109 * @strobe_clk_pol: Strobe/clock polarity 109 * @strobe_clk_pol: Strobe/clock polarity
110 * 0 - Non Inverted, 1 - Inverted 110 * 0 - Non Inverted, 1 - Inverted
111 * @crc: Enable the cyclic redundancy check 111 * @crc: Enable the cyclic redundancy check
@@ -117,7 +117,7 @@ struct isp_csiphy_lanes_cfg {
117 * ISP_CCP2_PHY_DATA_STROBE - Data/strobe physical layer 117 * ISP_CCP2_PHY_DATA_STROBE - Data/strobe physical layer
118 * @vpclk_div: Video port output clock control 118 * @vpclk_div: Video port output clock control
119 */ 119 */
120struct isp_ccp2_platform_data { 120struct isp_ccp2_cfg {
121 unsigned int strobe_clk_pol:1; 121 unsigned int strobe_clk_pol:1;
122 unsigned int crc:1; 122 unsigned int crc:1;
123 unsigned int ccp2_mode:1; 123 unsigned int ccp2_mode:1;
@@ -127,31 +127,31 @@ struct isp_ccp2_platform_data {
127}; 127};
128 128
129/** 129/**
130 * struct isp_csi2_platform_data - CSI2 interface platform data 130 * struct isp_csi2_cfg - CSI2 interface configuration
131 * @crc: Enable the cyclic redundancy check 131 * @crc: Enable the cyclic redundancy check
132 * @vpclk_div: Video port output clock control 132 * @vpclk_div: Video port output clock control
133 */ 133 */
134struct isp_csi2_platform_data { 134struct isp_csi2_cfg {
135 unsigned crc:1; 135 unsigned crc:1;
136 unsigned vpclk_div:2; 136 unsigned vpclk_div:2;
137 struct isp_csiphy_lanes_cfg lanecfg; 137 struct isp_csiphy_lanes_cfg lanecfg;
138}; 138};
139 139
140struct isp_subdev_i2c_board_info { 140struct isp_bus_cfg {
141 struct i2c_board_info *board_info;
142 int i2c_adapter_id;
143};
144
145struct isp_v4l2_subdevs_group {
146 struct isp_subdev_i2c_board_info *subdevs;
147 enum isp_interface_type interface; 141 enum isp_interface_type interface;
148 union { 142 union {
149 struct isp_parallel_platform_data parallel; 143 struct isp_parallel_cfg parallel;
150 struct isp_ccp2_platform_data ccp2; 144 struct isp_ccp2_cfg ccp2;
151 struct isp_csi2_platform_data csi2; 145 struct isp_csi2_cfg csi2;
152 } bus; /* gcc < 4.6.0 chokes on anonymous union initializers */ 146 } bus; /* gcc < 4.6.0 chokes on anonymous union initializers */
153}; 147};
154 148
149struct isp_platform_subdev {
150 struct i2c_board_info *board_info;
151 int i2c_adapter_id;
152 struct isp_bus_cfg *bus;
153};
154
155struct isp_platform_xclk { 155struct isp_platform_xclk {
156 const char *dev_id; 156 const char *dev_id;
157 const char *con_id; 157 const char *con_id;
@@ -159,7 +159,7 @@ struct isp_platform_xclk {
159 159
160struct isp_platform_data { 160struct isp_platform_data {
161 struct isp_platform_xclk xclks[2]; 161 struct isp_platform_xclk xclks[2];
162 struct isp_v4l2_subdevs_group *subdevs; 162 struct isp_platform_subdev *subdevs;
163 void (*set_constraints)(struct isp_device *isp, bool enable); 163 void (*set_constraints)(struct isp_device *isp, bool enable);
164}; 164};
165 165