linux/drivers/video/backlight/mt6370-backlight.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2022 Richtek Technology Corp.
 *
 * Author: ChiaEn Wu <[email protected]>
 */

#include <linux/backlight.h>
#include <linux/bitfield.h>
#include <linux/bits.h>
#include <linux/gpio/consumer.h>
#include <linux/kernel.h>
#include <linux/minmax.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/regmap.h>

#define MT6370_REG_DEV_INFO
#define MT6370_REG_BL_EN
#define MT6370_REG_BL_BSTCTRL
#define MT6370_REG_BL_PWM
#define MT6370_REG_BL_DIM2

#define MT6370_VENID_MASK
#define MT6370_BL_EXT_EN_MASK
#define MT6370_BL_EN_MASK
#define MT6370_BL_CODE_MASK
#define MT6370_BL_CH_MASK
#define MT6370_BL_CH_SHIFT
#define MT6370_BL_DIM2_COMMON_MASK
#define MT6370_BL_DIM2_COMMON_SHIFT
#define MT6370_BL_DIM2_6372_MASK
#define MT6370_BL_DIM2_6372_SHIFT
#define MT6370_BL_PWM_EN_MASK
#define MT6370_BL_PWM_HYS_EN_MASK
#define MT6370_BL_PWM_HYS_SEL_MASK
#define MT6370_BL_OVP_EN_MASK
#define MT6370_BL_OVP_SEL_MASK
#define MT6370_BL_OVP_SEL_SHIFT
#define MT6370_BL_OC_EN_MASK
#define MT6370_BL_OC_SEL_MASK
#define MT6370_BL_OC_SEL_SHIFT

#define MT6370_BL_PWM_HYS_TH_MIN_STEP
#define MT6370_BL_PWM_HYS_TH_MAX_STEP
#define MT6370_BL_OVP_MIN_UV
#define MT6370_BL_OVP_MAX_UV
#define MT6370_BL_OVP_STEP_UV
#define MT6370_BL_OCP_MIN_UA
#define MT6370_BL_OCP_MAX_UA
#define MT6370_BL_OCP_STEP_UA
#define MT6370_BL_MAX_COMMON_BRIGHTNESS
#define MT6370_BL_MAX_6372_BRIGHTNESS
#define MT6370_BL_MAX_CH

enum {};

struct mt6370_priv {};

static int mt6370_bl_update_status(struct backlight_device *bl_dev)
{}

static int mt6370_bl_get_brightness(struct backlight_device *bl_dev)
{}

static const struct backlight_ops mt6370_bl_ops =;

static int mt6370_init_backlight_properties(struct mt6370_priv *priv,
					    struct backlight_properties *props)
{}

static int mt6370_check_vendor_info(struct mt6370_priv *priv)
{}

static int mt6370_bl_probe(struct platform_device *pdev)
{}

static void mt6370_bl_remove(struct platform_device *pdev)
{}

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

static struct platform_driver mt6370_bl_driver =;
module_platform_driver();

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