[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1310151047100.1377-100000@iolanthe.rowland.org>
Date: Tue, 15 Oct 2013 10:48:59 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: H Hartley Sweeten <hartleys@...ionengravers.com>
cc: linux-usb@...r.kernel.org,
ARM Kernel <linux-arm-kernel@...ts.infradead.org>,
Linux Kernel <linux-kernel@...r.kernel.org>,
<gregkh@...uxfoundation.org>, Ryan Mallon <rmallon@...il.com>
Subject: Re: [PATCH] usb: ohci: remove ep93xx bus glue platform driver
On Mon, 14 Oct 2013, H Hartley Sweeten wrote:
> Convert ep93xx to use the OHCI platform driver and remove the
> ohci-ep93xx bus glue driver.
>
> Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
> Cc: Alan Stern <stern@...land.harvard.edu>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Ryan Mallon <rmallon@...il.com>
...
> @@ -297,22 +298,58 @@ static struct platform_device ep93xx_rtc_device = {
> .resource = ep93xx_rtc_resource,
> };
>
> +/*************************************************************************
> + * EP93xx OHCI USB Host
> + *************************************************************************/
> +
> +static struct clk *ep93xx_ohci_host_clock;
> +
> +static int ep93xx_ohci_power_on(struct platform_device *pdev)
> +{
> + if (!ep93xx_ohci_host_clock) {
> + ep93xx_ohci_host_clock = devm_clk_get(&pdev->dev, NULL);
> + if (IS_ERR(ep93xx_ohci_host_clock))
> + return PTR_ERR(ep93xx_ohci_host_clock);
> + }
> +
> + clk_enable(ep93xx_ohci_host_clock);
> +
> + return 0;
> +}
> +
> +static void ep93xx_ohci_power_off(struct platform_device *pdev)
> +{
> + clk_disable(ep93xx_ohci_host_clock);
> +}
> +
> +static void ep93xx_ohci_power_suspend(struct platform_device *pdev)
> +{
> + ep93xx_ohci_power_off(pdev);
> +}
> +
> +static struct usb_ohci_pdata ep93xx_ohci_pdata = {
> + .power_on = ep93xx_ohci_power_on,
> + .power_off = ep93xx_ohci_power_off,
> + .power_suspend = ep93xx_ohci_power_suspend,
> +};
You don't need to have a separate ep93xx_ohci_power_suspend() routine.
Just initialize the method entry for .power_suspend to point to
ep93xx_ohci_power_off.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists