diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-25 05:05:06 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 14:53:41 -0500 |
commit | a2070c665459ac37a36bebae5e97bb4a2568990e (patch) | |
tree | 1ceaae36fa9a2c937acf835c8f50ebf3dd402de8 /drivers/media/video/em28xx/em28xx.h | |
parent | 6d676d8af852e483044837240ad9ca669a01aaf2 (diff) |
V4L/DVB (9747): em28xx: Properly handles XCLK and I2C speed
The previous patches removed XCLK and I2C magic. Now, we finally know
what those registers do. Also, only a very few cards need different
setups for those.
Instead of keeping the setups for those values inside the per-device
hack magic switch, move the uncommon values to the board-specific
struct, and have a common setup for all other boards.
So, almost 100 lines of hacking magic were removed.
A co-lateral effect of this patch is that it also fixes a bug at em28xx-core, where xclk
were set, without taking any care about not overriding a previous xclk setup.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx.h')
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 4d50d60278c5..3bf23d384266 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -338,12 +338,13 @@ struct em28xx_board { | |||
338 | unsigned int is_em2800:1; | 338 | unsigned int is_em2800:1; |
339 | unsigned int has_msp34xx:1; | 339 | unsigned int has_msp34xx:1; |
340 | unsigned int mts_firmware:1; | 340 | unsigned int mts_firmware:1; |
341 | unsigned int has_12mhz_i2s:1; | ||
342 | unsigned int max_range_640_480:1; | 341 | unsigned int max_range_640_480:1; |
343 | unsigned int has_dvb:1; | 342 | unsigned int has_dvb:1; |
344 | unsigned int has_snapshot_button:1; | 343 | unsigned int has_snapshot_button:1; |
345 | unsigned int valid:1; | 344 | unsigned int valid:1; |
346 | 345 | ||
346 | unsigned char xclk, i2c_speed; | ||
347 | |||
347 | enum em28xx_decoder decoder; | 348 | enum em28xx_decoder decoder; |
348 | 349 | ||
349 | struct em28xx_input input[MAX_EM28XX_INPUT]; | 350 | struct em28xx_input input[MAX_EM28XX_INPUT]; |
@@ -422,12 +423,13 @@ struct em28xx { | |||
422 | unsigned int stream_on:1; /* Locks streams */ | 423 | unsigned int stream_on:1; /* Locks streams */ |
423 | unsigned int has_audio_class:1; | 424 | unsigned int has_audio_class:1; |
424 | unsigned int has_alsa_audio:1; | 425 | unsigned int has_alsa_audio:1; |
425 | unsigned int has_12mhz_i2s:1; | ||
426 | unsigned int max_range_640_480:1; | 426 | unsigned int max_range_640_480:1; |
427 | unsigned int has_dvb:1; | 427 | unsigned int has_dvb:1; |
428 | unsigned int has_snapshot_button:1; | 428 | unsigned int has_snapshot_button:1; |
429 | unsigned int valid:1; /* report for validated boards */ | 429 | unsigned int valid:1; /* report for validated boards */ |
430 | 430 | ||
431 | unsigned char xclk, i2c_speed; | ||
432 | |||
431 | struct em28xx_IR *ir; | 433 | struct em28xx_IR *ir; |
432 | 434 | ||
433 | /* Some older em28xx chips needs a waiting time after writing */ | 435 | /* Some older em28xx chips needs a waiting time after writing */ |