#define pr_fmt(fmt) …
#include <linux/clk.h>
#include <linux/export.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pwm.h>
#include <linux/spinlock.h>
#define PWM_CTRL …
#define CTRL_START …
#define CTRL_OEB …
#define CTRL_FORCE_HIGH …
#define CTRL_OPENDRAIN …
#define CTRL_CHAN_OFFS …
#define PWM_CTRL2 …
#define CTRL2_OUT_SELECT …
#define PWM_CH_SIZE …
#define PWM_CWORD_MSB(ch) …
#define PWM_CWORD_LSB(ch) …
#define CWORD_BIT_SIZE …
#define CONST_VAR_F_MAX …
#define CONST_VAR_F_MIN …
#define PWM_ON(ch) …
#define PWM_ON_MIN …
#define PWM_PERIOD(ch) …
#define PWM_PERIOD_MIN …
#define PWM_ON_PERIOD_MAX …
struct brcmstb_pwm { … };
static inline u32 brcmstb_pwm_readl(struct brcmstb_pwm *p,
unsigned int offset)
{ … }
static inline void brcmstb_pwm_writel(struct brcmstb_pwm *p, u32 value,
unsigned int offset)
{ … }
static inline struct brcmstb_pwm *to_brcmstb_pwm(struct pwm_chip *chip)
{ … }
static int brcmstb_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
u64 duty_ns, u64 period_ns)
{ … }
static inline void brcmstb_pwm_enable_set(struct brcmstb_pwm *p,
unsigned int channel, bool enable)
{ … }
static int brcmstb_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static const struct pwm_ops brcmstb_pwm_ops = …;
static const struct of_device_id brcmstb_pwm_of_match[] = …;
MODULE_DEVICE_TABLE(of, brcmstb_pwm_of_match);
static int brcmstb_pwm_probe(struct platform_device *pdev)
{ … }
static int brcmstb_pwm_suspend(struct device *dev)
{ … }
static int brcmstb_pwm_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(brcmstb_pwm_pm_ops, brcmstb_pwm_suspend,
brcmstb_pwm_resume);
static struct platform_driver brcmstb_pwm_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS(…) …;
MODULE_LICENSE(…) …;