#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/ioport.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 PWM_CONTROL_OFFSET …
#define PWM_CONTROL_SMOOTH_SHIFT(chan) …
#define PWM_CONTROL_TYPE_SHIFT(chan) …
#define PWM_CONTROL_POLARITY_SHIFT(chan) …
#define PWM_CONTROL_TRIGGER_SHIFT(chan) …
#define PRESCALE_OFFSET …
#define PRESCALE_SHIFT(chan) …
#define PRESCALE_MASK(chan) …
#define PRESCALE_MIN …
#define PRESCALE_MAX …
#define PERIOD_COUNT_OFFSET(chan) …
#define PERIOD_COUNT_MIN …
#define PERIOD_COUNT_MAX …
#define DUTY_CYCLE_HIGH_OFFSET(chan) …
#define DUTY_CYCLE_HIGH_MIN …
#define DUTY_CYCLE_HIGH_MAX …
struct kona_pwmc { … };
static inline struct kona_pwmc *to_kona_pwmc(struct pwm_chip *chip)
{ … }
static void kona_pwmc_prepare_for_settings(struct kona_pwmc *kp,
unsigned int chan)
{ … }
static void kona_pwmc_apply_settings(struct kona_pwmc *kp, unsigned int chan)
{ … }
static int kona_pwmc_config(struct pwm_chip *chip, struct pwm_device *pwm,
u64 duty_ns, u64 period_ns)
{ … }
static int kona_pwmc_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm,
enum pwm_polarity polarity)
{ … }
static int kona_pwmc_enable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static void kona_pwmc_disable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static int kona_pwmc_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static const struct pwm_ops kona_pwm_ops = …;
static int kona_pwmc_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id bcm_kona_pwmc_dt[] = …;
MODULE_DEVICE_TABLE(of, bcm_kona_pwmc_dt);
static struct platform_driver kona_pwmc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;