From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH v3] hwmon: Add driver for EXYNOS4 TMU
Date: Mon, 29 Aug 2011 14:11:02 +0000 [thread overview]
Message-ID: <20110829141102.GA22151@ericsson.com> (raw)
In-Reply-To: <1314613983-3331-1-git-send-email-dg77.kim@samsung.com>
On Mon, Aug 29, 2011 at 08:22:07AM -0400, R, Durgadoss wrote:
> Hi,
>
> Some minor comments.
> Removing the clean code, to reduce traffic.
>
> > +Sysfs Interface
> > +---------------
> > +name name of the temperature sensor
> > + RO
> > +
> > +temp1_input temperature
> > + RO
> > +
> > +temp1_max temperature for level_1 interrupt
> > + RO
> > +
> > +temp1_crit temperature for level_2 interrupt
> > + RO
> > +
> > +temp1_emergency temperature for level_3 interrupt
> > + RO
> > +
> > +temp1_max_alarm alarm for level_1 interrupt
> > + RO
> > +
> > +temp1_crit_alarm
> > + alarm for level_2 interrupt
> > + RO
> > +
> > +temp1_emergency_alarm
> > + alarm for level_3 interrupt
> > + RO
>
> All these are standard ABI for Thermal related Hwmon drivers.
> So, Do we really need to have them explained here again ?
>
> Guenter/Jean, I would like to see your inputs here.
>
For my part, I think listing the attributes is useful to show the user
which attributes are supported without having to look into the code.
In this case, listing the attributes is even more useful because it shows
that the limits are RO.
> > +static int exynos4_tmu_initialize(struct platform_device *pdev)
> > +{
> > + struct exynos4_tmu_data *data = platform_get_drvdata(pdev);
> > + struct exynos4_tmu_platform_data *pdata = data->pdata;
> > + unsigned int status, trim_info;
>
> Can the status be a 'u8' since we are populating it with readb(...) ?
> I am blindly assuming readb returns a byte. Please correct me if I am wrong.
>
One general comment regarding variable types. On many platforms, u8 is more
expensive than int or unsigned int because the compiler needs to mask pretty much
every operation. That is probably not an issue for Intel CPUs, but for most others.
For that reason, I usually leave it to the implementors to decide what variable
types to use.
That is a bit different for stored data, but even there it does not provide value
to embed an u8 in integers because the compiler will end up aligning the structure
anyway.
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-08-29 14:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-29 10:33 [lm-sensors] [PATCH v3] hwmon: Add driver for EXYNOS4 TMU Donggeun Kim
2011-08-29 12:34 ` R, Durgadoss
2011-08-29 14:11 ` Guenter Roeck [this message]
2011-08-29 15:17 ` Guenter Roeck
2011-08-30 10:46 ` Donggeun Kim
2011-08-30 10:59 ` Donggeun Kim
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=20110829141102.GA22151@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.