linux/drivers/gpio/gpio-104-dio-48e.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * GPIO driver for the ACCES 104-DIO-48E series
 * Copyright (C) 2016 William Breathitt Gray
 *
 * This driver supports the following ACCES devices: 104-DIO-48E and
 * 104-DIO-24E.
 */
#include <linux/bits.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/i8254.h>
#include <linux/ioport.h>
#include <linux/irq.h>
#include <linux/isa.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/regmap.h>
#include <linux/spinlock.h>
#include <linux/types.h>

#include "gpio-i8255.h"

MODULE_IMPORT_NS();

#define DIO48E_EXTENT
#define MAX_NUM_DIO48E

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

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

#define DIO48E_ENABLE_INTERRUPT
#define DIO48E_DISABLE_INTERRUPT
#define DIO48E_ENABLE_COUNTER_TIMER_ADDRESSING
#define DIO48E_DISABLE_COUNTER_TIMER_ADDRESSING
#define DIO48E_CLEAR_INTERRUPT

#define DIO48E_NUM_PPI

static const struct regmap_range dio48e_wr_ranges[] =;
static const struct regmap_range dio48e_rd_ranges[] =;
static const struct regmap_range dio48e_volatile_ranges[] =;
static const struct regmap_range dio48e_precious_ranges[] =;
static const struct regmap_access_table dio48e_wr_table =;
static const struct regmap_access_table dio48e_rd_table =;
static const struct regmap_access_table dio48e_volatile_table =;
static const struct regmap_access_table dio48e_precious_table =;

static const struct regmap_range pit_wr_ranges[] =;
static const struct regmap_range pit_rd_ranges[] =;
static const struct regmap_access_table pit_wr_table =;
static const struct regmap_access_table pit_rd_table =;

/* only bit 3 on each respective Port C supports interrupts */
#define DIO48E_REGMAP_IRQ(_ppi)

static const struct regmap_irq dio48e_regmap_irqs[] =;

/**
 * struct dio48e_gpio - GPIO device private data structure
 * @lock:	synchronization lock to prevent I/O race conditions
 * @map:	Regmap for the device
 * @regs:	virtual mapping for device registers
 * @flags:	IRQ flags saved during locking
 * @irq_mask:	Current IRQ mask state on the device
 */
struct dio48e_gpio {};

static void dio48e_regmap_lock(void *lock_arg) __acquires(&dio48egpio->lock)
{}

static void dio48e_regmap_unlock(void *lock_arg) __releases(&dio48egpio->lock)
{}

static void pit_regmap_lock(void *lock_arg) __acquires(&dio48egpio->lock)
{}

static void pit_regmap_unlock(void *lock_arg) __releases(&dio48egpio->lock)
{}

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

#define DIO48E_NGPIO
static const char *dio48e_names[DIO48E_NGPIO] =;

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

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

static struct isa_driver dio48e_driver =;
module_isa_driver_with_irq(dio48e_driver, num_dio48e, num_irq);

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