mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michal Vokáč" <michal.vokac@ysoft.com>
To: Fabrice Gasnier <fabrice.gasnier@st.com>,
	thierry.reding@gmail.com, gottfried.haider@gmail.com
Cc: stefan.wahren@i2se.com, hsweeten@visionengravers.com,
	loic.pallardy@st.com, broonie@kernel.org, gohai@sukzessiv.net,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-rpi-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org
Subject: Re: [PATCH v2 2/2] pwm: send a uevent on the pwmchip device upon channel sysfs (un)export
Date: Mon, 1 Oct 2018 18:29:25 +0200	[thread overview]
Message-ID: <b43c5dd5-6ffd-5e5a-f4d0-86792feac304@ysoft.com> (raw)
In-Reply-To: <1538400237-28766-3-git-send-email-fabrice.gasnier@st.com>

On 1.10.2018 15:23, Fabrice Gasnier wrote:
> This patch sends a uevent (KOBJ_CHANGE) on the pwmchipN device, everytime
> a pwmX channel has been exported/unexported via sysfs.
> This allows udev to implement rules on such events, like:
> 
> 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*\
> '"
> 
> This is a replacement patch for commit 7e5d1fd75c3d ("pwm: Set class for
> exported channels in sysfs"), see [1].
> 
> basic testing:
> $ udevadm monitor --environment &
> $ echo 0 > /sys/class/pwm/pwmchip0/export
> KERNEL[197.321736] change   /devices/.../pwm/pwmchip0 (pwm)
> ACTION=change
> DEVPATH=/devices/.../pwm/pwmchip0
> EXPORT=pwm0
> SEQNUM=2045
> SUBSYSTEM=pwm
> 
> [1] https://lkml.org/lkml/2018/9/25/713
> 
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
> Tested-by: Gottfried Haider <gottfried.haider@gmail.com>

Tested-by: Michal Vokáč <michal.vokac@ysoft.com>

  reply	other threads:[~2018-10-01 16:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01 13:23 [PATCH v2 0/2] pwm: sysfs: fix exporting PWM channel Fabrice Gasnier
2018-10-01 13:23 ` [PATCH v2 1/2] Revert "pwm: Set class for exported channels in sysfs" Fabrice Gasnier
2018-10-01 16:27   ` Michal Vokáč
2018-10-01 13:23 ` [PATCH v2 2/2] pwm: send a uevent on the pwmchip device upon channel sysfs (un)export Fabrice Gasnier
2018-10-01 16:29   ` Michal Vokáč [this message]
2018-10-01 16:24 ` [PATCH v2 0/2] pwm: sysfs: fix exporting PWM channel Michal Vokáč
2018-10-12 11:55 ` Thierry Reding
2018-10-12 12:15   ` Stefan Wahren
2018-10-12 12:36     ` Fabrice Gasnier
2018-10-12 12:44       ` Vokáč Michal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b43c5dd5-6ffd-5e5a-f4d0-86792feac304@ysoft.com \
    --to=michal.vokac@ysoft.com \
    --cc=broonie@kernel.org \
    --cc=fabrice.gasnier@st.com \
    --cc=gohai@sukzessiv.net \
    --cc=gottfried.haider@gmail.com \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=loic.pallardy@st.com \
    --cc=stefan.wahren@i2se.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®