linux/drivers/input/keyboard/matrix_keypad.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  GPIO driven matrix keyboard driver
 *
 *  Copyright (c) 2008 Marek Vasut <[email protected]>
 *
 *  Based on corgikbd.c
 */

#include <linux/types.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/platform_device.h>
#include <linux/input.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/input/matrix_keypad.h>
#include <linux/slab.h>
#include <linux/of.h>

struct matrix_keypad {};

/*
 * NOTE: If drive_inactive_cols is false, then the GPIO has to be put into
 * HiZ when de-activated to cause minmal side effect when scanning other
 * columns. In that case it is configured here to be input, otherwise it is
 * driven with the inactive value.
 */
static void __activate_col(struct matrix_keypad *keypad, int col, bool on)
{}

static void activate_col(struct matrix_keypad *keypad, int col, bool on)
{}

static void activate_all_cols(struct matrix_keypad *keypad, bool on)
{}

static bool row_asserted(struct matrix_keypad *keypad, int row)
{}

static void enable_row_irqs(struct matrix_keypad *keypad)
{}

static void disable_row_irqs(struct matrix_keypad *keypad)
{}

/*
 * This gets the keys from keyboard and reports it to input subsystem
 */
static void matrix_keypad_scan(struct work_struct *work)
{}

static irqreturn_t matrix_keypad_interrupt(int irq, void *id)
{}

static int matrix_keypad_start(struct input_dev *dev)
{}

static void matrix_keypad_stop(struct input_dev *dev)
{}

static void matrix_keypad_enable_wakeup(struct matrix_keypad *keypad)
{}

static void matrix_keypad_disable_wakeup(struct matrix_keypad *keypad)
{}

static int matrix_keypad_suspend(struct device *dev)
{}

static int matrix_keypad_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(matrix_keypad_pm_ops,
				matrix_keypad_suspend, matrix_keypad_resume);

static int matrix_keypad_init_gpio(struct platform_device *pdev,
				   struct matrix_keypad *keypad)
{}

static int matrix_keypad_setup_interrupts(struct platform_device *pdev,
					  struct matrix_keypad *keypad)
{}

static int matrix_keypad_probe(struct platform_device *pdev)
{}

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

static struct platform_driver matrix_keypad_driver =;
module_platform_driver();

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