~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/platform_data/leds-lp55xx.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * LP55XX Platform Data Header
  4  *
  5  * Copyright (C) 2012 Texas Instruments
  6  *
  7  * Author: Milo(Woogyom) Kim <milo.kim@ti.com>
  8  *
  9  * Derived from leds-lp5521.h, leds-lp5523.h
 10  */
 11 
 12 #ifndef _LEDS_LP55XX_H
 13 #define _LEDS_LP55XX_H
 14 
 15 #include <linux/gpio/consumer.h>
 16 #include <linux/led-class-multicolor.h>
 17 
 18 /* Clock configuration */
 19 #define LP55XX_CLOCK_AUTO       0
 20 #define LP55XX_CLOCK_INT        1
 21 #define LP55XX_CLOCK_EXT        2
 22 
 23 #define LP55XX_MAX_GROUPED_CHAN 4
 24 
 25 struct lp55xx_led_config {
 26         const char *name;
 27         const char *default_trigger;
 28         u8 chan_nr;
 29         u8 led_current; /* mA x10, 0 if led is not connected */
 30         u8 max_current;
 31         int num_colors;
 32         unsigned int max_channel;
 33         int color_id[LED_COLOR_ID_MAX];
 34         int output_num[LED_COLOR_ID_MAX];
 35 };
 36 
 37 struct lp55xx_predef_pattern {
 38         const u8 *r;
 39         const u8 *g;
 40         const u8 *b;
 41         u8 size_r;
 42         u8 size_g;
 43         u8 size_b;
 44 };
 45 
 46 enum lp8501_pwr_sel {
 47         LP8501_ALL_VDD,         /* D1~9 are connected to VDD */
 48         LP8501_6VDD_3VOUT,      /* D1~6 with VDD, D7~9 with VOUT */
 49         LP8501_3VDD_6VOUT,      /* D1~6 with VOUT, D7~9 with VDD */
 50         LP8501_ALL_VOUT,        /* D1~9 are connected to VOUT */
 51 };
 52 
 53 /*
 54  * struct lp55xx_platform_data
 55  * @led_config        : Configurable led class device
 56  * @num_channels      : Number of LED channels
 57  * @label             : Used for naming LEDs
 58  * @clock_mode        : Input clock mode. LP55XX_CLOCK_AUTO or _INT or _EXT
 59  * @setup_resources   : Platform specific function before enabling the chip
 60  * @release_resources : Platform specific function after  disabling the chip
 61  * @enable_gpiod      : enable GPIO descriptor
 62  * @patterns          : Predefined pattern data for RGB channels
 63  * @num_patterns      : Number of patterns
 64  * @update_config     : Value of CONFIG register
 65  */
 66 struct lp55xx_platform_data {
 67 
 68         /* LED channel configuration */
 69         struct lp55xx_led_config *led_config;
 70         u8 num_channels;
 71         const char *label;
 72 
 73         /* Clock configuration */
 74         u8 clock_mode;
 75 
 76         /* Charge pump mode */
 77         u32 charge_pump_mode;
 78 
 79         /* optional enable GPIO */
 80         struct gpio_desc *enable_gpiod;
 81 
 82         /* Predefined pattern data */
 83         struct lp55xx_predef_pattern *patterns;
 84         unsigned int num_patterns;
 85 
 86         /* LP8501 specific */
 87         enum lp8501_pwr_sel pwr_sel;
 88 };
 89 
 90 #endif /* _LEDS_LP55XX_H */
 91 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php