From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756467Ab0IWUIP (ORCPT ); Thu, 23 Sep 2010 16:08:15 -0400 Received: from cantor.suse.de ([195.135.220.2]:42666 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756198Ab0IWUIO (ORCPT ); Thu, 23 Sep 2010 16:08:14 -0400 Date: Thu, 23 Sep 2010 22:08:12 +0200 Message-ID: From: Takashi Iwai To: Andrew Morton Cc: Samu Onkalo , =?UTF-8?B?w4lyaWM=?= Piel , Guenter Roeck , linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org Subject: Re: [PATCH v2] lis3: Add support for new LIS3DC / HP3DC chip In-Reply-To: <20100923124313.7794e8f6.akpm@linux-foundation.org> References: <20100923124313.7794e8f6.akpm@linux-foundation.org> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.1 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Thu, 23 Sep 2010 12:43:13 -0700, Andrew Morton wrote: > > On Thu, 23 Sep 2010 08:01:31 +0200 > Takashi Iwai wrote: > > > A new version of LIS3 chip has slight incompatibilities from former > > versions. This patch adds the minimal support for it. > > > > Signed-off-by: Takashi Iwai > > --- > > v1->v2 > > Rebased to patch "lis3: Fix Oops with NULL platform data (v2)" > > > > Wait. I did my own rebasing and came up with a different patch, with > two extra hunks: > > @@ -301,8 +311,9 @@ static irqreturn_t lis302dl_interrupt(in > wake_up_interruptible(&lis3_dev.misc_wait); > kill_fasync(&lis3_dev.async_queue, SIGIO, POLL_IN); > out: > - if (lis3_dev.pdata && lis3_dev.whoami == WAI_8B && lis3_dev.idev && > - lis3_dev.idev->input->users) > + if (lis3_dev.pdata && > + (lis3_dev.whoami == WAI_8B || lis3_dev.whoami == WAI_3DC) && > + lis3_dev.idev && lis3_dev.idev->input->users) > return IRQ_WAKE_THREAD; > return IRQ_HANDLED; > } > > and > > @@ -742,7 +762,7 @@ int lis3lv02d_init_device(struct lis3lv0 > * io-apic is not configurable (and generates a warning) but I keep it > * in case of support for other hardware. > */ > - if (dev->pdata && dev->whoami == WAI_8B) > + if (dev->pdata && (dev->whoami == WAI_8B || dev->whoami == WAI_3DC)) > thread_fn = lis302dl_interrupt_thread1_8b; > else > thread_fn = NULL; > > > Did you drop those changes deliberately? IMO, safer to drop these, so far. For platform-specific, the driver requires the initialization of some registers, and currently it's only for WAI_8B chips. WAI_3DC has incompatibilities and cannot use it as is. thanks, Takashi