Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5325515ybe; Tue, 10 Sep 2019 01:49:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaQQAgFKt2BlKma5TBNoVC4qyFoq+1/YXgP/5kUBPTswKTMgPKm0jHYtAC4wVx1qN+NnaA X-Received: by 2002:aa7:c382:: with SMTP id k2mr13441836edq.256.1568105373034; Tue, 10 Sep 2019 01:49:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568105373; cv=none; d=google.com; s=arc-20160816; b=TSqPnWfANvt7uEeTTTMs4IhTcLY/CNEPdUdCFoah28smnyHKN7c325Nu83Aa108w+o /9FDnOljLlqyLBlKl6j3Ak+NQ0/KeZib2r5MMCjtGQ2s/TTN2r3kKLDUAIzMfk+twaIy vXrUn9ZQcPXh/wx9Yr7jHldIisgfWkGjbiSnitmoiKVE/s4wxcSxykZPfyMikwy09SuF wRBqcOVe1lq19dxZnax8/E3//ObIGuIJa7dba7NHd8yy+ng25lGqmiyuxs9KkOM1LN6Y G0dkHyGxB6U04b6YS0JTJNcN6503t3XMC+sV+iR6Vj36QLDbR02orHldQBc5PrNn9mkc 8Tbw== 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=1y0ip3glxrTxPk15AOfb1T8k1sel9YjTHLwkA9X48iM=; b=anlinEVcdI+dRLAWMfP1r4M5PvIXSLbhVWjZlWJPUoeZpm2Oug/GvDtLUy2p4RHC0f bddDEd+wCv/dMTsavLwPC4GERrXoJw0dJ7qeP51ouWjAmcxlTHHmy2iMnkA7Zd5FT9v9 XP/4yaSXY9mtBbTTyKvKqCkXm+Mjpk7hDcVpdgOG8UQ8sTnijTgAjb0pfZg3lTgZjr23 0Sc3H0SLiA56wJvTmMBUm/64Rf4XN7aeRhN0KyxTnDcrWDfGAJnjJ9gC12qyG9kLBmJ5 F4L90F89KLagF49m6bWthXBLpel+12Dgd5+OKih8UyRvyXegHh/PwTpwLEtDfPW1nQDq m7GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QHv+pIF0; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h15si6364627edr.60.2019.09.10.01.49.09; Tue, 10 Sep 2019 01:49:33 -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=@kernel.org header.s=default header.b=QHv+pIF0; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388484AbfIIPlr (ORCPT + 99 others); Mon, 9 Sep 2019 11:41:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:60478 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725846AbfIIPlq (ORCPT ); Mon, 9 Sep 2019 11:41:46 -0400 Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 142F32089F for ; Mon, 9 Sep 2019 15:41:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568043706; bh=fM4JbSVJbGXAjoftVI6cCaz2ZaDS1dmEdNr69EQNLl4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=QHv+pIF0WkKCXPobKnhnm+m3bLWKtzErPwv9PJb/Q9LP2fL+MarhCoXM/uwRzAUgE zD+eK2DD1rxsaNWmHnvUfoa5cFmfJWNWBmNP1TCG6ZGdM/k7ePwCma0B3v0gMbRo3c IiRiUAseAivRcmSGGSDHZgXCSbLvGJdZVJ35g0d0= Received: by mail-qt1-f169.google.com with SMTP id n7so16682551qtb.6 for ; Mon, 09 Sep 2019 08:41:46 -0700 (PDT) X-Gm-Message-State: APjAAAWGr5Tgcq4VV3o6gS9SFxuToDK4WLYVfkQn10JukFidlKZt04P+ zbithCOEmr4C0hYGWicduHRkwqPbeWPwBuUGXQ== X-Received: by 2002:ac8:4a05:: with SMTP id x5mr12045321qtq.110.1568043705274; Mon, 09 Sep 2019 08:41:45 -0700 (PDT) MIME-Version: 1.0 References: <20190904123032.23263-1-broonie@kernel.org> In-Reply-To: From: Rob Herring Date: Mon, 9 Sep 2019 16:41:32 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/panfrost: Fix regulator_get_optional() misuse To: Steven Price Cc: Mark Brown , Tomeu Vizoso , David Airlie , Daniel Vetter , "linux-kernel@vger.kernel.org" , dri-devel 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 On Fri, Sep 6, 2019 at 4:23 PM Steven Price wrote: > > On 04/09/2019 13:30, Mark Brown wrote: > > The panfrost driver requests a supply using regulator_get_optional() > > but both the name of the supply and the usage pattern suggest that it is > > being used for the main power for the device and is not at all optional > > for the device for function, there is no meaningful handling for absent > > supplies. Such regulators should use the vanilla regulator_get() > > interface, it will ensure that even if a supply is not described in the > > system integration one will be provided in software. > > > > Signed-off-by: Mark Brown > > Tested-by: Steven Price > > Looks like my approach to this was wrong - so we should also revert the > changes I made previously. > > ----8<---- > From fe20f8abcde8444bb41a8f72fb35de943a27ec5c Mon Sep 17 00:00:00 2001 > From: Steven Price > Date: Fri, 6 Sep 2019 15:20:53 +0100 > Subject: [PATCH] drm/panfrost: Revert changes to cope with NULL regulator > > Handling a NULL return from devm_regulator_get_optional() doesn't seem > like the correct way of handling this. Instead revert the changes in > favour of switching to using devm_regulator_get() which will return a > dummy regulator instead. > > Reverts commit 52282163dfa6 ("drm/panfrost: Add missing check for pfdev->regulator") > Reverts commit e21dd290881b ("drm/panfrost: Enable devfreq to work without regulator") Does a straight revert of these 2 patches not work? If it does work, can you do that and send to the list. I don't want my hand slapped again reverting things. Rob