mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
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>
This commit is contained in:
parent
dd235b07b6
commit
cf7ea1d6e5
|
|
@ -816,7 +816,7 @@ static int et8ek8_power_on(struct et8ek8_sensor *sensor)
|
|||
{
|
||||
struct v4l2_subdev *subdev = &sensor->subdev;
|
||||
struct i2c_client *client = v4l2_get_subdevdata(subdev);
|
||||
unsigned int xclk_freq;
|
||||
unsigned int xclk_freq = 9600000;
|
||||
int val, rval;
|
||||
|
||||
rval = regulator_enable(sensor->vana);
|
||||
|
|
@ -825,11 +825,6 @@ static int et8ek8_power_on(struct et8ek8_sensor *sensor)
|
|||
return rval;
|
||||
}
|
||||
|
||||
if (sensor->current_reglist)
|
||||
xclk_freq = sensor->current_reglist->mode.ext_clock;
|
||||
else
|
||||
xclk_freq = sensor->xclk_freq;
|
||||
|
||||
rval = clk_set_rate(sensor->ext_clk, xclk_freq);
|
||||
if (rval < 0) {
|
||||
dev_err(&client->dev, "unable to set extclk clock freq to %u\n",
|
||||
|
|
@ -1085,9 +1080,6 @@ static int et8ek8_set_frame_interval(struct v4l2_subdev *subdev,
|
|||
if (!reglist)
|
||||
return -EINVAL;
|
||||
|
||||
if (sensor->current_reglist->mode.ext_clock != reglist->mode.ext_clock)
|
||||
return -EINVAL;
|
||||
|
||||
sensor->current_reglist = reglist;
|
||||
et8ek8_update_controls(sensor);
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ static struct et8ek8_reglist mode1_poweron_mode2_16vga_2592x1968_12_07fps = {
|
|||
.window_width = 2592,
|
||||
.window_height = 1968,
|
||||
.pixel_clock = 80000000,
|
||||
.ext_clock = 9600000,
|
||||
.timeperframe = {
|
||||
.numerator = 100,
|
||||
.denominator = 1207
|
||||
|
|
@ -145,7 +144,6 @@ static struct et8ek8_reglist mode1_16vga_2592x1968_13_12fps_dpcm10_8 = {
|
|||
.window_width = 2592,
|
||||
.window_height = 1968,
|
||||
.pixel_clock = 80000000,
|
||||
.ext_clock = 9600000,
|
||||
.timeperframe = {
|
||||
.numerator = 100,
|
||||
.denominator = 1292
|
||||
|
|
@ -201,7 +199,6 @@ static struct et8ek8_reglist mode3_4vga_1296x984_29_99fps_dpcm10_8 = {
|
|||
.window_width = 1296,
|
||||
.window_height = 984,
|
||||
.pixel_clock = 96533333,
|
||||
.ext_clock = 9600000,
|
||||
.timeperframe = {
|
||||
.numerator = 100,
|
||||
.denominator = 3000
|
||||
|
|
@ -257,7 +254,6 @@ static struct et8ek8_reglist mode4_svga_864x656_29_88fps = {
|
|||
.window_width = 864,
|
||||
.window_height = 656,
|
||||
.pixel_clock = 80000000,
|
||||
.ext_clock = 9600000,
|
||||
.timeperframe = {
|
||||
.numerator = 100,
|
||||
.denominator = 2988
|
||||
|
|
@ -313,7 +309,6 @@ static struct et8ek8_reglist mode5_vga_648x492_29_93fps = {
|
|||
.window_width = 648,
|
||||
.window_height = 492,
|
||||
.pixel_clock = 80000000,
|
||||
.ext_clock = 9600000,
|
||||
.timeperframe = {
|
||||
.numerator = 100,
|
||||
.denominator = 2993
|
||||
|
|
@ -369,7 +364,6 @@ static struct et8ek8_reglist mode2_16vga_2592x1968_3_99fps = {
|
|||
.window_width = 2592,
|
||||
.window_height = 1968,
|
||||
.pixel_clock = 80000000,
|
||||
.ext_clock = 9600000,
|
||||
.timeperframe = {
|
||||
.numerator = 100,
|
||||
.denominator = 399
|
||||
|
|
@ -424,7 +418,6 @@ static struct et8ek8_reglist mode_648x492_5fps = {
|
|||
.window_width = 648,
|
||||
.window_height = 492,
|
||||
.pixel_clock = 13333333,
|
||||
.ext_clock = 9600000,
|
||||
.timeperframe = {
|
||||
.numerator = 100,
|
||||
.denominator = 499
|
||||
|
|
@ -480,7 +473,6 @@ static struct et8ek8_reglist mode3_4vga_1296x984_5fps = {
|
|||
.window_width = 1296,
|
||||
.window_height = 984,
|
||||
.pixel_clock = 49400000,
|
||||
.ext_clock = 9600000,
|
||||
.timeperframe = {
|
||||
.numerator = 100,
|
||||
.denominator = 501
|
||||
|
|
@ -536,7 +528,6 @@ static struct et8ek8_reglist mode_4vga_1296x984_25fps_dpcm10_8 = {
|
|||
.window_width = 1296,
|
||||
.window_height = 984,
|
||||
.pixel_clock = 84266667,
|
||||
.ext_clock = 9600000,
|
||||
.timeperframe = {
|
||||
.numerator = 100,
|
||||
.denominator = 2500
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ struct et8ek8_mode {
|
|||
u16 window_height;
|
||||
|
||||
u32 pixel_clock; /* in Hz */
|
||||
u32 ext_clock; /* in Hz */
|
||||
struct v4l2_fract timeperframe;
|
||||
u32 max_exp; /* Maximum exposure value */
|
||||
u32 bus_format; /* MEDIA_BUS_FMT_ */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user