net: phy: add device-type abstraction
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest10 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | net: phy: add static data field to struct phy_driverinclude/ | +2 | 0 replies | |
| 2/10 | net: phy: micrel: add device-type abstractiondrivers/ | +70 | 0 replies | |
| 3/10 | net: phy: micrel: parse of nodes at probedrivers/ | +21 | 0 replies | |
| 4/10 | net: phy: micrel: add has-broadcast-disable flag to type datadrivers/ | +6 | 0 replies | |
| 5/10 | net: phy: micrel: add generic clock-mode-select supportdrivers/ include/ | +50 | 0 replies | |
| 6/10 | net: phy: micrel: add support for clock-mode select to KSZ8081/KSZ8091Documentation/ drivers/ | +8 | 0 replies | |
| 7/10 | dt/bindings: reformat micrel eth-phy documentationDocumentation/ | +13 | 0 replies | |
| 8/10 | dt/bindings: add clock-select function property to micrel phy bindingDocumentation/ | +11 | 1 reply | |
| 9/10 | net: phy: micrel: refactor interrupt configdrivers/ | +29 | 0 replies | |
| 10/10 | net: phy: micrel: add copyright entrydrivers/ | +1 | 0 replies |
Reviews trailers per patch
1 of 10 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Sascha Hauer | Florian Fainelli |
|---|---|---|
| Series | R-b | |
| 1/10 | ||
| 2/10 | ||
| 3/10 | ||
| 4/10 | ||
| 5/10 | ||
| 6/10 | ||
| 7/10 | ||
| 8/10 | A-b | |
| 9/10 | ||
| 10/10 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/10] net: phy: add device-type abstraction
This series adds device and device-type abstractions to the micrel driver, and enables support for RMII-reference clock selection for KSZ8081 and KSZ8091 devices.
While adding support for more features for the Micrel PHYs mentioned above, it became apparent that the configuration space is much too large and that adding type-specific callbacks will simply not scale. Instead I added a driver_data field to struct phy_device, which can be used to store static device type data that can be parsed and acted on in generic driver callbacks. This allows a lot of duplicated code to be removed, and should make it much easier to add new features or deal with device-type quirks in the future.
The series has been tested on a dual KSZ8081 setup. Further testing on other Micrel PHYs would be much appreciated.
The recent commit a95a18afe4c8 ("phy/micrel: KSZ8031RNL RMII clock reconfiguration bug") currently prevents KSZ8031 PHYs from using the generic config-init. Bruno, who is the author of that patch, has agreed to test this series and some follow-up diagnostic patches to determine how best to incorporate these devices as well. I intend to send a follow-up patch that removes the custom 8031 config-init and documents this quirk, but the current series can be applied meanwhile.
These patches are against net-next which contains some already merged prerequisite patches to the driver.
Johan
Johan Hovold (10):
net: phy: add static data field to struct phy_driver
net: phy: micrel: add device-type abstraction
net: phy: micrel: parse of nodes at probe
net: phy: micrel: add has-broadcast-disable flag to type data
net: phy: micrel: add generic clock-mode-select support
net: phy: micrel: add support for clock-mode select to KSZ8081/KSZ8091 dt/bindings: reformat micrel eth-phy documentation dt/bindings: add clock-select function property to micrel phy binding
net: phy: micrel: refactor interrupt config
net: phy: micrel: add copyright entry
Documentation/devicetree/bindings/net/micrel.txt | 37 ++-- drivers/net/phy/micrel.c | 262 ++++++++++++++--------- include/linux/micrel_phy.h | 1 - include/linux/phy.h | 2 + 4 files changed, 184 insertions(+), 118 deletions(-)
Signature · 1 line
2.0.4