linux/drivers/i2c/busses/i2c-via.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
    i2c Support for Via Technologies 82C586B South Bridge

    Copyright (c) 1998, 1999 Kyösti Mälkki <[email protected]>

*/

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/ioport.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <linux/io.h>

/* Power management registers */
#define PM_CFG_REVID
#define PM_CFG_IOBASE0
#define PM_CFG_IOBASE1

#define I2C_DIR
#define I2C_OUT
#define I2C_IN
#define I2C_SCL
#define I2C_SDA

/* io-region reservation */
#define IOSPACE

static struct pci_driver vt586b_driver;
static u16 pm_io_base;

/*
   It does not appear from the datasheet that the GPIO pins are
   open drain. So a we set a low value by setting the direction to
   output and a high value by setting the direction to input and
   relying on the required I2C pullup. The data value is initialized
   to 0 in via_init() and never changed.
*/
static void bit_via_setscl(void *data, int state)
{}

static void bit_via_setsda(void *data, int state)
{}

static int bit_via_getscl(void *data)
{}

static int bit_via_getsda(void *data)
{}


static struct i2c_algo_bit_data bit_data =;

static struct i2c_adapter vt586b_adapter =;


static const struct pci_device_id vt586b_ids[] =;

MODULE_DEVICE_TABLE (pci, vt586b_ids);

static int vt586b_probe(struct pci_dev *dev, const struct pci_device_id *id)
{}

static void vt586b_remove(struct pci_dev *dev)
{}


static struct pci_driver vt586b_driver =;

module_pci_driver();

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