Re: [PATCH 2.6.8.1 0/2] leds: new class for led devices

From: John Lenz (lenz_at_cs.wisc.edu)
Date: 09/03/04

  • Next message: Tom Rini: "[PATCH 2.6.9-rc1 0/3] zlib_inflate and ppc32 changes"
    Date:	Fri, 03 Sep 2004 18:38:06 +0000
    To: Pavel Machek <pavel@ucw.cz>
    
    

    On 09/03/04 08:51:03, Pavel Machek wrote:
    > > function : a read/write attribute that sets the current function of
    > > this led. The available options are
    > >
    > > timer : the led blinks on and off on a timer
    > > idle : the led turns off when the system is idle and on when not idle
    > > power : the led represents the current power state
    > > user : the led is controlled by user space
    >
    > I'm afraid this is really good idea. It seems quite overengineered to
    > me (and I'd be afraid that idle part slows machine). Perhaps having
    > only "user" mode is better idea?

    I was only mimicing the support currently in the arm led code.
    After thinking about it from a broader perspective of including GPIOs,
    we should probably get rid of this function thing entirely. Just let user
    space do everything... userspace can monitor sysfs and hotplug and have the
    led represent power or idle or whatever.

    >
    > > light : a read/write attribute that allows userspace to see the current
    >
    > > status of the led. If function="user" then writing to this attribute
    > > will change the led on or off. If function != "user" then writing has
    > > no effect.
    > > light is an integer, where 0 means off, 1 means on first color, 2
    > > means on second color, etc. (for example, if color="green/blue" then
    > > light=1 means turn led on to green and if light=2 means turn led on to
    > > blue.
    >
    > Is there ways to turn on both?

    depends on the hardware...

    The led class does not really inforce any policy, it just passes this
    number along to the actual driver that is registered. So say you had
    a led that could be red, green, or both red and green at the same time
    (not sure how that would work hardware wise, but ok). The driver could
    do something like set color="red/green/red&green" and then use 0,1,2,3.
    The kernel is just reflecting the possible states the hardware could be
    in.

    John

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Tom Rini: "[PATCH 2.6.9-rc1 0/3] zlib_inflate and ppc32 changes"

    Relevant Pages

    • Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
      ... > problem without any special hardware at all: ... # The driver did use get_user_pagesto elevated the refcount on all the ... # to by the driver at the time that the app accessed the page causing the ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Linux 2.4.22-rc1
      ... thought behind it was that it must be either 1) a hardware specific ... or 2) a generic usb driver problem. ... Well in my case i opted for the slow backup rather than the no backup ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: protecting source code in 2.6
      ... Why is there a reason to lock down the source of the actual driver? ... Can we assume the hardware is so cheap that all the smartness is in the ... - guarantee the users of your hardware a support period, say, three years ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [RFC] Small PCI core patch
      ... > On the hardware front, there are some signs of hope. ... > building X, DRI, and openGL from source isn't something I do casually. ... > radeon driver I mentioned above, it only seems to get touched every 2 months ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Cant use SYSFS for "Proprietry" driver modules !!!.
      ... >> If the user has the source of the driver, he can port the driver or hire ... >> be an expensive piece of hardware). ... If you ignore the license, you will suffer the consequences of it, just ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)