Jump to content

write to I2C bus in user space


rickyzhang
 Share

3 posts in this topic

Recommended Posts

I bought a iBook G4 for my PPC emulation project. It runs in tiger 10.4. Everything is fine except its overheating issues. After compiling several dependency library from macports, it burns my left palm.

 

I'm doing some research and found that it uses a chip on board to control fan speed and monitor temperature sensors. In addition, I also found this chip kernel extension in Apple Open Source website. 

 

But I wonder if it is possible to write its register through I2C in user space. Apple's kext doesn't expose fan speed control in IOService.

 

Any advice is appreciated.

Link to comment
Share on other sites

Thanks for your link. smc kext won't work on G4 iBook. I think it is fairly straightforward to write it by myself, instead of paying to others.

 

Please bear with me in my following code analysis part from Apple open source project:

 

1. I2C interface kext from AppleI2C kext:

 

https://github.com/r...nterface.h#L542

 

2. Analog chip on board that control fan speed and monitor temperature sensor from AppleADT746x kext:

 

https://github.com/r...eADT746x.h#L172

 

3. There is IOUserClient subclass that provide I2C interface for user space

 

https://github.com/r...rClient.cpp#L32

 

It is possible to read/write I2C bus from user space. I will get back to you about this.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...