From patchwork Mon Feb 26 23:30:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 10243935 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7B490602DC for ; Mon, 26 Feb 2018 23:31:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 707912A48B for ; Mon, 26 Feb 2018 23:31:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 623512A493; Mon, 26 Feb 2018 23:31:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BA93E2A48B for ; Mon, 26 Feb 2018 23:30:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=K9Ca103JNjZhZyASo8CjUMt5z4SWi7I/uVem/8BdKmo=; b=sghAaFtW4lrIudzs4B8FnLry7 +N6ETfJril9XHn3IAPTE3o5ftNBZPQ6nUgQBV/mYjfvSy6xFLiYsHXV77xv8R0W1uiKOYJv2xpGmY 8ezZ5zmvva1vohYe5bWZEKInabO64qmTAU9MZldskjffdngumGIH+XSm5H9yBOcTfJ9XddsdeNzuC 9lvIWD1P4BKGQIVVGbFexf0w3mVSNXKaGCzJcn4mRBtj4XDUdCKZLyTv4FGdbPeRzAjPVzUSvo+OH d6ZqXCQzP223gQ4C+WFHfFHjYLpWF0+5qRaF3AiKGPv2BqKsO+WB5LuuropWSvkkLOYF0qjo5moEA pzUWmTqTQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eqSEJ-00040c-FK; Mon, 26 Feb 2018 23:30:47 +0000 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eqSEF-0003zQ-KI for linux-arm-kernel@lists.infradead.org; Mon, 26 Feb 2018 23:30:45 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 146EB801EE; Tue, 27 Feb 2018 00:30:32 +0100 (CET) Date: Tue, 27 Feb 2018 00:30:33 +0100 From: Pavel Machek To: Daniel Baluta , linus.walleij@linaro.org Subject: Re: [alsa-devel] regression v4.16 on Nokia N900: sound does not work Message-ID: <20180226233033.GA14094@amd> References: <20180224214617.GA22619@amd> <71aa88ec-d4df-b49c-7d73-27197f468491@leemhuis.info> <20180226131318.GA14045@amd> <20180226231336.GA18565@amd> MIME-Version: 1.0 In-Reply-To: <20180226231336.GA18565@amd> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180226_153044_076124_017C25CE X-CRM114-Status: GOOD ( 21.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: martijn@brixit.nl, Linux-ALSA , ivo.g.dimitrov.75@gmail.com, khilman@kernel.org, tony@atomide.com, Mark Brown , aaro.koskinen@iki.fi, kernel list , sre@kernel.org, peter.ujfalusi@ti.com, Filip =?utf-8?Q?Matijevi=C4=87?= , Thorsten Leemhuis , abcloriens@gmail.com, linux-arm-kernel , sakari.ailus@linux.intel.com, pali.rohar@gmail.com, clayton@craftyguy.net, linux-omap@vger.kernel.org, patrikbachan@gmail.com, "Andrew F . Davis" , serge@hallyn.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi! > > >> JFYI: This issues is tracked in the regression reports for Linux 4.16 > > >> (http://bit.ly/lnxregrep416 ) with this id: > > >> > > >> Linux-Regression-ID: lr#4b650f > > > > > > Ok, so it seems that issue is bigger: whole sound subsystem does not > > > work. /proc/asound/cards is empty. > > > > > > 7e6127c1240ed569cdda2a67c8f03836f9f28c05 seems to be bad already. > > > > > > I tried to revert sound/soc changes, and sound is broken, too. Nasty > > > > > > dmesg log? > > Partial dmesg is at: > https://github.com/pavelmachek/missy/blob/master/db/phone/nokia/n900/pavel/2018.1291171648263/dmesg.out > > I should be able to get full one... > > I did git bisect, and the winner seems to be: > > pavel@duo:/data/l/linux-n900$ git bisect bad > c85823390215e52d68d3826df92a447ed31e5c80 is the first bad commit > commit c85823390215e52d68d3826df92a447ed31e5c80 > Author: Linus Walleij > Date: Wed Dec 27 16:37:44 2017 +0100 I reverted it on top of v4.16-rc2, and sound now works. Ideas? (Aha, and I see I made small mistake reverting... but...) Pavel diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 564bb7a..50cc590 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -157,36 +157,6 @@ int of_get_named_gpio_flags(struct device_node *np, const char *list_name, EXPORT_SYMBOL(of_get_named_gpio_flags); /* - * The SPI GPIO bindings happened before we managed to establish that GPIO - * properties should be named "foo-gpios" so we have this special kludge for - * them. - */ -static struct gpio_desc *of_find_spi_gpio(struct device *dev, const char *con_id, - enum of_gpio_flags *of_flags) -{ - char prop_name[32]; /* 32 is max size of property name */ - struct device_node *np = dev->of_node; - struct gpio_desc *desc; - - /* - * Hopefully the compiler stubs the rest of the function if this - * is false. - */ - if (!IS_ENABLED(CONFIG_SPI_MASTER)) - return ERR_PTR(-ENOENT); - - /* Allow this specifically for "spi-gpio" devices */ - if (!of_device_is_compatible(np, "spi-gpio") || !con_id) - return ERR_PTR(-ENOENT); - - /* Will be "gpio-sck", "gpio-mosi" or "gpio-miso" */ - snprintf(prop_name, sizeof(prop_name), "%s-%s", "gpio", con_id); - - desc = of_get_named_gpiod_flags(np, prop_name, 0, of_flags); - return desc; -} - -/* * Some regulator bindings happened before we managed to establish that GPIO * properties should be named "foo-gpios" so we have this special kludge for * them. @@ -230,7 +200,6 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id, struct gpio_desc *desc; unsigned int i; - /* Try GPIO property "foo-gpios" and "foo-gpio" */ for (i = 0; i < ARRAY_SIZE(gpio_suffixes); i++) { if (con_id) snprintf(prop_name, sizeof(prop_name), "%s-%s", con_id, @@ -245,14 +214,6 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id, break; } - /* Special handling for SPI GPIOs if used */ - if (IS_ERR(desc)) - desc = of_find_spi_gpio(dev, con_id, &of_flags); - - /* Special handling for regulator GPIOs if used */ - if (IS_ERR(desc)) - desc = of_find_regulator_gpio(dev, con_id, &of_flags); - if (IS_ERR(desc)) return desc;