On Wed, May 28, 2014 at 03:09:18PM +0800, Li Jun wrote: > From: Li Jun <b47624@xxxxxxxxxxxxx> > > This patch sets host request flag in sys input when a A device > set a_bus_req or a B device set b_bus_req in peripheral role. > > Signed-off-by: Li Jun <b47624@xxxxxxxxxxxxx> > --- > drivers/usb/chipidea/otg_fsm.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c > index 923b789..41faffa 100644 > --- a/drivers/usb/chipidea/otg_fsm.c > +++ b/drivers/usb/chipidea/otg_fsm.c > @@ -82,6 +82,11 @@ set_a_bus_req(struct device *dev, struct device_attribute *attr, > return count; > } > ci->fsm.a_bus_req = 1; > + if (ci->transceiver->state == OTG_STATE_A_PERIPHERAL) { > + ci->gadget.host_request_flag = 1; > + mutex_unlock(&ci->fsm.lock); > + return count; > + } > } > > disable_irq_nosync(ci->irq); > @@ -162,8 +167,14 @@ set_b_bus_req(struct device *dev, struct device_attribute *attr, > mutex_lock(&ci->fsm.lock); > if (buf[0] == '0') > ci->fsm.b_bus_req = 0; > - else if (buf[0] == '1') > + else if (buf[0] == '1') { > ci->fsm.b_bus_req = 1; > + if (ci->transceiver->state == OTG_STATE_B_PERIPHERAL) { > + ci->gadget.host_request_flag = 1; > + mutex_unlock(&ci->fsm.lock); > + return count; > + } > + } > > disable_irq_nosync(ci->irq); > queue_work(ci->wq, &ci->work); > -- > 1.7.9.5 > Where we have used gadget.host_request_flag, and what does this flag be used for? -- 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