RFC refactor realtek switches and add reset controller
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest5 patches 15 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | dt-bindings: net: dsa: realtek: reset-gpios is not requiredDocumentation/ | +0 | 4 replies | |
| 2/5 | dt-bindings: net: dsa: realtek: add reset controllerDocumentation/ | +3 | 3 replies | |
| 3/5 | net: dsa: realtek: create realtek-commondrivers/ drivers/ drivers/ +3 more | +184 | 6 replies | |
| 4/5 | net: dsa: realtek: load switch variants on demanddrivers/ drivers/ drivers/ +4 more | +162 | 2 replies | |
| 5/5 | net: dsa: realtek: support reset controllerdrivers/ drivers/ drivers/ | +53 | 0 replies |
Reviews trailers per patch
3 of 5 patches have a Reviewed-by or Acked-by.
| Patch | Arınç ÜNAL | Rob Herring | Linus Walleij | Alvin Šipraga |
|---|---|---|---|---|
| 1/5 | A-b | A-b | R-b | R-b |
| 2/5 | A-b | A-b | R-b | R-b |
| 3/5 | R-b | |||
| 4/5 | ||||
| 5/5 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [RFC net-next 0/5] refactor realtek switches and add reset controller
This patch series might be a bit too hefty, and I'm thinking of splitting it into two series. It all began as a patch to add reset-controller as a way to reset the switch, but the duplicated code for both sparked a discussion about a shared code base, which led to what you get here. This driver will be used in some devices with tight resources, both in storage and RAM.
The current driver has two interface modules (SMI and MDIO) and two family/variant modules (RTL8365MB and RTL8366RB). The interface modules are independent and can be loaded only when necessary. But, they refer to symbols from both variant modules, which means they have to be loaded together or disabled at build time. It's a simple approach but doesn't scale well over time, especially if you add more switch variants (like RTL8366B). Also, it's unlikely there'll ever be a device using switches from different families simultaneously. The variant modules are much larger than the interface modules, so it makes sense to load only the needed code.
The first part involves reworking the Realtek DSA switch code. It introduces a common module shared by all existing interfaces (SMI or MDIO) and switch family modules (RTL8365MB and RTL8366RB). This module will mainly have parts of the probe code common to both interfaces, but more bits from variants might move over in the future. This common module is also a way for variant modules to register themselves for interface modules. The idea came from how DSA requests tag modules at runtime when necessary.
The second part is about the original reset controller code, along with the first two binding patches. It'll only affect the new common module.
This series was tested with RTL8366RB using SMI and RTL8367S (rtl8365mb) with MDIO. Both seemed to work as expected.
Checkpatch is flagging some long function declarations (realtek_common_probe and realtek_variant_get). I checked existing kernel code and noticed differe
Regards,
Luiz