Re: [RFC PATCH 0/4] usb: gadget: add is_selfpowered

2015-01-27 Thread Peter Chen
On Tue, Jan 27, 2015 at 10:37:30AM +0800, Peter Chen wrote:
 Hi Felipe,
 

Hi Felipe,

Except for Alan's comments, do you agree with this change for
common struct, if you agree with it, I will send formal patch
with other udc driver's cleanup.

Peter

 We can use a common is_selfpowered flag at usb_gadget to indicate
 whether the gadget is self-powered or bus-powered, it can avoid
 every udc driver defining a similar flag, and the user can
 read it through udc core sys entry.
 
 In the 1st patch, I introduce is_selfpowered for usb_gadget.
 In the 2nd patch, I take chipidea driver as an example to show
 how udc driver uses this flag.
 In the 3rd patch, I clean up at91 udc driver for this flag.
 In the 4th patch, I add this entry to sys through udc core.
 
 If you agree with this change, I will submit a formal patch set
 after cleaning up other udc drivers.
 
 Peter Chen (4):
   usb: gadget: introduce is_selfpowered for usb_gadget
   usb: chipidea: udc: add set_selfpowered gaget ops
   usb: gadget: at91_udc: use common is_selfpowered
   usb: udc-core: add is_selfpowered sys entry
 
  drivers/usb/chipidea/udc.c| 14 ++
  drivers/usb/gadget/udc/at91_udc.c |  8 
  drivers/usb/gadget/udc/at91_udc.h |  1 -
  drivers/usb/gadget/udc/udc-core.c |  2 ++
  include/linux/usb/gadget.h|  2 ++
  5 files changed, 22 insertions(+), 5 deletions(-)
 
 -- 
 1.9.1
 

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [RFC PATCH 0/4] usb: gadget: add is_selfpowered

2015-01-27 Thread Peter Chen
 
  
   Hi Felipe,
  
   Except for Alan's comments, do you agree with this change for common
   struct, if you agree with it, I will send formal patch with other
   udc driver's cleanup.
 
  looks good to me. Will you provide patches to all other UDC drivers ?
 
 it's certainly not mandatory, and I can help with both musb and dwc3 (probably
 a few others too), but it'll help me if you do. :-)
 

I will do it for all udcs.

Peter
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 0/4] usb: gadget: add is_selfpowered

2015-01-27 Thread Felipe Balbi
On Wed, Jan 28, 2015 at 04:32:59AM +, Peter Chen wrote:
  
   
Hi Felipe,
   
Except for Alan's comments, do you agree with this change for common
struct, if you agree with it, I will send formal patch with other
udc driver's cleanup.
  
   looks good to me. Will you provide patches to all other UDC drivers ?
  
  it's certainly not mandatory, and I can help with both musb and dwc3 
  (probably
  a few others too), but it'll help me if you do. :-)
  
 
 I will do it for all udcs.

cool, thanks. I'll make sure to test on platforms I have around.

cheers

-- 
balbi


signature.asc
Description: Digital signature


Re: [RFC PATCH 0/4] usb: gadget: add is_selfpowered

2015-01-27 Thread Felipe Balbi
Hi,

On Wed, Jan 28, 2015 at 10:05:39AM +0800, Peter Chen wrote:
 On Tue, Jan 27, 2015 at 10:37:30AM +0800, Peter Chen wrote:
  Hi Felipe,
  
 
 Hi Felipe,
 
 Except for Alan's comments, do you agree with this change for
 common struct, if you agree with it, I will send formal patch
 with other udc driver's cleanup.

looks good to me. Will you provide patches to all other UDC drivers ?

-- 
balbi


signature.asc
Description: Digital signature


Re: [RFC PATCH 0/4] usb: gadget: add is_selfpowered

2015-01-27 Thread Felipe Balbi
On Tue, Jan 27, 2015 at 10:07:02PM -0600, Felipe Balbi wrote:
 Hi,
 
 On Wed, Jan 28, 2015 at 10:05:39AM +0800, Peter Chen wrote:
  On Tue, Jan 27, 2015 at 10:37:30AM +0800, Peter Chen wrote:
   Hi Felipe,
   
  
  Hi Felipe,
  
  Except for Alan's comments, do you agree with this change for
  common struct, if you agree with it, I will send formal patch
  with other udc driver's cleanup.
 
 looks good to me. Will you provide patches to all other UDC drivers ?

it's certainly not mandatory, and I can help with both musb and dwc3
(probably a few others too), but it'll help me if you do. :-)

cheers

-- 
balbi


signature.asc
Description: Digital signature


[RFC PATCH 0/4] usb: gadget: add is_selfpowered

2015-01-26 Thread Peter Chen
Hi Felipe,

We can use a common is_selfpowered flag at usb_gadget to indicate
whether the gadget is self-powered or bus-powered, it can avoid
every udc driver defining a similar flag, and the user can
read it through udc core sys entry.

In the 1st patch, I introduce is_selfpowered for usb_gadget.
In the 2nd patch, I take chipidea driver as an example to show
how udc driver uses this flag.
In the 3rd patch, I clean up at91 udc driver for this flag.
In the 4th patch, I add this entry to sys through udc core.

If you agree with this change, I will submit a formal patch set
after cleaning up other udc drivers.

Peter Chen (4):
  usb: gadget: introduce is_selfpowered for usb_gadget
  usb: chipidea: udc: add set_selfpowered gaget ops
  usb: gadget: at91_udc: use common is_selfpowered
  usb: udc-core: add is_selfpowered sys entry

 drivers/usb/chipidea/udc.c| 14 ++
 drivers/usb/gadget/udc/at91_udc.c |  8 
 drivers/usb/gadget/udc/at91_udc.h |  1 -
 drivers/usb/gadget/udc/udc-core.c |  2 ++
 include/linux/usb/gadget.h|  2 ++
 5 files changed, 22 insertions(+), 5 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html