I have X600 Radeon video card with external LM63 temperature sensor. In order to access the sensor the radeonfb (i2c-core, i2c_algo_bit, ...) drivers need to loaded. When the radeonfb_create_i2c_busses() called it register I2C bus with adapter class set to 0 (default, not set explicitly). Later when lm63 module is loaded the i2c_register_driver()->__process_new_driver()->i2c_do_add_adapter()->i2c_detect() called. This function check if adapter support driver class: linux/drivers/i2c.c, i2c_detect(): <code> if (!(adapter->class & driver->class)) goto exit_free; </code> Here it's successfully failed. And the LM63 driver become useless for monitoring the GPU temp with lm_sensors. If I add the following line to linux/drivers/video/aty/radeon_i2c.c, radeonfb_create_i2c_busses(): <code> radeon_setup_i2c_bus(&rinfo->i2c[0], "monid"); #warning "Debug code" + rinfo->i2c[0].adapter.class = I2C_CLASS_HWMON; </code> Then lm63 works as expected. Is it possible to fix the radeon driver in this way? Or that problem has to be solved differently? Thanks in advance!
Created attachment 43262 [details] Fix based on Alexander's proposal I've just sent this patch to Benjamin Herrenschmidt.
BTW, note that using the kms radeon driver would solve your problem too, as this driver already has full support for hardware monitoring on Radeon cards.
Fixed by: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=49bb0943329929e73c9a22c97d53c6c8967eb243
In theory a thermal chip can be hooked up to any of the i2c buses on the asic, not just monid.
And in practice?
It's up to the oem. There's a table in the vbios that lists the i2c bus the thermal chip is on.