1. 30 6月, 2015 3 次提交
    • M
      leds:lp55xx: fix firmware loading error · b6789320
      Milo Kim 提交于
      LP55xx driver uses not firmware file but raw data to load program through
      the firmware interface.(Documents/leds/leds-lp55xx.txt)
      
        For example, here is how to run blinking green channel pattern.
        (The second engine is seleted and MUX is mapped to 'RGB' mode)
        echo 2 > /sys/bus/i2c/devices/xxxx/select_engine
        echo "RGB" > /sys/bus/i2c/devices/xxxx/engine_mux
        echo 1 > /sys/class/firmware/lp5562/loading
        echo "4000600040FF6000" > /sys/class/firmware/lp5562/data
        echo 0 > /sys/class/firmware/lp5562/loading
        echo 1 > /sys/bus/i2c/devices/xxxx/run_engine
      
      However, '/sys/class/firmware/<device name>' is not created after the
      firmware loader user helper was introduced.
      This feature is used in the case below.
      
        As soon as the firmware download is requested by the driver, firmware
        class subsystem tries to find the binary file.
        If it gets failed, then it just falls back to user helper to load
        raw data manually. Here, you can see the device file under
        /sys/class/firmware/.
      
      To make it happen, LP55xx driver requires two configurations.
      
        1. Enable CONFIG_FW_LOADER_USER_HELPER_FALLBACK in Kconfig
        2. Set option, 'FW_OPT_USERHELPER' on requesting the firmware data.
           It means the second option should be 'false' in
           request_firmware_nowait().
           This option enables to load firmware data manually by calling
           fw_load_from_user_helper().
      
      Cc: linux-leds@vger.kernel.org
      Signed-off-by: NMilo Kim <milo.kim@ti.com>
      Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      b6789320
    • J
      leds: fix max77693-led build errors · 10c19c9e
      Jacek Anaszewski 提交于
      Fix build errors when LEDS_MAX77693=y and V4L2_FLASH_LED_CLASS=m
      by restricting LEDS_MAX77693 to =m if V4L2_FLASH_LED_CLASS=m.
      
      drivers/leds/leds-max77693.c:1062: undefined reference to `v4l2_flash_release'
      drivers/leds/leds-max77693.c:1068: undefined reference to `v4l2_flash_release'
      drivers/built-in.o: In function `max77693_register_led':
      drivers/leds/leds-max77693.c:968: undefined reference to `v4l2_flash_init'
      drivers/built-in.o: In function `max77693_led_probe':
      drivers/leds/leds-max77693.c:1048: undefined reference to `v4l2_flash_release'
      Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      10c19c9e
    • R
      leds: fix aat1290 build errors · 58d1809b
      Randy Dunlap 提交于
      Fix build errors when LEDS_AAT1290=y and V4L2_FLASH_LED_CLASS=m
      by restricting LEDS_AAT1290 to =m if V4L2_FLASH_LED_CLASS=m.
      
      drivers/built-in.o: In function `aat1290_led_remove':
      leds-aat1290.c:(.text+0xe5d77): undefined reference to `v4l2_flash_release'
      drivers/built-in.o: In function `aat1290_led_probe':
      leds-aat1290.c:(.text+0xe6494): undefined reference to `v4l2_flash_init'
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      58d1809b
  2. 25 6月, 2015 1 次提交
  3. 23 6月, 2015 5 次提交
  4. 12 6月, 2015 1 次提交
  5. 26 5月, 2015 6 次提交
  6. 13 5月, 2015 1 次提交
    • G
      leds / PM: fix hibernation on arm when gpio-led used with CPU led trigger · 084609bf
      Grygorii Strashko 提交于
      Setting a dev_pm_ops suspend/resume pair of callbacks but not a set of
      hibernation callbacks means those pm functions will not be
      called upon hibernation - that leads to system crash on ARM during
      freezing if gpio-led is used in combination with CPU led trigger.
      It may happen after freeze_noirq stage (GPIO is suspended)
      and before syscore_suspend stage (CPU led trigger is suspended)
      - usually when disable_nonboot_cpus() is called.
      
      Log:
        PM: noirq freeze of devices complete after 1.425 msecs
        Disabling non-boot CPUs ...
          ^ system may crash or stuck here with message (TI AM572x)
      
        WARNING: CPU: 0 PID: 3100 at drivers/bus/omap_l3_noc.c:148 l3_interrupt_handler+0x22c/0x370()
        44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER1_P3 (Idle): Data Access in Supervisor mode during Functional access
      
        CPU1: shutdown
          ^ or here
      
      Fix this by using SIMPLE_DEV_PM_OPS, which appropriately
      assigns the suspend and hibernation callbacks and move
      led_suspend/led_resume under CONFIG_PM_SLEEP to avoid
      build warnings.
      
      Fixes: 73e1ab41 (leds: Convert led class driver from legacy pm ops to dev_pm_ops)
      Signed-off-by: NGrygorii Strashko <Grygorii.Strashko@linaro.org>
      Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      Cc: 3.11+ <stable@vger.kernel.org> # 3.11+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      084609bf
  7. 11 5月, 2015 1 次提交
    • L
      leds: syscon: instantiate from platform device · a917d4b4
      Linus Walleij 提交于
      Currently syscon LEDs will traverse the device tree looking for syscon devices
      and if found, traverse any subnodes of these to identify matching children
      and from there instantiate LED class devices.
      
      This is not a good use of the Linux device model. Instead we have converted the
      device trees to add the "simple-mfd" property to the MFD nexi spawning syscon
      LEDs so that these will appear as platform devices in the system and we can
      use the proper device probing mechanism.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Lee Jones <lee.jones@linaro.org>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Reviewed-by: NBjorn Andersson <bjorn.andersson@sonymobile.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      a917d4b4
  8. 05 5月, 2015 7 次提交
  9. 31 3月, 2015 7 次提交
  10. 10 3月, 2015 2 次提交
  11. 04 3月, 2015 1 次提交
  12. 03 3月, 2015 1 次提交
    • U
      leds: lp8860: make use of devm_gpiod_get_optional · eb2294c3
      Uwe Kleine-König 提交于
      The probe function open coded a bad variant of devm_gpiod_get_optional
      using devm_gpiod_get and just ignoring all errors.
      In contrast to that devm_gpiod_get_optional returns NULL if there was no
      corresponding gpio specified in the device tree (or ACPI table) and
      fails if there is an error (or GPIOLIB is not enabled).
      
      Moreover since 39b2bbe3 (gpio: add flags argument to gpiod_get*()
      functions) which appeared in v3.17-rc1, the gpiod_get* functions take an
      additional parameter that allows to specify direction and initial value
      for output which allows some simplification.
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      eb2294c3
  13. 25 2月, 2015 1 次提交
  14. 03 2月, 2015 1 次提交
  15. 27 1月, 2015 1 次提交
    • J
      leds: Add LED Flash class extension to the LED subsystem · 7aea8389
      Jacek Anaszewski 提交于
      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: NJacek Anaszewski <j.anaszewski@samsung.com>
      Acked-by: NKyungmin Park <kyungmin.park@samsung.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      7aea8389
  16. 15 1月, 2015 1 次提交