Find the answer to your Linux question:
Results 1 to 2 of 2
I am writing a device driver that needs access to a certain I2C controller. Is there any way of doing this generic, or should I simply write custom access routines ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2011
    Posts
    1

    accessing i2c from within a device driver


    I am writing a device driver that needs access to a certain I2C controller. Is there any way of doing this generic, or should I simply write custom access routines for the I2C driver on my MCU?

    (the system is an embedded PowerPC board with a few peripherals spread over several I2C buses/controllers)

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,695
    Have you looked at the i2c kernel code? There are certainly ways to access the controller in a more controlled fashion that reinventing the wheel, and ending up interfering with the normal operation of the i2c sub-system.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •