Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3852942yba; Tue, 9 Apr 2019 06:15:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEoiJ6Nx8tTzn0YFasfwMuN2w3EL61M8EMmjnPU8tUw3t7cQ8nNUXmUFqGa+Vyi6YZ4yA8 X-Received: by 2002:a17:902:298b:: with SMTP id h11mr15747491plb.258.1554815715456; Tue, 09 Apr 2019 06:15:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554815715; cv=none; d=google.com; s=arc-20160816; b=UXFi2sjvU3io6txMkUJVBNWmnSFoIuQhqPNrm6t56mnTT8YSWaUYMFKi36DXlcKCYO j+cFaf9UoCsuDMS37kKQbJa+a8G7BNCk70+TCnBTfwGaxfb8OFsgH3WWr6hGBiaCkiWC ZudiH9quxpWbLx8XYoPkV9uj5+SKXnSOM/QtZNVlz0oUa7l5qsURtI3LG6u4W8kXEZWi MRU5cTsqsvbZTpzyClqvQh1zNIari+mGSn0CG2mOfaNQixrKmthKFkipG+G61QnX9eH6 UPaJG8MvvOLJKvBgxgWBVT21A7gcZ6YV25RkLBWvszgdlBLh//eo0WaGAwuWBa6ceP40 EE5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=XWViNH1Wxw9uYqCVZQz/ft4Cplusn+KMz/3xhiiHXMY=; b=oTIERjQG9LF0JzZ+xb7qCCEPbnDTUoG2vP9Tre4SwAcYK3bCUq2Yo5tQKpYPvvqFsu 66vOvtZgJuglfKRS74jpMqdeY2GqUAOSdo9fcHj8WUobKmO39z+WGSRYtHSxH0XZlCCv PsmcmOiTx0x5uwAD/BMICWZrOH0PhmOyODlUinZz7FDITC6J6rByBfERuLzf0ZtJO+1s v+e28dDRFx8ofdcPcmTvMJU4OhXCH8xhnvC+aTLcTAUQRXQ1LioN3+8vChLjnqcjYB4O NN8ueDNBfai1Ssr1qmxme0U2DJcRZrz7BA/XdodGvUCl8agI9+F1dISKaPNE9y5o2vf/ YhQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=gxnGbicq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70si13746plc.88.2019.04.09.06.14.59; Tue, 09 Apr 2019 06:15:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=gxnGbicq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727407AbfDINNI (ORCPT + 99 others); Tue, 9 Apr 2019 09:13:08 -0400 Received: from vern.gendns.com ([98.142.107.122]:45110 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726035AbfDINNI (ORCPT ); Tue, 9 Apr 2019 09:13:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=XWViNH1Wxw9uYqCVZQz/ft4Cplusn+KMz/3xhiiHXMY=; b=gxnGbicq2ll7/v2m+YTmEGhEQM Ter0pWlqbGSOz5XMmxVWe5lboZfAn7EIv7TWYDAqMjlXqXVCRRYr9kg9xgecdK9K4+mUQK4vtvvGV AtD5lwRL2I19cvAh/r+JYzTJL2qNwCuNqP59r8QJBwBZaZ2VsdvyODJEyVi5laIvuBFMGCIcUGeE8 SKYQSTHIMVaSCkElu/OH5Th9JpzuXe1WF3GSWAt/1/mVCiFZ43YV7ke6YOdsP56ohL6ZaKhQEUyym alehLdG37gR83zxezdc93ps0/NJAoWNIyb6YU86ZNgAfBN1uw7ZpAGf7i7kANrVaThSn2YJTiN3lw nFzLMdMA==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:50018 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1hDqYf-0002Gd-Bw; Tue, 09 Apr 2019 09:13:01 -0400 Subject: Re: [PATCH v10 02/18] counter: Documentation: Add Generic Counter sysfs documentation To: Pavel Machek , William Breathitt Gray Cc: gregkh@linuxfoundation.org, jic23@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, fabrice.gasnier@st.com, benjamin.gaignard@st.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, akpm@linux-foundation.org, robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, leoyang.li@nxp.com, daniel.lezcano@linaro.org, tglx@linutronix.de, thierry.reding@gmail.com, esben@haabendal.dk, linux-pwm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, patrick.havelange@essensium.com, Jonathan Cameron References: <20190408215531.GB27592@amd> From: David Lechner Message-ID: Date: Tue, 9 Apr 2019 08:12:57 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190408215531.GB27592@amd> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/8/19 4:55 PM, Pavel Machek wrote: > > pavel@amd:~$ cat /sys/power/state > freeze mem disk > > And we use [] to mark current selection: I know this is used elsewhere, but I don't think it is a good pattern to copy. Parsing it from user-space is annoying. Also it breaks the sysfs rule of "one item per file" since it tells us two things - the list of possible values _and_ the current active value. > > pavel@amd:~$ cat /sys/class/leds/tpacpi\:\:thinkvantage/trigger > [none] bluetooth-power rfkill-any rfkill-none kbd-scrolllock > kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock > kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock > kbd-ctrlrlock AC-online BAT0-charging-or-full BAT0-charging BAT0-full > BAT0-charging-blink-full-solid rfkill0 phy0rx phy0tx phy0assoc > phy0radio phy0tpt mmc0 timer heartbeat audio-mute audio-micmute > rfkill1 > > Note this only works if you have less than PAGE_SIZE of entries... and > will never have more. > > Pavel >