Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp876479imm; Tue, 3 Jul 2018 01:19:45 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI0pG4x3IvbE1g1d2Zp6hBhguSqQeSRnMa8nTOVIVHdt2jc48bgXwUXVWGWaLfXzN803RNE X-Received: by 2002:a17:902:b40f:: with SMTP id x15-v6mr29353129plr.270.1530605984949; Tue, 03 Jul 2018 01:19:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530605984; cv=none; d=google.com; s=arc-20160816; b=gCazNZDLrdj+N02pFx7YSsuOM/mLl1MyeSWIthxApxnM65VLZgV0i/SXNQTAxOnCKG m/EKWZP4uyNMz0GdeC3s+VA+2XPJrf7rSmrmdp+k1BU/9xxlC8uUMUBEnxNEK/K5C7lO qYNE8FM93Vs5Q04eLtq3mQfZP6BAda/a0S9MgVzt9a6aBVe9HMuKHb1t35ugndYgywps +Kecnil8BJD5ZsB8ABU3GcfapkfsUKM/3alRJVzh8AdQoYjciKju5AW2QWe2RrQ1NmUi 5JKUcaFoW4hV/5IODIrCvbsRk/DKcvCw0fXTGV0HJ2Cn0xRyMoiDPi+eVIRg3Cjd1RNK UfvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=a5697z7/vACH57UbRYXCQpVf6IT73y3fGK4UWldxaag=; b=hoAlExhnHtl86t0BQuTGdYj9BHtnVDruYEJQ1CB/koLN/Xk0X4i2U69JloJhXqDOrK ds1pOJ66kdoyw+BvwspmO519DLDwMZjqpay893FcsHmhf+yYm10nF5DJglJ2in0dCSDV 4IFAMOaVCBmdcvhtVMNFyZblFU2g0300trRkqrpa2MrxFlCSSSaKJsnTJd7iWfuQSsPg n58yXyCKz++OCW5QK6GDtzAvzFwd0GWMcfmOXdbQRxiVOykeHPWje4b4hiJZWa32/coE +Pqk/O5YnPEDHCLSzy24Z3kdjcmkLSwJLrCURBsGt9QOTDPzhAodFCtJg77kpftan5B4 E34A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y21-v6si589745pfm.1.2018.07.03.01.19.29; Tue, 03 Jul 2018 01:19:44 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933596AbeGCISs (ORCPT + 99 others); Tue, 3 Jul 2018 04:18:48 -0400 Received: from mail.steuer-voss.de ([85.183.69.95]:56220 "EHLO mail.steuer-voss.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932338AbeGCISq (ORCPT ); Tue, 3 Jul 2018 04:18:46 -0400 X-Virus-Scanned: Debian amavisd-new at mail.steuer-voss.de Received: by mail.steuer-voss.de (Postfix, from userid 1000) id 013BC41C0D; Tue, 3 Jul 2018 10:18:41 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.steuer-voss.de (Postfix) with ESMTP id E591B41C0C; Tue, 3 Jul 2018 10:18:41 +0200 (CEST) Date: Tue, 3 Jul 2018 10:18:41 +0200 (CEST) From: Nikolaus Voss X-X-Sender: nv@fox.voss.local To: Andy Shevchenko cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Lorenzo Bianconi , Linus Walleij , Xiongfeng Wang , "linux-iio@vger.kernel.org" , Linux Kernel Mailing List , nv@vosn.de Subject: Re: [PATCH 0/3] IIO: st_sensors_i2c: improve device enumeration In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2 Jul 2018, Andy Shevchenko wrote: > On Mon, Jul 2, 2018 at 9:41 AM, Nikolaus Voss > wrote: >> On Fri, 29 Jun 2018, Andy Shevchenko wrote: >> >>> I'm not sure I understand how ->probe_new() is supposed to work >>> against i2c_id_table, but I don't care for legacy platform data >>> anyway. >>> >>> What I would like to point to is device_get_match_data() API which >>> should simplify / unify the case how you get driver data. >> >> >> This driver doesn't need any driver data/ platform_data beyond the >> i2c_id_table name (which has already been matched when probe()/ probe_new() >> is called), so strictly neither of_match_table nor apci_match_table would be >> necessary, because i2c DT/ ACPI enumeration also matches against i2c_table >> names. > > Looking at the code I see still calls to acpi_match_data() and of_match_data(). > Instead nowadays better to use device_get_match_data(). You are completely right, sorry. I rewrote and reposted the patch. > i2c_id_table should be removed from the module device table at least > (though you may continue to use it internally in the driver). As I understand it, it is still necessary to make i2c_register_board_info() work. Niko