#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/math64.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pwm.h>
#define SPRD_PWM_PRESCALE …
#define SPRD_PWM_MOD …
#define SPRD_PWM_DUTY …
#define SPRD_PWM_ENABLE …
#define SPRD_PWM_MOD_MAX …
#define SPRD_PWM_DUTY_MSK …
#define SPRD_PWM_PRESCALE_MSK …
#define SPRD_PWM_ENABLE_BIT …
#define SPRD_PWM_CHN_NUM …
#define SPRD_PWM_REGS_SHIFT …
#define SPRD_PWM_CHN_CLKS_NUM …
#define SPRD_PWM_CHN_OUTPUT_CLK …
struct sprd_pwm_chn { … };
struct sprd_pwm_chip { … };
static inline struct sprd_pwm_chip* sprd_pwm_from_chip(struct pwm_chip *chip)
{ … }
static const char * const sprd_pwm_clks[] = …;
static u32 sprd_pwm_read(struct sprd_pwm_chip *spc, u32 hwid, u32 reg)
{ … }
static void sprd_pwm_write(struct sprd_pwm_chip *spc, u32 hwid,
u32 reg, u32 val)
{ … }
static int sprd_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
struct pwm_state *state)
{ … }
static int sprd_pwm_config(struct sprd_pwm_chip *spc, struct pwm_device *pwm,
int duty_ns, int period_ns)
{ … }
static int sprd_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static const struct pwm_ops sprd_pwm_ops = …;
static int sprd_pwm_clk_init(struct device *dev,
struct sprd_pwm_chn chn[SPRD_PWM_CHN_NUM])
{ … }
static int sprd_pwm_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id sprd_pwm_of_match[] = …;
MODULE_DEVICE_TABLE(of, sprd_pwm_of_match);
static struct platform_driver sprd_pwm_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;