Received: by 10.213.65.68 with SMTP id h4csp653261imn; Fri, 23 Mar 2018 12:36:31 -0700 (PDT) X-Google-Smtp-Source: AG47ELtJYYZ6nmP8Cbz54MNZ/kcPxtNNP9GaJfDkk4Sk8x8FSjTD1YprrKtGATGJdEqRmJ8AR0EC X-Received: by 10.99.123.23 with SMTP id w23mr21737898pgc.10.1521833791377; Fri, 23 Mar 2018 12:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521833791; cv=none; d=google.com; s=arc-20160816; b=XXIWzKTtTZ5ZUlAgrw4Za+ZDP4oRyH72IZx9dkX8n19/wBq0Q/HvM43G/qBqIV2LKY HiTftzBSW8Zp06MibksK0ZtiHfZ+J96qx7akxRiKitfJtcxEDJliHatr6zDU7ppbEX/C J+duFzqiW0NnhO3uaKs/wYXLLGVfXyr/8pWjGpcCjDiWxx+zq3jQ5edO7rOQqiCk1cWC NzJPR58uZfGYwq1JPVz4xaxgCCba3HjQmuyPS7zRjbFMIKvYumPU5K+SN5E87uZSEw/u lQMRLADB1wQdfw2i6q1Ekv4ZFqJAA8N4SySv39PIpfkVy0wLRWqw150NsaRL09AaWGow cEHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=OE1ZtNb4uNJEx+83N7zYH8CMQv/d+TrgDnT09jTaAFA=; b=zHDo8Cs7cmj5d3BaCEzkzV3SaorIqVAxhIaBYDMlHv1rHOvAenEWVrkC4YPiQHnyTO Gi9WD2VzN7YKCeh883zlFLNXh2lYsMisL2Zvmb7cIpStDa7RHWJpIahlc1COALGki7yY MPie8rKWNsg5NmH5N7XbCmcae4Rbjds0AcLUgbSh6MhYJcEUaik2ZB3GBYscQeE6+pqQ 6F9mbJ6m2NMKRb/kxNRyMoWNmPImrjN4n0Si+jLUHjNj9e6s0QGrDgT8VIiQWo5fjIuP Q62OabTub1saWMGjznYo5VmXJOjSxmgcnEi9u2JLCJQcamQ2MHizviG3fpITD4lnN0VZ mMHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Vv7FrczZ; dkim=pass header.i=@codeaurora.org header.s=default header.b=CzdRyd93; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10si6355747pgr.164.2018.03.23.12.36.16; Fri, 23 Mar 2018 12:36:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Vv7FrczZ; dkim=pass header.i=@codeaurora.org header.s=default header.b=CzdRyd93; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752354AbeCWTey (ORCPT + 99 others); Fri, 23 Mar 2018 15:34:54 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:39178 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752077AbeCWTev (ORCPT ); Fri, 23 Mar 2018 15:34:51 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 52E73602BC; Fri, 23 Mar 2018 19:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521833691; bh=uYmPX578DzrIEGcnbTEDLzm4k6jhC4ymwZu04A5ZmhQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Vv7FrczZr11Rr+GVDwdL8DQCdlw+ElV54k3A4AGyWQ3P9ZA8pEzddKkFgJpHUqH6V 0iAhOEMrH93ncgQZKNWs8I5GlBPFRkMMJhrPJKMc3knIysdYQQDsiuvGIM0QN18Fl+ 6ia+eu0olW4jsiFCZkSr7ZwnH2WKCeNXAgQ9O2gU= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.63.172.127] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tsoni@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 700F6602BC; Fri, 23 Mar 2018 19:34:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521833690; bh=uYmPX578DzrIEGcnbTEDLzm4k6jhC4ymwZu04A5ZmhQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=CzdRyd93ToqhRIR3KR04eJtR7/2oP3Vhd48derwTtn05GF936vHV7UAe+NJwQiCGT BQBFwH3gnabX/g+KwfOMqTeAkdaZ/Ca6evyKWsip7t85JbmAoJ/vA2RaDXgPW0eZ8U IdaVnusVEAmgsTMxo4bq9CN/EAhIcN/rWWOEc6sc= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 700F6602BC Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=tsoni@codeaurora.org Subject: Re: [PATCH V3] Input: pm8941-pwrkey: add resin key capabilities To: Dmitry Torokhov Cc: Tirupathi Reddy , bjorn.andersson@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <1521786192-19487-1-git-send-email-tirupath@codeaurora.org> <240c6cbc-886f-94c6-cba4-3c4eb3ed0b45@codeaurora.org> <20180323192210.GE255819@dtor-ws> From: Trilok Soni Message-ID: <6928c292-b10b-3056-af02-f1ab70d8f494@codeaurora.org> Date: Fri, 23 Mar 2018 12:34:50 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: <20180323192210.GE255819@dtor-ws> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, >> >> >> What happens if interrupts comes as soon as you have done the key_init(..) >> here? I see that you are registering the input device after it, right? Looks >> like you should do this at the end of probe? > > It should be fine, input devices properly allocated (with > input_allocate_device() or devm- version) are able to accept events even > if input device has not been registered yet. It is and advertised > feature: > > drivers/input/input.c: > > " > * input_event() - report new input event > ... > * NOTE: input_event() may be safely used right after input device was > * allocated with input_allocate_device(), even before it is registered > * with input_register_device(), but the event will not reach any of the > * input handlers. Such early invocation of input_event() may be used > * to 'seed' initial state of a switch or initial position of absolute > * axis, etc. Thanks. Looks good since input_allocate_device(...) is called before the init. -- ---Trilok Soni Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project