On Tue, May 19, 2020 at 11:41:45AM +0000, Geva, Erez wrote:
> From a quick look.
> It seems that it is 'pwmchip%d' for a long time.
> 
> https://elixir.bootlin.com/linux/v4.0/source/drivers/pwm/sysfs.c#L314

Looks like my v4.19.25-rt16 kernel has a bad commit with a regression.

The documentation, Documentation/ABI/testing/sysfs-class-pwm, is
clear, and it has been that way since kernel 3.11.

Mainline has this:

commit c289d6625237aa785b484b4e94c23b3b91ea7e60
Author: Fabrice Gasnier <fabrice.gasn...@st.com>
Date:   Mon Oct 1 15:23:56 2018 +0200

    Revert "pwm: Set class for exported channels in sysfs"
    
    This reverts commit 7e5d1fd75c3dde9fc10c4472b9368089d1b81d00 ("pwm: Set
    class for exported channels in sysfs") as it causes regression with
    multiple pwm chip[1], when exporting a pwm channel (echo X > export):
    
    - ABI (Documentation/ABI/testing/sysfs-class-pwm) states pwmX should be
      created in /sys/class/pwm/pwmchipN/pwmX
    - Reverted patch causes new entry to be also created directly in
      /sys/class/pwm/pwmX
    - 1st time, exporting pwmX will create an entry in /sys/class/pwm/pwmX
    - class attributes are added under pwmX folder, such as export, unexport
      npwm, symlinks. This is wrong as it belongs to pwmchipN. It may cause
      bad behavior and report wrong values.
    - when another export happens on another pwmchip, it can't be created
      (e.g. -EEXIST). This is causing the issue with multiple pwmchip.


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to