diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2012-03-15 14:59:20 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2012-03-15 15:01:11 +0100 |
commit | 9caffa8bf7a2f1fc06b70eb0015c4f089a1173af (patch) | |
tree | ca143d5b23770d923c407fadaf489e671832ff26 /firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c | |
parent | a4fd5bf7cb3d8d071c5fb9d45255c8f85e517b7a (diff) | |
download | rockbox-9caffa8bf7a2f1fc06b70eb0015c4f089a1173af.tar.gz rockbox-9caffa8bf7a2f1fc06b70eb0015c4f089a1173af.zip |
imx233/fuze+: rework i2c and fmradio_i2c init
Only enable fmradio_i2c once with _init() called from system.
Move actual i2c init to system for consistency.
Move tuner power pin setup to power instead of fmradio.
Change-Id: Idb56bfba5803f71b5d049f174c48d2afb969a6ea
Diffstat (limited to 'firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c')
-rw-r--r-- | firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c index d4113332ac..417f70e406 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c | |||
@@ -85,17 +85,11 @@ struct i2c_interface fmradio_i2c = | |||
85 | .delay_thigh = 4 | 85 | .delay_thigh = 4 |
86 | }; | 86 | }; |
87 | 87 | ||
88 | void fmradio_i2c_enable(bool enable) | 88 | void fmradio_i2c_init(void) |
89 | { | 89 | { |
90 | if(fmradio_i2c_bus == -1) | ||
91 | fmradio_i2c_bus = i2c_add_node(&fmradio_i2c); | ||
92 | imx233_set_pin_function(0, 29, PINCTRL_FUNCTION_GPIO); | ||
93 | imx233_set_pin_function(1, 24, PINCTRL_FUNCTION_GPIO); | 90 | imx233_set_pin_function(1, 24, PINCTRL_FUNCTION_GPIO); |
94 | imx233_set_pin_function(1, 22, PINCTRL_FUNCTION_GPIO); | 91 | imx233_set_pin_function(1, 22, PINCTRL_FUNCTION_GPIO); |
95 | imx233_enable_gpio_output(1, 22, enable); | 92 | fmradio_i2c_bus = i2c_add_node(&fmradio_i2c); |
96 | imx233_enable_gpio_output(1, 24, enable); | ||
97 | imx233_set_gpio_output(1, 22, enable); | ||
98 | imx233_set_gpio_output(1, 24, enable); | ||
99 | } | 93 | } |
100 | 94 | ||
101 | int fmradio_i2c_write(unsigned char address, const unsigned char* buf, int count) | 95 | int fmradio_i2c_write(unsigned char address, const unsigned char* buf, int count) |