示例#1
0
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);
}
示例#2
0
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);
}