Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * leds-regulator.h - platform data structure for regulator driven LEDs.
0004  *
0005  * Copyright (C) 2009 Antonio Ospite <ospite@studenti.unina.it>
0006  */
0007 
0008 #ifndef __LINUX_LEDS_REGULATOR_H
0009 #define __LINUX_LEDS_REGULATOR_H
0010 
0011 /*
0012  * Use "vled" as supply id when declaring the regulator consumer:
0013  *
0014  * static struct regulator_consumer_supply pcap_regulator_VVIB_consumers [] = {
0015  *  { .dev_name = "leds-regulator.0", .supply = "vled" },
0016  * };
0017  *
0018  * If you have several regulator driven LEDs, you can append a numerical id to
0019  * .dev_name as done above, and use the same id when declaring the platform
0020  * device:
0021  *
0022  * static struct led_regulator_platform_data a780_vibrator_data = {
0023  *  .name   = "a780::vibrator",
0024  * };
0025  *
0026  * static struct platform_device a780_vibrator = {
0027  *  .name = "leds-regulator",
0028  *  .id   = 0,
0029  *  .dev  = {
0030  *      .platform_data = &a780_vibrator_data,
0031  *  },
0032  * };
0033  */
0034 
0035 #include <linux/leds.h>
0036 
0037 struct led_regulator_platform_data {
0038     char *name;                     /* LED name as expected by LED class */
0039     enum led_brightness brightness; /* initial brightness value */
0040 };
0041 
0042 #endif /* __LINUX_LEDS_REGULATOR_H */