[PATCH] realtek: Fix kernel dependencies on CONFIG_MDIO_SMBUS
Bjørn Mork
bjorn at mork.no
Tue Mar 15 06:37:28 PDT 2022
Birger Koblitz <mail at birger-koblitz.de> writes:
> Well, we can of course always compile SMBus support in, i.e. make CONFIG_SFP depend on CONFIG_MDIO_SMBUS,
> this is already done for the I2C equivalent and this is where we started:
> config SFP
> tristate "SFP cage support"
> depends on I2C && PHYLINK
> depends on HWMON || HWMON=n
> select MDIO_I2C
> + select CONFIG_MDIO_SMBUS
>
> But if we do not want to do that then #ifdefs are the only solution to prevent compiler errors
> due to missing symbols. There is no need to do anything in a dts BTW. The code is already
> auto-configuring, it first tries I2C which is more powerful and then
> falls back to SMBus before it gives up.
Just drop the unnecssary I2C_SMBUS dependency. AFAICS, you're only
using i2c_smbus_xfer() which is part of the i2c core.
Bjørn
More information about the openwrt-devel
mailing list