Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4700585ybv; Mon, 17 Feb 2020 04:17:02 -0800 (PST) X-Google-Smtp-Source: APXvYqzdGvztDdrP3Xf9s73WwTfuNfmCoLrEldV4YGBxkwoHjXSHM9sTYJG1q5xpQL1pXIKpBre9 X-Received: by 2002:a05:6808:ab1:: with SMTP id r17mr9411342oij.141.1581941822338; Mon, 17 Feb 2020 04:17:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581941822; cv=none; d=google.com; s=arc-20160816; b=hGw+p7//OeKytHDhmDNMXiy9oxQtHWGPN/KxzcupH7HavJ9+Dhj2wv37MRXdThb0Iu fp6cI4m1CjOPR3Q6jZ+02prezitQvf3t36m6CA0CQ3w+9KuCCAAco83Fec4zzB1i5L+Q 6JS8dT7v7J4nMzt41g5qaPpANIPqJ9MqKJhL4V68nOwNXtLc/q68/S+SAZlU0p3T+06j 1DD0DA9EWNV9EDd72Rgmt41DWWbwJDMQ40/iZgiPKbuY4a+pcdHtZIY/K04oLpGsPBQR a6tF1JbbTvk0Deo7D4PHS36obqVinQVB5slNZ2lxmOZCYulJbzv8tv2jk03zBpeLJ5Uw Iapg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=svQBb2pE2QDQnmXJ2ubumEvy+YYsjoxi5Gck3ouG2Pw=; b=WznlOe//txA2eJEpQc6XmvbCw9IiC/KZHNTOzLDKeImZ5hhi31WhHxPXYIqN50N8SX iCARheME+FbpUGTWvO7pnFbVm+03whFCs9ifBKtfLdJfsSE+8qRe+d1zYvyzkneWtSgg UYWpc74hg7kL4iv+6O1tr9jPIFIFz6tPW3hi0jxOdcN70h7YKZDGM2T9ZQqKWCgsps+V omnPVtaAv1TmW1sFCR/2M/gQcC92I+xd+w40icKLujxqyMBixYsPXzLC8bYyszo0+AHS TJyphE1GTC1pu++P/AzhiC4fCoD4BNCbixlVt/N/HsJ0s+lk+yMd9PTQv7wz7l0o+G0m iDvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VSgxNoy3; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m4si110985otn.281.2020.02.17.04.16.50; Mon, 17 Feb 2020 04:17:02 -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=pass header.i=@linaro.org header.s=google header.b=VSgxNoy3; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729488AbgBQKqD (ORCPT + 99 others); Mon, 17 Feb 2020 05:46:03 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:46240 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728209AbgBQKqD (ORCPT ); Mon, 17 Feb 2020 05:46:03 -0500 Received: by mail-pf1-f196.google.com with SMTP id k29so8630800pfp.13 for ; Mon, 17 Feb 2020 02:46:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=svQBb2pE2QDQnmXJ2ubumEvy+YYsjoxi5Gck3ouG2Pw=; b=VSgxNoy3lGhMfX52oQ6yUxFZlbLuvX1XQGrJ37RVE7JDDtOq0NzfyJMiAndI/obPga FRIJ3BH8RMheb1KS0hm431MUigHhUUGG+yFg9AK1bOacl9Q7kHwDxSlI4rVMJ/vB9U7I Cu1FCwflCaNV+HHeDqUmzJqnn2xSXHEU8S/RzAj8b3M5Bt2tN8tK//B6VFvXhHvjPWDH yXzGIU9Sfwcx92rbolAciLKyx5QhtNHLqz3ngD107WFx/JadZ/5eZ9kRSly8CQTKQYuc HaYWqY1ea1mp19t2N8kdC/4n+m+YfQ1ZLfEfLLIPJ+/3+Ai1BpIEv3CYlUKgWBMT9O6+ t/2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=svQBb2pE2QDQnmXJ2ubumEvy+YYsjoxi5Gck3ouG2Pw=; b=ha5Q8f0EyFoLtjSJ8HCg9lNJXVY6ixmoJLGu0H9za6V1cSGILnNapdMJ+sD31AQCfI FC+671iyNiKWNwnUJUa8RnAO8y/R9Z57Kn3iuiHg/m4YE3CSmHg/6op8OTJE5+8oONog jjrPqn4uVmhSTUvsolpwbaqZxcYq6HeQyn/cL15LC9IwlzSn4c5WEY5zJvAZeRCzfM2a 4vJcZDc6i568ctd3EkO0YbFTkdbxvtwrR1U0sh++fq/DfVBtiOQmQa+kD2oPcpCxFO4t 83fjS8NxnMLv5aJxhF7c7xVuXf0j427oscen2K8gXp8jFkOw2kMT7vTx5TCQGmJK2l9U mpXg== X-Gm-Message-State: APjAAAVJYyJ4IIzmIE0afMOZbD0G7ovSOE11w8HkhMIzc0haBUSsQmhh HEhVvYNKKo70gph6NNvtxfqZFQ== X-Received: by 2002:aa7:9a8b:: with SMTP id w11mr16691847pfi.38.1581936362610; Mon, 17 Feb 2020 02:46:02 -0800 (PST) Received: from localhost ([223.226.55.170]) by smtp.gmail.com with ESMTPSA id 199sm16748003pfu.71.2020.02.17.02.46.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Feb 2020 02:46:01 -0800 (PST) Date: Mon, 17 Feb 2020 16:16:00 +0530 From: Viresh Kumar To: Anson Huang Cc: rjw@rjwysocki.net, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linux-imx@nxp.com Subject: Re: [PATCH] cpufreq: imx-cpufreq-dt: Add "cpu-supply" property check Message-ID: <20200217104600.5hkb6hclglb2x4fk@vireshk-i7> References: <1581932575-13177-1-git-send-email-Anson.Huang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1581932575-13177-1-git-send-email-Anson.Huang@nxp.com> User-Agent: NeoMutt/20180716-391-311a52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17-02-20, 17:42, Anson Huang wrote: > The cpufreq-dt driver allows cpufreq driver enabled without valid > regulator assigned, however, all i.MX platforms using cpufreq-dt > driver now require valid regulator, add "cpu-supply" property check > to avoid i.MX platforms' cpufreq enabled without valid regulator > and lead to system unstable. > > Signed-off-by: Anson Huang > --- > drivers/cpufreq/imx-cpufreq-dt.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/cpufreq/imx-cpufreq-dt.c b/drivers/cpufreq/imx-cpufreq-dt.c > index 6cb8193..0e29d88 100644 > --- a/drivers/cpufreq/imx-cpufreq-dt.c > +++ b/drivers/cpufreq/imx-cpufreq-dt.c > @@ -31,6 +31,9 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev) > int speed_grade, mkt_segment; > int ret; > > + if (!of_find_property(cpu_dev->of_node, "cpu-supply", NULL)) > + return -ENODEV; > + > ret = nvmem_cell_read_u32(cpu_dev, "speed_grade", &cell_value); > if (ret) > return ret; Applied. Thanks. -- viresh