linux/drivers/pwm/pwm-rcar.c

// SPDX-License-Identifier: GPL-2.0
/*
 * R-Car PWM Timer driver
 *
 * Copyright (C) 2015 Renesas Electronics Corporation
 *
 * Limitations:
 * - The hardware cannot generate a 0% duty cycle.
 */

#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/log2.h>
#include <linux/math64.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>

#define RCAR_PWM_MAX_DIVISION
#define RCAR_PWM_MAX_CYCLE

#define RCAR_PWMCR
#define RCAR_PWMCR_CC0_MASK
#define RCAR_PWMCR_CC0_SHIFT
#define RCAR_PWMCR_CCMD
#define RCAR_PWMCR_SYNC
#define RCAR_PWMCR_SS0
#define RCAR_PWMCR_EN0

#define RCAR_PWMCNT
#define RCAR_PWMCNT_CYC0_MASK
#define RCAR_PWMCNT_CYC0_SHIFT
#define RCAR_PWMCNT_PH0_MASK
#define RCAR_PWMCNT_PH0_SHIFT

struct rcar_pwm_chip {};

static inline struct rcar_pwm_chip *to_rcar_pwm_chip(struct pwm_chip *chip)
{}

static void rcar_pwm_write(struct rcar_pwm_chip *rp, u32 data,
			   unsigned int offset)
{}

static u32 rcar_pwm_read(struct rcar_pwm_chip *rp, unsigned int offset)
{}

static void rcar_pwm_update(struct rcar_pwm_chip *rp, u32 mask, u32 data,
			    unsigned int offset)
{}

static int rcar_pwm_get_clock_division(struct rcar_pwm_chip *rp, int period_ns)
{}

static void rcar_pwm_set_clock_control(struct rcar_pwm_chip *rp,
				       unsigned int div)
{}

static int rcar_pwm_set_counter(struct rcar_pwm_chip *rp, int div, int duty_ns,
				int period_ns)
{}

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

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

static int rcar_pwm_enable(struct rcar_pwm_chip *rp)
{}

static void rcar_pwm_disable(struct rcar_pwm_chip *rp)
{}

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

static const struct pwm_ops rcar_pwm_ops =;

static int rcar_pwm_probe(struct platform_device *pdev)
{}

static void rcar_pwm_remove(struct platform_device *pdev)
{}

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

static struct platform_driver rcar_pwm_driver =;
module_platform_driver();

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