linux/drivers/gpio/gpio-viperboard.c

// SPDX-License-Identifier: GPL-2.0+
/*
 *  Nano River Technologies viperboard GPIO lib driver
 *
 *  (C) 2012 by Lemonage GmbH
 *  Author: Lars Poeschel <[email protected]>
 *  All rights reserved.
 */

#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/usb.h>
#include <linux/gpio/driver.h>

#include <linux/mfd/viperboard.h>

#define VPRBRD_GPIOA_CLK_1MHZ
#define VPRBRD_GPIOA_CLK_100KHZ
#define VPRBRD_GPIOA_CLK_10KHZ
#define VPRBRD_GPIOA_CLK_1KHZ
#define VPRBRD_GPIOA_CLK_100HZ
#define VPRBRD_GPIOA_CLK_10HZ

#define VPRBRD_GPIOA_FREQ_DEFAULT

#define VPRBRD_GPIOA_CMD_CONT
#define VPRBRD_GPIOA_CMD_PULSE
#define VPRBRD_GPIOA_CMD_PWM
#define VPRBRD_GPIOA_CMD_SETOUT
#define VPRBRD_GPIOA_CMD_SETIN
#define VPRBRD_GPIOA_CMD_SETINT
#define VPRBRD_GPIOA_CMD_GETIN

#define VPRBRD_GPIOB_CMD_SETDIR
#define VPRBRD_GPIOB_CMD_SETVAL

struct vprbrd_gpioa_msg {} __packed;

struct vprbrd_gpiob_msg {} __packed;

struct vprbrd_gpio {};

/* gpioa sampling clock module parameter */
static unsigned char gpioa_clk;
static unsigned int gpioa_freq =;
module_param(gpioa_freq, uint, 0);
MODULE_PARM_DESC();

/* ----- begin of gipo a chip -------------------------------------------- */

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

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

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

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

/* ----- end of gpio a chip ---------------------------------------------- */

/* ----- begin of gipo b chip -------------------------------------------- */

static int vprbrd_gpiob_setdir(struct vprbrd *vb, unsigned int offset,
	unsigned int dir)
{}

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

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

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

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

/* ----- end of gpio b chip ---------------------------------------------- */

static int vprbrd_gpio_probe(struct platform_device *pdev)
{}

static struct platform_driver vprbrd_gpio_driver =;

static int __init vprbrd_gpio_init(void)
{}
subsys_initcall(vprbrd_gpio_init);

static void __exit vprbrd_gpio_exit(void)
{}
module_exit(vprbrd_gpio_exit);

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