From patchwork Wed Jan 25 09:28:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 9536593 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 B61D8601D3 for ; Wed, 25 Jan 2017 09:28:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0BED26E3A for ; Wed, 25 Jan 2017 09:28:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9351E26224; Wed, 25 Jan 2017 09:28:10 +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_SIGNED, 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 8456026224 for ; Wed, 25 Jan 2017 09:28:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751399AbdAYJ2J (ORCPT ); Wed, 25 Jan 2017 04:28:09 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:55767 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751372AbdAYJ2H (ORCPT ); Wed, 25 Jan 2017 04:28:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=Message-Id:Date:Subject:Cc:To:From; bh=cimc6UjUw7QkK8cV3T9FBq2E69y0cuZPwFsptOEPBO0=; b=ChmwpJ6wtvKEbiPFWj6G+p7WJ7 q8J5SXcztylCGc7Ysj6Iw+ZJLJgmtobraLdoEOiTKWELo4I0L0X7h4kKkRujJ2kPr359lym1qiIf7 RTv+gmU84RnxVmGj4balSt6V6JoAsYSRi1uSOQ2tw6I1wT4zq/6P+CWWKAbYnYXOVr4inVuhX9585 6/x8HVi13PC2cEz/OTFikAGufE1xNaHlS3cRKUivLPCg7WIq00GJvhyQfBrDIg5cvNMLDBAJu6pie bOz+xGEmZ0ubifFyn8y47qd/pDiyyqIdFhqI1/YQpsRvPzFKEQXgELfE0WW4qXklFPlhGDnIEv0vj 9bwGVZ1Q==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:60416 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.86_1) (envelope-from ) id 1cWJs6-002RLD-Li; Wed, 25 Jan 2017 09:28:06 +0000 From: Guenter Roeck To: Hardware Monitoring Cc: Jean Delvare , Guenter Roeck Subject: [PATCH v2] hwmon: Update documentation to clarify rules for the 'name' attribute Date: Wed, 25 Jan 2017 01:28:02 -0800 Message-Id: <1485336482-14381-1-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: 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 Clarify that the name attribute must report a valid name, and the rules for valid names. Also clarify that the name parameter must be provided for all supported API functions. Signed-off-by: Guenter Roeck Reviewed-by: Jean Delvare --- v2: '.' is an acceptable character in the 'name' attribute. Documentation/hwmon/hwmon-kernel-api.txt | 4 ++++ Documentation/hwmon/sysfs-interface | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/hwmon/hwmon-kernel-api.txt b/Documentation/hwmon/hwmon-kernel-api.txt index 2505ae67e2b6..53a806696c64 100644 --- a/Documentation/hwmon/hwmon-kernel-api.txt +++ b/Documentation/hwmon/hwmon-kernel-api.txt @@ -89,6 +89,10 @@ the call to devm_hwmon_device_register_with_groups or hwmon_device_register_with_info and if the automatic (device managed) removal would be too late. +All supported hwmon device registration functions only accept valid device +names. Device names including invalid characters (whitespace, '*', or '-') +will be rejected. The 'name' parameter is mandatory. + Using devm_hwmon_device_register_with_info() -------------------------------------------- diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface index 2cc95ad46604..fc337c317c67 100644 --- a/Documentation/hwmon/sysfs-interface +++ b/Documentation/hwmon/sysfs-interface @@ -86,8 +86,9 @@ given driver if the chip has the feature. name The chip name. This should be a short, lowercase string, not containing - spaces nor dashes, representing the chip name. This is - the only mandatory attribute. + whitespace, dashes, or the wildcard character '*'. + This attribute represents the chip name. It is the only + mandatory attribute. I2C devices get this attribute created automatically. RO