Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2820650pxk; Mon, 28 Sep 2020 00:16:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxI5rWrnS3FR2V8HymVSDeoGcbWE+wGTW0fUBrwyrD62K25x2bQ8a0uuXQU2kiLi/lGeetG X-Received: by 2002:a50:9dc8:: with SMTP id l8mr278461edk.58.1601277391713; Mon, 28 Sep 2020 00:16:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601277391; cv=none; d=google.com; s=arc-20160816; b=xYTlo2qNzXOu2HbSKInMU9oukcNI4pf/LfSfFtibd1mPMRRIkRp19AeDY9+c9FzwaR BeIwUGOEZe99GYGwQIMtoqxFoeb5oms0MqOTV9DKE6Z/admFcxYs9n+zbGSG42J1dh9l 0IlDP0L2gThS7uh3UaWp+bMawD2eKeidC/q0OkqmDVKv4B9G6/WyBGz9+GKzLlhiFYBy 3OM0faOISnH2HjlH7DWva7TeF6Z/iXY4wq2uGFwVWI2AAkQPLdSaSi6TdJ0txqp15HVZ aN7ouAUM/Ni5HepoBWEgYEO1bg45xu7wymz35I+UNgXAZ72HQCW5QdtxS+rQyoifoVpD QYVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=kCXdMKNDB4m8MlwDrPmz+XV4KwYnVdM/qHc8DcVYWww=; b=WZBb+1B3l9nlewcsaXkci+d9iQ0HmBnV+oI+Bopjz9p5Zg5WWx5z05X7DkoxaWgDs0 8YIzqiItLMSTPtVJsOHRz6SqD18v9kmGtq8g9/HjSak2iR30vQeAQ7EmRlMc4Oh58wec v8IKIPdWTuXfQquNUu9GNUfNkKPbQM5D9u5QiryjLsNdIQgXpIfzOiQvNliTpyzNSdSc KU6WU6FHwooY4Ya5j94dbvhXy2NvO7txqisy2w0V/Z24cIBaUBh1ctrE9gYmNwumF56e gGFLlc2A5kgBgAzzu+NtR7M2ljCIS0jaC+YMaXsQb81Vdy2wCf43AipduRbY4xXQmaFU gdjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="ARNv/b4y"; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u59si31025edc.226.2020.09.28.00.16.09; Mon, 28 Sep 2020 00:16:31 -0700 (PDT) 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=@chromium.org header.s=google header.b="ARNv/b4y"; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726516AbgI1HPE (ORCPT + 99 others); Mon, 28 Sep 2020 03:15:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726328AbgI1HPE (ORCPT ); Mon, 28 Sep 2020 03:15:04 -0400 Received: from mail-vs1-xe44.google.com (mail-vs1-xe44.google.com [IPv6:2607:f8b0:4864:20::e44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD0DFC0613CE for ; Mon, 28 Sep 2020 00:15:03 -0700 (PDT) Received: by mail-vs1-xe44.google.com with SMTP id y194so146643vsc.4 for ; Mon, 28 Sep 2020 00:15:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kCXdMKNDB4m8MlwDrPmz+XV4KwYnVdM/qHc8DcVYWww=; b=ARNv/b4yV78actnJ0SE5pQEsF9qbZjb0qiYFZyLvAAi7wtsltM+289weq9fVgYDHZ2 pUAdIXSWvcnjVZFJ9LX5QxfoGp+JVEitm4WwFE2AH5XJDk4NUM2XKYMDKqvG36nDGfjM yz7UcuT73+t78gooBxyXTqxo6hFnVWwhhLgQ4= 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=kCXdMKNDB4m8MlwDrPmz+XV4KwYnVdM/qHc8DcVYWww=; b=Cb6IYeyrDmYZf9BVU8RYgs9Yv5PtqJ0Ze3pHRxEDAS9wJlhKxZZx6N5IEaFfN/Djzo fPD+vp3sJd6F0h14ssBl68woMu3b+g/tNdbZTJyVpPuYPk/napAVURWH31WnZuyjYRX0 76+6cghozR5J2tXzv8txjWp8dTig/AhCk85YeG9h48A4hbUcWvZscc6AW1XIsl+91qJb lSPWiHSeb8FKfN2yVgq0CJT01g/BFJhj8gOUQcuYmAN/b+fQ835XF6c+HQAUDv8xy9Qi 8n/8VtisRn0Qz6NOcKHdjMCpgybdcPcR8TdYnqchM35gKzi/04lOT174EXkeE1SFig+Q 6Bpg== X-Gm-Message-State: AOAM532W56Q5SEFSrOvyFOxk/JXCRMBhJRbjGSbf02lglsouQefwLoih Xmewd4/wKkMJuGE4qjnce2GQsfwC/ngsRIVd0m9dCA== X-Received: by 2002:a67:fe07:: with SMTP id l7mr4701508vsr.21.1601277302935; Mon, 28 Sep 2020 00:15:02 -0700 (PDT) MIME-Version: 1.0 References: <1596705715-15320-1-git-send-email-weiyi.lu@mediatek.com> <1596705715-15320-7-git-send-email-weiyi.lu@mediatek.com> In-Reply-To: <1596705715-15320-7-git-send-email-weiyi.lu@mediatek.com> From: Nicolas Boichat Date: Mon, 28 Sep 2020 15:14:52 +0800 Message-ID: Subject: Re: [PATCH v17 06/12] soc: mediatek: Add support for hierarchical scpsys device node To: Weiyi Lu Cc: Enric Balletbo Serra , Matthias Brugger , Rob Herring , Sascha Hauer , James Liao , Fan Chen , linux-arm Mailing List , lkml , Devicetree List , "moderated list:ARM/Mediatek SoC support" , srv_heupstream Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 6, 2020 at 5:22 PM Weiyi Lu wrote: > > Try to list all the power domains of under power controller > node to show the dependency between each power domain directly > instead of filling the dependency in scp_soc_data. > And could be more clearly to group subsys clocks into power domain > sub node to introduce subsys clocks of bus protection in next patch. > > Signed-off-by: Weiyi Lu > --- [snip] > +static int traverse_scp(struct platform_device *pdev, struct scp *scp, > + const struct scp_domain_data *scp_domain_data) > +{ > + struct device *dev = &pdev->dev; > + struct device_node *np = dev->of_node; > + struct device_node *sub; > + int ret; > + > + INIT_LIST_HEAD(&scp->dep_links); > + > + for_each_available_child_of_node(np, sub) { > + ret = scpsys_get_domain(pdev, scp, sub, scp_domain_data); > + if (ret) { > + dev_err(&pdev->dev, "failed to handle node %pOFn: %d\n", sub, ret); minor comment: this error should not be printed if ret == -EPROBE_DEFER (use the new dev_err_probe?) > + goto err; > + } > + } > + > + return 0; > + > +err: > + of_node_put(sub); > + return ret; > +} [snip]