linux/drivers/counter/intel-qep.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Intel Quadrature Encoder Peripheral driver
 *
 * Copyright (C) 2019-2021 Intel Corporation
 *
 * Author: Felipe Balbi (Intel)
 * Author: Jarkko Nikula <[email protected]>
 * Author: Raymond Tan <[email protected]>
 */
#include <linux/counter.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/pci.h>
#include <linux/pm_runtime.h>

#define INTEL_QEPCON
#define INTEL_QEPFLT
#define INTEL_QEPCOUNT
#define INTEL_QEPMAX
#define INTEL_QEPWDT
#define INTEL_QEPCAPDIV
#define INTEL_QEPCNTR
#define INTEL_QEPCAPBUF
#define INTEL_QEPINT_STAT
#define INTEL_QEPINT_MASK

/* QEPCON */
#define INTEL_QEPCON_EN
#define INTEL_QEPCON_FLT_EN
#define INTEL_QEPCON_EDGE_A
#define INTEL_QEPCON_EDGE_B
#define INTEL_QEPCON_EDGE_INDX
#define INTEL_QEPCON_SWPAB
#define INTEL_QEPCON_OP_MODE
#define INTEL_QEPCON_PH_ERR
#define INTEL_QEPCON_COUNT_RST_MODE
#define INTEL_QEPCON_INDX_GATING_MASK
#define INTEL_QEPCON_INDX_GATING(n)
#define INTEL_QEPCON_INDX_PAL_PBL
#define INTEL_QEPCON_INDX_PAL_PBH
#define INTEL_QEPCON_INDX_PAH_PBL
#define INTEL_QEPCON_INDX_PAH_PBH
#define INTEL_QEPCON_CAP_MODE
#define INTEL_QEPCON_FIFO_THRE_MASK
#define INTEL_QEPCON_FIFO_THRE(n)
#define INTEL_QEPCON_FIFO_EMPTY

/* QEPFLT */
#define INTEL_QEPFLT_MAX_COUNT(n)

/* QEPINT */
#define INTEL_QEPINT_FIFOCRIT
#define INTEL_QEPINT_FIFOENTRY
#define INTEL_QEPINT_QEPDIR
#define INTEL_QEPINT_QEPRST_UP
#define INTEL_QEPINT_QEPRST_DOWN
#define INTEL_QEPINT_WDT

#define INTEL_QEPINT_MASK_ALL

#define INTEL_QEP_CLK_PERIOD_NS

struct intel_qep {};

static inline u32 intel_qep_readl(struct intel_qep *qep, u32 offset)
{}

static inline void intel_qep_writel(struct intel_qep *qep,
				    u32 offset, u32 value)
{}

static void intel_qep_init(struct intel_qep *qep)
{}

static int intel_qep_count_read(struct counter_device *counter,
				struct counter_count *count, u64 *val)
{}

static const enum counter_function intel_qep_count_functions[] =;

static int intel_qep_function_read(struct counter_device *counter,
				   struct counter_count *count,
				   enum counter_function *function)
{}

static const enum counter_synapse_action intel_qep_synapse_actions[] =;

static int intel_qep_action_read(struct counter_device *counter,
				 struct counter_count *count,
				 struct counter_synapse *synapse,
				 enum counter_synapse_action *action)
{}

static const struct counter_ops intel_qep_counter_ops =;

#define INTEL_QEP_SIGNAL(_id, _name)

static struct counter_signal intel_qep_signals[] =;

#define INTEL_QEP_SYNAPSE(_signal_id)

static struct counter_synapse intel_qep_count_synapses[] =;

static int intel_qep_ceiling_read(struct counter_device *counter,
				  struct counter_count *count, u64 *ceiling)
{}

static int intel_qep_ceiling_write(struct counter_device *counter,
				   struct counter_count *count, u64 max)
{}

static int intel_qep_enable_read(struct counter_device *counter,
				 struct counter_count *count, u8 *enable)
{}

static int intel_qep_enable_write(struct counter_device *counter,
				  struct counter_count *count, u8 val)
{}

static int intel_qep_spike_filter_ns_read(struct counter_device *counter,
					  struct counter_count *count,
					  u64 *length)
{}

static int intel_qep_spike_filter_ns_write(struct counter_device *counter,
					   struct counter_count *count,
					   u64 length)
{}

static int intel_qep_preset_enable_read(struct counter_device *counter,
					struct counter_count *count,
					u8 *preset_enable)
{}

static int intel_qep_preset_enable_write(struct counter_device *counter,
					 struct counter_count *count, u8 val)
{}

static struct counter_comp intel_qep_count_ext[] =;

static struct counter_count intel_qep_counter_count[] =;

static int intel_qep_probe(struct pci_dev *pci, const struct pci_device_id *id)
{}

static void intel_qep_remove(struct pci_dev *pci)
{}

static int __maybe_unused intel_qep_suspend(struct device *dev)
{}

static int __maybe_unused intel_qep_resume(struct device *dev)
{}

static UNIVERSAL_DEV_PM_OPS(intel_qep_pm_ops,
			    intel_qep_suspend, intel_qep_resume, NULL);

static const struct pci_device_id intel_qep_id_table[] =;
MODULE_DEVICE_TABLE(pci, intel_qep_id_table);

static struct pci_driver intel_qep_driver =;

module_pci_driver();

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