Skip to content

Commit f49f748

Browse files
kyolee415Rebase bot
authored andcommitted
[docs][drivers] Update the current state of Banjo in the driver migraiton guides.
Test: doc-preview Change-Id: Ia7254ff7ef62527f16c02d3f0a264efef9ca970b Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/942987 Reviewed-by: Sarah Chan <[email protected]> Reviewed-by: Suraj Malhotra <[email protected]> Commit-Queue: Kyo Lee <[email protected]>
1 parent 6531de4 commit f49f748

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

docs/development/drivers/migration/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Notice the following key differences between DFv1 and DFv2:
2626

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

3131
Here is a list for the expected conditions of your driver after completing
3232
the migration to DFv2:

docs/development/drivers/migration/migrate-from-banjo-to-fidl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ to use FIDL first before [migrating it to DFv2][migrate-from-dfv1-to-dfv2].
88

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

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

docs/development/drivers/migration/migrate-from-dfv1-to-dfv2.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ or edge cases that may apply to your driver.
5151
(by manually creating `compat::DeviceServer`) for enabling the drivers
5252
in different framework versions to talk to each other.
5353

54+
- **Can DFv2 drivers talk to Banjo protocols using the compatibility shim?**
55+
56+
While it's strongly recommended that your DFv1 driver is migrated from
57+
Banjo to FIDL, if it is necessary for a DFv2 driver to talk
58+
to some existing Banjo protocols, the compatibility shim provides the
59+
following features:
60+
61+
- `compat::BanjoServer` makes it easier to serve Banjo
62+
(see [`banjo_server.h`][banjo-server-h]).
63+
- `compat::ConnectBanjo` makes it easier to connect to Banjo
64+
(see [`banjo_client.h`][banjo-client-h]).
65+
5466
- **What has changed in the new DFv2 driver interfaces?**
5567

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

0 commit comments

Comments
 (0)