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
This commit is contained in:
Amaury Pouly 2017-01-25 12:06:06 +01:00
parent 96a7603bf9
commit 501e8a7e71
4 changed files with 13 additions and 15 deletions

View file

@ -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();

View file

@ -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)

View file

@ -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();
}

View file

@ -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__ */
#endif /* __button_imx233__ */