#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pwm.h>
#define LPC18XX_PWM_CONFIG …
#define LPC18XX_PWM_CONFIG_UNIFY …
#define LPC18XX_PWM_CONFIG_NORELOAD …
#define LPC18XX_PWM_CTRL …
#define LPC18XX_PWM_CTRL_HALT …
#define LPC18XX_PWM_BIDIR …
#define LPC18XX_PWM_PRE_SHIFT …
#define LPC18XX_PWM_PRE_MASK …
#define LPC18XX_PWM_PRE(x) …
#define LPC18XX_PWM_LIMIT …
#define LPC18XX_PWM_RES_BASE …
#define LPC18XX_PWM_RES_SHIFT(_ch) …
#define LPC18XX_PWM_RES(_ch, _action) …
#define LPC18XX_PWM_RES_MASK(_ch) …
#define LPC18XX_PWM_MATCH_BASE …
#define LPC18XX_PWM_MATCH(_ch) …
#define LPC18XX_PWM_MATCHREL_BASE …
#define LPC18XX_PWM_MATCHREL(_ch) …
#define LPC18XX_PWM_EVSTATEMSK_BASE …
#define LPC18XX_PWM_EVSTATEMSK(_ch) …
#define LPC18XX_PWM_EVSTATEMSK_ALL …
#define LPC18XX_PWM_EVCTRL_BASE …
#define LPC18XX_PWM_EVCTRL(_ev) …
#define LPC18XX_PWM_EVCTRL_MATCH(_ch) …
#define LPC18XX_PWM_EVCTRL_COMB_SHIFT …
#define LPC18XX_PWM_EVCTRL_COMB_MATCH …
#define LPC18XX_PWM_OUTPUTSET_BASE …
#define LPC18XX_PWM_OUTPUTSET(_ch) …
#define LPC18XX_PWM_OUTPUTCL_BASE …
#define LPC18XX_PWM_OUTPUTCL(_ch) …
#define LPC18XX_PWM_TIMER_MAX …
#define LPC18XX_PWM_EVENT_PERIOD …
#define LPC18XX_PWM_EVENT_MAX …
#define LPC18XX_NUM_PWMS …
enum lpc18xx_pwm_res_action { … };
struct lpc18xx_pwm_data { … };
struct lpc18xx_pwm_chip { … };
static inline struct lpc18xx_pwm_chip *
to_lpc18xx_pwm_chip(struct pwm_chip *chip)
{ … }
static inline void lpc18xx_pwm_writel(struct lpc18xx_pwm_chip *lpc18xx_pwm,
u32 reg, u32 val)
{ … }
static inline u32 lpc18xx_pwm_readl(struct lpc18xx_pwm_chip *lpc18xx_pwm,
u32 reg)
{ … }
static void lpc18xx_pwm_set_conflict_res(struct lpc18xx_pwm_chip *lpc18xx_pwm,
struct pwm_device *pwm,
enum lpc18xx_pwm_res_action action)
{ … }
static void lpc18xx_pwm_config_period(struct pwm_chip *chip, u64 period_ns)
{ … }
static void lpc18xx_pwm_config_duty(struct pwm_chip *chip,
struct pwm_device *pwm, u64 duty_ns)
{ … }
static int lpc18xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
int duty_ns, int period_ns)
{ … }
static int lpc18xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm, enum pwm_polarity polarity)
{ … }
static void lpc18xx_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static int lpc18xx_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static void lpc18xx_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static int lpc18xx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static const struct pwm_ops lpc18xx_pwm_ops = …;
static const struct of_device_id lpc18xx_pwm_of_match[] = …;
MODULE_DEVICE_TABLE(of, lpc18xx_pwm_of_match);
static int lpc18xx_pwm_probe(struct platform_device *pdev)
{ … }
static void lpc18xx_pwm_remove(struct platform_device *pdev)
{ … }
static struct platform_driver lpc18xx_pwm_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;