An error occurred fetching the project authors.
  1. 14 Oct, 2019 3 commits
  2. 02 Sep, 2019 2 commits
  3. 27 Jun, 2019 2 commits
  4. 19 Jun, 2019 1 commit
  5. 15 May, 2019 1 commit
  6. 30 Jan, 2019 1 commit
    • Chen-Yu Tsai's avatar
      backlight: pwm_bl: Use gpiod_get_value_cansleep() to get initial state · cec2b188
      Chen-Yu Tsai authored
      gpiod_get_value() gives out a warning if access to the underlying gpiochip
      requires sleeping, which is common for I2C based chips:
      
          WARNING: CPU: 0 PID: 77 at drivers/gpio/gpiolib.c:2500 gpiod_get_value+0xd0/0x100
          Modules linked in:
          CPU: 0 PID: 77 Comm: kworker/0:2 Not tainted 4.14.0-rc3-00589-gf32897915d48-dirty #90
          Hardware name: Allwinner sun4i/sun5i Families
          Workqueue: events deferred_probe_work_func
          [<c010ec50>] (unwind_backtrace) from [<c010b784>] (show_stack+0x10/0x14)
          [<c010b784>] (show_stack) from [<c0797224>] (dump_stack+0x88/0x9c)
          [<c0797224>] (dump_stack) from [<c0125b08>] (__warn+0xe8/0x100)
          [<c0125b08>] (__warn) from [<c0125bd0>] (warn_slowpath_null+0x20/0x28)
          [<c0125bd0>] (warn_slowpath_null) from [<c037069c>] (gpiod_get_value+0xd0/0x100)
          [<c037069c>] (gpiod_get_value) from [<c03778d0>] (pwm_backlight_probe+0x238/0x508)
          [<c03778d0>] (pwm_backlight_probe) from [<c0411a2c>] (platform_drv_probe+0x50/0xac)
          [<c0411a2c>] (platform_drv_probe) from [<c0410224>] (driver_probe_device+0x238/0x2e8)
          [<c0410224>] (driver_probe_device) from [<c040e820>] (bus_for_each_drv+0x44/0x94)
          [<c040e820>] (bus_for_each_drv) from [<c040ff0c>] (__device_attach+0xb0/0x114)
          [<c040ff0c>] (__device_attach) from [<c040f4f8>] (bus_probe_device+0x84/0x8c)
          [<c040f4f8>] (bus_probe_device) from [<c040f944>] (deferred_probe_work_func+0x50/0x14c)
          [<c040f944>] (deferred_probe_work_func) from [<c013be84>] (process_one_work+0x1ec/0x414)
          [<c013be84>] (process_one_work) from [<c013ce5c>] (worker_thread+0x2b0/0x5a0)
          [<c013ce5c>] (worker_thread) from [<c0141908>] (kthread+0x14c/0x154)
          [<c0141908>] (kthread) from [<c0107ab0>] (ret_from_fork+0x14/0x24)
      
      This was missed in commit 0c9501f8 ("backlight: pwm_bl: Handle gpio
      that can sleep"). The code was then moved to a separate function in
      commit 7613c922 ("backlight: pwm_bl: Move the checks for initial power
      state to a separate function").
      
      The only usage of gpiod_get_value() is during the probe stage, which is
      safe to sleep in. Switch to gpiod_get_value_cansleep().
      
      Fixes: 0c9501f8 ("backlight: pwm_bl: Handle gpio that can sleep")
      Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
      Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
      Acked-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      cec2b188
  7. 10 Dec, 2018 1 commit
  8. 27 Nov, 2018 2 commits
  9. 09 Oct, 2018 1 commit
  10. 25 Jul, 2018 1 commit
  11. 04 Jul, 2018 2 commits
    • Enric Balletbo i Serra's avatar
      backlight: pwm_bl: Compute brightness of LED linearly to human eye · 88ba95be
      Enric Balletbo i Serra authored
      When you want to change the brightness using a PWM signal, one thing you
      need to consider is how human perceive the brightness. Human perceive
      the brightness change non-linearly, we have better sensitivity at low
      luminance than high luminance, so to achieve perceived linear dimming,
      the brightness must be matches to the way our eyes behave. The CIE 1931
      lightness formula is what actually describes how we perceive light.
      
      This patch computes a default table with the brightness levels filled
      with the numbers provided by the CIE 1931 algorithm, the number of the
      brightness levels is calculated based on the PWM resolution.
      
      The calculation of the table using the CIE 1931 algorithm is enabled by
      default when you do not define the 'brightness-levels' propriety in your
      device tree.
      Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
      Acked-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      88ba95be
    • Enric Balletbo i Serra's avatar
      backlight: pwm_bl: Linear interpolation between brightness-levels · 573fe6d1
      Enric Balletbo i Serra authored
      Setting num-interpolated-steps in the dts will allow you to have linear
      interpolation between values of brightness-levels. This way a high
      resolution pwm duty cycle can be used without having to list out every
      possible value in the dts. This system also allows for gamma corrected
      values.
      
      The most simple example is interpolate between two brightness values a
      number of steps, this can be done setting the following in the dts:
      
        brightness-levels = <0 65535>;
        num-interpolated-steps = <1024>;
        default-brightness-level = <512>;
      
      This will create a brightness-level table with the following values:
      
        <0 63 126 189 252 315 378 441 ... 64260 64323 64386 64449 65535>
      
      Another use case can be describe a gamma corrected curve, as we have
      better sensitivity at low luminance than high luminance we probably
      want have smaller steps for low brightness levels values and bigger
      steps for high brightness levels values. This can be achieved with
      the following in the dts:
      
        brightness-levels = <0 4096 65535>;
        num-interpolated-steps = <1024>;
        default-brightness-level = <512>;
      
      This will create a brightness-levels table with the following values:
      
        <0 4 8 12 16 20 ... 4096 4156 4216 4276 ... 65535>
      Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
      Acked-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      573fe6d1
  12. 30 Apr, 2018 3 commits
  13. 13 Oct, 2017 1 commit
  14. 07 Aug, 2017 1 commit
  15. 19 Apr, 2017 1 commit
  16. 04 Jan, 2017 2 commits
  17. 06 Oct, 2016 1 commit
  18. 17 May, 2016 2 commits
  19. 11 Jan, 2016 3 commits
  20. 15 Oct, 2015 1 commit
  21. 23 Jun, 2015 1 commit
  22. 26 May, 2015 1 commit
  23. 10 Nov, 2014 1 commit
  24. 28 Aug, 2014 1 commit
  25. 20 Aug, 2014 1 commit
  26. 18 Jul, 2014 1 commit
  27. 23 Jun, 2014 1 commit
  28. 21 May, 2014 1 commit