Received: by 10.213.65.68 with SMTP id h4csp542380imn; Tue, 13 Mar 2018 12:25:30 -0700 (PDT) X-Google-Smtp-Source: AG47ELuAmKM8G/VKfia5cYrjV5RinpwX75kmee1Frk3Q4bRGrnr22GUe7bH0NXTweORGe1ti8K1p X-Received: by 10.99.121.140 with SMTP id u134mr1354336pgc.89.1520969129957; Tue, 13 Mar 2018 12:25:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520969129; cv=none; d=google.com; s=arc-20160816; b=zPf6hwcwx5jm1HKDzcAV1bYk0qOJ/PxQlW1b5PwcwlP6WWUrwMR7RL3G6iSDlQyDHL hC/5Rboft8yaXRsgA+XvcpVFOBuJfH8Olwr+9eWN/d/+c5TFTieTa0vmy89CzIHo/ynP 4SPu0+luJuSrUDPlB+NSavFm4JURLP6zRy+Vp7G6RwuSwqnMoa9C1KKkniYEqQMFhMf/ 85rS09rA+x3oF9K5NCwIWluy6oOpZns8jyTeGmNXrM55SM6TWsem3OoCs7S+b/p9hc3H maeUhGg2kScaRnXS/MmW2HzBdBJfgmu+JgAi5o4t2RW8CgtehXBbkrLZgc2BETbtYwOP tDDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding: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=A7MXYZbn8HezxUbkyKxmn/GlT0X7SaNXgZdkD5JJFA8=; b=frljZRpCdI8OLbv7l1QvncDwb4ZXU48nWT4hEtKTTRBoWtk+PxVkQYi0vg6rnE13G5 6EfwFuTRSJD7KjjR/XNDSev9V3lMaCN8iS5PFMbJpRKo30PF6yS4t/AfYGCkfqmXUHby nQAEMW/J/Ezq+jpBhP82qHWTsZJWNj7I/Jxy/IWLJu8uL63Ef3R87/JsReLr6pmxmMcT GSeUX+J8hLRsXo4Rm7vFvRdnsC3ChOSM5e1HJsCNczCi/14TMm8AIVCTSEef8ODKgUwA uQkTRU8BCjswbOZ7WQ932exBU16Ykikalw8UFmoMWvqdKZLvqS+dIbhmdDHZgYwcIjD/ HkYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=UTS59VZo; dkim=pass header.i=@codeaurora.org header.s=default header.b=UTS59VZo; 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 d8si615391pfb.349.2018.03.13.12.25.14; Tue, 13 Mar 2018 12:25:29 -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=UTS59VZo; dkim=pass header.i=@codeaurora.org header.s=default header.b=UTS59VZo; 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 S1752368AbeCMTYS (ORCPT + 99 others); Tue, 13 Mar 2018 15:24:18 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:33464 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751528AbeCMTYQ (ORCPT ); Tue, 13 Mar 2018 15:24:16 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C59E8607A2; Tue, 13 Mar 2018 19:24:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520969055; bh=J8Bnrtf4VPu4g027Gppd8xrtLMMrZ8sWTq1GFAR8n2I=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=UTS59VZoBVyANFJySmmqxi0ZwHrDkgthMToTnjp5Cz0ZoueqRz5S0lwIZfM6YBnZY mwuWkr06WYSa8+a0ts/2/Mf5NawvtMHWKe5QJkqB0+aWWdQKcmb7jCk4cGwK/hIytd Vk+jPzur4jcePU1Fdd9i+Vh60+lrYnrhz+Oc+AWk= 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 D5CC2600C1; Tue, 13 Mar 2018 19:24:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520969055; bh=J8Bnrtf4VPu4g027Gppd8xrtLMMrZ8sWTq1GFAR8n2I=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=UTS59VZoBVyANFJySmmqxi0ZwHrDkgthMToTnjp5Cz0ZoueqRz5S0lwIZfM6YBnZY mwuWkr06WYSa8+a0ts/2/Mf5NawvtMHWKe5QJkqB0+aWWdQKcmb7jCk4cGwK/hIytd Vk+jPzur4jcePU1Fdd9i+Vh60+lrYnrhz+Oc+AWk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D5CC2600C1 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 V2] Input: pm8941-pwrkey: add resin key capabilities To: Tirupathi Reddy , dmitry.torokhov@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <1520930158-5854-1-git-send-email-tirupath@codeaurora.org> From: Trilok Soni Message-ID: Date: Tue, 13 Mar 2018 12:24:14 -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: <1520930158-5854-1-git-send-email-tirupath@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tirupathi, On 3/13/2018 1:35 AM, Tirupathi Reddy wrote: > Add resin key support to handle different types of key events > defined in different platforms. Describe "resin"  in the commit text? or just call it same as power key or different purpose? > > +static irqreturn_t pm8941_resinkey_irq(int irq, void *_data) > +{ > + struct pm8941_pwrkey *pwrkey = _data; > + unsigned int sts; > + int error; > + > + error = regmap_read(pwrkey->regmap, > + pwrkey->baseaddr + PON_RT_STS, &sts); > + if (error) > + return IRQ_HANDLED; You may want to document here why you still return as IRQ_HANDLED on the error after reading the status register? > > + resin_irq = platform_get_irq_byname(pdev, "resin"); > + if (resin_irq < 0 && resin_irq != -ENXIO) { > + if (resin_irq != -EPROBE_DEFER) > + dev_err(&pdev->dev, "failed to get resin irq\n"); > + return resin_irq; > + } else if (resin_irq >= 0) { > + /* resin key capabilities are defined in device node */ > + error = pm8941_resin_key_init(pwrkey, resin_irq); > + if (error) { > + dev_err(&pdev->dev, "failed resin key initialization: %d\n", > + error); > + return error; > + } > + } > + Any reason you don't want to create different driver for "resin" key? Is this going to be physically different key on the platform? Please describe why it needs to be part of the power key driver. ---Trilok Soni -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project