Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp681335rdg; Wed, 11 Oct 2023 02:27:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG4A+459OrZPUhkhZGKsanOYiBEribPmKd9dWdyztqfnj08SdhIOsB7J9QnxNyp0f8YeAP+ X-Received: by 2002:a17:90a:17a7:b0:27d:9b5:f28d with SMTP id q36-20020a17090a17a700b0027d09b5f28dmr585757pja.8.1697016436169; Wed, 11 Oct 2023 02:27:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697016436; cv=none; d=google.com; s=arc-20160816; b=FQUeFjSK0rRkmxqUTQNsTQRjfZ1q/xD/9DAugJKaUCqQYzb1OA3rNI5wCx/H1Yv/Bc LuXuRg4kN9kP+foMxoW8rX9v0mZG9+9EjXbx9C9WTvvprHNJJViVE/5eQfNv1HTLJDpP uYdjMIVT1C3DlKfzzLZFpO4n0eLfCrJiPOIpVR/zCGKoiOHCx3V8Yu2VkQkwWBspt2RM Im667ykZYVfnIHgnFIuP/OIYUYG6UoTNaTRoUKFuUNhJFYKxea4NVL1YXdAioGIDVnC4 ZW8fKPsPUtNjzzeN0/NFmwmgiWsMVfd1QNWMX1QuteXa/OYgEbw6k3rcrri0e3E9zvs3 Lw3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=3BUBCHAP73g+38QvM7dHiUG8I9QRyAUU3cBnzO6ITqY=; fh=KJN1W9yOAWgSq9zfQBni89+CfhmDFnjhsEeQmYNtQrw=; b=T3rK0BrHgN2qKdlrEszPVF5emmjsyVYgLlOscIRV8lVCSXUNiYuRwOvg/0UhOOYDCw iSeXVyn252N5pU1Vez4AG5ICNVenkKOD2hQsbF3yTx0GnX3YLZqn9gxZn0i/gE/aVPRV iprNmRQ2jDM66oTEAAWtr0BEWoMHdBDw2Lb4SpMJx42DocrmTBvXIYdcyjqQl0LTkF5e iVEcc+fXYcsz4ibPz6tE9AL6wcaIiZzZBSIJHjVoigoe+5HwO+BLEb1h/MLSNtCUhY+6 9pXClt0r/dFxKrONB3aICnPifPW2AtaI4UOMJ6iA3Btkseuz9/Lw7GCVodRdzBCyVHX3 +3Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vecbr0Wi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id ge10-20020a17090b0e0a00b002465d98f18csi15691427pjb.170.2023.10.11.02.27.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 02:27:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vecbr0Wi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B129680F66AD; Wed, 11 Oct 2023 02:27:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345652AbjJKJ04 (ORCPT + 99 others); Wed, 11 Oct 2023 05:26:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231221AbjJKJ0t (ORCPT ); Wed, 11 Oct 2023 05:26:49 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D516794 for ; Wed, 11 Oct 2023 02:26:46 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-406609df1a6so63420165e9.3 for ; Wed, 11 Oct 2023 02:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697016405; x=1697621205; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=3BUBCHAP73g+38QvM7dHiUG8I9QRyAUU3cBnzO6ITqY=; b=vecbr0WiqQjT5m1He5rozYK78PzNPPeH9wweaN/0aueVRFLQt8jQ7tYgiePtw18XT2 UUFDDMTXdaOooReXkklZMF7NGpIn0mPJARYvX/bdwKXi+yD+1qdHpJ30kkE7DJpTfdKi qwMDXjy9yf03fbpiR7jNP89fqsqzt0nstEWhYoJPE48Y66RfqJ46Y0m4aT+rBD87Wp0n ECtO182xxMRDD/O8WSjzuL/aUdrQGCggToRQSccSNiGrgOwrDMX/C+Wy8RomyWptRNnM rg0ZRhhxIDkcXqcVxPQqKPLWWRsWDWYrtTcYoiVe2K1bY8a1a2ExU+TiGWKPuX9WVnR3 BGdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697016405; x=1697621205; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3BUBCHAP73g+38QvM7dHiUG8I9QRyAUU3cBnzO6ITqY=; b=PBmkHkH3GMk5Tl/aIYIMdoGbVpzWDe3itV4h48f9QW9mHwiu1bPZz5CWHZYlfXny+D kOxoahezuLwYWQgZ/yc2vxJId1MxyHWajiTNnVbuN8CTT6minhbzxIsolQilD4SY//Ll 814KKDRtOGUDeirJNVqwDYkk9zan8Da1o8erfSUDGFXte7omc86mCMIm5E/DkmVX4ir7 TwuG/BagOduvWkSPRQTzKDoAVcgdW2WPVKMpkZEyXfack9V3FfL5/eIrnSy4sLZpxY0M vkCsSb/7oKxbx9+oW/i7Q4jQKZ1cToUGI+5Dp9iTkiTxYhRSHzUhk/bbMBoXX0Nnn764 vrDw== X-Gm-Message-State: AOJu0Yy9HBK9L3gqVdJ0hC5j0On/oT2HrEIKQy5HrEmegAHWLn8V+Okb 0MeHKz68K0gt1uzAW7wA1b1fDA== X-Received: by 2002:a1c:4c01:0:b0:407:5185:1923 with SMTP id z1-20020a1c4c01000000b0040751851923mr5235189wmf.4.1697016405127; Wed, 11 Oct 2023 02:26:45 -0700 (PDT) Received: from [192.168.86.24] ([5.133.47.210]) by smtp.googlemail.com with ESMTPSA id bd5-20020a05600c1f0500b004030e8ff964sm18753144wmb.34.2023.10.11.02.26.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Oct 2023 02:26:43 -0700 (PDT) Message-ID: <490c6740-06cb-9ee6-ca8c-3ab404109344@linaro.org> Date: Wed, 11 Oct 2023 10:26:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v12 7/7] nvmem: core: Expose cells through sysfs Content-Language: en-US To: Miquel Raynal Cc: Greg Kroah-Hartman , Michael Walle , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Rob Herring , Frank Rowand , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Robert Marko , Thomas Petazzoni , Luka Perkov , Randy Dunlap , Chen-Yu Tsai , Daniel Golle References: <20231005155907.2701706-1-miquel.raynal@bootlin.com> <20231005155907.2701706-8-miquel.raynal@bootlin.com> <318fe799-f53e-64ed-b631-d099bb5202f4@linaro.org> <20231011091524.0c9ecc55@xps-13> <548849a8-9f11-5274-778e-f291267603bb@linaro.org> <20231011103306.08f1fbd4@xps-13> <20231011105829.778bed58@xps-13> From: Srinivas Kandagatla In-Reply-To: <20231011105829.778bed58@xps-13> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 11 Oct 2023 02:27:13 -0700 (PDT) On 11/10/2023 09:58, Miquel Raynal wrote: > Hi Srinivas, > > srinivas.kandagatla@linaro.org wrote on Wed, 11 Oct 2023 09:45:11 +0100: > >> On 11/10/2023 09:33, Miquel Raynal wrote: >>> Hi Srinivas, >>> >>> srinivas.kandagatla@linaro.org wrote on Wed, 11 Oct 2023 09:27:20 +0100: >>> >>>> On 11/10/2023 08:15, Miquel Raynal wrote: >>>>>>> + >>>>>>> + nvmem_cells_group.bin_attrs = cells_attrs; >>>>>>> + >>>>>>> + ret = devm_device_add_groups(&nvmem->dev, nvmem_cells_groups); >>>>>>> + if (ret) >>>>>>> + goto unlock_mutex; >>>>>> This is going to create groups after the nvmem device is added, isn't this going to be problem with user space notifications? >>>>> Greg said it was not. I hope I understood correctly ???? >>>>> >>>>> And anyway, cells have never been available to userspace, so there is >>>>> nothing userspace might expect yet? >>>> I agree, but once we add sysfs uapi then this is going to change. >>> >>> Can you elaborate? I'm not sure I follow you here. Is there still a >>> problem you fear or you think it's okay? >>> >> Now that we add cells to sysfs. >> AFAIU, By the time the userspace sees the udev event from this device we might not have cells populated. > > Yes, but why would this be a problem? > It will be problem if the userspace is using things like libudev to act on these events. There seems to be some caching of attributes in udev during event more info http://www.kroah.com/log/blog/2013/06/26/how-to-create-a-sysfs-file-correctly/ --srini > Thanks, > Miquèl