search for: nouveau_thermal_i2c_probe

Displaying 1 result from an estimated 1 matches for "nouveau_thermal_i2c_probe".

2009 Nov 19
2
[RFC] nouveau: Add basic i2c sensor chip support
...l_g84_read_temp(struct drm_device *dev) +{ + return nv_rd32(dev, 0x20400); +} + +static int nouveau_thermal_i2c_xfer(struct i2c_adapter *adapter, int addr) +{ + int ret; + ret = i2c_smbus_xfer(adapter, addr, 0, 0, 0, I2C_SMBUS_QUICK, NULL); + + if (ret) + return ret; + + return 0; +} + +static int nouveau_thermal_i2c_probe(struct i2c_adapter *adapter, int addr) +{ + struct i2c_board_info info = { }; + + if (nouveau_thermal_i2c_xfer(adapter, addr)) + return -ENODEV; + + switch (addr) { + case 0x2d: +#ifndef CONFIG_SENSORS_W83781D + request_module("w83781d"); +#endif + strlcpy(info.type, "w83781d&quot...