From: Trilok Soni <tsoni@codeaurora.org>
To: Tirupathi Reddy <tirupath@codeaurora.org>,
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
Subject: Re: [PATCH V2] Input: pm8941-pwrkey: add resin key capabilities
Date: Tue, 13 Mar 2018 12:24:14 -0700 [thread overview]
Message-ID: <dff22ba9-2b83-9861-e7f2-700a10fdbcdf@codeaurora.org> (raw)
In-Reply-To: <1520930158-5854-1-git-send-email-tirupath@codeaurora.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
next prev parent reply other threads:[~2018-03-13 19:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 8:35 [PATCH V2] Input: pm8941-pwrkey: add resin key capabilities Tirupathi Reddy
2018-03-13 19:24 ` Trilok Soni [this message]
2018-03-14 2:40 ` Bjorn Andersson
2018-03-14 16:43 ` Dmitry Torokhov
2018-03-15 8:10 ` Tirupathi Reddy T
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dff22ba9-2b83-9861-e7f2-700a10fdbcdf@codeaurora.org \
--to=tsoni@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=tirupath@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).