Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp751318ybj; Thu, 19 Sep 2019 22:53:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwwIkgiTeadoBzCVxzMGLHQoMlb5NgcwgMsZwpsi2YuBM1ayf5+KtEoO+/A5hxDGthdYNlY X-Received: by 2002:aa7:d7c9:: with SMTP id e9mr4265258eds.237.1568958819616; Thu, 19 Sep 2019 22:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568958819; cv=none; d=google.com; s=arc-20160816; b=0ywCEo80oQkbpD/V6yiZYHuQ6R1kK9iXxIm6OnJk3NxXDipaWxD49yWe+BWbGMkHqu 7xaaJV9UXPjPJNZKDziM3MaFVwyjhQHyJUxtpL8RjKklXl7m/+hIbn/MA3tSKOKEH2YS UvkWrhgeTzQ97debP+mM9rI5YW4VgXYeRWbV9Ea5vZSc152yYZFK1DLHoGw0AOQLy6bt 0AJ0qMGejoWKQj3lGPeFGSrpznUdtjsh5CFiIn3HgY4jGU3gJBapgl8h8sdlLJEj2n+o ecF1TyYkWkcKfGXbRvp0jbbD8viV5dtRmGjC7TGNstCjrAfDvDTbJBlUEjYthukM/LmY q5KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=6fHpBKw6eUOwimptL+ITvgs75Vin3Zdq3uabBD6+JFk=; b=wRBJBotOzGSjxzFcqneVzGSzd1Hxcyr1nCiy3mJG4oB6N3tyAsNDCyVWOhhTA7sew2 k9ffe9ppm/5V6A3uV9nKIJaGrxGEByhQwnrKEoMuOQd68rCHGJ40tug8Sv4uvP35c5Jd jqkOGaoiccE+4RN3CGRZPKu0RJ7OULZr6vG3LAOnbRjWqMvcRXWrwIt6SpQ9hkgTtTPZ KCnWPd3dtA/+sm7bFd4fsQn2qa7iiNqL+BsfCUxZtzuZ1pNoAcbkwSwAYQL6IBCTXDbV CYdcE5nE2Dk1rpGTXmpd05ofmNg2IREWwk9KrXos2hbcZidsToxFfWzGYbD0t+1UiOvw lIgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=u6+ZcWhS; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l19si644231eds.389.2019.09.19.22.53.13; Thu, 19 Sep 2019 22:53:39 -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; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=u6+ZcWhS; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392410AbfISUDw (ORCPT + 99 others); Thu, 19 Sep 2019 16:03:52 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:36225 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390489AbfISUDv (ORCPT ); Thu, 19 Sep 2019 16:03:51 -0400 Received: by mail-ot1-f65.google.com with SMTP id 67so4237628oto.3; Thu, 19 Sep 2019 13:03:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6fHpBKw6eUOwimptL+ITvgs75Vin3Zdq3uabBD6+JFk=; b=u6+ZcWhSl1aG3A35Qb0Fd19psh9JCrKFkP3pP+Kb5YWJrplnAx6n1LDAaQqhi5ZqeG jyg37wc0W5HHbAEgGWnj+/U231oZzC19ON9Rfo91cqTK1YiBcxFzRvsCGEFZVajL39BU IxICNwcDbn7lpr+dCbIjgaoc2l/rrdjuqH/1PUK9/IOAvehhnEUgJr2gT7AKWGJy3dA5 reAGIbafrW81R9KGq+LLSQSM1d1f/MB5gldml/A6+cQDuet+ACqBeBdW1Y/SvRHoYzjg 597/gCDnetAWPqfKHAI31kFYvBIe7V6Ypq6IqICtfmdAhkPA70pyiiGAGdCgFb7F4kwQ 29kg== 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=6fHpBKw6eUOwimptL+ITvgs75Vin3Zdq3uabBD6+JFk=; b=kA2k3gFfWHGRUQM2reJ7g0yV9insWO1n9FTEw3m0muh99cvlTI78JasDT2GqisDxI2 eXTKMDPH5d/fT7utNK1s8nvXqEyivj5AsNI1PGejnQQ7x6vuJP9s96iIcxO4C6AJHmT0 9M2oB0/8jDjPjUg5vHOqixewIIn2GyHRI9pqXiTfT484vckQjR6N2JNe232lDy343QY1 b/S95OgUkr45nUf/niVWlp9oMm01e77D0UbuVSn51A+J8uJw2VPpHBESXEyGrw6h2bjg JsSCL2GvfDmNTcyQXkYlTtTp2/UpVgk1+8tflfyVslga0EZ5UwyLXm0RIw4G/1K8GhuO X8Ow== X-Gm-Message-State: APjAAAXsjbmU9HD1WyVS5Z7IkcKwiEQEyu7b9QDU60yLx0Y9zU6Bras7 fIY/ke4Qb4PlPhm68o3NaupOFjh2KeeTqXE89vXEctNn X-Received: by 2002:a9d:6084:: with SMTP id m4mr7893739otj.6.1568923429439; Thu, 19 Sep 2019 13:03:49 -0700 (PDT) MIME-Version: 1.0 References: <1568895064-4116-1-git-send-email-jianxin.pan@amlogic.com> <1568895064-4116-3-git-send-email-jianxin.pan@amlogic.com> In-Reply-To: <1568895064-4116-3-git-send-email-jianxin.pan@amlogic.com> From: Martin Blumenstingl Date: Thu, 19 Sep 2019 22:03:38 +0200 Message-ID: Subject: Re: [PATCH 2/3] soc: amlogic: Add support for Secure power domains controller To: Jianxin Pan Cc: Kevin Hilman , linux-amlogic@lists.infradead.org, Zhiqiang Liang , Rob Herring , Neil Armstrong , Jerome Brunet , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Jian Hu , Hanjie Lin , Victor Wan , Xingyu Chen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jianxin, I added three comments below from a quick glance at this driver (I didn't have time for a complete review) On Thu, Sep 19, 2019 at 2:11 PM Jianxin Pan wrote: [...] > + pm_genpd_init(&dom->base, NULL, > + (match->domains[i].get_power ? > + match->domains[i].get_power(dom) : true)); .get_power is never NULL in this driver so the ": true" part is effectively a no-op [...] > +static const struct of_device_id meson_secure_pwrc_match_table[] = { > + { > + .compatible = "amlogic,meson-a1-pwrc", > + .data = &meson_secure_a1_pwrc_data, > + }, > + { } many drivers use a /* sentinel */ comment inside { } [...] > +arch_initcall_sync(meson_secure_pwrc_init); why arch_initcall_sync instead of builtin_platform_driver? $ grep -R arch_initcall_sync drivers/soc/ $ Martin