From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761165AbdACUVu (ORCPT ); Tue, 3 Jan 2017 15:21:50 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:33335 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751148AbdACUVg (ORCPT ); Tue, 3 Jan 2017 15:21:36 -0500 MIME-Version: 1.0 In-Reply-To: <201701031950.17389@pali> References: <1482843136-12838-1-git-send-email-pali.rohar@gmail.com> <20170103090641.GH5767@mail.corp.redhat.com> <20170103183843.GA16032@dtor-ws> <201701031950.17389@pali> From: Andy Shevchenko Date: Tue, 3 Jan 2017 22:20:12 +0200 Message-ID: Subject: Re: [PATCH] i2c: i801: Register optional lis3lv02d i2c device on Dell machines To: =?UTF-8?Q?Pali_Roh=C3=A1r?= Cc: Dmitry Torokhov , Benjamin Tissoires , =?UTF-8?B?TWljaGHFgiBLxJlwaWXFhA==?= , Jean Delvare , Wolfram Sang , Steven Honeyman , Valdis Kletnieks , Jochen Eisinger , Gabriele Mazzotta , Andy Lutomirski , Mario Limonciello , Alex Hung , Takashi Iwai , linux-i2c@vger.kernel.org, "linux-kernel@vger.kernel.org" , Platform Driver Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v03KLxtm018243 On Tue, Jan 3, 2017 at 8:50 PM, Pali Rohár wrote: > On Tuesday 03 January 2017 19:38:43 Dmitry Torokhov wrote: >> "IIRC both dell-smo8800 and lis3lv02d represent one HW device (that >> ST microelectronics accelerometer) but due to complicated HW >> abstraction and layers on Dell laptops it is handled by two drivers, >> one ACPI and one i2c." >> >> and that is the core of the issue. You have 2 drivers fighting over >> the same device. Fix this and it will all work. > > With my current implementation (which I sent in this patch), they are > not fighting. > > dell-smo8800 exports /dev/freefall (and nothing more) and lis3lv02d only > accelerometer device as lis3lv02d driver does not get IRQ number in > platform data. > >> As far as I can see hp_accel instantiates lis3lv02d and accesses it >> via ACPI methods, can the same be done for Dell? > > No, Dell does not have any ACPI methods. > And as I wrote in ACPI or DMI > is even not i2c address of device, so it needs to be specified in code > itself. And as I wrote there is still a way to provide it without hardcoding on model basis. > Really there is no other way... :-( -- With Best Regards, Andy Shevchenko