#include <linux/counter.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/types.h>
#define INTERRUPT_CNT_NAME …
struct interrupt_cnt_priv { … };
static irqreturn_t interrupt_cnt_isr(int irq, void *dev_id)
{ … }
static int interrupt_cnt_enable_read(struct counter_device *counter,
struct counter_count *count, u8 *enable)
{ … }
static int interrupt_cnt_enable_write(struct counter_device *counter,
struct counter_count *count, u8 enable)
{ … }
static struct counter_comp interrupt_cnt_ext[] = …;
static const enum counter_synapse_action interrupt_cnt_synapse_actions[] = …;
static int interrupt_cnt_action_read(struct counter_device *counter,
struct counter_count *count,
struct counter_synapse *synapse,
enum counter_synapse_action *action)
{ … }
static int interrupt_cnt_read(struct counter_device *counter,
struct counter_count *count, u64 *val)
{ … }
static int interrupt_cnt_write(struct counter_device *counter,
struct counter_count *count, const u64 val)
{ … }
static const enum counter_function interrupt_cnt_functions[] = …;
static int interrupt_cnt_function_read(struct counter_device *counter,
struct counter_count *count,
enum counter_function *function)
{ … }
static int interrupt_cnt_signal_read(struct counter_device *counter,
struct counter_signal *signal,
enum counter_signal_level *level)
{ … }
static int interrupt_cnt_watch_validate(struct counter_device *counter,
const struct counter_watch *watch)
{ … }
static const struct counter_ops interrupt_cnt_ops = …;
static int interrupt_cnt_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id interrupt_cnt_of_match[] = …;
MODULE_DEVICE_TABLE(of, interrupt_cnt_of_match);
static struct platform_driver interrupt_cnt_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_IMPORT_NS(…);