From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23F9DC433FE for ; Fri, 20 May 2022 12:03:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243149AbiETMDg (ORCPT ); Fri, 20 May 2022 08:03:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348966AbiETMDU (ORCPT ); Fri, 20 May 2022 08:03:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 982ED1498C3; Fri, 20 May 2022 05:03:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2C24161DFA; Fri, 20 May 2022 12:03:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A87DC385A9; Fri, 20 May 2022 12:03:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653048198; bh=387K16xk7F07P+mVdomJn7VVO3JUePVAb1FehJf0grw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pWXK27ij1Y5VZ732mGSwahDUXfniztdn3J0KVqAlHnkGLAcyA9wBVpOy6fQb1nBG1 YkGbRDDCWYteE3/r1E4dDZ5wGckxtj89PGm0Fy5Hi05swie5t3XCH5mlNi0sV3kqI5 ASAPPCvENsVvF7TDYl7WlVnoGaH7JKYFsPauJWSwq8voFzDByrsDtN1E8HeHY94o37 S96JwGiBItKQ8erAfGAhXXXzcAWd/oEaSfPKJCz7CCUyIqdj/+AGXHISgmiha+AIHa T3RKj8aShzUYXckY9TbuEtGAcGh3pDTGMzhz486ikm6GjzaZaqmMZT6FNi2drRnBJk qtMmXytMDOvPg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1ns1Li-0005yv-8Z; Fri, 20 May 2022 14:03:18 +0200 Date: Fri, 20 May 2022 14:03:18 +0200 From: Johan Hovold To: Dmitry Baryshkov Cc: Johan Hovold , Bjorn Andersson , Andy Gross , Michael Turquette , Stephen Boyd , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] clk: qcom: gdsc: add collapse-bit helper Message-ID: References: <20220520100948.19622-1-johan+linaro@kernel.org> <20220520100948.19622-2-johan+linaro@kernel.org> 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-arm-msm@vger.kernel.org On Fri, May 20, 2022 at 02:50:17PM +0300, Dmitry Baryshkov wrote: > On Fri, 20 May 2022 at 13:10, Johan Hovold wrote: > > > > Add a helper for updating the SW_COLLAPSE bit during initialisation and > > state updates. > > > > > > Note that the update during initialisation was relying on the > > SW_COLLAPSE bit not having been set earlier rather than passing in zero > > explicitly to clear the collapse vote. > > I think this part deserves a separate commit with proper Fixes: tag. No, it's not a bug. The value passed in is explicitly set a bit higher up in the same function so that the SW_COLLAPSE bit is (currently) never set. It mostly just looks weird and probably wasn't intentional. > > @@ -425,8 +437,7 @@ static int gdsc_init(struct gdsc *sc) > > * If a Votable GDSC is ON, make sure we have a Vote. > > */ > > if (sc->flags & VOTABLE) { > > - ret = regmap_update_bits(sc->regmap, sc->gdscr, > > - SW_COLLAPSE_MASK, val); > > + ret = gdsc_update_collapse_bit(sc, false); > > if (ret) > > return ret; > > } Johan