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: 9889015 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 1AADB60363 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 0C598289A9 for ; Tue, 8 Aug 2017 20:00:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00C3C28A14; Tue, 8 Aug 2017 20:00:08 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72307289F2 for ; Tue, 8 Aug 2017 20:00:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752100AbdHHUAG (ORCPT ); Tue, 8 Aug 2017 16:00:06 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:35008 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752082AbdHHUAG (ORCPT ); Tue, 8 Aug 2017 16:00:06 -0400 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] Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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