Re: [PATCH 3/5] iio: proximity: hx9023s: support firmware-name property
From: Yasin Lee
Date: Tue Feb 10 2026 - 11:15:22 EST
On Mon, Feb 9, 2026 at 4:50 PM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxx> wrote:
>
> On Mon, Feb 09, 2026 at 11:37:04AM +0800, Yasin Lee wrote:
> > Add an optional firmware-name property to specify the firmware file.
> > If not provided, the driver falls back to the default firmware name.
>
> ...
>
> > struct device *dev = &client->dev;
> > struct iio_dev *indio_dev;
> > struct hx9023s_data *data;
>
> > + const char *fw_name = "hx9023s.bin";
>
> Preserve reversed xmas tree order.
> And looking at the usage, please split the definition and assignment.
>
Ack. Will fix this in v2.
> > int ret;
>
> ...
>
> > + ret = device_property_read_string(dev, "firmware-name", &fw_name);
> > + if (ret && ret != -EINVAL)
>
> Why is this special error code check?
>
Good point. I will simplify the logic as you suggested and remove the
redundant check.
> > + return dev_err_probe(dev, ret, "failed to read firmware-name\n");
>
> fw_name = "...";
> device_property_read_string(dev, "firmware-name", &fw_name);
>
> I believe if wondering one can get a debug information from
> request_firmware_nowait() on what firmware file has been actually used.
>
Agreed. Thanks.
> --
> With Best Regards,
> Andy Shevchenko
>
>