From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754733Ab0KHLmg (ORCPT ); Mon, 8 Nov 2010 06:42:36 -0500 Received: from dns1.atmark-techno.com ([210.191.215.170]:49047 "EHLO dns1.atmark-techno.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754492Ab0KHLmf (ORCPT ); Mon, 8 Nov 2010 06:42:35 -0500 X-Greylist: delayed 457 seconds by postgrey-1.27 at vger.kernel.org; Mon, 08 Nov 2010 06:42:35 EST Date: Mon, 08 Nov 2010 20:34:57 +0900 Message-ID: <877hgodp5q.wl@dns1.atmark-techno.com> From: Yasushi SHOJI To: johnpol@2ka.mipt.ru Cc: linux-kernel@vger.kernel.org Subject: RFC: w1: Thermometer Resolution Configuration User-Agent: Wanderlust/2.14.0 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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