i2c/sfp: Demagic shift-values

This commit is contained in:
René van Dorst committed 2026-09-20 11:25:35 +02:00
1 parent f65d14f452
commit b5fe9f217f
3 files changed
+6 -4

No files matched your search

+2 -2
View File
@@ -6,8 +6,8 @@
#include "rtl837x_common.h"
#define I2CBUS(sda, scl) \
((uint8_t)((I2C_BUS_FROM_SCL_PIN(scl) << 5) | \
(I2C_BUS_FROM_SDA_PIN(sda) << 2)))
((uint8_t)((I2C_BUS_FROM_SCL_PIN(scl) << RTL837X_REG_I2C_SCL_SHIFT) | \
(I2C_BUS_FROM_SDA_PIN(sda) << RTL837X_REG_I2C_SDA_SHIFT)))
#define I2C_BUS_FROM_SDA_PIN(sda_pin) \
((sda_pin) == GPIO47_I2C_SDA0 ? (uint8_t)0 : \