Skip to content

Commit

Permalink
[docs][drivers] Update the current state of Banjo in the driver migra…
Browse files Browse the repository at this point in the history
…iton guides.

Test: doc-preview
Change-Id: Ia7254ff7ef62527f16c02d3f0a264efef9ca970b
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/942987
Reviewed-by: Sarah Chan <spqchan@google.com>
Reviewed-by: Suraj Malhotra <surajmalhotra@google.com>
Commit-Queue: Kyo Lee <kyol@google.com>
  • Loading branch information
kyolee415 authored and Rebase bot committed Nov 8, 2023
1 parent 6531de4 commit f49f748
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/development/drivers/migration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Notice the following key differences between DFv1 and DFv2:

Important: Although not strictly required, it is **strongly recommended**
to migrate existing Banjo protocols to FIDL when migrating your DFv1 driver
to DFv2. Using Banjo in a DFv2 driver is cumbersome.
to DFv2.

Here is a list for the expected conditions of your driver after completing
the migration to DFv2:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ to use FIDL first before [migrating it to DFv2][migrate-from-dfv1-to-dfv2].

Important: Although not strictly required, it is **strongly recommended** to
migrate existing Banjo protocols to FIDL when migrating your DFv1 driver to
DFv2. Using Banjo in a DFv2 driver is cumbersome.
DFv2.

Driver migration from Banjo to FIDL can be summarized as follows:

Expand Down
17 changes: 17 additions & 0 deletions docs/development/drivers/migration/migrate-from-dfv1-to-dfv2.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ or edge cases that may apply to your driver.
(by manually creating `compat::DeviceServer`) for enabling the drivers
in different framework versions to talk to each other.

- **Can DFv2 drivers talk to Banjo protocols using the compatibility shim?**

While it's strongly recommended that your DFv1 driver is migrated from
Banjo to FIDL, if it is necessary for a DFv2 driver to talk
to some existing Banjo protocols, the compatibility shim provides the
following features:

- `compat::BanjoServer` makes it easier to serve Banjo
(see [`banjo_server.h`][banjo-server-h]).
- `compat::ConnectBanjo` makes it easier to connect to Banjo
(see [`banjo_client.h`][banjo-client-h]).

- **What has changed in the new DFv2 driver interfaces?**

One major change in DFv2 is that drivers take control of the life cycle
Expand Down Expand Up @@ -904,6 +916,8 @@ All the **source code files** mentioned in this section:
- [`//sdk/lib/driver/component/cpp/driver_base.h`][driver-base-h-70]
- [`//sdk/lib/driver/component/cpp/tests/driver_base_test.cc`][driver-base-test-cc]
- [`//sdk/lib/driver/component/cpp/tests/driver_fidl_test.cc`][driver-fidl-test-cc]
- [`//sdk/lib/driver/compat/cpp/banjo_server.h`][banjo-server-h]
- [`//sdk/lib/driver/compat/cpp/banjo_client.h`][banjo-client-h]
- [`//sdk/lib/driver/compat/cpp/device_server.h`][device-server-h-23]
- [`//sdk/lib/driver/testing/cpp/driver_runtime.h`][driver-testing-runtime]
- [`//src/connectivity/wlan/testing/wlantap-driver/wlantap-driver.cc`][wlantap-driver]
Expand Down Expand Up @@ -994,4 +1008,7 @@ All the **documentation pages** mentioned in this section:
[gc-msd-arm-mali-top-level]: https://fuchsia-review.git.corp.google.com/c/fuchsia/+/853637
[gc-driver-testing]: https://fuchsia-review.git.corp.google.com/c/fuchsia/+/770412
[driver-communication]: /docs/concepts/drivers/driver_communication.md
[banjo-server-h]: https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/lib/driver/compat/cpp/banjo_server.h
[banjo-client-h]: https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/lib/driver/compat/cpp/banjo_client.h


0 comments on commit f49f748

Please sign in to comment.