linux/drivers/gpio/gpio-vx855.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Linux GPIOlib driver for the VIA VX855 integrated southbridge GPIO
 *
 * Copyright (C) 2009 VIA Technologies, Inc.
 * Copyright (C) 2010 One Laptop per Child
 * Author: Harald Welte <[email protected]>
 * All rights reserved.
 */
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/gpio/driver.h>
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/pci.h>
#include <linux/io.h>

#define MODULE_NAME

/* The VX855 south bridge has the following GPIO pins:
 *	GPI 0...13	General Purpose Input
 *	GPO 0...12	General Purpose Output
 *	GPIO 0...14	General Purpose I/O (Open-Drain)
 */

#define NR_VX855_GPI
#define NR_VX855_GPO
#define NR_VX855_GPIO

#define NR_VX855_GPInO
#define NR_VX855_GP

struct vx855_gpio {};

/* resolve a GPIx into the corresponding bit position */
static inline u_int32_t gpi_i_bit(int i)
{}

static inline u_int32_t gpo_o_bit(int i)
{}

static inline u_int32_t gpio_i_bit(int i)
{}

static inline u_int32_t gpio_o_bit(int i)
{}

/* Mapping between numeric GPIO ID and the actual GPIO hardware numbering:
 * 0..13	GPI 0..13
 * 14..26	GPO 0..12
 * 27..41	GPIO 0..14
 */

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

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

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

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

static int vx855gpio_set_config(struct gpio_chip *gpio, unsigned int nr,
				unsigned long config)
{}

static const char *vx855gpio_names[NR_VX855_GP] =;

static void vx855gpio_gpio_setup(struct vx855_gpio *vg)
{}

/* This platform device is ordinarily registered by the vx855 mfd driver */
static int vx855gpio_probe(struct platform_device *pdev)
{}

static struct platform_driver vx855gpio_driver =;

module_platform_driver();

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