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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * sky81452-backlight.c	SKY81452 backlight driver
 *
 * Copyright 2014 Skyworks Solutions Inc.
 * Author : Gyungoh Yoo <[email protected]>
 */

#include <linux/backlight.h>
#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/slab.h>

/* registers */
#define SKY81452_REG0
#define SKY81452_REG1
#define SKY81452_REG2
#define SKY81452_REG4
#define SKY81452_REG5

/* bit mask */
#define SKY81452_CS
#define SKY81452_EN
#define SKY81452_IGPW
#define SKY81452_PWMMD
#define SKY81452_PHASE
#define SKY81452_ILIM
#define SKY81452_VSHRT
#define SKY81452_OCP
#define SKY81452_OTMP
#define SKY81452_SHRT
#define SKY81452_OPN

#define SKY81452_DEFAULT_NAME
#define SKY81452_MAX_BRIGHTNESS

/**
 * struct sky81452_bl_platform_data - backlight platform data
 * @name:	backlight driver name.
 *		If it is not defined, default name is lcd-backlight.
 * @gpiod_enable:GPIO descriptor which control EN pin
 * @enable:	Enable mask for current sink channel 1, 2, 3, 4, 5 and 6.
 * @ignore_pwm:	true if DPWMI should be ignored.
 * @dpwm_mode:	true is DPWM dimming mode, otherwise Analog dimming mode.
 * @phase_shift:true is phase shift mode.
 * @short_detection_threshold:	It should be one of 4, 5, 6 and 7V.
 * @boost_current_limit:	It should be one of 2300, 2750mA.
 */
struct sky81452_bl_platform_data {};

#define CTZ(b)

static int sky81452_bl_update_status(struct backlight_device *bd)
{}

static const struct backlight_ops sky81452_bl_ops =;

static ssize_t sky81452_bl_store_enable(struct device *dev,
		struct device_attribute *attr, const char *buf, size_t count)
{}

static ssize_t sky81452_bl_show_open_short(struct device *dev,
		struct device_attribute *attr, char *buf)
{}

static ssize_t sky81452_bl_show_fault(struct device *dev,
		struct device_attribute *attr, char *buf)
{}

static DEVICE_ATTR(enable, S_IWGRP | S_IWUSR, NULL, sky81452_bl_store_enable);
static DEVICE_ATTR(open, S_IRUGO, sky81452_bl_show_open_short, NULL);
static DEVICE_ATTR(short, S_IRUGO, sky81452_bl_show_open_short, NULL);
static DEVICE_ATTR(fault, S_IRUGO, sky81452_bl_show_fault, NULL);

static struct attribute *sky81452_bl_attribute[] =;

static const struct attribute_group sky81452_bl_attr_group =;

#ifdef CONFIG_OF
static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
							struct device *dev)
{}
#else
static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
							struct device *dev)
{
	return ERR_PTR(-EINVAL);
}
#endif

static int sky81452_bl_init_device(struct regmap *regmap,
		struct sky81452_bl_platform_data *pdata)
{}

static int sky81452_bl_probe(struct platform_device *pdev)
{}

static void sky81452_bl_remove(struct platform_device *pdev)
{}

#ifdef CONFIG_OF
static const struct of_device_id sky81452_bl_of_match[] =;
MODULE_DEVICE_TABLE(of, sky81452_bl_of_match);
#endif

static struct platform_driver sky81452_bl_driver =;

module_platform_driver();

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