Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1359215
| From | David Lechner <david@lechnology.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources |
| Date | 2016-03-16 19:20 +0100 |
| Message-ID | <rdod3-47q-3@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <rd5N8-8tc-13@gated-at.bofh.it> <rd5WN-66-15@gated-at.bofh.it> <rdaD8-3du-3@gated-at.bofh.it> <rdbIS-3R6-9@gated-at.bofh.it> <rdnAm-3CU-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 03/16/2016 12:38 PM, Sergei Shtylyov wrote:
> On 03/16/2016 07:57 AM, David Lechner wrote:
>
>> Also, I am not finding any existing data structure to pass the musb
>> set_mode
>> function to the phy in either usb_phy or usb_otg. Setting the mode
>> (host/peripheral/otg) is done in the same PHY register, so it seems
>> like it
>> should be implemented in the new phy driver as well.
>
> Perhaps we'd have to sacrifice that functionality...
The device I am working on (LEGO MINDSTORMS EV3) has the port wired as
peripheral only, so I don't think leaving this out is an option. Leaving
it in OTG mode doesn't work because the required electrical connections
are just not there.
>> I guess I could use a generic phy instead and use phy_set_drvdata() to
>> share
>> data between the phy driver and the musb driver. Does this sound like a
>> reasonable thing to do?
>
> Not sure what you mean, could you elaborate?
I found another driver that essentially does what I was trying to
explain here. See the sun4i_usb_phy_set_squelch_detect function in
drivers/phy/phy-sun4i-usb.c:394[1] as an example. It is called at
drivers/usb/musb/sunxi.c:160[2] and :167.
I would move the da8xx_musb_set_mode function from
drivers/usb/musb/da8xx.c to the new drivers/phy/phy-da8xx-usb.c and call
it in a similar manner to the sunix example I gave.
---
[1]: drivers/phy/phy-sun4i-usb.c
void sun4i_usb_phy_set_squelch_detect(struct phy *_phy, bool enabled)
{
struct sun4i_usb_phy *phy = phy_get_drvdata(_phy);
sun4i_usb_phy_write(phy, PHY_SQUELCH_DETECT, enabled ? 0 : 2, 2);
}
EXPORT_SYMBOL_GPL(sun4i_usb_phy_set_squelch_detect);
[2]: drivers/usb/musb/sunxi.c
static void sunxi_musb_pre_root_reset_end(struct musb *musb)
{
struct sunxi_glue *glue = dev_get_drvdata(musb->controller->parent);
sun4i_usb_phy_set_squelch_detect(glue->phy, false);
}
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/5] ARM: davinci: defined missing CFGCHIP2_REFFREQ_* macros for MUSB PHY David Lechner <david@lechnology.com> - 2016-03-15 23:40 +0100
[PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources David Lechner <david@lechnology.com> - 2016-03-15 23:40 +0100
Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-03-15 23:50 +0100
Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources David Lechner <david@lechnology.com> - 2016-03-16 04:50 +0100
Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources David Lechner <david@lechnology.com> - 2016-03-16 06:00 +0100
Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-03-16 18:40 +0100
Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources David Lechner <david@lechnology.com> - 2016-03-16 19:20 +0100
Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-03-16 19:30 +0100
Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources David Lechner <david@lechnology.com> - 2016-03-16 19:30 +0100
Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-03-16 19:30 +0100
Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-03-16 12:40 +0100
[PATCH 5/5] usb: musb-da8xx: remove board-specific clock handling David Lechner <david@lechnology.com> - 2016-03-15 23:40 +0100
Re: [PATCH 5/5] usb: musb-da8xx: remove board-specific clock handling Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-03-16 13:00 +0100
[PATCH 4/5] usb: ohci-da8xx: Remove clock code that references mach David Lechner <david@lechnology.com> - 2016-03-15 23:40 +0100
Re: [PATCH 4/5] usb: ohci-da8xx: Remove clock code that references mach Alan Stern <stern@rowland.harvard.edu> - 2016-03-16 16:00 +0100
Re: [PATCH 4/5] usb: ohci-da8xx: Remove clock code that references mach David Lechner <david@lechnology.com> - 2016-03-16 19:10 +0100
[PATCH 2/5] ARM: davinci: da8xx: add usb phy clocks David Lechner <david@lechnology.com> - 2016-03-15 23:40 +0100
Re: [PATCH 2/5] ARM: davinci: da8xx: add usb phy clocks Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-03-16 13:30 +0100
Re: [PATCH 2/5] ARM: davinci: da8xx: add usb phy clocks David Lechner <david@lechnology.com> - 2016-03-16 19:00 +0100
Re: [PATCH 2/5] ARM: davinci: da8xx: add usb phy clocks Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-03-16 19:10 +0100
Re: [PATCH 2/5] ARM: davinci: da8xx: add usb phy clocks David Lechner <david@lechnology.com> - 2016-03-16 19:30 +0100
csiph-web