/* activate/deactivate link with host; minimize power usage for inactive links by cutting clocks and transceiver power.  */
static void pullup(struct at91_udc *udc, int is_on)
/* activate/deactivate link with host; minimize power usage for inactive links by cutting clocks and transceiver power.  */
static void pullup(struct at91_udc *udc, int is_on)
{
	if (!udc->enabled || !udc->vbus)
		is_on = 0;
	DBG("%sactive\n", is_on ? "" : "in");
	if (is_on) {
		clk_on(udc);
		at91_udp_write(udc, AT91_UDP_ICR, AT91_UDP_RXRSM);
		at91_udp_write(udc, AT91_UDP_TXVC, 0);
	} else {
		stop_activity(udc);
		at91_udp_write(udc, AT91_UDP_IDR, AT91_UDP_RXRSM);
		at91_udp_write(udc, AT91_UDP_TXVC, AT91_UDP_TXVC_TXVDIS);
		clk_off(udc);
	}
	if (udc->caps && udc->caps->pullup)
		udc->caps->pullup(udc, is_on);
}