From: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Cc: B29397-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
B20596-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
marex-ynQEQJNshbs@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,
richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
balbi-l0cyMroinI0@public.gmane.org,
mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Subject: [PATCH v8 05/14] USB: Chipidea: rename struct ci13xxx_udc_driver to struct ci13xxx_platform_data
Date: Thu, 28 Jun 2012 11:37:22 +0800 [thread overview]
Message-ID: <1340854652-24717-6-git-send-email-richard.zhao@freescale.com> (raw)
In-Reply-To: <1340854652-24717-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
This patch rename struct ci13xxx_udc_driver and var with the type.
ci13xxx_platform_data reflect it's passed from platfrom driver.
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 11a7bef..12c0dd6 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;
--
1.7.9.5
--
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-28 3:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-28 3:37 [PATCH v8 00/14] add imx usb driver based on Greg next tree Richard Zhao
[not found] ` <1340854652-24717-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2012-06-28 3:37 ` [PATCH v8 01/14] usb: chipidea: remove unneeded NULL check Richard Zhao
2012-06-28 3:37 ` [PATCH v8 02/14] usb: chipidea: drop useless arch-check Richard Zhao
2012-06-28 3:37 ` [PATCH v8 03/14] usb: chipidea: msm: add missing section annotation Richard Zhao
2012-06-28 3:37 ` [PATCH v8 04/14] usb: chipidea: msm: add remove method Richard Zhao
2012-06-28 3:37 ` Richard Zhao [this message]
2012-06-28 3:37 ` [PATCH v8 06/14] USB: Chipidea: rename struct ci13xxx variables from udc to ci Richard Zhao
2012-06-28 3:37 ` [PATCH v8 07/14] USB: Chipidea: add unified ci13xxx_{add,remove}_device for platform drivers Richard Zhao
2012-06-28 3:37 ` [PATCH v8 08/14] USB: Chipidea: add ci13xxx device id management Richard Zhao
2012-06-28 3:37 ` [PATCH v8 09/14] usb: chipidea: select USB_EHCI_ROOT_HUB_TT in USB_CHIPIDEA_HOST of Kconfig Richard Zhao
2012-06-28 3:37 ` [PATCH v8 10/14] usb: otg: add notify_connect/notify_disconnect callback Richard Zhao
2012-06-28 3:37 ` [PATCH v8 11/14] USB: notify phy when root hub port connect change Richard Zhao
2012-06-28 3:37 ` [PATCH v8 12/14] usb: chipidea: permit driver bindings pass phy pointer Richard Zhao
2012-06-28 3:37 ` [PATCH v8 13/14] usb: otg: add basic mxs phy driver support Richard Zhao
[not found] ` <1340854652-24717-14-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2012-06-29 9:04 ` Richard Zhao
2012-06-28 3:37 ` [PATCH v8 14/14] usb: chipidea: add imx platform driver Richard Zhao
[not found] ` <1340854652-24717-15-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2012-06-29 9:03 ` Richard Zhao
-- strict thread matches above, loose matches on Subject: below --
2012-06-29 9:48 [PATCH v8 00/14] add imx usb driver based on Greg next tree Richard Zhao
[not found] ` <1340963342-28735-1-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2012-06-29 9:48 ` [PATCH v8 05/14] USB: Chipidea: rename struct ci13xxx_udc_driver to struct ci13xxx_platform_data Richard Zhao
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=1340854652-24717-6-git-send-email-richard.zhao@freescale.com \
--to=richard.zhao-kzfg59tc24xl57midrcfdg@public.gmane.org \
--cc=B20596-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=B29397-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=dong.aisheng-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=marex-ynQEQJNshbs@public.gmane.org \
--cc=mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).