On Wed, Feb 16, 2022 at 1:24 AM Nikita Yushchenko <nikita.yo...@cogentembedded.com> wrote: > > This is a version of reset_get_bulk() that does not treat no resets > definition as an error. > > Signed-off-by: Nikita Yushchenko <nikita.yo...@cogentembedded.com> > --- > drivers/reset/reset-uclass.c | 10 ++++++++++ > include/reset.h | 21 +++++++++++++++++++++ > 2 files changed, 31 insertions(+) > > diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c > index ca9f00a8f2..5a66fe5aef 100644 > --- a/drivers/reset/reset-uclass.c > +++ b/drivers/reset/reset-uclass.c > @@ -144,6 +144,16 @@ int reset_get_bulk(struct udevice *dev, struct > reset_ctl_bulk *bulk) > return __reset_get_bulk(dev, dev_ofnode(dev), bulk); > } > > +int reset_get_bulk_optional(struct udevice *dev, struct reset_ctl_bulk *bulk) > +{ > + int ret = reset_get_bulk(dev, bulk); > + > + if (ret == -ENODEV)
Are you sure about this return type? I think it would be -ENODATA if I'm not wrong.