From: Hans de Goede <hdegoede@redhat.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] hwmon: New driver for SMSC SCH5627 hwmon
Date: Sat, 12 Mar 2011 07:48:28 +0000 [thread overview]
Message-ID: <4D7B254C.2050402@redhat.com> (raw)
In-Reply-To: <1299871683-3945-1-git-send-email-hdegoede@redhat.com>
Hi,
On 03/11/2011 09:33 PM, Guenter Roeck wrote:
> Hi Hans,
>
> On Fri, 2011-03-11 at 14:28 -0500, Hans de Goede wrote:
>> SMSC SCH5627 Super I/O chips include complete hardware monitoring
>> capabilities. They can monitor up to 5 voltages, 4 fans and 8 temperature
>> sensors.
>>
>> The hardware monitoring part of the SMSC SCH5627 is accessed by talking
>> through an embedded microcontroller. An application note describing the
>> protocol for communicating with the microcontroller is available upon
>> request. Please mail me if you want a copy.
>>
>> Changes since version 1:
>> * Properly format multi line comments
>> * Avoid a potential divide by 8
>> * Use pr_err / pr_warn / pr_err instead of printk
>>
>> Signed-off-by: Hans de Goede<hdegoede@redhat.com>
>
> checkpatch.pl gives me the following warning:
>
> WARNING: msleep< 20ms can sleep for up to 20ms; see
> Documentation/timers/timers-howto.txt
> + msleep(1);
> total: 0 errors, 1 warnings, 894 lines checked
>
> The documentation suggests to use usleep_range() instead. Would that
> make sense, or do you want to keep the msleep() ?
I want to keep msleep, this code path should normally never trigger,
if it does the embedded micro controller for some reason is not
responding. I've not actually seen this happen in the wild with the
sch5627, but SMSC say it may take op to 15 ms for an answer to arrive,
and we don't want to busy poll that long.
I've seen something similar with the abituguru (which also uses an
embedded micro controller), and there with certain firmware versions
the microcontroller would sometimes just stop answering for
a while (100-s of ms) and then come back and continue exactly where
it left of.
So the idea here is to yield our timeslice and try again later, no
need for exact timing, as we don't know when exactly the micro controller
will answer.
Thanks & Regards,
Hans
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2011-03-12 7:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-11 19:28 [lm-sensors] [PATCH] hwmon: New driver for SMSC SCH5627 hwmon (v2) Hans de Goede
2011-03-11 20:33 ` [lm-sensors] [PATCH] hwmon: New driver for SMSC SCH5627 hwmon Guenter Roeck
2011-03-12 7:48 ` Hans de Goede [this message]
2011-03-12 11:09 ` Jean Delvare
2011-03-12 12:24 ` Jean Delvare
2011-03-13 12:39 ` Hans de Goede
2011-03-13 12:43 ` [lm-sensors] [PATCH] hwmon: New driver for SMSC SCH5627 hwmon (v3) Hans de Goede
2011-03-13 14:00 ` [lm-sensors] [PATCH] hwmon: New driver for SMSC SCH5627 hwmon Jean Delvare
2011-03-13 15:12 ` Hans de Goede
2011-03-13 15:27 ` Jean Delvare
2011-03-14 8:35 ` [lm-sensors] [PATCH] hwmon: New driver for SMSC SCH5627 hwmon (v4) Hans de Goede
2011-03-14 8:37 ` [lm-sensors] [PATCH] hwmon: New driver for SMSC SCH5627 hwmon Hans de Goede
2011-03-14 8:55 ` Jean Delvare
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=4D7B254C.2050402@redhat.com \
--to=hdegoede@redhat.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.