#include <linux/bitfield.h>
#include <linux/bits.h>
#include <linux/container_of.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/leds.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/regmap.h>
#include <linux/time.h>
#include <linux/units.h>
#define AW200XX_DIM_MAX …
#define AW200XX_FADE_MAX …
#define AW200XX_IMAX_DEFAULT_uA …
#define AW200XX_IMAX_MAX_uA …
#define AW200XX_IMAX_MIN_uA …
#define AW200XX_REG_PAGE0_BASE …
#define AW200XX_REG_PAGE …
#define AW200XX_PAGE_MASK …
#define AW200XX_PAGE_SHIFT …
#define AW200XX_NUM_PAGES …
#define AW200XX_PAGE_SIZE …
#define AW200XX_REG(page, reg) …
#define AW200XX_REG_MAX …
#define AW200XX_PAGE0 …
#define AW200XX_PAGE1 …
#define AW200XX_PAGE2 …
#define AW200XX_PAGE3 …
#define AW200XX_PAGE4 …
#define AW200XX_PAGE5 …
#define AW200XX_REG_IDR …
#define AW200XX_IDR_CHIPID …
#define AW200XX_REG_SLPCR …
#define AW200XX_SLPCR_ACTIVE …
#define AW200XX_REG_RSTR …
#define AW200XX_RSTR_RESET …
#define AW200XX_REG_GCCR …
#define AW200XX_GCCR_IMAX_MASK …
#define AW200XX_GCCR_IMAX(x) …
#define AW200XX_GCCR_ALLON …
#define AW200XX_REG_FCD …
#define AW200XX_FCD_CLEAR …
#define AW200XX_REG_DSIZE …
#define AW200XX_DSIZE_COLUMNS_MAX …
#define AW200XX_LED2REG(x, columns) …
#define AW200XX_REG_DIM_PAGE1(x, columns) …
#define AW200XX_REG_DIM(x, columns) …
#define AW200XX_REG_DIM2FADE(x) …
#define AW200XX_REG_FADE2DIM(fade) …
#define AW200XX_DUTY_RATIO(rows) …
struct aw200xx_chipdef { … };
struct aw200xx_led { … };
struct aw200xx { … };
static ssize_t dim_show(struct device *dev, struct device_attribute *devattr,
char *buf)
{ … }
static ssize_t dim_store(struct device *dev, struct device_attribute *devattr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(dim);
static struct attribute *dim_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static int aw200xx_brightness_set(struct led_classdev *cdev,
enum led_brightness brightness)
{ … }
static u32 aw200xx_imax_from_global(const struct aw200xx *const chip,
u32 global_imax_uA)
{ … }
static u32 aw200xx_imax_to_global(const struct aw200xx *const chip,
u32 led_imax_uA)
{ … }
#define AW200XX_IMAX_MULTIPLIER1 …
#define AW200XX_IMAX_MULTIPLIER2 …
#define AW200XX_IMAX_BASE_VAL1 …
#define AW200XX_IMAX_BASE_VAL2 …
static int aw200xx_set_imax(const struct aw200xx *const chip,
u32 led_imax_uA)
{ … }
static int aw200xx_chip_reset(const struct aw200xx *const chip)
{ … }
static int aw200xx_chip_init(const struct aw200xx *const chip)
{ … }
static int aw200xx_chip_check(const struct aw200xx *const chip)
{ … }
static void aw200xx_enable(const struct aw200xx *const chip)
{ … }
static void aw200xx_disable(const struct aw200xx *const chip)
{ … }
static int aw200xx_probe_get_display_rows(struct device *dev,
struct aw200xx *chip)
{ … }
static int aw200xx_probe_fw(struct device *dev, struct aw200xx *chip)
{ … }
static const struct regmap_range_cfg aw200xx_ranges[] = …;
static const struct regmap_range aw200xx_writeonly_ranges[] = …;
static const struct regmap_access_table aw200xx_readable_table = …;
static const struct regmap_range aw200xx_readonly_ranges[] = …;
static const struct regmap_access_table aw200xx_writeable_table = …;
static const struct regmap_config aw200xx_regmap_config = …;
static void aw200xx_chip_reset_action(void *data)
{ … }
static void aw200xx_disable_action(void *data)
{ … }
static int aw200xx_probe(struct i2c_client *client)
{ … }
static const struct aw200xx_chipdef aw20036_cdef = …;
static const struct aw200xx_chipdef aw20054_cdef = …;
static const struct aw200xx_chipdef aw20072_cdef = …;
static const struct aw200xx_chipdef aw20108_cdef = …;
static const struct i2c_device_id aw200xx_id[] = …;
MODULE_DEVICE_TABLE(i2c, aw200xx_id);
static const struct of_device_id aw200xx_match_table[] = …;
MODULE_DEVICE_TABLE(of, aw200xx_match_table);
static struct i2c_driver aw200xx_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;