Messages in this thread | | | Date | Tue, 19 Apr 2022 14:57:38 +0200 | From | Andrew Lunn <> | Subject | Re: [PATCH net-next 09/12] ARM: dts: r9a06g032: describe MII converter |
| |
> Hum, that could be done but since only some values/combinations are > allowed, it would potentially require to validate the setting at each > request, leading to potential non working devices due to invalid MUX > configuration required.
Yes, validation is messy, you have to incrementally validate as each device probes and requests its PCS. I would not only return -EINVAL, but also dump the current partial configuration to the kernel log. I guess the implementation would have a big table as shown in the datasheet. You walk the table trying to find a match for those settings you have so far, and wildcard those you don't know yet. Fun little coding problem.
Andrew
| |