Commit Graph

10 Commits

Author SHA1 Message Date
Viresh Kumar
c037e60442 Update versions of rust-vmm dependency crates
Update a number of rust-vmm crates to align to the common version of
vm-memory.

Also update the tests to fix the build.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-07-11 13:33:47 +05:30
Viresh Kumar
66225683dd gpio: Update to a newer version of libgpiod
libgpiod received few updates, migrate to that.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-05-13 15:30:55 +05:30
Viresh Kumar
b5408666f1 gpio: Enable REPLY_ACK protocol feature
The virtio-gpio driver at the guest performs virtio transaction right
from its probe() routine and without this patch, there is a chance that
the backend may miss the notification from the guest, as the
notification may be sent before the eventfd is set at the backend. This
flag makes the master side wait for reply from backend before proceeding
further for each operation.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-05-04 12:36:19 +05:30
Viresh Kumar
413a840d0b gpio: Fix get_config()
get_config() must return only the relevant part of the config, as
requested by the caller, instead of returning entire config structure.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-04-29 16:00:36 +05:30
Viresh Kumar
131464787d gpio: Skip musl builds
Disable builds for musl, where libgpiod build fails on
rust-vmm-container due to missing tools and headers.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-04-04 12:38:51 +05:30
Viresh Kumar
cc6d1e608f gpio: Add tests
Add tests to validate functionality of the GPIO crate.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-04-04 12:38:51 +05:30
Viresh Kumar
679224af8d gpio: Add support for interrupts
Add support for GPIO interrupts. Only edge interrupts are supported by
libgpiod.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-03-31 09:09:32 +05:30
Viresh Kumar
8a021c704f gpio: Process virtio requests
This patch implements process_queue() to process incoming requests.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-03-31 09:09:32 +05:30
Viresh Kumar
472870d44d gpio: Implement low level GPIO helpers
This patch implements the low level GPIO helpers responsible for pin
level functioning.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-03-31 09:09:32 +05:30
Viresh Kumar
5caff0a8ad gpio: Add boilerplate code
This adds the boilerplate code and its dependencies to get the basic
structure for the gpio crate.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-03-31 09:09:32 +05:30