linux/drivers/leds/flash/leds-mt6360.c

// SPDX-License-Identifier: GPL-2.0-only

#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/led-class-flash.h>
#include <linux/led-class-multicolor.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <media/v4l2-flash-led-class.h>

enum {};

#define MT6360_REG_RGBEN
#define MT6360_REG_ISNK(_led_no)
#define MT6360_ISNK_ENMASK(_led_no)
#define MT6360_ISNK_MASK
#define MT6360_CHRINDSEL_MASK

/* Virtual definition for multicolor */
#define MT6360_VIRTUAL_MULTICOLOR
#define MULTICOLOR_NUM_CHANNELS

#define MT6360_REG_FLEDEN
#define MT6360_REG_STRBTO
#define MT6360_REG_FLEDBASE(_id)
#define MT6360_REG_FLEDISTRB(_id)
#define MT6360_REG_FLEDITOR(_id)
#define MT6360_REG_CHGSTAT2
#define MT6360_REG_FLEDSTAT1
#define MT6360_ITORCH_MASK
#define MT6360_ISTROBE_MASK
#define MT6360_STRBTO_MASK
#define MT6360_TORCHEN_MASK
#define MT6360_STROBEN_MASK
#define MT6360_FLCSEN_MASK(_id)
#define MT6360_FLEDCHGVINOVP_MASK
#define MT6360_FLED1STRBTO_MASK
#define MT6360_FLED2STRBTO_MASK
#define MT6360_FLED1STRB_MASK
#define MT6360_FLED2STRB_MASK
#define MT6360_FLED1SHORT_MASK
#define MT6360_FLED2SHORT_MASK
#define MT6360_FLEDLVF_MASK

#define MT6360_ISNKRGB_STEPUA
#define MT6360_ISNKRGB_MAXUA
#define MT6360_ISNKML_STEPUA
#define MT6360_ISNKML_MAXUA

#define MT6360_ITORCH_MINUA
#define MT6360_ITORCH_STEPUA
#define MT6360_ITORCH_MAXUA
#define MT6360_ISTRB_MINUA
#define MT6360_ISTRB_STEPUA
#define MT6360_ISTRB_MAXUA
#define MT6360_STRBTO_MINUS
#define MT6360_STRBTO_STEPUS
#define MT6360_STRBTO_MAXUS

struct mt6360_led {};

struct mt6360_priv {};

static int mt6360_mc_brightness_set(struct led_classdev *lcdev,
				    enum led_brightness level)
{}

static int mt6360_isnk_brightness_set(struct led_classdev *lcdev,
				      enum led_brightness level)
{}

static int mt6360_torch_brightness_set(struct led_classdev *lcdev,
				       enum led_brightness level)
{}

static int mt6360_flash_brightness_set(struct led_classdev_flash *fl_cdev,
				       u32 brightness)
{}

static int _mt6360_flash_brightness_set(struct led_classdev_flash *fl_cdev,
					u32 brightness)
{}

static int mt6360_strobe_set(struct led_classdev_flash *fl_cdev, bool state)
{}

static int mt6360_strobe_get(struct led_classdev_flash *fl_cdev, bool *state)
{}

static int mt6360_timeout_set(struct led_classdev_flash *fl_cdev, u32 timeout)
{}

static int mt6360_fault_get(struct led_classdev_flash *fl_cdev, u32 *fault)
{}

static const struct led_flash_ops mt6360_flash_ops =;

static int mt6360_isnk_init_default_state(struct mt6360_led *led)
{}

static int mt6360_flash_init_default_state(struct mt6360_led *led)
{}

#if IS_ENABLED(CONFIG_V4L2_FLASH_LED_CLASS)
static int mt6360_flash_external_strobe_set(struct v4l2_flash *v4l2_flash,
					    bool enable)
{}

static const struct v4l2_flash_ops v4l2_flash_ops =;

static void mt6360_init_v4l2_flash_config(struct mt6360_led *led,
					  struct v4l2_flash_config *config)
{}
#else
static const struct v4l2_flash_ops v4l2_flash_ops;
static void mt6360_init_v4l2_flash_config(struct mt6360_led *led,
					  struct v4l2_flash_config *config)
{
}
#endif

static int mt6360_led_register(struct device *parent, struct mt6360_led *led,
				struct led_init_data *init_data)
{}

static u32 clamp_align(u32 val, u32 min, u32 max, u32 step)
{}

static int mt6360_init_isnk_properties(struct mt6360_led *led,
				       struct led_init_data *init_data)
{}

static int mt6360_init_flash_properties(struct mt6360_led *led,
					struct led_init_data *init_data)
{}

static void mt6360_v4l2_flash_release(struct mt6360_priv *priv)
{}

static int mt6360_led_probe(struct platform_device *pdev)
{}

static void mt6360_led_remove(struct platform_device *pdev)
{}

static const struct of_device_id __maybe_unused mt6360_led_of_id[] =;
MODULE_DEVICE_TABLE(of, mt6360_led_of_id);

static struct platform_driver mt6360_led_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();