#include <linux/i2c.h>
#include <linux/led-class-multicolor.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include "leds.h"
#define OMNIA_BOARD_LEDS …
#define OMNIA_LED_NUM_CHANNELS …
#define OMNIA_MCU_I2C_ADDR …
#define CMD_GET_STATUS_WORD …
#define STS_FEATURES_SUPPORTED …
#define CMD_GET_FEATURES …
#define FEAT_LED_GAMMA_CORRECTION …
#define CMD_LED_MODE …
#define CMD_LED_MODE_LED(l) …
#define CMD_LED_MODE_USER …
#define CMD_LED_STATE …
#define CMD_LED_STATE_LED(l) …
#define CMD_LED_STATE_ON …
#define CMD_LED_COLOR …
#define CMD_LED_SET_BRIGHTNESS …
#define CMD_LED_GET_BRIGHTNESS …
#define CMD_SET_GAMMA_CORRECTION …
#define CMD_GET_GAMMA_CORRECTION …
struct omnia_led { … };
#define to_omnia_led(l) …
struct omnia_leds { … };
static int omnia_cmd_write_u8(const struct i2c_client *client, u8 cmd, u8 val)
{ … }
static int omnia_cmd_read_raw(struct i2c_adapter *adapter, u8 addr, u8 cmd,
void *reply, size_t len)
{ … }
static int omnia_cmd_read_u8(const struct i2c_client *client, u8 cmd)
{ … }
static int omnia_led_send_color_cmd(const struct i2c_client *client,
struct omnia_led *led)
{ … }
static bool omnia_led_channels_changed(struct omnia_led *led)
{ … }
static int omnia_led_brightness_set_blocking(struct led_classdev *cdev,
enum led_brightness brightness)
{ … }
static struct led_hw_trigger_type omnia_hw_trigger_type;
static int omnia_hwtrig_activate(struct led_classdev *cdev)
{ … }
static void omnia_hwtrig_deactivate(struct led_classdev *cdev)
{ … }
static struct led_trigger omnia_hw_trigger = …;
static int omnia_led_register(struct i2c_client *client, struct omnia_led *led,
struct device_node *np)
{ … }
static ssize_t brightness_show(struct device *dev, struct device_attribute *a,
char *buf)
{ … }
static ssize_t brightness_store(struct device *dev, struct device_attribute *a,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(brightness);
static ssize_t gamma_correction_show(struct device *dev,
struct device_attribute *a, char *buf)
{ … }
static ssize_t gamma_correction_store(struct device *dev,
struct device_attribute *a,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(gamma_correction);
static struct attribute *omnia_led_controller_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static int omnia_mcu_get_features(const struct i2c_client *client)
{ … }
static int omnia_leds_probe(struct i2c_client *client)
{ … }
static void omnia_leds_remove(struct i2c_client *client)
{ … }
static const struct of_device_id of_omnia_leds_match[] = …;
static const struct i2c_device_id omnia_id[] = …;
MODULE_DEVICE_TABLE(i2c, omnia_id);
static struct i2c_driver omnia_leds_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;