mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Matwey V. Kornilov" <matwey@sai.msu.ru>,
	Jean Delvare <jdelvare@suse.com>,
	Rob Herring <robh+dt@kernel.org>,
	"open list:HARDWARE MONITORING" <linux-hwmon@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 2/4] hwmon: lm75: Add nxp,lm75a to of_match list
Date: Sat, 6 Feb 2021 08:54:52 -0800	[thread overview]
Message-ID: <358d0b0d-6a2d-7e7f-1962-7af3fa939f8a@roeck-us.net> (raw)
In-Reply-To: <cea0ffc3-9fd9-28b1-95f3-b6bee96137fc@roeck-us.net>

On 2/6/21 8:48 AM, Guenter Roeck wrote:
> On 2/6/21 1:51 AM, Matwey V. Kornilov wrote:
>> NXP LM75A is compatible with original LM75A while it has improved
>> 11-bit precision.
>>
>> https://www.nxp.com/docs/en/data-sheet/LM75A.pdf
>>
>> Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
>> ---
>>  Documentation/devicetree/bindings/hwmon/lm75.yaml |  1 +
>>  drivers/hwmon/lm75.c                              | 11 +++++++++++
>>  2 files changed, 12 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/hwmon/lm75.yaml b/Documentation/devicetree/bindings/hwmon/lm75.yaml
>> index aec8edd1e0c6..8c3848f4c277 100644
>> --- a/Documentation/devicetree/bindings/hwmon/lm75.yaml
>> +++ b/Documentation/devicetree/bindings/hwmon/lm75.yaml
>> @@ -22,6 +22,7 @@ properties:
>>        - national,lm75
>>        - national,lm75a
>>        - national,lm75b
>> +      - nxp,lm75a

We'll also need nxp,lm75b because that is distinctly different to
national,lm75b / ti,lm75b. Also, we'll need to fix the entry for
those to reflect that the sensor resolution is only 9 bit, not
11 bit as currently claimed.

Thanks,
Guenter

>>        - maxim,max6625
>>        - maxim,max6626
>>        - maxim,max31725
>> diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
>> index 08cde1c446db..9c54c7d86771 100644
>> --- a/drivers/hwmon/lm75.c
>> +++ b/drivers/hwmon/lm75.c
>> @@ -33,6 +33,7 @@ enum lm75_type {		/* keep sorted in alphabetical order */
>>  	lm75,
>>  	lm75a,
>>  	lm75b,
>> +	nxp_lm75,
> 
> Please make this lm75a_nxp for improved alphabetical alignment
> and to reflect that it is LM75A.
> 
>>  	max6625,
>>  	max6626,
>>  	max31725,
>> @@ -182,6 +183,11 @@ static const struct lm75_params device_params[] = {
>>  		.default_resolution = 11,
>>  		.default_sample_time = MSEC_PER_SEC / 10,
>>  	},
>> +	[nxp_lm75] = {
>> +		.default_resolution = 11,
>> +		.default_sample_time = MSEC_PER_SEC / 10,
>> +		.resolution_limits = 9,
>> +	},
>>  	[max6625] = {
>>  		.default_resolution = 9,
>>  		.default_sample_time = MSEC_PER_SEC / 7,
>> @@ -644,6 +650,7 @@ static const struct i2c_device_id lm75_ids[] = {
>>  	{ "lm75", lm75, },
>>  	{ "lm75a", lm75a, },
>>  	{ "lm75b", lm75b, },
>> +	{ "nxp_lm75a", nxp_lm75, },
>>  	{ "max6625", max6625, },
>>  	{ "max6626", max6626, },
>>  	{ "max31725", max31725, },
>> @@ -703,6 +710,10 @@ static const struct of_device_id __maybe_unused lm75_of_match[] = {
>>  		.compatible = "national,lm75b",
>>  		.data = (void *)lm75b
>>  	},
>> +	{
>> +		.compatible = "nxp,lm75a",
>> +		.data = (void *)nxp_lm75
>> +	},
>>  	{
>>  		.compatible = "maxim,max6625",
>>  		.data = (void *)max6625
>>
> 


  reply	other threads:[~2021-02-06 16:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-30 10:38 [PATCH 1/2] hwmon: lm75: Add NXP LM75A " Matwey V. Kornilov
2021-01-30 10:38 ` [PATCH 2/2] hwmon: lm75: Add another name for NXP LM75B " Matwey V. Kornilov
2021-01-30 15:41 ` [PATCH 1/2] hwmon: lm75: Add NXP LM75A " Guenter Roeck
     [not found]   ` <CAJs94EbBAK1LAZt4pfbzbUCxJtRo8kTAxdaN=y_gRbuvX0rz8Q@mail.gmail.com>
2021-02-03 19:57     ` Guenter Roeck
2021-02-06  9:51       ` [PATCH v4 0/4] hwmon: lm75: Handle broken device nodes gracefully Matwey V. Kornilov
2021-02-06  9:51         ` [PATCH v4 1/4] hwmon: lm75: Add lm75 to of_match list Matwey V. Kornilov
2021-02-06 16:46           ` Guenter Roeck
2021-02-10 19:47             ` Rob Herring
2021-02-06  9:51         ` [PATCH v4 2/4] hwmon: lm75: Add nxp,lm75a " Matwey V. Kornilov
2021-02-06 16:48           ` Guenter Roeck
2021-02-06 16:54             ` Guenter Roeck [this message]
2021-02-06  9:51         ` [PATCH v4 3/4] hwmon: lm75: Add ti,lm75 " Matwey V. Kornilov
2021-02-06 16:54           ` Guenter Roeck
2021-02-06  9:51         ` [PATCH v4 4/4] hwmon: lm75: Handle broken device nodes gracefully Matwey V. Kornilov

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=358d0b0d-6a2d-7e7f-1962-7af3fa939f8a@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matwey@sai.msu.ru \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®