Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp834484rbd; Fri, 23 Feb 2024 05:11:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVzNYAuSY3uasvbtbqa/JI9nIUi+FAdI1YZ7sjdWTl66PB4d7U9TpdVyTYUX1lrKyeFwnaqpKL0ssAj4oUnbeSy58tMP1DmuuCVzgJVpQ== X-Google-Smtp-Source: AGHT+IF/f7F6lnC03ANXi6iT2wa2//VRM8h4AuVmaqAe3Z5U0eO09wzUHb6c9M1Twf5URiF0+eti X-Received: by 2002:a0c:f54b:0:b0:68e:fa3b:5bc1 with SMTP id p11-20020a0cf54b000000b0068efa3b5bc1mr1533111qvm.31.1708693907877; Fri, 23 Feb 2024 05:11:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708693907; cv=pass; d=google.com; s=arc-20160816; b=WGGM/Zh2Un/+x+0eydqHt2K/Nozi6Fj8097i+CPtHSktNI9/8TZqnRFuAZo1/ASHAf 2hYZxya6KpqrGeU7TILIeqbF4R71fp6DSxCUQmKYoGB2QgYHQmumHZeBdwslXZU8+erX zj4x0jvyJuEegQpSES33U6CuRBHF3zPW+zcdHCSkS61hX0M7exNssXDksucYmNU0RjLf ONU7jLP5QhpxmM4tC8bv7RqbkbuCtz9bB7bz5R8GeqWRBeLoHQFoct4//vAQwZBsb59M Q5rldnA4dhlbk4P23VQGOC2WZjux90zfSUGN9oeB2xxSZhqFL9fyRDA9SHX23W4Dgput Tbyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from; bh=gzJ5+xvaN/hg/ycejUEXeugsA44h0L1EdN02+hdjvK8=; fh=NhZ9u6hk/GWOhXXFpZaLopJNCy8ghkuBBEm9RDxDwfE=; b=De1R1Ru15hWNkGqt/dV7TcLGEo78sZKTA1uqo5gEKVwzYefakXKf90E6DPrnYLE0u+ SQfcrDilcbG4hhn9CWsYB29Ayu7InOBJeIqS9jjxiOAfedzWQfseAj/OApJNtLEFwwKi Dg47523A1x8I3+hQeD6ueRh3dHpERmkS/aMNEHRF139qzU/YPoGgpj7Q76e7FtJwI4Ud 3DDWh9iTy3ImJE/GC1qjQenXvxeGxdkwZNRkpgt9hI487Z2+QAoxndh0qTzHhkVm/ZWY FTgqmVBSBaxe4BRvrPhADwjAAAskBd+M7Qj2Aj71BpcvCSgdzYaGLovieiFQMgucxD9+ Iw0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=0leil.net); spf=pass (google.com: domain of linux-kernel+bounces-78352-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78352-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id hf9-20020a0562140e8900b0068f69ef1ddesi11563076qvb.397.2024.02.23.05.11.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 05:11:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78352-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=0leil.net); spf=pass (google.com: domain of linux-kernel+bounces-78352-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78352-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8CDAD1C21402 for ; Fri, 23 Feb 2024 13:11:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E7EFF7E799; Fri, 23 Feb 2024 13:11:41 +0000 (UTC) Received: from smtp-bc0e.mail.infomaniak.ch (smtp-bc0e.mail.infomaniak.ch [45.157.188.14]) (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 9C5B65DF00 for ; Fri, 23 Feb 2024 13:11:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.157.188.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708693901; cv=none; b=L6wpV3D6mC/l7duemZ4lBIWYruV0IB4437wO2vMBGh2RT4d9I327f/NkQtPnPEj21HfBHnpnS3KLr0kvSftNa/ok9cu+oZ+IojPXQ+4TmUbY6zNsC2sd0oQTTlgW/X7JviYqLVAPm+59+/Ok0W0q9Qj104NhTkVQY8O2D5t/IcA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708693901; c=relaxed/simple; bh=0EmZbA6Z/VNF5c7++YIeS8HzXck5oR/WMMWqA0pYtD0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qOCWM4Za/TNl2nck9LW2ri7Qyr8HQNAvPseeVLzHrOmLqZSd4MjbNb1Jlmtlaunw0BkepO/6/TCP9lXJRB9PQ4HgktiKWlvyoYWVMhinO9oOdcENyxwqrR1svPJXlD9nZMGBd1n2O4G+Rof9O1DZkcvUWg4eb2FFB0sIjbDWrHE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=0leil.net; spf=pass smtp.mailfrom=0leil.net; arc=none smtp.client-ip=45.157.188.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=0leil.net Received: from smtp-4-0001.mail.infomaniak.ch (unknown [10.7.10.108]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4Th9Q03TwQzMs1Yf; Fri, 23 Feb 2024 14:11:36 +0100 (CET) Received: from unknown by smtp-4-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4Th9Q005gGzbZW; Fri, 23 Feb 2024 14:11:35 +0100 (CET) From: Quentin Schulz Date: Fri, 23 Feb 2024 14:11:23 +0100 Subject: [PATCH 2/2] regulator: rk808: fix LDO range on RK806 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240223-rk806-regulator-ranges-v1-2-3904ab70d250@theobroma-systems.com> References: <20240223-rk806-regulator-ranges-v1-0-3904ab70d250@theobroma-systems.com> In-Reply-To: <20240223-rk806-regulator-ranges-v1-0-3904ab70d250@theobroma-systems.com> To: Liam Girdwood , Mark Brown , Matti Vaittinen , shengfei Xu , Sebastian Reichel Cc: linux-kernel@vger.kernel.org, Quentin Schulz , Quentin Schulz X-Mailer: b4 0.13.0 X-Infomaniak-Routing: alpha From: Quentin Schulz The linear ranges aren't really matching what they should be. Indeed, the range is inclusive of the min value, so it makes sense the previous range does NOT include the max step value representing the min value of the range in question. Since 3.4V is represented by the decimal value 232, the previous range max step value should be 231 and not 232. No expected change in behavior since 3.4V was mapped with step 232 from the first range but is now mapped with step 232 from the second range. While at it, remove the incorrect comment from the second range. Fixes: f991a220a447 ("regulator: rk808: add rk806 support") Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- drivers/regulator/rk808-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index bfab5468cc54..d89ae7f16d7a 100644 --- a/drivers/regulator/rk808-regulator.c +++ b/drivers/regulator/rk808-regulator.c @@ -1023,8 +1023,8 @@ static const struct linear_range rk806_buck_voltage_ranges[] = { }; static const struct linear_range rk806_ldo_voltage_ranges[] = { - REGULATOR_LINEAR_RANGE(500000, 0, 232, 12500), /* 500mV ~ 3400mV */ - REGULATOR_LINEAR_RANGE(3400000, 233, 255, 0), /* 500mV ~ 3400mV */ + REGULATOR_LINEAR_RANGE(500000, 0, 231, 12500), /* 500mV ~ 3400mV */ + REGULATOR_LINEAR_RANGE(3400000, 232, 255, 0), }; static const struct regulator_desc rk806_reg[] = { -- 2.43.2