Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3340376rwb; Mon, 7 Aug 2023 11:52:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFKaZ+rFGOvMPuOhc73Cc6X6JL8opjGbVSjitX9EwYzAP0qoDKrNW+A85bSOScuLAIFXrQg X-Received: by 2002:a05:6a21:778c:b0:140:fd3b:5d4c with SMTP id bd12-20020a056a21778c00b00140fd3b5d4cmr4936607pzc.38.1691434338175; Mon, 07 Aug 2023 11:52:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691434338; cv=none; d=google.com; s=arc-20160816; b=Ea9kCHRE9gHjCx0NKgR2mZ6YO0msDPEmN98ZbxjMrDIQ2k0YEwwVQ6K5+mKAWkWaxe QE63srM6pW1vUSZUo8DUrPYnvw9HlAp4CQdxDyEcj6IG3iQsRABZMnoL76+R/MAS+u+9 qbjIpKMh0zY49A+P1Wbx8AUlwscQQ6QBdolKZ810ZHpqowf6Jzfyy3m0759LiAiUYPxd mEO0bnNGSehUBK8PMJwa6CPrHtnIMAVWu7CfDL8KqLO88WTpkTKjDh9dyp/4RhaF7mqz mQOEUzHqWYhrGISiJu5YBEBpoVKiLsQ664KNAcZc2IoeSV2Zf8XU/5iCgYy43VMsh5Js 1MXA== 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=2EnyPrs/cBI+rlI07B1v5rUd2uvloil8hm66/Q0Hrno=; fh=tN0BYvjQGBaK2XFzbKtyYZC2IcyAxsg6gPiI17303vg=; b=KJ1R9L9VwnfQY6CNpncSsPRxk+pOtF4RINtAIx4761w7Sng67Iy14T8Z+JYTmqV0SE YpMvlnWkBAj4M6vIyAYyK2rdr+yeT2hQ3d0xHxqC8fqyRmQTeN9qnZI5p0irY+9jyw18 WAp3k8h0ssgwAWv6KC3Jw28szIJ1uQPbavLPnm7sT1/oHzOP0RBI1+SWjJ37LMd38FR5 mGS9Ytl3m8mhTBUII1oWVAqM6eQauSiKHsHEWd3zVWhL/7KZhT6lM0/krl32heKmhxFO IW/V2OJDvGjLhTsSXYsYisw/iHvbg+XYXLhCZw8nXBl1uC54ykorSqTJ+rZDoWCGWulu tvlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=KxiPLkvW; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j191-20020a638bc8000000b005348885119asi5761005pge.523.2023.08.07.11.52.05; Mon, 07 Aug 2023 11:52:18 -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=@ti.com header.s=ti-com-17Q1 header.b=KxiPLkvW; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229728AbjHGS06 (ORCPT + 99 others); Mon, 7 Aug 2023 14:26:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjHGS05 (ORCPT ); Mon, 7 Aug 2023 14:26:57 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77FDC8F; Mon, 7 Aug 2023 11:26:55 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 377IQkUP090374; Mon, 7 Aug 2023 13:26:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1691432806; bh=2EnyPrs/cBI+rlI07B1v5rUd2uvloil8hm66/Q0Hrno=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=KxiPLkvWqdp1YG2KSWOT7IYVGlm5X5WTZi5O1lwkWLG68UERiqh/sTYOt2rAIpSKX 5nAm7YjJ98/Ur05hA9rQIZz5TIHS2BNG8HCa6np+Rj2bwU6cHV07eLj8OT1cHkX2Ed a8krfurCBFUMClwbyFuxULUW5wBi+iQdOPYSQQ4c= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 377IQj6Q095573 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 7 Aug 2023 13:26:46 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 7 Aug 2023 13:26:45 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 7 Aug 2023 13:26:45 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 377IQjNi058017; Mon, 7 Aug 2023 13:26:45 -0500 Date: Mon, 7 Aug 2023 13:26:45 -0500 From: Nishanth Menon To: Andrew Davis , Peter Rosin , Greg Kroah-Hartman CC: Peter Rosin , Rob Herring , Krzysztof Kozlowski , Vignesh Raghavendra , , Subject: Re: [PATCH v2] mux: mmio: use reg property when parent device is not a syscon Message-ID: <20230807182645.ct2uvkb3s2tuplon@improve> References: <20230605154153.24025-1-afd@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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_PASS,SPF_PASS 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 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); -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D