linux/drivers/gpio/gpio-sch311x.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * GPIO driver for the SMSC SCH311x Super-I/O chips
 *
 * Copyright (C) 2013 Bruno Randolf <[email protected]>
 *
 * SuperIO functions and chip detection:
 * (c) Copyright 2008 Wim Van Sebroeck <[email protected]>.
 */

#include <linux/ioport.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/gpio/driver.h>
#include <linux/bitops.h>
#include <linux/io.h>

#define DRV_NAME

#define SCH311X_GPIO_CONF_DIR
#define SCH311X_GPIO_CONF_INVERT
#define SCH311X_GPIO_CONF_OPEN_DRAIN

#define SIO_CONFIG_KEY_ENTER
#define SIO_CONFIG_KEY_EXIT

#define GP1

static int sch311x_ioports[] =;

static struct platform_device *sch311x_gpio_pdev;

struct sch311x_pdev_data {};

struct sch311x_gpio_block {};

struct sch311x_gpio_priv {};

struct sch311x_gpio_block_def {};

/* Note: some GPIOs are not available, these are marked with 0x00 */

static struct sch311x_gpio_block_def sch311x_gpio_blocks[] =;

/*
 *	Super-IO functions
 */

static inline int sch311x_sio_enter(int sio_config_port)
{}

static inline void sch311x_sio_exit(int sio_config_port)
{}

static inline int sch311x_sio_inb(int sio_config_port, int reg)
{}

static inline void sch311x_sio_outb(int sio_config_port, int reg, int val)
{}


/*
 *	GPIO functions
 */

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

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

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

static void __sch311x_gpio_set(struct sch311x_gpio_block *block,
			       unsigned offset, int value)
{}

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

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

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

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

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

static int sch311x_gpio_probe(struct platform_device *pdev)
{}

static struct platform_driver sch311x_gpio_driver =;


/*
 *	Init & exit routines
 */

static int __init sch311x_detect(int sio_config_port, unsigned short *addr)
{}

static int __init sch311x_gpio_pdev_add(const unsigned short addr)
{}

static int __init sch311x_gpio_init(void)
{}

static void __exit sch311x_gpio_exit(void)
{}

module_init();
module_exit(sch311x_gpio_exit);

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