summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c')
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c b/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c
deleted file mode 100644
index 76001dddd6..0000000000
--- a/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c
+++ /dev/null
@@ -1,86 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (c) 2008 by Michael Sevakis
11 *
12 * Gigabeat S MC13783 event descriptions
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
18 *
19 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 * KIND, either express or implied.
21 *
22 ****************************************************************************/
23#include "config.h"
24#include "system.h"
25#include "spi-imx31.h"
26#include "mc13783.h"
27#include "mc13783-target.h"
28#include "adc-target.h"
29#include "button-target.h"
30#include "power-gigabeat-s.h"
31#include "powermgmt-target.h"
32
33/* Gigabeat S mc13783 serial interface node. */
34
35struct spi_node mc13783_spi =
36{
37 /* Based upon original firmware settings */
38 CSPI2_NUM, /* CSPI module 2 */
39 CSPI_CONREG_CHIP_SELECT_SS0 | /* Chip select 0 */
40 CSPI_CONREG_DRCTL_DONT_CARE | /* Don't care about CSPI_RDY */
41 CSPI_CONREG_DATA_RATE_DIV_32 | /* Clock = IPG_CLK/32 = 2,062,500Hz. */
42 CSPI_BITCOUNT(32-1) | /* All 32 bits are to be transferred */
43 CSPI_CONREG_SSPOL | /* SS active high */
44 CSPI_CONREG_SSCTL | /* Negate SS between SPI bursts */
45 CSPI_CONREG_MODE, /* Master mode */
46 0, /* SPI clock - no wait states */
47};
48
49
50/* Gigabeat S definitions for static MC13783 event registration */
51
52const struct mc13783_event mc13783_events[MC13783_NUM_EVENTS] =
53{
54 [MC13783_ADCDONE_EVENT] = /* ADC conversion complete */
55 {
56 .int_id = MC13783_INT_ID_ADCDONE,
57 .sense = 0,
58 .callback = adc_done,
59 },
60 [MC13783_ONOFD1_EVENT] = /* Power button */
61 {
62 .int_id = MC13783_INT_ID_ONOFD1,
63 .sense = MC13783_ONOFD1S,
64 .callback = button_power_event,
65 },
66 [MC13783_SE1_EVENT] = /* Main charger detection */
67 {
68 .int_id = MC13783_INT_ID_SE1,
69 .sense = MC13783_SE1S,
70 .callback = charger_main_detect_event,
71 },
72 [MC13783_USB_EVENT] = /* USB insertion/USB charger detection */
73 {
74 .int_id = MC13783_INT_ID_USB,
75 .sense = MC13783_USB4V4S,
76 .callback = usb_connect_event,
77 },
78#ifdef HAVE_HEADPHONE_DETECTION
79 [MC13783_ONOFD2_EVENT] = /* Headphone jack */
80 {
81 .int_id = MC13783_INT_ID_ONOFD2,
82 .sense = 0,
83 .callback = headphone_detect_event,
84 },
85#endif
86};