Hi, On 15.03.22 13:32, Bjørn Mork wrote: > Birger Koblitz <m...@birger-koblitz.de> writes:
> Yuck! > > Why the heck can't this be made generic, auto-configured by DTS props > and upstreamed? There is a reason for this, you know: > > bjorn@miraculix:/usr/local/src/git/linux$ git grep -E '^#ifdef' > drivers/net/phy/sfp.c|wc -c > 0 > 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. Cheers, Birger _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel