Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1124659imu; Fri, 9 Nov 2018 11:19:33 -0800 (PST) X-Google-Smtp-Source: AJdET5dOvrrDPML8HUDIgB51KSNbiE9yFRrjfBaRXhxSYmsHs5GcyGoEujCE/Ty+hdBJRxfm3g8b X-Received: by 2002:a62:8c93:: with SMTP id m141-v6mr10073514pfd.239.1541791173024; Fri, 09 Nov 2018 11:19:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541791172; cv=none; d=google.com; s=arc-20160816; b=w0rqvrgRCf/C1zN1H25MI9SAoMknfaYWoy+TUuzvsjzA47reHTR8Ks4YOCXgkP5CYb Xy2/bmCuTgOEHSxSQVFO87em9i0CuTczR2MSkQ7FkkkW76ri4de/6tw2wHWAtzjIfvXJ HBnqQxdCpA8rBXWnsi1iwV6SaBz5WSxfzeEk4PPtWE76VA02dOIuRovhIezaXqtmz9/Z f8FgegPoHBxBXQVXjdXCG4h6tSYVuCuTmdiuaHtUx03Mxv/HnJMKsO2KEJQJ3gPgbYqD m9O4Hbh0NL0+cLogzCv5LtfhwX8nqiKMlxnpyqHs1E6jMhlGFGygLMhzh2vdqMoo8n7z ZOyg== 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 :in-reply-to:references:mime-version; bh=XICA14UI71g5WSSzu52+pvjsWPsZjVA4DkvDIrZNcq8=; b=VAfzgPXmMv+C+ligmwcRE2SQ2i5f1a/UZcpHL8Oi13RexCXffuY02/d0m6+Y4X9G77 MB39WMPNLcHcJCxw47sXRQF9chKrr/d04y9SmoKcoYE4QbkYy+CG7yx4BxyUa8Z2yGNP T/Vnl41V3m7RsUpKA1TLFm9HasORYz+OVlsaZB17+Cy19QY/G1L2maTDY/ajvtv+7aMY ai4VxGP7mbhTN4Pl0OLHuw6vB1AM0Hkm6oqNL56HPbeO4e+bqJmM+7YJgUmqQPIkpyiu /7euJOYuEBTHTQ+q+lV63DtXGRtgZEBZBhHNjjz0UteRm6LfnpZCbnYsGYqcZ35A2eag LqtQ== 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 v15-v6si8514904pfd.125.2018.11.09.11.19.17; Fri, 09 Nov 2018 11:19:32 -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; 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 S1726110AbeKJFAo (ORCPT + 99 others); Sat, 10 Nov 2018 00:00:44 -0500 Received: from mail-ua1-f67.google.com ([209.85.222.67]:44699 "EHLO mail-ua1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725740AbeKJFAo (ORCPT ); Sat, 10 Nov 2018 00:00:44 -0500 Received: by mail-ua1-f67.google.com with SMTP id d19so1004949uaq.11; Fri, 09 Nov 2018 11:18:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XICA14UI71g5WSSzu52+pvjsWPsZjVA4DkvDIrZNcq8=; b=cIu1PmEEndbK5Vw6CksL19DFK3VS4INAAAG4iUSyGbagM0ouAJ5fSE24DqGMH1MWNN 3UDFwqRGffnEz20m7pCTZs10StkA7VMUhpYpKkrrOXFw2hTZc3bt55QG2kynhN8gx47p eA0pbLJnyKRmpE0y18vDotxqJVjkBK+83WTp410xwKHVTydVhufNTD0Yq+c+WRWn+sRN m3FqwYUYyzSY/pJM9OFkkYh1CFR/sLtqb4E7ZTdKj8nCo8Xtr1l3tZayZfgjMp054HlB zOfgGNbbSw28G3y1CLpWNgilzTx4j1+8DJSmW0yUvfxmLWE6pYK65hj2AofY4HC9X3HS xZwQ== X-Gm-Message-State: AGRZ1gIgnO/LfCAud5Epx/VRkpzga3Smupek9tByMtp1PSWdPe2eHi1f bhkhb1RZcuIRgK9N149A4bwJdhJ/F0XMQvkmwK8= X-Received: by 2002:ab0:210e:: with SMTP id d14mr4717819ual.20.1541791126402; Fri, 09 Nov 2018 11:18:46 -0800 (PST) MIME-Version: 1.0 References: <20181106183609.207702-1-sboyd@kernel.org> <20181106183609.207702-2-sboyd@kernel.org> <154161585170.88331.1822872519370217248@swboyd.mtv.corp.google.com> <154178275324.88331.16237880990995819011@swboyd.mtv.corp.google.com> In-Reply-To: <154178275324.88331.16237880990995819011@swboyd.mtv.corp.google.com> From: Geert Uytterhoeven Date: Fri, 9 Nov 2018 20:18:33 +0100 Message-ID: Subject: Re: [PATCH 1/4] of/device: Add a way to probe drivers by match data To: Stephen Boyd Cc: Rob Herring , Michael Turquette , Linux Kernel Mailing List , Linux ARM , linux-clk , linux-mediatek@lists.infradead.org, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Matthias Brugger , ryder.lee@mediatek.com, Frank Rowand 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 Hi Stephen, On Fri, Nov 9, 2018 at 5:59 PM Stephen Boyd wrote: > Quoting Geert Uytterhoeven (2018-11-09 01:56:01) > > On Wed, Nov 7, 2018 at 7:37 PM Stephen Boyd wrote: > > > Quoting Rob Herring (2018-11-06 12:44:52) > > > > On Tue, Nov 6, 2018 at 12:36 PM Stephen Boyd wrote: > > > int (*probe)(struct platform_device *pdev); > > > }; > > > > > > struct of_platform_driver_probe_func mtk_probes[] = { > > > mtk_probe1, > > > mtk_probe2, > > > mtk_probe3, > > > }; > > > > > > struct platform_driver mtk_driver = { > > > .of_probes = &mtk_probes; > > > .driver = { > > > .name = "mtk-foo"; > > > .of_match_table = mtk_match_table, > > > }, > > > }; > > > > This looks worse to me: people tend to be very good at keeping multiple > > arrays in sync :-( > > To be _not_ very good? Agreed, and so specifying the probe function as > another member in struct of_device_id seems to be the way to go. Correct, sometimes sarcasm doesn't arrive well at the other end of the electronic tunnel... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds