roll: pigweed pw_spi_linux: Avoid unneccessary ioctl()s in Configure()

Initiator::Configure() is called on every Device::WriteRead() call, in
case different devices on the bus use different configuration.

Avoid unnecessary ioctl() calls by recording the current configuration
and skipping Configure() if the new config is not actually different.

If the pw::spi::Initiator base class were using the non-virtual
interface (NVI) pattern, this could be implemented there and apply to
all initiator implementations.

Test: Verified downstream project still works and redundant ioctls no
      longer happen
Original-Bug: 366541694
Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/235877
Original-Revision: eefd313bdb13098552cd713598b937debe80d3d4

Rolled-Repo: https://pigweed.googlesource.com/pigweed/pigweed
Rolled-Commits: f66eafb0d8d1b5..eefd313bdb1309
Roller-URL: https://ci.chromium.org/b/8736624524553555249
GitWatcher: ignore
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I9abe24227e6e8c30da6f6b90809e2928bb41b4f4
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/showcase/sense/+/236272
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
1 file changed
tree: 92353c8705e39e590be75e8a9334cd25ade9f7f7
  1. .github/
  2. .vscode/
  3. apps/
  4. device/
  5. modules/
  6. system/
  7. targets/
  8. tools/
  9. web_app/
  10. .bazelignore
  11. .bazelrc
  12. .bazelversion
  13. .buildifier.json
  14. .clang-format
  15. .clangd.shared
  16. .gitignore
  17. .pw_console.yaml
  18. AUTHORS
  19. BUILD.bazel
  20. CONTRIBUTING.md
  21. LICENSE
  22. MODULE.bazel
  23. MODULE.bazel.lock
  24. OWNERS
  25. pigweed.json
  26. README.md
README.md

Sense

git clone https://pigweed.googlesource.com/pigweed/showcase/sense

Welcome to Pigweed Sense, a tour of key Pigweed components experienced through an imagined air quality product.

Please visit Sense: An interactive tour through Pigweed to get started.