Received: by 10.223.185.116 with SMTP id b49csp2142046wrg; Thu, 22 Feb 2018 08:46:04 -0800 (PST) X-Google-Smtp-Source: AH8x224lN4JqYOj20xD968kI993XJzpxn6RKXO93QGjByYOmYWAL274b/xd/s+z/VhHsCXkzpywL X-Received: by 10.101.101.78 with SMTP id a14mr742568pgw.368.1519317964413; Thu, 22 Feb 2018 08:46:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519317964; cv=none; d=google.com; s=arc-20160816; b=IBHm2JMGZjsyfvm0bYScklR+lMdYYE3tDfgODOnyjfzajHnQMwSKisHoafY6ZIX13H TClaesxbzarprNCvV45MHN4/r5i2xBlfn6CJSvCIzMZoKn9ubJrmVib0scX7wVAR7x5c /a1hUz36H4qKgP5ZXHudHBvDp3WQGz/vLgSZEUz9cCujXRbHrHde6aAKrO1/GGFLj2yQ xVoGNn2/c/FEjcJ8RjJ659EG+lINY0UoA0bDdJ4OCXe1+Hk81tbmfh+Io7SDwC60tmYI WsnKWHRsJIey+Ruo/8TEjA77XtrJfslndF5xw0bKO8yjL9wHOJysFaM3RNHu22Epls6i slFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=mwAZNm4G43a0EowgjMVMS9jDfi2c1CkpBw4uaEJXkyI=; b=FTk92Zzatnl983RdGj8ZpMFvrIrGvzqoakOE6d3WzPQBL9ffsZt3v/BhL56LcdcE5f 6VtbWxwNYCtPRPfj14AJISUH9VbJvHHmDZAl2Waz5Owo6MK4a1+DvZYQPhwW4IztDYWo mmmuRDsi4Ng+1HpZC2TGSnQbKs/EhpDhC6hrhneJJFcGKSatZb9Aupyi3KJxZ1CRADiH ol93KzkilkBku7QX6m0muGwp9+exkZs2GbSYDA9kGmo8EZj1vDhvUoO9d39y3mSUpnuM 5YePTP3KyHdLsLd6Q6SUJms4BsFmLP8Ykwqh5y38hgqCivQ2I1MJsCvnwVEl5XSC/qGZ 9w8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=ix8DnNDg; 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 d81si281871pfd.139.2018.02.22.08.45.49; Thu, 22 Feb 2018 08:46:04 -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; dkim=fail header.i=@lechnology.com header.s=default header.b=ix8DnNDg; 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 S933376AbeBVQok (ORCPT + 99 others); Thu, 22 Feb 2018 11:44:40 -0500 Received: from vern.gendns.com ([206.190.152.46]:51464 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933281AbeBVQoc (ORCPT ); Thu, 22 Feb 2018 11:44:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=mwAZNm4G43a0EowgjMVMS9jDfi2c1CkpBw4uaEJXkyI=; b=ix8DnNDgloj4D746mRMAfS9tXT SevxhSpzWo55o7ZmeAS5nVIt3ijU6Xt4SnE+1ehjCLFPrHU1iJ/AH99PMPYWASS8E48LQCNRvTeyA HD/TOsAHbq/V6w9bRB3xFndl7Y8NDZLCx4gG7naz6T6cRKOXgPxncSU2C67I9ym1uXJ5thC0idDlF LAToGkNyMAezs166G3xfc9q8Myz3mWzfSFaTuFpE2VIOfZZ/UuiBZD1RwaSHQ4gCn//I+t9A0IFDy KiYCAf40WMM2BJLMnalZNY5yGybKrzrQpN0TM4AjN5XFJaRYMAcgm+93aKG6mIJvy2JNjjNSI18ZW BfnqujgQ==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:38962 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1eotxZ-003W3z-9L; Thu, 22 Feb 2018 11:43:05 -0500 Subject: Re: [PATCH v4] reset: add support for non-DT systems To: Philipp Zabel , Bartosz Golaszewski Cc: linux-kernel@vger.kernel.org, Bartosz Golaszewski , Sekhar Nori , Kevin Hilman References: <20180219165837.28913-1-brgl@bgdev.pl> <72cd2af4-ed6b-8c1b-2488-b999976b894a@lechnology.com> <1519123185.3470.5.camel@pengutronix.de> <8ef4b901-f38d-d885-e7bc-657202a2e248@lechnology.com> <1519299294.7447.4.camel@pengutronix.de> From: David Lechner Message-ID: <91e55d2b-abd0-35b4-cc18-98a96288f8de@lechnology.com> Date: Thu, 22 Feb 2018 10:44:45 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1519299294.7447.4.camel@pengutronix.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/22/2018 05:34 AM, Philipp Zabel wrote: > On Tue, 2018-02-20 at 10:40 -0600, David Lechner wrote: > [...] >>> In your case the platform code that adds the lookup may be identical to >>> the code that registers the struct reset_controller_dev, but that >>> doesn't have to be the case. I'm not sure how that is supposed to work >>> for the phy framework (I see no platform code adding phy lookups, only >>> drivers). >>> >> In our use case, we would be adding the lookup in the driver rather than >> in the platform code, which is why I am suggesting doing it like the phy >> framework. > > Shouldn't it be the job of the platform code to describe the connections > between reset controller and peripheral module reset > inputs? I guess that depends on who you ask. There are many clock driver that register clkdev lookups in drivers/clk/, so that is what we have done with the clock driver we are working on. The clock device is also the reset controller, so it makes sense to me to register the reset lookup in the same place that we are registering the clkdev lookup. We have a platform_device_id for each possible configuration, so that it works very much like the device tree compatible string. You register a platform device in the board file with the proper name and the driver takes care of the reset because it knows which connections there are based on the device name.