On Fri, Apr 09, 2021 at 07:42:32AM +0200, Sander Vanheule wrote: > Hi Andrew, > > Thank you for the feedback. You can find a (leaked) datasheet at: > https://github.com/libc0607/Realtek_switch_hacking/blob/files/RTL8231_Datasheet_1.2.pdf So this is not really an MFD. It has different ways of making use of pins, which could be used for GPIO, but can also be used for LEDs. You could look if it better fits in drivers/leds. But you can also use GPIO drivers for LEDs via led-gpio. > > I don't understand this split. Why not > > > > mdio-bus { > > compatible = "vendor,mdio"; > > ... > > > > expander0: expander@0 { > > /* > > * Provide compatible for working registration of mdio > > device. > > * Device probing happens in gpio1 node. > > */ > > compatible = "realtek,rtl8231-expander"; > > reg = <0>; > > gpio-controller; > > }; > > }; > > > > You can list whatever properties you need in the node. Ethernet > > switches have interrupt-controller, embedded MDIO busses with PHYs on > > them etc. > > This is what I tried initially, but it doesn't seem to work. The node > is probably still added as an MDIO device, but rtl8231_gpio_probe() > doesn't appear to get called at all. I do agree it would be preferable > over the split specification. Look at drivers/net/dsa/mv88e6xxx/chip.c for how to register an mdio driver. If you still cannot get it to work, post your code and i will take a look. Andrew