mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yasushi SHOJI <yashi@atmark-techno.com>
To: johnpol@2ka.mipt.ru
Cc: linux-kernel@vger.kernel.org
Subject: RFC: w1: Thermometer Resolution Configuration
Date: Mon, 08 Nov 2010 20:34:57 +0900	[thread overview]
Message-ID: <877hgodp5q.wl@dns1.atmark-techno.com> (raw)

Hello,

# I miss-spelled lkml address so here is a second try.
# sorry about the noise.

I've been playing with an 1 wire device, DS18B20, and I'd like to
implement a new feature, which configures the thermometer resolution
on the device.

I assume that there is a few ways to do it: kernel param, module
param, sysfs, etc. but, I believe a kernel param for just an w1 slave
is overkill, and since w1 slave is already using sysfs, I'd like to go
with sysfs for the thermometer resolution.  I just want to ask you
that it'd be ok to go to that direction.

If you are OK with sysfs, I'd also like to ask that it'd be better to
use the current entry point, w1_slave, or create another point, say,
"configure" or "resolution" for this purpose.  using the current entry
point is simple but we loose an ability to check the current
resolution.

I'm thinking about writing resolution bit (which is 9 to 12 on
DS18B20) to that entry point, so it'd be like:

     echo 9 > "/sys/devices/w1_bus_master1/28-00000221bf22/resolution
     echo 12 > "/sys/devices/w1_bus_master1/28-00000221bf22/resolution

it seems that both DS18B20 and DS1822 has this configuration ability,
but not DS1820.  so we need some way to check the device before we
export that entry point.  adding an if in w1_therm_add_slave() should
do it, i assume.


Anyway, if you have time, would you please tell me if you're ok with
above or tell me if you need a proposing patch for comments for the
above.

Thank you for your time,
-- 
          yashi


                 reply	other threads:[~2010-11-08 11:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=877hgodp5q.wl@dns1.atmark-techno.com \
    --to=yashi@atmark-techno.com \
    --cc=johnpol@2ka.mipt.ru \
    --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

Powered by JetHome