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]
Message-ID: <20121022155028.GA13791@core.coreip.homeip.net>
Date:	Mon, 22 Oct 2012 08:50:28 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Sourav Poddar <sourav.poddar@...com>
Cc:	tony@...mide.com, b-cousson@...com, linux-omap@...r.kernel.org,
	linux-kernel@...r.kernel.org, devicetree-discuss@...ts.ozlabs.org,
	linux-arm-kernel@...ts.infradead.org, linux-input@...r.kernel.org,
	Felipe Balbi <balbi@...com>,
	Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCHv2] Input: omap4-keypad: Add pinctrl support

Hi Sourav,

On Mon, Oct 22, 2012 at 06:43:00PM +0530, Sourav Poddar wrote:
> Adapt keypad to use pinctrl framework.
> 
> Tested on omap4430 sdp with 3.7-rc1 kernel.

I do not see anything in the driver that would directly use pinctrl. Is
there a better place to select default pin configuration; maybe when
instantiating platform device?

Thanks.

> 
> Cc: Felipe Balbi <balbi@...com>
> Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>
> Signed-off-by: Sourav Poddar <sourav.poddar@...com>
> ---
> v1->v2
> - Added "PROBE_DEFER" check 
>  drivers/input/keyboard/omap4-keypad.c |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
> index c05f98c..502b832 100644
> --- a/drivers/input/keyboard/omap4-keypad.c
> +++ b/drivers/input/keyboard/omap4-keypad.c
> @@ -31,6 +31,7 @@
>  #include <linux/input.h>
>  #include <linux/slab.h>
>  #include <linux/pm_runtime.h>
> +#include <linux/pinctrl/consumer.h>
>  
>  #include <linux/platform_data/omap4-keypad.h>
>  
> @@ -76,6 +77,7 @@ enum {
>  
>  struct omap4_keypad {
>  	struct input_dev *input;
> +	struct pinctrl	*pins;
>  
>  	void __iomem *base;
>  	unsigned int irq;
> @@ -298,6 +300,15 @@ static int __devinit omap4_keypad_probe(struct platform_device *pdev)
>  		goto err_release_mem;
>  	}
>  
> +	keypad_data->pins = devm_pinctrl_get_select_default(&pdev->dev);
> +	if (IS_ERR(keypad_data->pins)) {
> +		if (PTR_ERR(keypad_data->pins) == -EPROBE_DEFER)
> +			return -EPROBE_DEFER;
> +
> +		dev_warn(&pdev->dev, "did not get pins for keypad error: %li\n",
> +					PTR_ERR(keypad_data->pins));
> +		keypad_data->pins = NULL;
> +	}
>  
>  	/*
>  	 * Enable clocks for the keypad module so that we can read
> -- 
> 1.7.1
> 

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ