Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp158502imm; Mon, 2 Jul 2018 09:16:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdYzNpUq5e+KTPOV8m3DZ1b91CBIOEEyE+AqSjBxwG/wZzO+JbQy9X/qj2sDlcsbPumezus X-Received: by 2002:a62:35c1:: with SMTP id c184-v6mr26244636pfa.18.1530548185841; Mon, 02 Jul 2018 09:16:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530548185; cv=none; d=google.com; s=arc-20160816; b=QV6mbofJPx5JbX35TivxAFfqQ60woYit5VwuAxx6zcEskujT66l044UME021GVRpdg VxDVq6QL4XQ1BJCob1t7ympagrPum5nak3YQVjHgqA7H2BrwtDNWlsZ6G4Ne4MSy++PI Vml/ZsPepezEReOwkNAHgH2umzwjNZ87kJijFwetgOj5onZy1ninQwIiOVvVI5rGL7QB irwiURxR7hiYC0Ji78tgtTMkMdcb5dnrtFnrtKNpq58R5a6EfOsTXVNLElZmH5Aa0T3i c+5Gmn54NZXLrw1Qixrqi6DfE81Om25cy2FNWBg6BwgRXWplXZFVic1Cegm++ImXsEAG 2Yag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=znl0p4wiU8mYIqcHEL+H0pntEVA5MFSEniaA0RPaFWY=; b=jDFZzlWRu+QB5Epiflus51DlsmWak8SY/lYT5C/5hpm9XVCoI1I6BPMqMYj8VxT5Oa tP72L+hPGnjcC86NkHGaz4ruhvkeABXE+Y5QW3M6RYbcNhrtHIvVJh9G1dXtMBGZClND ZYvJBu+dwG1Dkz7i/qbcJ7+1l89ysN/o9UMIm4kNTXqNDxyzMt0y4c1fP0PA0qhFFtIO r4mE0f5hMICjyeNlgazrDKRBg8Ls00Jea3sZ9+cPog60p8pGSVLn2Vt31qX+8ONnFfOg YsJDbAJEvkADW3s7pPYhhwXmWhrZ8HyFNcdst15ing4rHZO+MilTu/EGhAUbniANh2+4 t97Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TXIXqccm; 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 l5-v6si17809415pls.360.2018.07.02.09.16.11; Mon, 02 Jul 2018 09:16:25 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TXIXqccm; 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 S1752788AbeGBQOE (ORCPT + 99 others); Mon, 2 Jul 2018 12:14:04 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:45732 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752228AbeGBQOC (ORCPT ); Mon, 2 Jul 2018 12:14:02 -0400 Received: by mail-ua0-f195.google.com with SMTP id z4-v6so9562214uao.12; Mon, 02 Jul 2018 09:14:02 -0700 (PDT) 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; bh=znl0p4wiU8mYIqcHEL+H0pntEVA5MFSEniaA0RPaFWY=; b=TXIXqccmkYqFS/rPjT+dxlA4MVMoSQzOYCvjQLlQemVDmX6WCZUtYzIUfImqSnSgkx iZPB5bTbgs+03sM6qXrr5x7BNTAXFOyqV/W1ku4TMy8E4UtAM7MqURbxv+n7hX2FmAf3 CP/Q4El76APadkS+cp+/kPHp0O8e7s7W2yuR3NsIMTpt9U5H9PzhjH6OEJyi1ZK3acJP pCaXmh3MJn2DxYeSNRDIVRQpCvwJFSeBY8gVxzTGhfoWUofiqZI4y2XIGbqd7rjYI4oA L65RQBZu8ANGLkUk6gTZWrksClaPVNJdQeurh6CMLKSK03UrT1yWG8P7+rCHGoZqj+G4 Pv7A== 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; bh=znl0p4wiU8mYIqcHEL+H0pntEVA5MFSEniaA0RPaFWY=; b=bhnNGW6iZzxT1tWD9C6jLqDYrFTz1BoUKIB2PsFLOxoSMBmr3E5agp7MPNtb+y4MRV DWnAS9YZSlTZG1mW7zSq98sMKuJKoMB8caNN/dpAzqLk49c+OgMEbPi9G+8zYsA4Q+yY SA65rvvNSJmnLSTu5C/kFEdLWQ+QV5CVbon83X9XDorAwF8s85iEiLfrPs080pULVWn6 LC1C+VLc3CjURWEy+IuGKiLh5m8vWfRolZDWCZL4RFzxrDkg4VQ1eeHP+YpixmWEgpiD rp4boqeAXQDQcKCYlfN0c1WjiJ6t3i7KMprkH0l3xRxPCTfhBmdyJBk/SeCU+SDMYjgz AGrw== X-Gm-Message-State: APt69E1G3z05tLIKbCpMENhxLWRSpLsFviwaZuJ3ar3lp1bWMO06tHtP I3UvLimsRFTCUnxM2Baw/VD5zTBrJY6hECfKPwQ= X-Received: by 2002:ab0:4c24:: with SMTP id l36-v6mr3586816uaf.199.1530548041751; Mon, 02 Jul 2018 09:14:01 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:2149:0:0:0:0:0 with HTTP; Mon, 2 Jul 2018 09:14:01 -0700 (PDT) In-Reply-To: References: From: Andy Shevchenko Date: Mon, 2 Jul 2018 19:14:01 +0300 Message-ID: Subject: Re: [PATCH 0/3] IIO: st_sensors_i2c: improve device enumeration To: Nikolaus Voss 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(). i2c_id_table should be removed from the module device table at least (though you may continue to use it internally in the driver). That's my understanding how it should be done. -- With Best Regards, Andy Shevchenko