leds-lp55xx: fix problem on removing LED attributes
[firefly-linux-kernel-4.4.55.git] / drivers / leds / leds-lp55xx-common.h
index 8473abf9830cddca63ce0fb69ee92b8f094e395c..ece4761a1302bbac7d6f522e7a57e890ba9f1ae3 100644 (file)
@@ -45,6 +45,7 @@ struct lp55xx_reg {
  * @set_led_current    : LED current set function
  * @firmware_cb        : Call function when the firmware is loaded
  * @run_engine         : Run internal engine for pattern
+ * @dev_attr_group     : Device specific attributes
  */
 struct lp55xx_device_config {
        const struct lp55xx_reg reset;
@@ -65,6 +66,9 @@ struct lp55xx_device_config {
 
        /* used for running firmware LED patterns */
        void (*run_engine) (struct lp55xx_chip *chip, bool start);
+
+       /* additional device specific attributes */
+       const struct attribute_group *dev_attr_group;
 };
 
 /*
@@ -125,5 +129,6 @@ extern void lp55xx_unregister_leds(struct lp55xx_led *led,
 
 /* common device attributes functions */
 extern int lp55xx_register_sysfs(struct lp55xx_chip *chip);
+extern void lp55xx_unregister_sysfs(struct lp55xx_chip *chip);
 
 #endif /* _LEDS_LP55XX_COMMON_H */