#include <linux/module.h>
#include <linux/delay.h>
#include <linux/string.h>
#include <linux/ctype.h>
#include <linux/leds.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/property.h>
#include <linux/slab.h>
#include <linux/of.h>
#define PCA963X_LED_OFF …
#define PCA963X_LED_ON …
#define PCA963X_LED_PWM …
#define PCA963X_LED_GRP_PWM …
#define PCA963X_MODE1_SLEEP …
#define PCA963X_MODE2_OUTDRV …
#define PCA963X_MODE2_INVRT …
#define PCA963X_MODE2_DMBLNK …
#define PCA963X_MODE1 …
#define PCA963X_MODE2 …
#define PCA963X_PWM_BASE …
enum pca963x_type { … };
struct pca963x_chipdef { … };
static struct pca963x_chipdef pca963x_chipdefs[] = …;
#define PCA963X_BLINK_PERIOD_MIN …
#define PCA963X_BLINK_PERIOD_MAX …
static const struct i2c_device_id pca963x_id[] = …;
MODULE_DEVICE_TABLE(i2c, pca963x_id);
struct pca963x;
struct pca963x_led { … };
struct pca963x { … };
static int pca963x_brightness(struct pca963x_led *led,
enum led_brightness brightness)
{ … }
static void pca963x_blink(struct pca963x_led *led)
{ … }
static int pca963x_power_state(struct pca963x_led *led)
{ … }
static int pca963x_led_set(struct led_classdev *led_cdev,
enum led_brightness value)
{ … }
static unsigned int pca963x_period_scale(struct pca963x_led *led,
unsigned int val)
{ … }
static int pca963x_blink_set(struct led_classdev *led_cdev,
unsigned long *delay_on, unsigned long *delay_off)
{ … }
static int pca963x_register_leds(struct i2c_client *client,
struct pca963x *chip)
{ … }
static int pca963x_suspend(struct device *dev)
{ … }
static int pca963x_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(pca963x_pm, pca963x_suspend, pca963x_resume);
static const struct of_device_id of_pca963x_match[] = …;
MODULE_DEVICE_TABLE(of, of_pca963x_match);
static int pca963x_probe(struct i2c_client *client)
{ … }
static struct i2c_driver pca963x_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;