Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1242379
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] usb: musb: dsps: implement vbus_status method |
| Date | 2015-10-08 16:00 +0200 |
| Message-ID | <qhjTI-5jJ-7@gated-at.bofh.it> (permalink) |
| References | <qgYme-7YI-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello.
On 10/7/2015 5:40 PM, Roman Alyautdin wrote:
> Implement vbus_status method of musb_platform_ops that allows
> musb_core to properly represent the VBUS status of musb_dsps devices in
> corresponding sysfs entry
>
> Signed-off-by: Roman Alyautdin <ralyautdin@dev.rtsoft.ru>
> ---
> drivers/usb/musb/musb_dsps.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
> index 84512d1..9c00edf 100644
> --- a/drivers/usb/musb/musb_dsps.c
> +++ b/drivers/usb/musb/musb_dsps.c
> @@ -632,6 +632,18 @@ static void dsps_read_fifo32(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
> }
> }
>
> +static int dsps_musb_vbus_status(struct musb *musb)
> +{
> + void __iomem *mregs = musb->mregs;
> + u8 devctl;
> +
> + devctl = dsps_readb(mregs, MUSB_DEVCTL);
> + if ((devctl & MUSB_DEVCTL_VBUS) == (3 << MUSB_DEVCTL_VBUS_SHIFT))
I don't see why this has to be is implemented in the DSPS glue layer. The
DevCtl register is a standard MUSB one.
[...]
MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] usb: musb: dsps: implement vbus_status method Roman Alyautdin <ralyautdin@dev.rtsoft.ru> - 2015-10-07 17:00 +0200
Re: [PATCH] usb: musb: dsps: implement vbus_status method Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-08 16:00 +0200
Re: [PATCH] usb: musb: dsps: implement vbus_status method Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-08 16:10 +0200
Re: [PATCH] usb: musb: dsps: implement vbus_status method Roman Alyautdin <ralyautdin@dev.rtsoft.ru> - 2015-10-08 16:30 +0200
Re: [PATCH] usb: musb: dsps: implement vbus_status method Felipe Balbi <balbi@ti.com> - 2015-10-09 23:30 +0200
csiph-web