Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3598581pxb; Mon, 21 Feb 2022 01:25:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYNnPPHmznTxQTPCf846QI7d1NwPIm4WD3D5XqPtMWCA1WveCv1a+pYYnGG0eY7bKc6hji X-Received: by 2002:a17:90a:120f:b0:1b8:7ba9:e48f with SMTP id f15-20020a17090a120f00b001b87ba9e48fmr24520410pja.59.1645435520188; Mon, 21 Feb 2022 01:25:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645435520; cv=none; d=google.com; s=arc-20160816; b=H41hN4MzjHtbbrJYut9kq09BUxhMNZ61KWc1LaUFwKqmoHG37vlQx9fctIAOLf1xka +SdqpHExUjHOOh0I0d3hMaDFyhe6dpRHYKac6gIsjxdZgzVUTKl/o2It2UX02vBrqU2w 4CtW3tG3gOs7Ki2nlahjQGUq0XnN+sq7PYNfBzKV9CtzJ4WyzLtrf4WY1iLmXJAfpw7v LtfkaUtxk924j9HEiTlDrePJhTyXKY28aBrf0AM3+OYhYfYaiPY6XveIB2IG5983CGMA hxnh0RxSzHFpuyS1h9w8OW4goZY4YL3ERn3iRXGveTbfVImbOsIezw2J2n1dtAl0LtzY 27yg== 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=h4uiWnwSaBVq24CknrVpWiSFpKWdlNKciiEFGEbZRgo=; b=fR8oUggSxvvWyznVmxUQfhX6GbbS5NLPbhAHV4F56/q3yVAzKxOspEHlpJcKkPVCsH vKBYwpGngucqKp9lSF4KunROlzl0pOiblCSGehkhYs4vu6xVd9Rt0dGi3RiNW0mNXW7S 2s/BfXSCbLh3nW9HlRmiXKZ3+9xT85tmgJoFrwdl3sv0N3fxQwB3DqyVUAoZAw0IcuT1 GA/IpWPlx1cyVLc0cE+xLuIXInLBiH0CerG24zMQHnt/ez8IWiUxYwu7umlAZ4K72npM YcK1ZrrHgaNbVo/mpeBiTIF39FMr14ZLAve0nGgXW4DRGE0lUyA3Ox2plbemFbxyAoEH 2GWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GJOiCM5U; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bg1si13902773plb.585.2022.02.21.01.25.06; Mon, 21 Feb 2022 01:25:20 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=GJOiCM5U; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343786AbiBUIe6 (ORCPT + 99 others); Mon, 21 Feb 2022 03:34:58 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:50740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343766AbiBUIe5 (ORCPT ); Mon, 21 Feb 2022 03:34:57 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 832B338BA for ; Mon, 21 Feb 2022 00:34:35 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2123861092 for ; Mon, 21 Feb 2022 08:34:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05A6DC340E9; Mon, 21 Feb 2022 08:34:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645432474; bh=IKI9WWMJHEiavYMge8WuMDWwtJYvSFU+zJwbidZuFiE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GJOiCM5UviX81tnAIjmZpDNZTXvSjQ8Qzpbpkn29ZAJqrqojOqXPkiEvfVlobvOUf D8G+nQzCbCJFQnKMSEnVq1MVW4n1keegCKB5EQEXzN6PVXsYAkLq5l0oKWTrfpp2yk OllWhjePF8GcBTXTTQQFqO3W4K2zQ9UbKScvTSrGwW56Q2qMJ7aIjbOg1/3YNrALpW XS3+CJfAi76HtPAH/nmIvRaUDeqbTe//QO9E0gfSwfRKNzjwuPzW8A0uisYX7N1N0T Zq6SgIC6W1vdKvKEjMWX1I4owZXmEkQobpoyHF792EV15XUiN7K80AZSGDn+toaLmW EE0n/YzKlK51w== Date: Mon, 21 Feb 2022 16:34:29 +0800 From: Shawn Guo To: Ivan Bornyakov Cc: s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, system@metrotek.ru Subject: Re: [PATCH] bus: imx-weim: add DT overlay support for WEIM bus Message-ID: <20220221083429.GT2249@dragon> References: <20220205055006.23447-1-i.bornyakov@metrotek.ru> <20220205055006.23447-2-i.bornyakov@metrotek.ru> <20220221072529.GP2249@dragon> <20220221080244.bd7wankcdsiwzum4@x260> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220221080244.bd7wankcdsiwzum4@x260> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 On Mon, Feb 21, 2022 at 11:02:44AM +0300, Ivan Bornyakov wrote: > On Mon, Feb 21, 2022 at 03:25:29PM +0800, Shawn Guo wrote: > > On Sat, Feb 05, 2022 at 08:50:06AM +0300, Ivan Bornyakov wrote: > > > Add OF reconfiguration notifier handler for WEIM bus to setup Chip > > > Select timings on runtime creation of child devices. > > > > > > However, it is not possible to load another DT overlay with conflicting > > > CS timings with previously loaded overlay, even if the first one is > > > unloaded. > > > > Are we doing anything if that happens? > > > > On device removal there is no access to device node properties, thus it > is not possible to find out which of CS timings was configured for this > device to clear theirs 'is_applied'. > > So, if we apply one DT overlay, configure some CS timings, remove this > overlay, apply another with conflicting timings, we will fail here > > static int weim_timing_setup(...) > { > ... > > for (reg_idx = 0; reg_idx < num_regs; reg_idx++) { > ... > > /* prevent re-configuring a CS that's already been configured */ > cst = &ts->cs[cs_idx]; > if (cst->is_applied && memcmp(value, cst->regs, > devtype->cs_regs_count * sizeof(u32))) { > dev_err(dev, "fsl,weim-cs-timing conflict on %pOF", np); > return -EINVAL; > } > ... > } > ... > } Ah, right, thanks for clarifying, Ivan! Shawn