On Wed, Jan 25, 2017 at 09:49:23PM +0100, Wolfram Sang wrote: > On Sun, Dec 11, 2016 at 11:04:35PM +0100, Wolfram Sang wrote: > > On Fri, Dec 09, 2016 at 10:31:58AM +0100, Jan Glauber wrote: > > > It was reported that ipmi_ssif fails to create the > > > ipmi device on some systems if the adapter class is not containing > > > I2C_CLASS_HWMON. Fix it by setting the class. > > > > > > Reported-by: Vadim Lomovtsev <Vadim.Lomovtsev@xxxxxxxxxxxxxxxxxx> > > > Signed-off-by: Jan Glauber <jglauber@xxxxxxxxxx> > > > > The intention of adapter classes is to *limit* probing to a certain > > class of devices. If a class is needed to *enable* probing, then > > something there looks wrong. From the details given, this must be solved > > elsewhere I'd say. > > Makes sense? > Hi Wolfram, I've looked at this again because apparently auto-detection of BMCs (ipmi_ssif driver) is not working anymore. Debugging it shows that ssif_probe is not called when ipmi_ssif is trying to automatically detect BMCs. Adding the i2c device manually works fine (ssif_probe called). Setting the class value in the ThunderX i2c driver to I2C_CLASS_HWMON makes the autodection of ipmi_ssif work. Looking for clues how to solve this (because you mentioned this might be the wrong solution) I've stumbled over this: Documentation/i2c/writing-clients: You simply have to define a detect callback which will attempt to identify supported devices (returning 0 for supported ones and -ENODEV for unsupported ones), a list of addresses to probe, and a device type (or class) so that only I2C buses which may have that type of device connected (and not otherwise enumerated) will be probed. For example, a driver for a hardware monitoring chip for which auto-detection is needed would set its class to I2C_CLASS_HWMON, and only I2C adapters with a class including I2C_CLASS_HWMON would be probed by this driver. Note that the absence of matching classes does not prevent the use of a device of that type on the given I2C adapter. All it prevents is auto-detection; explicit instantiation of devices is still possible. We do want auto-detection, so either this text is wrong or setting I2C_CLASS_HWMON in our i2c adapter is correct. Am I missing something? thanks, Jan -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html