diff options
author | Lorenzo Miori <memorys60@gmail.com> | 2012-04-07 10:30:23 +0200 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2012-05-28 19:39:14 +0200 |
commit | 3cad5573b68917442564dc4f210fac056447c5cd (patch) | |
tree | 16e7f637a7bf9a22b00fde445a97f267b5467cc2 /firmware | |
parent | 9c33f93c1c9bfd37f33f638eccceefa4c0d5b5e6 (diff) | |
download | rockbox-3cad5573b68917442564dc4f210fac056447c5cd.tar.gz rockbox-3cad5573b68917442564dc4f210fac056447c5cd.zip |
ypr0: This patch adds radio support to Samsung YP-R0
Basically it uses the default SI4700 radio chip driver, the only thing that's different is the I2C access,
written specifically to interact with my kernel module.
Next things to add are:
- RDS support!
Change-Id: I0ed125641e00f93124d7a34f90dd508e7f1db5a4
Signed-off-by: Lorenzo Miori <memorys60@gmail.com>
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/SOURCES | 6 | ||||
-rw-r--r-- | firmware/drivers/audio/as3514.c | 5 | ||||
-rw-r--r-- | firmware/export/config/samsungypr0.h | 15 | ||||
-rw-r--r-- | firmware/target/hosted/ypr0/audio-ypr0.c | 69 | ||||
-rw-r--r-- | firmware/target/hosted/ypr0/powermgmt-ypr0.c | 29 | ||||
-rw-r--r-- | firmware/target/hosted/ypr0/radio-ypr0.c | 66 | ||||
-rw-r--r-- | firmware/target/hosted/ypr0/radio-ypr0.h | 36 | ||||
-rw-r--r-- | firmware/target/hosted/ypr0/si4709.h | 82 |
8 files changed, 301 insertions, 7 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES index eb49e3e581..54fde546dc 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES | |||
@@ -92,6 +92,10 @@ target/hosted/ypr0/backlight-ypr0.c | |||
92 | target/hosted/ypr0/ascodec-ypr0.c | 92 | target/hosted/ypr0/ascodec-ypr0.c |
93 | target/hosted/ypr0/powermgmt-ypr0.c | 93 | target/hosted/ypr0/powermgmt-ypr0.c |
94 | target/hosted/ypr0/gpio_ypr0.c | 94 | target/hosted/ypr0/gpio_ypr0.c |
95 | target/hosted/ypr0/audio-ypr0.c | ||
96 | #if CONFIG_TUNER | ||
97 | target/hosted/ypr0/radio-ypr0.c | ||
98 | #endif | ||
95 | #endif | 99 | #endif |
96 | 100 | ||
97 | /* Maemo specific files */ | 101 | /* Maemo specific files */ |
@@ -309,7 +313,7 @@ drivers/rtc/rtc_imx233.c | |||
309 | /* Tuner */ | 313 | /* Tuner */ |
310 | #if CONFIG_TUNER | 314 | #if CONFIG_TUNER |
311 | tuner.c | 315 | tuner.c |
312 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | 316 | #if ((CONFIG_PLATFORM & PLATFORM_NATIVE) || defined(SAMSUNG_YPR0)) |
313 | #if (CONFIG_TUNER & LV24020LP) | 317 | #if (CONFIG_TUNER & LV24020LP) |
314 | drivers/tuner/lv24020lp.c | 318 | drivers/tuner/lv24020lp.c |
315 | #endif /* (CONFIG_TUNER & LV24020LP) */ | 319 | #endif /* (CONFIG_TUNER & LV24020LP) */ |
diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c index 22609621df..5f18bc6ec1 100644 --- a/firmware/drivers/audio/as3514.c +++ b/firmware/drivers/audio/as3514.c | |||
@@ -156,8 +156,13 @@ void audiohw_preinit(void) | |||
156 | as3514_write(AS3514_AUDIOSET3, AUDIOSET3_HPCM_on | AUDIOSET3_HP_LONGSTART); | 156 | as3514_write(AS3514_AUDIOSET3, AUDIOSET3_HPCM_on | AUDIOSET3_HP_LONGSTART); |
157 | 157 | ||
158 | as3514_write(AS3543_DAC_IF, AS3543_DAC_INT_PLL); | 158 | as3514_write(AS3543_DAC_IF, AS3543_DAC_INT_PLL); |
159 | #ifdef SAMSUNG_YPR0 | ||
160 | /* Select Line 1 for FM radio */ | ||
161 | as3514_clear(AS3514_LINE_IN1_R, LINE_IN_R_LINE_SELECT); | ||
162 | #else | ||
159 | /* Select Line 2 for FM radio */ | 163 | /* Select Line 2 for FM radio */ |
160 | as3514_set(AS3514_LINE_IN1_R, LINE_IN_R_LINE_SELECT); | 164 | as3514_set(AS3514_LINE_IN1_R, LINE_IN_R_LINE_SELECT); |
165 | #endif | ||
161 | /* Output SUM of microphone/line/DAC */ | 166 | /* Output SUM of microphone/line/DAC */ |
162 | as3514_write(AS3514_HPH_OUT_R, HPH_OUT_R_HEADPHONES | HPH_OUT_R_HP_OUT_SUM); | 167 | as3514_write(AS3514_HPH_OUT_R, HPH_OUT_R_HEADPHONES | HPH_OUT_R_HP_OUT_SUM); |
163 | 168 | ||
diff --git a/firmware/export/config/samsungypr0.h b/firmware/export/config/samsungypr0.h index 48e98e5b46..10d7aaecb8 100644 --- a/firmware/export/config/samsungypr0.h +++ b/firmware/export/config/samsungypr0.h | |||
@@ -75,7 +75,6 @@ | |||
75 | //#define HAVE_RTC_RAM | 75 | //#define HAVE_RTC_RAM |
76 | 76 | ||
77 | /* define this if you have a real-time clock */ | 77 | /* define this if you have a real-time clock */ |
78 | //#define CONFIG_RTC APPLICATION | ||
79 | #define CONFIG_RTC RTC_AS3514 | 78 | #define CONFIG_RTC RTC_AS3514 |
80 | #define HAVE_RTC_ALARM | 79 | #define HAVE_RTC_ALARM |
81 | 80 | ||
@@ -103,9 +102,17 @@ | |||
103 | 102 | ||
104 | #define HAVE_SW_TONE_CONTROLS | 103 | #define HAVE_SW_TONE_CONTROLS |
105 | 104 | ||
106 | /* TODO: Make use of the si4703 tuner hardware */ | 105 | #define CONFIG_TUNER SI4700 |
107 | /* #define CONFIG_TUNER SI4700 */ | 106 | #define HAVE_TUNER_PWR_CTRL |
108 | /* #define HAVE_TUNER_PWR_CTRL*/ | 107 | |
108 | /* TODO: next step: enable RDS | ||
109 | #define HAVE_RDS_CAP | ||
110 | #define RDS_ISR_PROCESSING | ||
111 | */ | ||
112 | |||
113 | /* Define this for FM radio input available */ | ||
114 | #define HAVE_FMRADIO_IN | ||
115 | #define INPUT_SRC_CAPS SRC_CAP_FMRADIO | ||
109 | 116 | ||
110 | /* We have a GPIO that detects it */ | 117 | /* We have a GPIO that detects it */ |
111 | #define HAVE_HEADPHONE_DETECTION | 118 | #define HAVE_HEADPHONE_DETECTION |
diff --git a/firmware/target/hosted/ypr0/audio-ypr0.c b/firmware/target/hosted/ypr0/audio-ypr0.c new file mode 100644 index 0000000000..dfd63ef5cd --- /dev/null +++ b/firmware/target/hosted/ypr0/audio-ypr0.c | |||
@@ -0,0 +1,69 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2009 by Bertrik Sikken | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #include "config.h" | ||
22 | #include "system.h" | ||
23 | #include "cpu.h" | ||
24 | #include "audio.h" | ||
25 | #include "audiohw.h" | ||
26 | #include "sound.h" | ||
27 | |||
28 | int audio_channels = 2; | ||
29 | int audio_output_source = AUDIO_SRC_PLAYBACK; | ||
30 | |||
31 | void audio_set_output_source(int source) | ||
32 | { | ||
33 | if ((unsigned)source >= AUDIO_NUM_SOURCES) | ||
34 | source = AUDIO_SRC_PLAYBACK; | ||
35 | |||
36 | audio_output_source = source; | ||
37 | } /* audio_set_output_source */ | ||
38 | |||
39 | void audio_input_mux(int source, unsigned flags) | ||
40 | { | ||
41 | static int last_source = AUDIO_SRC_PLAYBACK; | ||
42 | |||
43 | (void)flags; | ||
44 | |||
45 | switch (source) | ||
46 | { | ||
47 | default: /* playback - no recording */ | ||
48 | source = AUDIO_SRC_PLAYBACK; | ||
49 | case AUDIO_SRC_PLAYBACK: | ||
50 | audio_channels = 2; | ||
51 | if (source != last_source) | ||
52 | { | ||
53 | audiohw_set_monitor(false); | ||
54 | |||
55 | } | ||
56 | break; | ||
57 | |||
58 | case AUDIO_SRC_FMRADIO: /* recording and playback */ | ||
59 | audio_channels = 2; | ||
60 | if (source == last_source) | ||
61 | break; | ||
62 | |||
63 | audiohw_set_monitor(true); | ||
64 | break; | ||
65 | } /* end switch */ | ||
66 | |||
67 | last_source = source; | ||
68 | } /* audio_input_mux */ | ||
69 | |||
diff --git a/firmware/target/hosted/ypr0/powermgmt-ypr0.c b/firmware/target/hosted/ypr0/powermgmt-ypr0.c index 45ff2ae737..347e5fa146 100644 --- a/firmware/target/hosted/ypr0/powermgmt-ypr0.c +++ b/firmware/target/hosted/ypr0/powermgmt-ypr0.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "file.h" | 24 | #include "file.h" |
25 | #include "adc.h" | 25 | #include "adc.h" |
26 | #include "sc900776.h" | 26 | #include "sc900776.h" |
27 | #include "radio-ypr0.h" | ||
27 | 28 | ||
28 | const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = | 29 | const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = |
29 | { | 30 | { |
@@ -37,7 +38,6 @@ const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = | |||
37 | }; | 38 | }; |
38 | 39 | ||
39 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ | 40 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ |
40 | /* FIXME: This is guessed. Make proper curve using battery_bench */ | ||
41 | const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = | 41 | const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = |
42 | { | 42 | { |
43 | { 3450, 3502, 3550, 3587, 3623, 3669, 3742, 3836, 3926, 4026, 4200 } | 43 | { 3450, 3502, 3550, 3587, 3623, 3669, 3742, 3836, 3926, 4026, 4200 } |
@@ -45,7 +45,6 @@ const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = | |||
45 | 45 | ||
46 | #if CONFIG_CHARGING | 46 | #if CONFIG_CHARGING |
47 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ | 47 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ |
48 | /* FIXME: This is guessed. Make proper curve using battery_bench */ | ||
49 | const unsigned short const percent_to_volt_charge[11] = | 48 | const unsigned short const percent_to_volt_charge[11] = |
50 | { | 49 | { |
51 | 3450, 3670, 3721, 3751, 3782, 3821, 3876, 3941, 4034, 4125, 4200 | 50 | 3450, 3670, 3721, 3751, 3782, 3821, 3876, 3941, 4034, 4125, 4200 |
@@ -81,3 +80,29 @@ bool charging_state(void) | |||
81 | /* dont indicate for > ~95% */ | 80 | /* dont indicate for > ~95% */ |
82 | return ret && (_battery_voltage() <= charged_thres); | 81 | return ret && (_battery_voltage() <= charged_thres); |
83 | } | 82 | } |
83 | |||
84 | #if CONFIG_TUNER | ||
85 | static bool tuner_on = false; | ||
86 | |||
87 | bool tuner_power(bool status) | ||
88 | { | ||
89 | if (status != tuner_on) | ||
90 | { | ||
91 | tuner_on = status; | ||
92 | status = !status; | ||
93 | if (tuner_on) { | ||
94 | radiodev_open(); | ||
95 | } | ||
96 | else { | ||
97 | radiodev_close(); | ||
98 | } | ||
99 | } | ||
100 | |||
101 | return status; | ||
102 | } | ||
103 | |||
104 | bool tuner_powered(void) | ||
105 | { | ||
106 | return tuner_on; | ||
107 | } | ||
108 | #endif /* #if CONFIG_TUNER */ \ No newline at end of file | ||
diff --git a/firmware/target/hosted/ypr0/radio-ypr0.c b/firmware/target/hosted/ypr0/radio-ypr0.c new file mode 100644 index 0000000000..c3597bd18c --- /dev/null +++ b/firmware/target/hosted/ypr0/radio-ypr0.c | |||
@@ -0,0 +1,66 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Module wrapper for SI4709 FM Radio Chip, using /dev/si470x (si4709.ko) of Samsung YP-R0 | ||
10 | * | ||
11 | * Copyright (c) 2012 Lorenzo Miori | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or | ||
14 | * modify it under the terms of the GNU General Public License | ||
15 | * as published by the Free Software Foundation; either version 2 | ||
16 | * of the License, or (at your option) any later version. | ||
17 | * | ||
18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
19 | * KIND, either express or implied. | ||
20 | * | ||
21 | ****************************************************************************/ | ||
22 | |||
23 | #include <unistd.h> | ||
24 | #include <fcntl.h> | ||
25 | #include <sys/ioctl.h> | ||
26 | #include "stdint.h" | ||
27 | #include "string.h" | ||
28 | |||
29 | #include "radio-ypr0.h" | ||
30 | |||
31 | static int radio_dev = -1; | ||
32 | |||
33 | void radiodev_open(void) { | ||
34 | radio_dev = open("/dev/si470x", O_RDWR); | ||
35 | } | ||
36 | |||
37 | void radiodev_close(void) { | ||
38 | close(radio_dev); | ||
39 | } | ||
40 | |||
41 | /* High-level registers access */ | ||
42 | void si4709_write_reg(int addr, uint16_t value) { | ||
43 | sSi4709_t r = { .addr = addr, .value = value }; | ||
44 | ioctl(radio_dev, IOCTL_SI4709_WRITE_BYTE, &r); | ||
45 | } | ||
46 | |||
47 | uint16_t si4709_read_reg(int addr) { | ||
48 | sSi4709_t r = { .addr = addr, .value = 0 }; | ||
49 | ioctl(radio_dev, IOCTL_SI4709_READ_BYTE, &r); | ||
50 | return r.value; | ||
51 | } | ||
52 | |||
53 | /* Low-level i2c channel access */ | ||
54 | int fmradio_i2c_write(unsigned char address, unsigned char* buf, int count) | ||
55 | { | ||
56 | (void)address; | ||
57 | sSi4709_i2c_t r = { .size = count, .buf = buf }; | ||
58 | return ioctl(radio_dev, IOCTL_SI4709_I2C_WRITE, &r); | ||
59 | } | ||
60 | |||
61 | int fmradio_i2c_read(unsigned char address, unsigned char* buf, int count) | ||
62 | { | ||
63 | (void)address; | ||
64 | sSi4709_i2c_t r = { .size = count, .buf = buf }; | ||
65 | return ioctl(radio_dev, IOCTL_SI4709_I2C_READ, &r); | ||
66 | } \ No newline at end of file | ||
diff --git a/firmware/target/hosted/ypr0/radio-ypr0.h b/firmware/target/hosted/ypr0/radio-ypr0.h new file mode 100644 index 0000000000..13bcb6dc72 --- /dev/null +++ b/firmware/target/hosted/ypr0/radio-ypr0.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Module wrapper for SI4709 FM Radio Chip, using /dev/si470x (si4709.ko) of Samsung YP-R0 | ||
10 | * | ||
11 | * Copyright (c) 2012 Lorenzo Miori | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or | ||
14 | * modify it under the terms of the GNU General Public License | ||
15 | * as published by the Free Software Foundation; either version 2 | ||
16 | * of the License, or (at your option) any later version. | ||
17 | * | ||
18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
19 | * KIND, either express or implied. | ||
20 | * | ||
21 | ****************************************************************************/ | ||
22 | |||
23 | #ifndef __RADIO_YPR0_H__ | ||
24 | #define __RADIO_YPR0_H__ | ||
25 | |||
26 | #include "si4709.h" | ||
27 | #include "stdint.h" | ||
28 | #include "rds.h" | ||
29 | #include "si4700.h" | ||
30 | |||
31 | void radiodev_open(void); | ||
32 | void radiodev_close(void); | ||
33 | void si4709_write_reg(int addr, uint16_t value); | ||
34 | uint16_t si4709_read_reg(int addr); | ||
35 | |||
36 | #endif /*__RADIO-YPR0_H__*/ \ No newline at end of file | ||
diff --git a/firmware/target/hosted/ypr0/si4709.h b/firmware/target/hosted/ypr0/si4709.h new file mode 100644 index 0000000000..c27472e856 --- /dev/null +++ b/firmware/target/hosted/ypr0/si4709.h | |||
@@ -0,0 +1,82 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Module header for SI4709 FM Radio Chip, using /dev/si470x (si4709.ko) of Samsung YP-R0 | ||
10 | * | ||
11 | * Copyright (c) 2012 Lorenzo Miori | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or | ||
14 | * modify it under the terms of the GNU General Public License | ||
15 | * as published by the Free Software Foundation; either version 2 | ||
16 | * of the License, or (at your option) any later version. | ||
17 | * | ||
18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
19 | * KIND, either express or implied. | ||
20 | * | ||
21 | ****************************************************************************/ | ||
22 | |||
23 | #ifndef __SI4709_H__ | ||
24 | #define __SI4709_H__ | ||
25 | |||
26 | #include "stdint.h" | ||
27 | |||
28 | /* 7bits I2C address */ | ||
29 | #define SI4709_I2C_SLAVE_ADDR 0x10 | ||
30 | |||
31 | #define SI4702_DEVICEID 0x00 | ||
32 | #define SI4702_CHIPID 0x01 | ||
33 | #define SI4702_POWERCFG 0x02 | ||
34 | #define SI4702_CHANNEL 0x03 | ||
35 | #define SI4702_SYSCONFIG1 0x04 | ||
36 | #define SI4702_SYSCONFIG2 0x05 | ||
37 | #define SI4702_SYSCONFIG3 0x06 | ||
38 | #define SI4702_TEST1 0x07 | ||
39 | #define SI4702_TEST2 0x08 | ||
40 | #define SI4702_B00TCONFIG 0x09 | ||
41 | #define SI4702_STATUSRSSI 0x0A | ||
42 | #define SI4702_READCHAN 0x0B | ||
43 | #define SI4709_REG_NUM 0x10 | ||
44 | #define SI4702_REG_BYTE (SI4709_REG_NUM * 2) | ||
45 | #define SI4702_DEVICE_ID 0x1242 | ||
46 | #define SI4702_RW_REG_NUM (SI4702_STATUSRSSI - SI4702_POWERCFG) | ||
47 | #define SI4702_RW_OFFSET \ | ||
48 | (SI4709_REG_NUM - SI4702_STATUSRSSI + SI4702_POWERCFG) | ||
49 | #define BYTE_TO_WORD(hi, lo) (((hi) << 8) & 0xFF00) | ((lo) & 0x00FF) | ||
50 | |||
51 | typedef struct { | ||
52 | int addr; | ||
53 | uint16_t value; | ||
54 | }__attribute__((packed)) sSi4709_t; | ||
55 | |||
56 | typedef struct { | ||
57 | int size; | ||
58 | unsigned char *buf; | ||
59 | }__attribute__((packed)) sSi4709_i2c_t; | ||
60 | |||
61 | typedef enum | ||
62 | { | ||
63 | IOCTL_SI4709_INIT = 0, | ||
64 | IOCTL_SI4709_CLOSE, | ||
65 | IOCTL_SI4709_WRITE_BYTE, | ||
66 | IOCTL_SI4709_READ_BYTE, | ||
67 | IOCTL_SI4709_I2C_WRITE, | ||
68 | IOCTL_SI4709_I2C_READ, | ||
69 | |||
70 | E_IOCTL_SI4709_MAX | ||
71 | } eSi4709_ioctl_t; | ||
72 | |||
73 | #define DRV_IOCTL_SI4709_MAGIC 'S' | ||
74 | |||
75 | #define IOCTL_SI4709_INIT _IO(DRV_IOCTL_SI4709_MAGIC, IOCTL_SI4709_INIT) | ||
76 | #define IOCTL_SI4709_CLOSE _IO(DRV_IOCTL_SI4709_MAGIC, IOCTL_SI4709_CLOSE) | ||
77 | #define IOCTL_SI4709_WRITE_BYTE _IOW(DRV_IOCTL_SI4709_MAGIC, IOCTL_SI4709_WRITE_BYTE, sSi4709_t) | ||
78 | #define IOCTL_SI4709_READ_BYTE _IOR(DRV_IOCTL_SI4709_MAGIC, IOCTL_SI4709_READ_BYTE, sSi4709_t) | ||
79 | #define IOCTL_SI4709_I2C_WRITE _IOW(DRV_IOCTL_SI4709_MAGIC, IOCTL_SI4709_I2C_WRITE, sSi4709_i2c_t) | ||
80 | #define IOCTL_SI4709_I2C_READ _IOR(DRV_IOCTL_SI4709_MAGIC, IOCTL_SI4709_I2C_READ, sSi4709_i2c_t) | ||
81 | |||
82 | #endif /* __SI4709_H__ */ \ No newline at end of file | ||