summaryrefslogtreecommitdiff
path: root/firmware/export/s5l8702.h
diff options
context:
space:
mode:
authorCástor Muñoz <cmvidal@gmail.com>2014-11-10 04:35:51 +0100
committerCástor Muñoz <cmvidal@gmail.com>2015-10-07 06:15:03 +0200
commit609cde94689b20098be1c36cc5157514b6dd63a4 (patch)
tree88d559823f2938626c1e80095d6ec46b6bc908f7 /firmware/export/s5l8702.h
parent3fdb86ea417cae94a7f7df4475989843e644acdc (diff)
downloadrockbox-609cde94689b20098be1c36cc5157514b6dd63a4.tar.gz
rockbox-609cde94689b20098be1c36cc5157514b6dd63a4.zip
iPod Classic: s5l8702 GPIO interrupt controller.
This patch implements a simple API to use the external interrupt hardware present on s5l8702 (GPIO interrupt controller). This GPIOIC has been fully tested using emcore apps. Code is based on openiBoot project, there are a few modifications to optimize space considering we will only use two or three external interrupts. The API compiles and works, but has been never used, therefore probably will need some changes to the final version. External interrupts are necessary for jack remote+mic controller (see iAP Interface Specifiction: Headphone Remote and Mic System), this controller is located at I2C bus address 0x72, there is a IRQ line for remote button press/release events routed to GPIO E6. At this moment, the functionallity of this controller has been extensively tested using emcore, getting a lot of information about how it works. Microphone is already working on RB, jack accessory detection and button events are work in progress. PMU IRQ line is also routed to GPIO F3, it signals many events: holdswitch, usb plug, wall adapter, low battery... The use of PMU interrupts is the orthodox way of doing things, at this moment there is no work done in this direction, there are a lot of PMU events and i think it is a matter of discursion what to do and how. Change-Id: Icc2e48965e664ca56c9518d84a81c9d9fdd31736
Diffstat (limited to 'firmware/export/s5l8702.h')
-rw-r--r--firmware/export/s5l8702.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/export/s5l8702.h b/firmware/export/s5l8702.h
index a83fe371e0..a176a9bf29 100644
--- a/firmware/export/s5l8702.h
+++ b/firmware/export/s5l8702.h
@@ -853,6 +853,13 @@ struct dma_lli
853#define IRQ_ATA 29 853#define IRQ_ATA 29
854#define IRQ_MMC 44 854#define IRQ_MMC 44
855 855
856#define IRQ_EXT0 0
857#define IRQ_EXT1 1
858#define IRQ_EXT2 2
859#define IRQ_EXT3 3
860#define IRQ_EXT4 31
861#define IRQ_EXT5 32
862#define IRQ_EXT6 33
856 863
857#endif 864#endif
858 865