Il gio 2 gen 2025, 18:04 Philippe Mathieu-Daudé <phi...@linaro.org> ha scritto:
> > + unsafe { > > + bindings::device_class_set_legacy_reset(dc, > Some(rust_reset_fn::<T>)); > > Pre-existing, but since it appears on this patch, Rust device models > should not implement this legacy interface. If a non-Rust parent > implements it, I think we should convert the non-Rust parent before > adding a Rust child. No clue how to check a parent don't implement > this interface in Rust. > > Generally, we shouldn't access legacy API from Rust IMHO. > I disagree that device_class_set_legacy_reset() should not be used. Three-phase reset is only needed for buses, and requires more code in order to implement the Resettable interface. Devices gain nothing compared to using device_class_set_legacy_reset(). In fact, perhaps it should have been named something like device_class_set_simple_reset()... Paolo