diff options
| author | Yasin Lee <yasin.lee.x@gmail.com> | 2026-02-13 23:14:46 +0800 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2026-02-23 08:24:22 +0000 |
| commit | 8e901c49ffc8d59adabae4020724f96770d35db7 (patch) | |
| tree | 185469b0b8ff3254e83687e66f13050b073fb10b /drivers | |
| parent | 577fe2fdd42fb16cacb1178cb94a42dd7c595914 (diff) | |
iio: proximity: hx9023s: support firmware-name property
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@intel.com>
Signed-off-by: Yasin Lee <yasin.lee.x@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/iio/proximity/hx9023s.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/iio/proximity/hx9023s.c b/drivers/iio/proximity/hx9023s.c index 2918dfc0df54..5fa3f4b179dd 100644 --- a/drivers/iio/proximity/hx9023s.c +++ b/drivers/iio/proximity/hx9023s.c @@ -1086,6 +1086,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)); @@ -1123,7 +1124,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"); |
