From: Guenter Roeck <linux@roeck-us.net>
To: Alison Schofield <amsfield22@gmail.com>
Cc: Jean Delvare <jdelvare@suse.com>,
"open list:JC42.4 TEMPERATURE SENSOR DRIVER"
<linux-hwmon@vger.kernel.org>,
linux-kernel@vger.kernel.org, daniel.baluta@gmail.com
Subject: Re: [RFC PATCH] hwmon: (jc42) Add I2C_CLASS_HWMON to detection class
Date: Mon, 4 Jul 2016 16:27:07 -0700 [thread overview]
Message-ID: <577AF0CB.9020807@roeck-us.net> (raw)
In-Reply-To: <20160704230414.GA10368@d830.WORKGROUP>
On 07/04/2016 04:04 PM, Alison Schofield wrote:
> On Mon, Jul 04, 2016 at 02:04:34PM -0700, Guenter Roeck wrote:
>> On 07/04/2016 12:19 PM, Alison Schofield wrote:
>>> In 2011, commit 774466add7c810fd7e4c8bcf41995b6799608880 changed
>>> the detection class of these chips to I2C_CLASS_SPD based on this
>>> premise: "makes more sense because these chips always live on
>>> memory modules"
>>>
>>> Today these chips have applications beyond memory modules.
>>>
>>
>> Do you have a specific example ?
> The mcp9808 is popular among hobbyists and makers in projects that
> monitor everything from their fish pond to their wine cellar. Beyond
> that I'm just referring to Microchips datasheet and marketing words
> saying that they target it for a wide range of apps beyond memory
> devices. I guess the chance of one of them trying to use it, with a
> Linux driver, and caring about auto detect are pretty slim.
>
A better example would be the MCP9085, which is officially JC42.4 compliant
but also suggested for use as general purpose temperature sensor in its
datasheet.
I'll add your patch to -next.
Thanks,
Guenter
> As you've guessed, I changed the Diolan for my purposes. I just found
> it odd that jc42 was the only driver in hwmon, without I2C_CLASS_HWMON,
> so I thought it was worth a look and rethink.
>
> So, no, nothing broken, nothing suspected incompatible.
>
> alisons
>
>
>>
>>> Add I2C_CLASS_HWMON as an additional detection class to allow
>>> detection by hwmon class i2c adapters.
>>>
>>
>> Practical impact should be limited, though. Most adapters have both
>> I2C_CLASS_HWMON and I2C_CLASS_SPD flags set. Besides the Diolan adapters,
>> which are experimental in nature anyway (and where it actually might make
>> sense to add I2C_CLASS_SPD), do you have an example where a JC-42 compatible
>> chip is used with an adapter which does not have I2C_CLASS_SPD set in
>> its flags ?
>>
>>> Alternative is to replace the SPD w HWMON class, but that carries
>>> risk for existing usage.
>>>
>> Yes, the driver would stop working on adapters which only have I2C_CLASS_SPD
>> set. There are only two of those, but those two presumably _do_ have memory
>> modules connected.
>>
>> Guenter
>>
>>> Signed-off-by: Alison Schofield <amsfield22@gmail.com>
>>> Cc: Daniel Baluta <daniel.baluta@gmail.com>
>>> ---
>>> drivers/hwmon/jc42.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c
>>> index 9887d32..1537ba0 100644
>>> --- a/drivers/hwmon/jc42.c
>>> +++ b/drivers/hwmon/jc42.c
>>> @@ -538,7 +538,7 @@ static const struct i2c_device_id jc42_id[] = {
>>> MODULE_DEVICE_TABLE(i2c, jc42_id);
>>>
>>> static struct i2c_driver jc42_driver = {
>>> - .class = I2C_CLASS_SPD,
>>> + .class = I2C_CLASS_SPD | I2C_CLASS_HWMON,
>>> .driver = {
>>> .name = "jc42",
>>> .pm = JC42_DEV_PM_OPS,
>>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2016-07-04 23:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-04 19:19 [RFC PATCH] hwmon: (jc42) Add I2C_CLASS_HWMON to detection class Alison Schofield
2016-07-04 21:04 ` Guenter Roeck
2016-07-04 23:04 ` Alison Schofield
2016-07-04 23:27 ` Guenter Roeck [this message]
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=577AF0CB.9020807@roeck-us.net \
--to=linux@roeck-us.net \
--cc=amsfield22@gmail.com \
--cc=daniel.baluta@gmail.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.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