summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2017-01-25 12:06:06 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2017-02-04 17:16:32 +0100
commit501e8a7e7103ae7aad2cab8888be02a06889e2c2 (patch)
tree73506117ace58c95886a7633e3265f9f2345ab0b
parent96a7603bf9e930a715f7bbb50929975d8d184419 (diff)
downloadrockbox-501e8a7.tar.gz
rockbox-501e8a7.tar.bz2
rockbox-501e8a7.zip
imx233: remove weak attribute on some functions
This feature was never used and it is not even working because weak linking doesn't work in-between files in a library. Change-Id: I389ea5f17be1d9db0e2150828d704be5a091e09d
-rw-r--r--firmware/target/arm/imx233/audio-imx233.c12
-rw-r--r--firmware/target/arm/imx233/audio-imx233.h6
-rw-r--r--firmware/target/arm/imx233/button-imx233.c4
-rw-r--r--firmware/target/arm/imx233/button-imx233.h6
4 files changed, 13 insertions, 15 deletions
diff --git a/firmware/target/arm/imx233/audio-imx233.c b/firmware/target/arm/imx233/audio-imx233.c
index 273844ef30..40218f4aa0 100644
--- a/firmware/target/arm/imx233/audio-imx233.c
+++ b/firmware/target/arm/imx233/audio-imx233.c
@@ -22,7 +22,7 @@
#include "audio-imx233.h"
#include "pinctrl-imx233.h"
-void __attribute__((weak)) imx233_audio_preinit(void)
+void imx233_audio_preinit(void)
{
#ifdef IMX233_AUDIO_HP_GATE_BANK
imx233_pinctrl_acquire(IMX233_AUDIO_HP_GATE_BANK, IMX233_AUDIO_HP_GATE_PIN, "hp_gate");
@@ -38,12 +38,12 @@ void __attribute__((weak)) imx233_audio_preinit(void)
#endif
}
-void __attribute__((weak)) imx233_audio_postinit(void)
+void imx233_audio_postinit(void)
{
imx233_audio_enable_hp(true);
}
// enable/disable the HP audio gate (typically using a GPIO)
-void __attribute__((weak)) imx233_audio_enable_hp(bool en)
+void imx233_audio_enable_hp(bool en)
{
#ifdef IMX233_AUDIO_HP_GATE_BANK
# ifdef IMX233_AUDIO_HP_GATE_INVERTED
@@ -55,7 +55,7 @@ void __attribute__((weak)) imx233_audio_enable_hp(bool en)
#endif
}
// enable/disable the speaker audio gate (typically using a GPIO)
-void __attribute__((weak)) imx233_audio_enable_spkr(bool en)
+void imx233_audio_enable_spkr(bool en)
{
#ifdef IMX233_AUDIO_SPKR_GATE_BANK
# ifdef IMX233_AUDIO_SPKR_GATE_INVERTED
@@ -112,14 +112,14 @@ static void select_audio_path(void)
}
}
-void __attribute__((weak)) audio_input_mux(int source, unsigned flags)
+void audio_input_mux(int source, unsigned flags)
{
input_source = source;
input_flags = flags;
select_audio_path();
}
-void __attribute__((weak)) audio_set_output_source(int source)
+void audio_set_output_source(int source)
{
output_source = source;
select_audio_path();
diff --git a/firmware/target/arm/imx233/audio-imx233.h b/firmware/target/arm/imx233/audio-imx233.h
index 2596e81bac..860a9c710f 100644
--- a/firmware/target/arm/imx233/audio-imx233.h
+++ b/firmware/target/arm/imx233/audio-imx233.h
@@ -24,9 +24,7 @@
#include "audio.h"
#include "audio-target.h"
-/* target can override those functions to provide hooks to the audio code
- * alternativelly, the default implementation provide support for GPIO
- * controlled gates using the following defines
+/* target can control those functions by using the following defines
* NOTE by default gates are enabled by setting GPIO to 1 (except if inverted)
*
* IMX233_AUDIO_HP_GATE_BANK (gpio bank)
@@ -37,7 +35,7 @@
* IMX233_AUDIO_SPKR_GATE_PIN (gpio pin)
* IMX233_AUDIO_SPKR_GATE_INVERTED (define if inverted)
*
- * target can override those to control microphone parameters
+ * target can set those to control microphone parameters
* NOTE by default, mic select is 1, mic bias is 0 and mic resistor is 2KOhm
* IMX233_AUDIO_MIC_SELECT (mic bias pin: 0=lradc0, 1=lradc1)
* IMX233_AUDIO_MIC_BIAS (mic bias, 0=1.21V, 1=1.46, ..., 7=2.96V (0.25mV inc)
diff --git a/firmware/target/arm/imx233/button-imx233.c b/firmware/target/arm/imx233/button-imx233.c
index a77d3d76c9..9300eec161 100644
--- a/firmware/target/arm/imx233/button-imx233.c
+++ b/firmware/target/arm/imx233/button-imx233.c
@@ -180,7 +180,7 @@ bool imx233_button_read_hold(void)
return imx233_button_read_btn(hold_idx);
}
-bool __attribute__((weak)) button_hold(void)
+bool button_hold(void)
{
bool hold_button = imx233_button_read_hold();
#ifndef BOOTLOADER
@@ -202,7 +202,7 @@ bool imx233_button_read_jack(void)
return imx233_button_read_btn(jack_idx);
}
-bool __attribute__((weak)) headphones_inserted(void)
+bool headphones_inserted(void)
{
return imx233_button_read_jack();
}
diff --git a/firmware/target/arm/imx233/button-imx233.h b/firmware/target/arm/imx233/button-imx233.h
index 9e244e01ac..33e15a2a97 100644
--- a/firmware/target/arm/imx233/button-imx233.h
+++ b/firmware/target/arm/imx233/button-imx233.h
@@ -160,8 +160,8 @@ struct imx233_button_map_t
* - last entry:
* IMX233_BUTTON_(END, END(), "")
*
- * The driver also provides default implementations for headphones_inserted()
- * and button_hold() which can be overriden since they have weak linkage.
+ * The driver also provides an implementations for headphones_inserted()
+ * and button_hold() using the table information.
*
* The button-target.h header can also define IMX233_BUTTON_LRADC_MARGIN
* to control the error margin allowed for button using LRADC. The default
@@ -193,4 +193,4 @@ bool imx233_button_read_btn(int idx);
* Argument is an index into the imx233_button_map table */
int imx233_button_read_raw(int idx);
-#endif /* __button_imx233__ */ \ No newline at end of file
+#endif /* __button_imx233__ */