Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 08-18-2011, 04:19 AM   #1
LQ Newbie
Registered: Jun 2011
Posts: 21

Rep: Reputation: Disabled
How to forward IOCTL's from i2c-dev.c to adapter driver (i2c-rt3352.c)

I'm writing the I2C adapter driver for SOC. This adapter exist now in system and RTC driver works with it via .master_xfer.

I would like to send IOCTL's from application via /dev/i2c. I have loaded i2c_dev and all modules. After sending IOCTL I get following :

#i2ccmd read 0
ioctl, cmd=0x03, arg=0x00

i2cdev_ioctl method doesn't send I2C_RDWR IOCT'L to my adapter driver. How can I forward those IOCTL's to i2c-rt3352.c ?
Old 08-19-2011, 02:58 PM   #2
Senior Member
Registered: Apr 2009
Posts: 1,384

Rep: Reputation: 123Reputation: 123
Check following link
Old 08-23-2011, 02:03 AM   #3
LQ Newbie
Registered: Jun 2011
Posts: 21

Original Poster
Rep: Reputation: Disabled
I've found the way to pass my own IOCTL's: .algo_control function pointer in i2c_algorithm struct will handle special ioctl's.

i2cdev_ioctl -> (default) -> i2c_control -> (default) -> (adap->algo->algo_control)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No /dev/i2c-0 entry after insmod i2c-dev sajnanazeer Linux - Newbie 1 08-10-2011 07:39 AM
how to enable ioctl( ) feature in i2c driver tanniru Linux - Kernel 7 07-14-2011 05:23 AM
i2c-dev.h Issues napier Linux - Embedded & Single-board computer 1 03-24-2011 12:20 PM
Help! Problems with i2c-dev. No more /dev/i2c-* em1l Fedora 0 10-28-2005 05:48 AM
I can't detect I2c-philips-par adapter? thaodt Linux - Software 0 06-07-2004 02:17 AM

All times are GMT -5. The time now is 07:18 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration