linux/drivers/input/keyboard/bcm-keypad.c

// SPDX-License-Identifier: GPL-2.0-only
// Copyright (C) 2014 Broadcom Corporation

#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/gfp.h>
#include <linux/io.h>
#include <linux/input.h>
#include <linux/input/matrix_keypad.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/stddef.h>
#include <linux/types.h>

#define DEFAULT_CLK_HZ
#define MAX_ROWS
#define MAX_COLS

/* Register/field definitions */
#define KPCR_OFFSET
#define KPCR_MODE
#define KPCR_MODE_SHIFT
#define KPCR_MODE_MASK
#define KPCR_ENABLE
#define KPCR_STATUSFILTERENABLE
#define KPCR_STATUSFILTERTYPE_SHIFT
#define KPCR_COLFILTERENABLE
#define KPCR_COLFILTERTYPE_SHIFT
#define KPCR_ROWWIDTH_SHIFT
#define KPCR_COLUMNWIDTH_SHIFT

#define KPIOR_OFFSET
#define KPIOR_ROWOCONTRL_SHIFT
#define KPIOR_ROWOCONTRL_MASK
#define KPIOR_COLUMNOCONTRL_SHIFT
#define KPIOR_COLUMNOCONTRL_MASK
#define KPIOR_COLUMN_IO_DATA_SHIFT

#define KPEMR0_OFFSET
#define KPEMR1_OFFSET
#define KPEMR2_OFFSET
#define KPEMR3_OFFSET
#define KPEMR_EDGETYPE_BOTH

#define KPSSR0_OFFSET
#define KPSSR1_OFFSET
#define KPSSRN_OFFSET(reg_n)
#define KPIMR0_OFFSET
#define KPIMR1_OFFSET
#define KPICR0_OFFSET
#define KPICR1_OFFSET
#define KPICRN_OFFSET(reg_n)
#define KPISR0_OFFSET
#define KPISR1_OFFSET

#define KPCR_STATUSFILTERTYPE_MAX
#define KPCR_COLFILTERTYPE_MAX

/* Macros to determine the row/column from a bit that is set in SSR0/1. */
#define BIT_TO_ROW_SSRN(bit_nr, reg_n)
#define BIT_TO_COL(bit_nr)

/* Structure representing various run-time entities */
struct bcm_kp {};

/*
 * Returns the keycode from the input device keymap given the row and
 * column.
 */
static int bcm_kp_get_keycode(struct bcm_kp *kp, int row, int col)
{}

static void bcm_kp_report_keys(struct bcm_kp *kp, int reg_num, int pull_mode)
{}

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

static int bcm_kp_start(struct bcm_kp *kp)
{}

static void bcm_kp_stop(const struct bcm_kp *kp)
{}

static int bcm_kp_open(struct input_dev *dev)
{}

static void bcm_kp_close(struct input_dev *dev)
{}

static int bcm_kp_matrix_key_parse_dt(struct bcm_kp *kp)
{}


static int bcm_kp_probe(struct platform_device *pdev)
{}

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

static struct platform_driver bcm_kp_device_driver =;

module_platform_driver();

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