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: "lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [lm-sensors] Query: Omap temperature sensor driver design
Date: Fri, 1 Apr 2011 08:41:14 -0700	[thread overview]
Message-ID: <20110401154114.GB30343@ericsson.com> (raw)
In-Reply-To: <AANLkTimsX-=1Qe8F3=gJM75_TYP9SujTFTH6uvXncWRC@mail.gmail.com>

On Fri, Apr 01, 2011 at 08:39:43AM -0400, J, KEERTHY wrote:
> Hello All,
> 
> I am trying to implement a driver for the OMAP temperature sensor.
> It is an on chip sensor.
> 
> The sensor is responsible for reporting the temperature. The sensor
> has configurable thresholds. The user can configure the thresholds.
> An interrupt will be generated as soon as there the temperature
> thresholds are crossed.
> 
> Two possible approaches for the driver:
> 
> 1) The entire driver resides in drivers/hwmon directory. The driver
> containing all the sysfs nodes to be exposed to the user.
> The interrupt handlers are also part of this driver. The device
> registration happens in a OMAP arch specific file residing
> in arch/arm/mach-omap2 directory.
> 
> 2) The intialization and the interrupt handling done in a
> separate driver file residing in in arch/arm/mach-omap2 or
> drivers/misc directory.
> The device registration happens in a OMAP arch specific file residing
> in arch/arm/mach-omap2 directory.
> Only the sysfs nodes will be exposed through a hwmon
> driver residing in drivers/hwmon.
> 
That really depends if it does anything else besides hw monitoring.
A hw monitoring driver can support interrupts, and trigger a poll event 
on an alarm file if it gets one. But it should only perform hw monitoring 
functionality. If that interrupt triggers other activity, a thermal subsystem
driver may be more appropriate.

Thanks,
Guenter

> Please suggest the best alternative among the two or if any new
> design for the requirements is better.
> 
> -- 
> Regards and Thanks,
> Keerthy
> 
> _______________________________________________
> lm-sensors mailing list
> lm-sensors@lm-sensors.org
> http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: "J, KEERTHY" <j-keerthy@ti.com>
Cc: "lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [lm-sensors] Query: Omap temperature sensor driver design
Date: Fri, 01 Apr 2011 15:41:14 +0000	[thread overview]
Message-ID: <20110401154114.GB30343@ericsson.com> (raw)
In-Reply-To: <AANLkTimsX-=1Qe8F3=gJM75_TYP9SujTFTH6uvXncWRC@mail.gmail.com>

On Fri, Apr 01, 2011 at 08:39:43AM -0400, J, KEERTHY wrote:
> Hello All,
> 
> I am trying to implement a driver for the OMAP temperature sensor.
> It is an on chip sensor.
> 
> The sensor is responsible for reporting the temperature. The sensor
> has configurable thresholds. The user can configure the thresholds.
> An interrupt will be generated as soon as there the temperature
> thresholds are crossed.
> 
> Two possible approaches for the driver:
> 
> 1) The entire driver resides in drivers/hwmon directory. The driver
> containing all the sysfs nodes to be exposed to the user.
> The interrupt handlers are also part of this driver. The device
> registration happens in a OMAP arch specific file residing
> in arch/arm/mach-omap2 directory.
> 
> 2) The intialization and the interrupt handling done in a
> separate driver file residing in in arch/arm/mach-omap2 or
> drivers/misc directory.
> The device registration happens in a OMAP arch specific file residing
> in arch/arm/mach-omap2 directory.
> Only the sysfs nodes will be exposed through a hwmon
> driver residing in drivers/hwmon.
> 
That really depends if it does anything else besides hw monitoring.
A hw monitoring driver can support interrupts, and trigger a poll event 
on an alarm file if it gets one. But it should only perform hw monitoring 
functionality. If that interrupt triggers other activity, a thermal subsystem
driver may be more appropriate.

Thanks,
Guenter

> Please suggest the best alternative among the two or if any new
> design for the requirements is better.
> 
> -- 
> Regards and Thanks,
> Keerthy
> 
> _______________________________________________
> lm-sensors mailing list
> lm-sensors@lm-sensors.org
> http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


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

  reply	other threads:[~2011-04-01 15:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-01 12:39 Query: Omap temperature sensor driver design J, KEERTHY
2011-04-01 12:51 ` [lm-sensors] " J, KEERTHY
2011-04-01 15:41 ` Guenter Roeck [this message]
2011-04-01 15:41   ` 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=20110401154114.GB30343@ericsson.com \
    --to=guenter.roeck@ericsson.com \
    --cc=j-keerthy@ti.com \
    --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.