mbox series

[v8,00/24] wfx: get out from the staging area

Message ID 20211005135400.788058-1-Jerome.Pouiller@silabs.com (mailing list archive)
Headers show
Series wfx: get out from the staging area | expand

Message

Jérôme Pouiller Oct. 5, 2021, 1:53 p.m. UTC
From: Jérôme Pouiller <jerome.pouiller@silabs.com>

Hello,

I think the wfx driver is now mature enough to be accepted in the
drivers/net/wireless directory.

The firmware is now a part of the linux-firmware repository since relase
20210315[1]. It had taken a bit of time because I have worked with the legal
department to simplify the redistribution terms of the firmware.

[1]: https://lore.kernel.org/linux-firmware/2833354.gXvVfaC4I7@pc-42/


As requested by Kalle[2], I send one file per patch. At the end, all the
patches (or at least the patches 3 to 24) will be squashed (therefore, I
didn't bother to write real commit messages).

[2]: https://lore.kernel.org/lkml/87ft6p2n0h.fsf@codeaurora.org/

Here is a diagram of the global architecture that may help to understand
the code:

    ,------------------------------------.
    |                mac80211            |
    `------------------------------------'
    ,------------+-----------+-----------.
    |    sta     |           |           |
    |    scan    |           |           |
    |    main    |           |           |
    +------------+  data_tx  |           |
    |    key     |           |  data_rx  |
    | hif_tx_mib |   queue   |           |
    |   hif_tx   |           |           |
    |   hif_rx   |           |           |
    |  hif_api_* |           |           |
    +------------+-----------+-----------+--------.
    |                  bh                |  fwio  |
    +------------------------------------+--------+
    |                     hwio                    |
    +---------------------------------------------+
    |                   bus_sdio                  |
    |                   bus_spi                   |
    `---------------------------------------------'
    ,---------------------------------------------.
    |                  spi / sdio                 |
    `---------------------------------------------'

Roughly, I have sent the files from the bottom to the top.


v8:
  - Change the way the DT is handled. The user can now specify the name of
    the board (= chip + antenna) he use. It easier for board designers to
    add new entries. I plan to send a PR to linux-firmware to include PDS
    files of the developpement boards belong the firmware (I also plan to
    relocate these file into wfx/ instead of silabs/). (Kalle, Pali)
  - Prefix visible functions and structs with "wfx_". I mostly kept the
    code under 80 columns. (Kalle, Pali, Greg)
  - Remove support for force_ps_timeout for now. (Kalle)
  - Fix licenses of Makefile, Kconfig and hif_api*.h. (Kalle)
  - Do not mix and match endianess in struct hif_ind_startup. (Kalle)
  - Remove magic values. (Kalle)
  - Use IS_ALIGNED(). (BTW, PTR_IS_ALIGNED() does not exist?) (Kalle)
  - I have also noticed that some headers files did not declare all the
    struct they used.

  These issues remain (I hope they are not blockers):
  - I have currently no ideas how to improve/simplify the parsing PDS file.
    (Kalle)
  - We would like to relate the SDIO quirks into mmc/core/quirks.h, but the
    API to do that does not yet exist. (Ulf, Pali)

v7:
  - Update location of mmc-pwrseq-simple.txt (Rob)

v6:
  - Rebase on last staging-next (roughtly somewhere after the 5.15
    merge window). So, this series include the patches from:
      https://lore.kernel.org/netdev/20210913130203.1903622-1-Jerome.Pouiller@silabs.com/

v5:
  - Add reference to the PR to linux-firmware in the cover letter
  - Rebase on last staging tree (that mainly include commit 6efed0a69794
    "staging: wfx: fix possible panic with re-queued frames" and a few
    cosmetics changes)
  - Remove useless trailing spaces in DT binding (Rob)
  - Add a commit message in the patch 2 since I am not sure it will be
    squashed with the other (Rob)

v4:
  - Rebase on last staging tree
  - Add 'additionalProperties: false' to the DT specification (I made that
    change blindly because I am able to reproduce Rob's error) (Rob)
  - Replace C++ comments with Ansi C comments (Kalle)
  - Check that existing Ansi C comments comply with net/ "compact" style
  - Drop one obsolete comment
  - Remove comments after '#endif' in header files
  - Remove macro redefinitions in hif_api_general.h (Kalle)
  - Replace compiletime_assert() with BUILD_BUG_ON_MSG() (Kalle)
  - Rename ieee80211_is_action_back() (Kalle)
  - Add a comment explaining how the PDS is sent to the device (Kalle)
  - Add a comment about case where CONFIG_MMC==m in the Makefile (Kalle)
  - Fix irrevelant comment about CONFIG_VMAP_STACK (Kalle)
  - Talk about the unreliable SDIO Vendor ID in the Kconfig help (Kalle)
  - Mention the firmware status in the cover letter (Kalle)
  - Fix misaligned function arguments in key.c

v3:
  - dt-bindings: Rename config-file property (Rob)
  - dt-bindings: No additional properties are allowed (spi-max-frequency is
    already listed) (Rob)
  - dt-bindings: Remove references for mac-address properties (Rob)
  - Rebase on staging/staging-next

v2:
  - dt-bindings: Improve device description and add link to the datasheet
      (Rob)
  - dt-bindings: Add blank lines between each DT property (Rob)
  - dt-bindings: Explicitly mention mac-address and local-mac-address and
      add references to ethernet-controller.yaml (Rob)
  - dt-bindings: "config-file" is not for development/debug (Rob)
  - dt-bindings: Remove description of "spi-max-frequency" (Rob)
  - dt-bindings: Use "folded scalar" syntax instead of escaping the colons
  - bus_sdio.c: A compatible node in the DT is now mandatory to probe the
      device. Also change documentation of dt-bindings accordingly (Pali,
      Ulf)
  - bus_sdio.c: Move SDIO IDs to sdio_ids.h (Pali)
  - bh.c: Import patch "staging: wfx: fix test on return value of
      gpiod_get_value()" (Nathan)
  - data_tx.c: Import patch "staging: wfx: fix use of uninitialized
      pointer"
  - sta.c: Import patch "staging: wfx: make a const array static, makes
      object smaller" (Colin)

v1:
  - Drop the function name in the warning message (Kalle)
  - Replace goto by return in wfx_send_pdata_pds() (Kalle, Dan)
  - Improve error label in wfx_send_pdata_pds() (Kalle)

Jérôme Pouiller (24):
  mmc: sdio: add SDIO IDs for Silabs WF200 chip
  dt-bindings: introduce silabs,wfx.yaml
  wfx: add Makefile/Kconfig
  wfx: add wfx.h
  wfx: add main.c/main.h
  wfx: add bus.h
  wfx: add bus_spi.c
  wfx: add bus_sdio.c
  wfx: add hwio.c/hwio.h
  wfx: add fwio.c/fwio.h
  wfx: add bh.c/bh.h
  wfx: add hif_api_*.h
  wfx: add hif_tx*.c/hif_tx*.h
  wfx: add key.c/key.h
  wfx: add hif_rx.c/hif_rx.h
  wfx: add data_rx.c/data_rx.h
  wfx: add queue.c/queue.h
  wfx: add data_tx.c/data_tx.h
  wfx: add sta.c/sta.h
  wfx: add scan.c/scan.h
  wfx: add debug.c/debug.h
  wfx: add traces.h
  wfx: remove from the staging area
  wfx: get out from the staging area

 .../bindings/net/wireless/silabs,wfx.yaml     |  64 ++--
 MAINTAINERS                                   |   3 +-
 drivers/net/wireless/Kconfig                  |   1 +
 drivers/net/wireless/Makefile                 |   1 +
 drivers/net/wireless/silabs/Kconfig           |  18 +
 drivers/net/wireless/silabs/Makefile          |   3 +
 .../wireless/silabs}/wfx/Kconfig              |   5 +
 .../wireless/silabs}/wfx/Makefile             |   3 +-
 .../{staging => net/wireless/silabs}/wfx/bh.c |  31 +-
 .../{staging => net/wireless/silabs}/wfx/bh.h |   1 +
 .../wireless/silabs}/wfx/bus.h                |   2 +-
 .../wireless/silabs}/wfx/bus_sdio.c           |  91 +++--
 .../wireless/silabs}/wfx/bus_spi.c            |  68 +++-
 .../wireless/silabs}/wfx/data_rx.c            |   2 +-
 .../wireless/silabs}/wfx/data_rx.h            |   4 +-
 .../wireless/silabs}/wfx/data_tx.c            |  86 ++---
 .../wireless/silabs}/wfx/data_tx.h            |  14 +-
 .../wireless/silabs}/wfx/debug.c              |  41 +--
 .../wireless/silabs}/wfx/debug.h              |   6 +-
 .../wireless/silabs}/wfx/fwio.c               |  78 ++--
 .../wireless/silabs}/wfx/fwio.h               |   0
 .../wireless/silabs}/wfx/hif_api_cmd.h        | 144 ++++----
 .../wireless/silabs}/wfx/hif_api_general.h    |  60 ++--
 .../wireless/silabs}/wfx/hif_api_mib.h        |  68 ++--
 .../wireless/silabs}/wfx/hif_rx.c             | 142 ++++----
 .../wireless/silabs}/wfx/hif_rx.h             |   0
 .../wireless/silabs}/wfx/hif_tx.c             | 152 ++++----
 drivers/net/wireless/silabs/wfx/hif_tx.h      |  64 ++++
 drivers/net/wireless/silabs/wfx/hif_tx_mib.c  | 333 ++++++++++++++++++
 drivers/net/wireless/silabs/wfx/hif_tx_mib.h  |  55 +++
 .../wireless/silabs}/wfx/hwio.c               | 156 ++++----
 .../wireless/silabs}/wfx/hwio.h               |  36 +-
 .../wireless/silabs}/wfx/key.c                |  24 +-
 .../wireless/silabs}/wfx/key.h                |   0
 .../wireless/silabs}/wfx/main.c               |  58 ++-
 .../wireless/silabs}/wfx/main.h               |   5 +-
 .../wireless/silabs}/wfx/queue.c              |  22 +-
 .../wireless/silabs}/wfx/queue.h              |   2 +-
 .../wireless/silabs}/wfx/scan.c               |  19 +-
 .../wireless/silabs}/wfx/scan.h               |   0
 .../wireless/silabs}/wfx/sta.c                | 111 +++---
 .../wireless/silabs}/wfx/sta.h                |   0
 .../wireless/silabs}/wfx/traces.h             |  10 +-
 .../wireless/silabs}/wfx/wfx.h                |  13 +-
 drivers/staging/Kconfig                       |   1 -
 drivers/staging/Makefile                      |   1 -
 drivers/staging/wfx/TODO                      |   6 -
 drivers/staging/wfx/hif_tx.h                  |  60 ----
 drivers/staging/wfx/hif_tx_mib.c              | 324 -----------------
 drivers/staging/wfx/hif_tx_mib.h              |  49 ---
 include/linux/mmc/sdio_ids.h                  |   7 +
 51 files changed, 1262 insertions(+), 1182 deletions(-)
 rename {drivers/staging/wfx/Documentation => Documentation}/devicetree/bindings/net/wireless/silabs,wfx.yaml (68%)
 create mode 100644 drivers/net/wireless/silabs/Kconfig
 create mode 100644 drivers/net/wireless/silabs/Makefile
 rename drivers/{staging => net/wireless/silabs}/wfx/Kconfig (60%)
 rename drivers/{staging => net/wireless/silabs}/wfx/Makefile (76%)
 rename drivers/{staging => net/wireless/silabs}/wfx/bh.c (90%)
 rename drivers/{staging => net/wireless/silabs}/wfx/bh.h (96%)
 rename drivers/{staging => net/wireless/silabs}/wfx/bus.h (97%)
 rename drivers/{staging => net/wireless/silabs}/wfx/bus_sdio.c (73%)
 rename drivers/{staging => net/wireless/silabs}/wfx/bus_spi.c (77%)
 rename drivers/{staging => net/wireless/silabs}/wfx/data_rx.c (97%)
 rename drivers/{staging => net/wireless/silabs}/wfx/data_rx.h (77%)
 rename drivers/{staging => net/wireless/silabs}/wfx/data_tx.c (87%)
 rename drivers/{staging => net/wireless/silabs}/wfx/data_tx.h (76%)
 rename drivers/{staging => net/wireless/silabs}/wfx/debug.c (89%)
 rename drivers/{staging => net/wireless/silabs}/wfx/debug.h (65%)
 rename drivers/{staging => net/wireless/silabs}/wfx/fwio.c (83%)
 rename drivers/{staging => net/wireless/silabs}/wfx/fwio.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_api_cmd.h (81%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_api_general.h (88%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_api_mib.h (86%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_rx.c (69%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_rx.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_tx.c (72%)
 create mode 100644 drivers/net/wireless/silabs/wfx/hif_tx.h
 create mode 100644 drivers/net/wireless/silabs/wfx/hif_tx_mib.c
 create mode 100644 drivers/net/wireless/silabs/wfx/hif_tx_mib.h
 rename drivers/{staging => net/wireless/silabs}/wfx/hwio.c (51%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hwio.h (62%)
 rename drivers/{staging => net/wireless/silabs}/wfx/key.c (90%)
 rename drivers/{staging => net/wireless/silabs}/wfx/key.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/main.c (93%)
 rename drivers/{staging => net/wireless/silabs}/wfx/main.h (92%)
 rename drivers/{staging => net/wireless/silabs}/wfx/queue.c (95%)
 rename drivers/{staging => net/wireless/silabs}/wfx/queue.h (95%)
 rename drivers/{staging => net/wireless/silabs}/wfx/scan.c (88%)
 rename drivers/{staging => net/wireless/silabs}/wfx/scan.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/sta.c (88%)
 rename drivers/{staging => net/wireless/silabs}/wfx/sta.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/traces.h (97%)
 rename drivers/{staging => net/wireless/silabs}/wfx/wfx.h (93%)
 delete mode 100644 drivers/staging/wfx/TODO
 delete mode 100644 drivers/staging/wfx/hif_tx.h
 delete mode 100644 drivers/staging/wfx/hif_tx_mib.c
 delete mode 100644 drivers/staging/wfx/hif_tx_mib.h

Comments

Kalle Valo Oct. 5, 2021, 2:15 p.m. UTC | #1
Jerome Pouiller <Jerome.Pouiller@silabs.com> writes:

> From: Jérôme Pouiller <jerome.pouiller@silabs.com>
>
> Hello,
>
> I think the wfx driver is now mature enough to be accepted in the
> drivers/net/wireless directory.
>
> The firmware is now a part of the linux-firmware repository since relase
> 20210315[1]. It had taken a bit of time because I have worked with the legal
> department to simplify the redistribution terms of the firmware.
>
> [1]: https://lore.kernel.org/linux-firmware/2833354.gXvVfaC4I7@pc-42/
>
>
> As requested by Kalle[2], I send one file per patch. At the end, all the
> patches (or at least the patches 3 to 24) will be squashed (therefore, I
> didn't bother to write real commit messages).
>
> [2]: https://lore.kernel.org/lkml/87ft6p2n0h.fsf@codeaurora.org/
>
> Here is a diagram of the global architecture that may help to understand
> the code:
>
>     ,------------------------------------.
>     |                mac80211            |
>     `------------------------------------'
>     ,------------+-----------+-----------.
>     |    sta     |           |           |
>     |    scan    |           |           |
>     |    main    |           |           |
>     +------------+  data_tx  |           |
>     |    key     |           |  data_rx  |
>     | hif_tx_mib |   queue   |           |
>     |   hif_tx   |           |           |
>     |   hif_rx   |           |           |
>     |  hif_api_* |           |           |
>     +------------+-----------+-----------+--------.
>     |                  bh                |  fwio  |
>     +------------------------------------+--------+
>     |                     hwio                    |
>     +---------------------------------------------+
>     |                   bus_sdio                  |
>     |                   bus_spi                   |
>     `---------------------------------------------'
>     ,---------------------------------------------.
>     |                  spi / sdio                 |
>     `---------------------------------------------'
>
> Roughly, I have sent the files from the bottom to the top.
>
>
> v8:
>   - Change the way the DT is handled. The user can now specify the name of
>     the board (= chip + antenna) he use. It easier for board designers to
>     add new entries. I plan to send a PR to linux-firmware to include PDS
>     files of the developpement boards belong the firmware (I also plan to
>     relocate these file into wfx/ instead of silabs/). (Kalle, Pali)
>   - Prefix visible functions and structs with "wfx_". I mostly kept the
>     code under 80 columns. (Kalle, Pali, Greg)
>   - Remove support for force_ps_timeout for now. (Kalle)
>   - Fix licenses of Makefile, Kconfig and hif_api*.h. (Kalle)
>   - Do not mix and match endianess in struct hif_ind_startup. (Kalle)
>   - Remove magic values. (Kalle)
>   - Use IS_ALIGNED(). (BTW, PTR_IS_ALIGNED() does not exist?) (Kalle)
>   - I have also noticed that some headers files did not declare all the
>     struct they used.
>
>   These issues remain (I hope they are not blockers):
>   - I have currently no ideas how to improve/simplify the parsing PDS file.
>     (Kalle)

For the PDS file problem it would help if you could actually describe
what the firmware requires/needs and then we can start from that. I had
some questions about this in v7 but apparently you missed those.
Kalle Valo Oct. 5, 2021, 2:20 p.m. UTC | #2
Jerome Pouiller <Jerome.Pouiller@silabs.com> writes:

> From: Jérôme Pouiller <jerome.pouiller@silabs.com>
>
> Hello,
>
> I think the wfx driver is now mature enough to be accepted in the
> drivers/net/wireless directory.
>
> The firmware is now a part of the linux-firmware repository since relase
> 20210315[1]. It had taken a bit of time because I have worked with the legal
> department to simplify the redistribution terms of the firmware.
>
> [1]: https://lore.kernel.org/linux-firmware/2833354.gXvVfaC4I7@pc-42/
>
>
> As requested by Kalle[2], I send one file per patch. At the end, all the
> patches (or at least the patches 3 to 24) will be squashed (therefore, I
> didn't bother to write real commit messages).
>
> [2]: https://lore.kernel.org/lkml/87ft6p2n0h.fsf@codeaurora.org/
>
> Here is a diagram of the global architecture that may help to understand
> the code:
>
>     ,------------------------------------.
>     |                mac80211            |
>     `------------------------------------'
>     ,------------+-----------+-----------.
>     |    sta     |           |           |
>     |    scan    |           |           |
>     |    main    |           |           |
>     +------------+  data_tx  |           |
>     |    key     |           |  data_rx  |
>     | hif_tx_mib |   queue   |           |
>     |   hif_tx   |           |           |
>     |   hif_rx   |           |           |
>     |  hif_api_* |           |           |
>     +------------+-----------+-----------+--------.
>     |                  bh                |  fwio  |
>     +------------------------------------+--------+
>     |                     hwio                    |
>     +---------------------------------------------+
>     |                   bus_sdio                  |
>     |                   bus_spi                   |
>     `---------------------------------------------'
>     ,---------------------------------------------.
>     |                  spi / sdio                 |
>     `---------------------------------------------'
>
> Roughly, I have sent the files from the bottom to the top.
>
>
> v8:
>   - Change the way the DT is handled. The user can now specify the name of
>     the board (= chip + antenna) he use. It easier for board designers to
>     add new entries. I plan to send a PR to linux-firmware to include PDS
>     files of the developpement boards belong the firmware (I also plan to
>     relocate these file into wfx/ instead of silabs/). (Kalle, Pali)
>   - Prefix visible functions and structs with "wfx_". I mostly kept the
>     code under 80 columns. (Kalle, Pali, Greg)
>   - Remove support for force_ps_timeout for now. (Kalle)
>   - Fix licenses of Makefile, Kconfig and hif_api*.h. (Kalle)
>   - Do not mix and match endianess in struct hif_ind_startup. (Kalle)
>   - Remove magic values. (Kalle)
>   - Use IS_ALIGNED(). (BTW, PTR_IS_ALIGNED() does not exist?) (Kalle)
>   - I have also noticed that some headers files did not declare all the
>     struct they used.
>
>   These issues remain (I hope they are not blockers):
>   - I have currently no ideas how to improve/simplify the parsing PDS file.
>     (Kalle)
>   - We would like to relate the SDIO quirks into mmc/core/quirks.h, but the
>     API to do that does not yet exist. (Ulf, Pali)

So is this a direct version from staging-next? If yes, what commit id did
you use? Or do you have your own set of patches on top of staging-next?
Jérôme Pouiller Oct. 5, 2021, 3:51 p.m. UTC | #3
On Tuesday 5 October 2021 16:20:19 CEST Kalle Valo wrote:
> Jerome Pouiller <Jerome.Pouiller@silabs.com> writes:
> 
> > From: Jérôme Pouiller <jerome.pouiller@silabs.com>
[...]
> >
> > v8:
> >   - Change the way the DT is handled. The user can now specify the name of
> >     the board (= chip + antenna) he use. It easier for board designers to
> >     add new entries. I plan to send a PR to linux-firmware to include PDS
> >     files of the developpement boards belong the firmware (I also plan to
> >     relocate these file into wfx/ instead of silabs/). (Kalle, Pali)
> >   - Prefix visible functions and structs with "wfx_". I mostly kept the
> >     code under 80 columns. (Kalle, Pali, Greg)
> >   - Remove support for force_ps_timeout for now. (Kalle)
> >   - Fix licenses of Makefile, Kconfig and hif_api*.h. (Kalle)
> >   - Do not mix and match endianess in struct hif_ind_startup. (Kalle)
> >   - Remove magic values. (Kalle)
> >   - Use IS_ALIGNED(). (BTW, PTR_IS_ALIGNED() does not exist?) (Kalle)
> >   - I have also noticed that some headers files did not declare all the
> >     struct they used.
> >
> >   These issues remain (I hope they are not blockers):
> >   - I have currently no ideas how to improve/simplify the parsing PDS file.
> >     (Kalle)
> >   - We would like to relate the SDIO quirks into mmc/core/quirks.h, but the
> >     API to do that does not yet exist. (Ulf, Pali)
> 
> So is this a direct version from staging-next? If yes, what commit id did
> you use? Or do you have your own set of patches on top of staging-next?

I am based on 5e57c668dc09 from staging-next. (I have not rebased it between
v7 and v8)
Jérôme Pouiller Oct. 5, 2021, 4:22 p.m. UTC | #4
On Tuesday 5 October 2021 16:15:22 CEST Kalle Valo wrote:
> Jerome Pouiller <Jerome.Pouiller@silabs.com> writes:
> 
> > From: Jérôme Pouiller <jerome.pouiller@silabs.com>
[...]
> > v8:
> >   - Change the way the DT is handled. The user can now specify the name of
> >     the board (= chip + antenna) he use. It easier for board designers to
> >     add new entries. I plan to send a PR to linux-firmware to include PDS
> >     files of the developpement boards belong the firmware (I also plan to
> >     relocate these file into wfx/ instead of silabs/). (Kalle, Pali)
> >   - Prefix visible functions and structs with "wfx_". I mostly kept the
> >     code under 80 columns. (Kalle, Pali, Greg)
> >   - Remove support for force_ps_timeout for now. (Kalle)
> >   - Fix licenses of Makefile, Kconfig and hif_api*.h. (Kalle)
> >   - Do not mix and match endianess in struct hif_ind_startup. (Kalle)
> >   - Remove magic values. (Kalle)
> >   - Use IS_ALIGNED(). (BTW, PTR_IS_ALIGNED() does not exist?) (Kalle)
> >   - I have also noticed that some headers files did not declare all the
> >     struct they used.
> >
> >   These issues remain (I hope they are not blockers):
> >   - I have currently no ideas how to improve/simplify the parsing PDS file.
> >     (Kalle)
> 
> For the PDS file problem it would help if you could actually describe
> what the firmware requires/needs and then we can start from that. I had
> some questions about this in v7 but apparently you missed those.

Did you received this reply[1]?

[1]: https://lore.kernel.org/all/2723787.uDASXpoAWK@pc-42/
Kalle Valo Oct. 5, 2021, 5:49 p.m. UTC | #5
Jérôme Pouiller <jerome.pouiller@silabs.com> writes:

> On Tuesday 5 October 2021 16:15:22 CEST Kalle Valo wrote:
>> Jerome Pouiller <Jerome.Pouiller@silabs.com> writes:
>> 
>> > From: Jérôme Pouiller <jerome.pouiller@silabs.com>
> [...]
>> > v8:
>> >   - Change the way the DT is handled. The user can now specify the name of
>> >     the board (= chip + antenna) he use. It easier for board designers to
>> >     add new entries. I plan to send a PR to linux-firmware to include PDS
>> >     files of the developpement boards belong the firmware (I also plan to
>> >     relocate these file into wfx/ instead of silabs/). (Kalle, Pali)
>> >   - Prefix visible functions and structs with "wfx_". I mostly kept the
>> >     code under 80 columns. (Kalle, Pali, Greg)
>> >   - Remove support for force_ps_timeout for now. (Kalle)
>> >   - Fix licenses of Makefile, Kconfig and hif_api*.h. (Kalle)
>> >   - Do not mix and match endianess in struct hif_ind_startup. (Kalle)
>> >   - Remove magic values. (Kalle)
>> >   - Use IS_ALIGNED(). (BTW, PTR_IS_ALIGNED() does not exist?) (Kalle)
>> >   - I have also noticed that some headers files did not declare all the
>> >     struct they used.
>> >
>> >   These issues remain (I hope they are not blockers):
>> >   - I have currently no ideas how to improve/simplify the parsing PDS file.
>> >     (Kalle)
>> 
>> For the PDS file problem it would help if you could actually describe
>> what the firmware requires/needs and then we can start from that. I had
>> some questions about this in v7 but apparently you missed those.
>
> Did you received this reply[1]?
>
> [1]: https://lore.kernel.org/all/2723787.uDASXpoAWK@pc-42/

I did and I even made further questions:

https://lore.kernel.org/all/87k0ixj5vn.fsf@codeaurora.org/

Can we please continue the discussion on that thread instead of passing
out lore links to each other :)
Rob Herring (Arm) Oct. 5, 2021, 10:45 p.m. UTC | #6
On Tue, 05 Oct 2021 15:53:38 +0200, Jerome Pouiller wrote:
> From: Jérôme Pouiller <jerome.pouiller@silabs.com>
> 
> Prepare the inclusion of the wfx driver in the kernel.
> 
> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
> ---
>  .../bindings/net/wireless/silabs,wfx.yaml     | 137 ++++++++++++++++++
>  1 file changed, 137 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:
./Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml:39:31: [error] syntax error: mapping values are not allowed here (syntax)

dtschema/dtc warnings/errors:
make[1]: *** Deleting file 'Documentation/devicetree/bindings/net/wireless/silabs,wfx.example.dts'
Traceback (most recent call last):
  File "/usr/local/bin/dt-extract-example", line 45, in <module>
    binding = yaml.load(open(args.yamlfile, encoding='utf-8').read())
  File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/main.py", line 434, in load
    return constructor.get_single_data()
  File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 120, in get_single_data
    node = self.composer.get_single_node()
  File "_ruamel_yaml.pyx", line 706, in _ruamel_yaml.CParser.get_single_node
  File "_ruamel_yaml.pyx", line 724, in _ruamel_yaml.CParser._compose_document
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 891, in _ruamel_yaml.CParser._compose_mapping_node
  File "_ruamel_yaml.pyx", line 904, in _ruamel_yaml.CParser._parse_next_event
ruamel.yaml.scanner.ScannerError: mapping values are not allowed in this context
  in "<unicode string>", line 39, column 31
make[1]: *** [Documentation/devicetree/bindings/Makefile:20: Documentation/devicetree/bindings/net/wireless/silabs,wfx.example.dts] Error 1
make[1]: *** Waiting for unfinished jobs....
./Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml:  mapping values are not allowed in this context
  in "<unicode string>", line 39, column 31
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml: ignoring, error parsing file
warning: no schema found in file: ./Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml
make: *** [Makefile:1441: dt_binding_check] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1536655

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
Kalle Valo Oct. 7, 2021, 8:22 a.m. UTC | #7
Jérôme Pouiller <jerome.pouiller@silabs.com> writes:

> On Tuesday 5 October 2021 16:20:19 CEST Kalle Valo wrote:
>> Jerome Pouiller <Jerome.Pouiller@silabs.com> writes:
>> 
>> > From: Jérôme Pouiller <jerome.pouiller@silabs.com>
> [...]
>> >
>> > v8:
>> >   - Change the way the DT is handled. The user can now specify the name of
>> >     the board (= chip + antenna) he use. It easier for board designers to
>> >     add new entries. I plan to send a PR to linux-firmware to include PDS
>> >     files of the developpement boards belong the firmware (I also plan to
>> >     relocate these file into wfx/ instead of silabs/). (Kalle, Pali)
>> >   - Prefix visible functions and structs with "wfx_". I mostly kept the
>> >     code under 80 columns. (Kalle, Pali, Greg)
>> >   - Remove support for force_ps_timeout for now. (Kalle)
>> >   - Fix licenses of Makefile, Kconfig and hif_api*.h. (Kalle)
>> >   - Do not mix and match endianess in struct hif_ind_startup. (Kalle)
>> >   - Remove magic values. (Kalle)
>> >   - Use IS_ALIGNED(). (BTW, PTR_IS_ALIGNED() does not exist?) (Kalle)
>> >   - I have also noticed that some headers files did not declare all the
>> >     struct they used.
>> >
>> >   These issues remain (I hope they are not blockers):
>> >   - I have currently no ideas how to improve/simplify the parsing PDS file.
>> >     (Kalle)
>> >   - We would like to relate the SDIO quirks into mmc/core/quirks.h, but the
>> >     API to do that does not yet exist. (Ulf, Pali)
>> 
>> So is this a direct version from staging-next? If yes, what commit id did
>> you use? Or do you have your own set of patches on top of staging-next?
>
> I am based on 5e57c668dc09 from staging-next. (I have not rebased it between
> v7 and v8)

Commit 5e57c668dc09 is from Sep 14th, so I take it that you have your on
patches on top of staging-next.

But please don't send a new version of the patchset too often, at least
try to keep two weeks between versions but preferably even more. It's
quite difficult when you send a new version and there are still ongoing
discussions in the previous version.