All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: "J, KEERTHY" <j-keerthy@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	Jean Delvare <khali@linux-fr.org>,
	"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>
Subject: Re: [RFC PATCH 6/6 V2] hwmon: OMAP4: On die temperature sensor driver
Date: Thu, 18 Aug 2011 23:17:45 -0700	[thread overview]
Message-ID: <20110819061745.GA28832@ericsson.com> (raw)
In-Reply-To: <CAJ6a13b6EQNhkQ+i5vf0kxKJ3RadY7iSCSJwZ5_sd3Y0BydUow@mail.gmail.com>

On Fri, Aug 19, 2011 at 02:04:58AM -0400, J, KEERTHY wrote:
> On Fri, Aug 19, 2011 at 7:43 AM, Guenter Roeck
> <guenter.roeck@ericsson.com> wrote:
> > On Thu, Aug 18, 2011 at 06:52:15AM -0400, Keerthy wrote:
> >> On chip temperature sensor driver. The driver monitors the temperature of
> >> the MPU subsystem of the OMAP4. It sends notifications to the user space if
> >> the temperature crosses user defined thresholds via kobject_uevent interface.
> >> The user is allowed to configure the temperature thresholds vis sysfs nodes
> >> exposed using hwmon interface.
> >>
> >> Signed-off-by: Keerthy <j-keerthy@ti.com>
> >> Cc: Jean Delvare <khali@linux-fr.org>
> >> Cc: Guenter Roeck <guenter.roeck@ericsson.com>
> >> Cc: lm-sensors@lm-sensors.org
> >
> > High level review:
> >
> > - too much and too broad mutex locking. show functions should not need locks at all,
> >  set functions only while data is written into registers and into platform data.
> 
> Ok. I will clean this.
> 
> > - driver is quite noisy. There should definitely not be any log messages
> >  if a set parameter is wrong. Show functions already return an error value
> >  to the user; a log message indicating the error again just creates noise.
> >  For one boolean set during probe (is_efuse_valid), each subsequent show results
> >  in a log message if it is false. Some errors result in multiple log messages.
> 
> A user tries to set an invalid temperature threshold. The user should
> be notified about this. The invalid temperature will not be set. The user
> should not be allowed to set an invalid temperature. It is to inform
> the user about precisely the problem with the parameter.
> 
User is notified with -EINVAL. Unless on the console, which is unlikely,
the user will likely not notice a message in the kernel log.

> In some of the samples the bandgap is not trimmed and hence
> temperature reported will be wrong. So every time a user tries to read
> he is alerted that the temperatures are not accurate.
> 
In the kernel log ? Sorry, that doesn't make sense. You alert the system administrator, 
not the user.

Guenter

WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: "J, KEERTHY" <j-keerthy@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	Jean Delvare <khali@linux-fr.org>,
	"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>
Subject: Re: [lm-sensors] [RFC PATCH 6/6 V2] hwmon: OMAP4: On die
Date: Fri, 19 Aug 2011 06:17:45 +0000	[thread overview]
Message-ID: <20110819061745.GA28832@ericsson.com> (raw)
In-Reply-To: <CAJ6a13b6EQNhkQ+i5vf0kxKJ3RadY7iSCSJwZ5_sd3Y0BydUow@mail.gmail.com>

On Fri, Aug 19, 2011 at 02:04:58AM -0400, J, KEERTHY wrote:
> On Fri, Aug 19, 2011 at 7:43 AM, Guenter Roeck
> <guenter.roeck@ericsson.com> wrote:
> > On Thu, Aug 18, 2011 at 06:52:15AM -0400, Keerthy wrote:
> >> On chip temperature sensor driver. The driver monitors the temperature of
> >> the MPU subsystem of the OMAP4. It sends notifications to the user space if
> >> the temperature crosses user defined thresholds via kobject_uevent interface.
> >> The user is allowed to configure the temperature thresholds vis sysfs nodes
> >> exposed using hwmon interface.
> >>
> >> Signed-off-by: Keerthy <j-keerthy@ti.com>
> >> Cc: Jean Delvare <khali@linux-fr.org>
> >> Cc: Guenter Roeck <guenter.roeck@ericsson.com>
> >> Cc: lm-sensors@lm-sensors.org
> >
> > High level review:
> >
> > - too much and too broad mutex locking. show functions should not need locks at all,
> >  set functions only while data is written into registers and into platform data.
> 
> Ok. I will clean this.
> 
> > - driver is quite noisy. There should definitely not be any log messages
> >  if a set parameter is wrong. Show functions already return an error value
> >  to the user; a log message indicating the error again just creates noise.
> >  For one boolean set during probe (is_efuse_valid), each subsequent show results
> >  in a log message if it is false. Some errors result in multiple log messages.
> 
> A user tries to set an invalid temperature threshold. The user should
> be notified about this. The invalid temperature will not be set. The user
> should not be allowed to set an invalid temperature. It is to inform
> the user about precisely the problem with the parameter.
> 
User is notified with -EINVAL. Unless on the console, which is unlikely,
the user will likely not notice a message in the kernel log.

> In some of the samples the bandgap is not trimmed and hence
> temperature reported will be wrong. So every time a user tries to read
> he is alerted that the temperatures are not accurate.
> 
In the kernel log ? Sorry, that doesn't make sense. You alert the system administrator, 
not the user.

Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  reply	other threads:[~2011-08-19  6:18 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-18 10:52 [RFC PATCH 0/6 V2] OMAP4: Temperature sensor driver Keerthy
2011-08-18 10:52 ` [RFC PATCH 1/6 V2] OMAP4: Clock: Associate clocks for OMAP temperature sensor Keerthy
2011-08-29 21:47   ` Kevin Hilman
2011-08-18 10:52 ` [RFC PATCH 2/6 V2] OMAP4: Adding the temperature sensor register set bit fields Keerthy
2011-08-29 21:52   ` Kevin Hilman
2011-08-18 10:52 ` [RFC PATCH 3/6 V2] OMAP4460: Temperature sensor data Keerthy
2011-08-18 11:32   ` Felipe Balbi
2011-08-18 10:52 ` [RFC PATCH 4/6 V2] OMAP4: Hwmod: OMAP temperature sensor Keerthy
2011-08-18 10:52 ` [RFC PATCH 5/6 V2] OMAP4: Temperature sensor device support Keerthy
2011-08-19  5:47   ` Todd Poynor
2011-08-18 10:52 ` [RFC PATCH 6/6 V2] hwmon: OMAP4: On die temperature sensor driver Keerthy
2011-08-18 11:37   ` Felipe Balbi
2011-08-18 11:37     ` [lm-sensors] [RFC PATCH 6/6 V2] hwmon: OMAP4: On die Felipe Balbi
2011-08-22  4:29     ` [RFC PATCH 6/6 V2] hwmon: OMAP4: On die temperature sensor driver J, KEERTHY
2011-08-22  4:41       ` [lm-sensors] [RFC PATCH 6/6 V2] hwmon: OMAP4: On die J, KEERTHY
2011-08-22  9:24       ` [RFC PATCH 6/6 V2] hwmon: OMAP4: On die temperature sensor driver Felipe Balbi
2011-08-22  9:24         ` [lm-sensors] [RFC PATCH 6/6 V2] hwmon: OMAP4: On die Felipe Balbi
2011-08-19  2:13   ` [RFC PATCH 6/6 V2] hwmon: OMAP4: On die temperature sensor driver Guenter Roeck
2011-08-19  2:13     ` [lm-sensors] [RFC PATCH 6/6 V2] hwmon: OMAP4: On die Guenter Roeck
2011-08-19  6:04     ` [RFC PATCH 6/6 V2] hwmon: OMAP4: On die temperature sensor driver J, KEERTHY
2011-08-19  6:16       ` [lm-sensors] [RFC PATCH 6/6 V2] hwmon: OMAP4: On die J, KEERTHY
2011-08-19  6:17       ` Guenter Roeck [this message]
2011-08-19  6:17         ` Guenter Roeck
2011-08-19 13:01         ` [RFC PATCH 6/6 V2] hwmon: OMAP4: On die temperature sensor driver J, KEERTHY
2011-08-19 13:13           ` [lm-sensors] [RFC PATCH 6/6 V2] hwmon: OMAP4: On die J, KEERTHY
2011-08-19 13:48           ` [RFC PATCH 6/6 V2] hwmon: OMAP4: On die temperature sensor driver Guenter Roeck
2011-08-19 13:48             ` [lm-sensors] [RFC PATCH 6/6 V2] hwmon: OMAP4: On die Guenter Roeck
2011-08-19  9:04       ` [RFC PATCH 6/6 V2] hwmon: OMAP4: On die temperature sensor driver J, KEERTHY
2011-08-19  9:16         ` [lm-sensors] [RFC PATCH 6/6 V2] hwmon: OMAP4: On die J, KEERTHY
2011-08-19 12:53       ` [RFC PATCH 6/6 V2] hwmon: OMAP4: On die temperature sensor driver J, KEERTHY
2011-08-19 12:55         ` [lm-sensors] [RFC PATCH 6/6 V2] hwmon: OMAP4: On die J, KEERTHY
2011-08-19  5:34   ` [RFC PATCH 6/6 V2] hwmon: OMAP4: On die temperature sensor driver Todd Poynor
2011-08-19  5:34     ` [lm-sensors] [RFC PATCH 6/6 V2] hwmon: OMAP4: On die Todd Poynor
2011-08-22  4:40     ` [RFC PATCH 6/6 V2] hwmon: OMAP4: On die temperature sensor driver J, KEERTHY
2011-08-22  4:52       ` [lm-sensors] [RFC PATCH 6/6 V2] hwmon: OMAP4: On die J, KEERTHY

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=20110819061745.GA28832@ericsson.com \
    --to=guenter.roeck@ericsson.com \
    --cc=j-keerthy@ti.com \
    --cc=khali@linux-fr.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.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.