#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/mfd/stmpe.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pwm.h>
#include <linux/slab.h>
#define STMPE24XX_PWMCS …
#define PWMCS_EN_PWM0 …
#define PWMCS_EN_PWM1 …
#define PWMCS_EN_PWM2 …
#define STMPE24XX_PWMIC0 …
#define STMPE24XX_PWMIC1 …
#define STMPE24XX_PWMIC2 …
#define STMPE_PWM_24XX_PINBASE …
struct stmpe_pwm { … };
static inline struct stmpe_pwm *to_stmpe_pwm(struct pwm_chip *chip)
{ … }
static int stmpe_24xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static int stmpe_24xx_pwm_disable(struct pwm_chip *chip,
struct pwm_device *pwm)
{ … }
#define SMAX …
#define SMIN …
#define GTS …
#define LOAD …
#define RAMPUP …
#define RAMPDOWN …
#define PRESCALE_512 …
#define STEPTIME_1 …
#define BRANCH …
static int stmpe_24xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
int duty_ns, int period_ns)
{ … }
static int stmpe_24xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static const struct pwm_ops stmpe_24xx_pwm_ops = …;
static int __init stmpe_pwm_probe(struct platform_device *pdev)
{ … }
static struct platform_driver stmpe_pwm_driver = …;
builtin_platform_driver_probe(…);