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

TOMOYO Linux Cross Reference
Linux/include/media/i2c/lm3560.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  * include/media/i2c/lm3560.h
  4  *
  5  * Copyright (C) 2013 Texas Instruments
  6  *
  7  * Contact: Daniel Jeong <gshark.jeong@gmail.com>
  8  *                      Ldd-Mlp <ldd-mlp@list.ti.com>
  9  */
 10 
 11 #ifndef __LM3560_H__
 12 #define __LM3560_H__
 13 
 14 #include <media/v4l2-subdev.h>
 15 
 16 #define LM3559_NAME     "lm3559"
 17 #define LM3560_NAME     "lm3560"
 18 #define LM3560_I2C_ADDR (0x53)
 19 
 20 /*  FLASH Brightness
 21  *      min 62500uA, step 62500uA, max 1000000uA
 22  */
 23 #define LM3560_FLASH_BRT_MIN 62500
 24 #define LM3560_FLASH_BRT_STEP 62500
 25 #define LM3560_FLASH_BRT_MAX 1000000
 26 #define LM3560_FLASH_BRT_uA_TO_REG(a)   \
 27         ((a) < LM3560_FLASH_BRT_MIN ? 0 :       \
 28          (((a) - LM3560_FLASH_BRT_MIN) / LM3560_FLASH_BRT_STEP))
 29 #define LM3560_FLASH_BRT_REG_TO_uA(a)           \
 30         ((a) * LM3560_FLASH_BRT_STEP + LM3560_FLASH_BRT_MIN)
 31 
 32 /*  FLASH TIMEOUT DURATION
 33  *      min 32ms, step 32ms, max 1024ms
 34  */
 35 #define LM3560_FLASH_TOUT_MIN 32
 36 #define LM3560_FLASH_TOUT_STEP 32
 37 #define LM3560_FLASH_TOUT_MAX 1024
 38 #define LM3560_FLASH_TOUT_ms_TO_REG(a)  \
 39         ((a) < LM3560_FLASH_TOUT_MIN ? 0 :      \
 40          (((a) - LM3560_FLASH_TOUT_MIN) / LM3560_FLASH_TOUT_STEP))
 41 #define LM3560_FLASH_TOUT_REG_TO_ms(a)          \
 42         ((a) * LM3560_FLASH_TOUT_STEP + LM3560_FLASH_TOUT_MIN)
 43 
 44 /*  TORCH BRT
 45  *      min 31250uA, step 31250uA, max 250000uA
 46  */
 47 #define LM3560_TORCH_BRT_MIN 31250
 48 #define LM3560_TORCH_BRT_STEP 31250
 49 #define LM3560_TORCH_BRT_MAX 250000
 50 #define LM3560_TORCH_BRT_uA_TO_REG(a)   \
 51         ((a) < LM3560_TORCH_BRT_MIN ? 0 :       \
 52          (((a) - LM3560_TORCH_BRT_MIN) / LM3560_TORCH_BRT_STEP))
 53 #define LM3560_TORCH_BRT_REG_TO_uA(a)           \
 54         ((a) * LM3560_TORCH_BRT_STEP + LM3560_TORCH_BRT_MIN)
 55 
 56 enum lm3560_led_id {
 57         LM3560_LED0 = 0,
 58         LM3560_LED1,
 59         LM3560_LED_MAX
 60 };
 61 
 62 enum lm3560_peak_current {
 63         LM3560_PEAK_1600mA = 0x00,
 64         LM3560_PEAK_2300mA = 0x20,
 65         LM3560_PEAK_3000mA = 0x40,
 66         LM3560_PEAK_3600mA = 0x60
 67 };
 68 
 69 /* struct lm3560_platform_data
 70  *
 71  * @peak :  peak current
 72  * @max_flash_timeout: flash timeout
 73  * @max_flash_brt: flash mode led brightness
 74  * @max_torch_brt: torch mode led brightness
 75  */
 76 struct lm3560_platform_data {
 77         enum lm3560_peak_current peak;
 78 
 79         u32 max_flash_timeout;
 80         u32 max_flash_brt[LM3560_LED_MAX];
 81         u32 max_torch_brt[LM3560_LED_MAX];
 82 };
 83 
 84 #endif /* __LM3560_H__ */
 85 

~ [ 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