From patchwork Wed May 19 10:01:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hennerich, Michael" X-Patchwork-Id: 100839 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4JA3uLI031812 for ; Wed, 19 May 2010 10:06:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754721Ab0ESKGU (ORCPT ); Wed, 19 May 2010 06:06:20 -0400 Received: from nwd2mail11.analog.com ([137.71.25.57]:4133 "EHLO nwd2mail11.analog.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752978Ab0ESKGU (ORCPT ); Wed, 19 May 2010 06:06:20 -0400 X-IronPort-AV: E=Sophos;i="4.53,262,1272859200"; d="scan'208";a="16823534" Received: from nwd2hubcas2.ad.analog.com ([10.64.73.30]) by nwd2mail11.analog.com with ESMTP; 19 May 2010 06:06:18 -0400 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS2.ad.analog.com (10.64.73.30) with Microsoft SMTP Server id 8.1.358.0; Wed, 19 May 2010 06:06:18 -0400 Received: from [10.44.2.88] ([10.44.2.88]) by zeus.spd.analog.com (8.14.1/8.14.1) with ESMTP id o4JA6Hhv026126; Wed, 19 May 2010 06:06:17 -0400 (EDT) Subject: Subject: [PATCH] AD7879: Fix spi word size From: Michael Hennerich Reply-To: michael.hennerich@analog.com To: dmitry.torokhov@gmail.com CC: linux-input@vger.kernel.org Organization: Analog Devices Inc. Date: Wed, 19 May 2010 12:01:14 +0200 Message-ID: <1274263274.6138.6.camel@mhenneri-D02.ad.analog.com> MIME-Version: 1.0 X-Mailer: Evolution 2.24.1.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 19 May 2010 10:06:21 +0000 (UTC) diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c index 794d070..ff490c0 100644 --- a/drivers/input/touchscreen/ad7879.c +++ b/drivers/input/touchscreen/ad7879.c @@ -715,6 +715,16 @@ static int __devinit ad7879_probe(struct spi_device *spi) return -EINVAL; } + if (spi->bits_per_word != 16) { + spi->bits_per_word = 16; + error = spi_setup(spi); + if (error) { + dev_dbg(&spi->dev, + "spi master doesn't support 16 bits/word\n"); + return error; + } + } + ts = kzalloc(sizeof(struct ad7879), GFP_KERNEL); if (!ts)