rockbox/firmware/target/hosted/samsungypr/radio-ypr.h
Lorenzo Miori 03e6cbec8f 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
2020-07-07 16:50:42 +00:00

35 lines
1.3 KiB
C

/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
*
* Module wrapper for SI4709 FM Radio Chip, using /dev/si470x (si4709.ko) of Samsung YP-R0
*
* Copyright (c) 2012 Lorenzo Miori
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#ifndef __RADIO_YPR0_H__
#define __RADIO_YPR0_H__
#include "stdint.h"
#include "rds.h"
#include "si4700.h"
void radiodev_open(void);
void radiodev_close(void);
void si4709_write_reg(int addr, uint16_t value);
uint16_t si4709_read_reg(int addr);
#endif /*__RADIO-YPR0_H__*/