Rockbox mail archiveSubject: Classic holdswitch polling
Classic holdswitch polling
From: Cástor Muñoz <cmvidal_at_gmail.com>
Date: Sun, 4 Mar 2012 23:19:47 +0100
HI, need help for a final solution for FS#12520, i am trying to detect
the holdswitch state using PMU interrupts but no luck so far, i also
want to look to the GPIO ports one more time but i am not very
If finally the PMU polling is needed to detect the holdswitch state,
what do you think is the best solution?, without rewriting a lot of
code there are mainly two ways:
a) Put PMU polling into a critical section and continue polling from
irq handler. The delay for some i2c operations (i2c_read(date)) is
relatively high so i think this is not the best solution, but its easy
and probably it will work.
b) To get PMU polling out of the interrupt handler. For me this is a
better solution, its a minor change but there is no obvious place to
do it, actually it is managed on the tick interrupt for all targets.
The powermgmt thread doesn't seems to be an appropriate place, but
creating a new thread only for this target looks wasteful, maybe the
backlight thread or the misc event handler? .
I think the PMU polling crashes should be fixed as soon as possible,
some of the crashes are very annoying, also it will allow to include
the CPU scaling patch which seems stable.
Received on 2012-03-04