Re: [PATCH v3 4/4] iio: proximity: hx9023s: support firmware-name property
From: Jonathan Cameron
Date: Sat Feb 14 2026 - 12:45:01 EST
On Fri, 13 Feb 2026 23:14:46 +0800
Yasin Lee <yasin.lee.x@xxxxxxxxx> wrote:
> Add an optional firmware-name property to specify the firmware file.
> If not provided, the driver falls back to the default firmware name.
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
> Signed-off-by: Yasin Lee <yasin.lee.x@xxxxxxxxx>
Applied 3-4 to the testing branch of iio.git. I'll be rebasing once rc1
once it's available.
Thanks,
Jonathan
> ---
> drivers/iio/proximity/hx9023s.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/proximity/hx9023s.c b/drivers/iio/proximity/hx9023s.c
> index 17e00ee2b6f8..9efaa5b6b5bd 100644
> --- a/drivers/iio/proximity/hx9023s.c
> +++ b/drivers/iio/proximity/hx9023s.c
> @@ -1088,6 +1088,7 @@ static int hx9023s_probe(struct i2c_client *client)
> struct device *dev = &client->dev;
> struct iio_dev *indio_dev;
> struct hx9023s_data *data;
> + const char *fw_name;
> int ret;
>
> indio_dev = devm_iio_device_alloc(dev, sizeof(*data));
> @@ -1125,7 +1126,9 @@ static int hx9023s_probe(struct i2c_client *client)
> if (ret)
> return dev_err_probe(dev, ret, "channel config failed\n");
>
> - ret = request_firmware_nowait(THIS_MODULE, true, "hx9023s.bin", dev,
> + fw_name = "hx9023s.bin";
> + device_property_read_string(dev, "firmware-name", &fw_name);
> + ret = request_firmware_nowait(THIS_MODULE, true, fw_name, dev,
> GFP_KERNEL, data, hx9023s_cfg_update);
> if (ret)
> return dev_err_probe(dev, ret, "reg config failed\n");
>