#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/kernel.h>
#include <linux/math64.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pwm.h>
#include <linux/slab.h>
#include <linux/types.h>
#define NUM_PWM …
#define PWMCR …
#define PWMCR_PWM_ENABLE …
#define PWMCR_PRESCALE_SHIFT …
#define PWMCR_MIN_PRESCALE …
#define PWMCR_MAX_PRESCALE …
#define PWMDCR …
#define PWMDCR_MIN_DUTY …
#define PWMDCR_MAX_DUTY …
#define PWMPCR …
#define PWMPCR_MIN_PERIOD …
#define PWMPCR_MAX_PERIOD …
#define PWMMCR …
#define PWMMCR_PWM_ENABLE …
struct spear_pwm_chip { … };
static inline struct spear_pwm_chip *to_spear_pwm_chip(struct pwm_chip *chip)
{ … }
static inline u32 spear_pwm_readl(struct spear_pwm_chip *chip, unsigned int num,
unsigned long offset)
{ … }
static inline void spear_pwm_writel(struct spear_pwm_chip *chip,
unsigned int num, unsigned long offset,
unsigned long val)
{ … }
static int spear_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
u64 duty_ns, u64 period_ns)
{ … }
static int spear_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static void spear_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static int spear_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static const struct pwm_ops spear_pwm_ops = …;
static int spear_pwm_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id spear_pwm_of_match[] = …;
MODULE_DEVICE_TABLE(of, spear_pwm_of_match);
static struct platform_driver spear_pwm_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_ALIAS(…) …;