Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358611
b: refs/heads/master
c: b3b6f81
h: refs/heads/master
i:
  358609: 736df7d
  358607: 57df2ed
v: v3
  • Loading branch information
Milo(Woogyom) Kim authored and Bryan Wu committed Feb 6, 2013
1 parent fd64d04 commit f75accf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d9067d28461cb2e817cacb84c727959cbd57d247
refs/heads/master: b3b6f8119d752c969c6394314dc7ab80e6611111
16 changes: 16 additions & 0 deletions trunk/drivers/leds/leds-lp55xx-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ static int lp55xx_init_led(struct lp55xx_led *led,
return 0;
}

static struct attribute *lp55xx_engine_attributes[] = {
NULL,
};

static const struct attribute_group lp55xx_engine_attr_group = {
.attrs = lp55xx_engine_attributes,
};

int lp55xx_write(struct lp55xx_chip *chip, u8 reg, u8 val)
{
return i2c_smbus_write_byte_data(chip->cl, reg, val);
Expand Down Expand Up @@ -365,6 +373,14 @@ void lp55xx_unregister_leds(struct lp55xx_led *led, struct lp55xx_chip *chip)
}
EXPORT_SYMBOL_GPL(lp55xx_unregister_leds);

int lp55xx_register_sysfs(struct lp55xx_chip *chip)
{
struct device *dev = &chip->cl->dev;

return sysfs_create_group(&dev->kobj, &lp55xx_engine_attr_group);
}
EXPORT_SYMBOL_GPL(lp55xx_register_sysfs);

MODULE_AUTHOR("Milo Kim <milo.kim@ti.com>");
MODULE_DESCRIPTION("LP55xx Common Driver");
MODULE_LICENSE("GPL");
4 changes: 4 additions & 0 deletions trunk/drivers/leds/leds-lp55xx-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,8 @@ extern int lp55xx_register_leds(struct lp55xx_led *led,
struct lp55xx_chip *chip);
extern void lp55xx_unregister_leds(struct lp55xx_led *led,
struct lp55xx_chip *chip);

/* common device attributes functions */
extern int lp55xx_register_sysfs(struct lp55xx_chip *chip);

#endif /* _LEDS_LP55XX_COMMON_H */

0 comments on commit f75accf

Please sign in to comment.