Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp447159lqp; Mon, 10 Jun 2024 08:47:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUEBrr/MC17E25ih8l3dKEUKN9bzgRgAWvoMQ28tTlx/e6LtnUfuGDVN643bWLHu4YeAP+Cs70dB2kwnum63HWqhxCRSO7U5REZLMSkNA== X-Google-Smtp-Source: AGHT+IFbY7/eHlreMDZPRotcv2M0mYgJcKs+H/oJ451AH5sfSLX5gigZnK9baspJyR4/gySi5Jun X-Received: by 2002:a05:6a20:9c8b:b0:1a7:9b0e:ded3 with SMTP id adf61e73a8af0-1b86bc161dcmr62011637.11.1718034446446; Mon, 10 Jun 2024 08:47:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718034446; cv=pass; d=google.com; s=arc-20160816; b=BgllL/iLP9ZRu9GwV0+DUGUZLBMTMNo857qfLgTVlKmy+PFcZylVDEsN7vg0WeAEAe vgYn/Wl4MM4e+iDzGqzobcbwQ14uNkVbxsKK2QDhcxCh9RcJmIMsU+WHbOSJbWVXEV2m a8cMX3YBh/o38W1V0+WKkuat60Sii7Ozinu7O2QWpSO64AbYVl3JEnDm9D27jr7FeFUK mT4j0X7LVjNXo/MkNcUYFQ5e78x9jtFWq3c8IHmzCJh5qpLYiZFedI2+D9jIMXKRIuw0 FoWWYGuvMajpW2bPVqEpLfQtZZ4WUcR0DB8RZujEHPTN/YouxT90C1qhH2s2dXz1scUK vjaw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Fh8gXs3IrYMFwMrqiqFPpp0F5VoR31eAOXd+Luu9m/c=; fh=qqt4WrDMdgr14dZtzvzZvCBIGcEoRSobE0Fz58jcJmo=; b=e3TvKmNBefuhp5ftdsT7Vo1HMK2SbdLijJOl6bB1TSNewCxYVMR5G5lNFXfghELpw9 ybWGiW6qRiW2xvhwi6oiY9AsMzgF/ebd64AsKklNRDAdd8XwDSPjFdcBOO5p3NykneuV mNfvWAu6JdPHJJ6khchDnta2CdSN8Ynk8mYqDlD+8D6Cp6/t0GnJNzq136YbdPQ/EjGl 3iZHpoSyYBSwHU+azKHvPHxD75ZXq6wO5u4EXBnHPxujY/yqfEYd6GfgzOhLbrHROTF8 XjEOwhY6blnfKlQXU0mQrsTh7OugEsVv9N66Vd8Hispg3UaoF5uwi6aPYVF9aks9Cc+x 3PMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UFi6707w; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-208495-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208495-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de2073c79bsi3629035a12.179.2024.06.10.08.47.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 08:47:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208495-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UFi6707w; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-208495-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208495-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B3275289CE3 for ; Mon, 10 Jun 2024 15:37:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CA6B213DDBF; Mon, 10 Jun 2024 15:37:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UFi6707w" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01D2712FF86 for ; Mon, 10 Jun 2024 15:37:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718033861; cv=none; b=QQLs41+WqyvEKWHS113BdklEHM0EUu47KGhMZaNDydJAL11qYoqoU5yBroqHCqHNzEihVHyf0yH/14GxbxALxiUa/VsqhUYxb763vCwWte2auhGhd1wsS7fcnPvtxv8KLZEoK9z82ZPfEZMKv09NzLYTJWlUIVzxGuduQJIrIa8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718033861; c=relaxed/simple; bh=DS3uBb7Unwhd1jiU6S/xkwKPy764hQ4TYvNxIj8Dvus=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rCgbWxp1Wqqw5MOxCMZ4Ip+2MI7ykoNqT0U7cSJjmADkHfh1OJGo0qQy1Yag7t0HmRF3s1U2qWweSbDV1ZH56+0FJr/huNr7ksdE2umDLCrUKV9wWE+SuZDgVMSWbg57b0unpVCfiyRPU20FRzx66crZA61gplL/N1ekxdkyfkU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UFi6707w; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93ECAC32786; Mon, 10 Jun 2024 15:37:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718033860; bh=DS3uBb7Unwhd1jiU6S/xkwKPy764hQ4TYvNxIj8Dvus=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UFi6707wcUbSi/lMOM/1R/3w4Tp0Nhzr1BaLI7BOl+P6JZYyX8C7QoxmYJ39wbldC 3+t/MxWxvdx5yYbREMJzMAz2RUBROKuMAKKhu+9tsa6hQTZygr5lZl+Gbe9JMbRhCU YB7IOee4GcNJLYCcQCAgKyWnN9H6McvJxFQpRMBgJ7Xce4wHeUePpOWzztdmRe7I8L Oza/7bj9F+jkKZmJnmnPacw9cnpk/ZpLAmRx8bczk1ZHZ2bhZFnov3XvHGiOxIS3n/ Zyvc6IHupMLlQXSKMjbpU6tbdtehqHfbkVrsnydpkhOc1qzbrCI1VAT6lA6ZkzAhHL eZBImHbP6TUuQ== Date: Mon, 10 Jun 2024 16:37:34 +0100 From: Mark Brown To: George Stark Cc: lgirdwood@gmail.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@salutedevices.com Subject: Re: [PATCH 0/1] pwm-regulator with voltage table problem Message-ID: References: <20240610120025.405062-1-gnstark@salutedevices.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3aWJOhdwdUY4seBS" Content-Disposition: inline In-Reply-To: <20240610120025.405062-1-gnstark@salutedevices.com> X-Cookie: Your love life will be... interesting. --3aWJOhdwdUY4seBS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 10, 2024 at 03:00:24PM +0300, George Stark wrote: > The situation: bootloader sets mean cpu power and mean cpu clock. > but that cpu power is not found in the voltage table (value is between table items) > due to different versions of bootloader and kernel and the regulator core sets > the minimal power but cpu clock stays the same. CPU hangs somewhere during boot. Why not just add this OPP to the table the kernel knows about? Clearly it's something the vendor set and presumably thinks the device can actually operate at. As far as I can tell you're only having problems here because you've got a software defined regulator but haven't given the software information about this configuration so it's got no idea what's going on when bootstrapping. > The core problem as I see it is if regulator is bound to CPU (or some other > complex consumer) it can't be changed except by the consumer at any stage. So > the regulator driver (core part) should wait for the own consumer to init > it properly but regulator can't be in unknown state after probing. If the regulator is configured outside the constraints configured for it in the binding then the core will bring the regulator within those constraints, some systems with regulator configurations fixed in silicon rely on this for correct performance. Regulators with unreadable hardware are very much an edge case when it comes to this, what works for one system will be broken for another one so we just have to pick a behaviour that will hopefully work more often than it breaks. We can't rely on consumers setting a voltage since consumers are only expected to set a voltage if they are actively managing it at runtime, other consumers should rely on system configuration. --3aWJOhdwdUY4seBS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmZnHb0ACgkQJNaLcl1U h9BW6Qf/WIuMS8uIx2ZHM7+DDfzW8oMEPSZhAn+6hAHbZBFtXbaN9EV+/5XBs3Nf 8FxLWoXL3BAnNBWyjJ+9czOV1j9HN9tkafoxo18nQszEKymJ2YpDqV5bQr+02UpE 9RZkGX2nQneh4K8sM7wQkYCfSZL5GsrgnW8qDtOkDNyhjyZ08qZ9OhmHzmeg2EZl FbzerDL3ScuXNIrGoTOz2F+VecOae2hA/rQ3/MyK5Ia0GGRA4wdQi66FmzUxY4QQ WknYteXBroHzq1eBn08gdug5PdrLjBCN+m0VBUlI+bjAarEpehVH6/PTt3nJRypP pKryb9HMCkXp8RfNmfqMcR1GigqWBQ== =zXqV -----END PGP SIGNATURE----- --3aWJOhdwdUY4seBS--