#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 TWL_PWM_MAX …
#define TWL4030_GPBR1_REG …
#define TWL4030_PMBR1_REG …
#define TWL4030_PWMXCLK_ENABLE …
#define TWL4030_PWMX_ENABLE …
#define TWL4030_PWMX_BITS …
#define TWL4030_PWM_TOGGLE(pwm, x) …
#define TWL4030_GPIO6_PWM0_MUTE_MASK …
#define TWL4030_GPIO6_PWM0_MUTE_PWM0 …
#define TWL4030_GPIO7_VIBRASYNC_PWM1_MASK …
#define TWL4030_GPIO7_VIBRASYNC_PWM1_PWM1 …
#define TWL6030_TOGGLE3_REG …
#define TWL6030_PWMXR …
#define TWL6030_PWMXS …
#define TWL6030_PWMXEN …
#define TWL6030_PWM_TOGGLE(pwm, x) …
struct twl_pwm_chip { … };
static inline struct twl_pwm_chip *to_twl(struct pwm_chip *chip)
{ … }
static int twl_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
u64 duty_ns, u64 period_ns)
{ … }
static int twl4030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static void twl4030_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static int twl4030_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static void twl4030_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static int twl6030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static void twl6030_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static int twl4030_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static int twl6030_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static const struct pwm_ops twl4030_pwm_ops = …;
static const struct pwm_ops twl6030_pwm_ops = …;
static int twl_pwm_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_OF
static const struct of_device_id twl_pwm_of_match[] = …;
MODULE_DEVICE_TABLE(of, twl_pwm_of_match);
#endif
static struct platform_driver twl_pwm_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS(…) …;
MODULE_LICENSE(…) …;