static void cx18_load_and_init_modules(struct cx18 *cx) { u32 hw = cx->card->hw_all; int i; #ifdef MODULE /* load modules */ #ifndef CONFIG_MEDIA_TUNER hw = cx18_request_module(cx, hw, "tuner", CX18_HW_TUNER); #endif #ifndef CONFIG_VIDEO_CS5345 hw = cx18_request_module(cx, hw, "cs5345", CX18_HW_CS5345); #endif #endif /* check which i2c devices are actually found */ for (i = 0; i < 32; i++) { u32 device = 1 << i; if (!(device & hw)) continue; if (device == CX18_HW_GPIO || device == CX18_HW_TVEEPROM || device == CX18_HW_CX23418 || device == CX18_HW_DVB) { /* These 'devices' do not use i2c probing */ cx->hw_flags |= device; continue; } cx18_i2c_register(cx, i); if (cx18_i2c_hw_addr(cx, device) > 0) cx->hw_flags |= device; } hw = cx->hw_flags; }
static void cx18_init_subdevs(struct cx18 *cx) { u32 hw = cx->card->hw_all; u32 device; int i; for (i = 0, device = 1; i < 32; i++, device <<= 1) { if (!(device & hw)) continue; switch (device) { case CX18_HW_DVB: case CX18_HW_TVEEPROM: /* These subordinate devices do not use probing */ cx->hw_flags |= device; break; case CX18_HW_418_AV: /* The A/V decoder gets probed earlier to set PLLs */ /* Just note that the card uses it (i.e. has analog) */ cx->hw_flags |= device; break; case CX18_HW_GPIO_RESET_CTRL: /* * The Reset Controller gets probed and added to * hw_flags earlier for i2c adapter/bus initialization */ break; case CX18_HW_GPIO_MUX: if (cx18_gpio_register(cx, device) == 0) cx->hw_flags |= device; break; default: if (cx18_i2c_register(cx, i) == 0) cx->hw_flags |= device; break; } } if (cx->hw_flags & CX18_HW_418_AV) cx->sd_av = cx18_find_hw(cx, CX18_HW_418_AV); if (cx->card->hw_muxer != 0) cx->sd_extmux = cx18_find_hw(cx, cx->card->hw_muxer); }
static void cx18_init_subdevs(struct cx18 *cx) { u32 hw = cx->card->hw_all; u32 device; int i; for (i = 0, device = 1; i < 32; i++, device <<= 1) { if (!(device & hw)) continue; switch (device) { case CX18_HW_DVB: case CX18_HW_TVEEPROM: cx->hw_flags |= device; break; case CX18_HW_418_AV: cx->hw_flags |= device; break; case CX18_HW_GPIO_RESET_CTRL: break; case CX18_HW_GPIO_MUX: if (cx18_gpio_register(cx, device) == 0) cx->hw_flags |= device; break; default: if (cx18_i2c_register(cx, i) == 0) cx->hw_flags |= device; break; } } if (cx->hw_flags & CX18_HW_418_AV) cx->sd_av = cx18_find_hw(cx, CX18_HW_418_AV); if (cx->card->hw_muxer != 0) cx->sd_extmux = cx18_find_hw(cx, cx->card->hw_muxer); }