patch "iio: adc: mcp3911: correct "microchip,device-addr" property" added to char-misc-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
iio: adc: mcp3911: correct "microchip,device-addr" property
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From cfbd76d5c9c449739bb74288d982bccf9ff822f4 Mon Sep 17 00:00:00 2001
From: Marcus Folkesson <[email protected]>
Date: Fri, 22 Jul 2022 15:07:19 +0200
Subject: iio: adc: mcp3911: correct "microchip,device-addr" property
Go for the right property name that is documented in the bindings.
--- drivers/iio/adc/mcp3911.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/iio/adc/mcp3911.c +8 -1
@@ -210,7 +210,14 @@ static int mcp3911_config(struct mcp3911 *adc)u32 configreg;int ret; -device_property_read_u32 (dev,"device-addr" , &adc->dev_addr); + 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);if (adc->dev_addr >3 ) { dev_err(&adc->spi->dev, "invalid device address (%i). Must be in range 0-3.\n",
Signature · 1 line
2.37.2