]> git.ipfire.org Git - thirdparty/linux.git/commit
i2c: designware: Replace magic numbers with named constants
authorArtem Shimko <a.shimko.dev@gmail.com>
Thu, 11 Dec 2025 12:29:47 +0000 (15:29 +0300)
committerAndi Shyti <andi.shyti@kernel.org>
Fri, 16 Jan 2026 09:01:06 +0000 (10:01 +0100)
commit518edab3ad4f61204af788b3dcf9ed4087cdc275
tree4737c33518ec8df550a51152f88adba21103848d
parentf6551f7861aca09cb2fdf675d6bb9ca2ffa9038a
i2c: designware: Replace magic numbers with named constants

Replace various magic numbers with properly named constants to improve
code readability and maintainability. This includes constants for
register access, timing adjustments, timeouts, FIFO parameters,
and default values.

This makes the code more self-documenting without altering any
functionality.

Signed-off-by: Artem Shimko <a.shimko.dev@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20251211122947.1469666-1-a.shimko.dev@gmail.com
drivers/i2c/busses/i2c-designware-common.c
drivers/i2c/busses/i2c-designware-core.h