<commit_before>/*
    i2c-savage4.c - Part of lm_sensors, Linux kernel modules for hardware
              monitoring
    Copyright (C) 1998-2003  The LM Sensors Team
    <NAME> <<EMAIL>>
    <NAME> <<EMAIL>>
    
    Based on i2c-voodoo3.c.

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

/* This interfaces to the I2C bus of the Savage4 to gain access to
   the BT869 and possibly other I2C devices. The DDC bus is not
   yet supported because its register is not memory-mapped.
   However we leave the DDC code here, commented out, to make
   it easier to add later.
*/

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

/* 3DFX defines */
#define PCI_CHIP_SAVAGE3D	0x8A20
#define PCI_CHIP_SAVAGE3D_MV	0x8A21
#define PCI_CHIP_SAVAGE4	0x8A22
#define PCI_CHIP_SAVAGE2000	0x9102
#define PCI_CHIP_PROSAVAGE_PM	0x8A25
#define PCI_CHIP_PROSAVAGE_KM	0x8A26
#define PCI_CHIP_SAVAGE_MX_MV	0x8c10
#define PCI_CHIP_SAVAGE_MX	0x8c11
#define PCI_CHIP_SAVAGE_IX_MV	0x8c12
#define PCI_CHIP_SAVAGE_IX	0x8c13

#define REG			0xff20	/* Serial Port 1 Register */

/* bit locations in the register */
#define DDC_ENAB		0x00040000
#define DDC_SCL_OUT		0x00080000
#define DDC_SDA_OUT		0x00100000
#define DDC_SCL_IN		0x00200000
#define DDC_SDA_IN		0x00400000
#define I2C_ENAB		0x00000020
#define I2C_SCL_OUT		0x00000001
#define I2C_SDA_OUT		0x00000002
#define I2C_SCL_IN		0x00000008
#define I2C_SDA_IN		0x00000010

/* initialization states */
#define INIT2			0x20
#define INIT3			0x04

/* delays */
#define CYCLE_DELAY		10<commit_msg>i2c-savage4: Delete many unused defines<commit_after>/*
    i2c-savage4.c - Part of lm_sensors, Linux kernel modules for hardware
              monitoring
    Copyright (C) 1998-2003  The LM Sensors Team
    <NAME> <<EMAIL>>
    <NAME> <<EMAIL>>
    
    Based on i2c-voodoo3.c.

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

/* This interfaces to the I2C bus of the Savage4 to gain access to
   the BT869 and possibly other I2C devices. The DDC bus is not
   yet supported because its register is not memory-mapped.
*/

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

/* device IDs */
#define PCI_CHIP_SAVAGE4	0x8A22
#define PCI_CHIP_SAVAGE2000	0x9102

#define REG			0xff20	/* Serial Port 1 Register */

/* bit locations in the register */
#define I2C_ENAB		0x00000020
#define I2C_SCL_OUT		0x00000001
#define I2C_SDA_OUT		0x00000002
#define I2C_SCL_IN		0x00000008
#define I2C_SDA_IN		0x00000010

/* delays */
#define CYCLE_DELAY		10
{'fraction_non_alphanumeric': 0.06467661691542288, 'fraction_numerical': 0.07164179104477612, 'mean_word_length': 3.675581395348837, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 6, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5194401', 'n_tokens_mistral': 1573, 'n_tokens_neox': 1394, 'n_words': 510}