summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/samsungypr/ypr1/i2c-target.h
diff options
context:
space:
mode:
authorLorenzo Miori <memoryS60@gmail.com>2017-04-26 21:16:12 +0200
committerSolomon Peachy <pizza@shaftnet.org>2020-07-07 16:50:42 +0000
commit03e6cbec8fb23c02cb832194c27b055d8989c8e3 (patch)
tree4845c06dda0d988409ccb136006cd45f9343ccb9 /firmware/target/hosted/samsungypr/ypr1/i2c-target.h
parentb1c72afd4d898048f34608679ba5b91773290a26 (diff)
downloadrockbox-03e6cbec8fb23c02cb832194c27b055d8989c8e3.tar.gz
rockbox-03e6cbec8fb23c02cb832194c27b055d8989c8e3.zip
Samsung YP-R0/YP-R1: use Linux i2c-dev for radio chip access
Linux offers the high-level i2c-dev driver to directly access the i2c bus(ses) on the system. This system device is used to get rid of the (rather silly) radio chip kernel module for ypr0 target and correctly enables radio access also for the ypr1 target. fm-radio chip is located on i2c-0 bus on the ypr0 target while it is located on i2c-1 bus on the ypr1 target. Power-up (RST) pin is also handled for both targets, which is wired to another GPIO of the i.MX 37 platform. Additionally, this patch simplifies the RDS low-level handling by exploiting the Si4709 debug interface which comes with a mutex protection as free bonus. Change-Id: I839282bec4a27ad0ad8403c5a8dd86963b77e1bf
Diffstat (limited to 'firmware/target/hosted/samsungypr/ypr1/i2c-target.h')
-rw-r--r--firmware/target/hosted/samsungypr/ypr1/i2c-target.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/firmware/target/hosted/samsungypr/ypr1/i2c-target.h b/firmware/target/hosted/samsungypr/ypr1/i2c-target.h
new file mode 100644
index 0000000000..f1fed01cc7
--- /dev/null
+++ b/firmware/target/hosted/samsungypr/ypr1/i2c-target.h
@@ -0,0 +1,30 @@
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)
10 * Samsung YP-R0 & Samsung YP-R1
11 *
12 * Copyright (c) 2017 Lorenzo Miori
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
24#ifndef I2C_TARGET_H_
25#define I2C_TARGET_H_
26
27/** Define the FM Radio Chip I2C bus */
28#define I2C_BUS_FM_RADIO ("/dev/i2c-1")
29
30#endif /* I2C_TARGET_H_ */