Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1618620lqm; Fri, 3 May 2024 00:36:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXE1Ghxs/qKIWo+34UvbKpfyEUZ1sNCacGmpwV8I/ev9+cFuqyxXVXk+pNQnwkfpqWhPsx9n7rylKnRq5LPXltwo581Pbd/uDxAL5RLsA== X-Google-Smtp-Source: AGHT+IFE1OuLsdlpMSFYPRXc+b5O7YwxSK1xRkT+1pykWBCPBEQ8DFeYZANPqbjK2LytNylV7RHK X-Received: by 2002:a17:902:e548:b0:1e5:5ccd:30e1 with SMTP id n8-20020a170902e54800b001e55ccd30e1mr2136415plf.65.1714721802431; Fri, 03 May 2024 00:36:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714721802; cv=pass; d=google.com; s=arc-20160816; b=pXPx+5hcK6p2MrQWpjpOZBlb7yhNeI95qjg4Jm/7u/xKc7UwXrHMAOdc0jmoLnBja1 S5xFm4eSZjk7/XRRDMIDoXrGP3/xlAnsId5gGtV+wo4FpS5xKIofIXYbpoSaIbSAWZ+C gRngJnYTTwbo/3Oww/FpkBQFOmzVHDh1o8fy1QftdO8sNSoi3QXTvKJsk4yW60Q4QaVB 3CuCTAfW26/P5CzJ1GaPqz5jaLisQPYF1kPaFc+8lzlvspO1cMFNSSGeDjvO86b4Yhev lHLgNsEH3hTHP9TzukQ6Tq2Hy9gRS4x/kOHxT+BwaRXSUK8McJxeWzRFgFgpoC6nI1WC FRAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent: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=10xZCuql4TPgrgP4qz5sC2A8B87AtLlLXWNSC/pTUbw=; fh=4BpfHvGCXcuHf0ZM3OC2QifmOKbxkUSFf2USw2qsbAM=; b=ZBfjOCKlswrVtERTrlj6zcXA7winTYWgl16euYFUSdYwe8DOVKxPR0UFq0cpuGOgyz zggyTz6M18Az0vF1mfgyzPgpE54ypb0XwOH4vo34ymyMKzUV859ftXdb8QLeJhqrNV2W GxhSG6LS2Ubtjn5oyNjErAsxi2j+EyNrUQS8LJN0b3l8jYU2o9PqtlY4PzrYOqTdvHLS HRBX/SLRUoAR3iuv+3HtzvDDR1xFVqt6kxA+/MzDGzUYzGnq/b1Hdipbfnt8O/0nnfhU yOstecW9WAFolF3EmTqUOuNlRTJ8t+555qF5ySkp5sqP3Q2+RphpmbFPcS1DUe3WalNy pukg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@richtek.com header.s=richtek header.b=zgH0Y8RL; arc=pass (i=1 spf=pass spfdomain=richtek.com dkim=pass dkdomain=richtek.com); spf=pass (google.com: domain of linux-kernel+bounces-167323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167323-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id iz4-20020a170902ef8400b001ecc732320esi2361227plb.299.2024.05.03.00.36.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 00:36:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@richtek.com header.s=richtek header.b=zgH0Y8RL; arc=pass (i=1 spf=pass spfdomain=richtek.com dkim=pass dkdomain=richtek.com); spf=pass (google.com: domain of linux-kernel+bounces-167323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167323-linux.lists.archive=gmail.com@vger.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 568ECB213F3 for ; Fri, 3 May 2024 07:36:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8A711474D7; Fri, 3 May 2024 07:36:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=richtek.com header.i=@richtek.com header.b="zgH0Y8RL" Received: from mg.richtek.com (mg.richtek.com [220.130.44.152]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5802B146D5B for ; Fri, 3 May 2024 07:35:55 +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=1714721759; cv=none; b=XVprmk+5TWBRuoCp1cj44AjnHfCeL1jOBhSS+cJ2MCB9jZE29a9jT3oj1vXbYfH3um/z6gepEmRrSzzBSBe3Hm4tXHbxlxlQl1fpeCXGU0glc4b8Ym9wLs8CFFAZHZLcdegZJX16/3BVUT0oIptt6Q9KwzxFlTWknpvYSsIhy9w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714721759; c=relaxed/simple; bh=5Rs3pBpzgm60FTVaM6YXseZbN560iglv7RG+Vh9AXrw=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qUEfEYFXYx859RTCdM3DITLM+klInqRw1aW0DaJiSFQGlR7sTidGcASsqgatqpR2K0BF3INC69jNklmr4aZ0jawldCXB2ZvqMG9fiSPL6C29ViyllLLEy+5pMgn9zmfZSQBoOTrteP9L254OLyOoR54vHMIkJfi0RX2fZAWlbgQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none 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=zgH0Y8RL; arc=none smtp.client-ip=220.130.44.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=richtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=richtek.com 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=1714721749; bh=10xZCuql4TPgrgP4qz5sC2A8B87AtLlLXWNSC/pTUbw=; l=1345; h=Date:From:To:Subject:Message-ID:MIME-Version; b=zgH0Y8RLTIq7autOsJqemXRl/P/UHs1PqkozOKhB8zn0AVXJrSYkwfHjMYJFnIxUL OjT2WxncrGCxORsX+0fH7yJtbG5cj9ltwwyitFLd23/w+ie9Z41y/L/RsxSyYI4NNj W5BwVTmHfNhmObONUoLdf9qETSe/KsBx+/PyXVj9i+UK0EYedZkbvzm59nHzzRO1f1 gmJtmPdARrX1NvDvI8WPimzRgwxlwc1k2NVec9aAncpvEYm+xjTVZxqPcR4jxIFCfw 2q3fEVJvK1r25JxShARwbcFsnHF22Oq19y8djxa2d+xEeMhUvk0S+rvLl8m+oDTkEM zW23cy8Dm7mNw== Received: from 192.168.10.47 by mg.richtek.com with MailGates ESMTPS Server V6.0(398666:1:AUTH_RELAY) (envelope-from ) (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256/256); Fri, 03 May 2024 15:35:37 +0800 (CST) Received: from ex4.rt.l (192.168.10.47) by ex4.rt.l (192.168.10.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 3 May 2024 15:35:36 +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; Fri, 3 May 2024 15:35:36 +0800 Date: Fri, 3 May 2024 15:35:36 +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: <20240503073536.GA12846@linuxcarl2.richtek.com> References: <20240502073029.GA4055@linuxcarl2.richtek.com> <20240502092614.GA31518@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 Fri, May 03, 2024 at 10:41:04AM +0900, Mark Brown wrote: > On Thu, May 02, 2024 at 05:26:14PM +0800, Alina Yu wrote: > > > For the fixed LDO Vout, it will be set to either 0.9V or 1.2V, which are outside the range of 1.8V to 3.3V. > > The determination of whether it is fixed or adjustable lies solely with the user. > > This modification aims to ensure compatibility with the user's application. > > 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 ? which is the proerty I add in v1 patch series to let the user determines whether the LDO Vout is fixed or not. + fixed_uV = of_property_read_bool(match->of_node, "richtek,use-fix-dvs"); + + if (fixed_uV) { + desc->n_voltages = 1; + desc->fixed_uV = init_data->constraints.min_uV; + desc->ops = &rtq2208_regulator_ldo_fix_ops; + } else { + desc->n_voltages = ARRAY_SIZE(rtq2208_ldo_volt_table); + desc->volt_table = rtq2208_ldo_volt_table; + desc->ops = &rtq2208_regulator_ldo_adj_ops; + } Thanks, Alina