diff options
author | YongBeum.Ha <ybha@samsung.corp-partner.google.com> | 2021-02-10 09:38:21 +0900 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-17 04:56:05 +0000 |
commit | 744a364b5e8bd111b4862d5fbd70aa40cc693a7e (patch) | |
tree | 333ab969e69159b4649336f1fe4fb043f160cd88 /driver | |
parent | 3a5b578c6ddd0702eb375a2e47aa06e4b81d5ac7 (diff) | |
download | chrome-ec-744a364b5e8bd111b4862d5fbd70aa40cc693a7e.tar.gz |
nb7v904m : add config to disable LPM
Add config to disable LPM
BUG=b:179624712
BRANCH=none
TEST=make -j BOARD=sasuke
Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com>
Change-Id: I6ae0d08709fe0799843b6e225b480ffa617dfe84
Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2684075
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/retimer/nb7v904m.c | 8 | ||||
-rw-r--r-- | driver/retimer/nb7v904m.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/driver/retimer/nb7v904m.c b/driver/retimer/nb7v904m.c index 4999f1d9c3..9f142552fa 100644 --- a/driver/retimer/nb7v904m.c +++ b/driver/retimer/nb7v904m.c @@ -15,6 +15,10 @@ #define CPRINTS(format, args...) cprints(CC_USB, format, ## args) #define CPRINTF(format, args...) cprintf(CC_USB, format, ## args) +#ifdef CONFIG_NB7V904M_LPM_OVERRIDE +int nb7v904m_lpm_disable = 0; +#endif + static int nb7v904m_write(const struct usb_mux *me, int offset, int data) { return i2c_write8(me->i2c_port, @@ -39,6 +43,10 @@ static int set_low_power_mode(const struct usb_mux *me, bool enable) rv = nb7v904m_read(me, NB7V904M_REG_GEN_DEV_SETTINGS, ®val); if (rv) return rv; +#ifdef CONFIG_NB7V904M_LPM_OVERRIDE + if (nb7v904m_lpm_disable) + enable = 0; +#endif if (enable) regval &= ~NB7V904M_CHIP_EN; diff --git a/driver/retimer/nb7v904m.h b/driver/retimer/nb7v904m.h index 7e88281f31..af2e5906b2 100644 --- a/driver/retimer/nb7v904m.h +++ b/driver/retimer/nb7v904m.h @@ -98,6 +98,9 @@ #define NB7V904M_CH_D_GAIN_3P5_DB 0x03 extern const struct usb_mux_driver nb7v904m_usb_redriver_drv; +#ifdef CONFIG_NB7V904M_LPM_OVERRIDE +extern int nb7v904m_lpm_disable; +#endif /* Use this value if tuning eq wants to be skipped */ #define NB7V904M_CH_ALL_SKIP_EQ 0xff |