#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>
#define SKY81452_REG0 …
#define SKY81452_REG1 …
#define SKY81452_REG2 …
#define SKY81452_REG4 …
#define SKY81452_REG5 …
#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 { … };
#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(…) …;