From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mg.richtek.com (mg.richtek.com [220.130.44.152]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E909B1A2C15 for ; Wed, 8 May 2024 06:54:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.130.44.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715151254; cv=none; b=q8WDzePiEjhd0+9n+ziz/1X3mYi0VZIR/lBFEf+90vGnykGqEHyWMp43o52wa3Duyvl7EvktGlmOgcXXV7EFk9Rj6tMnYdESQ+Jzd9OZeqwpfH3H/XyLSkU3+7JZ13BXmpwTa6GbHlXNism4R5y7NKPEIsJKsWxxCOmgol/Nmck= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715151254; c=relaxed/simple; bh=xIoMqmffSxPfV5FjgBtnb8T5GD3hvIO/IaP81W2cQv0=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YC1JvSQ2XlwLr9tQFq3Jbs0qBBhdd7uUpUSvDAj51G22XDj3rLtyDucvzsrmsjOJy2EzWAGo9WJoeniyEqGZk4DIynwYAHCJbgV9mhFvXU7hgdd5gJkskKw9KIStkbiXnsfzwK2SW/AzkMt85NEQTGzUvSLu+BR0HkB1TVvJ0k8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=richtek.com; spf=pass smtp.mailfrom=richtek.com; dkim=pass (2048-bit key) header.d=richtek.com header.i=@richtek.com header.b=JmgCuc5S; arc=none smtp.client-ip=220.130.44.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=richtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=richtek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=richtek.com header.i=@richtek.com header.b="JmgCuc5S" X-MailGates: (SIP:2,PASS,NONE)(compute_score:DELIVER,40,3) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=richtek.com; s=richtek; t=1715151249; bh=1918jXL9WmtXTEmb78kSJ5QpPXxlughiocyx6brgFtk=; l=1360; h=Date:From:To:Subject:Message-ID:MIME-Version; b=JmgCuc5SAvkMpGEleZPhV8hOBuIXm3vqeZzrV+YXOpO7RDW0NjIBPjKknt8/YDrkz DEdPPAU9UEJrR0QH5EKNoxt4RVmM/PtdM5RWTAcENxp+/8j1LOYLJ7sRNhEm1tTo5D bx98dHed0zeNEgepLp85kIWkcVhbQxRi9GfuWUic1MGGg5uY6j39NoX9+t9Bw5kPlD yNPRaSlyd+TFZ3sw68GhYiHUnp9RJx7cggCgyqDrQn5Zcc4/Fl3Wt4h+jl/7B+kPW9 0BVJFKYm7/AojiuFA/iZthTkOHZaQqPPCq2hy1FcnUQWlNBJnxqZywOgcbpfk3YfRX IpLSUIPkqr8CA== Received: from 192.168.10.46 by mg.richtek.com with MailGates ESMTPS Server V6.0(3885208:0:AUTH_RELAY) (envelope-from ) (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256/256); Wed, 08 May 2024 14:54:03 +0800 (CST) Received: from ex4.rt.l (192.168.10.47) by ex3.rt.l (192.168.10.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 8 May 2024 14:54:02 +0800 Received: from linuxcarl2.richtek.com (192.168.10.154) by ex4.rt.l (192.168.10.45) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Wed, 8 May 2024 14:54:02 +0800 Date: Wed, 8 May 2024 14:54:02 +0800 From: Alina Yu To: Mark Brown CC: , , , Subject: Re: [PATCH v2 2/4] regulator: rtq2208: Fix LDO to be compatible with both fixed and adjustable vout Message-ID: <20240508065402.GA7462@linuxcarl2.richtek.com> References: <20240502073029.GA4055@linuxcarl2.richtek.com> <20240502092614.GA31518@linuxcarl2.richtek.com> <20240503073536.GA12846@linuxcarl2.richtek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) On Mon, May 06, 2024 at 11:58:29PM +0900, Mark Brown wrote: > On Fri, May 03, 2024 at 03:35:36PM +0800, Alina Yu wrote: > > On Fri, May 03, 2024 at 10:41:04AM +0900, Mark Brown wrote: > > > > That's a substantail reconfiguration of the regulator, it would be > > > better to have an explicit property for these non-standard fixed > > > voltages rather than trying to do this using constraints, or at the very > > > least have validation that the values being set are supported by the > > > hardware. The code should also be very clear about what is going on. > > > May I add the 'richtek,use-fix-dvs' property back ? > > It sounds like it might be better to add a property specifying the > specific fixed voltage rather than overloading the constraints for this > purpose. May I modify the code into this ? I'll add 'richtek,fixed-microvolt' property in dtsi; remove 'regulator-min-microvolt' and 'regulator-max-microvolt' to prevent fail caused by constraints->apply_uV. + u32 fixed_uV; int ret, i; - if (init_data->constraints.min_uV == init_data->constraints.max_uV) { + if (!of_property_read_u32(match->of_node, "richtek,fixed-microvolt", &fixed_uV)) { desc->n_voltages = 1; - desc->fixed_uV = init_data->constraints.min_uV; + desc->fixed_uV = fixed_uV; desc->ops = &rtq2208_regulator_ldo_fix_ops; ... Thanks, Alina