bindings: rust: expose v2.1 features as flag
authorErik Schilling <erik.schilling@linaro.org>
Mon, 6 Nov 2023 12:53:14 +0000 (13:53 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 8 Nov 2023 13:06:03 +0000 (14:06 +0100)
commit7552e5d9ed983ab8afcfce33ac507653d54d075b
tree295b6e0d3f6e522c5e65ff1d177a75bb14757ffb
parent8c8547bfddd58b66c1ed254072bd0cfab2f671b6
bindings: rust: expose v2.1 features as flag

v2.1 provided a getter to read the chip name from a request.

This adds v2_1 as feature in order to raise the minimum requested version
to v2.1 for exposing the new API.

This is identical to the concept patch that was posted [1] when this
feature flag mechanism was proposed. Only the commit message was
reworded.

[1] https://lore.kernel.org/all/20231006-b4-bindings-old-version-fix-v1-2-a65f431afb97@linaro.org/

Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
bindings/rust/libgpiod-sys/Cargo.toml
bindings/rust/libgpiod/Cargo.toml
bindings/rust/libgpiod/README.md
bindings/rust/libgpiod/src/line_request.rs
bindings/rust/libgpiod/tests/line_request.rs