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, 27 Nov 2012 09:00:06 +0100
From:	Eric Bénard <eric@...rea.com>
To:	Sascha Hauer <s.hauer@...gutronix.de>
Cc:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Sascha Hauer <kernel@...gutronix.de>,
	Russell King <linux@....linux.org.uk>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ARM: eukrea_mbimx27-baseboard - use stock
 get_pendown_state() in ads7846

Le Tue, 27 Nov 2012 08:42:09 +0100,
Sascha Hauer <s.hauer@...gutronix.de> a écrit :

> On Sat, Nov 24, 2012 at 12:25:30AM -0800, Dmitry Torokhov wrote:
> > The default implementation matches exactly our custom one so we can switch
> > to using the default one. As a bonus the driver will take care of setting
> > GPIO line for us.
> > 
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> > ---
> > 
> > Not tested - no hardware, but should be fine.
> > 
> >  arch/arm/mach-imx/eukrea_mbimx27-baseboard.c | 19 +------------------
> >  1 file changed, 1 insertion(+), 18 deletions(-)
> > 
> > diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
> > index 98aef57..b20fc55 100644
> > --- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
> > +++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
> > @@ -238,24 +238,8 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
> >  	.flags = IMXUART_HAVE_RTSCTS,
> >  };
> >  
> > -#define ADS7846_PENDOWN (GPIO_PORTD | 25)
> > -
> > -static void __maybe_unused ads7846_dev_init(void)
> > -{
> > -	if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) {
> > -		printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
> > -		return;
> > -	}
> > -	gpio_direction_input(ADS7846_PENDOWN);
> > -}
> > -
> > -static int ads7846_get_pendown_state(void)
> > -{
> > -	return !gpio_get_value(ADS7846_PENDOWN);
> > -}
> > -
> >  static struct ads7846_platform_data ads7846_config __initdata = {
> > -	.get_pendown_state	= ads7846_get_pendown_state,
> > +	.gpio_pendown		= (GPIO_PORTD | 25),
> 
> Please use IMX_GPIO_NR(4, 25) instead. Otherwise this looks ok.
> 
> Eric, ok with you?
> 
seems fine.

Eric

--
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