Open junnan01-wu opened 4 weeks ago
Update file "coverage_config_x86_64.json" to pass vhost-device-ci
Update file "coverage_config_x86_64.json" to pass vhost-device-ci
Oh, reducing coverage_score is not very good. New code should be covered by unit tests if reasonably possible.
It's actually not a good idea, I will add new unit tests for new code in next push for order not reducing coverage rate
In "force-pushed the vhost-device-scmi branch from fd4d28e to bd6f00e", I did following works
Modify "SENSOR_READING_GET" flow in handle. After supporting notification, once frontend wants to read from sysfs "_XXXraw", it should call "_notify_statusset" to disable notify before "reading_get", otherwise, it will return "device busy".
Add struct "ChanScanType" in struct "Axis" In notification flow, data from /dev/iio:deviceX is formatted according to the rule from "_scan_elements/XXXtype". Therefore, each axis should store the parsing result from it. And I add a "new" implmentment for Axis, if scan_type exists, it will parse it and store in self.
As we communicated previously, I modified the return type of function "_readingget". According to SCMI spec, Sensor Reading Descriptor is (i32,i32,u32,u32). Correspondingly, unit test of "_readingget" also modified.
Refactor function "_readaxis". Previously, function "_readaxis" has two mainly processes. The first is reading data from "_XXXraw" The second is reading offset and scale, then multiplying raw with them The second flow can be reused by "_readingupdate", so I sperate it to a new function "_deal_axis_rawdata", so that "_readingupdate" can call it.
In "_readingupdate", initialize buffer size according to scan_type.
I squash last two commits, they are both for notification flow.
Add some unit tests.
Thank you for the update, it looks nice at the first glance. I'll try to review the whole PR again in the coming days. And sorry for a delayed response, I was away.
Hello mz-pdm, please leave review comment here in order to discuss conveniently.
I do some modifications according to your review comment on my fork repo.
More action items need to be done in next push
Thank you for all your changes. I'll be unresponsive the next 1-2 weeks but don't worry, I won't forget about your PR. Anyway, a good progress has been made and I think it's time to involve other reviewers or the maintainers now.
Thanks for your kindly review. It really help us a lot.
In latest push, I separate some patches.
okay, LGTM, but I'm not a scmi
expert at all, so I'd like an approval from @mz-pdm.
I see a conversation still open, so I'd like to wait it resolved before merging this.
okay, LGTM, but I'm not a
scmi
expert at all, so I'd like an approval from @mz-pdm. I see a conversation still open, so I'd like to wait it resolved before merging this.
Well, that's fine
Summary of the PR
This is Samsung Team. We want to contribute scmi notification implement. In virtio-spec, if feature VIRTIO_SCMI_F_P2A_CHANNELS was negotiated, device should implement SCMI notification.
In our embeded environment, we enable iio sensor with notification feature, and configure this feature.