mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 12:14:10 +08:00
iopoll/regmap/phy/snd: Fix comment referencing outdated timer documentation
Function descriptions in iopoll.h, regmap.h, phy.h and sound/soc/sof/ops.h copied all the same outdated documentation about sleep/delay function limitations. In those comments, the generic (and still outdated) timer documentation file is referenced. As proper function descriptions for used delay and sleep functions are in place, simply update the descriptions to reference to them. While at it fix missing colon after "Returns" in function description and move return value description to the end of the function description. Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> # for phy.h Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/all/20241014-devel-anna-maria-b4-timers-flseep-v3-12-dc8b907cb62f@linutronix.de
This commit is contained in:
parent
6534086aa6
commit
89124747f0
@ -19,19 +19,19 @@
|
||||
* @op: accessor function (takes @args as its arguments)
|
||||
* @val: Variable to read the value into
|
||||
* @cond: Break condition (usually involving @val)
|
||||
* @sleep_us: Maximum time to sleep between reads in us (0
|
||||
* tight-loops). Should be less than ~20ms since usleep_range
|
||||
* is used (see Documentation/timers/timers-howto.rst).
|
||||
* @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
|
||||
* read usleep_range() function description for details and
|
||||
* limitations.
|
||||
* @timeout_us: Timeout in us, 0 means never timeout
|
||||
* @sleep_before_read: if it is true, sleep @sleep_us before read.
|
||||
* @args: arguments for @op poll
|
||||
*
|
||||
* Returns 0 on success and -ETIMEDOUT upon a timeout. In either
|
||||
* case, the last read value at @args is stored in @val. Must not
|
||||
* be called from atomic context if sleep_us or timeout_us are used.
|
||||
*
|
||||
* When available, you'll probably want to use one of the specialized
|
||||
* macros defined below rather than this macro directly.
|
||||
*
|
||||
* Returns: 0 on success and -ETIMEDOUT upon a timeout. In either
|
||||
* case, the last read value at @args is stored in @val. Must not
|
||||
* be called from atomic context if sleep_us or timeout_us are used.
|
||||
*/
|
||||
#define read_poll_timeout(op, val, cond, sleep_us, timeout_us, \
|
||||
sleep_before_read, args...) \
|
||||
@ -64,22 +64,22 @@
|
||||
* @op: accessor function (takes @args as its arguments)
|
||||
* @val: Variable to read the value into
|
||||
* @cond: Break condition (usually involving @val)
|
||||
* @delay_us: Time to udelay between reads in us (0 tight-loops). Should
|
||||
* be less than ~10us since udelay is used (see
|
||||
* Documentation/timers/timers-howto.rst).
|
||||
* @delay_us: Time to udelay between reads in us (0 tight-loops). Please
|
||||
* read udelay() function description for details and
|
||||
* limitations.
|
||||
* @timeout_us: Timeout in us, 0 means never timeout
|
||||
* @delay_before_read: if it is true, delay @delay_us before read.
|
||||
* @args: arguments for @op poll
|
||||
*
|
||||
* Returns 0 on success and -ETIMEDOUT upon a timeout. In either
|
||||
* case, the last read value at @args is stored in @val.
|
||||
*
|
||||
* This macro does not rely on timekeeping. Hence it is safe to call even when
|
||||
* timekeeping is suspended, at the expense of an underestimation of wall clock
|
||||
* time, which is rather minimal with a non-zero delay_us.
|
||||
*
|
||||
* When available, you'll probably want to use one of the specialized
|
||||
* macros defined below rather than this macro directly.
|
||||
*
|
||||
* Returns: 0 on success and -ETIMEDOUT upon a timeout. In either
|
||||
* case, the last read value at @args is stored in @val.
|
||||
*/
|
||||
#define read_poll_timeout_atomic(op, val, cond, delay_us, timeout_us, \
|
||||
delay_before_read, args...) \
|
||||
@ -119,17 +119,17 @@
|
||||
* @addr: Address to poll
|
||||
* @val: Variable to read the value into
|
||||
* @cond: Break condition (usually involving @val)
|
||||
* @sleep_us: Maximum time to sleep between reads in us (0
|
||||
* tight-loops). Should be less than ~20ms since usleep_range
|
||||
* is used (see Documentation/timers/timers-howto.rst).
|
||||
* @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
|
||||
* read usleep_range() function description for details and
|
||||
* limitations.
|
||||
* @timeout_us: Timeout in us, 0 means never timeout
|
||||
*
|
||||
* Returns 0 on success and -ETIMEDOUT upon a timeout. In either
|
||||
* case, the last read value at @addr is stored in @val. Must not
|
||||
* be called from atomic context if sleep_us or timeout_us are used.
|
||||
*
|
||||
* When available, you'll probably want to use one of the specialized
|
||||
* macros defined below rather than this macro directly.
|
||||
*
|
||||
* Returns: 0 on success and -ETIMEDOUT upon a timeout. In either
|
||||
* case, the last read value at @addr is stored in @val. Must not
|
||||
* be called from atomic context if sleep_us or timeout_us are used.
|
||||
*/
|
||||
#define readx_poll_timeout(op, addr, val, cond, sleep_us, timeout_us) \
|
||||
read_poll_timeout(op, val, cond, sleep_us, timeout_us, false, addr)
|
||||
@ -140,16 +140,16 @@
|
||||
* @addr: Address to poll
|
||||
* @val: Variable to read the value into
|
||||
* @cond: Break condition (usually involving @val)
|
||||
* @delay_us: Time to udelay between reads in us (0 tight-loops). Should
|
||||
* be less than ~10us since udelay is used (see
|
||||
* Documentation/timers/timers-howto.rst).
|
||||
* @delay_us: Time to udelay between reads in us (0 tight-loops). Please
|
||||
* read udelay() function description for details and
|
||||
* limitations.
|
||||
* @timeout_us: Timeout in us, 0 means never timeout
|
||||
*
|
||||
* Returns 0 on success and -ETIMEDOUT upon a timeout. In either
|
||||
* case, the last read value at @addr is stored in @val.
|
||||
*
|
||||
* When available, you'll probably want to use one of the specialized
|
||||
* macros defined below rather than this macro directly.
|
||||
*
|
||||
* Returns: 0 on success and -ETIMEDOUT upon a timeout. In either
|
||||
* case, the last read value at @addr is stored in @val.
|
||||
*/
|
||||
#define readx_poll_timeout_atomic(op, addr, val, cond, delay_us, timeout_us) \
|
||||
read_poll_timeout_atomic(op, val, cond, delay_us, timeout_us, false, addr)
|
||||
|
@ -1378,12 +1378,13 @@ int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
|
||||
* @regnum: The register on the MMD to read
|
||||
* @val: Variable to read the register into
|
||||
* @cond: Break condition (usually involving @val)
|
||||
* @sleep_us: Maximum time to sleep between reads in us (0
|
||||
* tight-loops). Should be less than ~20ms since usleep_range
|
||||
* is used (see Documentation/timers/timers-howto.rst).
|
||||
* @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
|
||||
* read usleep_range() function description for details and
|
||||
* limitations.
|
||||
* @timeout_us: Timeout in us, 0 means never timeout
|
||||
* @sleep_before_read: if it is true, sleep @sleep_us before read.
|
||||
* Returns 0 on success and -ETIMEDOUT upon a timeout. In either
|
||||
*
|
||||
* Returns: 0 on success and -ETIMEDOUT upon a timeout. In either
|
||||
* case, the last read value at @args is stored in @val. Must not
|
||||
* be called from atomic context if sleep_us or timeout_us are used.
|
||||
*/
|
||||
|
@ -106,17 +106,17 @@ struct reg_sequence {
|
||||
* @addr: Address to poll
|
||||
* @val: Unsigned integer variable to read the value into
|
||||
* @cond: Break condition (usually involving @val)
|
||||
* @sleep_us: Maximum time to sleep between reads in us (0
|
||||
* tight-loops). Should be less than ~20ms since usleep_range
|
||||
* is used (see Documentation/timers/timers-howto.rst).
|
||||
* @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
|
||||
* read usleep_range() function description for details and
|
||||
* limitations.
|
||||
* @timeout_us: Timeout in us, 0 means never timeout
|
||||
*
|
||||
* Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_read
|
||||
* This is modelled after the readx_poll_timeout macros in linux/iopoll.h.
|
||||
*
|
||||
* Returns: 0 on success and -ETIMEDOUT upon a timeout or the regmap_read
|
||||
* error return value in case of a error read. In the two former cases,
|
||||
* the last read value at @addr is stored in @val. Must not be called
|
||||
* from atomic context if sleep_us or timeout_us are used.
|
||||
*
|
||||
* This is modelled after the readx_poll_timeout macros in linux/iopoll.h.
|
||||
*/
|
||||
#define regmap_read_poll_timeout(map, addr, val, cond, sleep_us, timeout_us) \
|
||||
({ \
|
||||
@ -133,20 +133,20 @@ struct reg_sequence {
|
||||
* @addr: Address to poll
|
||||
* @val: Unsigned integer variable to read the value into
|
||||
* @cond: Break condition (usually involving @val)
|
||||
* @delay_us: Time to udelay between reads in us (0 tight-loops).
|
||||
* Should be less than ~10us since udelay is used
|
||||
* (see Documentation/timers/timers-howto.rst).
|
||||
* @delay_us: Time to udelay between reads in us (0 tight-loops). Please
|
||||
* read udelay() function description for details and
|
||||
* limitations.
|
||||
* @timeout_us: Timeout in us, 0 means never timeout
|
||||
*
|
||||
* Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_read
|
||||
* error return value in case of a error read. In the two former cases,
|
||||
* the last read value at @addr is stored in @val.
|
||||
*
|
||||
* This is modelled after the readx_poll_timeout_atomic macros in linux/iopoll.h.
|
||||
*
|
||||
* Note: In general regmap cannot be used in atomic context. If you want to use
|
||||
* this macro then first setup your regmap for atomic use (flat or no cache
|
||||
* and MMIO regmap).
|
||||
*
|
||||
* Returns: 0 on success and -ETIMEDOUT upon a timeout or the regmap_read
|
||||
* error return value in case of a error read. In the two former cases,
|
||||
* the last read value at @addr is stored in @val.
|
||||
*/
|
||||
#define regmap_read_poll_timeout_atomic(map, addr, val, cond, delay_us, timeout_us) \
|
||||
({ \
|
||||
@ -177,17 +177,17 @@ struct reg_sequence {
|
||||
* @field: Regmap field to read from
|
||||
* @val: Unsigned integer variable to read the value into
|
||||
* @cond: Break condition (usually involving @val)
|
||||
* @sleep_us: Maximum time to sleep between reads in us (0
|
||||
* tight-loops). Should be less than ~20ms since usleep_range
|
||||
* is used (see Documentation/timers/timers-howto.rst).
|
||||
* @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
|
||||
* read usleep_range() function description for details and
|
||||
* limitations.
|
||||
* @timeout_us: Timeout in us, 0 means never timeout
|
||||
*
|
||||
* Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_field_read
|
||||
* This is modelled after the readx_poll_timeout macros in linux/iopoll.h.
|
||||
*
|
||||
* Returns: 0 on success and -ETIMEDOUT upon a timeout or the regmap_field_read
|
||||
* error return value in case of a error read. In the two former cases,
|
||||
* the last read value at @addr is stored in @val. Must not be called
|
||||
* from atomic context if sleep_us or timeout_us are used.
|
||||
*
|
||||
* This is modelled after the readx_poll_timeout macros in linux/iopoll.h.
|
||||
*/
|
||||
#define regmap_field_read_poll_timeout(field, val, cond, sleep_us, timeout_us) \
|
||||
({ \
|
||||
|
@ -597,12 +597,12 @@ snd_sof_is_chain_dma_supported(struct snd_sof_dev *sdev, u32 dai_type)
|
||||
* @addr: Address to poll
|
||||
* @val: Variable to read the value into
|
||||
* @cond: Break condition (usually involving @val)
|
||||
* @sleep_us: Maximum time to sleep between reads in us (0
|
||||
* tight-loops). Should be less than ~20ms since usleep_range
|
||||
* is used (see Documentation/timers/timers-howto.rst).
|
||||
* @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
|
||||
* read usleep_range() function description for details and
|
||||
* limitations.
|
||||
* @timeout_us: Timeout in us, 0 means never timeout
|
||||
*
|
||||
* Returns 0 on success and -ETIMEDOUT upon a timeout. In either
|
||||
* Returns: 0 on success and -ETIMEDOUT upon a timeout. In either
|
||||
* case, the last read value at @addr is stored in @val. Must not
|
||||
* be called from atomic context if sleep_us or timeout_us are used.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user