From: Martin Peres <martin.peres@free.fr>
To: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: nouveau <Nouveau@lists.freedesktop.org>,
"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>
Subject: Re: [lm-sensors] hwmon API update
Date: Sun, 13 Feb 2011 20:00:16 +0000 [thread overview]
Message-ID: <4D583850.1050806@free.fr> (raw)
In-Reply-To: <20110213171640.GB13323@ericsson.com>
Le 13/02/2011 18:16, Guenter Roeck a écrit :
> On Sun, Feb 13, 2011 at 07:18:44AM -0500, Martin Peres wrote:
>> Hi,
>>
>> I am working on power management on the nouveau driver and I need a way
>> to get data out of and send commands to the i2c drivers from the kernel
>> space.
>>
>> We can already change the clocks of the card, but we need a way to
>> monitor the temperature and bump the fan speed if needed.
>> Another problem with letting users mess with the i2c driver by
>> themselves is that some cards use the i2c driver for fan management
>> while others don't. This is why I would like to introduce nouveau as an
>> hwmon driver, exporting the temperature, fan management and clock speeds
>> so as we can use the thermal zone to monitor the temperature and react
>> when needed.
>>
>> So far, we use:
>> - w83l785ts
>> - w83781d
>> - adt7473 (most common one)
>> - f75375
>> - lm99
>>
>> With the help of Matthew Garret, I updated his previous proposal for an
>> in-kernel API for hwmon. The patch should apply cleanly on Linux
>> 2.6.38-rc4. This patch only provides the API, no modification to the
>> drivers has been completed yet.
>>
>> Looking forward to your review and feedback.
>>
>> Martin
>> From 059b647b7b8bd98c04cf48b4062048b8ae963593 Mon Sep 17 00:00:00 2001
>> From: Martin Peres<martin.peres@ensi-bourges.fr>
>> Date: Sun, 13 Feb 2011 11:35:17 +0100
>> Subject: [PATCH] hwmon API update
>>
>> Original creator: Matthew Garrett<mjg@redhat.com>
>>
>> Signed-off-by: Martin Peres<martin.peres@ensi-bourges.fr>
> This is an extremely complex change just for the benefit of one driver,
> with a huge potential of misuse. The changes required in each driver
> to actually implement the API are substantial, and pretty much only add
> complexity to each hwmon driver with no real benefit.
>
> The cost gets even larger if one has to consider that some may want or
> have to to backport drivers to earlier kernel versions. This patchset
> would result in significant efforts to do such backports.
>
> For the API itself, there are lots of functions with similar parameters,
> and those parameters are needed in the drivers to determine which attribute
> is affected. A single function would have accomplished the same, as the drivers
> will need case statements anyway to identify the actual attribute to be read
> or written. What we end up here with is a large number of functions to be
> supported by each driver, all with pretty much the same set of arguments.
>
> I don't know what current thinking is about kernel size increases, but it
> looks like this patch will result in quite significant kernel size increase
> (some 18*8 = 144 bytes per driver for all the pointers, plus the actual
> functions, adds up to a lot). Again this would be with no benefit for most
> of the users of the hwmon subsystem. Sure, one can argue that the size increases
> will only occur if the drivers are actually loaded, but that is a pretty weak
> argument since the code size increase will still show up in each driver.
>
> In summary I am not in favor for this change. Maybe Jean thinks differently,
> but for my part I don't plan to approve it.
>
> Guenter
Actually, it is not completely true. This API isn't mandatory for the
drivers to implement. We could only modify the drivers we need in
nouveau and leave the others untouched but this is only good for as a
transition from the sysfs-only interface to the new interface.
I agree that changing hwmon in the way we are asking is a big change in
philosophy, but what are you suggesting? We can't just re-implement the
needed i2c drivers in nouveau and the only way we can access the already
existing i2c drivers is through sysfs.
The real question is why hwmon only is targeted for the userland?
Another question is, why is the actual code of the drivers buried so
deep inside the implementation details of the sysfs interface (this is
what makes it so painful to update)?
Actually, this proposal could save space as once this interface is
adopted by some drivers, all the sysfs-related code could be shared in
hwmon.c.
Another proposal could be to access the drivers through sysfs, but I
don't know if it is possible and I think it would be abusing the sysfs
interface anyway.
I think you now understand our situation a bit better, do you have any
suggestion? I really wish to find an agreement on this as not sharing
the code is not an option for me.
Martin
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
WARNING: multiple messages have this Message-ID (diff)
From: Martin Peres <martin.peres@free.fr>
To: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: nouveau <Nouveau@lists.freedesktop.org>,
"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>
Subject: Re: hwmon API update
Date: Sun, 13 Feb 2011 21:00:16 +0100 [thread overview]
Message-ID: <4D583850.1050806@free.fr> (raw)
In-Reply-To: <20110213171640.GB13323@ericsson.com>
Le 13/02/2011 18:16, Guenter Roeck a écrit :
> On Sun, Feb 13, 2011 at 07:18:44AM -0500, Martin Peres wrote:
>> Hi,
>>
>> I am working on power management on the nouveau driver and I need a way
>> to get data out of and send commands to the i2c drivers from the kernel
>> space.
>>
>> We can already change the clocks of the card, but we need a way to
>> monitor the temperature and bump the fan speed if needed.
>> Another problem with letting users mess with the i2c driver by
>> themselves is that some cards use the i2c driver for fan management
>> while others don't. This is why I would like to introduce nouveau as an
>> hwmon driver, exporting the temperature, fan management and clock speeds
>> so as we can use the thermal zone to monitor the temperature and react
>> when needed.
>>
>> So far, we use:
>> - w83l785ts
>> - w83781d
>> - adt7473 (most common one)
>> - f75375
>> - lm99
>>
>> With the help of Matthew Garret, I updated his previous proposal for an
>> in-kernel API for hwmon. The patch should apply cleanly on Linux
>> 2.6.38-rc4. This patch only provides the API, no modification to the
>> drivers has been completed yet.
>>
>> Looking forward to your review and feedback.
>>
>> Martin
>> From 059b647b7b8bd98c04cf48b4062048b8ae963593 Mon Sep 17 00:00:00 2001
>> From: Martin Peres<martin.peres@ensi-bourges.fr>
>> Date: Sun, 13 Feb 2011 11:35:17 +0100
>> Subject: [PATCH] hwmon API update
>>
>> Original creator: Matthew Garrett<mjg@redhat.com>
>>
>> Signed-off-by: Martin Peres<martin.peres@ensi-bourges.fr>
> This is an extremely complex change just for the benefit of one driver,
> with a huge potential of misuse. The changes required in each driver
> to actually implement the API are substantial, and pretty much only add
> complexity to each hwmon driver with no real benefit.
>
> The cost gets even larger if one has to consider that some may want or
> have to to backport drivers to earlier kernel versions. This patchset
> would result in significant efforts to do such backports.
>
> For the API itself, there are lots of functions with similar parameters,
> and those parameters are needed in the drivers to determine which attribute
> is affected. A single function would have accomplished the same, as the drivers
> will need case statements anyway to identify the actual attribute to be read
> or written. What we end up here with is a large number of functions to be
> supported by each driver, all with pretty much the same set of arguments.
>
> I don't know what current thinking is about kernel size increases, but it
> looks like this patch will result in quite significant kernel size increase
> (some 18*8 = 144 bytes per driver for all the pointers, plus the actual
> functions, adds up to a lot). Again this would be with no benefit for most
> of the users of the hwmon subsystem. Sure, one can argue that the size increases
> will only occur if the drivers are actually loaded, but that is a pretty weak
> argument since the code size increase will still show up in each driver.
>
> In summary I am not in favor for this change. Maybe Jean thinks differently,
> but for my part I don't plan to approve it.
>
> Guenter
Actually, it is not completely true. This API isn't mandatory for the
drivers to implement. We could only modify the drivers we need in
nouveau and leave the others untouched but this is only good for as a
transition from the sysfs-only interface to the new interface.
I agree that changing hwmon in the way we are asking is a big change in
philosophy, but what are you suggesting? We can't just re-implement the
needed i2c drivers in nouveau and the only way we can access the already
existing i2c drivers is through sysfs.
The real question is why hwmon only is targeted for the userland?
Another question is, why is the actual code of the drivers buried so
deep inside the implementation details of the sysfs interface (this is
what makes it so painful to update)?
Actually, this proposal could save space as once this interface is
adopted by some drivers, all the sysfs-related code could be shared in
hwmon.c.
Another proposal could be to access the drivers through sysfs, but I
don't know if it is possible and I think it would be abusing the sysfs
interface anyway.
I think you now understand our situation a bit better, do you have any
suggestion? I really wish to find an agreement on this as not sharing
the code is not an option for me.
Martin
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2011-02-13 20:00 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-13 12:18 [lm-sensors] hwmon API update Martin Peres
2011-02-13 12:18 ` Martin Peres
2011-02-13 17:16 ` [lm-sensors] " Guenter Roeck
2011-02-13 17:16 ` Guenter Roeck
2011-02-13 20:00 ` Martin Peres [this message]
2011-02-13 20:00 ` Martin Peres
2011-02-13 22:08 ` [lm-sensors] " Jean Delvare
2011-02-13 22:08 ` Jean Delvare
[not found] ` <20110213230833.0ee2ff16-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-03-03 9:36 ` [lm-sensors] [Nouveau] " Dave Airlie
2011-03-03 9:36 ` [lm-sensors] " Dave Airlie
[not found] ` <AANLkTindG=m4FhNS202MH8YVBUCoDEADTQLxo-Bf_8qx-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-03 13:09 ` [lm-sensors] [Nouveau] " Martin Peres
2011-03-03 13:09 ` [lm-sensors] " Martin Peres
2011-03-03 15:22 ` [lm-sensors] [Nouveau] " Guenter Roeck
2011-03-03 15:22 ` Guenter Roeck
[not found] ` <20110303152216.GA21667-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
2011-03-03 17:29 ` [lm-sensors] " Martin Peres
2011-03-03 17:29 ` [lm-sensors] " Martin Peres
[not found] ` <4D6FCFF2.7040604-GANU6spQydw@public.gmane.org>
2011-03-03 20:48 ` [lm-sensors] [Nouveau] " Lucas Stach
2011-03-03 20:48 ` [lm-sensors] " Lucas Stach
2011-03-03 21:19 ` [lm-sensors] [Nouveau] " Guenter Roeck
2011-03-03 21:19 ` Guenter Roeck
2011-03-03 21:56 ` [lm-sensors] " Lucas Stach
2011-03-03 21:56 ` [lm-sensors] " Lucas Stach
2011-03-03 22:03 ` [lm-sensors] [Nouveau] " Guenter Roeck
2011-03-03 22:03 ` [lm-sensors] " Guenter Roeck
2011-03-03 23:53 ` [lm-sensors] [Nouveau] " Martin Peres
2011-03-03 23:53 ` [lm-sensors] " Martin Peres
[not found] ` <4D7029E8.4040706-GANU6spQydw@public.gmane.org>
2011-03-04 0:59 ` [lm-sensors] [Nouveau] " Guenter Roeck
2011-03-04 0:59 ` [lm-sensors] " Guenter Roeck
[not found] ` <20110304005900.GB31318-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
2011-03-04 8:36 ` [lm-sensors] [Nouveau] " Martin Peres
2011-03-04 8:36 ` [lm-sensors] " Martin Peres
2011-02-14 16:23 ` Matthew Garrett
2011-02-14 18:19 ` Guenter Roeck
2011-02-14 18:22 ` Matthew Garrett
2011-02-14 19:01 ` Guenter Roeck
2011-02-14 19:05 ` Matthew Garrett
2011-02-14 19:33 ` Guenter Roeck
2011-02-14 19:40 ` Matthew Garrett
2011-02-14 21:25 ` Guenter Roeck
2011-02-14 21:29 ` Matthew Garrett
2011-02-15 21:50 ` Jean Delvare
2011-02-15 22:07 ` Jean Delvare
2011-02-15 22:23 ` Guenter Roeck
2011-02-28 17:50 ` Lucas Stach
2011-02-28 18:42 ` Guenter Roeck
2011-02-28 23:24 ` Lucas Stach
2011-10-10 22:29 ` Kristen Eisenberg
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=4D583850.1050806@free.fr \
--to=martin.peres@free.fr \
--cc=Nouveau@lists.freedesktop.org \
--cc=guenter.roeck@ericsson.com \
--cc=lm-sensors@lm-sensors.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.