mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
Cc: Csaba Kertesz <csaba.kertesz@vincit.fi>,
	"open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)" 
	<linux-ide@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] Add CPU temperature sensor support for i.MX53
Date: Tue, 9 Aug 2016 23:10:21 -0400	[thread overview]
Message-ID: <20160810031021.GZ25053@mtj.duckdns.org> (raw)
In-Reply-To: <1470209756-32705-1-git-send-email-fabien.lahoudere@collabora.co.uk>

Hello, Fabien.

Is $SUBJ right?  CPU temperature?

On Wed, Aug 03, 2016 at 09:35:56AM +0200, Fabien Lahoudere wrote:
> From: Csaba Kertesz <csaba.kertesz@vincit.fi>
> 
> The original patch was made by Richard Zhu for kernel 2.6.x:
> 
> ENGR00134041-MX53-Add-the-SATA-AHCI-temperature-monitor.patch
> 
> The old source code was migrated to the new kernel 3.x. The concept of
> value reading was changed a bit:
> 
> 1. The new 3.x kernel functions (imx_phy_reg_read, imx_phy_reg_write) use
>    16 bit registers while the original implementation used 32 bit integers
>    for this purpose.

The description seems pretty dated.

> 2. The communication is guarded against infinite loop to give up a certain
>    register reading after 100000 attempts. This number comes from the
>    original implementation. A new variable (read_attempt) is introduced to
>    count the trials.

That's a very high number for a retry counter.

> +/* SATA AHCI temperature monitor */
> +static ssize_t sata_ahci_current_tmp(struct device *dev, struct device_attribute

Abbreviating temperature to tmp probably isn't the best idea.

Patch looks good to me except for the above nits; however, I wonder
whether it being a one-off sysfs attribute is the right approach.
Don't we have subsystems and interfaces for things like temperature
readings?

Thanks.

-- 
tejun

  reply	other threads:[~2016-08-10  3:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03  7:35 Fabien Lahoudere
2016-08-10  3:10 ` Tejun Heo [this message]
2016-08-12 13:18   ` [PATCH 1/1] Add imx53 SATA temperature sensor support Fabien Lahoudere

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=20160810031021.GZ25053@mtj.duckdns.org \
    --to=tj@kernel.org \
    --cc=csaba.kertesz@vincit.fi \
    --cc=fabien.lahoudere@collabora.co.uk \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®