linux/drivers/leds/leds-lp8860.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * TI LP8860 4-Channel LED Driver
 *
 * Copyright (C) 2014 Texas Instruments
 *
 * Author: Dan Murphy <[email protected]>
 */

#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/leds.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/gpio/consumer.h>
#include <linux/slab.h>

#define LP8860_DISP_CL1_BRT_MSB
#define LP8860_DISP_CL1_BRT_LSB
#define LP8860_DISP_CL1_CURR_MSB
#define LP8860_DISP_CL1_CURR_LSB
#define LP8860_CL2_BRT_MSB
#define LP8860_CL2_BRT_LSB
#define LP8860_CL2_CURRENT
#define LP8860_CL3_BRT_MSB
#define LP8860_CL3_BRT_LSB
#define LP8860_CL3_CURRENT
#define LP8860_CL4_BRT_MSB
#define LP8860_CL4_BRT_LSB
#define LP8860_CL4_CURRENT
#define LP8860_CONFIG
#define LP8860_STATUS
#define LP8860_FAULT
#define LP8860_LED_FAULT
#define LP8860_FAULT_CLEAR
#define LP8860_ID
#define LP8860_TEMP_MSB
#define LP8860_TEMP_LSB
#define LP8860_DISP_LED_CURR_MSB
#define LP8860_DISP_LED_CURR_LSB
#define LP8860_DISP_LED_PWM_MSB
#define LP8860_DISP_LED_PWM_LSB
#define LP8860_EEPROM_CNTRL
#define LP8860_EEPROM_UNLOCK

#define LP8860_EEPROM_REG_0
#define LP8860_EEPROM_REG_1
#define LP8860_EEPROM_REG_2
#define LP8860_EEPROM_REG_3
#define LP8860_EEPROM_REG_4
#define LP8860_EEPROM_REG_5
#define LP8860_EEPROM_REG_6
#define LP8860_EEPROM_REG_7
#define LP8860_EEPROM_REG_8
#define LP8860_EEPROM_REG_9
#define LP8860_EEPROM_REG_10
#define LP8860_EEPROM_REG_11
#define LP8860_EEPROM_REG_12
#define LP8860_EEPROM_REG_13
#define LP8860_EEPROM_REG_14
#define LP8860_EEPROM_REG_15
#define LP8860_EEPROM_REG_16
#define LP8860_EEPROM_REG_17
#define LP8860_EEPROM_REG_18
#define LP8860_EEPROM_REG_19
#define LP8860_EEPROM_REG_20
#define LP8860_EEPROM_REG_21
#define LP8860_EEPROM_REG_22
#define LP8860_EEPROM_REG_23
#define LP8860_EEPROM_REG_24

#define LP8860_LOCK_EEPROM
#define LP8860_UNLOCK_EEPROM
#define LP8860_PROGRAM_EEPROM
#define LP8860_EEPROM_CODE_1
#define LP8860_EEPROM_CODE_2
#define LP8860_EEPROM_CODE_3

#define LP8860_CLEAR_FAULTS

#define LP8860_NAME

/**
 * struct lp8860_led
 * @lock: Lock for reading/writing the device
 * @client: Pointer to the I2C client
 * @led_dev: led class device pointer
 * @regmap: Devices register map
 * @eeprom_regmap: EEPROM register map
 * @enable_gpio: VDDIO/EN gpio to enable communication interface
 * @regulator: LED supply regulator pointer
 */
struct lp8860_led {};

struct lp8860_eeprom_reg {};

static struct lp8860_eeprom_reg lp8860_eeprom_disp_regs[] =;

static int lp8860_unlock_eeprom(struct lp8860_led *led, int lock)
{}

static int lp8860_fault_check(struct lp8860_led *led)
{}

static int lp8860_brightness_set(struct led_classdev *led_cdev,
				enum led_brightness brt_val)
{}

static int lp8860_init(struct lp8860_led *led)
{}

static const struct reg_default lp8860_reg_defs[] =;

static const struct regmap_config lp8860_regmap_config =;

static const struct reg_default lp8860_eeprom_defs[] =;

static const struct regmap_config lp8860_eeprom_regmap_config =;

static int lp8860_probe(struct i2c_client *client)
{}

static void lp8860_remove(struct i2c_client *client)
{}

static const struct i2c_device_id lp8860_id[] =;
MODULE_DEVICE_TABLE(i2c, lp8860_id);

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

static struct i2c_driver lp8860_driver =;
module_i2c_driver();

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