mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-03 05:29:29 +00:00
driver/bc12/pi3usb9281: Make a few functions static
Old oak boards that still use these functions have long been
deprecated, let's make the unneeded functions static.
BRANCH=none
BUG=b:35573263
TEST=make buildall -j => makes newsizes: up to 64 bytes saved on
a few boards.
Change-Id: I8f2503ce324e34b87b3bbfa3c509079357880c9e
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/848574
Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
e358a5521d
commit
eb781cc377
@@ -42,6 +42,7 @@ static int usb_switch_state[CONFIG_USB_PD_PORT_COUNT];
|
||||
static struct mutex usb_switch_lock[CONFIG_USB_PD_PORT_COUNT];
|
||||
|
||||
static int pi3usb9281_reset(int port);
|
||||
static int pi3usb9281_get_interrupts(int port);
|
||||
|
||||
static void select_chip(int port)
|
||||
{
|
||||
@@ -139,7 +140,7 @@ static int pi3usb9281_set_interrupt_mask(int port, uint8_t mask)
|
||||
return pi3usb9281_write(port, PI3USB9281_REG_INT_MASK, ~mask);
|
||||
}
|
||||
|
||||
void pi3usb9281_init(int port)
|
||||
static void pi3usb9281_init(int port)
|
||||
{
|
||||
uint8_t dev_id;
|
||||
|
||||
@@ -164,7 +165,7 @@ int pi3usb9281_enable_interrupts(int port)
|
||||
return pi3usb9281_write_ctrl(port, ctrl & ~PI3USB9281_CTRL_INT_DIS);
|
||||
}
|
||||
|
||||
int pi3usb9281_disable_interrupts(int port)
|
||||
static int pi3usb9281_disable_interrupts(int port)
|
||||
{
|
||||
uint8_t ctrl = pi3usb9281_read(port, PI3USB9281_REG_CONTROL);
|
||||
int rv;
|
||||
@@ -177,17 +178,17 @@ int pi3usb9281_disable_interrupts(int port)
|
||||
return rv;
|
||||
}
|
||||
|
||||
int pi3usb9281_get_interrupts(int port)
|
||||
static int pi3usb9281_get_interrupts(int port)
|
||||
{
|
||||
return pi3usb9281_read(port, PI3USB9281_REG_INT);
|
||||
}
|
||||
|
||||
int pi3usb9281_get_device_type(int port)
|
||||
static int pi3usb9281_get_device_type(int port)
|
||||
{
|
||||
return pi3usb9281_read(port, PI3USB9281_REG_DEV_TYPE) & 0x77;
|
||||
}
|
||||
|
||||
int pi3usb9281_get_charger_status(int port)
|
||||
static int pi3usb9281_get_charger_status(int port)
|
||||
{
|
||||
return pi3usb9281_read(port, PI3USB9281_REG_CHG_STATUS) & 0x1f;
|
||||
}
|
||||
|
||||
@@ -71,23 +71,7 @@ struct pi3usb9281_config {
|
||||
/* Configuration struct defined at board level */
|
||||
extern struct pi3usb9281_config pi3usb9281_chips[];
|
||||
|
||||
/* TODO: Make many of these functions static after Oak board changes. */
|
||||
/* Initialize chip and enable interrupts */
|
||||
void pi3usb9281_init(int port);
|
||||
|
||||
/* Enable interrupts. */
|
||||
int pi3usb9281_enable_interrupts(int port);
|
||||
|
||||
/* Disable all interrupts. */
|
||||
int pi3usb9281_disable_interrupts(int port);
|
||||
|
||||
/* Get and clear current interrupt status. */
|
||||
int pi3usb9281_get_interrupts(int port);
|
||||
|
||||
/* Get attached device type. */
|
||||
int pi3usb9281_get_device_type(int port);
|
||||
|
||||
/* Get attached charger status. */
|
||||
int pi3usb9281_get_charger_status(int port);
|
||||
|
||||
#endif /* __CROS_EC_PI3USB9281_H */
|
||||
|
||||
Reference in New Issue
Block a user