linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
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	[thread overview]
Message-ID: <20201113154633.21542-1-nsaenzjulienne@suse.de> (raw)
In-Reply-To: <20200204032838.20739-3-chris.packham@alliedtelesis.co.nz>

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 = <&eth1_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

  parent reply	other threads:[~2020-11-13 15:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04  3:28 [PATCH v5 0/2] SPI bus multiplexing Chris Packham
     [not found] ` <20200204032838.20739-1-chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
2020-02-04  3:28   ` [PATCH v5 1/2] dt-bindings: spi: Document binding for generic SPI multiplexer Chris Packham
2020-02-12 23:58     ` Applied "dt-bindings: spi: Document binding for generic SPI multiplexer" to the spi tree Mark Brown
2020-02-04  3:28 ` [PATCH v5 2/2] spi: Add generic SPI multiplexer Chris Packham
2020-02-04 11:10   ` Andy Shevchenko
     [not found]   ` <20200204032838.20739-3-chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
2020-02-12 23:58     ` Applied "spi: Add generic SPI multiplexer" to the spi tree Mark Brown
2020-11-13 15:46   ` Nicolas Saenz Julienne [this message]
2020-11-17  0:08     ` [PATCH v5 2/2] spi: Add generic SPI multiplexer Chris Packham
2020-11-20 16:18       ` Nicolas Saenz Julienne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201113154633.21542-1-nsaenzjulienne@suse.de \
    --to=nsaenzjulienne@suse.de \
    --cc=andy.shevchenko@gmail.com \
    --cc=broonie@kernel.org \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).