Skip to content

Commit

Permalink
usb: chipidea: add TPL support for targeted hosts
Browse files Browse the repository at this point in the history
For OTG and Embedded hosts, they may need TPL (Targeted Peripheral List)
for usb certification and other vender specific requirements, the
platform can tell chipidea core driver if it supports tpl through DT
or platform data.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Peter Chen authored and Greg Kroah-Hartman committed Sep 24, 2014
1 parent 05f8b35 commit f6a9ff0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/chipidea/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,10 @@ static int ci_get_platdata(struct device *dev,
PTR_ERR(platdata->reg_vbus));
return PTR_ERR(platdata->reg_vbus);
}
/* Get TPL support */
if (!platdata->tpl_support)
platdata->tpl_support =
of_usb_host_tpl_support(dev->of_node);
}

if (of_usb_get_maximum_speed(dev->of_node) == USB_SPEED_FULL)
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/chipidea/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ static int host_start(struct ci_hdrc *ci)

hcd->power_budget = ci->platdata->power_budget;
hcd->phy = ci->transceiver;
hcd->tpl_support = ci->platdata->tpl_support;

ehci = hcd_to_ehci(hcd);
ehci->caps = ci->hw_bank.cap;
Expand Down
1 change: 1 addition & 0 deletions include/linux/usb/chipidea.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ struct ci_hdrc_platform_data {
#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1
void (*notify_event) (struct ci_hdrc *ci, unsigned event);
struct regulator *reg_vbus;
bool tpl_support;
};

/* Default offset of capability registers */
Expand Down

0 comments on commit f6a9ff0

Please sign in to comment.