#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pm_opp.h>
#include <linux/pwm.h>
#include <linux/platform_device.h>
#include <linux/pinctrl/consumer.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/reset.h>
#include <soc/tegra/common.h>
#define PWM_ENABLE …
#define PWM_DUTY_WIDTH …
#define PWM_DUTY_SHIFT …
#define PWM_SCALE_WIDTH …
#define PWM_SCALE_SHIFT …
struct tegra_pwm_soc { … };
struct tegra_pwm_chip { … };
static inline struct tegra_pwm_chip *to_tegra_pwm_chip(struct pwm_chip *chip)
{ … }
static inline u32 pwm_readl(struct tegra_pwm_chip *pc, unsigned int offset)
{ … }
static inline void pwm_writel(struct tegra_pwm_chip *pc, unsigned int offset, u32 value)
{ … }
static int tegra_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
int duty_ns, int period_ns)
{ … }
static int tegra_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static void tegra_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
{ … }
static int tegra_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static const struct pwm_ops tegra_pwm_ops = …;
static int tegra_pwm_probe(struct platform_device *pdev)
{ … }
static void tegra_pwm_remove(struct platform_device *pdev)
{ … }
static int __maybe_unused tegra_pwm_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused tegra_pwm_runtime_resume(struct device *dev)
{ … }
static const struct tegra_pwm_soc tegra20_pwm_soc = …;
static const struct tegra_pwm_soc tegra186_pwm_soc = …;
static const struct tegra_pwm_soc tegra194_pwm_soc = …;
static const struct of_device_id tegra_pwm_of_match[] = …;
MODULE_DEVICE_TABLE(of, tegra_pwm_of_match);
static const struct dev_pm_ops tegra_pwm_pm_ops = …;
static struct platform_driver tegra_pwm_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS(…) …;