#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/pwm.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#define TPU_CHANNEL_MAX …
#define TPU_TSTR …
#define TPU_TCRn …
#define TPU_TCR_CCLR_NONE …
#define TPU_TCR_CCLR_TGRA …
#define TPU_TCR_CCLR_TGRB …
#define TPU_TCR_CCLR_TGRC …
#define TPU_TCR_CCLR_TGRD …
#define TPU_TCR_CKEG_RISING …
#define TPU_TCR_CKEG_FALLING …
#define TPU_TCR_CKEG_BOTH …
#define TPU_TMDRn …
#define TPU_TMDR_BFWT …
#define TPU_TMDR_BFB …
#define TPU_TMDR_BFA …
#define TPU_TMDR_MD_NORMAL …
#define TPU_TMDR_MD_PWM …
#define TPU_TIORn …
#define TPU_TIOR_IOA_0 …
#define TPU_TIOR_IOA_0_CLR …
#define TPU_TIOR_IOA_0_SET …
#define TPU_TIOR_IOA_0_TOGGLE …
#define TPU_TIOR_IOA_1 …
#define TPU_TIOR_IOA_1_CLR …
#define TPU_TIOR_IOA_1_SET …
#define TPU_TIOR_IOA_1_TOGGLE …
#define TPU_TIERn …
#define TPU_TSRn …
#define TPU_TCNTn …
#define TPU_TGRAn …
#define TPU_TGRBn …
#define TPU_TGRCn …
#define TPU_TGRDn …
#define TPU_CHANNEL_OFFSET …
#define TPU_CHANNEL_SIZE …
enum tpu_pin_state { … };
struct tpu_device;
struct tpu_pwm_device { … };
struct tpu_device { … };
static inline struct tpu_device *to_tpu_device(struct pwm_chip *chip)
{ … }
static void tpu_pwm_write(struct tpu_pwm_device *tpd, int reg_nr, u16 value)
{ … }
static void tpu_pwm_set_pin(struct tpu_pwm_device *tpd,
enum tpu_pin_state state)
{ … }
static void tpu_pwm_start_stop(struct tpu_pwm_device *tpd, int start)
{ … }
static int tpu_pwm_timer_start(struct tpu_pwm_device *tpd)
{ … }
static void tpu_pwm_timer_stop(struct tpu_pwm_device *tpd)
{ … }
static int tpu_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static void tpu_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static int tpu_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
u64 duty_ns, u64 period_ns, bool enabled)
{ … }
static int tpu_pwm_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm,
enum pwm_polarity polarity)
{ … }
static int tpu_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static void tpu_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static int tpu_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static const struct pwm_ops tpu_pwm_ops = …;
static int tpu_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_OF
static const struct of_device_id tpu_of_table[] = …;
MODULE_DEVICE_TABLE(of, tpu_of_table);
#endif
static struct platform_driver tpu_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;