commit | 9539b45523e7b2a25c9dd02bd5d80cfd5f5b8fda | [log] [tgz] |
---|---|---|
author | Jonathon Reinhart <jrreinhart@pigweed.infra.roller.google.com> | Mon Sep 16 16:08:08 2024 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Sep 16 16:08:08 2024 +0000 |
tree | 92353c8705e39e590be75e8a9334cd25ade9f7f7 | |
parent | 3ad4a51bee2a99af2c8228efc3e6a09960f90633 [diff] |
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>
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.