Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Frank Crawford <frank@crawford.emu.id.au>
Cc: Jean Delvare <jdelvare@suse.com>, linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v2 1/1] hwmon: (it87) Create DMI matching table for various board settings
Date: Sat, 29 Oct 2022 18:39:09 -0700	[thread overview]
Message-ID: <20221030013909.GA1264837@roeck-us.net> (raw)
In-Reply-To: <f802b322431a182c4bdf0f91cd4114fe381ebfe7.camel@crawford.emu.id.au>

On Sun, Oct 30, 2022 at 10:43:59AM +1100, Frank Crawford wrote:
> On Sat, 2022-10-29 at 07:04 -0700, Guenter Roeck wrote:
> > On 10/29/22 03:30, Frank Crawford wrote:
> > > Changes in this patch set:
> > > 
> > > * Define the DMI matching table for board specific settings during
> > > the
> > >    chip initialisation and move the only current board specific
> > > setting
> > >    to this new table.
> > > 
> > > * Export the table for use by udev.
> > > 
> > > v2: updates following comments:
> > > 
> > > * Converted to use callback function.
> > > 
> > > * Moved call to callback funtion to sio_data into it87_find in line
> > >    with other settings for sio_data.  This requires dmi_data also
> > > passed
> > >    to access additional data.
> > > 
> > 
> > That is really not what I meant when I asked to use a callback
> > function.
> > As written, the code might as well call that function directly from
> > the
> > init code, and there would be no reason to have a callback function
> > pointer.
> > 
> > A callback function would only make sense to me if it is added
> > to struct dmi_system_id, and called via dmi_check_system().
> > See other callers of dmi_check_system() for examples.
> 
> Oh, investigating other kernel code I see what you mean, and it does
> simplify one possible future update, but looking through the other
> modules in hwmon, I can't see any using a DMI callback.  The primary
> use of dmi_check_system() is just as a count of successful matches.
> 
> Also, just going back to a previous comment about creating a static
> version of sio_data and updating this in the callback, this does worry
> me going forward as in future I hope to add code to handle the case of
> multiple chips.  Updating the static version for one chip may cause
> issues with the other chips.
> 
The value is set based on DMI data. I don't see how that would make
a difference even if there are multiple chips. The DMI data would
still be the same and is board specific, not chip specific.

Guenter

  reply	other threads:[~2022-10-30  1:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-29 10:30 [PATCH v2 1/1] hwmon: (it87) Create DMI matching table for various board settings Frank Crawford
2022-10-29 14:04 ` Guenter Roeck
2022-10-29 23:43   ` Frank Crawford
2022-10-30  1:39     ` Guenter Roeck [this message]
2022-10-30  2:06       ` Frank Crawford
2022-10-30  3:28         ` Guenter Roeck
2022-10-31  3:18         ` Guenter Roeck
2022-10-31  6:56           ` Frank Crawford

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=20221030013909.GA1264837@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=frank@crawford.emu.id.au \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@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