diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2020-11-04 10:23:14 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-24 16:23:01 +0000 |
commit | 9bfe97924bfd1cefac5a83291b2a5e53d7cba935 (patch) | |
tree | db718aeb27be055e61e44e33161cc9378867227e /board/coachz/board.c | |
parent | 786ee9e804bc0db42318cbf008b6916a8e2a3e98 (diff) | |
download | chrome-ec-9bfe97924bfd1cefac5a83291b2a5e53d7cba935.tar.gz |
coachz: Enable stylus charging
This patch enables stylus charging.
BUG=b:173235954
BRANCH=Trogdor
TEST=See the description of CL:2538536.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: Ia28214cc963168df7b229a6fbf530fc357e85740
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2538540
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/coachz/board.c')
-rw-r--r-- | board/coachz/board.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/board/coachz/board.c b/board/coachz/board.c index 1191b4566a..27e5885d6b 100644 --- a/board/coachz/board.c +++ b/board/coachz/board.c @@ -9,6 +9,7 @@ #include "button.h" #include "charge_manager.h" #include "charge_state.h" +#include "common.h" #include "extpower.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi_common.h" @@ -20,11 +21,13 @@ #include "keyboard_mkbp.h" #include "keyboard_scan.h" #include "lid_switch.h" +#include "peripheral_charger.h" #include "pi3usb9201.h" #include "power.h" #include "power_button.h" #include "pwm.h" #include "pwm_chip.h" +#include "queue.h" #include "system.h" #include "shi_chip.h" #include "switch.h" @@ -47,6 +50,20 @@ static void ks_interrupt(enum gpio_signal s); #include "gpio_list.h" +extern struct pchg_drv ctn730_drv; + +struct pchg pchgs[] = { + [0] = { + .cfg = &(const struct pchg_config) { + .drv = &ctn730_drv, + .i2c_port = I2C_PORT_WLC, + .irq_pin = GPIO_WLC_IRQ_CONN, + }, + .events = QUEUE_NULL(PCHG_EVENT_QUEUE_SIZE, enum pchg_event), + }, +}; +const int pchg_count = ARRAY_SIZE(pchgs); + /* GPIO Interrupt Handlers */ static void tcpc_alert_event(enum gpio_signal signal) { @@ -167,7 +184,7 @@ const struct i2c_port_t i2c_ports[] = { GPIO_EC_I2C_USB_C0_PD_SDA}, {"tcpc1", I2C_PORT_TCPC1, 1000, GPIO_EC_I2C_USB_C1_PD_SCL, GPIO_EC_I2C_USB_C1_PD_SDA}, - {"wlc", I2C_PORT_WLC, 1000, GPIO_EC_I2C_WLC_SCL, + {"wlc", I2C_PORT_WLC, 400, GPIO_EC_I2C_WLC_SCL, GPIO_EC_I2C_WLC_SDA}, {"eeprom", I2C_PORT_EEPROM, 400, GPIO_EC_I2C_EEPROM_SCL, GPIO_EC_I2C_EEPROM_SDA}, |