RE: [PATCH 3/3] usb: chipidea: use hrtimer for otg fsm timers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> >
> > Why you use unsigned, but not unsigned int or unsigned long?
> 
> unsigned is equal to "unsigned int", currently only 13 timers are defined, so
> "unsigned" is okay, for possible future extension, I will change it to be
> "unsigned long"
> 

Since I see you use unsigned long below, I have this question, it is ok
you do not change it.

 
> > >
> > > @@ -579,8 +579,15 @@ int ci_otg_fsm_work(struct ci_hdrc *ci)
> > >  			 * a_idle to a_wait_vrise when power up
> > >  			 */
> > >  			if ((ci->fsm.id) || (ci->id_event) ||
> > > -						(ci->fsm.power_up))
> > > +						(ci->fsm.power_up)) {
> > >  				ci_otg_queue_work(ci);
> > > +			} else {
> > > +				/* Enable data pulse irq */
> > > +				hw_write(ci, OP_PORTSC, PORTSC_W1C_BITS |
> > > +								PORTSC_PP, 0);
> > > +				hw_write_otgsc(ci, OTGSC_DPIS, OTGSC_DPIS);
> > > +				hw_write_otgsc(ci, OTGSC_DPIE, OTGSC_DPIE);
> > > +			}
> >
> > Can we enable data pulse enable at initialization routine?
> 
> This irq should be enabled only for A-device when there is no session (host role,
> no vbus, so in A_IDLE state), and disable it after receive its irq(SRP).
> 

But from the code, I don't know the state is at A_IDLE, mind to change?

 
Peter
--
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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux