static int xudc_suspend(struct device *dev)
{
	struct xusb_udc *udc;
	u32 crtlreg;
	unsigned long flags;

	udc = dev_get_drvdata(dev);

	spin_lock_irqsave(&udc->lock, flags);

	crtlreg = udc->read_fn(udc->addr + XUSB_CONTROL_OFFSET);
	crtlreg &= ~XUSB_CONTROL_USB_READY_MASK;

	udc->write_fn(udc->addr, XUSB_CONTROL_OFFSET, crtlreg);

	spin_unlock_irqrestore(&udc->lock, flags);
	if (udc->driver && udc->driver->suspend)
		udc->driver->suspend(&udc->gadget);

	clk_disable(udc->clk);

	return 0;
}
static int xudc_suspend(struct device *dev)
{
	struct xusb_udc *udc;
	u32 crtlreg;
	unsigned long flags;

	udc = dev_get_drvdata(dev);

	spin_lock_irqsave(&udc->lock, flags);

	crtlreg = udc->read_fn(udc->addr + XUSB_CONTROL_OFFSET);
	crtlreg &= ~XUSB_CONTROL_USB_READY_MASK;

	udc->write_fn(udc->addr, XUSB_CONTROL_OFFSET, crtlreg);

	spin_unlock_irqrestore(&udc->lock, flags);
	if (udc->driver && udc->driver->suspend)
		udc->driver->suspend(&udc->gadget);

	clk_disable(udc->clk);

	return 0;
}