From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pali =?utf-8?B?Um9ow6Fy?= Subject: Re: [PATCH v2] i2c: i801: Register optional lis3lv02d i2c device on Dell machines Date: Wed, 31 Jan 2018 13:03:48 +0100 Message-ID: <20180131120348.azy25aqvn5wrdkeh@pali> References: <20180127133209.28995-1-pali.rohar@gmail.com> <20180128144509.pobnj7cayc4psgrj@pali> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: Sender: platform-driver-x86-owner@vger.kernel.org To: Andy Shevchenko Cc: Jean Delvare , Wolfram Sang , =?utf-8?B?TWljaGHFgiBLxJlwaWXFhA==?= , Steven Honeyman , Valdis Kletnieks , Jochen Eisinger , Gabriele Mazzotta , Andy Lutomirski , Mario Limonciello , Alex Hung , Takashi Iwai , linux-i2c , Linux Kernel Mailing List , Platform Driver List-Id: linux-i2c@vger.kernel.org On Sunday 28 January 2018 17:00:35 Andy Shevchenko wrote: > On Sun, Jan 28, 2018 at 4:45 PM, Pali Roh=C3=A1r w= rote: > > On Sunday 28 January 2018 16:39:25 Andy Shevchenko wrote: > >> On Sat, Jan 27, 2018 at 3:32 PM, Pali Roh=C3=A1r wrote: > >> > +static bool is_dell_system_with_lis3lv02d(void) > >> > +{ > >> > >> > + /* > >> > + * Check that ACPI device SMO88xx exists and is enabled. Tha= t ACPI > >> > + * device represent our ST microelectronics lis3lv02d accele= rometer but > >> > + * unfortunately without any other information (like i2c add= ress). > >> > + */ > >> > >> Isn't it simple > >> > >> return acpi_dev_present("SMO88", NULL, -1); > >> > >> call? > > > > ACPI device name is SMO8800, SMO8810, ... Will that acpi_dev_present > > function match only prefix and not exact string? >=20 > OK, fair enough. >=20 > Do we have more users of such pattern? I have not seen this ACPI pattern yet, so probably not. --=20 Pali Roh=C3=A1r pali.rohar@gmail.com