summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-lp55xx-common.h
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2024-06-26 18:00:12 +0200
committerLee Jones <lee@kernel.org>2024-06-26 18:08:30 +0200
commit42a9eaac9784e9b3df56f1947526d7d4d0ed9b26 (patch)
tree696bb7d5d2e0ebff33543e879208ea86f04050d2 /drivers/leds/leds-lp55xx-common.h
parentleds: leds-lp55xx: Generalize load_engine_and_select_page function (diff)
downloadlinux-42a9eaac9784e9b3df56f1947526d7d4d0ed9b26.tar.xz
linux-42a9eaac9784e9b3df56f1947526d7d4d0ed9b26.zip
leds: leds-lp55xx: Generalize run_engine function
Generalize run_engine function for lp55xx based LED driver. The logic is similar to every LED driver, rework it with more macro magic and account for LED model that might have OP MODE and EXEC at base offset in the reg. Update any lp55xx based LED driver to use this generalized function and declare required bits. Suggested-by: Lee Jones <lee@kernel.org> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Link: https://lore.kernel.org/r/20240626160027.19703-8-ansuelsmth@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/leds/leds-lp55xx-common.h')
-rw-r--r--drivers/leds/leds-lp55xx-common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/leds/leds-lp55xx-common.h b/drivers/leds/leds-lp55xx-common.h
index 015ac2ef4e4d..dd74b214ec74 100644
--- a/drivers/leds/leds-lp55xx-common.h
+++ b/drivers/leds/leds-lp55xx-common.h
@@ -112,6 +112,7 @@ struct lp55xx_reg {
*/
struct lp55xx_device_config {
const struct lp55xx_reg reg_op_mode; /* addr, shift */
+ const struct lp55xx_reg reg_exec; /* addr, shift */
const struct lp55xx_reg engine_busy; /* addr, mask */
const struct lp55xx_reg reset;
const struct lp55xx_reg enable;
@@ -206,6 +207,7 @@ extern bool lp55xx_is_extclk_used(struct lp55xx_chip *chip);
/* common chip functions */
extern void lp55xx_stop_all_engine(struct lp55xx_chip *chip);
extern void lp55xx_load_engine(struct lp55xx_chip *chip);
+extern int lp55xx_run_engine_common(struct lp55xx_chip *chip);
/* common probe/remove function */
extern int lp55xx_probe(struct i2c_client *client);