linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J.I. Cameron" <jic23-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
To: alfred steele <alfred.jaquez-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Michael Lawnick <ml.lawnick-Mmb7MZpHnFY@public.gmane.org>,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	LM Sensors <lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>
Subject: Re: [lm-sensors] Use the Linux I2C subsystem for a two wire interface 	protocol
Date: 21 Jul 2009 12:57:10 +0100	[thread overview]
Message-ID: <Prayer.1.3.1.0907211257100.23451@hermes-2.csi.cam.ac.uk> (raw)
In-Reply-To: <528f13590907171421m26bc67ecg8d0334d20365406f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Jul 17 2009, alfred steele wrote:

>Hi Jonathan,
>
>> that look about right are going down them.
>I had some misconfiguration the way i had registered the interrupt handler.
>
>A very naive question at this point. Wouldnt it be possible to "not"
>use  a GPIO irq and bottom half and instead to simplify the driver to
>start with, use a synchronous read routine.? I know this may violate
>the kernel framework but...

It would indeed be possible but would come at the cost of having some 
pretty hideous hard coded delays. Seeing as the device tells you that it 
has new data available (and the delays in question are huge and probably 
not all that consistent - though I've never measured them on different 
chips) I'm personally of the view that the interrupt method is the nicest 
solution.


>This is what i get on the console now
>
> $ cat /sys/class/hwmon/hwmon0/device/hwmon\:hwmon0/device/humidi 
> ty1_input sht15 sht15: Command not acknowledged cat: read error: 
> Input/output error ~$ cat 
> /sys/class/hwmon/hwmon0/device/hwmon\:hwmon0/device/humidi ty1_input cat: 
> read error: Timer expired root@freescale ~$ cat 
> /sys/class/hwmon/hwmon0/device/hwmon\:hwmon0/device/humidi ty1_input 
> Unbalanced enable for IRQ 0 WARNING: at kernel/irq/manage.c:174 
> enable_irq() [<c002dce0>] (dump_stack+0x0/0x14) from [<c0074050>] 
> (enable_irq+0x74/0xdc) [<c0073fdc>] (enable_irq+0x0/0xdc) from 
> [<bf000408>]
Hmm. The unbalanced irq certainly looks like an actual bug even if this
condition should never occur if things are working correctly.

I'm not sure where that timer expired message is coming from and
unfortunately don't have easy access to source code here to track
it down.  

> (sht15_update_vals+0x190/0x 2c8 [sht15]) r6:00000010 
> r5:cfdbf420 r4:cfe331e0 [<bf000278>] (sht15_update_vals+0x0/0x2c8 
> [sht15]) from [<bf0007f4>] (sht15_show _humidity+0x1c/0x130 [sht15]) 
> [<bf0007d8>] (sht15_show_humidity+0x0/0x130 [sht15]) from [<c0175044>] 
> (dev_attr _show+0x24/0x30) [<c0175020>] (dev_attr_show+0x0/0x30) from 
> [<c00d99ac>] (sysfs_read_file+0xa8/0x 108) [<c00d9904>] 
> (sysfs_read_file+0x0/0x108) from [<c009ac40>] (vfs_read+0xb4/0x144) 
> [<c009ab8c>] (vfs_read+0x0/0x144) from [<c009b080>] (sys_read+0x44/0x70) 
> r7:00000000 r6:00000000 r5:fffffff7 r4:cfea93c0 [<c009b03c>] 
> (sys_read+0x0/0x70) from [<c0029ec0>] (ret_fast_syscall+0x0/0x2c) 
> r7:00000003 r6:4001da30 r5:beaa9ae0 r4:00002000 cat: read error: Timer 
> expired
That looks nasty. I'm out of the office at the moment, so can't realy look
into this in any depth. Should be back in action on Thursday.

      parent reply	other threads:[~2009-07-21 11:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-14 16:25 Use the Linux I2C subsystem for a two wire interface protocol alfred steele
     [not found] ` <528f13590907140925h7aa36452o60da32d3bf941241-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-14 16:57   ` Jonathan Cameron
     [not found]     ` <4A5CB908.4060404-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
2009-07-14 20:58       ` alfred steele
     [not found]         ` <528f13590907141358w17869b6fq450bf223e4f54687-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-15  5:41           ` [lm-sensors] " Michael Lawnick
     [not found]             ` <4A5D6C0A.7030903-Mmb7MZpHnFY@public.gmane.org>
2009-07-15 14:22               ` alfred steele
     [not found]                 ` <528f13590907150722q2a91139bve72d65cbd555b8e9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-15 14:43                   ` Jonathan Cameron
     [not found]                     ` <4A5DEB12.3020602-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
2009-07-15 15:46                       ` alfred steele
     [not found]                         ` <528f13590907150846o7f4e41daw4cd6e37ff3afef70-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-15 15:54                           ` Mark Brown
2009-07-15 17:32                       ` alfred steele
     [not found]                         ` <528f13590907151032y30ae62beo486d4e1056219983-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-15 18:31                           ` Jonathan Cameron
     [not found]                             ` <4A5E206F.8000001-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
2009-07-16 16:13                               ` alfred steele
     [not found]                                 ` <528f13590907160913n73dcb4fcuf09f4946d7578793-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-16 16:29                                   ` alfred steele
     [not found]                                     ` <528f13590907160929r1385c99el6c1ed16ca1b592d2-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-16 18:51                                       ` Jonathan Cameron
     [not found]                                         ` <4A5F76A8.8080001-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
2009-07-17 21:21                                           ` alfred steele
     [not found]                                             ` <528f13590907171421m26bc67ecg8d0334d20365406f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-20  6:25                                               ` alfred steele
2009-07-21 11:57                                               ` J.I. Cameron [this message]

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=Prayer.1.3.1.0907211257100.23451@hermes-2.csi.cam.ac.uk \
    --to=jic23-kwpb1pkirijaa/9udqfwiw@public.gmane.org \
    --cc=alfred.jaquez-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
    --cc=ml.lawnick-Mmb7MZpHnFY@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).