04 Jan, 2016

3 commits

  • Strobe state variable is declared as unsigned long, remove
    the check for values less than zero then.

    Signed-off-by: Jacek Anaszewski
    Reported-by: David Binderman

    Jacek Anaszewski
     
  • This patch removes SET_BRIGHTNESS_ASYNC and SET_BRIGHTNESS_SYNC flags.
    led_set_brightness() now calls led_set_brightness_nosleep() instead of
    choosing between sync and async op basing on the flags defined by the
    driver.

    From now on, if a user wants to make sure that brightness will be set
    synchronously, they have to use led_set_brightness_sync() API. It is now
    being made publicly available since it has become apparent that it is
    a caller who should decide whether brightness is to be set in
    a synchronous or an asynchronous way.

    Signed-off-by: Jacek Anaszewski
    Acked-by: Sakari Ailus

    Jacek Anaszewski
     
  • The initial purpose of brightness_set_sync op, introduced along with
    the LED flash class extension, was to add a means for setting torch LED
    brightness as soon as possible, which couldn't have been guaranteed by
    brightness_set op. This patch renames the op to brightness_set_blocking,
    which describes its purpose in a more generic way. It is beneficial
    in view of the prospective changes in the LED core, aiming at removing
    the need for using work queues in LED class drivers that can sleep
    or use delays while setting brightness.

    Signed-off-by: Jacek Anaszewski
    Acked-by: Andrew Lunn
    Acked-by: Pavel Machek
    Acked-by: Sakari Ailus

    Jacek Anaszewski
     

10 Mar, 2015

1 commit


27 Jan, 2015

1 commit

  • Some LED devices support two operation modes - torch and flash.
    This patch provides support for flash LED devices in the LED subsystem
    by introducing new sysfs attributes and kernel internal interface.
    The attributes being introduced are: flash_brightness, flash_strobe,
    flash_timeout, max_flash_timeout, max_flash_brightness, flash_fault,
    flash_sync_strobe and available_sync_leds. All the flash related
    features are placed in a separate module.

    The modifications aim to be compatible with V4L2 framework requirements
    related to the flash devices management. The design assumes that V4L2
    sub-device can take of the LED class device control and communicate
    with it through the kernel internal interface. When V4L2 Flash sub-device
    file is opened, the LED class device sysfs interface is made
    unavailable.

    Signed-off-by: Jacek Anaszewski
    Acked-by: Kyungmin Park
    Cc: Richard Purdie
    Acked-by: Pavel Machek
    Signed-off-by: Bryan Wu

    Jacek Anaszewski