rockbox/firmware/drivers
Michael Sevakis 1654efc313 Unify storage threads into one
* Editing a bunch of drivers' thread routines in order to
implement a new feature is tedious.

* No matter the number of storage drivers, they share one thread.
No extra threads needed for CONFIG_STORAGE_MULTI.

* Each has an event callback called by the storage thread.

* A default callback is provided to fake sleeping in order to
trigger idle callbacks. It could also do other default processing.
Changes to it will be part of driver code without editing each
one.

* Drivers may sleep and wake as they please as long as they give
a low pulse on their storage bit to ask to go into sleep mode.
Idle callback is called on its behalf and driver immediately put
into sleep mode.

* Drivers may indicate they are to continue receiving events in
USB mode, otherwise they receve nothing until disconnect (they
do receive SYS_USB_DISCONNECTED no matter what).

* Rework a few things to keep the callback implementation sane
and maintainable. ata.c was dreadful with all those bools; make
it a state machine and easier to follow. Remove last_user_activity;
it has no purpose that isn't served by keeping the disk active
through last_disk_activity instead.

* Even-out stack sizes partly because of a lack of a decent place
to define them by driver or SoC or whatever; it doesn't seem too
critical to do that anyway. Many are simply too large while at
least one isn't really adequate. They may be individually
overridden if necessary (figure out where). The thread uses the
greatest size demanded. Newer file code is much more frugal with
stack space. I barely see use crack 50% after idle callbacks
(usually mid-40s). Card insert/eject doesn't demand much.

* No forcing of idle callbacks. If it isn't necessary for one or
more non-disk storage types, it really isn't any more necessary for
disk storage. Besides, it makes the whole thing easier to implement.

Change-Id: Id30c284d82a8af66e47f2cfe104c52cbd8aa7215
2017-10-26 14:35:41 -04:00
..
audio sonynwz: add api and debug entries for "acoustic" and "cue/rev" mode 2017-10-07 22:01:00 +02:00
rtc Move intrinsic RTC implmentation differences to driver files 2017-01-26 23:07:49 -05:00
tuner Forgot to remove unused RDS buffers from the ipod remote tuner. 2017-02-12 00:21:09 -05:00
adc-as3514.c AMS: Return ascodec to interrupt-based I2C2 driver 2017-01-25 00:05:13 +01:00
ata.c Unify storage threads into one 2017-10-26 14:35:41 -04:00
ata_flash.c Limit more variables to file scope 2015-01-11 21:40:51 +01:00
button.c Fix dumb typo in button.c. 2017-01-21 12:16:27 -05:00
eeprom_24cxx.c
fat.c Do some debug and preparatory work for ramcache and playlist 2017-01-17 14:35:36 -05:00
fmradio.c
generic_i2c.c
isp1362.c
isp1583.c
lcd-1bit-vert.c
lcd-2bit-horz.c
lcd-2bit-vert.c
lcd-2bit-vi.c
lcd-16bit-common.c Fix dangerous casts 2017-02-04 17:24:47 +01:00
lcd-16bit-vert.c Fix some build errors and warnings. 2014-06-21 00:49:05 +02:00
lcd-16bit.c Fix dangerous casts 2017-02-04 17:24:47 +01:00
lcd-24bit.c Fix some build errors and warnings. 2014-06-21 00:49:05 +02:00
lcd-bitmap-common.c
lcd-charcell.c
lcd-charset-player.c Limit more variables to file scope 2015-01-11 21:40:51 +01:00
lcd-color-common.c Fix dangerous casts 2017-02-04 17:24:47 +01:00
lcd-memframe.c
lcd-remote-1bit-v.c
lcd-remote-2bit-vi.c
lcd-scroll.c
led.c YH92x: Use the led near the lcd as the ATA led, instead of shine all the time. 2014-06-18 18:06:17 +00:00
m5636.c
m66591.c usb-target.h: remove 2011-12-31 18:44:55 +00:00
nand_id.c TCC NAND: The BLOCKS_PER_SEGMENT define was actually the number of planes mentioned in the Samsung NAND datasheet. Add this to the nand_id struct, so that it can be runtime detected (required for some D2s to boot). Use the struct directly instead of making a local copy, and format the nand_info table to 80 columns. 2009-03-02 23:36:12 +00:00
pca9555.c
pcf50605.c
pcf50606.c
pcf50635.c
qt1106.c
ramdisk.c Unify storage threads into one 2017-10-26 14:35:41 -04:00
rds.c RDS: Fix a few goofs in the unicode table 2017-04-21 19:47:25 -04:00
sd.c
serial.c
sw_i2c.c
synaptics-mep.c
touchpad.c
touchscreen.c Introducing Targets iBasso DX50 & iBasso DX90 2014-09-18 18:19:01 +02:00
tsc200x.c
tsc2100.c