Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp327295rdb; Thu, 2 Nov 2023 05:07:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEAUDWnf/I46Psk2IOlFTg+qAVbCIaU3w2vf+2Kgnx/3VgXJDDl9m1KAQEuxSqxXoIuIRaQ X-Received: by 2002:a05:6a21:6d9c:b0:162:4f45:b415 with SMTP id wl28-20020a056a216d9c00b001624f45b415mr24147328pzb.51.1698926866628; Thu, 02 Nov 2023 05:07:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698926866; cv=none; d=google.com; s=arc-20160816; b=VSGnCxXF4CV6omm6gVOoUkdegFKgmisATxytjd/xxSzRGx8ETogvu2vqARZJNqTLEV PLr048TVAPTCWJoBG7M50mW2OrTZLnshT77LWwmw8wE9FbDWZOGFRcErlhydrxrhgcVQ ZAXvpTgozWfWa/xOLYLdiYaYhYmrF/PCGaHYWGCLk+MrqgCr+KAxsPPqkIUlFh0Huzeu D1a8Jx5+3xbK0Vmt4zUbbCoJxZXVhQgsfU3+tczVU+tsInJ/OC4eE8/5a6GYabCmFguq SO2BAOrma3eMGusKzuq7sR+bScJM9aS4F3JfSKDjXcTcI0TuV0cPrtcin+8QD4r3ulxL SMfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RvVgx9g9NA7N3/n80mpWy1Rln6NY9q3dd5rFRvIdV3Q=; fh=wbKEeW64hJsqEx/ZBCF8IO+YhW050p37spGEuTuU6Tg=; b=EN2k/ODmoo54Q0CtDPXqx5FV3dafpLkH2Ul2gWI4izW5pdqVUPGuhtLsvuyKWTcsRI d2eYrW3GGodZmTBUnisnQouSuitXOsSfCLmgeQKZA0zB5YH7R+cMtRrO5HUYu1arkvK5 Wj9s0WnHuFQhp9Q3oZStx+mmp4l9ClGaALPFDZzwk4opRS7rOE5oxTqKmtHMQjmRtho7 7eDxy3Ir+XGv4l+a+gZG2KRcRbYuYO+k8Ggo2JLTFGoWfUQO4tiXHzUCk5xXP8ioTjAl 8YM0hZR/uUDj8IHoawHkeu5cNY3uJRSus/PYPDa3BbZFKvQUorXcXitu5MnrgUY5GEBD bp/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b=fXcgOg6T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=9elements.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id r22-20020a632b16000000b00564929df8besi1703336pgr.568.2023.11.02.05.07.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 05:07:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b=fXcgOg6T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=9elements.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id C55DC8028FD7; Thu, 2 Nov 2023 05:07:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235554AbjKBMH0 (ORCPT + 99 others); Thu, 2 Nov 2023 08:07:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235516AbjKBMHA (ORCPT ); Thu, 2 Nov 2023 08:07:00 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4ECA1BF5 for ; Thu, 2 Nov 2023 05:05:53 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-28003daaaa6so843222a91.0 for ; Thu, 02 Nov 2023 05:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; t=1698926753; x=1699531553; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RvVgx9g9NA7N3/n80mpWy1Rln6NY9q3dd5rFRvIdV3Q=; b=fXcgOg6ToD4gx045r1GL4Pc7yetQYcXmK/IA5ikQTBcTvJ3SnFKva2SSB9YRulvMWE jHtK+7iDJxrLTgdFbp6iTIHkso+9AyBw4h8lLfRVaQ38m1la2jOthvAzKiN0CAQ88/w9 DfCFuIT6oQilwdplJ7bhQwFGFtXbs7WzcokW7PqwySbxgLQoHn1pD7qtRfKKGAJDU6b8 LUIyD7+NRQJKHBtPtLoNtOnfILljrC+A/ETi/vdj122VA5dRih72yw+4dxROaQCHnUym TgmXio/D4sDbGldvio2QCixX42ghrMsEF+q1b//sXZyKhQaT2UGfuNybm4UnH7pmhVYj Vw5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698926753; x=1699531553; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RvVgx9g9NA7N3/n80mpWy1Rln6NY9q3dd5rFRvIdV3Q=; b=lGXQamsVV8tM8SvvPvP8wRWQDZ15qEJsueYCBwEcs27d56ntNQaqnRqtY9/helVmxf p6Z9kPfiRYqHhUUTswfEduFpERLUG0wFF/sC0/zOzLZc2zTPJ9lA5A/95gSBoc0Dzzfi CHLS7WDkJrzSztI4HG90AVO0oC/KL7Q6fvyB48efvRP3uiIqaUUkeeaR+3tNkdbKwGbR fqNn2uieoljh8tBz+15JIcPOdvwbtMd1BHxQ3Eyv0okBVQrY7DZPYARc2KkcbcuWvwf4 S/wExDtsLc0wQgZ/pj8LVVJvKi2WuEsEq7vSqdsA8O01l/xpfF2cEneC/0n0HDQhcqXq ktwg== X-Gm-Message-State: AOJu0YzfxjnrlKbcGCQkaQ76e4W05TXSrx3G6aY65TszUEEdhBbXx9Vn iny5WhaJmtAY5rR33iFGoGab3SJx9sNCr/dFigHNhsT7YVc1ivVi X-Received: by 2002:a17:90a:f48d:b0:280:46ac:be71 with SMTP id bx13-20020a17090af48d00b0028046acbe71mr11392356pjb.15.1698926752570; Thu, 02 Nov 2023 05:05:52 -0700 (PDT) MIME-Version: 1.0 References: <20231005133059.917577-1-naresh.solanki@9elements.com> In-Reply-To: From: Naresh Solanki Date: Thu, 2 Nov 2023 17:35:42 +0530 Message-ID: Subject: Re: [PATCH] drivers/regulator: Notify sysfs about status changes To: Mark Brown Cc: zev@bewilderbeest.net, Liam Girdwood , Patrick Rudolph , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 02 Nov 2023 05:07:42 -0700 (PDT) Hi Mark, On Thu, 5 Oct 2023 at 22:30, Mark Brown wrote: > > On Thu, Oct 05, 2023 at 03:30:58PM +0200, Naresh Solanki wrote: > > > static int _notifier_call_chain(struct regulator_dev *rdev, > > unsigned long event, void *data) > > { > > + const char *name; > > + int ret; > > + > > /* call rdev chain first */ > > - return blocking_notifier_call_chain(&rdev->notifier, event, data); > > + ret = blocking_notifier_call_chain(&rdev->notifier, event, data); > > + > > + if (event & REGULATOR_EVENT_VOLTAGE_CHANGE) { > > + name = dev_attr_microvolts.attr.name; > > + sysfs_notify(&rdev->dev.kobj, NULL, name); > > + } else { > > + name = dev_attr_status.attr.name; > > + sysfs_notify(&rdev->dev.kobj, NULL, name); > > + } > > We probably should filter the events more, there's events for pre and > post voltage change for example which aren't status changes so would be > spurious. It ought not to break anything but we should still avoid > unneeded work. Can you please provide me inputs on the additional filtering needed for this. Like some list of events for notify on status?