Received: by 10.223.185.116 with SMTP id b49csp2298253wrg; Mon, 12 Feb 2018 07:32:16 -0800 (PST) X-Google-Smtp-Source: AH8x227YwgQq9TB2CDmYKfXZSAYLqISzldadv7if6Bh4lbtaly6eEf7B7cn2mDtREI+fd7clAceA X-Received: by 10.99.127.86 with SMTP id p22mr8743044pgn.157.1518449536536; Mon, 12 Feb 2018 07:32:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518449536; cv=none; d=google.com; s=arc-20160816; b=iMRrBeYp0UV6WYGuH3adVAf8iz0krVUuFL0Ex0IutDNx+Pu4AY3mqfJ8z9DKs/RTZi WhYEwfSrL+N6bUWn/YSKnZ1XB4ITuMKwSFajG+1R7ArpnNq+uZg0Gm+0keql5nZXHn2G wuQC29dBFj+G+KdzCwNV3FRm+M4YfbNkc/90ftP+GKhvQfHVPyOjBimy8mv6kMszSyVI p8CZL594jI1yNOsyqvzWMWbm6MPTo0VlxNI/AEcH3VSc0RuDVg3gvXhMBuoWvqhv91my zIQZ9JhQUKp1Jr7q4+ebg5KUdO0T2TN/A71DZgRCq+9Rvl1DEuDVtuOm5WNByZ+nE2N2 tCMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=pdMvY3JxojXwfE2bXcOS5jnP3niSSA1oMEhdwzGGo/4=; b=i/DEumxF3Dcbp2ojKr8j5hNI4HuOE/3wblT3jRz25+I04mphMLNBSr+VMBuz0WB1mw gkUZjor/itVV+1sDDqVQ+ncLiTSTXTLjw0Vh7cwuoOm1lApUrVNbnJ8UBQjvKfdUWP+L 39y30iX02DSNc/LGSiGJ92yBvgh5+EfHBjR7aWG4wiCaSSuVyk4VCM6P1YQDha8sRHfE qT7kkGQe1uA+yxpue996jyaD/sZN5SO3gRYHJtiWMGkKMve1jz+81s3yg6XfzwLnkEHl 5BQ7/IS2XJ9h5exA3PkgPR+QpNdaGMJaM13InDZmNSOz0+XRhhgKbVRQCHjy7nySC1Jz HD+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RPTmCxj3; 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 y22-v6si5898033pll.53.2018.02.12.07.32.01; Mon, 12 Feb 2018 07:32:16 -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=RPTmCxj3; 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 S1753487AbeBLPaS (ORCPT + 99 others); Mon, 12 Feb 2018 10:30:18 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:37670 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752281AbeBLPaP (ORCPT ); Mon, 12 Feb 2018 10:30:15 -0500 Received: by mail-wm0-f67.google.com with SMTP id v71so10673712wmv.2; Mon, 12 Feb 2018 07:30:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=pdMvY3JxojXwfE2bXcOS5jnP3niSSA1oMEhdwzGGo/4=; b=RPTmCxj3SjKVB/pPDDGer/C7rskKlIvJDa2Bts1abWwp3QLFzXHXQleNqGITEQ4PkD V6fARL89sZi859QecJhR49i7kwmoKBZqE0I2tzNhE/nrkpHNxJ2lBMAbisQLZsmqH9cn NA7IMEjisLNRLSUfHPifxpVtfUGPJ8Gp2Ag1xpP+4JbeD5Xzmm+NdNUVsKVqVblrF3cd mo9xOq8BRyd6fcWSWLjwFj/8a+vqA3Us43TFZECUyUJ4IsgXm9rJmJy/foZ3bPA2IgRe ECrMYATA2a03R91cusDTw//UOKulC5aTV2513NlSWe4XseLty3E/jEnmJaV2WaQQMLsc 0qgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=pdMvY3JxojXwfE2bXcOS5jnP3niSSA1oMEhdwzGGo/4=; b=lKThh62a/B8x1MmIW9NGOZPd6C7VQRPmIkBK7yGskGbAk3ir5NkfegkNUOWhQ3+DrE 08ObKWyYm+4cz6S/+9CJDQXPjLpFfQx0fsMgafoIre7BinnXeuovtYjh6sk/rs819uvg GfW1mkyF/fL/d4UbCmuYcJESyYD5ZKGUdmZrh4Nw/a6al8piSdc9EJUFsKIKDItnk2ic Nf75EOxUNRBfms/Z3thv3ZN/iPkXUeZfQVKznrVQ6mNGupg28RwhmXe8Z4Z31bTYIDvY iB4cSoKOq2FhUE4M9tHjxGI0gFZpysZszlg2KjSr5Luyzwd3+lY0zAQ7NoTEUVkzgGjL H8vQ== X-Gm-Message-State: APf1xPBgF4S7bsPKfzUDiNQIENo9AWpsRBQ4AriIR4G0fXqNrFX/+AHX avpFYuyIjx5iJpgvS0+xECU= X-Received: by 10.28.141.212 with SMTP id p203mr4173256wmd.39.1518449414210; Mon, 12 Feb 2018 07:30:14 -0800 (PST) Received: from pali ([2a02:2b88:2:1::5cc6:2f]) by smtp.gmail.com with ESMTPSA id v72sm6157969wmd.12.2018.02.12.07.30.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2018 07:30:13 -0800 (PST) Date: Mon, 12 Feb 2018 16:30:12 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= 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 Subject: Re: [PATCH v2] i2c: i801: Register optional lis3lv02d i2c device on Dell machines Message-ID: <20180212153012.vffvjmz26ifyxbj5@pali> References: <20180127133209.28995-1-pali.rohar@gmail.com> <20180128144509.pobnj7cayc4psgrj@pali> <20180131120348.azy25aqvn5wrdkeh@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 31 January 2018 14:27:51 Andy Shevchenko wrote: > On Wed, Jan 31, 2018 at 2:03 PM, Pali Rohár wrote: > > On Sunday 28 January 2018 17:00:35 Andy Shevchenko wrote: > >> On Sun, Jan 28, 2018 at 4:45 PM, Pali Rohár wrote: > > >> > ACPI device name is SMO8800, SMO8810, ... Will that acpi_dev_present > >> > 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 ... []= { > {"SMO8800"}, > {"SMO8810"}, > ... > {} > }; Following table already exists in dell-smo8800.c file: static const struct acpi_device_id smo8800_ids[] = { { "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? Or having it only in dell-smo8800.c file and exporting its symbol? 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. -- Pali Rohár pali.rohar@gmail.com