From: paul k. <pau...@xs...> - 2005-04-05 09:13:14
|
>Yes, there *is* something broken here. It has something to do with the >i2c.h file. It includes lots of other files, which should be used only >when compiling the kernel. > > > So if I understand correctly, you have (for some reason) this __KERNEL__ define set. That is strange. That should only be set when compiling the actual kernel, ie compile for kernel space use. We want to use it in user space. So __KERNEL__ should not be defined. Can you verify your default compiler settings? or the environment variables (probably using a windows term here)? >A ugly workaround would be to extract the needed symbols from i2c.h and >hardcode them into drv_generic_i2c. But, as I said, ugly ugly ugly.... > >Is there any other sowftware out there which uses the i2c subsystem? I >once had a look into lm_sensors, but they do not really use the i2c >interface, but the various files in /proc or /sys only. > >bye, Michael > > That is too ugly for me too. Would it be possible to undefine __KERNEL__ prior to building L4L? If I am not mistaken, the only reason we need this i2c stuff, is for the i2c_smbus* definitions. I am not sure how lm_sensors handle these issues. Actually I think I know. /proc and /sys require kernel space drivers to perform the i2c actions. However I would expect that 'i2cdetect' would do it directly. And I do know that lm_sensors does require the 2.6 kernel headers installed for the i2c support. On kernel 2.4 lm_sensors had their own set of i2c includes. Paul |