Skip to content

net: dsa: realtek: support reset controller and update docs

Luiz Angelo Daros de Luca linux-devicetree lkml netdev 5 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected] change-id 20240212-realtek-reset-88a0bf25bb22

Versions newest first

  1. v5 Latest3 patches 1 replyApplied 3/3
  2. v43 patches 4 repliesSuperseded
  3. v33 patches 4 repliesSuperseded inferred link
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v23 patches19 repliesSuperseded inferred link
v12 patches13 repliesSuperseded

Changes in v5 from the cover letter

- Fixed error checking logic when reset controller (de)assert fails
- Link to v4: https://lore.kernel.org/r/[email protected]

Patches in v5 All 3 applied

#Subject and filesSizeRepliesApplied
1/3dt-bindings: net: dsa: realtek: reset-gpios is not requiredDocumentation/devicetree/bindings/net/dsa/realtek.yaml+0 -10 repliesApplied
2/3dt-bindings: net: dsa: realtek: add reset controllerDocumentation/devicetree/bindings/net/dsa/realtek.yaml+3 -00 repliesApplied
3/3net: dsa: realtek: support reset controllerdrivers/net/dsa/realtek/realtek.h drivers/net/dsa/realtek/rtl83xx.c drivers/net/dsa/realtek/rtl83xx.h+41 -51 replyApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchArınç ÜNALRob HerringLinus WalleijAlvin Šipraga
1/3A-b A-b R-b R-b
2/3A-b A-b R-b R-b
3/3R-b R-b

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.

Read the v5 thread

Cover letter [PATCH net-next v5 0/3] net: dsa: realtek: support reset controller and update docs

The driver previously supported reset pins using GPIO, but it lacked support for reset controllers. Although a reset method is generally not required, the driver fails to detect the switch if the reset was kept asserted by a previous driver.

This series adds support to reset a Realtek switch using a reset controller. It also updates the binding documentation to remove the requirement of a reset method and to add the new reset controller property.

It was tested on a TL-WR1043ND v1 router (rtl8366rb via SMI).

---
Changes in v5:
- Fixed error checking logic when reset controller (de)assert fails
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes in v4:
- do not test for priv->reset,priv->reset_ctl
- updated commit message
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Rebased on the Realtek DSA driver refactoring (08f627164126)
- Dropped the reset controller example in bindings
- Used %pe in error printing
- Linked to v2: https://lore.kernel.org/r/[email protected]/

Changes in v2:
- Introduced a dedicated commit for removing the reset-gpios requirement
- Placed binding patches before code changes
- Removed the 'reset-names' property
- Moved the example from the commit message to realtek.yaml
- Split the reset function into _assert/_deassert variants
- Modified reset functions to return a warning instead of a value
- Utilized devm_reset_control_get_optional to prevent failure when the reset control is missing
- Used 'true' and 'false' for boolean values
- Removed the CONFIG_RESET_CONTROLLER check as stub methods are sufficient when undefined
- Linked to v1: https://lore.kernel.org/r/[email protected]/

---
Luiz Angelo Daros de Luca (3):
dt-bindings: net: dsa: realtek: reset-gpios is not required
dt-bindings: net: dsa: realtek: add reset controller
net: dsa: realtek: support reset controller

 .../devicetree/bindings/net/dsa/realtek.yaml       |  4 ++-
 drivers/net/dsa/realtek/realtek.h                  |  2 ++
 drivers/net/dsa/realtek/rtl83xx.c                  | 42 +++++++++++++++++++---
 drivers/net/dsa/realtek/rtl83xx.h                  |  2 ++
 4 files changed, 44 insertions(+), 6 deletions(-)

---
base-commit: d1d77120bc2867b3e449e07ee656a26b2fb03d1e
change-id: 20240212-realtek-reset-88a0bf25bb22

Best regards,

Signature · 1 line
Luiz Angelo Daros de Luca <[email protected]>