mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-11 20:03:31 +00:00
iio: adc: mcp3911: correct "microchip,device-addr" property
Go for the right property name that is documented in the bindings.
Fixes: 3a89b289df ("iio: adc: add support for mcp3911")
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220722130726.7627-3-marcus.folkesson@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
160905549e
commit
cfbd76d5c9
@ -210,6 +210,13 @@ static int mcp3911_config(struct mcp3911 *adc)
|
|||||||
u32 configreg;
|
u32 configreg;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
ret = device_property_read_u32(dev, "microchip,device-addr", &adc->dev_addr);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fallback to "device-addr" due to historical mismatch between
|
||||||
|
* dt-bindings and implementation
|
||||||
|
*/
|
||||||
|
if (ret)
|
||||||
device_property_read_u32(dev, "device-addr", &adc->dev_addr);
|
device_property_read_u32(dev, "device-addr", &adc->dev_addr);
|
||||||
if (adc->dev_addr > 3) {
|
if (adc->dev_addr > 3) {
|
||||||
dev_err(&adc->spi->dev,
|
dev_err(&adc->spi->dev,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user