Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1975695ybl; Thu, 9 Jan 2020 04:56:34 -0800 (PST) X-Google-Smtp-Source: APXvYqxt6x/Qk3DGZcIEaEhZkyL2iSwadWTXP53qGiZnSiQ9P7fVk7hgW2Pzq3/3hUmBmDVbm/bp X-Received: by 2002:aca:ab0e:: with SMTP id u14mr3054289oie.1.1578574594712; Thu, 09 Jan 2020 04:56:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578574594; cv=none; d=google.com; s=arc-20160816; b=AW03+sFcwrSubiTv2SxDzEt11IkzYjbDTSpEHnZYw6kRlENcpyYlPzf8OMcenimUpC a9By65irmwUt1TCvciTeWsGqhtgySxVzK8l7AoSh420MpI4s4XAvPhcMWuIFq6evbUWt 4C7u0RCPUF9kaL6ExY22ndfWt/EbRcdJnnFj3LGuf2a1Bf0xkB9+8oriwW1Vw4TVo7XD 8PKYA40ANO01Zq4nQWBKmEButtKk5a7YFCDDGMExU4y2ejKshJJmqUZLnHl6BSLPATz6 SzSLJrv2XBRkEcVS8UOLSr/Nb16fqla/E2q8rJuMMh4Y7+VeBuH2aKClysGYshlXdvi/ yeQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=umKhAMsj5+h65Rldy121Sf7DdZkdNX0RceiEtj7Wh+E=; b=Lt0ub3V74FmBhIZ/eCVNiBeHiWebIIb9lIIiFsWjnLvujPluWQ/c+tDwdy1V2au0bo 71yP+vjIbHw1sGOKJR2I2eo51UPeRfrcImD5jWNcbuelqp9NQwKHLJ2LFN02+ufMNKJR vMUq2AStidyWP53upOpU4bzfTXxEtunovTFzICygVr0P+aDW1EuFDmTgL4WsBBgB/b/o fLkCppUYuojaDXyEFE/5oBZFHdO8TcgA5+ytg7JVKo5XaK1L253n5xzmzIh8ZQthNbzb Nojj+MBDkx7oYoy45QJQzUhRkbdlUNeDbMJm4ktiTNpEihlO3Fs0BsJWMzn+WNmFUVG2 wWjA== 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 n14si4021248otk.179.2020.01.09.04.56.23; Thu, 09 Jan 2020 04:56:34 -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 S1729964AbgAILwp (ORCPT + 99 others); Thu, 9 Jan 2020 06:52:45 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:55667 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728614AbgAILwo (ORCPT ); Thu, 9 Jan 2020 06:52:44 -0500 X-Originating-IP: 90.65.102.129 Received: from localhost (lfbn-lyo-1-1670-129.w90-65.abo.wanadoo.fr [90.65.102.129]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 58E2120003; Thu, 9 Jan 2020 11:52:42 +0000 (UTC) Date: Thu, 9 Jan 2020 12:52:41 +0100 From: Alexandre Belloni To: Eugen.Hristev@microchip.com Cc: jic23@kernel.org, robh+dt@kernel.org, Nicolas.Ferre@microchip.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, a.zummo@towertech.it, Ludovic.Desroches@microchip.com Subject: Re: [PATCH 04/10] rtc: at91rm9200: use of_platform_populate as return value Message-ID: <20200109115241.GX3040@piout.net> References: <1576686157-11939-1-git-send-email-eugen.hristev@microchip.com> <1576686157-11939-5-git-send-email-eugen.hristev@microchip.com> <20191218164348.GN695889@piout.net> <04264cb0-61a9-aba3-82ad-e7d12fd8441e@microchip.com> <20191218165831.GO695889@piout.net> <91cc67e1-7e14-f7b9-da77-b16d9e158f20@microchip.com> <20191219102321.GR695889@piout.net> <20191223111636.4698123b@archlinux> <7e67d601-e17e-f82c-edeb-824fc3dd89db@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7e67d601-e17e-f82c-edeb-824fc3dd89db@microchip.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/01/2020 11:19:45+0000, Eugen.Hristev@microchip.com wrote: > I started to work on this, I am trying to add and probe the > rtc_adc_trigger with platform_device_add. > > However, some issues arise: this means that the rtc_adc_trigger will not > be OF-compatible, so, how can I identify the driver to probe ? > Second, by adding a new platform device from the RTC driver, would mean > that I would have to supply it's probe/remove functions, which I cannot > have here. Those are in the rtc_adc_trigger iio driver. > > In fact, the question is, which is the mechanism you suggested, to be > able to probe the rtc_adc_trigger, from inside the rtc driver, without > using a child node in DT, as you requested ? > The rtc_adc_trigger needs a MEM resource, and a parent, and it must > reside inside the IIO subsystem. > As suggested earlier in the thread, you can use platform_add_device which fits all your requirements. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com