Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1268560pxk; Fri, 2 Oct 2020 05:35:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsAEu2D/iwEO6HArlQKqMLrs+SgZksNI0oNs0wJd2Zrg4npmXcL9sCKKoIlrBU1+370dEU X-Received: by 2002:a17:906:d787:: with SMTP id pj7mr1987625ejb.340.1601642147308; Fri, 02 Oct 2020 05:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601642147; cv=none; d=google.com; s=arc-20160816; b=v/Bc1tBBvsVwNuvT73mwl+rXrMPoU/J0NP/MSvGcsRwg8w7tfAoU0NeRouR6DoZWLJ S34K2qn5S1nehLkTQEmcaEGiUR+4UGyJFDorRJIelMBzHgDJS4UdGp5fSZf3K1CZAWR9 MrAR8AevYm7s0A3DxLp7HkdQmo8fiM6DULlgU8h96eYNW0i/spCkvdZuU9oAnFi8/Tta BXq2aWCmbie7ZessmHZHaUYdMixUz37X1+xNGmQtRE94T6Z0oDn8Oc5jkQCbop3r2GU+ FLsBw/X4VIC6r9wuTTF20+jK1uZX37TBXvCkM97/yaWf71DRaPUTzufJIhetweEzF+fV R5yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=qUH8XcH2++PwLfgwRTKjLkt7hzHzd4FS+h/HeeGZhKQ=; b=0V5UuqdKn1BGL3ot7fFWmw2q1KQA90ObbC7jmH0OHGzVs6U4mnnzqmtCRDOuNupma2 V1/y/BQhbruMDsOOzDeka3yPV8TeW0hxVD1bb3WwteKUbrYQNrOlBbjPIEZZNjAzF9t9 nv4U1CB/JZsCMnIwNI2lEyb3MREwdxNtIDJ6hFXDZBvg2zxH64QwLNUSoKjEVkG3L40R JZxmOfSuVmQ/NF6knnB6xz8dVbinkgQtx4LiPnhTg8HFWrJUJEyduVV6TS69Pr7uH3/j uCQcdGyzJSN/wAu/4w6QmlSQlrb+d/L4cOJXWjrTC3UyFs8exiDxSJ1MmqwOhWEKnkFZ 6AkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p18si1014408ejd.537.2020.10.02.05.35.24; Fri, 02 Oct 2020 05:35:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387531AbgJBMdA (ORCPT + 99 others); Fri, 2 Oct 2020 08:33:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725964AbgJBMdA (ORCPT ); Fri, 2 Oct 2020 08:33:00 -0400 Received: from smtp1.goneo.de (smtp1.goneo.de [IPv6:2001:1640:5::8:30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9738C0613D0; Fri, 2 Oct 2020 05:32:59 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.goneo.de (Postfix) with ESMTP id 747C723F20F; Fri, 2 Oct 2020 14:32:58 +0200 (CEST) X-Virus-Scanned: by goneo X-Spam-Flag: NO X-Spam-Score: -2.988 X-Spam-Level: X-Spam-Status: No, score=-2.988 tagged_above=-999 tests=[ALL_TRUSTED=-1, AWL=-0.088, BAYES_00=-1.9] autolearn=ham Received: from smtp1.goneo.de ([127.0.0.1]) by localhost (smtp1.goneo.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D26-kqQQJXtG; Fri, 2 Oct 2020 14:32:56 +0200 (CEST) Received: from lem-wkst-02.lemonage.de. (hq.lemonage.de [87.138.178.34]) by smtp1.goneo.de (Postfix) with ESMTPA id 6D0BE23F087; Fri, 2 Oct 2020 14:32:56 +0200 (CEST) From: poeschel@lemonage.de To: Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Lee Jones , Jonathan Corbet , "GitAuthor: Lars Poeschel" , linux-kernel@vger.kernel.org (open list), linux-pwm@vger.kernel.org (open list:PWM SUBSYSTEM), linux-doc@vger.kernel.org (open list:DOCUMENTATION) Cc: Greg Kroah-Hartman Subject: [PATCH 2/2] Documentation: Reflect the changes to pwm sysfs Date: Fri, 2 Oct 2020 14:32:44 +0200 Message-Id: <20201002123247.3073352-1-poeschel@lemonage.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201002123048.3073128-1-poeschel@lemonage.de> References: <20201002123048.3073128-1-poeschel@lemonage.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lars Poeschel This is an update to the documentation to reflect the change to pwm sysfs. /sys/class/pwm/pwmchipN/pwmX style exports are marked as deprecated. They are still available as symlinks to the new interface. New exports are available as /sys/class/pwm/pwm-N-X Cc: Greg Kroah-Hartman Signed-off-by: Lars Poeschel --- Documentation/ABI/obsolete/sysfs-class-pwm | 52 +++++++++++++++++++ Documentation/ABI/testing/sysfs-class-pwm | 60 ++++++++++++---------- Documentation/driver-api/pwm.rst | 7 +-- 3 files changed, 90 insertions(+), 29 deletions(-) create mode 100644 Documentation/ABI/obsolete/sysfs-class-pwm diff --git a/Documentation/ABI/obsolete/sysfs-class-pwm b/Documentation/ABI/obsolete/sysfs-class-pwm new file mode 100644 index 000000000000..92ba4f3586e9 --- /dev/null +++ b/Documentation/ABI/obsolete/sysfs-class-pwm @@ -0,0 +1,52 @@ +What: /sys/class/pwm/pwmchipN/pwmX +Date: May 2013 +KernelVersion: 3.11 +Contact: H Hartley Sweeten +Description: + A /sys/class/pwm/pwmchipN/pwmX directory is created for + each exported PWM channel where X is the exported PWM + channel number. + +What: /sys/class/pwm/pwmchipN/pwmX/period +Date: May 2013 +KernelVersion: 3.11 +Contact: H Hartley Sweeten +Description: + Sets the PWM signal period in nanoseconds. + +What: /sys/class/pwm/pwmchipN/pwmX/duty_cycle +Date: May 2013 +KernelVersion: 3.11 +Contact: H Hartley Sweeten +Description: + Sets the PWM signal duty cycle in nanoseconds. + +What: /sys/class/pwm/pwmchipN/pwmX/polarity +Date: May 2013 +KernelVersion: 3.11 +Contact: H Hartley Sweeten +Description: + Sets the output polarity of the PWM signal to "normal" or + "inversed". + +What: /sys/class/pwm/pwmchipN/pwmX/enable +Date: May 2013 +KernelVersion: 3.11 +Contact: H Hartley Sweeten +Description: + Enable/disable the PWM signal. + 0 is disabled + 1 is enabled + +What: /sys/class/pwm/pwmchipN/pwmX/capture +Date: June 2016 +KernelVersion: 4.8 +Contact: Lee Jones +Description: + Capture information about a PWM signal. The output format is a + pair unsigned integers (period and duty cycle), separated by a + single space. + + This ABI is deprecated and will be removed after 2025. It is replaced by + another sysfs ABI documented in Documentation/ABI/testing/sysfs-class-pwm + diff --git a/Documentation/ABI/testing/sysfs-class-pwm b/Documentation/ABI/testing/sysfs-class-pwm index c20e61354561..87582dea1027 100644 --- a/Documentation/ABI/testing/sysfs-class-pwm +++ b/Documentation/ABI/testing/sysfs-class-pwm @@ -38,50 +38,58 @@ Contact: H Hartley Sweeten Description: Unexports a PWM channel. -What: /sys/class/pwm/pwmchipN/pwmX -Date: May 2013 -KernelVersion: 3.11 -Contact: H Hartley Sweeten +What: /sys/class/pwm/pwm-N-X + /sys/class/pwm/pwmchipN/pwm-N-X +Date: October 2020 +KernelVersion: 5.9 +Contact: Lars Poeschel Description: - A /sys/class/pwm/pwmchipN/pwmX directory is created for + A /sys/class/pwm/pwm-N-X directory is created for each exported PWM channel where X is the exported PWM - channel number. + channel number and N is the number of the pwmchip + that this pwm belongs to. + /sys/class/pwm/pwmchipN/pwm-N-X is the same -What: /sys/class/pwm/pwmchipN/pwmX/period -Date: May 2013 -KernelVersion: 3.11 -Contact: H Hartley Sweeten +What: /sys/class/pwm/pwm-N-X/period + /sys/class/pwm/pwmchipN/pwm-N-X/period +Date: October 2020 +KernelVersion: 5.9 +Contact: Lars Poeschel Description: Sets the PWM signal period in nanoseconds. -What: /sys/class/pwm/pwmchipN/pwmX/duty_cycle -Date: May 2013 -KernelVersion: 3.11 -Contact: H Hartley Sweeten +What: /sys/class/pwm/pwm-N-X/duty_cycle + /sys/class/pwm/pwmchipN/pwm-N-X/duty_cycle +Date: October 2020 +KernelVersion: 5.9 +Contact: Lars Poeschel Description: Sets the PWM signal duty cycle in nanoseconds. -What: /sys/class/pwm/pwmchipN/pwmX/polarity -Date: May 2013 -KernelVersion: 3.11 -Contact: H Hartley Sweeten +What: /sys/class/pwm/pwm-N-X/polarity + /sys/class/pwm/pwmchipN/pwm-N-X/polarity +Date: October 2020 +KernelVersion: 5.9 +Contact: Lars Poeschel Description: Sets the output polarity of the PWM signal to "normal" or "inversed". -What: /sys/class/pwm/pwmchipN/pwmX/enable -Date: May 2013 -KernelVersion: 3.11 -Contact: H Hartley Sweeten +What: /sys/class/pwm/pwm-N-X/enable + /sys/class/pwm/pwmchipN/pwm-N-X/enable +Date: October 2020 +KernelVersion: 5.9 +Contact: Lars Poeschel Description: Enable/disable the PWM signal. 0 is disabled 1 is enabled -What: /sys/class/pwm/pwmchipN/pwmX/capture -Date: June 2016 -KernelVersion: 4.8 -Contact: Lee Jones +What: /sys/class/pwm/pwm-N-X/capture + /sys/class/pwm/pwmchipN/pwm-N-X/capture +Date: October 2020 +KernelVersion: 5.9 +Contact: Lars Poeschel Description: Capture information about a PWM signal. The output format is a pair unsigned integers (period and duty cycle), separated by a diff --git a/Documentation/driver-api/pwm.rst b/Documentation/driver-api/pwm.rst index ab62f1bb0366..9361cd9b136c 100644 --- a/Documentation/driver-api/pwm.rst +++ b/Documentation/driver-api/pwm.rst @@ -89,9 +89,10 @@ will find: The PWM channels are numbered using a per-chip index from 0 to npwm-1. -When a PWM channel is exported a pwmX directory will be created in the -pwmchipN directory it is associated with, where X is the number of the -channel that was exported. The following properties will then be available: +When a PWM channel is exported a pwm-N-X directory will be created in the +/sys/class/pwm/ directory. N is number of the PWM chip this pwm is associated +with and X is the number of the channel that was exported. The following +properties will then be available: period The total period of the PWM signal (read/write). -- 2.28.0