#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pwm.h>
#include <linux/mfd/twl.h>
#include <linux/slab.h>
#define TWL4030_LED_MAX …
#define TWL6030_LED_MAX …
#define TWL4030_LEDEN_REG …
#define TWL4030_PWMA_REG …
#define TWL4030_LEDXON …
#define TWL4030_LEDXPWM …
#define TWL4030_LED_PINS …
#define TWL4030_LED_TOGGLE(led, x) …
#define TWL6030_LED_PWM_CTRL1 …
#define TWL6030_LED_PWM_CTRL2 …
#define TWL6040_LED_MODE_HW …
#define TWL6040_LED_MODE_ON …
#define TWL6040_LED_MODE_OFF …
#define TWL6040_LED_MODE_MASK …
struct twl_pwmled_chip { … };
static inline struct twl_pwmled_chip *to_twl(struct pwm_chip *chip)
{ … }
static int twl4030_pwmled_config(struct pwm_chip *chip, struct pwm_device *pwm,
int duty_ns, int period_ns)
{ … }
static int twl4030_pwmled_enable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static void twl4030_pwmled_disable(struct pwm_chip *chip,
struct pwm_device *pwm)
{ … }
static int twl4030_pwmled_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static const struct pwm_ops twl4030_pwmled_ops = …;
static int twl6030_pwmled_config(struct pwm_chip *chip, struct pwm_device *pwm,
int duty_ns, int period_ns)
{ … }
static int twl6030_pwmled_enable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static void twl6030_pwmled_disable(struct pwm_chip *chip,
struct pwm_device *pwm)
{ … }
static int twl6030_pwmled_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static int twl6030_pwmled_request(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static void twl6030_pwmled_free(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static const struct pwm_ops twl6030_pwmled_ops = …;
static int twl_pwmled_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_OF
static const struct of_device_id twl_pwmled_of_match[] = …;
MODULE_DEVICE_TABLE(of, twl_pwmled_of_match);
#endif
static struct platform_driver twl_pwmled_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS(…) …;
MODULE_LICENSE(…) …;