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: <544AC56F16B56944AEC3BD4E3D5917712E568A07DD@LIMKCMBX1.ad.analog.com>
Date:	Thu, 6 May 2010 12:18:35 +0100
From:	"Hennerich, Michael" <Michael.Hennerich@...log.com>
To:	Oskar Schirmer <os@...ix.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>
CC:	Mike Frysinger <vapier@...too.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Daniel Glöckner <dg@...ix.com>,
	Oliver Schneidewind <osw@...ix.com>
Subject: RE: [PATCH] ad7877: fix spi word size to 16 bit

Oskar Schirmer wrote on 2010-05-06:
> With no word size given in the users platform data, a generic spi host
> controller driver will assume a default word size of eight bit. This
> causes transmission to be performed bytewise, which will fail on
> little endian machines for sure. Failure on big endian depends on
> usage of slave select to mark word boundaries.
>
> Anyway, ad7877 is specified to work with 16 bit per word, so
> unconditionally set the word size accordingly.
>
> Signed-off-by: Oskar Schirmer <os@...ix.com>
> Signed-off-by: Daniel Glöckner <dg@...ix.com>
> Signed-off-by: Oliver Schneidewind <osw@...ix.com>

Acked-by: Michael Hennerich <michael.hennerich@...log.com>

> ---
>  drivers/input/touchscreen/ad7877.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> diff --git a/drivers/input/touchscreen/ad7877.c
> b/drivers/input/touchscreen/ad7877.c index e019d53..92acd85 100644 ---
> a/drivers/input/touchscreen/ad7877.c +++
> b/drivers/input/touchscreen/ad7877.c @@ -669,6 +669,8 @@ static int
> __devinit ad7877_probe(struct spi_device *spi)
>               dev_dbg(&spi->dev, "SPI CLK %d Hz?\n",spi->max_speed_hz);
>               return -EINVAL;
>       }
> +     spi->bits_per_word = 16;
> +     spi_setup(spi);
>
>       ts = kzalloc(sizeof(struct ad7877), GFP_KERNEL);
>       input_dev = input_allocate_device();

Greetings,
Michael

Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 4036 Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ