linux/drivers/gpio/gpio-it87.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  GPIO interface for IT87xx Super I/O chips
 *
 *  Author: Diego Elio Pettenò <[email protected]>
 *  Copyright (c) 2017 Google, Inc.
 *
 *  Based on it87_wdt.c     by Oliver Schuster
 *           gpio-it8761e.c by Denis Turischev
 *           gpio-stmpe.c   by Rabin Vincent
 */

#define pr_fmt(fmt)

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/io.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/gpio/driver.h>

/* Chip Id numbers */
#define NO_DEV_ID
#define IT8613_ID
#define IT8620_ID
#define IT8628_ID
#define IT8718_ID
#define IT8728_ID
#define IT8732_ID
#define IT8761_ID
#define IT8772_ID
#define IT8786_ID

/* IO Ports */
#define REG
#define VAL

/* Logical device Numbers LDN */
#define GPIO

/* Configuration Registers and Functions */
#define LDNREG
#define CHIPID
#define CHIPREV

/**
 * struct it87_gpio - it87-specific GPIO chip
 * @chip: the underlying gpio_chip structure
 * @lock: a lock to avoid races between operations
 * @io_base: base address for gpio ports
 * @io_size: size of the port rage starting from io_base.
 * @output_base: Super I/O register address for Output Enable register
 * @simple_base: Super I/O 'Simple I/O' Enable register
 * @simple_size: Super IO 'Simple I/O' Enable register size; this is
 *	required because IT87xx chips might only provide Simple I/O
 *	switches on a subset of lines, whereas the others keep the
 *	same status all time.
 */
struct it87_gpio {};

static struct it87_gpio it87_gpio_chip =;

/* Superio chip access functions; copied from wdt_it87 */

static inline int superio_enter(void)
{}

static inline void superio_exit(void)
{}

static inline void superio_select(int ldn)
{}

static inline int superio_inb(int reg)
{}

static inline void superio_outb(int val, int reg)
{}

static inline int superio_inw(int reg)
{}

static inline void superio_set_mask(int mask, int reg)
{}

static inline void superio_clear_mask(int mask, int reg)
{}

static int it87_gpio_request(struct gpio_chip *chip, unsigned gpio_num)
{}

static int it87_gpio_get(struct gpio_chip *chip, unsigned gpio_num)
{}

static int it87_gpio_direction_in(struct gpio_chip *chip, unsigned gpio_num)
{}

static void it87_gpio_set(struct gpio_chip *chip,
			  unsigned gpio_num, int val)
{}

static int it87_gpio_direction_out(struct gpio_chip *chip,
				   unsigned gpio_num, int val)
{}

static const struct gpio_chip it87_template_chip =;

static int __init it87_gpio_init(void)
{}

static void __exit it87_gpio_exit(void)
{}

module_init();
module_exit(it87_gpio_exit);

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