linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: myungjoo.ham@samsung.com (MyungJoo Ham)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] Samsung SoC: ready to use NTC value inside kernel
Date: Fri, 1 Jul 2011 09:28:23 +0900	[thread overview]
Message-ID: <BANLkTikC2zUPamzactXLdLb8Szgs2o9V7w@mail.gmail.com> (raw)
In-Reply-To: <20110630090013.GP21898@n2100.arm.linux.org.uk>

On Thu, Jun 30, 2011 at 6:00 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Thu, Jun 30, 2011 at 05:26:26PM +0900, MyungJoo Ham wrote:
>> diff --git a/arch/arm/plat-samsung/dev-adc.c b/arch/arm/plat-samsung/dev-adc.c
>> index 622972c..526097a 100644
>> --- a/arch/arm/plat-samsung/dev-adc.c
>> +++ b/arch/arm/plat-samsung/dev-adc.c
>> @@ -22,6 +22,8 @@
>> ?#include <plat/devs.h>
>> ?#include <plat/cpu.h>
>>
>> +#include "../../../fs/sysfs/sysfs.h"
>
> That is a big hint that you're doing something wrong.
>
[]
>
> This is wrong on just about every level. ?It needs to be rewritten to
> avoid poking about in subsystem internal data structures, and you really
> should not be sprint-ing a value to only sscanf it later.
>
> Plus, container_of doesn't return a pointer-error code.
>
> You need to come up with a far better way of doing this altogether.
>

Um.. is there any clean and nice way to read values that are exported to sysfs?

Or if the values are only exported through sysfs (HWMON), is the only
clean way to read such values (w/o extending HWMON itself) to seperate
the HWMON device driver into two pieces: a platform driver that
provide values to somewhere sharable in kernel and a HWMON driver that
reads the values and exports them to sysfs?



Thanks.

- MyungJoo

-- 
MyungJoo Ham (???), Ph.D.
Mobile Software Platform Lab,
Digital Media and Communications (DMC) Business
Samsung Electronics
cell: 82-10-6714-2858

  reply	other threads:[~2011-07-01  0:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-30  8:26 [PATCH 0/3] ARM: EXYNOS4: NURI Support NTC MyungJoo Ham
2011-06-30  8:26 ` [PATCH 1/3] Samsung SoC: NTC Thermistor attached to S3C-ADC MyungJoo Ham
2011-06-30  8:26 ` [PATCH 2/3] Samsung SoC: ready to use NTC value inside kernel MyungJoo Ham
2011-06-30  9:00   ` Russell King - ARM Linux
2011-07-01  0:28     ` MyungJoo Ham [this message]
2011-07-01 15:15       ` Linus Walleij
2011-07-01 15:59         ` Mark Brown
2011-07-01 17:23           ` Arnd Bergmann
2011-07-01 20:10             ` Mark Brown
2011-06-30  8:26 ` [PATCH 3/3] Exynos4 NURI: support for NTC thermistor MyungJoo Ham

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=BANLkTikC2zUPamzactXLdLb8Szgs2o9V7w@mail.gmail.com \
    --to=myungjoo.ham@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).