From patchwork Tue Aug 8 19:59:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 9889017 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 5592C603F2 for ; Tue, 8 Aug 2017 20:00:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 475F6288E6 for ; Tue, 8 Aug 2017 20:00:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3BB74289F2; Tue, 8 Aug 2017 20:00:09 +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,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 F374E288E6 for ; Tue, 8 Aug 2017 20:00:07 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=VaSI+EvGSPyZb/kTG2lCuHXAVutnSEtky+JwGZDLMPw=; b=ejQpfKjc4csb8ad3MyZMLU+elp H09z3UL337YnP3fhqLMC6dVVF9NmYohpD3fc6NQBzO4fIKb4RnjOZ9nAtF38gw5K9xxVaRmOJWWij 3wbS/hRSNunTf96JmBXIvZJdzXdatFAyFt0o+xWotronU7Wm34A/LCuShGcRtdnlPm4VYd0f70CXF DNy7o9IP9jluLLmxKzCj18VLodr6zHbkT0gBI3jUpe9aaAqoAEkKEg/YlFys2X2h51btANyVxUn3q aguZCwdj8hJtv1R/N27rjIVKCmKVXvzxdOPrS3cfs5EhdRdqvo/bkGJpja2f+Uw7Yl4Waq4yvvsBh POmTWUXg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dfAfc-0008Po-9e; Tue, 08 Aug 2017 20:00:04 +0000 Received: from lelnx194.ext.ti.com ([198.47.27.80]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dfAfY-0008AQ-4u for linux-arm-kernel@lists.infradead.org; Tue, 08 Aug 2017 20:00:02 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v78JxErO029050; Tue, 8 Aug 2017 14:59:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1502222354; bh=TSImyGfyzms+rshdJa/9B+wW1isbEzENe33UD/nROWk=; h=Subject:To:References:From:Date:In-Reply-To; b=PcJ6pNoWk0Tg5wEyrjLCn75KDY8o8CUqqTrj1hqVaWR6MH1V6YUXziFibAVYtDMpR s7j2UGpU87R3oiHILlf1Ga1XVNqzrRPRYG/d2kXQWLfZTsWKyZvK2Lsl7Kc0oqaGWJ kleuLIL3kPc+xTg2JiLXNVLy6S5Lrs3y6xwC99qg= Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v78JxEEH025858; Tue, 8 Aug 2017 14:59:14 -0500 Received: from [128.247.59.147] (128.247.59.147) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Tue, 8 Aug 2017 14:59:14 -0500 Subject: Re: linux-next 2017-08-08 keyboard failure on Nokia N900 To: Pavel Machek , , , kernel list , linux-arm-kernel , , , , , , , , , Julia Lawall References: <20170808101756.GA12922@amd> <20170808103444.GA18247@amd> <20170808111243.GA20328@amd> From: Grygorii Strashko Message-ID: <61264d43-eda3-df9d-0c06-28611f373ce7@ti.com> Date: Tue, 8 Aug 2017 14:59:05 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170808111243.GA20328@amd> Content-Language: en-US X-Originating-IP: [128.247.59.147] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170808_130000_338467_ADE9F6A4 X-CRM114-Status: GOOD ( 11.36 ) 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: , 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 On 08/08/2017 06:12 AM, Pavel Machek wrote: > Hi! > >>> I tried today's linux-next. It boots on n900 (up to X), but then my >>> screen locks and I can't get back. Touchscreen worked, so my guess is >>> keyboard does not...? Ssh connection over usb still works. >> >> Confirmed, its the keyboard. >> >> Additionally, battery monitoring fails, because neither >> >> /sys/class/power_supply/{n900-,rx51-}battery/voltage_now >> >> exists. > > And dmesg is helpful in this case: > > [ 0.675201] input: twl4030_pwrbutton as > /devices/platform/68000000.ocp/48070000.i2c/i2c-1/1-0048/48070000.i2c:twl@48:pwrbutton/input/input1 > [ 0.676635] input: TWL4030 Keypad as > /devices/platform/68000000.ocp/48070000.i2c/i2c-1/1-0048/48070000.i2c:twl@48:keypad/input/input2 > [ 0.679138] twl4030_keypad 48070000.i2c:twl@48:keypad: request_irq > failed for irq no=156: -13 > [ 0.679779] twl4030_keypad: probe of 48070000.i2c:twl@48:keypad > failed with error -13 > [ 0.682769] twl4030_madc 48070000.i2c:twl@48:madc: could not > request irq > [ 0.684051] twl4030_madc: probe of 48070000.i2c:twl@48:madc failed > with error -13 > [ 0.685852] input: twl4030:vibrator as > /devices/platform/68000000.ocp/48070000.i2c/i2c-1/1-0048/48070000.i2c:twl@48:audio/twl4030-vibra/input/input3 > [ 0.768890] omap_i2c 48070000.i2c: bus 1 rev3.3 at 2200 kHz > I've not precisely checked it, but smth is telling me that below patch can cause this: commit 78daaca78ee57dead0f4aa5ee399f0499e81cd9e Author: Julia Lawall Date: Thu May 4 22:10:50 2017 +0200 mfd: twl4030-irq: Drop unnecessary static Drop static on a local variable, when the variable is initialized before any use, on every possible execution path through the function. irq_set_chip_and_handler(). Ops. And what will happen when twl4030_init_irq() returns ;) --- a/drivers/mfd/twl4030-irq.c +++ b/drivers/mfd/twl4030-irq.c @@ -685,7 +685,7 @@ int twl4030_sih_setup(struct device *dev, int module, int irq_base) int twl4030_init_irq(struct device *dev, int irq_num) { - static struct irq_chip twl4030_irq_chip; + struct irq_chip twl4030_irq_chip; but if we will look at code - it can be seen that this variable is passed by reference to