[PATCH net-next v4 0/3] net: ethernet: oa_tc6: add reset-gpios support

Alessandro Zini posted 3 patches 5 days, 23 hours ago
.../bindings/net/microchip,lan8650.yaml       |  5 ++
drivers/net/ethernet/adi/adin1140.c           |  4 +-
.../net/ethernet/microchip/lan865x/lan865x.c  |  4 +-
drivers/net/ethernet/oa_tc6.c                 | 46 +++++++++++++------
4 files changed, 42 insertions(+), 17 deletions(-)
[PATCH net-next v4 0/3] net: ethernet: oa_tc6: add reset-gpios support
Posted by Alessandro Zini 5 days, 23 hours ago
This series adds optional reset GPIO support for OPEN Alliance 10BASE-T1x
MAC-PHY devices using the OA TC6 library, and documents the property for
the Microchip LAN8650/1 MAC-PHY.

Patch 1 documents the optional reset-gpios property for the Microchip
LAN8650/1.

Patch 2 converts oa_tc6_init() to return an ERR_PTR instead of NULL, so
that -EPROBE_DEFER from the GPIO lookup added in patch 3 reaches the
driver core instead of being turned into -ENODEV.

Patch 3 implements optional reset GPIO handling in the common oa_tc6
library. The reset line is requested asserted, kept asserted for 10 us and
1 ms of settle time is allowed after deassertion for the crystal
oscillator startup, before the OPEN Alliance TC6 communication is started.

Note: In v3, a DT binding patch was added for adi,ad3306.yaml based on
review bot feedback, as adin1140 also calls oa_tc6_init(). However, I have
later realized that ADIN1140/AD3306 does not have an external reset pin...
Therefore, that binding patch has been dropped in v4. Sorry for the
spam.

Changes in v4:
- Dropped patch 2 from v3 ("dt-bindings: net: adi,ad3306: add reset-gpios
  property") because the ADIN1140/AD3306 does not feature a physical reset
  pin.
- Renumbered patches accordingly (now 3 patches).

Changes in v3:
- Picked up Acked-by tag from Krzysztof on patch 1.
- Added patch documenting the property for adi,ad3306 (dropped in v4).
- Added patch converting oa_tc6_init() to ERR_PTR, so that -EPROBE_DEFER
  is not lost.
- In the driver patch, requested the GPIO with GPIOD_OUT_HIGH and dropped
  the now redundant gpiod_set_value_cansleep() call, as suggested by
  Qingfang Deng, propagated the dev_err_probe() return value, reworded
  the comment and sorted the new includes.

Changes in v2:
- Moved reset-gpios handling from the lan865x driver into the common oa_tc6
  library (drivers/net/ethernet/oa_tc6.c), so all MAC-PHY devices can make
  use of it, as suggested by Parthiban Veerasooran.

Alessandro Zini (3):
  dt-bindings: net: microchip,lan8650: add reset-gpios property
  net: ethernet: oa_tc6: return ERR_PTR from oa_tc6_init()
  net: ethernet: oa_tc6: add reset-gpios support

 .../bindings/net/microchip,lan8650.yaml       |  5 ++
 drivers/net/ethernet/adi/adin1140.c           |  4 +-
 .../net/ethernet/microchip/lan865x/lan865x.c  |  4 +-
 drivers/net/ethernet/oa_tc6.c                 | 46 +++++++++++++------
 4 files changed, 42 insertions(+), 17 deletions(-)

-- 
2.55.0