All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Daniel Matyas <daniel.matyas@analog.com>
Cc: Jean Delvare <jdelvare@suse.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH 3/3] hwmon: max31827: Compatible for adaq4224
Date: Thu, 14 Dec 2023 07:14:18 -0800	[thread overview]
Message-ID: <937db277-1d3d-459a-a597-475bdc0229fe@roeck-us.net> (raw)
In-Reply-To: <20231214143648.175336-3-daniel.matyas@analog.com>

On 12/14/23 06:36, Daniel Matyas wrote:
> Compatible string "adi,adaq4224_temp" is accepted in device tree.
> When this string is seen in the device tree, the name of the device
> changes to "adaq4224_temp" and the default configuration of max31827
> is loaded.
> 
> This modification was requested by the costumer, so that whenever one

customer

> analyzes the available devices, one can know for sure, that max31827 is
> part of the adaq4224.
> 

There is (officially) no such chip. I have no idea if this is a new chip
or something else, and I have no idea how it relates to max31827.
Either case, the "_temp" in the chip name doesn't make sense to me.

> Signed-off-by: Daniel Matyas <daniel.matyas@analog.com>
> ---
>   drivers/hwmon/max31827.c | 12 +++++++++++-
>   1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/max31827.c b/drivers/hwmon/max31827.c
> index db93492193bd..c3500a5b2c29 100644
> --- a/drivers/hwmon/max31827.c
> +++ b/drivers/hwmon/max31827.c
> @@ -48,7 +48,7 @@
>   #define MAX31827_M_DGR_TO_16_BIT(x)	(((x) << 4) / 1000)
>   #define MAX31827_DEVICE_ENABLE(x)	((x) ? 0xA : 0x0)
>   
> -enum chips { max31827 = 1, max31828, max31829 };
> +enum chips { max31827 = 1, max31828, max31829, adaq4224_temp };
>   
>   enum max31827_cnv {
>   	MAX31827_CNV_1_DIV_64_HZ = 1,
> @@ -592,6 +592,7 @@ static const struct i2c_device_id max31827_i2c_ids[] = {
>   	{ "max31827", max31827 },
>   	{ "max31828", max31828 },
>   	{ "max31829", max31829 },
> +	{ "adaq4224_temp", adaq4224_temp },
>   	{ }
>   };
>   MODULE_DEVICE_TABLE(i2c, max31827_i2c_ids);
> @@ -620,6 +621,9 @@ static int max31827_init_client(struct max31827_state *st)
>   	res |= FIELD_PREP(MAX31827_CONFIGURATION_TIMEOUT_MASK, !prop);
>   
>   	type = (enum chips)(uintptr_t)device_get_match_data(dev);
> +	if (type == adaq4224_temp) {
> +		dev->driver->name = "adaq4224_temp";
> +	}
>   

No, sorry, we don't make such changes. The driver has a fixed name
which is independent of the device connected to it.

Guenter


  reply	other threads:[~2023-12-14 15:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 14:36 [PATCH 1/3] hwmon: max31827: Add PEC support Daniel Matyas
2023-12-14 14:36 ` Daniel Matyas
2023-12-14 14:36 ` [PATCH 2/3] bindings: hwmon: Add adi,adaq4224_temp as compatible string Daniel Matyas
2023-12-14 14:36   ` Daniel Matyas
2023-12-14 15:15   ` Guenter Roeck
2023-12-14 15:39     ` Conor Dooley
2023-12-15  8:49   ` Krzysztof Kozlowski
2023-12-15 16:03     ` Guenter Roeck
2023-12-18  9:08       ` Matyas, Daniel
2023-12-18 17:22         ` Guenter Roeck
2023-12-19 16:47           ` Conor Dooley
2023-12-14 14:36 ` [PATCH 3/3] hwmon: max31827: Compatible for adaq4224 Daniel Matyas
2023-12-14 14:36   ` Daniel Matyas
2023-12-14 15:14   ` Guenter Roeck [this message]
2023-12-14 16:10 ` [PATCH 1/3] hwmon: max31827: Add PEC support Guenter Roeck
2023-12-15 20:28   ` Matyas, Daniel
2023-12-16  1:32     ` Guenter Roeck
2023-12-18  9:12       ` Matyas, Daniel
2023-12-18 16:18         ` Guenter Roeck
2023-12-18 14:55   ` Matyas, Daniel
2023-12-18 16:26     ` Guenter Roeck
     [not found]       ` <PH0PR03MB6771CF6A95CB576E534C225F8990A@PH0PR03MB6771.namprd03.prod.outlook.com>
2023-12-18 19:01         ` Guenter Roeck
2023-12-20  1:49           ` Matyas, Daniel
2024-01-08 17:42             ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=937db277-1d3d-459a-a597-475bdc0229fe@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=daniel.matyas@analog.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.