Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp17762imm; Thu, 20 Sep 2018 13:19:14 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYgd6YyVvFw4DjIleOL/Jb0k7PSpDXLUIxD/S05z96FyEmWlLBKTWZdmCI9mGNeJQlUGrrs X-Received: by 2002:a63:3c5c:: with SMTP id i28-v6mr38118939pgn.415.1537474754435; Thu, 20 Sep 2018 13:19:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537474754; cv=none; d=google.com; s=arc-20160816; b=HTbJlzHyyMxs+U8KmituJHhF1qiyGw7JDYtzhBEaOUU0xgj3XUAyPaDKC8Wl5q3LD9 Ku4g1FNc6p3Ufdks8cpM4DnDk2mZ1Dn77LnKXW9mpkecydi24m3hqzhWVNs17orgjfi4 6di3TGToo2QXbPewvnHVrubJbITUvfV2cFLvpMIQY+wNuuSC8cDGG4cOz6rjQ1a5CPMc n6Dj8+IoKje4c6U64vnr1Bak6CVTDNRV2ZNHtElcZSrkQrFAeCmib613xCyRJmJLCBMf 3qKOASIKfpjq8+1jNbSsmTFQVSoVcLCDFO3SYhoq+Fc8N1V+owgeJaExK9dmbnCmGZ3u Y2eA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=5+ZkWLtV702JfDWCdFIc46E5fy2SD90sel1AAT2/6ww=; b=y7tmhKrtekL5JQOO/L+ZHtKUXCcCkOEynPVgji1UKknmPDy8dymgPaM9uQ/qL2xnDB 1Cuf9EKYyVZ51QM8RR59qv6FLlOl3kzNrPs4DBLmxqCG193mwIh8SL5zPHfNBwUNUAgE QOYCESontqNp1JFaDhOTTKmasCvOhCowpn/dyeIgLmY1/7N6y7ztB12XRrRX2UvuS9HK V3ZlMCxW0NBhYLfv4afhVd+0g87ZbNO5Ngf6kML6r+vQ+ia4TEx7xBi2o64JzrEFJ6Gb Q3FgGgBCbrGC4TWzI90roa3EEtRbIPTmkEt9q0pjQe+5FbGFFkEKWTb54eyxDTjv4z8D 7QQw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si24755001pfx.293.2018.09.20.13.18.57; Thu, 20 Sep 2018 13:19:14 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731592AbeIUCDs (ORCPT + 99 others); Thu, 20 Sep 2018 22:03:48 -0400 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:36028 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726128AbeIUCDs (ORCPT ); Thu, 20 Sep 2018 22:03:48 -0400 Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2001:1bc8:1a6:d3d5::80:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id 6C1BB634C7F; Thu, 20 Sep 2018 23:18:34 +0300 (EEST) Received: from sakke by valkosipuli.localdomain with local (Exim 4.89) (envelope-from ) id 1g35PG-0000TZ-7J; Thu, 20 Sep 2018 23:18:34 +0300 Date: Thu, 20 Sep 2018 23:18:34 +0300 From: Sakari Ailus To: Laurent Pinchart Cc: Ricardo Ribalda Delgado , Pavel Machek , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Hans Verkuil Subject: Re: [PATCH v2 4/4] [media] ad5820: Add support for of-autoload Message-ID: <20180920201833.2d2skjn7fkrbdsqx@valkosipuli.retiisi.org.uk> References: <20180920161912.17063-4-ricardo.ribalda@gmail.com> <20180920183151.2933-1-ricardo.ribalda@gmail.com> <2401971.XiI38RXFgU@avalon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2401971.XiI38RXFgU@avalon> 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 Hi Laurent, On Thu, Sep 20, 2018 at 11:10:23PM +0300, Laurent Pinchart wrote: > > +MODULE_DEVICE_TABLE(of, ad5820_of_table); > > + > > static SIMPLE_DEV_PM_OPS(ad5820_pm, ad5820_suspend, ad5820_resume); > > > > static struct i2c_driver ad5820_i2c_driver = { > > .driver = { > > .name = AD5820_NAME, > > .pm = &ad5820_pm, > > + .of_match_table = ad5820_of_table, > > As the driver doesn't depend on CONFIG_OF, would it make sense to use > of_config_ptr() (and to compile the of table conditionally on CONFIG_OF) ? You get ACPI support as a bonus if you don't use of_config_ptr(). :-) Other changes could be needed but this enables probing the driver for a device. In this case the probability of anyone using this device on an ACPI system could be pretty low though. -- Regards, Sakari Ailus e-mail: sakari.ailus@iki.fi