#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/led-class-flash.h>
#include <linux/leds.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/property.h>
#include <linux/slab.h>
#include <media/v4l2-flash-led-class.h>
#define AS_TIMER_US_TO_CODE(t) …
#define AS_TIMER_CODE_TO_US(c) …
#define AS_DESIGN_INFO_REG …
#define AS_DESIGN_INFO_FACTORY(x) …
#define AS_DESIGN_INFO_MODEL(x) …
#define AS_VERSION_CONTROL_REG …
#define AS_VERSION_CONTROL_RFU(x) …
#define AS_VERSION_CONTROL_VERSION(x) …
#define AS_INDICATOR_AND_TIMER_REG …
#define AS_INDICATOR_AND_TIMER_TIMEOUT_SHIFT …
#define AS_INDICATOR_AND_TIMER_VREF_SHIFT …
#define AS_INDICATOR_AND_TIMER_INDICATOR_SHIFT …
#define AS_CURRENT_SET_REG …
#define AS_CURRENT_ASSIST_LIGHT_SHIFT …
#define AS_CURRENT_LED_DET_ON …
#define AS_CURRENT_FLASH_CURRENT_SHIFT …
#define AS_CONTROL_REG …
#define AS_CONTROL_MODE_SETTING_SHIFT …
#define AS_CONTROL_STROBE_ON …
#define AS_CONTROL_OUT_ON …
#define AS_CONTROL_EXT_TORCH_ON …
#define AS_CONTROL_STROBE_TYPE_EDGE …
#define AS_CONTROL_STROBE_TYPE_LEVEL …
#define AS_CONTROL_COIL_PEAK_SHIFT …
#define AS_FAULT_INFO_REG …
#define AS_FAULT_INFO_INDUCTOR_PEAK_LIMIT …
#define AS_FAULT_INFO_INDICATOR_LED …
#define AS_FAULT_INFO_LED_AMOUNT …
#define AS_FAULT_INFO_TIMEOUT …
#define AS_FAULT_INFO_OVER_TEMPERATURE …
#define AS_FAULT_INFO_SHORT_CIRCUIT …
#define AS_FAULT_INFO_OVER_VOLTAGE …
#define AS_BOOST_REG …
#define AS_BOOST_CURRENT_DISABLE …
#define AS_BOOST_CURRENT_ENABLE …
#define AS_PASSWORD_REG …
#define AS_PASSWORD_UNLOCK_VALUE …
#define AS_NAME …
#define AS_I2C_ADDR …
#define AS_FLASH_TIMEOUT_MIN …
#define AS_FLASH_TIMEOUT_MAX …
#define AS_FLASH_TIMEOUT_STEP …
#define AS_FLASH_INTENSITY_MIN …
#define AS_FLASH_INTENSITY_MAX_1LED …
#define AS_FLASH_INTENSITY_MAX_2LEDS …
#define AS_FLASH_INTENSITY_STEP …
#define AS_TORCH_INTENSITY_MIN …
#define AS_TORCH_INTENSITY_MAX …
#define AS_TORCH_INTENSITY_STEP …
#define AS_INDICATOR_INTENSITY_MIN …
#define AS_INDICATOR_INTENSITY_MAX …
#define AS_INDICATOR_INTENSITY_STEP …
#define AS_PEAK_mA_MAX …
#define AS_PEAK_mA_TO_REG(a) …
#define AS_LED_FLASH …
#define AS_LED_INDICATOR …
enum as_mode { … };
struct as3645a_config { … };
struct as3645a { … };
#define fled_to_as3645a(__fled) …
#define iled_cdev_to_as3645a(__iled_cdev) …
static int as3645a_write(struct as3645a *flash, u8 addr, u8 val)
{ … }
static int as3645a_read(struct as3645a *flash, u8 addr)
{ … }
static int as3645a_set_current(struct as3645a *flash)
{ … }
static int as3645a_set_timeout(struct as3645a *flash)
{ … }
static int
as3645a_set_control(struct as3645a *flash, enum as_mode mode, bool on)
{ … }
static int as3645a_get_fault(struct led_classdev_flash *fled, u32 *fault)
{ … }
static unsigned int __as3645a_current_to_reg(unsigned int min, unsigned int max,
unsigned int step,
unsigned int val)
{ … }
static unsigned int as3645a_current_to_reg(struct as3645a *flash, bool is_flash,
unsigned int ua)
{ … }
static int as3645a_set_indicator_brightness(struct led_classdev *iled_cdev,
enum led_brightness brightness)
{ … }
static int as3645a_set_assist_brightness(struct led_classdev *fled_cdev,
enum led_brightness brightness)
{ … }
static int as3645a_set_flash_brightness(struct led_classdev_flash *fled,
u32 brightness_ua)
{ … }
static int as3645a_set_flash_timeout(struct led_classdev_flash *fled,
u32 timeout_us)
{ … }
static int as3645a_set_strobe(struct led_classdev_flash *fled, bool state)
{ … }
static const struct led_flash_ops as3645a_led_flash_ops = …;
static int as3645a_setup(struct as3645a *flash)
{ … }
static int as3645a_detect(struct as3645a *flash)
{ … }
static int as3645a_parse_node(struct device *dev, struct as3645a *flash)
{ … }
static int as3645a_led_class_setup(struct as3645a *flash)
{ … }
static int as3645a_v4l2_setup(struct as3645a *flash)
{ … }
static int as3645a_probe(struct i2c_client *client)
{ … }
static void as3645a_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id as3645a_id_table[] = …;
MODULE_DEVICE_TABLE(i2c, as3645a_id_table);
static const struct of_device_id as3645a_of_table[] = …;
MODULE_DEVICE_TABLE(of, as3645a_of_table);
static struct i2c_driver as3645a_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;