linux/drivers/gpio/gpio-ml-ioh.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2010 OKI SEMICONDUCTOR Co., LTD.
 */
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/gpio/driver.h>
#include <linux/interrupt.h>
#include <linux/irq.h>

#define IOH_EDGE_FALLING
#define IOH_EDGE_RISING
#define IOH_LEVEL_L
#define IOH_LEVEL_H
#define IOH_EDGE_BOTH
#define IOH_IM_MASK

#define IOH_IRQ_BASE

struct ioh_reg_comn {};

struct ioh_regs {};

/**
 * struct ioh_gpio_reg_data - The register store data.
 * @ien_reg:	To store contents of interrupt enable register.
 * @imask_reg:	To store contents of interrupt mask regist
 * @po_reg:	To store contents of PO register.
 * @pm_reg:	To store contents of PM register.
 * @im0_reg:	To store contents of interrupt mode regist0
 * @im1_reg:	To store contents of interrupt mode regist1
 * @use_sel_reg: To store contents of GPIO_USE_SEL0~3
 */
struct ioh_gpio_reg_data {};

/**
 * struct ioh_gpio - GPIO private data structure.
 * @base:			PCI base address of Memory mapped I/O register.
 * @reg:			Memory mapped IOH GPIO register list.
 * @dev:			Pointer to device structure.
 * @gpio:			Data for GPIO infrastructure.
 * @ioh_gpio_reg:		Memory mapped Register data is saved here
 *				when suspend.
 * @gpio_use_sel:		Save GPIO_USE_SEL1~4 register for PM
 * @ch:				Indicate GPIO channel
 * @irq_base:		Save base of IRQ number for interrupt
 * @spinlock:		Used for register access protection
 */
struct ioh_gpio {};

static const int num_ports[] =;

static void ioh_gpio_set(struct gpio_chip *gpio, unsigned nr, int val)
{}

static int ioh_gpio_get(struct gpio_chip *gpio, unsigned nr)
{}

static int ioh_gpio_direction_output(struct gpio_chip *gpio, unsigned nr,
				     int val)
{}

static int ioh_gpio_direction_input(struct gpio_chip *gpio, unsigned nr)
{}

/*
 * Save register configuration and disable interrupts.
 */
static void __maybe_unused ioh_gpio_save_reg_conf(struct ioh_gpio *chip)
{}

/*
 * This function restores the register configuration of the GPIO device.
 */
static void __maybe_unused ioh_gpio_restore_reg_conf(struct ioh_gpio *chip)
{}

static int ioh_gpio_to_irq(struct gpio_chip *gpio, unsigned offset)
{}

static void ioh_gpio_setup(struct ioh_gpio *chip, int num_port)
{}

static int ioh_irq_type(struct irq_data *d, unsigned int type)
{}

static void ioh_irq_unmask(struct irq_data *d)
{}

static void ioh_irq_mask(struct irq_data *d)
{}

static void ioh_irq_disable(struct irq_data *d)
{}

static void ioh_irq_enable(struct irq_data *d)
{}

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

static int ioh_gpio_alloc_generic_chip(struct ioh_gpio *chip,
				       unsigned int irq_start,
				       unsigned int num)
{}

static int ioh_gpio_probe(struct pci_dev *pdev,
				    const struct pci_device_id *id)
{}

static int __maybe_unused ioh_gpio_suspend(struct device *dev)
{}

static int __maybe_unused ioh_gpio_resume(struct device *dev)
{}

static SIMPLE_DEV_PM_OPS(ioh_gpio_pm_ops, ioh_gpio_suspend, ioh_gpio_resume);

static const struct pci_device_id ioh_gpio_pcidev_id[] =;
MODULE_DEVICE_TABLE(pci, ioh_gpio_pcidev_id);

static struct pci_driver ioh_gpio_driver =;

module_pci_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();