summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
Diffstat (limited to 'driver')
-rw-r--r--driver/charger/sm5803.c2
-rw-r--r--driver/ppc/aoz1380.c4
-rw-r--r--driver/ppc/nx20p348x.c2
-rw-r--r--driver/ppc/sn5s330.c2
-rw-r--r--driver/tcpm/tcpci.c4
-rw-r--r--driver/usb_mux/usb_mux.c2
6 files changed, 8 insertions, 8 deletions
diff --git a/driver/charger/sm5803.c b/driver/charger/sm5803.c
index 43a54d798b..36c4e705c2 100644
--- a/driver/charger/sm5803.c
+++ b/driver/charger/sm5803.c
@@ -48,7 +48,7 @@ static const struct charger_info sm5803_charger_info = {
.input_current_step = INPUT_I_STEP,
};
-static uint32_t irq_pending; /* Bitmask of chips with interrupts pending */
+static atomic_t irq_pending; /* Bitmask of chips with interrupts pending */
static struct mutex flow1_access_lock[CHARGER_NUM];
static struct mutex flow2_access_lock[CHARGER_NUM];
diff --git a/driver/ppc/aoz1380.c b/driver/ppc/aoz1380.c
index 935503b593..726f626caf 100644
--- a/driver/ppc/aoz1380.c
+++ b/driver/ppc/aoz1380.c
@@ -25,12 +25,12 @@
#define CPRINTF(format, args...) cprintf(CC_USBPD, format, ## args)
#define CPRINTS(format, args...) cprints(CC_USBPD, format, ## args)
-static uint32_t irq_pending; /* Bitmask of ports signaling an interrupt. */
+static atomic_t irq_pending; /* Bitmask of ports signaling an interrupt. */
#define AOZ1380_FLAGS_SOURCE_ENABLED BIT(0)
#define AOZ1380_FLAGS_SINK_ENABLED BIT(1)
#define AOZ1380_FLAGS_INT_ON_DISCONNECT BIT(2)
-static uint32_t flags[CONFIG_USB_PD_PORT_MAX_COUNT];
+static atomic_t flags[CONFIG_USB_PD_PORT_MAX_COUNT];
#define AOZ1380_SET_FLAG(port, flag) atomic_or(&flags[port], (flag))
#define AOZ1380_CLR_FLAG(port, flag) atomic_clear_bits(&flags[port], (flag))
diff --git a/driver/ppc/nx20p348x.c b/driver/ppc/nx20p348x.c
index b582259e04..130678d512 100644
--- a/driver/ppc/nx20p348x.c
+++ b/driver/ppc/nx20p348x.c
@@ -22,7 +22,7 @@
#define CPRINTF(format, args...) cprintf(CC_USBPD, format, ## args)
#define CPRINTS(format, args...) cprints(CC_USBPD, format, ## args)
-static uint32_t irq_pending; /* Bitmask of ports signaling an interrupt. */
+static atomic_t irq_pending; /* Bitmask of ports signaling an interrupt. */
#define NX20P348X_DB_EXIT_FAIL_THRESHOLD 10
static int db_exit_fail_count[CONFIG_USB_PD_PORT_MAX_COUNT];
diff --git a/driver/ppc/sn5s330.c b/driver/ppc/sn5s330.c
index c45340250d..0e5934533e 100644
--- a/driver/ppc/sn5s330.c
+++ b/driver/ppc/sn5s330.c
@@ -26,7 +26,7 @@
#define CPRINTF(format, args...) cprintf(CC_USBPD, format, ## args)
#define CPRINTS(format, args...) cprints(CC_USBPD, format, ## args)
-static uint32_t irq_pending; /* Bitmask of ports signaling an interrupt. */
+static atomic_t irq_pending; /* Bitmask of ports signaling an interrupt. */
static int source_enabled[CONFIG_USB_PD_PORT_MAX_COUNT];
static int read_reg(uint8_t port, int reg, int *regval)
diff --git a/driver/tcpm/tcpci.c b/driver/tcpm/tcpci.c
index 359cb04d30..b04d7be1af 100644
--- a/driver/tcpm/tcpci.c
+++ b/driver/tcpm/tcpci.c
@@ -877,12 +877,12 @@ struct queue {
* Head points to the index of the first empty slot to put a new RX
* message. Must be masked before used in lookup.
*/
- uint32_t head;
+ atomic_t head;
/*
* Tail points to the index of the first message for the PD task to
* consume. Must be masked before used in lookup.
*/
- uint32_t tail;
+ atomic_t tail;
struct cached_tcpm_message buffer[CACHE_DEPTH];
};
static struct queue cached_messages[CONFIG_USB_PD_PORT_MAX_COUNT];
diff --git a/driver/usb_mux/usb_mux.c b/driver/usb_mux/usb_mux.c
index c53a21ce65..4095846c30 100644
--- a/driver/usb_mux/usb_mux.c
+++ b/driver/usb_mux/usb_mux.c
@@ -32,7 +32,7 @@ static int enable_debug_prints;
* Flags will reset to 0 after sysjump; This works for current flags as LPM will
* get reset in the init method which is called during PD task startup.
*/
-static uint32_t flags[CONFIG_USB_PD_PORT_MAX_COUNT];
+static atomic_t flags[CONFIG_USB_PD_PORT_MAX_COUNT];
/* Device is in low power mode. */
#define USB_MUX_FLAG_IN_LPM BIT(0)