From 609cde94689b20098be1c36cc5157514b6dd63a4 Mon Sep 17 00:00:00 2001 From: Cástor Muñoz Date: Mon, 10 Nov 2014 04:35:51 +0100 Subject: 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 --- firmware/export/s5l8702.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'firmware/export') 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 #define IRQ_ATA 29 #define IRQ_MMC 44 +#define IRQ_EXT0 0 +#define IRQ_EXT1 1 +#define IRQ_EXT2 2 +#define IRQ_EXT3 3 +#define IRQ_EXT4 31 +#define IRQ_EXT5 32 +#define IRQ_EXT6 33 #endif -- cgit v1.2.3