Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1436644
| Path | csiph.com!xmission!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Alison Schofield <amsfield22@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH] hwmon: (jc42) Add I2C_CLASS_HWMON to detection class |
| Date | Tue, 05 Jul 2016 01:10:02 +0200 |
| Message-ID | <rRla2-3od-27@gated-at.bofh.it> (permalink) |
| References | <rRhzr-14o-3@gated-at.bofh.it> <rRjhU-2dZ-11@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7S608wBanNrf4A9nH+VvYQUTf/gMHZTB8mmiso1bXKI=; b=NwAx0FzeR3lSqaWMOrbRXvXdpDVNjVAecwobZ7BvmneZOIR1vbC0IugazRJh6Yhdi7 ZYTVOBZza+a5K1KZbTpF67xmMw79rkqv3BfECIcdLrd5O9SpXZ6oCXdjm0nDswHSXBM5 OWNoy+yojNOhawrDCW2UP4VGSTUoZ7q0ELlqbPSbvKIrX8Mt6txlEmmPrXmZ3UbWe6nT SJ5IGfl1dDDNMhlQeg6oiGbYQqr4UXb71DAV/eajQsagm+k+9Raw5YHn9dd8+YRmJKx6 iFpgFHaVINWpAg0gYMq/M1Xupmfm8fgbgfvB3tIp8rGc5K7V31vrPgwya5Zq6b33jteF OxTg== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7S608wBanNrf4A9nH+VvYQUTf/gMHZTB8mmiso1bXKI=; b=Ag3KdDuoYFPf/h8ibfJrJ5PmGSnAOWKU0PvkRI0h3t1D51W2cIvK0OCJ7HkSfOXoZ1 r4qvQYOoZDpMSXMVhcCtsVDjPih8Dn+9MRrZvGDjLHmjcPxlB2lAh6bW0uQJTam5kd3l e3pKVUteK5dI6Q46WLnwlf7tB9DuC/wQDHcN044Cq6VeBAIdMA+WPZZ8RVCVsF93QQEu zJ7eiHVxjrXlq40tlIl/eiscNt13BjuAAcdU919MZFp8woOx4E9z2MshncCpRTZ74PvW wdrHpR70aYfsrMtEYT7l7HoPrLqSnqpTFQHRU4tX0n0Jeh+GF/26bLbEbkiSmEDk/4t+ Twgw== |
| X-Gm-Message-State | ALyK8tKKdrl2xcnYdhMGYJyd+7t0aiHzlA8ysnTX7cmere0vdsumAghTDHqbZaZozpelBg== |
| X-Received | by 10.37.124.194 with SMTP id x185mr8349533ybc.147.1467673459683; Mon, 04 Jul 2016 16:04:19 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 69 |
| Organization | linux.* mail to news gateway |
| X-Original-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 |
| X-Original-Date | Mon, 4 Jul 2016 16:04:15 -0700 |
| X-Original-Message-ID | <20160704230414.GA10368@d830.WORKGROUP> |
| X-Original-References | <20160704191908.GA9056@d830.WORKGROUP> <577ACF62.9030109@roeck-us.net> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1436644 |
Show key headers only | View raw
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.
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,
> >
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH] hwmon: (jc42) Add I2C_CLASS_HWMON to detection class Alison Schofield <amsfield22@gmail.com> - 2016-07-04 21:20 +0200
Re: [RFC PATCH] hwmon: (jc42) Add I2C_CLASS_HWMON to detection class Guenter Roeck <linux@roeck-us.net> - 2016-07-04 23:10 +0200
Re: [RFC PATCH] hwmon: (jc42) Add I2C_CLASS_HWMON to detection class Alison Schofield <amsfield22@gmail.com> - 2016-07-05 01:10 +0200
Re: [RFC PATCH] hwmon: (jc42) Add I2C_CLASS_HWMON to detection class Guenter Roeck <linux@roeck-us.net> - 2016-07-05 01:30 +0200
csiph-web