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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2023 Richtek Technology Corp.
 *
 * Authors:
 *   Alice Chen <[email protected]>
 *   ChiYuan Huang <[email protected]>
 */

#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/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 {};

/* Virtual definition for multicolor */

#define MT6370_REG_FLEDEN
#define MT6370_REG_STRBTO
#define MT6370_REG_CHGSTAT2
#define MT6370_REG_FLEDSTAT1
#define MT6370_REG_FLEDISTRB(_id)
#define MT6370_REG_FLEDITOR(_id)
#define MT6370_ITORCH_MASK
#define MT6370_ISTROBE_MASK
#define MT6370_STRBTO_MASK
#define MT6370_TORCHEN_MASK
#define MT6370_STROBEN_MASK
#define MT6370_FLCSEN_MASK(_id)
#define MT6370_FLCSEN_MASK_ALL
#define MT6370_FLEDCHGVINOVP_MASK
#define MT6370_FLED1STRBTO_MASK
#define MT6370_FLED2STRBTO_MASK
#define MT6370_FLED1STRB_MASK
#define MT6370_FLED2STRB_MASK
#define MT6370_FLED1SHORT_MASK
#define MT6370_FLED2SHORT_MASK
#define MT6370_FLEDLVF_MASK

#define MT6370_LED_JOINT
#define MT6370_RANGE_FLED_REG
#define MT6370_ITORCH_MIN_uA
#define MT6370_ITORCH_STEP_uA
#define MT6370_ITORCH_MAX_uA
#define MT6370_ITORCH_DOUBLE_MAX_uA
#define MT6370_ISTRB_MIN_uA
#define MT6370_ISTRB_STEP_uA
#define MT6370_ISTRB_MAX_uA
#define MT6370_ISTRB_DOUBLE_MAX_uA
#define MT6370_STRBTO_MIN_US
#define MT6370_STRBTO_STEP_US
#define MT6370_STRBTO_MAX_US

#define to_mt6370_led(ptr, member)

struct mt6370_led {};

struct mt6370_priv {};

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

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

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

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

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

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

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

static const struct led_flash_ops mt6370_flash_ops =;

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

static const struct v4l2_flash_ops v4l2_flash_ops =;

static void mt6370_init_v4l2_flash_config(struct mt6370_led *led, struct v4l2_flash_config *cfg)
{}
#else
static const struct v4l2_flash_ops v4l2_flash_ops;
static void mt6370_init_v4l2_flash_config(struct mt6370_led *led, struct v4l2_flash_config *cfg)
{
}
#endif

static void mt6370_v4l2_flash_release(void *v4l2_flash)
{}

static int mt6370_led_register(struct device *parent, struct mt6370_led *led,
			       struct fwnode_handle *fwnode)
{}

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

static int mt6370_init_flash_properties(struct device *dev, struct mt6370_led *led,
					struct fwnode_handle *fwnode)
{}

static int mt6370_led_probe(struct platform_device *pdev)
{}

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

static struct platform_driver mt6370_led_driver =;
module_platform_driver();

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