Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp926388rdb; Sun, 3 Sep 2023 18:03:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEkwN3xfXT9uzOKWp8m+oh3cgzpcUZfb+QHmtYxSrHbheTtkTS42ysnEemHlnAY3S9qfM9E X-Received: by 2002:a17:907:2c64:b0:9a1:b43b:73a0 with SMTP id ib4-20020a1709072c6400b009a1b43b73a0mr7122979ejc.20.1693789409920; Sun, 03 Sep 2023 18:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693789409; cv=none; d=google.com; s=arc-20160816; b=RzUAUR4cQZLUGjTt4o+jZF3AJzYm2+/ah78HV6oll6bDjz3peH3veAxVJZS3tFFbg9 K239VnwlkovaCLX8Zrgd458Vf+fPdtOYElnOei/Z9Rion2RdLba6CZY8Uw0eXFLe4kNx cZP0khZFnPineKm75cBuwoD99MpGuXiP0mMfwzMires+BQeKW4rJAAfh8fcL9D6/Zyu0 Yvj20cqRpvXyBc7dfuDPqAynIqFHTz1ISuody0q0ESN1P59LYOgUPLREOHilLO9tyd5I qf3yR9fxAYYUz1SaDAqX+muPtOd9moI+90SljkCTey1WkEkGLoTy0kBq0hJJ673WpsZc A4uQ== 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:dkim-signature; bh=BGtLzvtmBvqobaUQZwhUsOTTisSIpVAwapHCWXdt9f8=; fh=Vw8cXdkDzlIIhLC2LGmucdNvSf4HSX5mFHrN+CnZZeI=; b=wgqcn+KpbybwPuwqps+QBtsjiF9nb5qSkHXftdkXyyiXP+18Q4IsjrSCJCBrHA+We2 0KjXc1oUjUGrLzCY7y0cTW0E7ISmE3wBI7Unpj1GXBhP5gp4JIak9LEMbfKULFpEDkm0 U9glv89RGcvlwOIgPlsdV8J/Yk3u36Qnb8FOWszu5acU+BdxyZe+MZD9gs4wisqb08EL hkAXAtcO/mjxHHxTWDqsWd0Bg90qYYe9aMyycnj2JK9/jAssJv2Wc6508ZqCpykXP3V0 UWDfSNG9RUkUI41KFG0ahurX3mpks9sB/MeLNPgXFUx60bqpSt3i7u7UKv86SOmYCaJH pa7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LAKkzGyU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dv22-20020a170906b81600b0099bc8c2fbcfsi5566656ejb.718.2023.09.03.18.03.03; Sun, 03 Sep 2023 18:03:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LAKkzGyU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233527AbjICNlI (ORCPT + 99 others); Sun, 3 Sep 2023 09:41:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240821AbjICNkP (ORCPT ); Sun, 3 Sep 2023 09:40:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D386612A for ; Sun, 3 Sep 2023 06:39:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B4713611DE for ; Sun, 3 Sep 2023 13:39:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B309BC433BC; Sun, 3 Sep 2023 13:39:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1693748358; bh=vFZrypYTdTZY4tH9j+WcacU5AKW83DdoognQj/JAc8k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LAKkzGyUtMaOZIHuYgxAgatNJUDSCWffFWi5Pdyl4uxCi3ygxE11L2y7PxCTGVKfG F5jQiLsTh5gmsz9QVi8zgNHXZuJgp2Z3a5YBMTi16BfPq7dIavmqOQBxjfRsXXIK/j RhAjKXX/Sf3tleo7uP0NnbK6QPereEI9mcXVYkLg= Date: Sun, 3 Sep 2023 15:04:23 +0200 From: Greg Kroah-Hartman To: Zev Weiss Cc: Naresh Solanki , broonie@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] Documentation: ABI: sysfs-driver-regulator-output Message-ID: <2023090330-bling-mammary-3177@gregkh> References: <20230831121412.2359239-1-Naresh.Solanki@9elements.com> <20230831121412.2359239-3-Naresh.Solanki@9elements.com> <90b1af83-cb03-476f-9147-eb06247bf09c@hatter.bewilderbeest.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <90b1af83-cb03-476f-9147-eb06247bf09c@hatter.bewilderbeest.net> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 01, 2023 at 02:13:23AM -0700, Zev Weiss wrote: > Adding Greg re: sysfs ABI design... > > On Thu, Aug 31, 2023 at 05:14:10AM PDT, Naresh Solanki wrote: > > Adds sysfs-driver-regulator-output > > > > Signed-off-by: Naresh Solanki > > --- > > .../ABI/testing/sysfs-driver-regulator-output | 11 +++++++++++ > > 1 file changed, 11 insertions(+) > > create mode 100644 Documentation/ABI/testing/sysfs-driver-regulator-output > > > > diff --git a/Documentation/ABI/testing/sysfs-driver-regulator-output b/Documentation/ABI/testing/sysfs-driver-regulator-output > > new file mode 100644 > > index 000000000000..f9b0a8f810fa > > --- /dev/null > > +++ b/Documentation/ABI/testing/sysfs-driver-regulator-output > > @@ -0,0 +1,11 @@ > > +What: /sys/bus/platform/drivers/regulator-output/*/events > > +Date: August 2023 > > +Description: Provided regulator events. > > + > > + Read provides various events the regulator associated with the > > + driver has encountered. All REGULATOR_EVENT_* are > > + defined in include/uapi/linux/regulator.h > > + > > + e.g. > > + cat /sys/bus/platform/drivers/regulator-output/ssb_rssd32/events > > + 0x0 > > If we really are going to proceed with a "read with side-effects" > (clear-on-read) design, that should absolutely be loudly and clearly > documented, since it's very different from how sysfs files typically work > and hence a somewhat glaring principle-of-least-surprise violation. Also, > since from the code it looks like it's intended to be used via poll(2), that > should be described here as well. Poll? Ick, but that can happen. But yes, reading a sysfs should almost never cause a side affect at all. But what do you mean by "clear events?" sysfs is only "one value per file", so you are only returning a single event, right? It can't be a list of events, sorry, that's not ok, use a different api for that please (like a char device node.) thanks, greg k-h