diff options
-rw-r--r-- | drivers/leds/leds-lp55xx-common.c | 16 | ||||
-rw-r--r-- | drivers/leds/leds-lp55xx-common.h | 4 |
2 files changed, 20 insertions, 0 deletions
diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c index cd19027895e5..98407ca45e4f 100644 --- a/drivers/leds/leds-lp55xx-common.c +++ b/drivers/leds/leds-lp55xx-common.c | |||
@@ -197,6 +197,14 @@ static int lp55xx_init_led(struct lp55xx_led *led, | |||
197 | return 0; | 197 | return 0; |
198 | } | 198 | } |
199 | 199 | ||
200 | static struct attribute *lp55xx_engine_attributes[] = { | ||
201 | NULL, | ||
202 | }; | ||
203 | |||
204 | static const struct attribute_group lp55xx_engine_attr_group = { | ||
205 | .attrs = lp55xx_engine_attributes, | ||
206 | }; | ||
207 | |||
200 | int lp55xx_write(struct lp55xx_chip *chip, u8 reg, u8 val) | 208 | int lp55xx_write(struct lp55xx_chip *chip, u8 reg, u8 val) |
201 | { | 209 | { |
202 | return i2c_smbus_write_byte_data(chip->cl, reg, val); | 210 | return i2c_smbus_write_byte_data(chip->cl, reg, val); |
@@ -365,6 +373,14 @@ void lp55xx_unregister_leds(struct lp55xx_led *led, struct lp55xx_chip *chip) | |||
365 | } | 373 | } |
366 | EXPORT_SYMBOL_GPL(lp55xx_unregister_leds); | 374 | EXPORT_SYMBOL_GPL(lp55xx_unregister_leds); |
367 | 375 | ||
376 | int lp55xx_register_sysfs(struct lp55xx_chip *chip) | ||
377 | { | ||
378 | struct device *dev = &chip->cl->dev; | ||
379 | |||
380 | return sysfs_create_group(&dev->kobj, &lp55xx_engine_attr_group); | ||
381 | } | ||
382 | EXPORT_SYMBOL_GPL(lp55xx_register_sysfs); | ||
383 | |||
368 | MODULE_AUTHOR("Milo Kim <milo.kim@ti.com>"); | 384 | MODULE_AUTHOR("Milo Kim <milo.kim@ti.com>"); |
369 | MODULE_DESCRIPTION("LP55xx Common Driver"); | 385 | MODULE_DESCRIPTION("LP55xx Common Driver"); |
370 | MODULE_LICENSE("GPL"); | 386 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/leds/leds-lp55xx-common.h b/drivers/leds/leds-lp55xx-common.h index 32d96828cbc6..d0be837643f0 100644 --- a/drivers/leds/leds-lp55xx-common.h +++ b/drivers/leds/leds-lp55xx-common.h | |||
@@ -103,4 +103,8 @@ extern int lp55xx_register_leds(struct lp55xx_led *led, | |||
103 | struct lp55xx_chip *chip); | 103 | struct lp55xx_chip *chip); |
104 | extern void lp55xx_unregister_leds(struct lp55xx_led *led, | 104 | extern void lp55xx_unregister_leds(struct lp55xx_led *led, |
105 | struct lp55xx_chip *chip); | 105 | struct lp55xx_chip *chip); |
106 | |||
107 | /* common device attributes functions */ | ||
108 | extern int lp55xx_register_sysfs(struct lp55xx_chip *chip); | ||
109 | |||
106 | #endif /* _LEDS_LP55XX_COMMON_H */ | 110 | #endif /* _LEDS_LP55XX_COMMON_H */ |