Changeset 4

Show
Ignore:
Timestamp:
11/03/98 02:19:04 (10 years ago)
Author:
frodo
Message:

Makefile skeleton, made i2c compile with 2.0 kernels

Please examine the Makefile before extending it, as its approach is
completely new. It should be very modular now, though. Makefile fragments
are called Module.mk.

The Module.mk in i2c does not handle dependencies yet.

There are some patches to bit-mb.c to make it compile with 2.0 kernels.
They have been sent to Simon Vogl (author of the i2c module).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/doc/useful_addresses.html

    r3 r4  
    5656Manager. 
    5757</UL> 
     58<LI>Other things 
     59<UL> 
     60<LI><A HREF="http://www.tip.net.au/~millerp/rmch/recu-make-cons-harm.html">Recursive 
     61Make considered Harmful</A> 
     62<BR>A paper on which the version 2 Makefile is based 
     63</UL> 
    5864</UL> 
    5965</BODY> 
  • lm-sensors/trunk/i2c/bit-mb.c

    r3 r4  
    2525#include <linux/pci.h> 
    2626#include <asm/io.h> 
     27#include <linux/types.h> 
     28#include <linux/version.h> 
     29 
     30/* When exactly was the new pci interface introduced? */ 
     31#if LINUX_VERSION_CODE < 0x020100 
     32#include <linux/bios32.h> 
     33#endif 
     34 
    2735 
    2836#include "i2c.h" 
     
    120128} 
    121129 
     130/* When exactly was the new pci interface introduced? */ 
     131#if LINUX_VERSION_CODE >= 0x020100 
     132 
    122133static u32 find_i2c(void) 
    123134{ 
     
    138149        return (val & (0xff<<8)); 
    139150} 
     151 
     152#else 
     153 
     154static u32 find_i2c(void) 
     155{ 
     156        unsigned char VIA_bus, VIA_devfn; 
     157        u32 val; 
     158         
     159        if (! pcibios_present()) 
     160                return(0); 
     161                 
     162        if(pcibios_find_device( 
     163                PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, 0, &VIA_bus,  
     164                &VIA_devfn)); 
     165                return 0; 
     166 
     167        if ( PCIBIOS_SUCCESSFUL != 
     168                pcibios_read_config_dword(VIA_bus, VIA_devfn, 
     169                        PM_IO_BASE_REGISTER, &val)) 
     170                return 0; 
     171        return (val & (0xff<<8)); 
     172} 
     173 
     174#endif 
     175 
    140176 
    141177#ifdef MODULE