Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1245819pxb; Fri, 13 Nov 2020 07:50:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzb1xutJ4Y1ZNa9iVoAHQj6Q8eqwKU6htSHfwUlO3xFro1h6o/l7kzSe5s0oDRgMR4533Tf X-Received: by 2002:a50:cfcd:: with SMTP id i13mr3008022edk.275.1605282625799; Fri, 13 Nov 2020 07:50:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605282625; cv=none; d=google.com; s=arc-20160816; b=udWUm+y1VlrYR1m+TTB0yPO3ElR6fHQc/BB6gQxZL1B5GkvdQUqywvOj72pGT2cLbO YAOSO2HhBcw4vFe6D3uYLU3TlbFrJ+D+BZJdafLGiX8mBdrW3wBkbARywvaVM28l+VNL KkgGdc85e20HvFb2oRIk+HHIiSImdkBr0twZLaem85wxAxbG27u5jJ8EKGNRnLRUPc4z 5JJo5XhY55U0pg0n+mPLiOHJpzzN4reD2E8MZvgiQnc2n3zVaKelf5JRsFv/pVaj3eG+ brMf1aGD0q/As/v5YjouRi5JstMBjDrXFE5l49uZ+12EzQwi1JZ3MNstR8DRCaQxKtYU 3WNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VXDRLwli/NpfzhwaN3neLXhCd6XLNk08ONBnSilgJBw=; b=OJC6GNh/E0MRv5Li7Ux2ggreA5pWEs9GCvVVhVAV8wE8o1jeIKsH3XG1ffWlTBeutk ClwKUh4EzLrvyhq2ubWBLbJh+s1isAPrJTqRoIE5IlL1eKM9Oi07JqKv8TkwXROhALiv KZIhFsNwzre81z+43w0GkCYhC8Zz9uZmxXmig/XbrRnAT5oHx4DZVmr2482UQ44cHoqu cujZbRu9Bdihh2BXfi2NKg6jcV9VFi6plvv+jzoqhe/Z1cDsk10N4WpLtamcTaane1fi 9CqBZUeBoAVOaN/vsl6Cmg/wr/oJe5CNoD6BUuJLpEdhPHpJgtor/4mvs6c02q/RpEwY twbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j14si8344153edk.526.2020.11.13.07.50.03; Fri, 13 Nov 2020 07:50:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726901AbgKMPrC (ORCPT + 99 others); Fri, 13 Nov 2020 10:47:02 -0500 Received: from mx2.suse.de ([195.135.220.15]:37904 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726777AbgKMPqo (ORCPT ); Fri, 13 Nov 2020 10:46:44 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B05B7ABD9; Fri, 13 Nov 2020 15:46:41 +0000 (UTC) From: Nicolas Saenz Julienne To: chris.packham@alliedtelesis.co.nz, linux-kernel@vger.kernel.org Cc: andy.shevchenko@gmail.com, broonie@kernel.org, devicetree@vger.kernel.org, linux-spi@vger.kernel.org, mark.rutland@arm.com, robh+dt@kernel.org Subject: Re: [PATCH v5 2/2] spi: Add generic SPI multiplexer Date: Fri, 13 Nov 2020 16:46:33 +0100 Message-Id: <20201113154633.21542-1-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20200204032838.20739-3-chris.packham@alliedtelesis.co.nz> References: <20200204032838.20739-3-chris.packham@alliedtelesis.co.nz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Upon registering spi-mux's devices through spi_add_device() the kernel gets stuck waiting for the 'spi_add_lock' mutex to be released. The mutex happens to be held by spi-mux's parent SPI bus, which unluckily, is waiting for spi-mux's probe to finish before releasing it. I might aswell be doing something wrong. But so far I trust my DT implementation: &spi { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&spi0_gpio7>; spi@0 { compatible = "spi-mux"; reg = <0>; #address-cells = <1>; #size-cells = <0>; spi-max-frequency = <100000000>; mux-controls = <&gpio_mux>; w5500@0 { compatible = "wiznet,w5500"; reg = <0>; pinctrl-names = "default"; pinctrl-0 = <ð1_pins>; interrupt-parent = <&gpio>; interrupts = <27 IRQ_TYPE_EDGE_FALLING>; spi-max-frequency = <30000000>; }; spi-flash@1 { compatible = "jedec,spi-nor"; reg = <1>; #address-cells = <1>; #size-cells = <0>; spi-max-frequency = <16000000>; }; }; }; Regards, Nicolas