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: 10243933 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 2584360211 for ; Mon, 26 Feb 2018 23:30:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EFF72A492 for ; Mon, 26 Feb 2018 23:30:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12C622A497; Mon, 26 Feb 2018 23:30:41 +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, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D2252A492 for ; Mon, 26 Feb 2018 23:30:39 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 4CE3926762E; Tue, 27 Feb 2018 00:30:38 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id DDA4B26762F; Tue, 27 Feb 2018 00:30:35 +0100 (CET) Received: from atrey.karlin.mff.cuni.cz (atrey.karlin.mff.cuni.cz [195.113.26.193]) by alsa0.perex.cz (Postfix) with ESMTP id D124B26762C for ; Tue, 27 Feb 2018 00:30:32 +0100 (CET) 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 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) 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 Subject: Re: [alsa-devel] regression v4.16 on Nokia N900: sound does not work X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.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;