lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 13 Mar 2018 12:24:14 -0700
From:   Trilok Soni <tsoni@...eaurora.org>
To:     Tirupathi Reddy <tirupath@...eaurora.org>,
        dmitry.torokhov@...il.com, robh+dt@...nel.org, mark.rutland@....com
Cc:     linux-input@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] Input: pm8941-pwrkey: add resin key capabilities

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ