#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pwm.h>
#define SP7021_PWM_MODE0 …
#define SP7021_PWM_MODE0_PWMEN(ch) …
#define SP7021_PWM_MODE0_BYPASS(ch) …
#define SP7021_PWM_MODE1 …
#define SP7021_PWM_MODE1_CNT_EN(ch) …
#define SP7021_PWM_FREQ(ch) …
#define SP7021_PWM_FREQ_MAX …
#define SP7021_PWM_DUTY(ch) …
#define SP7021_PWM_DUTY_DD_SEL(ch) …
#define SP7021_PWM_DUTY_MAX …
#define SP7021_PWM_DUTY_MASK …
#define SP7021_PWM_FREQ_SCALER …
#define SP7021_PWM_NUM …
struct sunplus_pwm { … };
static inline struct sunplus_pwm *to_sunplus_pwm(struct pwm_chip *chip)
{ … }
static int sunplus_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static int sunplus_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
struct pwm_state *state)
{ … }
static const struct pwm_ops sunplus_pwm_ops = …;
static void sunplus_pwm_clk_release(void *data)
{ … }
static int sunplus_pwm_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id sunplus_pwm_of_match[] = …;
MODULE_DEVICE_TABLE(of, sunplus_pwm_of_match);
static struct platform_driver sunplus_pwm_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;