From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Gasnier Subject: Re: [RESEND PATCH] Revert "pwm: Set class for exported channels in sysfs" Date: Mon, 1 Oct 2018 15:28:37 +0200 Message-ID: References: <1537538567-5377-1-git-send-email-fabrice.gasnier@st.com> <20180924115301.GV21032@ulmo> <20180924142318.GG23547@ulmo> <4278fef9-ec60-239a-dd0a-29a89d742fa4@st.com> <20180925152022.GB27695@ulmo> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Gottfried Haider , Thierry Reding Cc: stefan.wahren@i2se.com, linux-pwm@vger.kernel.org, michal.vokac@ysoft.com, loic.pallardy@st.com, Linux Kernel Mailing List , H Hartley Sweeten , broonie@kernel.org, linux-rpi-kernel@lists.infradead.org, gohai@sukzessiv.net, linux-arm-kernel@lists.infradead.org List-Id: linux-pwm@vger.kernel.org On 09/29/2018 02:19 AM, Gottfried Haider wrote: > Hello Thierry & Fabrice, > >>> Still, it is possible to send uevent (KOBJ_CHANGE) on pwmchipN device, >>> to notify of a change, e.g. pwmX channel being exported/unexported. > > I tested this patch, and I am happy to report that it works with the > udev rule that Raspbian (Raspberry Pi's Debian derivative) has in > place: > > SUBSYSTEM=="pwm*", PROGRAM="/bin/sh -c '\ > chown -R root:gpio /sys/class/pwm && chmod -R 770 /sys/class/pwm;\ > chown -R root:gpio > /sys/devices/platform/soc/*.pwm/pwm/pwmchip* && chmod -R 770 > /sys/devices/platform/soc/*.pwm/pwm/pwmchip*\ > '" > > > So while I can't comment on the uevent semantics, it would solve what > the original patch attempted to enable (non-root use of pwm). > > Tested-by: Gottfried Haider Hi Gottfried, Thierry, Thanks for testing. I just sent a new series with: - revert patch - additional patch with proposed uevent notification (change) on pwmchip. Best Regards, Fabrice > > Best, > Gottfried >