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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160804150534.GC5154@x1>
Date:	Thu, 4 Aug 2016 16:05:34 +0100
From:	Lee Jones <lee.jones@...aro.org>
To:	patrice.chotard@...com
Cc:	linus.walleij@...aro.org, gnurou@...il.com,
	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, maxime.coquelin@...com,
	amelie.delaunay@...com, shawnguo@...nel.org, kernel@...gutronix.de,
	dinguyen@...nsource.altera.com, vireshk@...nel.org,
	shiraz.linux.kernel@...il.com, thierry.reding@...il.com,
	marcel.ziswiler@...adex.com, stefan@...er.ch, dev@...xeye.de
Subject: Re: [PATCH v2 05/10] mfd: stmpe: use generic bit mask name

On Thu, 28 Apr 2016, patrice.chotard@...com wrote:

> From: Patrice Chotard <patrice.chotard@...com>
> 
> In order to prepare the ground to STMPE1600,
> as STMPE1600's SYS_CTRL register has the same layout as
> STMPE801 variant, unify STMPExxx_REG_SYS_CTRL_RESET/INT_EN/INT_HI
> bit masks to more generic STMPE_SYS_CTRL_RESET/INT_EN/INT_HI
> 
> Signed-off-by: Patrice Chotard <patrice.chotard@...com>
> ---
>  drivers/mfd/stmpe.c | 4 ++--
>  drivers/mfd/stmpe.h | 6 ++----
>  2 files changed, 4 insertions(+), 6 deletions(-)

Acked-by: Lee Jones <lee.jones@...aro.org>

> diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
> index af682d0..2556463 100644
> --- a/drivers/mfd/stmpe.c
> +++ b/drivers/mfd/stmpe.c
> @@ -1089,7 +1089,7 @@ static int stmpe_chip_init(struct stmpe *stmpe)
>  
>  	if (stmpe->irq >= 0) {
>  		if (id == STMPE801_ID)
> -			icr = STMPE801_REG_SYS_CTRL_INT_EN;
> +			icr = STMPE_SYS_CTRL_INT_EN;
>  		else
>  			icr = STMPE_ICR_LSB_GIM;
>  
> @@ -1103,7 +1103,7 @@ static int stmpe_chip_init(struct stmpe *stmpe)
>  		if (irq_trigger == IRQF_TRIGGER_RISING ||
>  				irq_trigger == IRQF_TRIGGER_HIGH) {
>  			if (id == STMPE801_ID)
> -				icr |= STMPE801_REG_SYS_CTRL_INT_HI;
> +				icr |= STMPE_SYS_CTRL_INT_HI;
>  			else
>  				icr |= STMPE_ICR_LSB_HIGH;
>  		}
> diff --git a/drivers/mfd/stmpe.h b/drivers/mfd/stmpe.h
> index 4ae343d..4ba1123 100644
> --- a/drivers/mfd/stmpe.h
> +++ b/drivers/mfd/stmpe.h
> @@ -105,6 +105,8 @@ int stmpe_remove(struct stmpe *stmpe);
>  #define STMPE_ICR_LSB_GIM	(1 << 0)
>  
>  #define STMPE_SYS_CTRL_RESET	(1 << 7)
> +#define STMPE_SYS_CTRL_INT_EN	(1 << 2)
> +#define STMPE_SYS_CTRL_INT_HI	(1 << 0)
>  
>  /*
>   * STMPE801
> @@ -121,10 +123,6 @@ int stmpe_remove(struct stmpe *stmpe);
>  #define STMPE801_REG_GPIO_SET_PIN	0x11
>  #define STMPE801_REG_GPIO_DIR		0x12
>  
> -#define STMPE801_REG_SYS_CTRL_RESET	(1 << 7)
> -#define STMPE801_REG_SYS_CTRL_INT_EN	(1 << 2)
> -#define STMPE801_REG_SYS_CTRL_INT_HI	(1 << 0)
> -
>  /*
>   * STMPE811
>   */

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ