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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0CF60C433EF for ; Mon, 21 Feb 2022 08:35:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=e2NzrotASzOhAn5GIAMob5JIHlmSVjjWhREqDpsRfOI=; b=AJ4z26dgPwbE+q pT4oN8mqJffHDbNESRdAokGDBe+zQh6gnbWrMuD/oOkK1NAOe0KfZ/3s1F1ncWK6/QNLG4WLg5LNJ kd9kyuo3jhzmIZ3b0+89CVul7nphb42d/P38jJPVyGVaz/SgtEQbjoJCQ7L/V2/tWTTmqeXJ3A4hj fen/OdZLvcZr6Q3lGKZGAmMY9hhH4bMkrkExc+R6t0+mgQUvP5q4lteu26nBnQXsD+u9of4+Sgs9e hWaXYVB24jSumpAKJmypfRustX+tFcLwH7RYLzyXPk5YMblMH4DiqDwxYv1E3K7nWfZ7PwfIZXNEr E3zD5ZcKgxxOpIuXyxAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nM49Z-004JmY-Pc; Mon, 21 Feb 2022 08:34:41 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nM49T-004JkR-H6 for linux-arm-kernel@lists.infradead.org; Mon, 21 Feb 2022 08:34:39 +0000 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 1BB7B61048; 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-Disposition: inline In-Reply-To: <20220221080244.bd7wankcdsiwzum4@x260> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220221_003435_635420_B4AFF982 X-CRM114-Status: GOOD ( 20.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel