mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-12-05 22:08:19 +00:00
added force option, can be useful for testing i2c-sis630 on other SIS chips
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1510 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
2caaca22a3
commit
b4bb628fff
1 file changed
+15
-2
@@ -91,6 +91,14 @@
|
|||||||
#define SIS630_PCALL 0x04
|
#define SIS630_PCALL 0x04
|
||||||
#define SIS630_BLOCK_DATA 0x05
|
#define SIS630_BLOCK_DATA 0x05
|
||||||
|
|
||||||
|
/* insmod parameters */
|
||||||
|
|
||||||
|
/* If force is set to anything different from 0, we forcibly enable the
|
||||||
|
SIS630. DANGEROUS! */
|
||||||
|
static int force = 0;
|
||||||
|
MODULE_PARM(force, "i");
|
||||||
|
MODULE_PARM_DESC(force, "Forcibly enable the SIS630. DANGEROUS!")
|
||||||
|
|
||||||
|
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
static
|
static
|
||||||
@@ -316,7 +324,7 @@ u32 sis630_func(struct i2c_adapter *adapter) {
|
|||||||
|
|
||||||
int sis630_setup(void) {
|
int sis630_setup(void) {
|
||||||
unsigned char b;
|
unsigned char b;
|
||||||
struct pci_dev *sis630_dev = NULL;
|
struct pci_dev *sis630_dev = NULL,*tmp = NULL;
|
||||||
|
|
||||||
/* First check whether we can access PCI at all */
|
/* First check whether we can access PCI at all */
|
||||||
if (pci_present() == 0) {
|
if (pci_present() == 0) {
|
||||||
@@ -331,10 +339,15 @@ int sis630_setup(void) {
|
|||||||
printk(KERN_ERR "i2c-sis630.o: Error: Can't detect SIS630!\n");
|
printk(KERN_ERR "i2c-sis630.o: Error: Can't detect SIS630!\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
if (NULL == pci_find_device(PCI_VENDOR_ID_SI,PCI_DEVICE_ID_SI_630,NULL)) {
|
tmp = pci_find_device(PCI_VENDOR_ID_SI,PCI_DEVICE_ID_SI_630,NULL);
|
||||||
|
if (tmp == NULL && force == 0) {
|
||||||
printk(KERN_ERR "i2c-sis630.o: Error: Can't detect SIS630!\n");
|
printk(KERN_ERR "i2c-sis630.o: Error: Can't detect SIS630!\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
else if (tmp == NULL && force > 0) {
|
||||||
|
printk(KERN_NOTICE "i2c-sis630.o: WARNING: Can't detect SIS630 , but "
|
||||||
|
"loading because of force option enabled\n");
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Enable ACPI first , so we can accsess reg 74-75
|
Enable ACPI first , so we can accsess reg 74-75
|
||||||
|
|||||||
Reference in new issue
Block a user