- Status Closed
- Percent Complete
- Task Type Patches
- Category Operating System/Drivers
-
Assigned To
Tobias Diedrich - Operating System Sansa c200
- Severity Low
- Priority Very Low
- Reported Version Release 3.4
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
Attached to Project: Rockbox
Opened by Tobias Diedrich - 2010-03-17
Last edited by Tobias Diedrich - 2010-03-23
Opened by Tobias Diedrich - 2010-03-17
Last edited by Tobias Diedrich - 2010-03-23
FS#11120 - Use AS3514_IRQ_ENRD0 for usb detection on ams sansas
Since I can’t find a gpio for usb detection on my C200v2 variant, use as3514 irq_enrd0 usb status bit instead, which should work across all models.
Tested on my C200v2, needs testing on all other AMS based models.
Closed by Tobias Diedrich
2010-03-23 09:08
Reason for closing: Fixed
Additional comments about closing:
2010-03-23 09:08
Reason for closing: Fixed
Additional comments about closing:
Fixed by FS#11131
Why a thread, and not for example a tick task?
A tick task doesn’t work since ascodec_read takes a lock.
Ah yes. Makes sense then. The stack size is probably a bit bigger than needed.
Does this also fix the problem that plain wall charger trigger the usb detection?
do the linux patches give some clue on how to use interrupts with i2c ?
that would remove the need for a thread, though if this patch works then it should be committed and if a cleaner (smaller) solution is found later it would be better.
Alternatively, if there is a function to check wether the lock is already taken or not, and only run the read if the ascodec is not locked.
The not so nice thing about that is that ascodec_read is much slower than a gpio read anyway, so calling it 100 times a second from tick might be not be the best thing either.
I see a sleep(HZ/10) which would be 10 times a second, we can live with that :)
Didn’t bertrik work in i2c interrupts once?
Likely not, I was hoping so since the bit is called usb status, but if I put tape on the data pins it still gets detected that way.