summaryrefslogtreecommitdiff
path: root/board/plankton
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-06-27 13:59:30 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-01 04:54:32 +0000
commit69153c9b86fe347255e853a0af468a5badba9bda (patch)
tree88ca8f7b2f663d92e6809f1729a5926c2f0647bd /board/plankton
parent2a3840fac94a9d376cdbf7e0431a927303cdc161 (diff)
downloadchrome-ec-69153c9b86fe347255e853a0af468a5badba9bda.tar.gz
board/plankton/usb_pd_config.h: Format with clang-format
BUG=b:236386294 BRANCH=none TEST=none Change-Id: Idfa249403f5877961a3059787fdb53af58d2f09b Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728834 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'board/plankton')
-rw-r--r--board/plankton/usb_pd_config.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/board/plankton/usb_pd_config.h b/board/plankton/usb_pd_config.h
index fca6484069..17a2dcd456 100644
--- a/board/plankton/usb_pd_config.h
+++ b/board/plankton/usb_pd_config.h
@@ -50,7 +50,7 @@ static inline void spi_enable_clock(int port)
#define TIM_TX_CCR_IDX(p) TIM_TX_CCR_C0
#define TIM_RX_CCR_IDX(p) TIM_RX_CCR_C0
-#define TIM_CCR_CS 1
+#define TIM_CCR_CS 1
#define EXTI_COMP_MASK(p) BIT(21)
#define IRQ_COMP STM32_IRQ_COMP
/* triggers packet detection on comparator falling edge */
@@ -92,9 +92,8 @@ static inline void pd_tx_disable(int port, int polarity)
{
/* output low on SPI TX to disable the FET */
/* PA6 is SPI1_MISO */
- STM32_GPIO_MODER(GPIO_A) = (STM32_GPIO_MODER(GPIO_A)
- & ~(3 << (2*6)))
- | (1 << (2*6));
+ STM32_GPIO_MODER(GPIO_A) =
+ (STM32_GPIO_MODER(GPIO_A) & ~(3 << (2 * 6))) | (1 << (2 * 6));
/* put the low level reference in Hi-Z */
gpio_set_level(GPIO_USBC_CC1_TX_EN, 0);
gpio_set_level(GPIO_USBC_CC2_TX_EN, 0);
@@ -104,11 +103,10 @@ static inline void pd_tx_disable(int port, int polarity)
static inline void pd_select_polarity(int port, int polarity)
{
/* use the right comparator non inverted input for COMP1 */
- STM32_COMP_CSR = (STM32_COMP_CSR & ~STM32_COMP_CMP1INSEL_MASK)
- | STM32_COMP_CMP1EN
- | (polarity ?
- STM32_COMP_CMP1INSEL_INM4 :
- STM32_COMP_CMP1INSEL_INM6);
+ STM32_COMP_CSR = (STM32_COMP_CSR & ~STM32_COMP_CMP1INSEL_MASK) |
+ STM32_COMP_CMP1EN |
+ (polarity ? STM32_COMP_CMP1INSEL_INM4 :
+ STM32_COMP_CMP1INSEL_INM6);
gpio_set_level(GPIO_USBC_POLARITY, polarity);
}