Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp487152pxb; Thu, 19 Nov 2020 06:27:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrOeu+LbsnRGP962yS98jxCPc1iZaH5ogfXUY6aNUzs8AFZJnYdFdH7efXUqLksg/1gcwV X-Received: by 2002:a50:bb26:: with SMTP id y35mr19708472ede.257.1605796024457; Thu, 19 Nov 2020 06:27:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605796024; cv=none; d=google.com; s=arc-20160816; b=H0VEVLZsZklN+HU2tIYLcLxraUJ/wOBHrwAS73oTDrjkXXPjdxL13jbbT7TY5HV6lC 4EoiDni+FXboPaGzUCHmLQyXGRclF0lzUTAFksPbXz9O6JGgnx4WKlvXmwgn03xo27Nd AR9d762heqGb0UYHGS1natwmzhK4qLj41evW0KNKwEC2a3LGf8kWK2ygbnXZ6qz40xU9 M+dSXFw9PkFuDEg3/pe4DfeqESe9BHZnk9wU3JF3habbea0iTmyoOi4+O7P4SUhfAqWn +YwG2u4/rFraPf9OPe4JsXwZLWeZh3i91JUlLLCMEyYKgLdvPKWGZPk2EOcMh3gpiHZ1 +Iag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MV2i4DtAkKV49maDzVKU9AjA2exDdvRerVPWUn8vyzc=; b=HlKdDtcrUsw6FrGh9OAfqQ7KLoBjlzvDJvwaATZ3JoLTPOrlLqHbGnvfeVvsH2qaXD sXCtMTXpoo5USRas79EhMkNTpD+GAuhzwLUPdO3L5brqT/bXkSxosZtSCpXs4nIOiVP/ TT8DSfqpO8tHdm0yWUB/3SEAJu0QhnOaSy8a7vvCZEcrODhfnRj044Zin9kdAHT+dCJJ P4xemCy2TOOtx+D7ml0Pn7+L9eGoubWF4GoEMy6vshdDihvBMZq6+QileMh/hI5A7QJZ MbiDJ/h52cczEUJRiPXBx/+Lun8/27nb1w9Ybx6mZ7DSKo02s7OYZOnfZeZsUOIQ1xrT L+Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0epg9t00; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p21si18453078edw.573.2020.11.19.06.26.40; Thu, 19 Nov 2020 06:27:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0epg9t00; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727809AbgKSOY4 (ORCPT + 99 others); Thu, 19 Nov 2020 09:24:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:48944 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727392AbgKSOY4 (ORCPT ); Thu, 19 Nov 2020 09:24:56 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 303E8238E6; Thu, 19 Nov 2020 14:24:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1605795894; bh=hI3CwxFoM3ubkyrrewfwBRZFiwj/CI/nK3tQ07ldTb0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0epg9t00js0qu4wAvN+A/n9gyarevXCFaELqlaPDb60k/oSnfF38vpv/f3/gv7/Ud mwiFOkAOLPBHsdQvCPucKouMBv9kSNzMgknRkkKjZvgppUEKlkzA1AFU0a1djqkFq9 JQyH892hgY8DICjJT7CpDOCH6JDcwGDdNj5ZXnwo= Date: Thu, 19 Nov 2020 15:25:38 +0100 From: Greg Kroah-Hartman To: Aisheng Dong Cc: Saravana Kannan , Sudip Mukherjee , "Rafael J . Wysocki" , linux-kernel , Shawn Guo , Stephen Boyd Subject: Re: [PATCH RESEND] driver core: export device_is_bound() to fix build failure Message-ID: References: <20201109120512.GB1832201@kroah.com> <20201109124801.GA1890488@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 19, 2020 at 02:09:42PM +0000, Aisheng Dong wrote: > > From: Greg Kroah-Hartman > > Sent: Thursday, November 19, 2020 9:10 PM > > > > On Thu, Nov 19, 2020 at 04:13:34AM +0000, Aisheng Dong wrote: > > > > Long story short, either > > > > > > > > * Don't care about the power domain in your clock driver. > > > > > > > > Or, > > > > > > > > * List the power domain in the clock controller's DT node and then > > > > use the normal APIs to get the power domain. And defer like any > > > > other driver if you can't get the power domain. > > > > > > > > > > Yes, I understand those are for normal cases. But our case is a bit > > > different and we don't want > > > imx_clk_scu() API return PROBE_DEFER which is unnecessary for a hundred of > > clocks. > > > Even we want to defer probe, we prefer to defer in imx_clk_scu_init() rather > > than in imx_clk_scu(). > > > > What is wrong with PROBE_DEFER, that is what it is there for. > > Yes, we can use PROBE_DEFER, just not want to defer in imx_clk_scu_init() when creating > sub clock devices. Instead, we want to defer at the beginning of clock driver probe which > can save tens of defer probes due to the same reasons that PD driver is not ready. There's nothing wrong with deferring that many times until your proper driver is loaded, what does it cost you to do so? > > > Maybe the things can be simplified as a simple requirement: > > > How users can make Driver A (CLK) to be probed after Driver B (PD) > > > without explicit firmware function dependency description (e.g. phandle in > > DT)? > > > > > > As kernel core does not want to support it, then the left way may be > > > change scu-pd driver Inicall level or provide a private callback to query the > > readiness. > > > > No, do not mess with that, as it totally breaks when things are built as a module. > > > > Can't this be addressed by proper module dependency? E.g clock module depends > on power domain module. Then clock driver can only be loaded after power domain. Sure, if you can do that, make your modules load properly by symbol dependency and all should be fine. Have you done that? thanks, greg k-h