linux/include/linux/led-lm3530.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2011 ST-Ericsson SA.
 * Copyright (C) 2009 Motorola, Inc.
 *
 * Simple driver for National Semiconductor LM35330 Backlight driver chip
 *
 * Author: Shreshtha Kumar SAHU <[email protected]>
 * based on leds-lm3530.c by Dan Murphy <[email protected]>
 */

#ifndef _LINUX_LED_LM3530_H__
#define _LINUX_LED_LM3530_H__

#define LM3530_FS_CURR_5mA
#define LM3530_FS_CURR_8mA
#define LM3530_FS_CURR_12mA
#define LM3530_FS_CURR_15mA
#define LM3530_FS_CURR_19mA
#define LM3530_FS_CURR_22mA
#define LM3530_FS_CURR_26mA
#define LM3530_FS_CURR_29mA

#define LM3530_ALS_AVRG_TIME_32ms
#define LM3530_ALS_AVRG_TIME_64ms
#define LM3530_ALS_AVRG_TIME_128ms
#define LM3530_ALS_AVRG_TIME_256ms
#define LM3530_ALS_AVRG_TIME_512ms
#define LM3530_ALS_AVRG_TIME_1024ms
#define LM3530_ALS_AVRG_TIME_2048ms
#define LM3530_ALS_AVRG_TIME_4096ms

#define LM3530_RAMP_TIME_1ms
#define LM3530_RAMP_TIME_130ms
#define LM3530_RAMP_TIME_260ms
#define LM3530_RAMP_TIME_520ms
#define LM3530_RAMP_TIME_1s
#define LM3530_RAMP_TIME_2s
#define LM3530_RAMP_TIME_4s
#define LM3530_RAMP_TIME_8s

/* ALS Resistor Select */
#define LM3530_ALS_IMPD_Z
#define LM3530_ALS_IMPD_13_53kOhm
#define LM3530_ALS_IMPD_9_01kOhm
#define LM3530_ALS_IMPD_5_41kOhm
#define LM3530_ALS_IMPD_2_27kOhm
#define LM3530_ALS_IMPD_1_94kOhm
#define LM3530_ALS_IMPD_1_81kOhm
#define LM3530_ALS_IMPD_1_6kOhm
#define LM3530_ALS_IMPD_1_138kOhm
#define LM3530_ALS_IMPD_1_05kOhm
#define LM3530_ALS_IMPD_1_011kOhm
#define LM3530_ALS_IMPD_941Ohm
#define LM3530_ALS_IMPD_759Ohm
#define LM3530_ALS_IMPD_719Ohm
#define LM3530_ALS_IMPD_700Ohm
#define LM3530_ALS_IMPD_667Ohm

enum lm3530_mode {};

/* ALS input select */
enum lm3530_als_mode {};

/* PWM Platform Specific Data */
struct lm3530_pwm_data {};

/**
 * struct lm3530_platform_data
 * @mode: mode of operation i.e. Manual, ALS or PWM
 * @als_input_mode: select source of ALS input - ALS1/2 or average
 * @max_current: full scale LED current
 * @pwm_pol_hi: PWM input polarity - active high/active low
 * @als_avrg_time: ALS input averaging time
 * @brt_ramp_law: brightness mapping mode - exponential/linear
 * @brt_ramp_fall: rate of fall of led current
 * @brt_ramp_rise: rate of rise of led current
 * @als1_resistor_sel: internal resistance from ALS1 input to ground
 * @als2_resistor_sel: internal resistance from ALS2 input to ground
 * @als_vmin: als input voltage calibrated for max brightness in mV
 * @als_vmax: als input voltage calibrated for min brightness in mV
 * @brt_val: brightness value (0-127)
 * @pwm_data: PWM control functions (only valid when the mode is PWM)
 */
struct lm3530_platform_data {};

#endif	/* _LINUX_LED_LM3530_H__ */