From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 05/14] USB: Chipidea: rename struct ci13xxx_udc_driver to struct ci13xxx_platform_data
Date: Tue, 26 Jun 2012 23:54:03 +0200 [thread overview]
Message-ID: <201206262354.03543.marex@denx.de> (raw)
In-Reply-To: <1340607391-16380-6-git-send-email-richard.zhao@freescale.com>
Dear Richard Zhao,
> This patch rename struct ci13xxx_udc_driver and var with the type.
>
> ci13xxx_platform_data reflect it's passed from platfrom driver.
Maybe rather driver data? As platform_data has certain different conotation to
it.
>
> Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
> Reviewed-by: Felipe Balbi <balbi@ti.com>
> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> ---
> drivers/usb/chipidea/ci.h | 4 ++--
> drivers/usb/chipidea/ci13xxx_msm.c | 6 +++---
> drivers/usb/chipidea/ci13xxx_pci.c | 20 ++++++++++----------
> drivers/usb/chipidea/core.c | 12 ++++++------
> drivers/usb/chipidea/host.c | 2 +-
> drivers/usb/chipidea/udc.c | 24 ++++++++++++------------
> include/linux/usb/chipidea.h | 2 +-
> 7 files changed, 35 insertions(+), 35 deletions(-)
>
> diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h
> index 50911f8..0b09330 100644
> --- a/drivers/usb/chipidea/ci.h
> +++ b/drivers/usb/chipidea/ci.h
> @@ -125,7 +125,7 @@ struct hw_bank {
> * @remote_wakeup: host-enabled remote wakeup
> * @suspended: suspended by host
> * @test_mode: the selected test mode
> - * @udc_driver: platform specific information supplied by parent device
> + * @platdata: platform specific information supplied by parent device
> * @vbus_active: is VBUS active
> * @transceiver: pointer to USB PHY, if any
> * @hcd: pointer to usb_hcd for ehci host driver
> @@ -158,7 +158,7 @@ struct ci13xxx {
> u8 suspended;
> u8 test_mode;
>
> - struct ci13xxx_udc_driver *udc_driver;
> + struct ci13xxx_platform_data *platdata;
> int vbus_active;
> struct usb_phy *transceiver;
> struct usb_hcd *hcd;
> diff --git a/drivers/usb/chipidea/ci13xxx_msm.c
> b/drivers/usb/chipidea/ci13xxx_msm.c index 68512d4..21a7c2e 100644
> --- a/drivers/usb/chipidea/ci13xxx_msm.c
> +++ b/drivers/usb/chipidea/ci13xxx_msm.c
> @@ -45,7 +45,7 @@ static void ci13xxx_msm_notify_event(struct ci13xxx *udc,
> unsigned event) }
> }
>
> -static struct ci13xxx_udc_driver ci13xxx_msm_udc_driver = {
> +static struct ci13xxx_platform_data ci13xxx_msm_platdata = {
> .name = "ci13xxx_msm",
> .flags = CI13XXX_REGS_SHARED |
> CI13XXX_REQUIRE_TRANSCEIVER |
> @@ -75,8 +75,8 @@ static int __devinit ci13xxx_msm_probe(struct
> platform_device *pdev) goto put_platform;
> }
>
> - ret = platform_device_add_data(plat_ci, &ci13xxx_msm_udc_driver,
> - sizeof(ci13xxx_msm_udc_driver));
> + ret = platform_device_add_data(plat_ci, &ci13xxx_msm_platdata,
> + sizeof(ci13xxx_msm_platdata));
> if (ret)
> goto put_platform;
>
> diff --git a/drivers/usb/chipidea/ci13xxx_pci.c
> b/drivers/usb/chipidea/ci13xxx_pci.c index e3dab27..cdcac3a 100644
> --- a/drivers/usb/chipidea/ci13xxx_pci.c
> +++ b/drivers/usb/chipidea/ci13xxx_pci.c
> @@ -23,17 +23,17 @@
> /*************************************************************************
> ***** * PCI block
>
> **************************************************************************
> ***/ -struct ci13xxx_udc_driver pci_driver = {
> +struct ci13xxx_platform_data pci_platdata = {
> .name = UDC_DRIVER_NAME,
> .capoffset = DEF_CAPOFFSET,
> };
>
> -struct ci13xxx_udc_driver langwell_pci_driver = {
> +struct ci13xxx_platform_data langwell_pci_platdata = {
> .name = UDC_DRIVER_NAME,
> .capoffset = 0,
> };
>
> -struct ci13xxx_udc_driver penwell_pci_driver = {
> +struct ci13xxx_platform_data penwell_pci_platdata = {
> .name = UDC_DRIVER_NAME,
> .capoffset = 0,
> .power_budget = 200,
> @@ -51,12 +51,12 @@ struct ci13xxx_udc_driver penwell_pci_driver = {
> static int __devinit ci13xxx_pci_probe(struct pci_dev *pdev,
> const struct pci_device_id *id)
> {
> - struct ci13xxx_udc_driver *driver = (void *)id->driver_data;
> + struct ci13xxx_platform_data *platdata = (void *)id->driver_data;
> struct platform_device *plat_ci;
> struct resource res[3];
> int retval = 0, nres = 2;
>
> - if (!driver) {
> + if (!platdata) {
> dev_err(&pdev->dev, "device doesn't provide driver data\n");
> return -ENODEV;
> }
> @@ -95,7 +95,7 @@ static int __devinit ci13xxx_pci_probe(struct pci_dev
> *pdev, goto put_platform;
> }
>
> - retval = platform_device_add_data(plat_ci, driver, sizeof(*driver));
> + retval = platform_device_add_data(plat_ci, platdata, sizeof(*platdata));
> if (retval)
> goto put_platform;
>
> @@ -147,19 +147,19 @@ static void __devexit ci13xxx_pci_remove(struct
> pci_dev *pdev) static DEFINE_PCI_DEVICE_TABLE(ci13xxx_pci_id_table) = {
> {
> PCI_DEVICE(0x153F, 0x1004),
> - .driver_data = (kernel_ulong_t)&pci_driver,
> + .driver_data = (kernel_ulong_t)&pci_platdata,
> },
> {
> PCI_DEVICE(0x153F, 0x1006),
> - .driver_data = (kernel_ulong_t)&pci_driver,
> + .driver_data = (kernel_ulong_t)&pci_platdata,
> },
> {
> PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0811),
> - .driver_data = (kernel_ulong_t)&langwell_pci_driver,
> + .driver_data = (kernel_ulong_t)&langwell_pci_platdata,
> },
> {
> PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0829),
> - .driver_data = (kernel_ulong_t)&penwell_pci_driver,
> + .driver_data = (kernel_ulong_t)&penwell_pci_platdata,
> },
> { 0, 0, 0, 0, 0, 0, 0 /* end: all zeroes */ }
> };
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index 15e03b3..9a883bd 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -179,7 +179,7 @@ static int hw_device_init(struct ci13xxx *ci, void
> __iomem *base) ci->hw_bank.abs = base;
>
> ci->hw_bank.cap = ci->hw_bank.abs;
> - ci->hw_bank.cap += ci->udc_driver->capoffset;
> + ci->hw_bank.cap += ci->platdata->capoffset;
> ci->hw_bank.op = ci->hw_bank.cap + ioread8(ci->hw_bank.cap);
>
> hw_alloc_regmap(ci, false);
> @@ -227,11 +227,11 @@ int hw_device_reset(struct ci13xxx *ci, u32 mode)
> udelay(10); /* not RTOS friendly */
>
>
> - if (ci->udc_driver->notify_event)
> - ci->udc_driver->notify_event(ci,
> + if (ci->platdata->notify_event)
> + ci->platdata->notify_event(ci,
> CI13XXX_CONTROLLER_RESET_EVENT);
>
> - if (ci->udc_driver->flags & CI13XXX_DISABLE_STREAMING)
> + if (ci->platdata->flags & CI13XXX_DISABLE_STREAMING)
> hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS);
>
> /* USBMODE should be configured step by step */
> @@ -364,7 +364,7 @@ static int __devinit ci_hdrc_probe(struct
> platform_device *pdev) }
>
> ci->dev = dev;
> - ci->udc_driver = dev->platform_data;
> + ci->platdata = dev->platform_data;
>
> ret = hw_device_init(ci, base);
> if (ret < 0) {
> @@ -419,7 +419,7 @@ static int __devinit ci_hdrc_probe(struct
> platform_device *pdev) }
>
> platform_set_drvdata(pdev, ci);
> - ret = request_irq(ci->irq, ci_irq, IRQF_SHARED, ci->udc_driver->name,
> + ret = request_irq(ci->irq, ci_irq, IRQF_SHARED, ci->platdata->name,
> ci);
> if (ret)
> goto stop;
> diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
> index 9eacd21..4a4fdb8 100644
> --- a/drivers/usb/chipidea/host.c
> +++ b/drivers/usb/chipidea/host.c
> @@ -116,7 +116,7 @@ static int host_start(struct ci13xxx *ci)
> hcd->regs = ci->hw_bank.abs;
> hcd->has_tt = 1;
>
> - hcd->power_budget = ci->udc_driver->power_budget;
> + hcd->power_budget = ci->platdata->power_budget;
>
> ehci = hcd_to_ehci(hcd);
> ehci->caps = ci->hw_bank.cap;
> diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
> index cdb9212..68584bb 100644
> --- a/drivers/usb/chipidea/udc.c
> +++ b/drivers/usb/chipidea/udc.c
> @@ -1362,7 +1362,7 @@ static int ci13xxx_vbus_session(struct usb_gadget
> *_gadget, int is_active) unsigned long flags;
> int gadget_ready = 0;
>
> - if (!(udc->udc_driver->flags & CI13XXX_PULLUP_ON_VBUS))
> + if (!(udc->platdata->flags & CI13XXX_PULLUP_ON_VBUS))
> return -EOPNOTSUPP;
>
> spin_lock_irqsave(&udc->lock, flags);
> @@ -1378,8 +1378,8 @@ static int ci13xxx_vbus_session(struct usb_gadget
> *_gadget, int is_active) hw_device_state(udc, udc->ep0out->qh.dma);
> } else {
> hw_device_state(udc, 0);
> - if (udc->udc_driver->notify_event)
> - udc->udc_driver->notify_event(udc,
> + if (udc->platdata->notify_event)
> + udc->platdata->notify_event(udc,
> CI13XXX_CONTROLLER_STOPPED_EVENT);
> _gadget_stop_activity(&udc->gadget);
> pm_runtime_put_sync(&_gadget->dev);
> @@ -1514,9 +1514,9 @@ static int ci13xxx_start(struct usb_gadget *gadget,
>
> udc->driver = driver;
> pm_runtime_get_sync(&udc->gadget.dev);
> - if (udc->udc_driver->flags & CI13XXX_PULLUP_ON_VBUS) {
> + if (udc->platdata->flags & CI13XXX_PULLUP_ON_VBUS) {
> if (udc->vbus_active) {
> - if (udc->udc_driver->flags & CI13XXX_REGS_SHARED)
> + if (udc->platdata->flags & CI13XXX_REGS_SHARED)
> hw_device_reset(udc, USBMODE_CM_DC);
> } else {
> pm_runtime_put_sync(&udc->gadget.dev);
> @@ -1544,11 +1544,11 @@ static int ci13xxx_stop(struct usb_gadget *gadget,
>
> spin_lock_irqsave(&udc->lock, flags);
>
> - if (!(udc->udc_driver->flags & CI13XXX_PULLUP_ON_VBUS) ||
> + if (!(udc->platdata->flags & CI13XXX_PULLUP_ON_VBUS) ||
> udc->vbus_active) {
> hw_device_state(udc, 0);
> - if (udc->udc_driver->notify_event)
> - udc->udc_driver->notify_event(udc,
> + if (udc->platdata->notify_event)
> + udc->platdata->notify_event(udc,
> CI13XXX_CONTROLLER_STOPPED_EVENT);
> udc->driver = NULL;
> spin_unlock_irqrestore(&udc->lock, flags);
> @@ -1581,7 +1581,7 @@ static irqreturn_t udc_irq(struct ci13xxx *udc)
>
> spin_lock(&udc->lock);
>
> - if (udc->udc_driver->flags & CI13XXX_REGS_SHARED) {
> + if (udc->platdata->flags & CI13XXX_REGS_SHARED) {
> if (hw_read(udc, OP_USBMODE, USBMODE_CM) !=
> USBMODE_CM_DC) {
> spin_unlock(&udc->lock);
> @@ -1653,7 +1653,7 @@ static int udc_start(struct ci13xxx *udc)
> udc->gadget.speed = USB_SPEED_UNKNOWN;
> udc->gadget.max_speed = USB_SPEED_HIGH;
> udc->gadget.is_otg = 0;
> - udc->gadget.name = udc->udc_driver->name;
> + udc->gadget.name = udc->platdata->name;
>
> INIT_LIST_HEAD(&udc->gadget.ep_list);
>
> @@ -1686,14 +1686,14 @@ static int udc_start(struct ci13xxx *udc)
>
> udc->transceiver = usb_get_transceiver();
>
> - if (udc->udc_driver->flags & CI13XXX_REQUIRE_TRANSCEIVER) {
> + if (udc->platdata->flags & CI13XXX_REQUIRE_TRANSCEIVER) {
> if (udc->transceiver == NULL) {
> retval = -ENODEV;
> goto free_pools;
> }
> }
>
> - if (!(udc->udc_driver->flags & CI13XXX_REGS_SHARED)) {
> + if (!(udc->platdata->flags & CI13XXX_REGS_SHARED)) {
> retval = hw_device_reset(udc, USBMODE_CM_DC);
> if (retval)
> goto put_transceiver;
> diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
> index edb90d6..d4cf9706 100644
> --- a/include/linux/usb/chipidea.h
> +++ b/include/linux/usb/chipidea.h
> @@ -6,7 +6,7 @@
> #define __LINUX_USB_CHIPIDEA_H
>
> struct ci13xxx;
> -struct ci13xxx_udc_driver {
> +struct ci13xxx_platform_data {
> const char *name;
> /* offset of the capability registers */
> uintptr_t capoffset;
WARNING: multiple messages have this Message-ID (diff)
From: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
To: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
B29397-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
B20596-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
dong.aisheng-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org,
linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
balbi-l0cyMroinI0@public.gmane.org
Subject: Re: [PATCH v7 05/14] USB: Chipidea: rename struct ci13xxx_udc_driver to struct ci13xxx_platform_data
Date: Tue, 26 Jun 2012 23:54:03 +0200 [thread overview]
Message-ID: <201206262354.03543.marex@denx.de> (raw)
In-Reply-To: <1340607391-16380-6-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Dear Richard Zhao,
> This patch rename struct ci13xxx_udc_driver and var with the type.
>
> ci13xxx_platform_data reflect it's passed from platfrom driver.
Maybe rather driver data? As platform_data has certain different conotation to
it.
>
> Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> Reviewed-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
> Signed-off-by: Alexander Shishkin <alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> ---
> drivers/usb/chipidea/ci.h | 4 ++--
> drivers/usb/chipidea/ci13xxx_msm.c | 6 +++---
> drivers/usb/chipidea/ci13xxx_pci.c | 20 ++++++++++----------
> drivers/usb/chipidea/core.c | 12 ++++++------
> drivers/usb/chipidea/host.c | 2 +-
> drivers/usb/chipidea/udc.c | 24 ++++++++++++------------
> include/linux/usb/chipidea.h | 2 +-
> 7 files changed, 35 insertions(+), 35 deletions(-)
>
> diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h
> index 50911f8..0b09330 100644
> --- a/drivers/usb/chipidea/ci.h
> +++ b/drivers/usb/chipidea/ci.h
> @@ -125,7 +125,7 @@ struct hw_bank {
> * @remote_wakeup: host-enabled remote wakeup
> * @suspended: suspended by host
> * @test_mode: the selected test mode
> - * @udc_driver: platform specific information supplied by parent device
> + * @platdata: platform specific information supplied by parent device
> * @vbus_active: is VBUS active
> * @transceiver: pointer to USB PHY, if any
> * @hcd: pointer to usb_hcd for ehci host driver
> @@ -158,7 +158,7 @@ struct ci13xxx {
> u8 suspended;
> u8 test_mode;
>
> - struct ci13xxx_udc_driver *udc_driver;
> + struct ci13xxx_platform_data *platdata;
> int vbus_active;
> struct usb_phy *transceiver;
> struct usb_hcd *hcd;
> diff --git a/drivers/usb/chipidea/ci13xxx_msm.c
> b/drivers/usb/chipidea/ci13xxx_msm.c index 68512d4..21a7c2e 100644
> --- a/drivers/usb/chipidea/ci13xxx_msm.c
> +++ b/drivers/usb/chipidea/ci13xxx_msm.c
> @@ -45,7 +45,7 @@ static void ci13xxx_msm_notify_event(struct ci13xxx *udc,
> unsigned event) }
> }
>
> -static struct ci13xxx_udc_driver ci13xxx_msm_udc_driver = {
> +static struct ci13xxx_platform_data ci13xxx_msm_platdata = {
> .name = "ci13xxx_msm",
> .flags = CI13XXX_REGS_SHARED |
> CI13XXX_REQUIRE_TRANSCEIVER |
> @@ -75,8 +75,8 @@ static int __devinit ci13xxx_msm_probe(struct
> platform_device *pdev) goto put_platform;
> }
>
> - ret = platform_device_add_data(plat_ci, &ci13xxx_msm_udc_driver,
> - sizeof(ci13xxx_msm_udc_driver));
> + ret = platform_device_add_data(plat_ci, &ci13xxx_msm_platdata,
> + sizeof(ci13xxx_msm_platdata));
> if (ret)
> goto put_platform;
>
> diff --git a/drivers/usb/chipidea/ci13xxx_pci.c
> b/drivers/usb/chipidea/ci13xxx_pci.c index e3dab27..cdcac3a 100644
> --- a/drivers/usb/chipidea/ci13xxx_pci.c
> +++ b/drivers/usb/chipidea/ci13xxx_pci.c
> @@ -23,17 +23,17 @@
> /*************************************************************************
> ***** * PCI block
>
> **************************************************************************
> ***/ -struct ci13xxx_udc_driver pci_driver = {
> +struct ci13xxx_platform_data pci_platdata = {
> .name = UDC_DRIVER_NAME,
> .capoffset = DEF_CAPOFFSET,
> };
>
> -struct ci13xxx_udc_driver langwell_pci_driver = {
> +struct ci13xxx_platform_data langwell_pci_platdata = {
> .name = UDC_DRIVER_NAME,
> .capoffset = 0,
> };
>
> -struct ci13xxx_udc_driver penwell_pci_driver = {
> +struct ci13xxx_platform_data penwell_pci_platdata = {
> .name = UDC_DRIVER_NAME,
> .capoffset = 0,
> .power_budget = 200,
> @@ -51,12 +51,12 @@ struct ci13xxx_udc_driver penwell_pci_driver = {
> static int __devinit ci13xxx_pci_probe(struct pci_dev *pdev,
> const struct pci_device_id *id)
> {
> - struct ci13xxx_udc_driver *driver = (void *)id->driver_data;
> + struct ci13xxx_platform_data *platdata = (void *)id->driver_data;
> struct platform_device *plat_ci;
> struct resource res[3];
> int retval = 0, nres = 2;
>
> - if (!driver) {
> + if (!platdata) {
> dev_err(&pdev->dev, "device doesn't provide driver data\n");
> return -ENODEV;
> }
> @@ -95,7 +95,7 @@ static int __devinit ci13xxx_pci_probe(struct pci_dev
> *pdev, goto put_platform;
> }
>
> - retval = platform_device_add_data(plat_ci, driver, sizeof(*driver));
> + retval = platform_device_add_data(plat_ci, platdata, sizeof(*platdata));
> if (retval)
> goto put_platform;
>
> @@ -147,19 +147,19 @@ static void __devexit ci13xxx_pci_remove(struct
> pci_dev *pdev) static DEFINE_PCI_DEVICE_TABLE(ci13xxx_pci_id_table) = {
> {
> PCI_DEVICE(0x153F, 0x1004),
> - .driver_data = (kernel_ulong_t)&pci_driver,
> + .driver_data = (kernel_ulong_t)&pci_platdata,
> },
> {
> PCI_DEVICE(0x153F, 0x1006),
> - .driver_data = (kernel_ulong_t)&pci_driver,
> + .driver_data = (kernel_ulong_t)&pci_platdata,
> },
> {
> PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0811),
> - .driver_data = (kernel_ulong_t)&langwell_pci_driver,
> + .driver_data = (kernel_ulong_t)&langwell_pci_platdata,
> },
> {
> PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0829),
> - .driver_data = (kernel_ulong_t)&penwell_pci_driver,
> + .driver_data = (kernel_ulong_t)&penwell_pci_platdata,
> },
> { 0, 0, 0, 0, 0, 0, 0 /* end: all zeroes */ }
> };
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index 15e03b3..9a883bd 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -179,7 +179,7 @@ static int hw_device_init(struct ci13xxx *ci, void
> __iomem *base) ci->hw_bank.abs = base;
>
> ci->hw_bank.cap = ci->hw_bank.abs;
> - ci->hw_bank.cap += ci->udc_driver->capoffset;
> + ci->hw_bank.cap += ci->platdata->capoffset;
> ci->hw_bank.op = ci->hw_bank.cap + ioread8(ci->hw_bank.cap);
>
> hw_alloc_regmap(ci, false);
> @@ -227,11 +227,11 @@ int hw_device_reset(struct ci13xxx *ci, u32 mode)
> udelay(10); /* not RTOS friendly */
>
>
> - if (ci->udc_driver->notify_event)
> - ci->udc_driver->notify_event(ci,
> + if (ci->platdata->notify_event)
> + ci->platdata->notify_event(ci,
> CI13XXX_CONTROLLER_RESET_EVENT);
>
> - if (ci->udc_driver->flags & CI13XXX_DISABLE_STREAMING)
> + if (ci->platdata->flags & CI13XXX_DISABLE_STREAMING)
> hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS);
>
> /* USBMODE should be configured step by step */
> @@ -364,7 +364,7 @@ static int __devinit ci_hdrc_probe(struct
> platform_device *pdev) }
>
> ci->dev = dev;
> - ci->udc_driver = dev->platform_data;
> + ci->platdata = dev->platform_data;
>
> ret = hw_device_init(ci, base);
> if (ret < 0) {
> @@ -419,7 +419,7 @@ static int __devinit ci_hdrc_probe(struct
> platform_device *pdev) }
>
> platform_set_drvdata(pdev, ci);
> - ret = request_irq(ci->irq, ci_irq, IRQF_SHARED, ci->udc_driver->name,
> + ret = request_irq(ci->irq, ci_irq, IRQF_SHARED, ci->platdata->name,
> ci);
> if (ret)
> goto stop;
> diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
> index 9eacd21..4a4fdb8 100644
> --- a/drivers/usb/chipidea/host.c
> +++ b/drivers/usb/chipidea/host.c
> @@ -116,7 +116,7 @@ static int host_start(struct ci13xxx *ci)
> hcd->regs = ci->hw_bank.abs;
> hcd->has_tt = 1;
>
> - hcd->power_budget = ci->udc_driver->power_budget;
> + hcd->power_budget = ci->platdata->power_budget;
>
> ehci = hcd_to_ehci(hcd);
> ehci->caps = ci->hw_bank.cap;
> diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
> index cdb9212..68584bb 100644
> --- a/drivers/usb/chipidea/udc.c
> +++ b/drivers/usb/chipidea/udc.c
> @@ -1362,7 +1362,7 @@ static int ci13xxx_vbus_session(struct usb_gadget
> *_gadget, int is_active) unsigned long flags;
> int gadget_ready = 0;
>
> - if (!(udc->udc_driver->flags & CI13XXX_PULLUP_ON_VBUS))
> + if (!(udc->platdata->flags & CI13XXX_PULLUP_ON_VBUS))
> return -EOPNOTSUPP;
>
> spin_lock_irqsave(&udc->lock, flags);
> @@ -1378,8 +1378,8 @@ static int ci13xxx_vbus_session(struct usb_gadget
> *_gadget, int is_active) hw_device_state(udc, udc->ep0out->qh.dma);
> } else {
> hw_device_state(udc, 0);
> - if (udc->udc_driver->notify_event)
> - udc->udc_driver->notify_event(udc,
> + if (udc->platdata->notify_event)
> + udc->platdata->notify_event(udc,
> CI13XXX_CONTROLLER_STOPPED_EVENT);
> _gadget_stop_activity(&udc->gadget);
> pm_runtime_put_sync(&_gadget->dev);
> @@ -1514,9 +1514,9 @@ static int ci13xxx_start(struct usb_gadget *gadget,
>
> udc->driver = driver;
> pm_runtime_get_sync(&udc->gadget.dev);
> - if (udc->udc_driver->flags & CI13XXX_PULLUP_ON_VBUS) {
> + if (udc->platdata->flags & CI13XXX_PULLUP_ON_VBUS) {
> if (udc->vbus_active) {
> - if (udc->udc_driver->flags & CI13XXX_REGS_SHARED)
> + if (udc->platdata->flags & CI13XXX_REGS_SHARED)
> hw_device_reset(udc, USBMODE_CM_DC);
> } else {
> pm_runtime_put_sync(&udc->gadget.dev);
> @@ -1544,11 +1544,11 @@ static int ci13xxx_stop(struct usb_gadget *gadget,
>
> spin_lock_irqsave(&udc->lock, flags);
>
> - if (!(udc->udc_driver->flags & CI13XXX_PULLUP_ON_VBUS) ||
> + if (!(udc->platdata->flags & CI13XXX_PULLUP_ON_VBUS) ||
> udc->vbus_active) {
> hw_device_state(udc, 0);
> - if (udc->udc_driver->notify_event)
> - udc->udc_driver->notify_event(udc,
> + if (udc->platdata->notify_event)
> + udc->platdata->notify_event(udc,
> CI13XXX_CONTROLLER_STOPPED_EVENT);
> udc->driver = NULL;
> spin_unlock_irqrestore(&udc->lock, flags);
> @@ -1581,7 +1581,7 @@ static irqreturn_t udc_irq(struct ci13xxx *udc)
>
> spin_lock(&udc->lock);
>
> - if (udc->udc_driver->flags & CI13XXX_REGS_SHARED) {
> + if (udc->platdata->flags & CI13XXX_REGS_SHARED) {
> if (hw_read(udc, OP_USBMODE, USBMODE_CM) !=
> USBMODE_CM_DC) {
> spin_unlock(&udc->lock);
> @@ -1653,7 +1653,7 @@ static int udc_start(struct ci13xxx *udc)
> udc->gadget.speed = USB_SPEED_UNKNOWN;
> udc->gadget.max_speed = USB_SPEED_HIGH;
> udc->gadget.is_otg = 0;
> - udc->gadget.name = udc->udc_driver->name;
> + udc->gadget.name = udc->platdata->name;
>
> INIT_LIST_HEAD(&udc->gadget.ep_list);
>
> @@ -1686,14 +1686,14 @@ static int udc_start(struct ci13xxx *udc)
>
> udc->transceiver = usb_get_transceiver();
>
> - if (udc->udc_driver->flags & CI13XXX_REQUIRE_TRANSCEIVER) {
> + if (udc->platdata->flags & CI13XXX_REQUIRE_TRANSCEIVER) {
> if (udc->transceiver == NULL) {
> retval = -ENODEV;
> goto free_pools;
> }
> }
>
> - if (!(udc->udc_driver->flags & CI13XXX_REGS_SHARED)) {
> + if (!(udc->platdata->flags & CI13XXX_REGS_SHARED)) {
> retval = hw_device_reset(udc, USBMODE_CM_DC);
> if (retval)
> goto put_transceiver;
> diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
> index edb90d6..d4cf9706 100644
> --- a/include/linux/usb/chipidea.h
> +++ b/include/linux/usb/chipidea.h
> @@ -6,7 +6,7 @@
> #define __LINUX_USB_CHIPIDEA_H
>
> struct ci13xxx;
> -struct ci13xxx_udc_driver {
> +struct ci13xxx_platform_data {
> const char *name;
> /* offset of the capability registers */
> uintptr_t capoffset;
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-06-26 21:54 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 6:56 [PATCH v7 00/14] add imx usb driver based on Greg next tree Richard Zhao
2012-06-25 6:56 ` Richard Zhao
2012-06-25 6:56 ` [PATCH v7 01/14] usb: chipidea: remove unneeded NULL check Richard Zhao
2012-06-25 6:56 ` Richard Zhao
2012-06-26 21:43 ` Greg KH
2012-06-26 21:43 ` Greg KH
2012-06-27 6:24 ` Richard Zhao
2012-06-27 6:24 ` Richard Zhao
2012-06-26 21:51 ` Marek Vasut
2012-06-26 21:51 ` Marek Vasut
2012-06-25 6:56 ` [PATCH v7 02/14] usb: chipidea: drop useless arch-check Richard Zhao
2012-06-25 6:56 ` Richard Zhao
2012-06-26 21:52 ` Marek Vasut
2012-06-26 21:52 ` Marek Vasut
2012-06-25 6:56 ` [PATCH v7 03/14] usb: chipidea: msm: add missing section annotation Richard Zhao
2012-06-25 6:56 ` Richard Zhao
2012-06-26 21:52 ` Marek Vasut
2012-06-26 21:52 ` Marek Vasut
2012-06-25 6:56 ` [PATCH v7 04/14] usb: chipidea: msm: add remove method Richard Zhao
2012-06-25 6:56 ` Richard Zhao
2012-06-25 13:18 ` ABRAHAM, KISHON VIJAY
2012-06-25 13:18 ` ABRAHAM, KISHON VIJAY
2012-06-25 13:33 ` Marek Vasut
2012-06-25 13:33 ` Marek Vasut
2012-06-25 13:44 ` ABRAHAM, KISHON VIJAY
2012-06-25 13:44 ` ABRAHAM, KISHON VIJAY
2012-06-25 13:55 ` Marek Vasut
2012-06-25 13:55 ` Marek Vasut
2012-06-25 14:14 ` Felipe Balbi
2012-06-25 14:14 ` Felipe Balbi
2012-06-25 14:20 ` Marek Vasut
2012-06-25 14:20 ` Marek Vasut
2012-06-25 6:56 ` [PATCH v7 05/14] USB: Chipidea: rename struct ci13xxx_udc_driver to struct ci13xxx_platform_data Richard Zhao
2012-06-25 6:56 ` Richard Zhao
2012-06-26 21:54 ` Marek Vasut [this message]
2012-06-26 21:54 ` Marek Vasut
2012-06-27 6:30 ` Richard Zhao
2012-06-27 6:30 ` Richard Zhao
2012-06-25 6:56 ` [PATCH v7 06/14] USB: Chipidea: rename struct ci13xxx variables from udc to ci Richard Zhao
2012-06-25 6:56 ` Richard Zhao
2012-06-26 21:55 ` Marek Vasut
2012-06-26 21:55 ` Marek Vasut
2012-06-27 12:42 ` Marc Kleine-Budde
2012-06-27 12:42 ` Marc Kleine-Budde
2012-06-28 1:59 ` Richard Zhao
2012-06-28 1:59 ` Richard Zhao
2012-06-25 6:56 ` [PATCH v7 07/14] USB: Chipidea: add unified ci13xxx_{add, remove}_device for platform drivers Richard Zhao
2012-06-25 6:56 ` [PATCH v7 07/14] USB: Chipidea: add unified ci13xxx_{add,remove}_device " Richard Zhao
2012-06-25 6:56 ` [PATCH v7 08/14] USB: Chipidea: add ci13xxx device id management Richard Zhao
2012-06-25 6:56 ` Richard Zhao
2012-06-25 9:48 ` Marc Kleine-Budde
2012-06-25 9:48 ` Marc Kleine-Budde
2012-06-25 10:03 ` Richard Zhao
2012-06-25 10:03 ` Richard Zhao
2012-06-25 10:17 ` Marc Kleine-Budde
2012-06-25 10:17 ` Marc Kleine-Budde
2012-06-27 5:42 ` Richard Zhao
2012-06-27 5:42 ` Richard Zhao
2012-06-27 11:49 ` Marek Vasut
2012-06-27 11:49 ` Marek Vasut
2012-06-27 12:02 ` Marc Kleine-Budde
2012-06-27 12:02 ` Marc Kleine-Budde
2012-06-25 6:56 ` [PATCH v7 09/14] usb: chipidea: select USB_EHCI_ROOT_HUB_TT in USB_CHIPIDEA_HOST of Kconfig Richard Zhao
2012-06-25 6:56 ` Richard Zhao
2012-06-26 21:58 ` Marek Vasut
2012-06-26 21:58 ` Marek Vasut
2012-06-25 6:56 ` [PATCH v7 10/14] usb: otg: add notify_connect/notify_disconnect callback Richard Zhao
2012-06-25 6:56 ` Richard Zhao
2012-06-25 6:56 ` [PATCH v7 11/14] USB: notify phy when root hub port connect change Richard Zhao
2012-06-25 6:56 ` Richard Zhao
2012-06-25 6:56 ` [PATCH v7 12/14] usb: chipidea: permit driver bindings pass phy pointer Richard Zhao
2012-06-25 6:56 ` Richard Zhao
2012-06-25 6:56 ` [PATCH v7 13/14] usb: otg: add basic mxs phy driver support Richard Zhao
2012-06-25 6:56 ` Richard Zhao
2012-06-27 6:37 ` Richard Zhao
2012-06-27 6:37 ` Richard Zhao
2012-06-25 6:56 ` [PATCH v7 14/14] usb: chipidea: add imx platform driver Richard Zhao
2012-06-25 6:56 ` Richard Zhao
2012-06-25 10:33 ` Marc Kleine-Budde
2012-06-25 10:33 ` Marc Kleine-Budde
2012-06-27 6:20 ` Richard Zhao
2012-06-27 6:20 ` Richard Zhao
2012-06-27 9:46 ` Marc Kleine-Budde
2012-06-27 9:46 ` Marc Kleine-Budde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201206262354.03543.marex@denx.de \
--to=marex@denx.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.