drivers/button: Let board_button_initialize return the button number

so the lower half driver don't need include the specific board.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2ff5c30049a5c5e8ee90baea56e9f4cb1a8a4f87
This commit is contained in:
Xiang Xiao
2020-06-05 17:13:48 +08:00
committed by Abdelatif Guettouche
parent 73fc43770a
commit 1b47aa1cb2
122 changed files with 293 additions and 138 deletions
@@ -77,7 +77,7 @@
****************************************************************************/
#ifdef CONFIG_ARCH_BUTTONS
void board_button_initialize(void)
uint32_t board_button_initialize(void)
{
uint16_t reg16;
@@ -106,6 +106,8 @@ void board_button_initialize(void)
reg16 = getreg16(STR71X_GPIO1_PC2);
reg16 &= ~STR71X_BUTBUTTON_GPIO1;
putreg16(reg16, STR71X_GPIO1_PC2);
return 2;
}
/****************************************************************************