linux/drivers/gpio/gpio-ws16c48.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * GPIO driver for the WinSystems WS16C48
 * Copyright (C) 2016 William Breathitt Gray
 */
#include <linux/bitfield.h>
#include <linux/bits.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/gpio/regmap.h>
#include <linux/irq.h>
#include <linux/isa.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/spinlock.h>
#include <linux/regmap.h>
#include <linux/types.h>

#define WS16C48_EXTENT
#define MAX_NUM_WS16C48

static unsigned int base[MAX_NUM_WS16C48];
static unsigned int num_ws16c48;
module_param_hw_array(base, uint, ioport, &num_ws16c48, 0);
MODULE_PARM_DESC();

static unsigned int irq[MAX_NUM_WS16C48];
static unsigned int num_irq;
module_param_hw_array(irq, uint, irq, &num_irq, 0);
MODULE_PARM_DESC();

#define WS16C48_DAT_BASE
#define WS16C48_PAGE_LOCK
#define WS16C48_PAGE_BASE
#define WS16C48_POL
#define WS16C48_ENAB
#define WS16C48_INT_ID

#define PAGE_LOCK_PAGE_FIELD
#define POL_PAGE
#define ENAB_PAGE
#define INT_ID_PAGE

static const struct regmap_range ws16c48_wr_ranges[] =;
static const struct regmap_range ws16c48_rd_ranges[] =;
static const struct regmap_range ws16c48_volatile_ranges[] =;
static const struct regmap_access_table ws16c48_wr_table =;
static const struct regmap_access_table ws16c48_rd_table =;
static const struct regmap_access_table ws16c48_volatile_table =;
static const struct regmap_config ws16c48_regmap_config =;

#define WS16C48_NGPIO_PER_REG
#define WS16C48_REGMAP_IRQ(_id)

/* Only the first 24 lines (Port 0-2) support interrupts */
#define WS16C48_NUM_IRQS
static const struct regmap_irq ws16c48_regmap_irqs[WS16C48_NUM_IRQS] =;

/**
 * struct ws16c48_gpio - GPIO device private data structure
 * @map:	regmap for the device
 * @lock:	synchronization lock to prevent I/O race conditions
 * @irq_mask:	I/O bits affected by interrupts
 */
struct ws16c48_gpio {};

static int ws16c48_handle_pre_irq(void *const irq_drv_data) __acquires(&ws16c48gpio->lock)
{}

static int ws16c48_handle_post_irq(void *const irq_drv_data) __releases(&ws16c48gpio->lock)
{}

static int ws16c48_handle_mask_sync(const int index, const unsigned int mask_buf_def,
				    const unsigned int mask_buf, void *const irq_drv_data)
{}

static int ws16c48_set_type_config(unsigned int **const buf, const unsigned int type,
				   const struct regmap_irq *const irq_data, const int idx,
				   void *const irq_drv_data)
{}

#define WS16C48_NGPIO
static const char *ws16c48_names[WS16C48_NGPIO] =;

static int ws16c48_irq_init_hw(struct regmap *const map)
{}

static int ws16c48_probe(struct device *dev, unsigned int id)
{}

static struct isa_driver ws16c48_driver =;

module_isa_driver_with_irq(ws16c48_driver, num_ws16c48, num_irq);

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