From patchwork Fri Dec 22 17:26:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aishwarya Pant X-Patchwork-Id: 10130963 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4DE5060318 for ; Fri, 22 Dec 2017 17:26:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EA1129D8B for ; Fri, 22 Dec 2017 17:26:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21F8D29DB9; Fri, 22 Dec 2017 17:26:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C34A29D8B for ; Fri, 22 Dec 2017 17:26:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756564AbdLVR0N (ORCPT ); Fri, 22 Dec 2017 12:26:13 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:42248 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756514AbdLVR0M (ORCPT ); Fri, 22 Dec 2017 12:26:12 -0500 Received: by mail-pl0-f66.google.com with SMTP id bd8so13247478plb.9; Fri, 22 Dec 2017 09:26:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=+B96lqeWho35h6FBaRWvb0d6ARiHPyW/6k/1zkmWIIg=; b=ooyRHmWI5+9EYV/RDhCkOkBQARFibZhNF2wJuIWq1tuTI+R8KBZUrjBjnD/w1yfa1d BC24SotiDm0OBpcrt8DCFFHs33qIUtclI7/iMl/bx1LUQgk0dgM77QZhPWOvKfqJ3VyD Ja9SW1dZHflHwxt8887REY+UxRmUfxfmHfI1qIMfoNKzhopVnDYskzF1QsjoAcO47eef inOesqwbic3P61HC9nF60m02SrRZNC0rfPLfC79sS9qOFybQITbBQi1wJXztR5mxEbfs nbXDQ+RG6xXiJN66E/ybwjIolgCcehrbC3VzU3LroOpvkRhze7umjbbw6JuuNSiD0qQe Oogg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=+B96lqeWho35h6FBaRWvb0d6ARiHPyW/6k/1zkmWIIg=; b=nfA/ORQRF9Zdynn4Kh5NaUxzHoaKrv1SWTHJyDwBPKWTpzRJmEHa+k0605prHw1Jg0 fqymrq0ai6a9dW3Ch8OTuJrctLwVs/S7SIsS8Cu8Ttrb5FyIAtK0jgDksy7gallCyHnk hTtfI2PjhVtGSqHk82zH8b9747r8ib/KhbEvBZiKHrJOn6HWDRLemqNsS7jJH+FW0HXi v6igxbRISo5JzctIpJ8zgbg1/JazszRAk1BwgzoSidFGRcKpqwvYweIVBMbbtxF9qu2Z tNRTWCn3crzi+gcht1aZpvhkgMxwCsgsgZu0l7S8QgNrE88Dr8wf50GMuF4naFybX7Px wciQ== X-Gm-Message-State: AKGB3mJhA2jSaEAkOZ3k5L/vv1qIGyqDgFux+mR9tfG2Rzg0staPBHlq cHPD/OhRNNoDxh+aJwDxSTLIlw== X-Google-Smtp-Source: ACJfBotZAi2nqAGMsuSzvd8PlUgrfB0p6Xhpa1o86VSw78kMCcJ3sAS2E3ufletnZ1dxroEr9d7Prw== X-Received: by 10.159.194.23 with SMTP id x23mr14849826pln.447.1513963571307; Fri, 22 Dec 2017 09:26:11 -0800 (PST) Received: from mordor.localdomain ([117.195.98.120]) by smtp.gmail.com with ESMTPSA id x9sm4891728pgc.69.2017.12.22.09.26.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Dec 2017 09:26:10 -0800 (PST) Date: Fri, 22 Dec 2017 22:56:04 +0530 From: Aishwarya Pant To: Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, David Frey , Pascal Sachs Cc: julia.lawall@lip6.fr Subject: [PATCH] hwmon: (sht3x) move sysfs documentation to Documentation/ABI Message-ID: <20171222172604.GA9918@mordor.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The sysfs documentation for sht3x devices should be with the rest of the interfaces in Documentation/ABI. The motivation behind this is that documentation should be where the user expects it to be, rather than where the developer expects it to be. ABI documentation requires a specific format and this is how the information in it was filled- What: sht3x is an i2c device so it would be connected to the i2c bus Date: from the commit date that introduced the attribute KernelVersion: from the first stable version git tag that contains the commit Contact: module author(s) Description: from Documentation/hwmon/sht3x Signed-off-by: Aishwarya Pant --- There are things that might be wrong here and I am unsure of- 1. Whether this file should be in stable or testing? 2. Contact information, full sysfs path etc I am doing this is in an exercise to move sysfs documentation to its right place and identify places where it might be missing. hwmon drivers seem to have a quite nice documentation, but just not in the ABI format. Documentation/ABI/stable/sysfs-bus-i2c-hwmon-sht3x | 128 +++++++++++++++++++++ Documentation/hwmon/sht3x | 25 ---- 2 files changed, 128 insertions(+), 25 deletions(-) create mode 100644 Documentation/ABI/stable/sysfs-bus-i2c-hwmon-sht3x diff --git a/Documentation/ABI/stable/sysfs-bus-i2c-hwmon-sht3x b/Documentation/ABI/stable/sysfs-bus-i2c-hwmon-sht3x new file mode 100644 index 000000000000..0e8355c625f5 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-bus-i2c-hwmon-sht3x @@ -0,0 +1,128 @@ +What: /sys/bus/i2c/devices/.../temp1_input +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description: (RO) Temperature input value + Unit: millidegree Celsius + +What: /sys/bus/i2c/devices/.../temp1_max +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description: (RW) Temperature max value. + Unit: millidegree Celsius + +What: /sys/bus/i2c/devices/.../temp1_max_hyst +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description: (RW) Temperature hysteresis value for max limit + Unit: millidegree Celsius + +What: /sys/bus/i2c/devices/.../temp1_min +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description: (RW) Temperature min value + Unit: millidegree Celsius + +What: /sys/bus/i2c/devices/.../temp1_min_hyst +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description: (RW) Temperature hysteresis value for min limit. + Unit: millidegree Celsius + +What: /sys/bus/i2c/devices/.../temp1_alarm +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description: (RO) Channel alarm + 0: no alarm + 1: alarm is set when the temperature is outside the configured + limits. + Only works in periodic measure mode + +What: /sys/bus/i2c/devices/.../humidity1_input +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description: (RO) humidity input + Unit: milli-percent + +What: /sys/bus/i2c/devices/.../humidity1_max +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description: (RW) humidity max value + Unit: milli-percent + +What: /sys/bus/i2c/devices/.../humidity1_max_hyst +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description: (RW) humidity hysteresis value for max limit + Unit: milli-percent + +What: /sys/bus/i2c/devices/.../humidity1_min +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description: (RW) humidity min value + Unit: milli-percent + +What: /sys/bus/i2c/devices/.../humidity1_min_hyst +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description: (RW) humidity hysteresis value for min limit + Unit: milli-percent + +What: /sys/bus/i2c/devices/.../humidity1_alarm +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description: (RO) humidity alarm + 0: no alarm + 1: alarm is set when the humidity is outside the configured + limits + Only works in periodic measure mode + +What: /sys/bus/i2c/devices/.../heater_enable +Date: July 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description: (RW) Enable on-chip heater to remove excess humidity from sensor + 0: turned off + 1: turned on + +What: /sys/bus/i2c/devices/.../update_interval +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description: (RW) value is 0 for single shot, otherwise it is interval in + msec for periodic measurement. + The allowed update_interval in milliseconds are as follows: + * 0 single shot mode + * 2000 0.5 Hz periodic measurement + * 1000 1 Hz periodic measurement + * 500 2 Hz periodic measurement + * 250 4 Hz periodic measurement + * 100 10 Hz periodic measurement + If the interval is not supported by the sensor, the next faster + interval is chosen. + Unit: milliseconds diff --git a/Documentation/hwmon/sht3x b/Documentation/hwmon/sht3x index b0d88184f48e..744dc9b00e8b 100644 --- a/Documentation/hwmon/sht3x +++ b/Documentation/hwmon/sht3x @@ -49,28 +49,3 @@ the alert pin on the sensor is set to high. When the temperature and humidity readings move back between the hysteresis values, the alert bit is set to 0 and the alert pin on the sensor is set to low. - -sysfs-Interface ---------------- - -temp1_input: temperature input -humidity1_input: humidity input -temp1_max: temperature max value -temp1_max_hyst: temperature hysteresis value for max limit -humidity1_max: humidity max value -humidity1_max_hyst: humidity hysteresis value for max limit -temp1_min: temperature min value -temp1_min_hyst: temperature hysteresis value for min limit -humidity1_min: humidity min value -humidity1_min_hyst: humidity hysteresis value for min limit -temp1_alarm: alarm flag is set to 1 if the temperature is outside the - configured limits. Alarm only works in periodic measure mode -humidity1_alarm: alarm flag is set to 1 if the humidity is outside the - configured limits. Alarm only works in periodic measure mode -heater_enable: heater enable, heating element removes excess humidity from - sensor - 0: turned off - 1: turned on -update_interval: update interval, 0 for single shot, interval in msec - for periodic measurement. If the interval is not supported - by the sensor, the next faster interval is chosen