linux/drivers/pwm/pwm-spear.c

/*
 * ST Microelectronics SPEAr Pulse Width Modulator driver
 *
 * Copyright (C) 2012 ST Microelectronics
 * Shiraz Hashim <[email protected]>
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2. This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 */

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

#define NUM_PWM

/* PWM registers and bits definitions */
#define PWMCR
#define PWMCR_PWM_ENABLE
#define PWMCR_PRESCALE_SHIFT
#define PWMCR_MIN_PRESCALE
#define PWMCR_MAX_PRESCALE

#define PWMDCR
#define PWMDCR_MIN_DUTY
#define PWMDCR_MAX_DUTY

#define PWMPCR
#define PWMPCR_MIN_PERIOD
#define PWMPCR_MAX_PERIOD

/* Following only available on 13xx SoCs */
#define PWMMCR
#define PWMMCR_PWM_ENABLE

/**
 * struct spear_pwm_chip - struct representing pwm chip
 *
 * @mmio_base: base address of pwm chip
 * @clk: pointer to clk structure of pwm chip
 */
struct spear_pwm_chip {};

static inline struct spear_pwm_chip *to_spear_pwm_chip(struct pwm_chip *chip)
{}

static inline u32 spear_pwm_readl(struct spear_pwm_chip *chip, unsigned int num,
				  unsigned long offset)
{}

static inline void spear_pwm_writel(struct spear_pwm_chip *chip,
				    unsigned int num, unsigned long offset,
				    unsigned long val)
{}

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

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

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

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

static const struct pwm_ops spear_pwm_ops =;

static int spear_pwm_probe(struct platform_device *pdev)
{}

static const struct of_device_id spear_pwm_of_match[] =;

MODULE_DEVICE_TABLE(of, spear_pwm_of_match);

static struct platform_driver spear_pwm_driver =;

module_platform_driver();

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