linux/drivers/gpio/gpio-dln2.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Driver for the Diolan DLN-2 USB-GPIO adapter
 *
 * Copyright (c) 2014 Intel Corporation
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/irqdomain.h>
#include <linux/irq.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/gpio/driver.h>
#include <linux/platform_device.h>
#include <linux/mfd/dln2.h>

#define DLN2_GPIO_ID

#define DLN2_GPIO_GET_PIN_COUNT
#define DLN2_GPIO_SET_DEBOUNCE
#define DLN2_GPIO_GET_DEBOUNCE
#define DLN2_GPIO_PORT_GET_VAL
#define DLN2_GPIO_PIN_GET_VAL
#define DLN2_GPIO_PIN_SET_OUT_VAL
#define DLN2_GPIO_PIN_GET_OUT_VAL
#define DLN2_GPIO_CONDITION_MET_EV
#define DLN2_GPIO_PIN_ENABLE
#define DLN2_GPIO_PIN_DISABLE
#define DLN2_GPIO_PIN_SET_DIRECTION
#define DLN2_GPIO_PIN_GET_DIRECTION
#define DLN2_GPIO_PIN_SET_EVENT_CFG
#define DLN2_GPIO_PIN_GET_EVENT_CFG

#define DLN2_GPIO_EVENT_NONE
#define DLN2_GPIO_EVENT_CHANGE
#define DLN2_GPIO_EVENT_LVL_HIGH
#define DLN2_GPIO_EVENT_LVL_LOW
#define DLN2_GPIO_EVENT_CHANGE_RISING
#define DLN2_GPIO_EVENT_CHANGE_FALLING
#define DLN2_GPIO_EVENT_MASK

#define DLN2_GPIO_MAX_PINS

struct dln2_gpio {};

struct dln2_gpio_pin {};

struct dln2_gpio_pin_val {};

static int dln2_gpio_get_pin_count(struct platform_device *pdev)
{}

static int dln2_gpio_pin_cmd(struct dln2_gpio *dln2, int cmd, unsigned pin)
{}

static int dln2_gpio_pin_val(struct dln2_gpio *dln2, int cmd, unsigned int pin)
{}

static int dln2_gpio_pin_get_in_val(struct dln2_gpio *dln2, unsigned int pin)
{}

static int dln2_gpio_pin_get_out_val(struct dln2_gpio *dln2, unsigned int pin)
{}

static int dln2_gpio_pin_set_out_val(struct dln2_gpio *dln2,
				     unsigned int pin, int value)
{}

#define DLN2_GPIO_DIRECTION_IN
#define DLN2_GPIO_DIRECTION_OUT

static int dln2_gpio_request(struct gpio_chip *chip, unsigned offset)
{}

static void dln2_gpio_free(struct gpio_chip *chip, unsigned offset)
{}

static int dln2_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
{}

static int dln2_gpio_get(struct gpio_chip *chip, unsigned int offset)
{}

static void dln2_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
{}

static int dln2_gpio_set_direction(struct gpio_chip *chip, unsigned offset,
				   unsigned dir)
{}

static int dln2_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
{}

static int dln2_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
				      int value)
{}

static int dln2_gpio_set_config(struct gpio_chip *chip, unsigned offset,
				unsigned long config)
{}

static int dln2_gpio_set_event_cfg(struct dln2_gpio *dln2, unsigned pin,
				   unsigned type, unsigned period)
{}

static void dln2_irq_unmask(struct irq_data *irqd)
{}

static void dln2_irq_mask(struct irq_data *irqd)
{}

static int dln2_irq_set_type(struct irq_data *irqd, unsigned type)
{}

static void dln2_irq_bus_lock(struct irq_data *irqd)
{}

static void dln2_irq_bus_unlock(struct irq_data *irqd)
{}

static const struct irq_chip dln2_irqchip =;

static void dln2_gpio_event(struct platform_device *pdev, u16 echo,
			    const void *data, int len)
{}

static int dln2_gpio_probe(struct platform_device *pdev)
{}

static void dln2_gpio_remove(struct platform_device *pdev)
{}

static struct platform_driver dln2_gpio_driver =;

module_platform_driver();

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