From 58f8bddf88e1968542300a7ea9eb555ed5600585 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Sat, 19 May 2012 18:28:07 +0200 Subject: zenxfi2: add fmradio i2c glue Change-Id: Ifa8781b3c416002355b17591a4fdbed8a20979a8 --- .../imx233/creative-zenxfi2/fmradio-i2c-zenxfi2.c | 40 ++++++++++++++++++++++ firmware/target/arm/imx233/system-imx233.c | 4 +-- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 firmware/target/arm/imx233/creative-zenxfi2/fmradio-i2c-zenxfi2.c (limited to 'firmware/target/arm') diff --git a/firmware/target/arm/imx233/creative-zenxfi2/fmradio-i2c-zenxfi2.c b/firmware/target/arm/imx233/creative-zenxfi2/fmradio-i2c-zenxfi2.c new file mode 100644 index 0000000000..58ac8e6a08 --- /dev/null +++ b/firmware/target/arm/imx233/creative-zenxfi2/fmradio-i2c-zenxfi2.c @@ -0,0 +1,40 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2012 by Amaury Pouly + * + * 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. + * + ****************************************************************************/ + +#include "config.h" +#include "system.h" +#include "fmradio_i2c.h" +#include "pinctrl-imx233.h" +#include "i2c.h" + +void fmradio_i2c_init(void) +{ +} + +int fmradio_i2c_write(unsigned char address, const unsigned char* buf, int count) +{ + return i2c_write(address, buf, count); +} + +int fmradio_i2c_read(unsigned char address, unsigned char* buf, int count) +{ + return i2c_read(address, buf, count); +} diff --git a/firmware/target/arm/imx233/system-imx233.c b/firmware/target/arm/imx233/system-imx233.c index a24927f9a5..07c29a8644 100644 --- a/firmware/target/arm/imx233/system-imx233.c +++ b/firmware/target/arm/imx233/system-imx233.c @@ -110,8 +110,8 @@ void system_init(void) imx233_pwm_init(); imx233_lradc_init(); imx233_i2c_init(); -#if !defined(BOOTLOADER) && \ - (defined(SANSA_FUZEPLUS) || defined(CREATIVE_ZENXFI3)) +#if !defined(BOOTLOADER) &&(defined(SANSA_FUZEPLUS) || \ + defined(CREATIVE_ZENXFI3) || defined(CREATIVE_ZENXFI2)) fmradio_i2c_init(); #endif } -- cgit v1.2.3