Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4667065rwb; Tue, 8 Aug 2023 11:47:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFnVNolTqpoQstPT6DD4+5PaNWwCFOs48O61cnGB6ZuTE5UmsglCuvb7SXLYgZc0xlULet0 X-Received: by 2002:a17:902:b283:b0:1b7:e9e9:1004 with SMTP id u3-20020a170902b28300b001b7e9e91004mr597974plr.30.1691520448265; Tue, 08 Aug 2023 11:47:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691520448; cv=none; d=google.com; s=arc-20160816; b=hgXzZyXnD/zL6kFt0PZ4xxkcVkG1V5O7lmRsJZgnIyzjwc5n9K4kpjvS9h/dgiDg8i dExxjkpFB5odY9hHUTGSE4S8mnHkTFARIVwnd7SpYjPkcGYoqk3KFOm8Y0OihGnjxw3N 6MNldX6D7kTMu9Gc2Pi0mHZvimEOMtRgQTT0S/WiDMGELRe5Zk3iHXp9K/7D1RIkJrjt hgEv4iTnvWyDMLW56IeUBQsfjVgm1QkPS7VZKjHGwbIFLSqW+jbBERzOalnneb+U2ufs r9arLQHDpya80ZhsGqPe4A6xsi21YeBB6ghn7VcFJn5YExa8HIKL6JPi8ckYCBD3iwCR JFOQ== 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=acNH+Dog1bd/JMcrHrQxIX90fSZD2JC4b4bE683De70=; fh=ebqB0stqcJ8Wa+A3nb3bTFnRSigI1pLIlaGRmvxlVRM=; b=FWXRG5Jrgonb6XB7O+Mn5iNhg/zif2pqdc1XTHJJab8BpXoNtRjaHJBkZpluH+AwKx 8JooA5s7BaSul2NGZ9eVB7FY5UwwrJKSBZ0lq5eaIUZgFl8S3UfnECL54iuZLe5EYyDE xLeDNlGtuBPor81kwLwxFMN0+8G0b143rdZ80DDvqCKBTtg/Aa45mCQFpT8PS3w3r4tp 2kr/GZaTIZl8jzTcOcYxfJH88tHrWWjpesxv5Y7RhnMRdEsn5rhH1O7A7BrVJQtAcSoQ XqpsAc3hOLtXzXbr6bj6h2CnzCaJSLsmLFQdG5A14Vyi9fDHLcSUG9Fm5jFt97Y1+j0p zycQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kUgys+Xt; 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 t1-20020a170902bc4100b001bc079974dbsi7523129plz.355.2023.08.08.11.47.15; Tue, 08 Aug 2023 11:47:28 -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=kUgys+Xt; 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 S234532AbjHHR53 (ORCPT + 99 others); Tue, 8 Aug 2023 13:57:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235203AbjHHR5C (ORCPT ); Tue, 8 Aug 2023 13:57:02 -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 8102CAD1A; Tue, 8 Aug 2023 09:25:53 -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 1E4F1623EB; Tue, 8 Aug 2023 04:36:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03487C433C7; Tue, 8 Aug 2023 04:36:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1691469369; bh=IMgWwZ4rdhaoLfJ9wmfKo2+cng5qpJxVkmNuR2ToNbo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kUgys+Xtx3ItPxfY68wwjolIAgO72NEQe5mB342f1M7WPec873Dz3SkSCdrTMW5Hb MPBPYP7vT0yTHLn0VvtFPOts++DefKyFeZboOtwQG/pP4VK3t95O7NvRHYowDE7TmT 8mBE4GJFdU36umK//qMGo3+liGHlEEk86BIneeEo= Date: Tue, 8 Aug 2023 06:36:06 +0200 From: Greg Kroah-Hartman To: Nishanth Menon Cc: Andrew Davis , Peter Rosin , Rob Herring , Krzysztof Kozlowski , Vignesh Raghavendra , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mux: mmio: use reg property when parent device is not a syscon Message-ID: <2023080854-crummy-armored-420c@gregkh> References: <20230605154153.24025-1-afd@ti.com> <20230807182645.ct2uvkb3s2tuplon@improve> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230807182645.ct2uvkb3s2tuplon@improve> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 On Mon, Aug 07, 2023 at 01:26:45PM -0500, Nishanth Menon wrote: > On 15:12-20230713, Andrew Davis wrote: > > On 6/5/23 10:41 AM, Andrew Davis wrote: > > > The DT binding for the reg-mux compatible states it can be used when the > > > "parent device of mux controller is not syscon device". It also allows > > > for a reg property. When the reg property is provided, use that to > > > identify the address space for this mux. If not provided fallback to > > > using the parent device as a regmap provider. > > > > > > Signed-off-by: Andrew Davis > > > --- > > > > Ping, still needed and applies cleanly on v6.5-rc1. > > > > Andrew > > > > > > > > Changes from v1: > > > - Flip logic as suggested in v1[0] > > > > > > [0] https://lore.kernel.org/lkml/1c27d9d4-b1cc-c158-90f7-f7e47e02c424@ti.com/T/ > > > > > > drivers/mux/mmio.c | 9 ++++++--- > > > 1 file changed, 6 insertions(+), 3 deletions(-) > > > Reviewed-by: Nishanth Menon > > Greg: looks like you were missed in CC > > Peter/Greg: Any chance of Looking at this? This is a basic corner stone > for us to clean up much of the mess we have created up in the device > tree syscon nodes and trying to transition those into simple-bus. > > > > > > > diff --git a/drivers/mux/mmio.c b/drivers/mux/mmio.c > > > index 44a7a0e885b8d..2c9e4df9d6f2c 100644 > > > --- a/drivers/mux/mmio.c > > > +++ b/drivers/mux/mmio.c > > > @@ -44,10 +44,13 @@ static int mux_mmio_probe(struct platform_device *pdev) > > > int ret; > > > int i; > > > - if (of_device_is_compatible(np, "mmio-mux")) > > > + if (of_device_is_compatible(np, "mmio-mux")) { > > > regmap = syscon_node_to_regmap(np->parent); > > > - else > > > - regmap = dev_get_regmap(dev->parent, NULL) ?: ERR_PTR(-ENODEV); > > > + } else { > > > + regmap = device_node_to_regmap(np); > > > + if (IS_ERR(regmap)) > > > + regmap = dev_get_regmap(dev->parent, NULL) ?: ERR_PTR(-ENODEV); > > > + } > > > if (IS_ERR(regmap)) { > > > ret = PTR_ERR(regmap); > > > dev_err(dev, "failed to get regmap: %d\n", ret); I'm not the maintainer here, it's up to Peter.