Received: by 10.223.185.116 with SMTP id b49csp3729741wrg; Tue, 13 Feb 2018 06:56:42 -0800 (PST) X-Google-Smtp-Source: AH8x225el4XDvLiVwXMrBgpa5GDO5r+1SsDckml2wRDbUTC+E2wm9ojmiZihZjOH4F5JOqu2MIss X-Received: by 2002:a17:902:5382:: with SMTP id c2-v6mr1357134pli.102.1518533802646; Tue, 13 Feb 2018 06:56:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518533802; cv=none; d=google.com; s=arc-20160816; b=Vqdwfl3g8EH2yAAxcwQ83yt2zCQq7c0VJ6SF9Z0U64MsR+NavtD1FVgjSKt3fCXjj3 WTEjBBfy0zKRQFp1dUdhs/qKoaVG9zHYUOcID4BQcbmEqylUZk1vIkF2vb0JOqMhwzXx QtKpPOEejTZEJ2+LlFMHoOFS9albjwGQlzh1JyIYWJn/1Si5dbbuHdD3qwGI6E2WArxz jrJqH4PF+24d8ABu3l8YZIHDxh5FkNhdjOaKsSxGyaMVfi45fUBxo410xxt6cdRxIpDY eTM8UiGO+P14PilvZxb3jsum5PDhwv5EafOlUS2xRINpl2nRgo8UE1J6OkR+UouFKwYa 0XUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=V53VRSymP2LvrV2St41NhzbZ+QskrWOnkvZv7yYQQ1E=; b=HvXJRvldg6zwWOIBK88iTp2Iw5ALZ7+POUVOAtF6pWCQQ6DOkuYL1v4whBG2G5NrJK fOvUCGJ+CTlXkTsOmShSm7UJzshgxUuccLz+WKLE9qAgsjDYPW1SWBVpyX5JlmBSLb6P iBJgAwTbLvVfVVxzsEzfUobo2GA3WSY00PwqpUYV/VlfKQzvYYnCL84p6eDQxYE/AGV2 8Vew2SjPiM/eB6PcrFdHDzE6VfP4GUq1I4ujgQ62beu2S+rRYyS1FZ3OTSHPJr9eQbQM 7+EkiRml9vMORq374A7KR5r2q/Cn11O/A7MItackC4AiXL8T0BDbLsTAVmTRqShY1OTx ng1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kwpb1GCI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9si4628717pgv.255.2018.02.13.06.56.27; Tue, 13 Feb 2018 06:56:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kwpb1GCI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965058AbeBMOzF (ORCPT + 99 others); Tue, 13 Feb 2018 09:55:05 -0500 Received: from mail-qk0-f181.google.com ([209.85.220.181]:34200 "EHLO mail-qk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935436AbeBMOzC (ORCPT ); Tue, 13 Feb 2018 09:55:02 -0500 Received: by mail-qk0-f181.google.com with SMTP id o7so8347876qkc.1; Tue, 13 Feb 2018 06:55:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=V53VRSymP2LvrV2St41NhzbZ+QskrWOnkvZv7yYQQ1E=; b=kwpb1GCIcbCUvymvWl+V2/M16F/EediTpvnZ7toL+viaZE+GW9pu9v+rqmJBmfsURg tEKX9XkMvHOO9fUnTiYKaTwbU5nsYbvu5jKksXEtH3g9MJNpflPmx0nItMPkdxLmTuQX H5dWltioG0XfESaeFjHoT91T0tEUfc9KWhYK21KBAWnX/I+3A9hvZVMpWDpl3ywU5e3d dKIZCSnOjJfW+5zEtuJnDmClODkZ2V72S6dd1YxzJ9pSjmWQ8AulDl8rMn/bz0VGOHF4 uQVIW2OWXrpW6vcwgKw/onDCkn3voyQtrFar45qesE+wyycUZCv3UyRwC6gGaITo2shx /+ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=V53VRSymP2LvrV2St41NhzbZ+QskrWOnkvZv7yYQQ1E=; b=nSVU25Tk1d6V6PNQEPwB1WvBdE/lchmXBDQOthZcJocaZsKKpS6Xd7qQHw0NriFORJ RyNlg1LmA5BwP1DrSQ/b/542SFpyG4CEXcr1PazYNvMlMTMq7VzRpvkgE+Vtl5TnAwuN QOLnahS0ST4aL+ALFabqkpMx9gAWoBhUEGjTS2diwRpOHacnsmVOuM0jB2moGzLhTQH6 737lXVZrpLPKs6z+9JvcTETqCDKoSJmk9YmbUH5qOodr/POrdIfVUqvY6A3ygqFIxykG ROW6r9HF32pmc0uOy4TexCZZcFG8Rhil/YdNPra77mEy4FAWdLuEe4WOkXjj75X/naoi /Lgw== X-Gm-Message-State: APf1xPAxLoDH33ucMVlcDqHWKANIUBxYnqG39CgG23cCZWnvKBo9Jbnl yF3hB7PecQpnCEHS79V71km5frkAkNdx2Q3coj0= X-Received: by 10.55.72.131 with SMTP id v125mr2224003qka.323.1518533701903; Tue, 13 Feb 2018 06:55:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.195.82 with HTTP; Tue, 13 Feb 2018 06:55:00 -0800 (PST) In-Reply-To: <20180212153012.vffvjmz26ifyxbj5@pali> References: <20180127133209.28995-1-pali.rohar@gmail.com> <20180128144509.pobnj7cayc4psgrj@pali> <20180131120348.azy25aqvn5wrdkeh@pali> <20180212153012.vffvjmz26ifyxbj5@pali> From: Andy Shevchenko Date: Tue, 13 Feb 2018 16:55:00 +0200 Message-ID: Subject: Re: [PATCH v2] i2c: i801: Register optional lis3lv02d i2c device on Dell machines To: =?UTF-8?Q?Pali_Roh=C3=A1r?= 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 12, 2018 at 5:30 PM, Pali Roh=C3=A1r wro= te: > On Wednesday 31 January 2018 14:27:51 Andy Shevchenko wrote: >> On Wed, Jan 31, 2018 at 2:03 PM, Pali Roh=C3=A1r = wrote: >> > On Sunday 28 January 2018 17:00:35 Andy Shevchenko wrote: >> >> On Sun, Jan 28, 2018 at 4:45 PM, Pali Roh=C3=A1r wrote: >> >> >> > ACPI device name is SMO8800, SMO8810, ... Will that acpi_dev_presen= t >> >> > function match only prefix and not exact string? >> >> >> >> OK, fair enough. >> >> >> >> Do we have more users of such pattern? >> > >> > I have not seen this ACPI pattern yet, so probably not. >> >> I see. So, my one concern is the implicit names of the devices. I >> would like rather to see >> >> ... acpi_device_id ... []=3D { >> {"SMO8800"}, >> {"SMO8810"}, >> ... >> {} >> }; > > Following table already exists in dell-smo8800.c file: > > static const struct acpi_device_id smo8800_ids[] =3D { > { "SMO8800", 0 }, > { "SMO8801", 0 }, > { "SMO8810", 0 }, > { "SMO8811", 0 }, > { "SMO8820", 0 }, > { "SMO8821", 0 }, > { "SMO8830", 0 }, > { "SMO8831", 0 }, > { "", 0 }, > }; > > MODULE_DEVICE_TABLE(acpi, smo8800_ids); > > Can we reuse it? > Maybe moving array smo8800_ids[] into some header file > (which one?) and statically inline it? Bad idea. > Or having it only in > dell-smo8800.c file and exporting its symbol? Even worse. > Or is there better idea? > > For sure I do not want to copy paste this table into another module and > maintaining two copies of this list. The copy is fine. Can you guarantee that those two lists would be always the same? I'm not. And besides that explicitly over implicitly is a really good thing. I would not like to grep for an ID followed by grepping include line and check each files to check if it uses it or not. --=20 With Best Regards, Andy Shevchenko