linux/drivers/input/misc/rotary_encoder.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * rotary_encoder.c
 *
 * (c) 2009 Daniel Mack <[email protected]>
 * Copyright (C) 2011 Johan Hovold <[email protected]>
 *
 * state machine code inspired by code from Tim Ruetz
 *
 * A generic driver for rotary encoders connected to GPIO lines.
 * See file:Documentation/input/devices/rotary-encoder.rst for more information
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/gpio/consumer.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/pm.h>
#include <linux/property.h>

#define DRV_NAME

enum rotary_encoder_encoding {};

struct rotary_encoder {};

static unsigned int rotary_encoder_get_state(struct rotary_encoder *encoder)
{}

static void rotary_encoder_report_event(struct rotary_encoder *encoder)
{}

static irqreturn_t rotary_encoder_irq(int irq, void *dev_id)
{}

static irqreturn_t rotary_encoder_half_period_irq(int irq, void *dev_id)
{}

static irqreturn_t rotary_encoder_quarter_period_irq(int irq, void *dev_id)
{}

static int rotary_encoder_probe(struct platform_device *pdev)
{}

static int rotary_encoder_suspend(struct device *dev)
{}

static int rotary_encoder_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(rotary_encoder_pm_ops,
				rotary_encoder_suspend, rotary_encoder_resume);

#ifdef CONFIG_OF
static const struct of_device_id rotary_encoder_of_match[] =;
MODULE_DEVICE_TABLE(of, rotary_encoder_of_match);
#endif

static struct platform_driver rotary_encoder_driver =;
module_platform_driver();

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