linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* acpi-als taking over from hwmon for light sensor support?
@ 2016-11-23 17:21 Bastien Nocera
  2016-11-23 17:38 ` Jean Delvare
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien Nocera @ 2016-11-23 17:21 UTC (permalink / raw)
  To: linux-iio, Jean Delvare, linux-hwmon

Hey,

I did some work on iio-sensor-proxy[1] those past couple of days, and
tested it on a MacBook Pro.

Before that, I had written a (user-space) driver to access the hwmon
driver's "light" value, so I was a bit surprised when I saw that iio-
sensor-proxy was accessing the light sensor through acpi-als's IIO
driver instead of through the hwmon driver.

I looked through the hwmon, iio and applesmc.c logs, and couldn't find
any information about how the move from one to the other. Does anyone
know?

I'm asking because the applesmc.c hwmon driver is the only one with
support for the "light" property, and if that's not used anymore, I
might as well remove that code now (or schedule to remove it).

Cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: acpi-als taking over from hwmon for light sensor support?
  2016-11-23 17:21 acpi-als taking over from hwmon for light sensor support? Bastien Nocera
@ 2016-11-23 17:38 ` Jean Delvare
  2016-11-23 21:07   ` Bastien Nocera
  0 siblings, 1 reply; 5+ messages in thread
From: Jean Delvare @ 2016-11-23 17:38 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: linux-iio, linux-hwmon

On mer., 2016-11-23 at 18:21 +0100, Bastien Nocera wrote:
> Hey,
> 
> I did some work on iio-sensor-proxy[1] those past couple of days, and
> tested it on a MacBook Pro.
> 
> Before that, I had written a (user-space) driver to access the hwmon
> driver's "light" value, so I was a bit surprised when I saw that iio-
> sensor-proxy was accessing the light sensor through acpi-als's IIO
> driver instead of through the hwmon driver.
> 
> I looked through the hwmon, iio and applesmc.c logs, and couldn't find
> any information about how the move from one to the other. Does anyone
> know?
> 
> I'm asking because the applesmc.c hwmon driver is the only one with
> support for the "light" property, and if that's not used anymore, I
> might as well remove that code now (or schedule to remove it).

Light sensors are out of scope of hwmon, they have nothing to do with
hardware monitoring.

-- 
Jean Delvare
SUSE L3 Support


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: acpi-als taking over from hwmon for light sensor support?
  2016-11-23 17:38 ` Jean Delvare
@ 2016-11-23 21:07   ` Bastien Nocera
  2016-11-23 21:32     ` Guenter Roeck
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien Nocera @ 2016-11-23 21:07 UTC (permalink / raw)
  To: Jean Delvare; +Cc: linux-iio, linux-hwmon

On Wed, 2016-11-23 at 18:38 +0100, Jean Delvare wrote:
> On mer., 2016-11-23 at 18:21 +0100, Bastien Nocera wrote:
> > Hey,
> > 
> > I did some work on iio-sensor-proxy[1] those past couple of days,
> > and
> > tested it on a MacBook Pro.
> > 
> > Before that, I had written a (user-space) driver to access the
> > hwmon
> > driver's "light" value, so I was a bit surprised when I saw that
> > iio-
> > sensor-proxy was accessing the light sensor through acpi-als's IIO
> > driver instead of through the hwmon driver.
> > 
> > I looked through the hwmon, iio and applesmc.c logs, and couldn't
> > find
> > any information about how the move from one to the other. Does
> > anyone
> > know?
> > 
> > I'm asking because the applesmc.c hwmon driver is the only one with
> > support for the "light" property, and if that's not used anymore, I
> > might as well remove that code now (or schedule to remove it).
> 
> Light sensors are out of scope of hwmon, they have nothing to do with
> hardware monitoring.

Why is there still code in applesmc.c to handle the "light" sysfs
property then?

Also, this doesn't answer my question as to when this switch happened.
I don't care one way or the other, but knowing when the switch was made
can allow me to prepare the hwmon driver in iio-sensor-proxy for
removal.

Cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: acpi-als taking over from hwmon for light sensor support?
  2016-11-23 21:07   ` Bastien Nocera
@ 2016-11-23 21:32     ` Guenter Roeck
  2016-11-24  2:18       ` Bastien Nocera
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2016-11-23 21:32 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: Jean Delvare, linux-iio, linux-hwmon

On Wed, Nov 23, 2016 at 10:07:11PM +0100, Bastien Nocera wrote:
> On Wed, 2016-11-23 at 18:38 +0100, Jean Delvare wrote:
> > On mer., 2016-11-23 at 18:21 +0100, Bastien Nocera wrote:
> > > Hey,
> > > 
> > > I did some work on iio-sensor-proxy[1] those past couple of days, and
> > > tested it on a MacBook Pro.
> > > 
> > > Before that, I had written a (user-space) driver to access the hwmon
> > > driver's "light" value, so I was a bit surprised when I saw that iio-
> > > sensor-proxy was accessing the light sensor through acpi-als's IIO driver
> > > instead of through the hwmon driver.
> > > 
> > > I looked through the hwmon, iio and applesmc.c logs, and couldn't find any
> > > information about how the move from one to the other. Does anyone know?
> > > 
> > > I'm asking because the applesmc.c hwmon driver is the only one with
> > > support for the "light" property, and if that's not used anymore, I might
> > > as well remove that code now (or schedule to remove it).
> > 
> > Light sensors are out of scope of hwmon, they have nothing to do with
> > hardware monitoring.
> 
> Why is there still code in applesmc.c to handle the "light" sysfs property
> then?
> 

Interesting question. Because no one bothered enough to remove it ? Because
other applications may still use it ? Because old apple hardware may not
support ACPI0008 ? There can be many reasons.

If the question is why it is there in the first place, please keep in mind that
the driver is quite old. "For historic reasons" may be the best answer to that
question.

> Also, this doesn't answer my question as to when this switch happened.  I
> don't care one way or the other, but knowing when the switch was made can
> allow me to prepare the hwmon driver in iio-sensor-proxy for removal.
> 
>From kernel perspective, it may have been more or less automatic with
the addition of acpi-als support to iio. Either case, isn't it up to
iio-sensor-proxy to decide which kernel ABI it wants to use ?

Guenter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: acpi-als taking over from hwmon for light sensor support?
  2016-11-23 21:32     ` Guenter Roeck
@ 2016-11-24  2:18       ` Bastien Nocera
  0 siblings, 0 replies; 5+ messages in thread
From: Bastien Nocera @ 2016-11-24  2:18 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Jean Delvare, linux-iio, linux-hwmon

On Wed, 2016-11-23 at 13:32 -0800, Guenter Roeck wrote:
> On Wed, Nov 23, 2016 at 10:07:11PM +0100, Bastien Nocera wrote:
> > On Wed, 2016-11-23 at 18:38 +0100, Jean Delvare wrote:
> > > On mer., 2016-11-23 at 18:21 +0100, Bastien Nocera wrote:
> > > > Hey,
> > > > 
> > > > I did some work on iio-sensor-proxy[1] those past couple of
> > > > days, and
> > > > tested it on a MacBook Pro.
> > > > 
> > > > Before that, I had written a (user-space) driver to access the
> > > > hwmon
> > > > driver's "light" value, so I was a bit surprised when I saw
> > > > that iio-
> > > > sensor-proxy was accessing the light sensor through acpi-als's
> > > > IIO driver
> > > > instead of through the hwmon driver.
> > > > 
> > > > I looked through the hwmon, iio and applesmc.c logs, and
> > > > couldn't find any
> > > > information about how the move from one to the other. Does
> > > > anyone know?
> > > > 
> > > > I'm asking because the applesmc.c hwmon driver is the only one
> > > > with
> > > > support for the "light" property, and if that's not used
> > > > anymore, I might
> > > > as well remove that code now (or schedule to remove it).
> > > 
> > > Light sensors are out of scope of hwmon, they have nothing to do
> > > with
> > > hardware monitoring.
> > 
> > Why is there still code in applesmc.c to handle the "light" sysfs
> > property
> > then?
> > 
> 
> Interesting question. Because no one bothered enough to remove it ?
> Because
> other applications may still use it ? Because old apple hardware may
> not
> support ACPI0008 ? There can be many reasons.

All good reasons. The lack of ACPI0008 support would be the main reason
for me to keep the hwmon driver support in iio-sensor-proxy.

> If the question is why it is there in the first place, please keep in
> mind that
> the driver is quite old. "For historic reasons" may be the best
> answer to that
> question.

Oh, I know it's old, I've used it on 2 different Intel-based MacBook
Airs ;)

> > Also, this doesn't answer my question as to when this switch
> > happened.  I
> > don't care one way or the other, but knowing when the switch was
> > made can
> > allow me to prepare the hwmon driver in iio-sensor-proxy for
> > removal.
> > 
> 
> From kernel perspective, it may have been more or less automatic with
> the addition of acpi-als support to iio. Either case, isn't it up to
> iio-sensor-proxy to decide which kernel ABI it wants to use ?

In this case, we don't have a choice, the device is getting bound to
the acpi-als driver and hwmon just doesn't have the light support. In
any case, iio-sensor-proxy only binds to a single sensor of each type,
so we're good here.

I'll leave the hwmon support for older Intel Macs in.

Cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-11-24  2:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-23 17:21 acpi-als taking over from hwmon for light sensor support? Bastien Nocera
2016-11-23 17:38 ` Jean Delvare
2016-11-23 21:07   ` Bastien Nocera
2016-11-23 21:32     ` Guenter Roeck
2016-11-24  2:18       ` Bastien Nocera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).