linux/drivers/gpio/gpio-f7188x.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * GPIO driver for Fintek and Nuvoton Super-I/O chips
 *
 * Copyright (C) 2010-2013 LaCie
 *
 * Author: Simon Guinot <[email protected]>
 */

#define DRVNAME
#define pr_fmt(fmt)

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

/*
 * Super-I/O registers
 */
#define SIO_LDSEL
#define SIO_DEVID

#define SIO_UNLOCK_KEY
#define SIO_LOCK_KEY

/*
 * Fintek devices.
 */
#define SIO_FINTEK_DEVREV
#define SIO_FINTEK_MANID

#define SIO_FINTEK_ID

#define SIO_F71869_ID
#define SIO_F71869A_ID
#define SIO_F71882_ID
#define SIO_F71889_ID
#define SIO_F71889A_ID
#define SIO_F81866_ID
#define SIO_F81804_ID
#define SIO_F81865_ID

#define SIO_LD_GPIO_FINTEK

/*
 * Nuvoton devices.
 */
#define SIO_NCT6126D_ID

#define SIO_LD_GPIO_NUVOTON


enum chips {};

static const char * const f7188x_names[] =;

struct f7188x_sio {};

struct f7188x_gpio_bank {};

struct f7188x_gpio_data {};

/*
 * Super-I/O functions.
 */

static inline int superio_inb(int base, int reg)
{}

static int superio_inw(int base, int reg)
{}

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

static inline int superio_enter(int base)
{}

static inline void superio_select(int base, int ld)
{}

static inline void superio_exit(int base)
{}

/*
 * GPIO chip.
 */

static int f7188x_gpio_get_direction(struct gpio_chip *chip, unsigned offset);
static int f7188x_gpio_direction_in(struct gpio_chip *chip, unsigned offset);
static int f7188x_gpio_get(struct gpio_chip *chip, unsigned offset);
static int f7188x_gpio_direction_out(struct gpio_chip *chip,
				     unsigned offset, int value);
static void f7188x_gpio_set(struct gpio_chip *chip, unsigned offset, int value);
static int f7188x_gpio_set_config(struct gpio_chip *chip, unsigned offset,
				  unsigned long config);

#define F7188X_GPIO_BANK(_ngpio, _regbase, _label)

#define f7188x_gpio_dir(base)
#define f7188x_gpio_data_out(base)
#define f7188x_gpio_data_in(base)
/* Output mode register (0:open drain 1:push-pull). */
#define f7188x_gpio_out_mode(base)

#define f7188x_gpio_dir_invert(type)
#define f7188x_gpio_data_single(type)

static struct f7188x_gpio_bank f71869_gpio_bank[] =;

static struct f7188x_gpio_bank f71869a_gpio_bank[] =;

static struct f7188x_gpio_bank f71882_gpio_bank[] =;

static struct f7188x_gpio_bank f71889a_gpio_bank[] =;

static struct f7188x_gpio_bank f71889_gpio_bank[] =;

static struct f7188x_gpio_bank f81866_gpio_bank[] =;


static struct f7188x_gpio_bank f81804_gpio_bank[] =;

static struct f7188x_gpio_bank f81865_gpio_bank[] =;

static struct f7188x_gpio_bank nct6126d_gpio_bank[] =;

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

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

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

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

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

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

/*
 * Platform device and driver.
 */

static int f7188x_gpio_probe(struct platform_device *pdev)
{}

static int __init f7188x_find(int addr, struct f7188x_sio *sio)
{}

static struct platform_device *f7188x_gpio_pdev;

static int __init
f7188x_gpio_device_add(const struct f7188x_sio *sio)
{}

/*
 * Try to match a supported Fintek device by reading the (hard-wired)
 * configuration I/O ports. If available, then register both the platform
 * device and driver to support the GPIOs.
 */

static struct platform_driver f7188x_gpio_driver =;

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

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

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