#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pwm.h>
#include <linux/slab.h>
#define DISP_PWM_EN …
#define PWM_CLKDIV_SHIFT …
#define PWM_CLKDIV_MAX …
#define PWM_CLKDIV_MASK …
#define PWM_PERIOD_BIT_WIDTH …
#define PWM_PERIOD_MASK …
#define PWM_HIGH_WIDTH_SHIFT …
#define PWM_HIGH_WIDTH_MASK …
struct mtk_pwm_data { … };
struct mtk_disp_pwm { … };
static inline struct mtk_disp_pwm *to_mtk_disp_pwm(struct pwm_chip *chip)
{ … }
static void mtk_disp_pwm_update_bits(struct mtk_disp_pwm *mdp, u32 offset,
u32 mask, u32 data)
{ … }
static int mtk_disp_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state)
{ … }
static int mtk_disp_pwm_get_state(struct pwm_chip *chip,
struct pwm_device *pwm,
struct pwm_state *state)
{ … }
static const struct pwm_ops mtk_disp_pwm_ops = …;
static int mtk_disp_pwm_probe(struct platform_device *pdev)
{ … }
static const struct mtk_pwm_data mt2701_pwm_data = …;
static const struct mtk_pwm_data mt8173_pwm_data = …;
static const struct mtk_pwm_data mt8183_pwm_data = …;
static const struct of_device_id mtk_disp_pwm_of_match[] = …;
MODULE_DEVICE_TABLE(of, mtk_disp_pwm_of_match);
static struct platform_driver mtk_disp_pwm_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;