Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1394893

RE: [PATCH 1/2] usb: configfs: allow UDC binding rule configured as binding to *any* UDC

From "Du, Changbin" <changbin.du@intel.com>
Newsgroups linux.kernel
Subject RE: [PATCH 1/2] usb: configfs: allow UDC binding rule configured as binding to *any* UDC
Date 2016-05-05 07:50 +0200
Message-ID <rvkkG-287-9@gated-at.bofh.it> (permalink)
References <ruz2p-4U-3@gated-at.bofh.it> <ruz2p-4U-1@gated-at.bofh.it> <rv0cj-oI-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,
> > On most platforms, there is only one device controller available.
> > In this case, we desn't care the UDC's name. So let's ignore the
> > name by setting 'UDC' to 'any'.
> 
> Hmm libubsgx allows to do this for a very long time. You simply pass
> NULL instead of pointer to usbg_udc.
> 
> It is also possible to do this from command line, just simply:
> 
> $ echo `ls -1 /sys/class/udc | head -n 1` > UDC
> 
> So if we can easily do this from user space what's the benefit of adding
> this special "any" keyword to kernel?
> 
Well, it is just for *easy to use*. Looking up /sys/class/udc mostly
can be skipped. The UDC core support this convenience behavior, 
so why don't we export it with a little change?

> > And also we can change UDC name
> > at any time if it is not binded (no need set to "" first).
> >
> 
> Not sure if:
> 
> $ echo "" > UDC
> 
> is really a problem. Personally I'm quite used to situation in which I
> have to turn the light off before turning it on once again;)
> 
That is not a problem. But just avoid pseudo 'busy'. If gadget is not 
bind, it is free to reconfigure it. So seem no need block re-configuration.

In a word, this patch is just an improvement, not to fix any issues or
add new function.

> Cheers,
> --
> Krzysztof Opasiak
> Samsung R&D Institute Poland
> Samsung Electronics

Thanks,
Du, Changbin

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] usb: configfs: allow UDC binding rule configured as binding to *any* UDC changbin.du@intel.com - 2016-05-03 05:20 +0200
  Re: [PATCH 1/2] usb: configfs: allow UDC binding rule configured as  binding to *any* UDC Krzysztof Opasiak <k.opasiak@samsung.com> - 2016-05-04 10:20 +0200
    RE: [PATCH 1/2] usb: configfs: allow UDC binding rule configured as  binding to *any* UDC "Du, Changbin" <changbin.du@intel.com> - 2016-05-05 07:50 +0200
      Re: [PATCH 1/2] usb: configfs: allow UDC binding rule configured as  binding to *any* UDC Krzysztof Opasiak <k.opasiak@samsung.com> - 2016-05-05 09:40 +0200
        RE: [PATCH 1/2] usb: configfs: allow UDC binding rule configured as  binding to *any* UDC "Du, Changbin" <changbin.du@intel.com> - 2016-05-06 04:50 +0200
          Re: [PATCH 1/2] usb: configfs: allow UDC binding rule configured as  binding to *any* UDC Krzysztof Opasiak <k.opasiak@samsung.com> - 2016-05-06 08:00 +0200

csiph-web