From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 1/4] libsensors4: Support more bus types,
Date: Mon, 20 Aug 2007 12:19:02 +0000 [thread overview]
Message-ID: <20070820141902.634de608@hyperion.delvare> (raw)
In-Reply-To: <20070817171414.5a61ab6a@hyperion.delvare>
Hi Henrique,
On Mon, 20 Aug 2007 08:53:30 -0300, Henrique de Moraes Holschuh wrote:
> On Sun, 19 Aug 2007, Henrique de Moraes Holschuh wrote:
> > On Sun, 19 Aug 2007, Jean Delvare wrote:
> > > Basically, two changes: add a "name" attribute to the device, and give
> > > the platform device an instance number.
> > >
> > > The name attribute is needed and must be added to the thinkpad_acpi
> > > driver now, otherwise it won't work with libsensors (neither current nor
> > > libsensors4). This is where libsensors gets the "prefix" part of a
> > > chip name.
> >
> > I will bake up a patch and send it for inclusion in 2.6.23-rc ASAP. If Len
> > and Linus will take it (they should, it is an obviously safe thing that
> > affects one driver only...).
>
> Ok, I have one tentative patch ready, but I better make sure I got it right
> on the first try.
>
> First, is the "name" attribute documented anywhere? I may have to change
> its contents later, if I break up thinkpad-acpi into various modules. Does
> anything else other than libsensors4 uses it?
The name attribute is also used by libsensors3 and pwmconfig.
> To avoid changing the contents of the "name" attribute, I'd have to create a
> second platform device and dedicate it to hwmon (and name it
> "thinkpad-sensors"). This is NOT a problem, but I am unsure if such a
> change would be accepted in-tree this late in the game. I will probably try
> it anyway, at least it is future-proof. It is probably safer to defer
> thinkpad-acpi libsensors4 support to 2.6.24 if the change is not accepted
> for -rc4.
I would aim at 2.6.24. As you can see there are still a number of
things to be discussed, and there's no point in rushing a patch in
2.6.23 anyway, given that the stable version of libsensors still lacks
support for the thinkpad_acpi driver anyway.
> Second, the libsensors configuration for thinkpad-acpi depends on the
> thinkpad model. I *can* export its model to libsensors4 (I have that
> information), but how do I go about it?
Good question. Hans de Goede and myself had a heated discussion about
this some times ago about his abituguru3 driver. He finally decided to
let the driver export the labels to user-space (files are names
temp1_label, fan1_label etc...) because it was easier for him that way
in the case of the Abit µGuru. My own preference would be to handle it
in user-space: get the DMI data for the system, and download the right
configuration file for the given system. However it essentially depends
on whether the DMI data is OK to pick the right configuration file, or
not. If the configuration depends on bits encoded in the chip itself
(as is the case of the µGuru) then in-kernel labelling is probably
better. Ultimately, what we want is to lower the maintenance workload.
> See, that's why I'd really like BUS_HOST. Unlike ISA which has port
> numbers, or PCI, which has PCI-IDs, BUS_HOST is suitable to model and
> version numbers as a way to differentiate various devices.
ISA port numbers and PCI IDs are unrelated. It's more PCI device number
and function which relate to ISA port numbers, in that they uniquely
identify a device within the running system (PCI IDs do not.) This is
what we use the address for in libsensors: unique device identification
in the system, so that you can have different configurations for two
similar devices in a given system. This problem doesn't exist for
devices like thinkpad_acpi, which are unique by nature, so there's no
problem to solve as far as I can see.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2007-08-20 12:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-17 15:14 [lm-sensors] [PATCH 1/4] libsensors4: Support more bus types, part 1 Jean Delvare
2007-08-17 19:44 ` [lm-sensors] [PATCH 1/4] libsensors4: Support more bus types, Hans de Goede
2007-08-18 15:05 ` Jean Delvare
2007-08-18 21:07 ` Henrique de Moraes Holschuh
2007-08-19 15:02 ` Jean Delvare
2007-08-19 19:14 ` Henrique de Moraes Holschuh
2007-08-19 19:21 ` Henrique de Moraes Holschuh
2007-08-20 11:53 ` Henrique de Moraes Holschuh
2007-08-20 12:19 ` Jean Delvare [this message]
2007-08-20 12:46 ` Henrique de Moraes Holschuh
2007-08-20 13:50 ` Jean Delvare
2007-08-20 14:38 ` Jean Delvare
2007-08-20 17:49 ` Henrique de Moraes Holschuh
2007-08-20 17:53 ` Henrique de Moraes Holschuh
2007-08-21 8:02 ` Jean Delvare
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=20070820141902.634de608@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=lm-sensors@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 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.