All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
	Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: [lm-sensors] [PATCH v5] hwmon: (lm90) split set&show temp as common codes
Date: Sat, 22 Feb 2014 09:37:37 -0800	[thread overview]
Message-ID: <5308E061.6090305@roeck-us.net> (raw)
In-Reply-To: <20140222114735.38d36f4a-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>

On 02/22/2014 02:47 AM, Jean Delvare wrote:
> On Fri, 11 Oct 2013 09:17:41 +0200, Jean Delvare wrote:
>> On Tue, 8 Oct 2013 15:04:26 +0800, Wei Ni wrote:
>>> Split set&show temp codes as common functions, so we can use it
>>> directly when implement linux thermal framework.
>>> And handle error return value for the lm90_select_remote_channel
>>> and write_tempx, then set_temp8 and set_temp11 could return it
>>> to user-space.
>>>
>>> Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>> ---
>>>   drivers/hwmon/lm90.c |  166 ++++++++++++++++++++++++++++++++++----------------
>>>   1 file changed, 113 insertions(+), 53 deletions(-)
>>> (...)
>>
>> Applied with minor edits, thanks.
>
> Wei, what's the status? With Guenter's recent cleanup of the lm90
> driver, this patch no longer applies. I never sent it upstream as it
> makes no sense without users of the new functions defined by the patch.
> Will this ever happen?
>
> For now I am discarding this patch. If it still needed, please rebase
> on top of the current lm90 patch set:
> http://jdelvare.nerim.net/devel/linux-3/jdelvare-hwmon/
> and resend.
>

I am still dreaming of somehow coming up with a new hwmon api that would move
the sysfs ABI into the hwmon core and only provide raw read/write functions
in the drivers. iio manages to do that, after all, so we should be able to
do it as well. Unfortunately everything I tried or have seen so far ended up
making the code more complex, defeating the idea.

On the other side, if we have more and more of those dual-mode drivers,
it might make sense to put more thought into it. After all, if the drivers
have to provide the raw access functions anyway, it would be neat if we
can just pass those to the hwmon core (and possibly instantiate the thermal
device from there and not from each driver).

Guenter

WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <linux@roeck-us.net>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
	Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: [lm-sensors] [PATCH v5] hwmon: (lm90) split set&show temp as common codes
Date: Sat, 22 Feb 2014 17:37:37 +0000	[thread overview]
Message-ID: <5308E061.6090305@roeck-us.net> (raw)
In-Reply-To: <20140222114735.38d36f4a-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>

On 02/22/2014 02:47 AM, Jean Delvare wrote:
> On Fri, 11 Oct 2013 09:17:41 +0200, Jean Delvare wrote:
>> On Tue, 8 Oct 2013 15:04:26 +0800, Wei Ni wrote:
>>> Split set&show temp codes as common functions, so we can use it
>>> directly when implement linux thermal framework.
>>> And handle error return value for the lm90_select_remote_channel
>>> and write_tempx, then set_temp8 and set_temp11 could return it
>>> to user-space.
>>>
>>> Signed-off-by: Wei Ni <wni@nvidia.com>
>>> ---
>>>   drivers/hwmon/lm90.c |  166 ++++++++++++++++++++++++++++++++++----------------
>>>   1 file changed, 113 insertions(+), 53 deletions(-)
>>> (...)
>>
>> Applied with minor edits, thanks.
>
> Wei, what's the status? With Guenter's recent cleanup of the lm90
> driver, this patch no longer applies. I never sent it upstream as it
> makes no sense without users of the new functions defined by the patch.
> Will this ever happen?
>
> For now I am discarding this patch. If it still needed, please rebase
> on top of the current lm90 patch set:
> http://jdelvare.nerim.net/devel/linux-3/jdelvare-hwmon/
> and resend.
>

I am still dreaming of somehow coming up with a new hwmon api that would move
the sysfs ABI into the hwmon core and only provide raw read/write functions
in the drivers. iio manages to do that, after all, so we should be able to
do it as well. Unfortunately everything I tried or have seen so far ended up
making the code more complex, defeating the idea.

On the other side, if we have more and more of those dual-mode drivers,
it might make sense to put more thought into it. After all, if the drivers
have to provide the raw access functions anyway, it would be neat if we
can just pass those to the hwmon core (and possibly instantiate the thermal
device from there and not from each driver).

Guenter


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  parent reply	other threads:[~2014-02-22 17:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-08  7:04 [PATCH v5] hwmon: (lm90) split set&show temp as common codes Wei Ni
2013-10-08  7:04 ` [lm-sensors] " Wei Ni
     [not found] ` <1381215866-20608-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-10-08  7:10   ` Wei Ni
2013-10-08  7:10     ` [lm-sensors] " Wei Ni
2013-10-11  7:17   ` Jean Delvare
2013-10-11  7:17     ` [lm-sensors] " Jean Delvare
     [not found]     ` <20131011091741.59cdaf31-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2014-02-22 10:47       ` Jean Delvare
2014-02-22 10:47         ` Jean Delvare
     [not found]         ` <20140222114735.38d36f4a-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2014-02-22 17:37           ` Guenter Roeck [this message]
2014-02-22 17:37             ` Guenter Roeck
2014-02-24  8:07           ` Wei Ni
2014-02-24  8:07             ` Wei Ni
2015-04-21 10:19       ` Wei Ni
2015-04-21 10:19         ` [lm-sensors] " Wei Ni
2015-04-22  1:57       ` Wei Ni
2015-04-22  1:57         ` [lm-sensors] " Wei Ni

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=5308E061.6090305@roeck-us.net \
    --to=linux-0h96xk9xttrk1umjsbkqmq@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
    --cc=wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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.