diff options
author | Edward Hill <ecgh@chromium.org> | 2020-04-15 21:23:09 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-20 04:32:35 +0000 |
commit | bed6cac7b4d68c4315f5426b741a6ee508e459c6 (patch) | |
tree | 7d34136323ab4b5d40e7adfbfef53c0ceaba84d1 /driver/usb_mux | |
parent | 7cb1943254892e33d5ce55d9835e723824de85b5 (diff) | |
download | chrome-ec-bed6cac7b4d68c4315f5426b741a6ee508e459c6.tar.gz |
PS8743: Clean up mode reg bit names
Align names for PS8743_REG_MODE with similar PS8802_REG2_MODE.
BUG=b:152736880
BRANCH=none
TEST=none
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: I8b8ebe41eb2bffad14cee8347549447d5583da47
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2151791
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'driver/usb_mux')
-rw-r--r-- | driver/usb_mux/ps8743.c | 6 | ||||
-rw-r--r-- | driver/usb_mux/ps8743.h | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/driver/usb_mux/ps8743.c b/driver/usb_mux/ps8743.c index c44a2f9c89..413b37e322 100644 --- a/driver/usb_mux/ps8743.c +++ b/driver/usb_mux/ps8743.c @@ -77,11 +77,11 @@ static int ps8743_set_mux(const struct usb_mux *me, mux_state_t mux_state) uint8_t reg = 0; if (mux_state & USB_PD_MUX_USB_ENABLED) - reg |= PS8743_MODE_USB_ENABLED; + reg |= PS8743_MODE_USB_ENABLE; if (mux_state & USB_PD_MUX_DP_ENABLED) - reg |= PS8743_MODE_DP_ENABLED; + reg |= PS8743_MODE_DP_ENABLE; if (mux_state & USB_PD_MUX_POLARITY_INVERTED) - reg |= PS8743_MODE_POLARITY_INVERTED; + reg |= PS8743_MODE_FLIP_ENABLE; return ps8743_write(me, PS8743_REG_MODE, reg); } diff --git a/driver/usb_mux/ps8743.h b/driver/usb_mux/ps8743.h index b728e49523..23e5c363e5 100644 --- a/driver/usb_mux/ps8743.h +++ b/driver/usb_mux/ps8743.h @@ -17,15 +17,15 @@ /* Mode register for setting mux */ #define PS8743_REG_MODE 0x00 -#define PS8743_MODE_POLARITY_INVERTED BIT(2) -#define PS8743_MODE_FLIP_PIN_ENABLED BIT(3) -#define PS8743_MODE_USB_ENABLED BIT(4) -#define PS8743_MODE_CE_USB_ENABLED BIT(5) -#define PS8743_MODE_DP_ENABLED BIT(6) -#define PS8743_MODE_CE_DP_ENABLED BIT(7) +#define PS8743_MODE_FLIP_ENABLE BIT(2) +#define PS8743_MODE_FLIP_REG_CONTROL BIT(3) +#define PS8743_MODE_USB_ENABLE BIT(4) +#define PS8743_MODE_USB_REG_CONTROL BIT(5) +#define PS8743_MODE_DP_ENABLE BIT(6) +#define PS8743_MODE_DP_REG_CONTROL BIT(7) /* To reset the state machine to default */ -#define PS8743_MODE_POWER_DOWN (PS8743_MODE_CE_USB_ENABLED | \ - PS8743_MODE_CE_DP_ENABLED) +#define PS8743_MODE_POWER_DOWN (PS8743_MODE_USB_REG_CONTROL | \ + PS8743_MODE_DP_REG_CONTROL) /* Status register for checking mux state */ #define PS8743_REG_STATUS 0x09 |