Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (C) 2012 Texas Instruments
0004  *
0005  * Simple driver for Texas Instruments LM355x LED driver chip
0006  *
0007  * Author: G.Shark Jeong <gshark.jeong@gmail.com>
0008  *         Daniel Jeong <daniel.jeong@ti.com>
0009  */
0010 
0011 #define LM355x_NAME "leds-lm355x"
0012 #define LM3554_NAME "leds-lm3554"
0013 #define LM3556_NAME "leds-lm3556"
0014 
0015 /* lm3554 : strobe def. on */
0016 enum lm355x_strobe {
0017     LM355x_PIN_STROBE_DISABLE = 0x00,
0018     LM355x_PIN_STROBE_ENABLE = 0x01,
0019 };
0020 
0021 enum lm355x_torch {
0022     LM355x_PIN_TORCH_DISABLE = 0,
0023     LM3554_PIN_TORCH_ENABLE = 0x80,
0024     LM3556_PIN_TORCH_ENABLE = 0x10,
0025 };
0026 
0027 enum lm355x_tx2 {
0028     LM355x_PIN_TX_DISABLE = 0,
0029     LM3554_PIN_TX_ENABLE = 0x20,
0030     LM3556_PIN_TX_ENABLE = 0x40,
0031 };
0032 
0033 enum lm355x_ntc {
0034     LM355x_PIN_NTC_DISABLE = 0,
0035     LM3554_PIN_NTC_ENABLE = 0x08,
0036     LM3556_PIN_NTC_ENABLE = 0x80,
0037 };
0038 
0039 enum lm355x_pmode {
0040     LM355x_PMODE_DISABLE = 0,
0041     LM355x_PMODE_ENABLE = 0x04,
0042 };
0043 
0044 /*
0045  * struct lm3554_platform_data
0046  * @pin_strobe: strobe input
0047  * @pin_torch : input pin
0048  *              lm3554-tx1/torch/gpio1
0049  *              lm3556-torch
0050  * @pin_tx2   : input pin
0051  *              lm3554-envm/tx2/gpio2
0052  *              lm3556-tx pin
0053  * @ntc_pin  : output pin
0054  *              lm3554-ledi/ntc
0055  *              lm3556-temp pin
0056  * @pass_mode : pass mode
0057  */
0058 struct lm355x_platform_data {
0059     enum lm355x_strobe pin_strobe;
0060     enum lm355x_torch pin_tx1;
0061     enum lm355x_tx2 pin_tx2;
0062     enum lm355x_ntc ntc_pin;
0063 
0064     enum lm355x_pmode pass_mode;
0065 };