#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/led-class-flash.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#define SY7802_MAX_LEDS …
#define SY7802_LED_JOINT …
#define SY7802_REG_ENABLE …
#define SY7802_REG_TORCH_BRIGHTNESS …
#define SY7802_REG_FLASH_BRIGHTNESS …
#define SY7802_REG_FLASH_DURATION …
#define SY7802_REG_FLAGS …
#define SY7802_REG_CONFIG_1 …
#define SY7802_REG_CONFIG_2 …
#define SY7802_REG_VIN_MONITOR …
#define SY7802_REG_LAST_FLASH …
#define SY7802_REG_VLED_MONITOR …
#define SY7802_REG_ADC_DELAY …
#define SY7802_REG_DEV_ID …
#define SY7802_MODE_OFF …
#define SY7802_MODE_TORCH …
#define SY7802_MODE_FLASH …
#define SY7802_MODE_MASK …
#define SY7802_LEDS_SHIFT …
#define SY7802_LEDS_MASK(_id) …
#define SY7802_LEDS_MASK_ALL …
#define SY7802_TORCH_CURRENT_SHIFT …
#define SY7802_TORCH_CURRENT_MASK(_id) …
#define SY7802_TORCH_CURRENT_MASK_ALL …
#define SY7802_FLASH_CURRENT_SHIFT …
#define SY7802_FLASH_CURRENT_MASK(_id) …
#define SY7802_FLASH_CURRENT_MASK_ALL …
#define SY7802_TIMEOUT_DEFAULT_US …
#define SY7802_TIMEOUT_MIN_US …
#define SY7802_TIMEOUT_MAX_US …
#define SY7802_TIMEOUT_STEPSIZE_US …
#define SY7802_TORCH_BRIGHTNESS_MAX …
#define SY7802_FLASH_BRIGHTNESS_DEFAULT …
#define SY7802_FLASH_BRIGHTNESS_MIN …
#define SY7802_FLASH_BRIGHTNESS_MAX …
#define SY7802_FLASH_BRIGHTNESS_STEP …
#define SY7802_FLAG_TIMEOUT …
#define SY7802_FLAG_THERMAL_SHUTDOWN …
#define SY7802_FLAG_LED_FAULT …
#define SY7802_FLAG_TX1_INTERRUPT …
#define SY7802_FLAG_TX2_INTERRUPT …
#define SY7802_FLAG_LED_THERMAL_FAULT …
#define SY7802_FLAG_FLASH_INPUT_VOLTAGE_LOW …
#define SY7802_FLAG_INPUT_VOLTAGE_LOW …
#define SY7802_CHIP_ID …
static const struct reg_default sy7802_regmap_defs[] = …;
struct sy7802_led { … };
struct sy7802 { … };
static int sy7802_torch_brightness_set(struct led_classdev *lcdev, enum led_brightness brightness)
{ … }
static int sy7802_flash_brightness_set(struct led_classdev_flash *fl_cdev, u32 brightness)
{ … }
static int sy7802_strobe_set(struct led_classdev_flash *fl_cdev, bool state)
{ … }
static int sy7802_strobe_get(struct led_classdev_flash *fl_cdev, bool *state)
{ … }
static int sy7802_timeout_set(struct led_classdev_flash *fl_cdev, u32 timeout)
{ … }
static int sy7802_fault_get(struct led_classdev_flash *fl_cdev, u32 *fault)
{ … }
static const struct led_flash_ops sy7802_flash_ops = …;
static void sy7802_init_flash_brightness(struct led_classdev_flash *fl_cdev)
{ … }
static void sy7802_init_flash_timeout(struct led_classdev_flash *fl_cdev)
{ … }
static int sy7802_led_register(struct device *dev, struct sy7802_led *led,
struct device_node *np)
{ … }
static int sy7802_init_flash_properties(struct device *dev, struct sy7802_led *led,
struct device_node *np)
{ … }
static int sy7802_chip_check(struct sy7802 *chip)
{ … }
static void sy7802_enable(struct sy7802 *chip)
{ … }
static void sy7802_disable(struct sy7802 *chip)
{ … }
static int sy7802_probe_dt(struct sy7802 *chip)
{ … }
static void sy7802_chip_disable_action(void *data)
{ … }
static void sy7802_regulator_disable_action(void *data)
{ … }
static const struct regmap_config sy7802_regmap_config = …;
static int sy7802_probe(struct i2c_client *client)
{ … }
static const struct of_device_id __maybe_unused sy7802_leds_match[] = …;
MODULE_DEVICE_TABLE(of, sy7802_leds_match);
static struct i2c_driver sy7802_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;