diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2024-09-02 09:53:12 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2024-09-02 16:34:02 +0200 |
commit | 21d9e6013134998334e162af905322d7da1e5314 (patch) | |
tree | bd84084820a522d749b6d16e52f575b51b44829c /net/mac802154 | |
parent | hwmon: (ina2xx) Use shunt voltage to calculate current (diff) | |
download | linux-21d9e6013134998334e162af905322d7da1e5314.tar.xz linux-21d9e6013134998334e162af905322d7da1e5314.zip |
hwmon: pmbus: Implement generic bus access delay
Some drivers, like the max15301 or zl6100, are intentionally delaying
SMBus communications, to prevent transmission errors. As this is necessary
on additional PMBus compatible devices, implement a generic delay mechanism
in the pmbus core.
Introduces two delay settings in the pmbus_driver_info struct, one applies
to every SMBus transaction and the other is for write transaction only.
Once set by the driver the SMBus traffic, using the generic pmbus access
helpers, is automatically delayed when necessary.
The two settings are:
access_delay:
- Unit in microseconds
- Stores the accessed timestamp after every SMBus access
- Delays when necessary before the next SMBus access
write_delay:
- Unit in microseconds
- Stores the written timestamp after a write SMBus access
- Delays when necessary before the next SMBus access
This allows to drop the custom delay code from the drivers and easily
introduce this feature in additional pmbus drivers.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Message-ID: <20240902075319.585656-1-patrick.rudolph@9elements.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'net/mac802154')
0 files changed, 0 insertions, 0 deletions