From: whereami@gmail.com (David Sharp)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] read()ing an i2c node results in errno=ENOSYS
Date: Sat, 17 Sep 2005 10:42:22 +0000 [thread overview]
Message-ID: <b4e191e70509170141620a6e13@mail.gmail.com> (raw)
In-Reply-To: <b4e191e7050915035768c521ef@mail.gmail.com>
On 9/16/05, Jean Delvare <khali@linux-fr.org> wrote:
> > although the dev-interface file seems to be outdated (the i2c_smbus_*
> > "macro's" it refers to are no longer in the kernel headers, and are
> > now only in the lm_sensors' i2c-dev.h),
>
> Care to send a patch fixing this doc file?
Sure! i'll try. Attached. It's against the 2.6.12 source i have on my
desktop box, but i don't think it has changed since.
>
> > my amateur reading of the
> > kernel source supports that this should work. However, a read call
> > results in errno=ENOSYS (Function not implemented), although on one
> > run, i actually got EPERM, and another time resulted in SEGV.
>
> ENOSYS is expected. You are trying to do raw I2C transfers while the bus
> driver (i2c-viapro) and underlying chip only offer SMBus transfers (that
> is, a subset of I2C.) It fails.
>
> I'm more concerned about EPERM and SEGV, which obviously shouldn't
> happen. Hard to say why this happens without the actual code though.
well, the SEGV i couldn't repeat, and disappeared during the time it
took to compile gdb to try to debug it. Actually, the EPERM may have
happened more than once, but i can't reproduce it any more. It may
have something to do with the module loading and unloading i was doing
in vain attempts to get it to work. I'll definitely let you know if i
get them again, and can get more info. I suspect they may have been
caused by bus glitches, however. Shady programming on the
microcontrollers, maybe. We are busy now implementing some proper
SMBus on the microcontrollers anyway.
Thank you very much for your help, both on and off the list!
>
> --
> Jean Delvare
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linux-2.6.12-doc-i2c-dev-interface.patch
Type: application/octet-stream
Size: 2795 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20050917/0cc81559/linux-2.6.12-doc-i2c-dev-interface.obj
next prev parent reply other threads:[~2005-09-17 10:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-15 12:58 [lm-sensors] read()ing an i2c node results in errno=ENOSYS David Sharp
2005-09-16 20:56 ` Jean Delvare
2005-09-17 10:42 ` David Sharp [this message]
2005-09-18 4:25 ` David Sharp
2005-09-18 9:22 ` Jean Delvare
2005-09-18 23:34 ` Mark M. Hoffman
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=b4e191e70509170141620a6e13@mail.gmail.com \
--to=whereami@gmail.com \
--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.