Re: [PATCH v2 3/3] net: phy: add Rust Asix PHY driver

Andrew Lunn
2023-10-06T15:57:46Z

> Now I'm thinking that this is the best option. Kconfig would be the following:
>
> config AX88796B_PHY
> tristate "Asix PHYs"
> help
> Currently supports the Asix Electronics PHY found in the X-Surf 100
> AX88796B package.
>
> choice
> prompt "Implementation options"
> depends on AX88796B_PHY
> help
> There are two implementations for a driver for Asix PHYs; C and Rust.
> If not sure, choose C.
>
> config AX88796B_C_PHY
> bool "The C version driver for Asix PHYs"
>
> config AX88796B_RUST_PHY
> bool "The Rust version driver for Asix PHYs"
> depends on RUST
>
> endchoice
>
>
> No hack in Makefile:
>
> obj-$(CONFIG_AX88796B_C_PHY) += ax88796b.o
> obj-$(CONFIG_AX88796B_RUST_PHY) += ax88796b_rust.o

This looks reasonable. Lets use this. But i still think we need some
sort of RUST_PHYLIB_BINDING.

Andrew