Skip Inpout-dependent detection when inpout is not available
This commit is contained in:
parent
23db961be3
commit
647670a04a
3 changed files with 21 additions and 0 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include "i2c_smbus_i801.h"
|
||||
#include <Windows.h>
|
||||
#include "inpout32.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
|
|
@ -488,6 +489,12 @@ s32 i2c_smbus_i801::i2c_smbus_xfer(u8 addr, char read_write, u8 command, int siz
|
|||
|
||||
void i2c_smbus_i801_detect()
|
||||
{
|
||||
if(!IsInpOutDriverOpen())
|
||||
{
|
||||
LOG_NOTICE("inpout32 is not loaded, i801 I2C bus detection aborted");
|
||||
return;
|
||||
}
|
||||
|
||||
i2c_smbus_interface * bus;
|
||||
HRESULT hres;
|
||||
Wmi wmi;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "i2c_smbus_nct6775.h"
|
||||
#include <Windows.h>
|
||||
#include "inpout32.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
|
|
@ -193,6 +194,12 @@ s32 i2c_smbus_nct6775::i2c_smbus_xfer(u8 addr, char read_write, u8 command, int
|
|||
|
||||
void i2c_smbus_nct6775_detect()
|
||||
{
|
||||
if(!IsInpOutDriverOpen())
|
||||
{
|
||||
LOG_NOTICE("inpout32 is not loaded, nct6775 I2C bus detection aborted");
|
||||
return;
|
||||
}
|
||||
|
||||
i2c_smbus_interface* bus;
|
||||
int sioaddr = 0x2E;
|
||||
superio_enter(sioaddr);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "i2c_smbus_piix4.h"
|
||||
#include <Windows.h>
|
||||
#include "inpout32.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
//Logic adapted from piix4_transaction() in i2c-piix4.c
|
||||
int i2c_smbus_piix4::piix4_transaction()
|
||||
|
|
@ -182,6 +183,12 @@ s32 i2c_smbus_piix4::i2c_smbus_xfer(u8 addr, char read_write, u8 command, int si
|
|||
|
||||
void i2c_smbus_piix4_detect()
|
||||
{
|
||||
if(!IsInpOutDriverOpen())
|
||||
{
|
||||
LOG_NOTICE("inpout32 is not loaded, piix4 I2C bus detection aborted");
|
||||
return;
|
||||
}
|
||||
|
||||
i2c_smbus_interface * bus;
|
||||
HRESULT hres;
|
||||
Wmi wmi;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue