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

// SPDX-License-Identifier: GPL-2.0-or-later
/*
    Copyright (c) 2003 Mark M. Hoffman <[email protected]>

*/

/*
    This module must be considered BETA unless and until
    the chipset manufacturer releases a datasheet.
    The register definitions are based on the SiS630.

    This module relies on quirk_sis_96x_smbus (drivers/pci/quirks.c)
    for just about every machine for which users have reported.
    If this module isn't detecting your 96x south bridge, have a 
    look there.

    We assume there can only be one SiS96x with one SMBus interface.
*/

#include <linux/module.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/stddef.h>
#include <linux/ioport.h>
#include <linux/i2c.h>
#include <linux/acpi.h>
#include <linux/io.h>

/* base address register in PCI config space */
#define SIS96x_BAR

/* SiS96x SMBus registers */
#define SMB_STS
#define SMB_EN
#define SMB_CNT
#define SMB_HOST_CNT
#define SMB_ADDR
#define SMB_CMD
#define SMB_PCOUNT
#define SMB_COUNT
#define SMB_BYTE
#define SMB_DEV_ADDR
#define SMB_DB0
#define SMB_DB1
#define SMB_SAA

/* register count for request_region */
#define SMB_IOSIZE

/* Other settings */
#define MAX_TIMEOUT

/* SiS96x SMBus constants */
#define SIS96x_QUICK
#define SIS96x_BYTE
#define SIS96x_BYTE_DATA
#define SIS96x_WORD_DATA
#define SIS96x_PROC_CALL
#define SIS96x_BLOCK_DATA

static struct pci_driver sis96x_driver;
static struct i2c_adapter sis96x_adapter;
static u16 sis96x_smbus_base;

static inline u8 sis96x_read(u8 reg)
{}

static inline void sis96x_write(u8 reg, u8 data)
{}

/* Execute a SMBus transaction.
   int size is from SIS96x_QUICK to SIS96x_BLOCK_DATA
 */
static int sis96x_transaction(int size)
{}

/* Return negative errno on error. */
static s32 sis96x_access(struct i2c_adapter * adap, u16 addr,
			 unsigned short flags, char read_write,
			 u8 command, int size, union i2c_smbus_data * data)
{}

static u32 sis96x_func(struct i2c_adapter *adapter)
{}

static const struct i2c_algorithm smbus_algorithm =;

static struct i2c_adapter sis96x_adapter =;

static const struct pci_device_id sis96x_ids[] =;

MODULE_DEVICE_TABLE (pci, sis96x_ids);

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

static void sis96x_remove(struct pci_dev *dev)
{}

static struct pci_driver sis96x_driver =;

module_pci_driver();

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