linux/drivers/leds/leds-lm3642.c

// SPDX-License-Identifier: GPL-2.0-only
/*
* Simple driver for Texas Instruments LM3642 LED Flash driver chip
* Copyright (C) 2012 Texas Instruments
*/
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/leds.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <linux/fs.h>
#include <linux/regmap.h>
#include <linux/platform_data/leds-lm3642.h>

#define REG_FILT_TIME
#define REG_IVFM_MODE
#define REG_TORCH_TIME
#define REG_FLASH
#define REG_I_CTRL
#define REG_ENABLE
#define REG_FLAG
#define REG_MAX

#define UVLO_EN_SHIFT
#define IVM_D_TH_SHIFT
#define TORCH_RAMP_UP_TIME_SHIFT
#define TORCH_RAMP_DN_TIME_SHIFT
#define INDUCTOR_I_LIMIT_SHIFT
#define FLASH_RAMP_TIME_SHIFT
#define FLASH_TOUT_TIME_SHIFT
#define TORCH_I_SHIFT
#define FLASH_I_SHIFT
#define IVFM_SHIFT
#define TX_PIN_EN_SHIFT
#define STROBE_PIN_EN_SHIFT
#define TORCH_PIN_EN_SHIFT
#define MODE_BITS_SHIFT

#define UVLO_EN_MASK
#define IVM_D_TH_MASK
#define TORCH_RAMP_UP_TIME_MASK
#define TORCH_RAMP_DN_TIME_MASK
#define INDUCTOR_I_LIMIT_MASK
#define FLASH_RAMP_TIME_MASK
#define FLASH_TOUT_TIME_MASK
#define TORCH_I_MASK
#define FLASH_I_MASK
#define IVFM_MASK
#define TX_PIN_EN_MASK
#define STROBE_PIN_EN_MASK
#define TORCH_PIN_EN_MASK
#define MODE_BITS_MASK
#define EX_PIN_CONTROL_MASK
#define EX_PIN_ENABLE_MASK

enum lm3642_mode {};

struct lm3642_chip_data {};

/* chip initialize */
static int lm3642_chip_init(struct lm3642_chip_data *chip)
{}

/* chip control */
static int lm3642_control(struct lm3642_chip_data *chip,
			  u8 brightness, enum lm3642_mode opmode)
{}

/* torch */

/* torch pin config for lm3642 */
static ssize_t torch_pin_store(struct device *dev,
			       struct device_attribute *attr,
			       const char *buf, size_t size)
{}

static DEVICE_ATTR_WO(torch_pin);

static int lm3642_torch_brightness_set(struct led_classdev *cdev,
					enum led_brightness brightness)
{}

/* flash */

/* strobe pin config for lm3642*/
static ssize_t strobe_pin_store(struct device *dev,
				struct device_attribute *attr,
				const char *buf, size_t size)
{}

static DEVICE_ATTR_WO(strobe_pin);

static int lm3642_strobe_brightness_set(struct led_classdev *cdev,
					 enum led_brightness brightness)
{}

/* indicator */
static int lm3642_indicator_brightness_set(struct led_classdev *cdev,
					    enum led_brightness brightness)
{}

static const struct regmap_config lm3642_regmap =;

static struct attribute *lm3642_flash_attrs[] =;
ATTRIBUTE_GROUPS();

static struct attribute *lm3642_torch_attrs[] =;
ATTRIBUTE_GROUPS();

static int lm3642_probe(struct i2c_client *client)
{}

static void lm3642_remove(struct i2c_client *client)
{}

static const struct i2c_device_id lm3642_id[] =;

MODULE_DEVICE_TABLE(i2c, lm3642_id);

static struct i2c_driver lm3642_i2c_driver =;

module_i2c_driver();

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