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 majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html