i2c: i801: Switch to iomapped register access
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 12 Mar 2025 19:07:23 +0000 (20:07 +0100)
committerAndi Shyti <andi.shyti@kernel.org>
Thu, 20 Mar 2025 21:30:52 +0000 (22:30 +0100)
commit4a3f77ea77013d8d0178503a8abff33d8c4ba5c5
tree63729fab8b1284eef484d870b24dfb30a1e1b022
parent3a3c6b7b0387d12b067052e1027cd967fae8378a
i2c: i801: Switch to iomapped register access

Switch to iomapped register access as a prerequisite for adding
support for MMIO register access.

This changes replaces the delayed inb_p()/outb_p() calls with calls to
ioread8()/iowrite8() which don't have this extra delay. According to
Documentation/driver-api/device-io.rst the _p versions are needed
for ISA device access only, therefore switching to the non-delayed
versions should not cause problems. However a certain risk remains,
which on the other hand is significantly reduced by the fact that
recent systems will use MMIO instead of PIO. ICH7 datasheet from 2012
mentions already that SMBus register space is also memory-mapped.
So all systems from at least the last 10 yrs should be safe.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/67535b17-c3fb-4507-b083-9c1884b4dd7d@gmail.com
drivers/i2c/busses/i2c-i801.c