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 EA28AC433F5 for ; Wed, 9 Mar 2022 14:04:51 +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=FbnhVGC7gS9OSdXEgrTIcgg+NoEqNUqboOv7sqN06Mo=; b=K2w5q25Q3EvgQC 1qelvnAsy07jzxwpeBsqaGpkMlW43rTZwJSnOk+kzczzIrAO5g7O5ZIYoqdzf65K/ofOCgZd9KtM+ vJhavsMrUxn5ovTK6GZEQycNgAJlKLLvrjPRfvnDIh/bVjBlGZVT84hY3aqcw+QY2UgYm+0C+l/nw 3F1k3RvgkEbt3fxLtxlQSQZq7OCSUy+AcM8Gbu9eyBFW4eBVl345JW7ADMyzedgNdNrlpnJrY6ipH pa2+fKzagAC+v6KiO1M+HrAWB/DdvYcYYJ+BCdVzJLgUrwIgBnATLv+hic1m0lcglZ8bYcPND8Ot5 Y0Mq8rLgSXzRsiNcyEMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRwuh-008sLx-1u; Wed, 09 Mar 2022 14:03:39 +0000 Received: from muru.com ([72.249.23.125]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRwuc-008sJr-1L for linux-arm-kernel@lists.infradead.org; Wed, 09 Mar 2022 14:03:35 +0000 Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 1289480C1; Wed, 9 Mar 2022 14:02:07 +0000 (UTC) Date: Wed, 9 Mar 2022 16:03:29 +0200 From: Tony Lindgren To: Matthias Schiffer Cc: Rob Herring , Arnd Bergmann , Olof Johansson , soc@kernel.org, Vignesh Raghavendra , Tero Kristo , jan.kiszka@siemens.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Nishanth Menon Subject: Re: [PATCH v2 1/2] arm64: dts: ti: k3-am65: disable optional peripherals by default Message-ID: References: <20220203140240.973690-1-matthias.schiffer@ew.tq-group.com> <20220204143108.653qk2ihnlhsr5aa@prior> <5944ba0ce568eaf507917799b1dfd89a3d0ca492.camel@ew.tq-group.com> <9923df6525212389b86cb635624bcfb5c27a8bc5.camel@ew.tq-group.com> <1356e93cd5b101c3d896e35250c66959ed631544.camel@ew.tq-group.com> <5058591a3e0f0cb82b26cffe888d87b4d1bdd713.camel@ew.tq-group.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5058591a3e0f0cb82b26cffe888d87b4d1bdd713.camel@ew.tq-group.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220309_060334_156677_E3A013C1 X-CRM114-Status: GOOD ( 16.10 ) 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 * Matthias Schiffer [220309 11:09]: > while I agree that it would be great if drivers could just detect when > hardware is not available, this is simply not how most drivers work - > when you instantiate the driver via a non-disabled(/reserved/...) DT > node, the driver expects a usable device. > > Especially for busses like I2C, there is no way for a driver to > reliably detect whether the bus is usable or not. (There are several > states that can't really be distinguished: Is pinmuxing missing, or > does the device not need any muxing? Is a line low because it is not > actually connected to anything, or is there another master currently > using the bus, or is the bus stuck due to a faulty device?) Well how about set only the problem devices with status = "disabled" with a proper comment in the SoC dtsi file? See for example what has been done in arch/arm64/boot/dts/apple that has been pretty widely reviewed and done with a good taste :) Not sure what can be done to idle the unused devices in the disabled case though, maybe some firmware call to disable all unclaimed devices could be done if it does not exist already. The firmware may not have the capability to idle devices that need firmware loaded to idle them for example though. Regards, Tony _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel