[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+NOmz+cH_5C4T2S+UPeSFJdxSdz5fimbmp6XmovUqKMcfYV+Q@mail.gmail.com>
Date: Wed, 11 Feb 2026 00:14:59 +0800
From: Yasin Lee <yasin.lee.x@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, yasin.lee.x@...look.com,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org
Subject: Re: [PATCH 3/5] iio: proximity: hx9023s: support firmware-name property
On Mon, Feb 9, 2026 at 4:50 PM Andy Shevchenko
<andriy.shevchenko@...el.com> 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
>
>
Powered by blists - more mailing lists