Received: by 10.223.185.116 with SMTP id b49csp3879974wrg; Tue, 13 Feb 2018 09:06:51 -0800 (PST) X-Google-Smtp-Source: AH8x225332tItuBrBnxtEt7lkKdHO1LI4W7HalgKhYW0ekQ6ouMVShAdVtmHvVqcPu3k8XALqgX3 X-Received: by 10.101.101.149 with SMTP id u21mr1550453pgv.251.1518541611223; Tue, 13 Feb 2018 09:06:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518541611; cv=none; d=google.com; s=arc-20160816; b=RMXuKgjSPUkc9R16V63B0f81t8D1ut1KURI980WAC0UOiLgIXfitXI42KxmDRc9hn3 pLDwbcRqT4zdIQ9XZ/SM+rVxwlVqSAmzJux+92Wt4pLWFT2zCEZwmC/IaUh5Hc3FRNRj X/SyoD9dA1vVBl1GxxHTTi8z0/EW08AKV5tVN30i5M9pGdNI0IYD4o7mTGgPvchJ7QVS 7IJpRhV7mMEGKpjhPqmNdy8Q9OpLtPZ1KHltG9H7LM6nwxjKJbJQTbKLwIDJOMmqAm17 KAAzhMIS0fRSLE82SFzBWYns4XfwzIFJDXqL5ASH+4hDrKwFCaCyHa2Y0/rXl4WRepKn F6jg== 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=hybiQZtk65hEpv5C5EYHA3M6MfaPPW5PAi2dZCm2MWU=; b=u4cwPGQ1lAFzwsGi/8e8WR1IeImifgWwFrK40FbrURKJd5GR+f2Brym9swFaczDx65 24kHPzqLjaWmDekbvGlm08kcyTty3u+LSymRy2hgehjyPvMwqd8C+nKdwMA8rYTdKr9o VqMg1LwYwiy5EOljOyPCqp6UhyS8Vx2mpyrQR3DZgMgD5caxnB5C+SInCtJn1OD+h4hS 3jbH5XwwaZ6fBfuZ6WSYGEJ/a8FXyFfF/sg4NkvB7N0tiqGlg4ds9n0shfAQzuT9Dxoy AG8m1fSlfjir2RNpv4eXFVJS2XNj8ZeItU8kG+wwq+LaMQ7ZfDoBaTuQxghNStNY5Id4 mgrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NRVnGFmL; 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 c2-v6si1435603plk.770.2018.02.13.09.06.36; Tue, 13 Feb 2018 09:06:51 -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=NRVnGFmL; 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 S965576AbeBMREs (ORCPT + 99 others); Tue, 13 Feb 2018 12:04:48 -0500 Received: from mail-qt0-f172.google.com ([209.85.216.172]:46533 "EHLO mail-qt0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965481AbeBMRBj (ORCPT ); Tue, 13 Feb 2018 12:01:39 -0500 Received: by mail-qt0-f172.google.com with SMTP id u6so4358342qtg.13; Tue, 13 Feb 2018 09:01:38 -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=hybiQZtk65hEpv5C5EYHA3M6MfaPPW5PAi2dZCm2MWU=; b=NRVnGFmLJtjpgX7B6b1IM50pfqEK8s1kuUR462wNec6hc/HaLbMIZKf4XGsEWt2Y9f 5+r8pb2AdLteoJNzGtixAW/xTUAS9G9+dNjRA5W0lTCtjkHIVduYzkTmqgPkSYrs0knD yhl+188orz4HF3+RGSrFety6OwUH/+ZNXFd06X/v2+A+6TrJkzdlQoldrfvNPs7VyoxX W4coGJA199ME8rqVM/tg4uHG+55v6bRURUICNCcUNUJo7rL4mZ7PxJ5eL/QeZHqgSAnr r63zrKqol5yKLwyRoGJ5XDiURJsLfeQW5/IqGFadG8AwRvShZlZj1GNVQxWMcOGB2ejH tzyA== 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=hybiQZtk65hEpv5C5EYHA3M6MfaPPW5PAi2dZCm2MWU=; b=paoepRCTmaZcCrZDZ/X0Ul8bkFC8JIeUxmbMmWl9dlmTGIwZ7LQAgNEGt3+qnS5As6 plz1HwJvq2eG062ON9z/KJ+/SzdjmCDMqHflIzNDHP4UQFXbK/v/cl5JfqlRm8QlgsNQ eqrRdf/F5G6By4Fj2o4FU7+Dm0WZMJ4s2ZoegyMH7zCEcTzGOnNQdB6lutTjSyFOJKHo 825xH/lv9t0cmvXjFraI/X2n7AL17Qb619YX5iahwD/KFf/24ZWOYQ9zFqv4d7QJ6KRc 3gBoBogJu7XpTAU0zh0YYxLdsBlJOEDDNm8MhZOqjCXAijoyzLz5Q1KCpBtD82bQii6C aELQ== X-Gm-Message-State: APf1xPC/luSNpNt+2fPgCKoLmf7mdEVjISKEsavtfgY3tfChDMsNLBUj lQd0yfXX5EX5OXO+MJIrJZ7ynYd5/ic2DvTABRE= X-Received: by 10.200.22.170 with SMTP id r39mr2754647qtj.190.1518541298160; Tue, 13 Feb 2018 09:01:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.195.82 with HTTP; Tue, 13 Feb 2018 09:01:37 -0800 (PST) In-Reply-To: <20180213165023.xmzovx7fd3gdljxw@pali> References: <20180127133209.28995-1-pali.rohar@gmail.com> <20180128144509.pobnj7cayc4psgrj@pali> <20180131120348.azy25aqvn5wrdkeh@pali> <20180212153012.vffvjmz26ifyxbj5@pali> <20180213150004.5d2v7y7wwuure4io@pali> <20180213165023.xmzovx7fd3gdljxw@pali> From: Andy Shevchenko Date: Tue, 13 Feb 2018 19:01:37 +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 Tue, Feb 13, 2018 at 6:50 PM, Pali Roh=C3=A1r wro= te: > On Tuesday 13 February 2018 17:06:19 Andy Shevchenko wrote: >> On Tue, Feb 13, 2018 at 5:00 PM, Pali Roh=C3=A1r = wrote: >> > On Tuesday 13 February 2018 16:55:00 Andy Shevchenko wrote: >> >> On Mon, Feb 12, 2018 at 5:30 PM, Pali Roh=C3=A1r wrote: >> >> > On Wednesday 31 January 2018 14:27:51 Andy Shevchenko wrote: >> >> > Following table already exists in dell-smo8800.c file: >> >> > 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. >> > >> > Me neither. >> > >> >> 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 an= d >> >> check each files to check if it uses it or not. >> > >> > So what do you suggest now? >> >> Copy'n'paste and maintain two lists. >> Yes, it's not the ideal, but working solution. >> >> You may put a comment before each list to explain what the second does >> and tell a contributor to look at it and update if needed. > > I'm not maintainer of i2c-i801.ko, Jean Delvare & Wolfram Sang are. > Therefore instructing future contributors would be up to them. Right. But from ACPI prospective the proposed change is not okay by my opin= ion. How can I see what drivers are binding / relying on certain ACPI ID? More precisely, % git grep -n -w SMO8800 would be useless until one gets an idea to match against partial strings. > Jean, it is OK? >> > Having one file where it would be defined is a bad idea for you. >> >> Not just "one file", but "one *header* file". Or "exporting a symbol" >> which is basically not supposed to be exported. >> ID tables are part of the actual drivers, neither headers, nor libraries= . > > But this is exactly what is needed. This ACPI ID table contains ACPI > names which says if accelerometer is present or not. In case of dell-smo8800.c the driver actually *binds* to these IDs. Your change just provide another table to match and answer to the question if XYZ is present on a such platform or not. Similar approach is used in spi-pxa2xx.c (check pxa2xx_spi_pci_compound_mat= ch). --=20 With Best Regards, Andy Shevchenko