mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 15:07:13 -04:00
usb: typec: tcpm/tcpci_maxim: sort TCPC_ALERT_MASK values by bit
This makes it easier to see what's missing and what's being programmed. While at it, add brackets to help with formatting and remove a comment that doesn't add much value. Signed-off-by: André Draszik <andre.draszik@linaro.org> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20240710-tcpc-cleanup-v1-8-0ec1f41f4263@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7cd41974d2
commit
57e154cc44
@@ -97,11 +97,13 @@ static void max_tcpci_init_regs(struct max_tcpci_chip *chip)
|
||||
if (ret < 0)
|
||||
return;
|
||||
|
||||
alert_mask = TCPC_ALERT_TX_SUCCESS | TCPC_ALERT_TX_DISCARDED | TCPC_ALERT_TX_FAILED |
|
||||
TCPC_ALERT_RX_HARD_RST | TCPC_ALERT_RX_STATUS | TCPC_ALERT_CC_STATUS |
|
||||
TCPC_ALERT_VBUS_DISCNCT | TCPC_ALERT_RX_BUF_OVF | TCPC_ALERT_POWER_STATUS |
|
||||
/* Enable Extended alert for detecting Fast Role Swap Signal */
|
||||
TCPC_ALERT_EXTND | TCPC_ALERT_EXTENDED_STATUS | TCPC_ALERT_FAULT;
|
||||
alert_mask = (TCPC_ALERT_TX_SUCCESS | TCPC_ALERT_TX_DISCARDED |
|
||||
TCPC_ALERT_TX_FAILED | TCPC_ALERT_RX_HARD_RST |
|
||||
TCPC_ALERT_RX_STATUS | TCPC_ALERT_POWER_STATUS |
|
||||
TCPC_ALERT_CC_STATUS |
|
||||
TCPC_ALERT_EXTND | TCPC_ALERT_EXTENDED_STATUS |
|
||||
TCPC_ALERT_VBUS_DISCNCT | TCPC_ALERT_RX_BUF_OVF |
|
||||
TCPC_ALERT_FAULT);
|
||||
|
||||
ret = max_tcpci_write16(chip, TCPC_ALERT_MASK, alert_mask);
|
||||
if (ret < 0) {
|
||||
|
||||
Reference in New Issue
Block a user