Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: i2c: et8ek8: Drop support for per-mode external clock frequency

The et8ek8 driver supports programming different external clock
frequencies for different modes, but in practice all modes use a 9.6MHz
external clock. Drop support for this feature and use a hardcoded
frequency, in preparation for further refactoring of external clock
handling.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Laurent Pinchart and committed by
Mauro Carvalho Chehab
cf7ea1d6 dd235b07

+1 -19
+1 -9
drivers/media/i2c/et8ek8/et8ek8_driver.c
··· 816 816 { 817 817 struct v4l2_subdev *subdev = &sensor->subdev; 818 818 struct i2c_client *client = v4l2_get_subdevdata(subdev); 819 - unsigned int xclk_freq; 819 + unsigned int xclk_freq = 9600000; 820 820 int val, rval; 821 821 822 822 rval = regulator_enable(sensor->vana); ··· 824 824 dev_err(&client->dev, "failed to enable vana regulator\n"); 825 825 return rval; 826 826 } 827 - 828 - if (sensor->current_reglist) 829 - xclk_freq = sensor->current_reglist->mode.ext_clock; 830 - else 831 - xclk_freq = sensor->xclk_freq; 832 827 833 828 rval = clk_set_rate(sensor->ext_clk, xclk_freq); 834 829 if (rval < 0) { ··· 1078 1083 &fi->interval); 1079 1084 1080 1085 if (!reglist) 1081 - return -EINVAL; 1082 - 1083 - if (sensor->current_reglist->mode.ext_clock != reglist->mode.ext_clock) 1084 1086 return -EINVAL; 1085 1087 1086 1088 sensor->current_reglist = reglist;
-9
drivers/media/i2c/et8ek8/et8ek8_mode.c
··· 44 44 .window_width = 2592, 45 45 .window_height = 1968, 46 46 .pixel_clock = 80000000, 47 - .ext_clock = 9600000, 48 47 .timeperframe = { 49 48 .numerator = 100, 50 49 .denominator = 1207 ··· 144 145 .window_width = 2592, 145 146 .window_height = 1968, 146 147 .pixel_clock = 80000000, 147 - .ext_clock = 9600000, 148 148 .timeperframe = { 149 149 .numerator = 100, 150 150 .denominator = 1292 ··· 199 201 .window_width = 1296, 200 202 .window_height = 984, 201 203 .pixel_clock = 96533333, 202 - .ext_clock = 9600000, 203 204 .timeperframe = { 204 205 .numerator = 100, 205 206 .denominator = 3000 ··· 254 257 .window_width = 864, 255 258 .window_height = 656, 256 259 .pixel_clock = 80000000, 257 - .ext_clock = 9600000, 258 260 .timeperframe = { 259 261 .numerator = 100, 260 262 .denominator = 2988 ··· 309 313 .window_width = 648, 310 314 .window_height = 492, 311 315 .pixel_clock = 80000000, 312 - .ext_clock = 9600000, 313 316 .timeperframe = { 314 317 .numerator = 100, 315 318 .denominator = 2993 ··· 364 369 .window_width = 2592, 365 370 .window_height = 1968, 366 371 .pixel_clock = 80000000, 367 - .ext_clock = 9600000, 368 372 .timeperframe = { 369 373 .numerator = 100, 370 374 .denominator = 399 ··· 418 424 .window_width = 648, 419 425 .window_height = 492, 420 426 .pixel_clock = 13333333, 421 - .ext_clock = 9600000, 422 427 .timeperframe = { 423 428 .numerator = 100, 424 429 .denominator = 499 ··· 473 480 .window_width = 1296, 474 481 .window_height = 984, 475 482 .pixel_clock = 49400000, 476 - .ext_clock = 9600000, 477 483 .timeperframe = { 478 484 .numerator = 100, 479 485 .denominator = 501 ··· 528 536 .window_width = 1296, 529 537 .window_height = 984, 530 538 .pixel_clock = 84266667, 531 - .ext_clock = 9600000, 532 539 .timeperframe = { 533 540 .numerator = 100, 534 541 .denominator = 2500
-1
drivers/media/i2c/et8ek8/et8ek8_reg.h
··· 37 37 u16 window_height; 38 38 39 39 u32 pixel_clock; /* in Hz */ 40 - u32 ext_clock; /* in Hz */ 41 40 struct v4l2_fract timeperframe; 42 41 u32 max_exp; /* Maximum exposure value */ 43 42 u32 bus_format; /* MEDIA_BUS_FMT_ */