linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: CF <cfoissac-GANU6spQydw@public.gmane.org>
To: "linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Request for help: accessing i2c from kernel module
Date: Wed, 29 May 2013 14:56:09 +0200	[thread overview]
Message-ID: <51A5FAE9.2000902@free.fr> (raw)

Hello,

Excuse me if the question have been already answered or is obvious, but 
i don't know actually how to reach i2c busses from a kernel module (the 
kernel module is cross compiled).

The user space /dev/i2c-x are not accessibles - or i'm unable to reach 
them. I suspect i have an issue because if i understand well, /dev/i2c-x 
is logically only available in user space. The error returned is the 
following:
"error: implicit declaration of function 'ioctl'"
and i fear it could be the same for open(), because if i comment my 
ioctl calls, it does not issue an error but a warning related to 'open 
undefined'.

I can successfully write user space librairies, and compile the great 
i2ctools suite.
I have actually theses includes:
#include <linux/kernel.h>
#include <linux/module.h>

#include <linux/i2c-dev.h>
#include <fcntl.h>
#include <linux/fs.h>

Thank you very much if you can point me to some documentations where i 
could use i2c from a kernel module.

                 reply	other threads:[~2013-05-29 12:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51A5FAE9.2000902@free.fr \
    --to=cfoissac-ganu6spqydw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).