1. 15 4月, 2014 3 次提交
    • V
      HID: thingm: refactor blink(1) support · f70ed8a6
      Vivien Didelot 提交于
      This patch refactors the way the thingm driver registers a blink(1) LED.
      In order to make the driver simpler and more standard, drop the "rgb"
      sysfs attribute and create one instance of LED class per RGB channel.
      
      Actually, the name of the LED class instance registered for a blink(1)
      device is "blink1::ABCD", where ABCD is the last 4 chars of the serial
      number. The driver now registers 3 instances per RGB chip, named
      "thingmX:{red,green,blue}:ledY" where X is the hidraw minor number and Y
      is the RGB chip number (as seen by the firmware).
      
      This patch also uses work queues to defer calls with the device, which
      now allows triggers to work as expected with this LED device.
      
      Also remove the brightness structure field and the brightness_get
      backend, as it is already handled by the LED class, and changes the
      prefix of functions and structures to thingm_ to match the driver name.
      Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      f70ed8a6
    • V
      HID: thingm: remove the "fade" sysfs attribute · aee114fd
      Vivien Didelot 提交于
      As for the "play" sysfs attribute, remove this other non-standard
      attribute, so the driver only implements what is required to switch the
      LED on and off. Thus, a fade time won't be ideal for some fast-changing
      triggers.
      Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      aee114fd
    • V
      HID: thingm: remove the "play" sysfs attribute · 21200ad1
      Vivien Didelot 提交于
      When the thingm driver registers an instance of LED class, it creates a
      "play" sysfs attribute for this blink(1) specific feature.
      
      Since this feature is not specific to the RGB chip but to the HID device
      itself, let's remove this attribute from the LED instance and only
      implement what is useful to switch on and off the LED.
      
      This feature is still easily accessible through hidraw.
      Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      21200ad1
  2. 17 2月, 2014 2 次提交
  3. 25 2月, 2013 1 次提交
  4. 19 2月, 2013 1 次提交
    • V
      HID: add ThingM blink(1) USB RGB LED support · 30ba2fbd
      Vivien Didelot 提交于
      The ThingM blink(1) is an open source hardware USB RGB LED. It contains
      an internal EEPROM, allowing to configure up to 12 light patterns. A
      light pattern is a RGB color plus a fade time. This driver registers a
      LED class instance with additional sysfs attributes to support basic
      functions such as setting RGB colors, fade and playing. Other functions
      are still accessible through the hidraw interface.
      
      At this time, the only documentation for the device is the firmware
      source code from ThingM, plus a few schematics. They are available at:
      
      https://github.com/todbot/blink1
      
      This patch is version 3. It updates the name of the source file, the
      driver and the led sysfs entry, according to comments from Jiri Kosina
      and Simon Wood.
      Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      30ba2fbd