コード例 #1
0
static int stx7108_usb_init(struct stm_device_state *device_state)
{
	/* USB edge rise and DC shift - STLinux Bugzilla 10991 */
	stm_device_sysconf_write(device_state, USB_PHY_INDCSHIFT, 0);
	stm_device_sysconf_write(device_state, USB_PHY_INEDGECTL, 1);

	return 0;
}
コード例 #2
0
static int stih415_usb_init(struct stm_device_state *device_state)
{
#if 1
	stm_device_sysconf_write(device_state, USB_IN_DC_SHIFT, 1);
	stm_device_sysconf_write(device_state, USB_IN_EDGE_CTRL, 0);
#else
	stm_device_sysconf_write(device_state, USB_IN_DC_SHIFT, 0);
	stm_device_sysconf_write(device_state, USB_IN_EDGE_CTRL, 1);
#endif

	return 0;
}
コード例 #3
0
ファイル: stx5206.c プロジェクト: coolshou/kernel-pdk7105
/* Internal temperature sensor resources ---------------------------------- */
static void stx5206_temp_power(struct stm_device_state *device_state,
		enum stm_device_power_state power)
{
	int value = (power == stm_device_power_on) ? 1 : 0;

	stm_device_sysconf_write(device_state, "TEMP_PWR", value);
}
コード例 #4
0
static void stx7100_usb_power(struct stm_device_state *device_state,
		enum stm_device_power_state power)
{
	stm_device_sysconf_write(device_state, USB_PWR, 
		(power == stm_device_power_on) ? 0 : 1);
	mdelay(30);
}
コード例 #5
0
static void stxh205_usb_power(struct stm_device_state *device_state,
		enum stm_device_power_state power)
{
	int i;
	int value = (power == stm_device_power_on) ? 0 : 1;

	stm_device_sysconf_write(device_state, USB_HOST_PWR, value);

	for (i = 5; i; --i) {
		if (stm_device_sysconf_read(device_state, USB_PWR_ACK)
			== value)
			break;
		mdelay(10);
	}
}
コード例 #6
0
ファイル: stx5206.c プロジェクト: coolshou/kernel-pdk7105
static void stx5206_emi_power(struct stm_device_state *device_state,
		enum stm_device_power_state power)
{
	int i;
	int value = (power == stm_device_power_on) ? 0 : 1;

	stm_device_sysconf_write(device_state, "EMI_PWR", value);
	for (i = 5; i; --i) {
		if (stm_device_sysconf_read(device_state, "EMI_ACK")
			== value)
			break;
		mdelay(10);
	}

	return;
}