Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Yasin Lee and committed by
Jonathan Cameron
8e901c49 577fe2fd

+4 -1
+4 -1
drivers/iio/proximity/hx9023s.c
··· 1086 1086 struct device *dev = &client->dev; 1087 1087 struct iio_dev *indio_dev; 1088 1088 struct hx9023s_data *data; 1089 + const char *fw_name; 1089 1090 int ret; 1090 1091 1091 1092 indio_dev = devm_iio_device_alloc(dev, sizeof(*data)); ··· 1124 1123 if (ret) 1125 1124 return dev_err_probe(dev, ret, "channel config failed\n"); 1126 1125 1127 - ret = request_firmware_nowait(THIS_MODULE, true, "hx9023s.bin", dev, 1126 + fw_name = "hx9023s.bin"; 1127 + device_property_read_string(dev, "firmware-name", &fw_name); 1128 + ret = request_firmware_nowait(THIS_MODULE, true, fw_name, dev, 1128 1129 GFP_KERNEL, data, hx9023s_cfg_update); 1129 1130 if (ret) 1130 1131 return dev_err_probe(dev, ret, "reg config failed\n");