#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/math64.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pwm.h>
#include <linux/regmap.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/time.h>
#include <linux/wait.h>
#define PWM_OUT_VAL(x) …
#define PWM_CPT_VAL(x) …
#define PWM_CPT_EDGE(x) …
#define STI_PWM_CTRL …
#define STI_INT_EN …
#define STI_INT_STA …
#define PWM_INT_ACK …
#define PWM_PRESCALE_LOW_MASK …
#define PWM_PRESCALE_HIGH_MASK …
#define PWM_CPT_EDGE_MASK …
#define PWM_INT_ACK_MASK …
#define STI_MAX_CPT_DEVS …
#define CPT_DC_MAX …
enum { … };
enum sti_cpt_edge { … };
struct sti_cpt_ddata { … };
struct sti_pwm_chip { … };
static const struct reg_field sti_pwm_regfields[MAX_REGFIELDS] = …;
static inline struct sti_pwm_chip *to_sti_pwmchip(struct pwm_chip *chip)
{ … }
static int sti_pwm_get_prescale(struct sti_pwm_chip *pc, unsigned long period,
unsigned int *prescale)
{ … }
static int sti_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
int duty_ns, int period_ns)
{ … }
static int sti_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static void sti_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static void sti_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static int sti_pwm_capture(struct pwm_chip *chip, struct pwm_device *pwm,
struct pwm_capture *result, unsigned long timeout)
{ … }
static int sti_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static const struct pwm_ops sti_pwm_ops = …;
static irqreturn_t sti_pwm_interrupt(int irq, void *data)
{ … }
static int sti_pwm_probe_regmap(struct sti_pwm_chip *pc)
{ … }
static const struct regmap_config sti_pwm_regmap_config = …;
static int sti_pwm_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id sti_pwm_of_match[] = …;
MODULE_DEVICE_TABLE(of, sti_pwm_of_match);
static struct platform_driver sti_pwm_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;