From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750948AbcL1ODH (ORCPT ); Wed, 28 Dec 2016 09:03:07 -0500 Received: from sauhun.de ([89.238.76.85]:58324 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750796AbcL1ODF (ORCPT ); Wed, 28 Dec 2016 09:03:05 -0500 To: =?UTF-8?Q?Pali_Roh=C3=A1r?= Subject: Re: [PATCH] i2c: i801: Register optional lis3lv02d i2c device on Dell machines X-PHP-Originating-Script: 0:main.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 28 Dec 2016 15:02:52 +0100 From: Wolfram Sang Cc: Jean Delvare , Steven Honeyman , , Jochen Eisinger , Gabriele Mazzotta , Andy Lutomirski , , Alex Hung , =?UTF-8?Q?Micha=C3=85=E2=80=9A_K=C3=84?= =?UTF-8?Q?=E2=84=A2pie=C3=85=E2=80=9E?= , Takashi Iwai , , , In-Reply-To: <201612271451.01505@pali> References: <1482843136-12838-1-git-send-email-pali.rohar@gmail.com> <21e8453f9ebd2955b2c5e499dc51efb0@the-dreams.de> <201612271451.01505@pali> Message-ID: <6acf42bfb16eaa0e69ca322eb0c0853d@the-dreams.de> User-Agent: Roundcube Webmail/0.7.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 27, 2016 at 02:51:01PM +0100, 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 once used bus_notifiers to achieve something similar. You could check arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c to see an action triggered once a client device got added, but you could act on another action like BUS_NOTIFY_BOUND_DRIVER. I used exactly that, too, somewhen somewhere. Haven't checked if that helps here, too. And since we have a precedence (Fujitsu case), I'll leave it to Jean who is the maintainer of this driver. Thanks, Wolfram