linux/drivers/gpio/gpio-pch.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2011 LAPIS Semiconductor Co., Ltd.
 */
#include <linux/bits.h>
#include <linux/gpio/driver.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/slab.h>

#define PCH_EDGE_FALLING
#define PCH_EDGE_RISING
#define PCH_LEVEL_L
#define PCH_LEVEL_H
#define PCH_EDGE_BOTH
#define PCH_IM_MASK

#define PCH_IRQ_BASE

struct pch_regs {};

#define PCI_DEVICE_ID_INTEL_EG20T_PCH
#define PCI_DEVICE_ID_ROHM_ML7223m_IOH
#define PCI_DEVICE_ID_ROHM_ML7223n_IOH
#define PCI_DEVICE_ID_ROHM_EG20T_PCH

enum pch_type_t {};

/* Specifies number of GPIO PINS */
static int gpio_pins[] =;

/**
 * struct pch_gpio_reg_data - The register store data.
 * @ien_reg:	To store contents of IEN register.
 * @imask_reg:	To store contents of IMASK register.
 * @po_reg:	To store contents of PO register.
 * @pm_reg:	To store contents of PM register.
 * @im0_reg:	To store contents of IM0 register.
 * @im1_reg:	To store contents of IM1 register.
 * @gpio_use_sel_reg : To store contents of GPIO_USE_SEL register.
 *		       (Only ML7223 Bus-n)
 */
struct pch_gpio_reg_data {};

/**
 * struct pch_gpio - GPIO private data structure.
 * @base:			PCI base address of Memory mapped I/O register.
 * @reg:			Memory mapped PCH GPIO register list.
 * @dev:			Pointer to device structure.
 * @gpio:			Data for GPIO infrastructure.
 * @pch_gpio_reg:		Memory mapped Register data is saved here
 *				when suspend.
 * @lock:			Used for register access protection
 * @irq_base:		Save base of IRQ number for interrupt
 * @ioh:		IOH ID
 * @spinlock:		Used for register access protection
 */
struct pch_gpio {};

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

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

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

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

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

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

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

static void pch_gpio_setup(struct pch_gpio *chip)
{}

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

static void pch_irq_unmask(struct irq_data *d)
{}

static void pch_irq_mask(struct irq_data *d)
{}

static void pch_irq_ack(struct irq_data *d)
{}

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

static int pch_gpio_alloc_generic_chip(struct pch_gpio *chip,
				       unsigned int irq_start,
				       unsigned int num)
{}

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

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

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

static SIMPLE_DEV_PM_OPS(pch_gpio_pm_ops, pch_gpio_suspend, pch_gpio_resume);

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

static struct pci_driver pch_gpio_driver =;

module_pci_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();