linux/drivers/pwm/pwm-mediatek.c

// SPDX-License-Identifier: GPL-2.0
/*
 * MediaTek Pulse Width Modulator driver
 *
 * Copyright (C) 2015 John Crispin <[email protected]>
 * Copyright (C) 2017 Zhi Mao <[email protected]>
 *
 */

#include <linux/err.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/clk.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pwm.h>
#include <linux/slab.h>
#include <linux/types.h>

/* PWM registers and bits definitions */
#define PWMCON
#define PWMHDUR
#define PWMLDUR
#define PWMGDUR
#define PWMWAVENUM
#define PWMDWIDTH
#define PWM45DWIDTH_FIXUP
#define PWMTHRES
#define PWM45THRES_FIXUP
#define PWM_CK_26M_SEL

#define PWM_CLK_DIV_MAX

struct pwm_mediatek_of_data {};

/**
 * struct pwm_mediatek_chip - struct representing PWM chip
 * @regs: base address of PWM chip
 * @clk_top: the top clock generator
 * @clk_main: the clock used by PWM core
 * @clk_pwms: the clock used by each PWM channel
 * @soc: pointer to chip's platform data
 */
struct pwm_mediatek_chip {};

static const unsigned int mtk_pwm_reg_offset_v1[] =;

static const unsigned int mtk_pwm_reg_offset_v2[] =;

static inline struct pwm_mediatek_chip *
to_pwm_mediatek_chip(struct pwm_chip *chip)
{}

static int pwm_mediatek_clk_enable(struct pwm_chip *chip,
				   struct pwm_device *pwm)
{}

static void pwm_mediatek_clk_disable(struct pwm_chip *chip,
				     struct pwm_device *pwm)
{}

static inline void pwm_mediatek_writel(struct pwm_mediatek_chip *chip,
				       unsigned int num, unsigned int offset,
				       u32 value)
{}

static int pwm_mediatek_config(struct pwm_chip *chip, struct pwm_device *pwm,
			       int duty_ns, int period_ns)
{}

static int pwm_mediatek_enable(struct pwm_chip *chip, struct pwm_device *pwm)
{}

static void pwm_mediatek_disable(struct pwm_chip *chip, struct pwm_device *pwm)
{}

static int pwm_mediatek_apply(struct pwm_chip *chip, struct pwm_device *pwm,
			      const struct pwm_state *state)
{}

static const struct pwm_ops pwm_mediatek_ops =;

static int pwm_mediatek_probe(struct platform_device *pdev)
{}

static const struct pwm_mediatek_of_data mt2712_pwm_data =;

static const struct pwm_mediatek_of_data mt6795_pwm_data =;

static const struct pwm_mediatek_of_data mt7622_pwm_data =;

static const struct pwm_mediatek_of_data mt7623_pwm_data =;

static const struct pwm_mediatek_of_data mt7628_pwm_data =;

static const struct pwm_mediatek_of_data mt7629_pwm_data =;

static const struct pwm_mediatek_of_data mt7981_pwm_data =;

static const struct pwm_mediatek_of_data mt7986_pwm_data =;

static const struct pwm_mediatek_of_data mt7988_pwm_data =;

static const struct pwm_mediatek_of_data mt8183_pwm_data =;

static const struct pwm_mediatek_of_data mt8365_pwm_data =;

static const struct pwm_mediatek_of_data mt8516_pwm_data =;

static const struct of_device_id pwm_mediatek_of_match[] =;
MODULE_DEVICE_TABLE(of, pwm_mediatek_of_match);

static struct platform_driver pwm_mediatek_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();