2009/5/3 Daniel Ribeiro <drw...@gmail.com>: > Em Dom, 2009-05-03 às 22:41 +0300, Ilya Petrov escreveu: >> 2009/5/3 Daniel Ribeiro <drw...@gmail.com>: >> > EOC will interrupt PXA when you connect the cable. >> >> ok. how can i catch this? > > Isnt it being caught already? Last time i checked this part of the code > it was working... > > Its GPIO10, set to eoc_irq(), which in turn schedules eoc_work().
strange. i tried this first: it doesn`t execute on every plug/unplug of cable > > eoc_work is currently a NOP, that just prints the interrupts from the > ISR register. The SENSE, ISR and MSR registers use the same bits, the > rule is: Any change on SENSE rises ISR in case MSR is low and a > interrupt is sent to pxa. > > So, if you want to monitor bit 4(INT_ID), then you clear bit 4 of MSR to > enable the irq, hmm. according to code _all_ bits are cleared in eoc_probe: ret = eoc_reg_write(EOC_REG_INT_MASK, 0x0); //fef); maby this should be written after every event? > on the softirq handler you check if bit 4 of ISR is set, > case it is, then it was a INT_ID event that triggered the irq, then you > read bit 4 on SENSE to see if it was a connect or disconnect event. so setting MSR bit to 0 enables some event, ISR value points which event triggered irq, and corresponding bit in SENSE indicates current state of thing triggered event. correct? -- wbr, Ilya ICQ: none, Jabber: ilya.muro...@jabber.ru