Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5839032rwp; Mon, 17 Jul 2023 10:10:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlExjSLwBeKY6b2IlcnsGbIWmPGWqgMWr4jD+YzL5kjbCDoMbWE5RU2A9Q3esV6sFfyRTkwS X-Received: by 2002:a17:906:151:b0:992:3ac7:a2d8 with SMTP id 17-20020a170906015100b009923ac7a2d8mr11497030ejh.37.1689613821775; Mon, 17 Jul 2023 10:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689613821; cv=none; d=google.com; s=arc-20160816; b=YBEwWCozIV2tLYMsfKXJzJhCi3mjwpCTj3uH1utAu2uX+MGTE14h0IUsUjKzZdXw0M S2WEwzhnaH6QnnZgHZDR2kTgSopAKTGeQ/QQIaJt/bxeiOvdVGNVav92vgLM99OWbn2E SQH/KJhZJdNVJA5dm6u/bgdJgtFEIfWx3zLHIsUEeCiNGZs3dL4SQo1lsY8lyAWUeBdI VdPGmzVQA+7HupV6XYsyqX4H5GOYt3QAaLzZRNdwjaEkPg9I/flzpOpmAc7/TRW3wGNq rZTwQD/e2PaxsU/Aa/GXyZbdRg2iAuv6eBBwfErXTth9FxfvLHVhDN3UvAEQjW1Iowy7 QJVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=2ntiN7SsvoF79NXtnrae3KdAeOHGP8txeV8hSDxhhoQ=; fh=LLL+Xqx0dpPF5VWFnmIpcKzvgPNGvA8udhZ4ZU8nPp4=; b=KZ5XP2ibZF0LJt8LObBnBQnOicSgKJZd4ntmtorlW1bh1SbQzpQ7qtaNUoKy5Y3IO/ JZcv1WIB4+lu/LQmkYJVdKBaJd/HvrwVB1XjYO3jDQCZ6q7B5cKmvsWKF868V57LaLXd UfIxE9O7hfN9TK2obSN4u3y4Gr8qBXdVdd2k2m7iIwX+YGL8f+bn35kecYLc4LGie/Ab 1ci0QbEHcvbE8PxAIiEAQJ4K15vbDScE83MP9R/aOzcYZKDhrfeEzgqs9MbuRwbT3m4B FBZq9ty1BzJaoCOhbwdVMXsZ4lnc0FmWZpDzxJcB9sUwHqeb2f4r8JFayAYW19rVdxSa HIWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Su0Ppg32; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u4-20020a1709060b0400b0098e0a14c670si13150063ejg.619.2023.07.17.10.09.55; Mon, 17 Jul 2023 10:10:21 -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=@bootlin.com header.s=gm1 header.b=Su0Ppg32; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231963AbjGQQlX (ORCPT + 99 others); Mon, 17 Jul 2023 12:41:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231951AbjGQQlW (ORCPT ); Mon, 17 Jul 2023 12:41:22 -0400 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A7E3E4F for ; Mon, 17 Jul 2023 09:41:21 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 0969AC0005; Mon, 17 Jul 2023 16:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1689612079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2ntiN7SsvoF79NXtnrae3KdAeOHGP8txeV8hSDxhhoQ=; b=Su0Ppg32m1IFar8DkANJRXcN0lMBDk5Vu92hwIrd5TFPUv6ux+pyS0JgYjKugeek06zbZl A5G/YaMq9rFlTU//uYutfCyYn35/bhu3ssRF0s24Qb0+75bcXGFTVZeHhB3ZnegaGOSEVS cc26X12wy2nOfVeE64xRkxU9RM/JN2izt5a1M7ulUOeKGH4fEFZ/lO2enVl4MQpYnOp5nQ GoQxgqcyc2Dn59n7Bck2Bsvd7tecbakc6Xs0IB87x5W/5kNRRLtPemraeX9bfOxWjSW5uN 2kmTEW3wjmKkAPAF4xg2QJJl6s2vwMgQvyYc2OS4QP3R6yjiv9ceDI5U/eKRAQ== Date: Mon, 17 Jul 2023 18:41:17 +0200 From: Miquel Raynal To: Michael Walle Cc: Srinivas Kandagatla , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Thomas Petazzoni , Robert Marko , Luka Perkov , Randy Dunlap Subject: Re: [PATCH v6 3/3] nvmem: core: Expose cells through sysfs Message-ID: <20230717184117.065e9585@xps-13> In-Reply-To: References: <20230717075147.43326-1-miquel.raynal@bootlin.com> <20230717075147.43326-4-miquel.raynal@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi Michael, michael@walle.cc wrote on Mon, 17 Jul 2023 14:24:45 +0200: > Hi, >=20 > > There is one limitation though: if a layout is built as a module but is > > not properly installed in the system and loaded manually with insmod > > while the nvmem device driver was built-in, the cells won't appear in > > sysfs. But if done like that, the cells won't be usable by the built-in > > kernel drivers anyway. =20 >=20 > What is the difference between manual loading with insmod and automatic > module loading? Or is the limitation, layout as M and device driver as Y > doesn't work? The nvmem core uses usermodehelper to load the relevant layout module, but that only works if the module was installed correctly (make modules_install). The limitation is: * Any storage device driver that registers an nvmem interface =3Dy (or =3Dm but loaded before the nvmem layout) * The relevant nvmem layout =3Dm *and* not installed with make modules_install If you see a way to workaround this, let me know, but there is no way we can enforce Kconfig dependencies between storage drivers and nvmem layouts IMHO. Thanks, Miqu=C3=A8l