Merge tag 'leds-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Feb 2021 21:56:40 +0000 (13:56 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Feb 2021 21:56:40 +0000 (13:56 -0800)
Pull LED updates from Pavel Machek:
 "Besides the usual fixes and new drivers, we are changing CLASS_FLASH
  to return success to make it easier to work with V4L2 stuff disabled,
  and we are getting rid of enum that should have been plain integer
  long time ago. I'm slightly nervous about potential warnings, but it
  needed to be fixed at some point"

* tag 'leds-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds:
  leds: lp50xx: Get rid of redundant explicit casting
  leds: lp50xx: Update headers block to reflect reality
  leds: lp50xx: Get rid of redundant check in lp50xx_enable_disable()
  leds: lp50xx: Reduce level of dereferences
  leds: lp50xx: Switch to new style i2c-driver probe function
  leds: lp50xx: Don't spam logs when probe is deferred
  leds: apu: extend support for PC Engines APU1 with newer firmware
  leds: flash: Fix multicolor no-ops registration by return 0
  leds: flash: Add flash registration with undefined CONFIG_LEDS_CLASS_FLASH
  leds: lgm: Add LED controller driver for LGM SoC
  dt-bindings: leds: Add bindings for Intel LGM SoC
  leds: led-core: Get rid of enum led_brightness
  leds: gpio: Set max brightness to 1
  leds: lm3533: Switch to using the new API kobj_to_dev()
  leds: ss4200: simplify the return expression of register_nasgpio_led()
  leds: Use DEVICE_ATTR_{RW, RO, WO} macros

1  2 
drivers/leds/Kconfig
drivers/leds/Makefile
drivers/leds/leds-lm3533.c

diff --combined drivers/leds/Kconfig
@@@ -928,10 -928,10 +928,13 @@@ config LEDS_ACER_A50
          This option enables support for the Power Button LED of
          Acer Iconia Tab A500.
  
 +comment "Flash and Torch LED drivers"
 +source "drivers/leds/flash/Kconfig"
 +
  comment "LED Triggers"
  source "drivers/leds/trigger/Kconfig"
  
+ comment "LED Blink"
+ source "drivers/leds/blink/Kconfig"
  endif # NEW_LEDS
diff --combined drivers/leds/Makefile
@@@ -103,8 -103,8 +103,11 @@@ obj-$(CONFIG_LEDS_SPI_BYTE)               += leds-sp
  # LED Userspace Drivers
  obj-$(CONFIG_LEDS_USER)                       += uleds.o
  
 +# Flash and Torch LED Drivers
 +obj-$(CONFIG_LEDS_CLASS_FLASH)                += flash/
 +
  # LED Triggers
  obj-$(CONFIG_LEDS_TRIGGERS)           += trigger/
+ # LED Blink
+ obj-$(CONFIG_LEDS_BLINK)                += blink/
@@@ -608,7 -608,7 +608,7 @@@ static struct attribute *lm3533_led_att
  static umode_t lm3533_led_attr_is_visible(struct kobject *kobj,
                                             struct attribute *attr, int n)
  {
-       struct device *dev = container_of(kobj, struct device, kobj);
+       struct device *dev = kobj_to_dev(kobj);
        struct led_classdev *led_cdev = dev_get_drvdata(dev);
        struct lm3533_led *led = to_lm3533_led(led_cdev);
        umode_t mode = attr->mode;
@@@ -679,7 -679,7 +679,7 @@@ static int lm3533_led_probe(struct plat
        led->cdev.brightness_get = lm3533_led_get;
        led->cdev.blink_set = lm3533_led_blink_set;
        led->cdev.brightness = LED_OFF;
 -      led->cdev.groups = lm3533_led_attribute_groups,
 +      led->cdev.groups = lm3533_led_attribute_groups;
        led->id = pdev->id;
  
        mutex_init(&led->mutex);