Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4430082pxk; Wed, 30 Sep 2020 02:45:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMlpIVZg/Wr5UONDgeez3d1KSesT51+oVmBL7mKEJY40eKoQ3jVYQwXu7qQrEGBzdc/kW3 X-Received: by 2002:a17:906:488d:: with SMTP id v13mr1887688ejq.524.1601459135918; Wed, 30 Sep 2020 02:45:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601459135; cv=none; d=google.com; s=arc-20160816; b=E6hX3SyNkSK7C6kISez0q3gZdsGYk59fmVeTlnVAjDEFRKSACL5c/bTNL3wVYYtH3M p0OKgXlg6YFqMYc8UwsIkTHAWO4sZTREBA+5D3WF6wA2/qTveIDKDEcLXgVynq6bNEKw aHO9oTrS8MTdwhXIoQ1i9tt8nWBRvU8MJbmRVMU88xOpZ/yBuxVk27ANWh/iDcnZehMd aPvV7BPXzyjKitkmbKBu/AkSFKRHgOtUi+oLSD2mg/vG8n+Eyjll77ThQsXpb+OCrPeK wA3GUsEixN+fkQa7sWSGjXl/L63oH3x4qM/p288Y8GQ2i23TnwV7kOD1XliK9Ze5TRap BMiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=bFvQmrUTcA5fX9Th4qtVasaoc4bTUZztirYgXylmCCI=; b=eHQI8rVjt7D9Y5K4uWg2fiviRduVvlYe/5MID6LQ+MvagD/kh/7TsJVMEDn0FM+bOm JVy8ZavSyGxbDpaW3+jE1V2eX5jSpyYJkGguXxjYA7vVujH8k1v4fRh8YeHKmsDhCAYP soN2DUru9VzcR/WTQmTm/nllsxlevgTigUBJof1vZT0qB0uahp7UQXoK4ST3myylQyWD Ge/5C9eqTo5tCz7UIrEP6RZp9UD0j0r2KhMFOHVLqQUOvU60xHPHJwnxeNBrUcQr/yxq Zs826zh5AcH2MqJ1t/wgAoyiquQtndxHH2e+ZOCPTg3ljz+3+O/GmWnLoXQQ3FqWAEKX ly4g== 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 f15si790834ejb.354.2020.09.30.02.45.12; Wed, 30 Sep 2020 02:45:35 -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 S1728655AbgI3Jlu (ORCPT + 99 others); Wed, 30 Sep 2020 05:41:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbgI3Jlu (ORCPT ); Wed, 30 Sep 2020 05:41:50 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBA37C061755 for ; Wed, 30 Sep 2020 02:41:49 -0700 (PDT) Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNYcN-0003XC-IS; Wed, 30 Sep 2020 11:41:47 +0200 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1kNYcM-0004kH-LT; Wed, 30 Sep 2020 11:41:46 +0200 Date: Wed, 30 Sep 2020 11:41:46 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Lars Poeschel Cc: Thierry Reding , Lee Jones , "open list:PWM SUBSYSTEM" , open list , Greg Kroah-Hartman Subject: Re: [PATCH] pwm: sysfs: Set class on pwm devices Message-ID: <20200930094146.73s3qzvf5ekjeavc@pengutronix.de> References: <20200929121953.2817843-1-poeschel@lemonage.de> <20200930065726.fjcsm4pfh65medgl@pengutronix.de> <20200930092056.maz5biy2ugr6yc3p@lem-wkst-02.lemonage> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="o3hdainfrilot7qp" Content-Disposition: inline In-Reply-To: <20200930092056.maz5biy2ugr6yc3p@lem-wkst-02.lemonage> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --o3hdainfrilot7qp Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I added Greg Kroah-Hartman who I discussed this with via irc a bit to Cc:. On Wed, Sep 30, 2020 at 11:20:56AM +0200, Lars Poeschel wrote: > thank you for your review! >=20 > On Wed, Sep 30, 2020 at 08:57:26AM +0200, Uwe Kleine-K=F6nig wrote: > > On Tue, Sep 29, 2020 at 02:19:53PM +0200, poeschel@lemonage.de wrote: > > > From: Lars Poeschel > > >=20 > > > This adds a class to exported pwm devices. > > > Exporting a pwm through sysfs did not yield udev events. The > >=20 > > I wonder what is your use-case here. This for sure also has a place to > > be mentioned in the commit log. I suspect there is a better way to > > accomplish you way. >=20 > Use-case is to be able to use a pwm from a non-root userspace process. > I use udev rules to adjust permissions. Hmm, how do you trigger the export? Without being aware of all the details in the sysfs code I would expect that the exported stuff is available instantly once the write used to export the PWM is completed. So changing the permissions can be done directly after triggering the export in the same process. Out of interest: What do you use the pwm for? Isn't there a suitable kernel driver that can do the required stuff? Compared to the kernel-API the sysfs interface isn't atomic. Is this an annoyance? Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --o3hdainfrilot7qp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAl90UtcACgkQwfwUeK3K 7AmRZQf+KaTzPbBhN7fMCCPaf6pgb67liKkvJ0P6RHTGVGFfZZvJqBjvHCbWA50v Dx/M83bka52mKmvhEJ36g65VnKltsFb80hLpoTMKsSWsrn6aRneuZ6nLJlXNYMVH OCYqRXBT3HT2/FMEZaYGVwlHkQGremP+Ye3pmcMXAhg0A5c7U3Kvb+1EpmsPjK5T lNiYbQFvvfbddSiI5EoyuJprZlDXxzDqIKlQpAagIGuQJKEDWcCI/IEe0Mow1PK0 c4kPY/GPsnd5wB789Rt8QLjnRfrjoPOhiZLiC/zz1Y8BxcwaLpUly+JvGYg2UPaY l4mp3H0p0Xwn0TPvExFit/ay4xnm8w== =rEDs -----END PGP SIGNATURE----- --o3hdainfrilot7qp--