cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

lm3630a_bl.h (1671B)


      1/* SPDX-License-Identifier: GPL-2.0-only */
      2/*
      3* Simple driver for Texas Instruments LM3630A LED Flash driver chip
      4* Copyright (C) 2012 Texas Instruments
      5*/
      6
      7#ifndef __LINUX_LM3630A_H
      8#define __LINUX_LM3630A_H
      9
     10#define LM3630A_NAME "lm3630a_bl"
     11
     12enum lm3630a_pwm_ctrl {
     13	LM3630A_PWM_DISABLE = 0x00,
     14	LM3630A_PWM_BANK_A,
     15	LM3630A_PWM_BANK_B,
     16	LM3630A_PWM_BANK_ALL,
     17	LM3630A_PWM_BANK_A_ACT_LOW = 0x05,
     18	LM3630A_PWM_BANK_B_ACT_LOW,
     19	LM3630A_PWM_BANK_ALL_ACT_LOW,
     20};
     21
     22enum lm3630a_leda_ctrl {
     23	LM3630A_LEDA_DISABLE = 0x00,
     24	LM3630A_LEDA_ENABLE = 0x04,
     25	LM3630A_LEDA_ENABLE_LINEAR = 0x14,
     26};
     27
     28enum lm3630a_ledb_ctrl {
     29	LM3630A_LEDB_DISABLE = 0x00,
     30	LM3630A_LEDB_ON_A = 0x01,
     31	LM3630A_LEDB_ENABLE = 0x02,
     32	LM3630A_LEDB_ENABLE_LINEAR = 0x0A,
     33};
     34
     35#define LM3630A_MAX_BRIGHTNESS 255
     36/*
     37 *@leda_label    : optional led a label.
     38 *@leda_init_brt : led a init brightness. 4~255
     39 *@leda_max_brt  : led a max brightness.  4~255
     40 *@leda_ctrl     : led a disable, enable linear, enable exponential
     41 *@ledb_label    : optional led b label.
     42 *@ledb_init_brt : led b init brightness. 4~255
     43 *@ledb_max_brt  : led b max brightness.  4~255
     44 *@ledb_ctrl     : led b disable, enable linear, enable exponential
     45 *@pwm_period    : pwm period
     46 *@pwm_ctrl      : pwm disable, bank a or b, active high or low
     47 */
     48struct lm3630a_platform_data {
     49
     50	/* led a config.  */
     51	const char *leda_label;
     52	int leda_init_brt;
     53	int leda_max_brt;
     54	enum lm3630a_leda_ctrl leda_ctrl;
     55	/* led b config. */
     56	const char *ledb_label;
     57	int ledb_init_brt;
     58	int ledb_max_brt;
     59	enum lm3630a_ledb_ctrl ledb_ctrl;
     60	/* pwm config. */
     61	unsigned int pwm_period;
     62	enum lm3630a_pwm_ctrl pwm_ctrl;
     63};
     64
     65#endif /* __LINUX_LM3630A_H */