From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932840AbcL0WPj (ORCPT ); Tue, 27 Dec 2016 17:15:39 -0500 Received: from mail-oi0-f67.google.com ([209.85.218.67]:36103 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932451AbcL0WPb (ORCPT ); Tue, 27 Dec 2016 17:15:31 -0500 MIME-Version: 1.0 In-Reply-To: <201612271451.01505@pali> References: <1482843136-12838-1-git-send-email-pali.rohar@gmail.com> <21e8453f9ebd2955b2c5e499dc51efb0@the-dreams.de> <201612271451.01505@pali> From: Andy Shevchenko Date: Wed, 28 Dec 2016 00:15:30 +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: Wolfram Sang , Jean Delvare , Steven Honeyman , valdis.kletnieks@vt.edu, Jochen Eisinger , Gabriele Mazzotta , Andy Lutomirski , Mario Limonciello , Alex Hung , =?UTF-8?B?TWljaGHDheKAmiBLw4TihKJwaWXDheKAng==?= , Takashi Iwai , linux-i2c@vger.kernel.org, "linux-kernel@vger.kernel.org" , platform-driver-x86@vger.kernel.org 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 uBRMFhJN010521 On Tue, Dec 27, 2016 at 3:51 PM, Pali Rohár wrote: > On Tuesday 27 December 2016 14:43:49 Wolfram Sang wrote: >> > Dell platform team told us that some (DMI whitelisted) Dell >> > Latitude machines have ST microelectronics accelerometer at i2c >> > address 0x29. That >> > i2c address is not specified in DMI or ACPI, so runtime detection >> > without >> > whitelist which is below is not possible. >> >> I'd think this should rather live somewhere in >> drivers/platform/x86/dell*.c? > > i2c_new_device() with lis3lv02d for i801 i2c bus needs to be called > after initializing i2c-i801 bus driver. > > I have no idea how to do it (properly) outside of i2c-i801.c file. I doubt we need a single line of code for this. See [1] and perhaps create an EFI variable with necessary upgrade device node. > Same thing is done for Fujitsu machines, see function > i801_probe_optional_slaves() in i2c-i801.c file. So I did similar > approach for Dell machines. Perhaps, this also needs to be converted to use EFI variable. [1] https://lwn.net/Articles/693212/ -- With Best Regards, Andy Shevchenko