linux/sound/soc/starfive/jh7110_pwmdac.c

// SPDX-License-Identifier: GPL-2.0
/*
 * jh7110_pwmdac.c -- StarFive JH7110 PWM-DAC driver
 *
 * Copyright (C) 2021-2023 StarFive Technology Co., Ltd.
 *
 * Authors: Jenny Zhang
 *	    Curry Zhang
 *	    Xingyu Wu <[email protected]>
 *	    Hal Feng <[email protected]>
 */

#include <linux/clk.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <sound/dmaengine_pcm.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>

#define JH7110_PWMDAC_WDATA
#define JH7110_PWMDAC_CTRL
	#define JH7110_PWMDAC_ENABLE
	#define JH7110_PWMDAC_SHIFT
	#define JH7110_PWMDAC_DUTY_CYCLE_SHIFT
	#define JH7110_PWMDAC_DUTY_CYCLE_MASK
	#define JH7110_PWMDAC_CNT_N_SHIFT
	#define JH7110_PWMDAC_CNT_N_MASK
	#define JH7110_PWMDAC_DATA_CHANGE
	#define JH7110_PWMDAC_DATA_MODE
	#define JH7110_PWMDAC_DATA_SHIFT_SHIFT
	#define JH7110_PWMDAC_DATA_SHIFT_MASK

enum JH7110_PWMDAC_SHIFT_VAL {};

enum JH7110_PWMDAC_DUTY_CYCLE_VAL {};

enum JH7110_PWMDAC_CNT_N_VAL {};

enum JH7110_PWMDAC_DATA_CHANGE_VAL {};

enum JH7110_PWMDAC_DATA_MODE_VAL {};

enum JH7110_PWMDAC_DATA_SHIFT_VAL {};

struct jh7110_pwmdac_cfg {};

struct jh7110_pwmdac_dev {};

static inline void jh7110_pwmdac_write_reg(void __iomem *io_base, int reg, u32 val)
{}

static inline u32 jh7110_pwmdac_read_reg(void __iomem *io_base, int reg)
{}

static void jh7110_pwmdac_set_enable(struct jh7110_pwmdac_dev *dev, bool enable)
{}

static void jh7110_pwmdac_set_shift(struct jh7110_pwmdac_dev *dev)
{}

static void jh7110_pwmdac_set_duty_cycle(struct jh7110_pwmdac_dev *dev)
{}

static void jh7110_pwmdac_set_cnt_n(struct jh7110_pwmdac_dev *dev)
{}

static void jh7110_pwmdac_set_data_change(struct jh7110_pwmdac_dev *dev)
{}

static void jh7110_pwmdac_set_data_mode(struct jh7110_pwmdac_dev *dev)
{}

static void jh7110_pwmdac_set_data_shift(struct jh7110_pwmdac_dev *dev)
{}

static void jh7110_pwmdac_set(struct jh7110_pwmdac_dev *dev)
{}

static void jh7110_pwmdac_stop(struct jh7110_pwmdac_dev *dev)
{}

static int jh7110_pwmdac_startup(struct snd_pcm_substream *substream,
				 struct snd_soc_dai *dai)
{}

static int jh7110_pwmdac_hw_params(struct snd_pcm_substream *substream,
				   struct snd_pcm_hw_params *params,
				   struct snd_soc_dai *dai)
{}

static int jh7110_pwmdac_trigger(struct snd_pcm_substream *substream, int cmd,
				 struct snd_soc_dai *dai)
{}

static int jh7110_pwmdac_crg_enable(struct jh7110_pwmdac_dev *dev, bool enable)
{}

static int jh7110_pwmdac_dai_probe(struct snd_soc_dai *dai)
{}

static const struct snd_soc_dai_ops jh7110_pwmdac_dai_ops =;

static const struct snd_soc_component_driver jh7110_pwmdac_component =;

static struct snd_soc_dai_driver jh7110_pwmdac_dai =;

static int jh7110_pwmdac_runtime_suspend(struct device *dev)
{}

static int jh7110_pwmdac_runtime_resume(struct device *dev)
{}

static int jh7110_pwmdac_system_suspend(struct device *dev)
{}

static int jh7110_pwmdac_system_resume(struct device *dev)
{}

static const struct dev_pm_ops jh7110_pwmdac_pm_ops =;

static void jh7110_pwmdac_init_params(struct jh7110_pwmdac_dev *dev)
{}

static int jh7110_pwmdac_probe(struct platform_device *pdev)
{}

static void jh7110_pwmdac_remove(struct platform_device *pdev)
{}

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

static struct platform_driver jh7110_pwmdac_driver =;
module_platform_driver();

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