From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6173C4708E for ; Wed, 7 Dec 2022 17:20:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229635AbiLGRTy (ORCPT ); Wed, 7 Dec 2022 12:19:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230006AbiLGRTY (ORCPT ); Wed, 7 Dec 2022 12:19:24 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26F2E25C3 for ; Wed, 7 Dec 2022 09:19:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=/6JZSRS9WqUUzoOCsR3hETjpo4+jNfZhfqWS+l+0x1E=; b=VX5NqIPey/HiCekSafTXvem2PE pVPncXaA/tu32oIquf9G4n/7xqNpn/jH9s7pJdE7Hzdj7bABksGkKuUoKBit2UFQ+uND8MyoZK1cW 55qaSLTTVtMhSC1NqmYRFlbbRB5Kx9eRJmp9RsgrIB7fxQineogK1o1Iu3QNEZ5rDTIQmBu4HbMUk 1TDn6UVTkr29eWqQOVimGqn6tiCn/ymb0AmHOObk7LLvLT9T+3hGrfWAbeN03u1901vU4MXOV5m9O By5y0cVsrpnUh1fk8kkFXhiGL82pLan9GO9i4q65hQ+XPOPtWlHeTXo7wo6EVLkj+dFYkvGdLiLyD M9fSgE2Q==; Received: from [2601:1c2:d80:3110::a2e7] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2y4j-007GRx-Up; Wed, 07 Dec 2022 17:19:18 +0000 Message-ID: <41a5931e-3543-6a3d-ca85-2dd8ad581f2e@infradead.org> Date: Wed, 7 Dec 2022 09:19:15 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v2] mux: remove the Kconfig question for the subsystem Content-Language: en-US To: Arnd Bergmann , Peter Rosin , Linus Torvalds Cc: Greg Kroah-Hartman , Andrew Morton , Linux Kernel Mailing List References: <1499156564-29458-1-git-send-email-peda@axentia.se> <053d7bf2-9bf3-a71c-5713-7cce19413c37@infradead.org> From: Randy Dunlap In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/7/22 00:41, Arnd Bergmann wrote: > On Tue, Dec 6, 2022, at 23:20, Randy Dunlap wrote: >> On 7/4/17 01:22, Peter Rosin wrote: >>> The MULTIPLEXER question in the Kconfig might be confusing and is >>> of dubious value. Remove it. This makes consumers responsible for >>> selecting MULTIPLEXER, which they already do. >>> >>> Signed-off-by: Peter Rosin >> >> >> How does a user enable any of the 4 drivers in drivers/mux/Kconfig unless >> some other totally unrelated driver has just happened to select MULTIPLEXER >> so that the mux driver menu is visible to them? > > We have this mechanism for a few subsystems, LEDS_CLASS/NEW_LEDS and > CRYPTO being more common examples. > > The idea clearly is that there is no need for the subsystem if no > drivers call into it. This works if every single driver calling > \(devm_\|\)mux_control_get also results in 'select MULTIPLEXER' > in Kconfig, and none of them ever uses 'depends on MULTIPLEXER'. > I think this is used correctly most of the time in mainline: > git grep '\<\(mux/consumer.h\|MULTIPLEXER\)\>' indicates that > PHY_J721E_WIZ and MTD_PHYSMAP_BT1_ROM may not actually need it, > but that is fairly harmless. Yes, sure. > For the other subsystems I mentioned, there are occasionally > problems with missing 'select' that tend to be a pain to find, > compared to subsystems consistently using 'depends on', which > show up as link failures in randconfig builds. I find that various drivers mixing the use of "select" and "depends on" is problematic. However, there was no answer for the original question: How does a user enable the 4 Kconfig symbols in drivers/mux/Kconfig if some other random driver has not selected MULTIPLEXER? I.e.: config MUX_ADG792A tristate "Analog Devices ADG792A/ADG792G Multiplexers" config MUX_ADGS1408 tristate "Analog Devices ADGS1408/ADGS1409 Multiplexers" config MUX_GPIO tristate "GPIO-controlled Multiplexer" config MUX_MMIO tristate "MMIO/Regmap register bitfield-controlled Multiplexer" OK, MUX_MMIO is selected from some other drivers, but if that is not done, how can the first 3 be enabled by a user? thanks. -- ~Randy