linux/drivers/leds/leds-sc27xx-bltc.c

// SPDX-License-Identifier: GPL-2.0
// Copyright (C) 2018 Spreadtrum Communications Inc.

#include <linux/leds.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>

/* PMIC global control register definition */
#define SC27XX_MODULE_EN0
#define SC27XX_CLK_EN0
#define SC27XX_RGB_CTRL

#define SC27XX_BLTC_EN
#define SC27XX_RTC_EN
#define SC27XX_RGB_PD

/* Breathing light controller register definition */
#define SC27XX_LEDS_CTRL
#define SC27XX_LEDS_PRESCALE
#define SC27XX_LEDS_DUTY
#define SC27XX_LEDS_CURVE0
#define SC27XX_LEDS_CURVE1

#define SC27XX_CTRL_SHIFT
#define SC27XX_LED_RUN
#define SC27XX_LED_TYPE

#define SC27XX_DUTY_SHIFT
#define SC27XX_DUTY_MASK
#define SC27XX_MOD_MASK

#define SC27XX_CURVE_SHIFT
#define SC27XX_CURVE_L_MASK
#define SC27XX_CURVE_H_MASK

#define SC27XX_LEDS_OFFSET
#define SC27XX_LEDS_MAX
#define SC27XX_LEDS_PATTERN_CNT
/* Stage duration step, in milliseconds */
#define SC27XX_LEDS_STEP
/* Minimum and maximum duration, in milliseconds */
#define SC27XX_DELTA_T_MIN
#define SC27XX_DELTA_T_MAX

struct sc27xx_led {};

struct sc27xx_led_priv {};

#define to_sc27xx_led(ldev)

static int sc27xx_led_init(struct regmap *regmap)
{}

static u32 sc27xx_led_get_offset(struct sc27xx_led *leds)
{}

static int sc27xx_led_enable(struct sc27xx_led *leds, enum led_brightness value)
{}

static int sc27xx_led_disable(struct sc27xx_led *leds)
{}

static int sc27xx_led_set(struct led_classdev *ldev, enum led_brightness value)
{}

static void sc27xx_led_clamp_align_delta_t(u32 *delta_t)
{}

static int sc27xx_led_pattern_clear(struct led_classdev *ldev)
{}

static int sc27xx_led_pattern_set(struct led_classdev *ldev,
				  struct led_pattern *pattern,
				  u32 len, int repeat)
{}

static int sc27xx_led_register(struct device *dev, struct sc27xx_led_priv *priv)
{}

static int sc27xx_led_probe(struct platform_device *pdev)
{}

static void sc27xx_led_remove(struct platform_device *pdev)
{}

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

static struct platform_driver sc27xx_led_driver =;

module_platform_driver();

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