linux/drivers/pwm/pwm-vt8500.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * drivers/pwm/pwm-vt8500.c
 *
 * Copyright (C) 2012 Tony Prisk <[email protected]>
 * Copyright (C) 2010 Alexey Charkov <[email protected]>
 */

#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/pwm.h>
#include <linux/delay.h>
#include <linux/clk.h>

#include <asm/div64.h>

/*
 * SoC architecture allocates register space for 4 PWMs but only
 * 2 are currently implemented.
 */
#define VT8500_NR_PWMS

#define REG_CTRL(pwm)
#define REG_SCALAR(pwm)
#define REG_PERIOD(pwm)
#define REG_DUTY(pwm)
#define REG_STATUS

#define CTRL_ENABLE
#define CTRL_INVERT
#define CTRL_AUTOLOAD
#define CTRL_STOP_IMM
#define CTRL_LOAD_PRESCALE
#define CTRL_LOAD_PERIOD

#define STATUS_CTRL_UPDATE
#define STATUS_SCALAR_UPDATE
#define STATUS_PERIOD_UPDATE
#define STATUS_DUTY_UPDATE
#define STATUS_ALL_UPDATE

struct vt8500_chip {};

static inline struct vt8500_chip *to_vt8500_chip(struct pwm_chip *chip)
{}

#define msecs_to_loops(t)
static inline void vt8500_pwm_busy_wait(struct pwm_chip *chip, int nr, u8 bitmask)
{}

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

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

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

static int vt8500_pwm_set_polarity(struct pwm_chip *chip,
				   struct pwm_device *pwm,
				   enum pwm_polarity polarity)
{}

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

static const struct pwm_ops vt8500_pwm_ops =;

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

static int vt8500_pwm_probe(struct platform_device *pdev)
{}

static struct platform_driver vt8500_pwm_driver =;
module_platform_driver();

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