diff options
| author | Mark Brown <broonie@kernel.org> | 2026-06-01 15:13:58 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-06-01 15:13:58 +0100 |
| commit | a67c554dbc0fdd7e3c5909cb9f0fff41c51b2e9d (patch) | |
| tree | a1a3beca9a4d32efd7d7c2da09b924a7d51237e5 /include/linux/serial_core.h | |
| parent | 6c52e58dbdaed2eea6cd10461e6b7fb3de4c99d5 (diff) | |
| parent | f8e7cd48e5b3b38ec5e1542b73b670a7770d2d7c (diff) | |
| download | lwn-a67c554dbc0fdd7e3c5909cb9f0fff41c51b2e9d.tar.gz lwn-a67c554dbc0fdd7e3c5909cb9f0fff41c51b2e9d.zip | |
ASoC: nau8822: add support for supply regulators
Alexey Charkov <alchark@flipper.net> says:
The Nuvoton NAU8822 codec has four power supply pins: VDDA, VDDB, VDDC
and VDDSPK, which must be online and stable before the device can be
accessed over I2C. On boards where these rails are software-controlled,
probing the codec before the regulators are up results in -ENXIO errors
during register access.
This short series adds optional regulator support to both the device
tree binding and the driver, so platforms that need explicit power
sequencing can describe and enforce it:
Link: https://patch.msgid.link/20260525-nau8822-reg-v2-0-7d37ae393e46@flipper.net
Diffstat (limited to 'include/linux/serial_core.h')
| -rw-r--r-- | include/linux/serial_core.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 666430b47899..110ad4e2aef9 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -1275,6 +1275,18 @@ static inline void uart_unlock_and_check_sysrq_irqrestore(struct uart_port *port #endif /* CONFIG_MAGIC_SYSRQ_SERIAL */ /* + * Variant of guard(uart_port_lock_irqsave) for IRQ handlers that may capture + * a SysRq character via uart_prepare_sysrq_char(). The destructor uses the + * sysrq-aware unlock helper so that a captured port->sysrq_ch is dispatched + * to handle_sysrq() on scope exit. The plain guard variant silently drops + * sysrq_ch and must not be used by callers that process RX. + */ +DEFINE_LOCK_GUARD_1(uart_port_lock_check_sysrq_irqsave, struct uart_port, + uart_port_lock_irqsave(_T->lock, &_T->flags), + uart_unlock_and_check_sysrq_irqrestore(_T->lock, _T->flags), + unsigned long flags); + +/* * We do the SysRQ and SAK checking like this... */ static inline int uart_handle_break(struct uart_port *port) |
