On 3/10/25 7:32 PM, Heinrich Schuchardt wrote:
On 08.03.25 21:36, Marek Vasut wrote:
Update the miiphybb documentation to match current implementation.
The static struct bb_miiphy_bus bb_miiphy_buses[] array is removed.
The example is updated to match current Renesas RAVB driver, which
is one of the miiphybb users.

Reviewed-by: Paul Barker <paul.barker...@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+rene...@mailbox.org>
---
Cc: Jim Liu <jim.t90...@gmail.com>
Cc: Joe Hershberger <joe.hershber...@ni.com>
Cc: Mario Six <mario....@gdsys.cc>
Cc: Michael Chang <zhang971090...@gmail.com>
Cc: Nobuhiro Iwamatsu <iwama...@nigauri.org>
Cc: Parvathi Bhogaraju <pbhogar...@microsoft.com>
Cc: Paul Barker <paul.barker...@bp.renesas.com>
Cc: Ramon Fried <rfried....@gmail.com>
Cc: Tom Rini <tr...@konsulko.com>
Cc: u-boot@lists.denx.de
---
V2: - Fix language bugs
     - Add RB from Paul
---
  doc/README.bitbangMII | 66 ++++++++++++++++++++++++++++++-------------

It would be preferable to move this document into doc/devel/ as .rst file.

  1 file changed, 47 insertions(+), 19 deletions(-)

diff --git a/doc/README.bitbangMII b/doc/README.bitbangMII
index 05ab20376f3..78b4ef880cb 100644
--- a/doc/README.bitbangMII
+++ b/doc/README.bitbangMII
@@ -1,39 +1,67 @@
-This patch rewrites the miiphybb ( Bit-banged MII bus driver ) in order to -support an arbitrary number of mii buses. This feature is useful when your -board uses different mii buses for different phys and all (or a part) of these
-buses are implemented via bit-banging mode.
+The miiphybb ( Bit-banged MII bus driver ) supports an arbitrary number of +MII buses. This feature is useful when a driver uses different MII buses for
+different PHYs and all (or a part) of these buses are implemented via
+bit-banging mode.
  The driver requires that the following macros should be defined into the board

CONFIG_BITBANGMII=y enables the miiphybb driver.

  configuration file:
  CONFIG_BITBANGMII    - Enable the miiphybb driver
-The board code needs to fill the bb_miiphy_buses[] array with a record for
-each required bus and declare the bb_miiphy_buses_num variable with the
-number of mii buses. The record (struct bb_miiphy_bus) has the following
+The driver code needs to allocate a regular MDIO device using mdio_alloc()
+and assign .read and .write accessors which wrap bb_miiphy_read() and
+bb_miiphy_write() functions respectively. The bb_miiphy_read() and
+bb_miiphy_write() functions take a pointer to a callback structure,
+struct bb_miiphy_bus_ops. The struct bb_miiphy_bus_ops has the following
  fields/callbacks (see miiphy.h for details):

Please, add the description of struct bb_miiphy_bus_op miiphy.h and add the file to the API documentation. You could also put the example and the programming guidance there.
It seems you did that already while applying a modified version of this patch and the .rst conversion patch to master ? Thanks !

One more nitpick, the modified version should not be applied to master, it should only be in next, where the matching bbmiiphy code update which prompted the documentation change is applied.

Reply via email to