From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] max1668 support revisited
Date: Tue, 31 May 2011 16:13:38 +0000 [thread overview]
Message-ID: <20110531161338.GA27119@ericsson.com> (raw)
In-Reply-To: <BANLkTi=0dC7=naE2wY6Wf5scaAtzT9bGwQ@mail.gmail.com>
On Tue, May 31, 2011 at 11:19:00AM -0400, David George wrote:
> Hi All.
>
> I have written a kernel driver for the Maxim part MAX1668, which I
> have attached to this email. I have tested this code on a MAX1805 and
> it seems to work.
>
> I'm not really sure how to go about publishing it and was hoping for
> some advice from this list.
>
> Kind regards,
> David
>
>
Hi David,
The easiest way to proceed would be for you to read and follow the guidelines
in Documentation/hwmon/submitting-patches; this would also save us a lot of time.
Browsing through the code, you have forward declarations, your formatting is a off,
you have undocumented ABI attributes (temp_fault_open, temp_fault_alarm), you have a
deprecated ABI attribute (alarms), you generate ABI attributes for non-existing sensors
on MAX1805, you don't check for error returns from i2c functions, and your detect
function (even though only if debug is enabled) is noisy. The detect function reads
status and config registers but does not use the results.
The usage of temp_max and temp_min is inconsistent. You set it to the temperature
in degrees C in the set functions, yet convert it to milli-degrees C when reading it.
For that I would recommend to keep all the stored values in degrees C and multiply
with 1000 when displaying temperatures.
If you follow the above mentioned guidelines and fix the problems I have mentioned,
we'll have something to work with for further review.
Thanks,
Guenter
_______________________________________________
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-05-31 16:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-31 15:19 [lm-sensors] max1668 support revisited David George
2011-05-31 16:13 ` Guenter Roeck [this message]
2011-06-01 14:02 ` David George
2011-06-01 14:07 ` Guenter Roeck
2011-06-01 17:53 ` Guenter Roeck
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=20110531161338.GA27119@ericsson.com \
--to=guenter.roeck@ericsson.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.