#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/pwm.h>
#include <linux/slab.h>
struct lpc32xx_pwm_chip { … };
#define PWM_ENABLE …
#define PWM_PIN_LEVEL …
static inline struct lpc32xx_pwm_chip *to_lpc32xx_pwm_chip(struct pwm_chip *chip)
{ … }
static int lpc32xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
int duty_ns, int period_ns)
{ … }
static int lpc32xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static void lpc32xx_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static int lpc32xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static const struct pwm_ops lpc32xx_pwm_ops = …;
static int lpc32xx_pwm_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id lpc32xx_pwm_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, lpc32xx_pwm_dt_ids);
static struct platform_driver lpc32xx_pwm_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;