diff options
author | Andy Walls <awalls@radix.net> | 2009-02-21 16:42:49 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:01 -0400 |
commit | eefe1010a4657959588afc7fb3551cfa4e8bb4a7 (patch) | |
tree | a23ed1195505ce5be7cf9687bfe553ff6fa36dbc /drivers/media/video/cx18/cx18-i2c.c | |
parent | ff2a20018094c593a35f4887bbdabf8926ddb6e6 (diff) |
V4L/DVB (10759): cx18: Convert GPIO connected functions to act as v4l2_subdevices
Convert GPIO line functions, such a audio routing and device resets, to
v4l2_subdevices. This essentially completes the conversion of cx18 to the
v4l2_device/v4l2_subdevice framework. No regression testing has taken place as
of yet. Also an ivtv legacy bug with GPIO mux routing and going to/from radio
mode was commented, but not fixed.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-i2c.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-i2c.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/media/video/cx18/cx18-i2c.c b/drivers/media/video/cx18/cx18-i2c.c index 6357dc44ab5b..d092643faf46 100644 --- a/drivers/media/video/cx18/cx18-i2c.c +++ b/drivers/media/video/cx18/cx18-i2c.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include "cx18-io.h" | 26 | #include "cx18-io.h" |
27 | #include "cx18-cards.h" | 27 | #include "cx18-cards.h" |
28 | #include "cx18-gpio.h" | 28 | #include "cx18-gpio.h" |
29 | #include "cx18-av-core.h" | ||
30 | #include "cx18-i2c.h" | 29 | #include "cx18-i2c.h" |
31 | #include "cx18-irq.h" | 30 | #include "cx18-irq.h" |
32 | 31 | ||
@@ -49,7 +48,8 @@ static const u8 hw_addrs[] = { | |||
49 | CX18_CS5345_I2C_ADDR, /* CX18_HW_CS5345 */ | 48 | CX18_CS5345_I2C_ADDR, /* CX18_HW_CS5345 */ |
50 | 0, /* CX18_HW_DVB */ | 49 | 0, /* CX18_HW_DVB */ |
51 | 0, /* CX18_HW_418_AV */ | 50 | 0, /* CX18_HW_418_AV */ |
52 | 0, /* CX18_HW_GPIO_AUDIO_MUX */ | 51 | 0, /* CX18_HW_GPIO_MUX */ |
52 | 0, /* CX18_HW_GPIO_RESET_CTRL */ | ||
53 | }; | 53 | }; |
54 | 54 | ||
55 | /* This array should match the CX18_HW_ defines */ | 55 | /* This array should match the CX18_HW_ defines */ |
@@ -60,7 +60,8 @@ static const u8 hw_bus[] = { | |||
60 | 0, /* CX18_HW_CS5345 */ | 60 | 0, /* CX18_HW_CS5345 */ |
61 | 0, /* CX18_HW_DVB */ | 61 | 0, /* CX18_HW_DVB */ |
62 | 0, /* CX18_HW_418_AV */ | 62 | 0, /* CX18_HW_418_AV */ |
63 | 0, /* CX18_HW_GPIO_AUDIO_MUX */ | 63 | 0, /* CX18_HW_GPIO_MUX */ |
64 | 0, /* CX18_HW_GPIO_RESET_CTRL */ | ||
64 | }; | 65 | }; |
65 | 66 | ||
66 | /* This array should match the CX18_HW_ defines */ | 67 | /* This array should match the CX18_HW_ defines */ |
@@ -70,7 +71,8 @@ static const char * const hw_modules[] = { | |||
70 | "cs5345", /* CX18_HW_CS5345 */ | 71 | "cs5345", /* CX18_HW_CS5345 */ |
71 | NULL, /* CX18_HW_DVB */ | 72 | NULL, /* CX18_HW_DVB */ |
72 | NULL, /* CX18_HW_418_AV */ | 73 | NULL, /* CX18_HW_418_AV */ |
73 | NULL, /* CX18_HW_GPIO_AUDIO_MUX */ | 74 | NULL, /* CX18_HW_GPIO_MUX */ |
75 | NULL, /* CX18_HW_GPIO_RESET_CTRL */ | ||
74 | }; | 76 | }; |
75 | 77 | ||
76 | /* This array should match the CX18_HW_ defines */ | 78 | /* This array should match the CX18_HW_ defines */ |
@@ -80,7 +82,8 @@ static const char * const hw_devicenames[] = { | |||
80 | "cs5345", | 82 | "cs5345", |
81 | "cx23418_DTV", | 83 | "cx23418_DTV", |
82 | "cx23418_AV", | 84 | "cx23418_AV", |
83 | "gpio_audio_mux", | 85 | "gpio_mux", |
86 | "gpio_reset_ctrl", | ||
84 | }; | 87 | }; |
85 | 88 | ||
86 | int cx18_i2c_register(struct cx18 *cx, unsigned idx) | 89 | int cx18_i2c_register(struct cx18 *cx, unsigned idx) |
@@ -262,7 +265,8 @@ int init_cx18_i2c(struct cx18 *cx) | |||
262 | cx18_setscl(&cx->i2c_algo_cb_data[1], 1); | 265 | cx18_setscl(&cx->i2c_algo_cb_data[1], 1); |
263 | cx18_setsda(&cx->i2c_algo_cb_data[1], 1); | 266 | cx18_setsda(&cx->i2c_algo_cb_data[1], 1); |
264 | 267 | ||
265 | cx18_reset_i2c_slaves_gpio(cx); | 268 | cx18_call_hw(cx, CX18_HW_GPIO_RESET_CTRL, |
269 | core, reset, (u32) CX18_GPIO_RESET_I2C); | ||
266 | 270 | ||
267 | return i2c_bit_add_bus(&cx->i2c_adap[0]) || | 271 | return i2c_bit_add_bus(&cx->i2c_adap[0]) || |
268 | i2c_bit_add_bus(&cx->i2c_adap[1]); | 272 | i2c_bit_add_bus(&cx->i2c_adap[1]); |