[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYmf4MtCBmwZBuAV@smile.fi.intel.com>
Date: Mon, 9 Feb 2026 10:50:40 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Yasin Lee <yasin.lee.x@...il.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 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.
> int ret;
...
> + ret = device_property_read_string(dev, "firmware-name", &fw_name);
> + if (ret && ret != -EINVAL)
Why is this special error code 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.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists