Skip to contentSkip to conversation

iio: adc: MCP3564: fix hardware identification logic

PATCH Superseded [email protected] 2 participants 2 messages Nov 22, 2023 – Nov 25, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 iio: adc: MCP3564: fix hardware identification logic

From: Marius Cristea <[email protected]>

In mcp3564_config() fix the hardware identification logic based on the hardware ID registers. Second part of the code was disabled by an logic error.
Fix a typo related to the "MODULE_DESCRIPTION".

---
 drivers/iio/adc/mcp3564.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/adc/mcp3564.c +2 -2
index e3f1de5fcc5a..e914a885a868 100644
@@ -1122,7 +1122,7 @@ static int mcp3564_config(struct iio_dev *indio_dev)
 	enum mcp3564_ids ids;
 	int ret = 0;
 	unsigned int tmp = 0x01;
-	bool err = true;
+	bool err = false;
 
 	/*
 	 * The address is set on a per-device basis by fuses in the factory,
@@ -1509,5 +1509,5 @@ static struct spi_driver mcp3564_driver = {
 module_spi_driver(mcp3564_driver);
 
 MODULE_AUTHOR("Marius Cristea <[email protected]>");
-MODULE_DESCRIPTION("Microchip MCP346x/MCP346xR and MCP356x/MCP346xR ADCs");
+MODULE_DESCRIPTION("Microchip MCP346x/MCP346xR and MCP356x/MCP356xR ADCs");
 MODULE_LICENSE("GPL v2");

base-commit: 6543f376ec8aa90a6c1ed44b765f4f0d6c3eb1db

Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 8 lines · On Wed, 22 Nov 2023 13:11:06 +0200 <[email protected]> wrote:

From: Marius Cristea <[email protected]>

In mcp3564_config() fix the hardware identification logic based on the hardware ID registers. Second part of the code was disabled by an logic error.
Fix a typo related to the "MODULE_DESCRIPTION".

Fixes tag?

Quoted 26 lines
---
 drivers/iio/adc/mcp3564.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/adc/mcp3564.c +2 -2
index e3f1de5fcc5a..e914a885a868 100644
@@ -1122,7 +1122,7 @@ static int mcp3564_config(struct iio_dev *indio_dev)
 	enum mcp3564_ids ids;
 	int ret = 0;
 	unsigned int tmp = 0x01;
-	bool err = true;
+	bool err = false;
 
 	/*
 	 * The address is set on a per-device basis by fuses in the factory,
@@ -1509,5 +1509,5 @@ static struct spi_driver mcp3564_driver = {
 module_spi_driver(mcp3564_driver);
 
 MODULE_AUTHOR("Marius Cristea <[email protected]>");
-MODULE_DESCRIPTION("Microchip MCP346x/MCP346xR and MCP356x/MCP346xR ADCs");
+MODULE_DESCRIPTION("Microchip MCP346x/MCP346xR and MCP356x/MCP356xR ADCs");
 MODULE_LICENSE("GPL v2");

base-commit: 6543f376ec8aa90a6c1ed44b765f4f0d6c3eb1db