All of lore.kernel.org
 help / color / mirror / Atom feed
From: khali@linux-fr.org (Jean Delvare)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] Helps: how to use i801--SMBus functions viai2c-dev
Date: Mon, 07 Nov 2005 15:51:58 +0000	[thread overview]
Message-ID: <LMX4SZyo.1131374357.6876490.khali@localhost> (raw)
In-Reply-To: <20051101104855.41881.qmail@web31214.mail.mud.yahoo.com>


Hi Michael,

On 2005-11-07, Mingkun Gu wrote:
> With i2c-dev module, is it possible to have more than one device with
> the same major number and different minor numbers? Let say, if I want to
> have
>
> /dev/i2c/0 89 0
> /dev/i2c/1 89 1
> /dev/i2c/2 89 2
> ......

Yes, it is possible.

> How can I do it? I tried to insmod the i2c-dev module twice and got
> error message say "-1 File exists."

The function of i2c-dev is to give userspace an access to existing i2c
busses. It doesn't create anything per se. If the only I2C/SMBus you
have on your system is the i2c-i801, you'll only have /dev/i2c/0.

Note that it is OK to open the same device file twice, if you need to do
that. Both sessions will be independant. You need to do that if there
are several chips on the bus and you want to drive them all from
userspace.

> One more thing is whether this module provides the ability to handle
> interrupts?

The question isn't relevant for i2c-dev, as it doesn't actually drive
the hardware. It only acts as a bridge.

As for i2c-i801, no, it is poll-based, not interrupt-based. Mark Hoffman
had attempted to convert the driver to interrupt-based, but never
completed the work.

--
Jean Delvare

  parent reply	other threads:[~2005-11-07 15:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-01 11:49 [lm-sensors] Helps: how to use i801--SMBus functions via i2c-dev MK GU
2005-11-01 16:59 ` [lm-sensors] Helps: how to use i801--SMBus functions via Jean Delvare
2005-11-02 15:29 ` [lm-sensors] " Gu, Mingkun
2005-11-04 20:48 ` Rudolf Marek
2005-11-07 13:38 ` [lm-sensors] Helps: how to use i801--SMBus functions viai2c-dev Gu, Mingkun
2005-11-07 15:51 ` Jean Delvare [this message]
2005-11-07 16:12 ` Gu, Mingkun
2005-11-07 16:31 ` Jean Delvare
2005-11-07 16:52 ` Gu, Mingkun
2005-11-07 17:03 ` Jean Delvare
2005-11-07 18:14 ` Gu, Mingkun
2005-11-07 19:33 ` Jean Delvare
2005-11-07 19:57 ` Gu, Mingkun

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=LMX4SZyo.1131374357.6876490.khali@localhost \
    --to=khali@linux-fr.org \
    --cc=lm-sensors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.