diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-02-15 13:00:20 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-23 10:00:52 -0400 |
commit | 34a518a0794135f8ac4031e2ebe1a26d29bd008c (patch) | |
tree | f4f77b0c0dc431ef557703bc5e4884e2d2860236 | |
parent | 9b30af98b42ea5ff33768faaaf246a6c8efb6163 (diff) |
[media] s5p-tv: remove the dv_preset API from hdmiphy
The dv_preset API is deprecated and is replaced by the much improved dv_timings
API. Remove the dv_preset support from this driver as this will allow us to
remove the dv_preset API altogether (s5p-tv being the last user of this code).
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/platform/s5p-tv/hdmiphy_drv.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/drivers/media/platform/s5p-tv/hdmiphy_drv.c b/drivers/media/platform/s5p-tv/hdmiphy_drv.c index ef0d8122f3e9..e19a0af1ea4f 100644 --- a/drivers/media/platform/s5p-tv/hdmiphy_drv.c +++ b/drivers/media/platform/s5p-tv/hdmiphy_drv.c | |||
@@ -176,27 +176,6 @@ static inline struct hdmiphy_ctx *sd_to_ctx(struct v4l2_subdev *sd) | |||
176 | return container_of(sd, struct hdmiphy_ctx, sd); | 176 | return container_of(sd, struct hdmiphy_ctx, sd); |
177 | } | 177 | } |
178 | 178 | ||
179 | static unsigned long hdmiphy_preset_to_pixclk(u32 preset) | ||
180 | { | ||
181 | static const unsigned long pixclk[] = { | ||
182 | [V4L2_DV_480P59_94] = 27000000, | ||
183 | [V4L2_DV_576P50] = 27000000, | ||
184 | [V4L2_DV_720P59_94] = 74176000, | ||
185 | [V4L2_DV_720P50] = 74250000, | ||
186 | [V4L2_DV_720P60] = 74250000, | ||
187 | [V4L2_DV_1080P24] = 74250000, | ||
188 | [V4L2_DV_1080P30] = 74250000, | ||
189 | [V4L2_DV_1080I50] = 74250000, | ||
190 | [V4L2_DV_1080I60] = 74250000, | ||
191 | [V4L2_DV_1080P50] = 148500000, | ||
192 | [V4L2_DV_1080P60] = 148500000, | ||
193 | }; | ||
194 | if (preset < ARRAY_SIZE(pixclk)) | ||
195 | return pixclk[preset]; | ||
196 | else | ||
197 | return 0; | ||
198 | } | ||
199 | |||
200 | static const u8 *hdmiphy_find_conf(unsigned long pixclk, | 179 | static const u8 *hdmiphy_find_conf(unsigned long pixclk, |
201 | const struct hdmiphy_conf *conf) | 180 | const struct hdmiphy_conf *conf) |
202 | { | 181 | { |
@@ -212,37 +191,6 @@ static int hdmiphy_s_power(struct v4l2_subdev *sd, int on) | |||
212 | return 0; | 191 | return 0; |
213 | } | 192 | } |
214 | 193 | ||
215 | static int hdmiphy_s_dv_preset(struct v4l2_subdev *sd, | ||
216 | struct v4l2_dv_preset *preset) | ||
217 | { | ||
218 | const u8 *data = NULL; | ||
219 | u8 buffer[32]; | ||
220 | int ret; | ||
221 | struct hdmiphy_ctx *ctx = sd_to_ctx(sd); | ||
222 | struct i2c_client *client = v4l2_get_subdevdata(sd); | ||
223 | unsigned long pixclk; | ||
224 | struct device *dev = &client->dev; | ||
225 | |||
226 | dev_info(dev, "s_dv_preset(preset = %d)\n", preset->preset); | ||
227 | |||
228 | pixclk = hdmiphy_preset_to_pixclk(preset->preset); | ||
229 | data = hdmiphy_find_conf(pixclk, ctx->conf_tab); | ||
230 | if (!data) { | ||
231 | dev_err(dev, "format not supported\n"); | ||
232 | return -EINVAL; | ||
233 | } | ||
234 | |||
235 | /* storing configuration to the device */ | ||
236 | memcpy(buffer, data, 32); | ||
237 | ret = i2c_master_send(client, buffer, 32); | ||
238 | if (ret != 32) { | ||
239 | dev_err(dev, "failed to configure HDMIPHY via I2C\n"); | ||
240 | return -EIO; | ||
241 | } | ||
242 | |||
243 | return 0; | ||
244 | } | ||
245 | |||
246 | static int hdmiphy_s_dv_timings(struct v4l2_subdev *sd, | 194 | static int hdmiphy_s_dv_timings(struct v4l2_subdev *sd, |
247 | struct v4l2_dv_timings *timings) | 195 | struct v4l2_dv_timings *timings) |
248 | { | 196 | { |
@@ -310,7 +258,6 @@ static const struct v4l2_subdev_core_ops hdmiphy_core_ops = { | |||
310 | }; | 258 | }; |
311 | 259 | ||
312 | static const struct v4l2_subdev_video_ops hdmiphy_video_ops = { | 260 | static const struct v4l2_subdev_video_ops hdmiphy_video_ops = { |
313 | .s_dv_preset = hdmiphy_s_dv_preset, | ||
314 | .s_dv_timings = hdmiphy_s_dv_timings, | 261 | .s_dv_timings = hdmiphy_s_dv_timings, |
315 | .dv_timings_cap = hdmiphy_dv_timings_cap, | 262 | .dv_timings_cap = hdmiphy_dv_timings_cap, |
316 | .s_stream = hdmiphy_s_stream, | 263 | .s_stream = hdmiphy_s_stream, |