From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796230493; b=hMqIhSqnOFKVLxEsoIM668kvMiu5Vvyp08iAnXugniq46MyagiimUrIC76rFMGk3xOQK d1s5exqBXVD/cWQHGTAA6kfKwokI5d7+Iy71MDlGpcqKhu1w0A3cXl33YwQsVSXt93Y/j 7KIMbVonrvZJ/R6b1oP19bFOzFy7DYrNebw5l3ZHJoU4WwmPecwIbcxrQ5ipYn77vsNnO /YtJ5WEeWl71Cd2CSfDBenZdfvGklZr5MAPNKv2fj8i9g+NUKqAoCvZR5ySmdc6H3BuhN 4zmlJSXBgSkxd/EGe9cokUjr0CBNWuz6TstmMM5TIJjU1obMbRD8IMl38YkdF8qgkeg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796230493; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=MEAyyv+D3h/QnYJIZUyMKNlo9oCVx8f8Xm+BF5R1Dv4=; b=j0gas102U+OlLx/CofIcIISrEE43aJigEp5icqIm52zVeEA6O5tguY0OObjpI1cxMWf+ zz8Sxo3xDznWpO3MnF2bpKwyqulZMxvHt52Exf+SYmYGYZa/S0hd35N7HBXmLwoFAzwqd kspVFY8OL/D5y3I4UY9af9ypCei5AAhL2AM/hCxrQ7VQV/v0b0tYJMAVG2w9GBDhOCy6R EAvfAU5oEbejewziNEVBa5YTq6Uvrj+hJ+hBw/YlAIzCVUffpla8k4uk/dFtkFFbsnSAE 3i9VrpBdOk4OEx1AOt2tfFoQdSiEC1Cc2jRzdCeA9FQmOCE/dYMgT6kFcgHMlBis6pQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=RHEU7Owk; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3B0F606A325; Wed, 2 Dec 2026 16:54:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=RHEU7Owk Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA4F61F000C1; Wed, 2 Dec 2026 16:54:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796230492; bh=MEAyyv+D3h/QnYJIZUyMKNlo9oCVx8f8Xm+BF5R1Dv4=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=RHEU7OwkpnwiXYY3eb33G3MvtRhFLMnAIDtXScq99FbEPOcbuYjW+SagJgWxsGmzG wbL20qOdbPvGzpHD0TLCjvTD1OLbWIxwgrOd5j4laGYDPjPlUqvO3VAtpgKu65mx8S rnsVN2dqpWa2P6C+H9U2HFQge/kW0Bge0l+7KFYdIpE/IJObfvW9QF22FKQzr1GJmm zN6e5i/e/8+9IpwfezXCEvSNfzR57hyk7hDcVxwK5mohIY/NVKQaZ3SDR7JxuVAo2b JF5r9/3aka8AD07ujPKSuOk7kCRmwSnJ6nYy3R1zX/Hf6hnqX5fdRml9xRev8btOl1 l8GXtjIdStsvw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 2/3] regulator: Add Maxim MAX17135 driver Reply-To: sashiko-reviews@lists.linux.dev To: "Michiel van Beers" Cc: devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261202-max17135-v1-2-beae6b70d575@gmail.com> References: <20261202-max17135-v1-0-beae6b70d575@gmail.com> <20261202-max17135-v1-2-beae6b70d575@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 16:54:51 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] regulator: max17135: range clamping marks VCOM programmed in max17135_probe() -- commit 35331644fea93af4e5f64e9e127a8eda105b1887 Author: Michiel van Beers regulator: Add Maxim MAX17135 driver This commit adds a regulator driver for the Maxim MAX17135 E-paper display PMIC, exposing the vposneg and vcom regulators and creating an auxiliary device for the temperature sensor. > diff --git a/drivers/regulator/max17135.c b/drivers/regulator/max17135.c > new file mode 100644 > index 0000000000000..b192a228d0aa6 > --- /dev/null > +++ b/drivers/regulator/max17135.c [ ... ] > +static int max17135_vcom_set_voltage_sel(struct regulator_dev *rdev, > + unsigned int selector) > +{ > + struct max17135 *ddata =3D rdev_get_drvdata(rdev); > + int ret; > + > + ret =3D regulator_set_voltage_sel_regmap(rdev, selector); > + if (ret) > + return ret; > + > + ddata->vcom_sel =3D selector; > + ddata->vcom_programmed =3D true; > + > + return 0; > +} > + > +static const struct regulator_ops max17135_vcom_ops =3D { > + .list_voltage =3D regulator_list_voltage_linear, > + .map_voltage =3D regulator_map_voltage_linear, > + .get_voltage_sel =3D regulator_get_voltage_sel_regmap, > + .set_voltage_sel =3D max17135_vcom_set_voltage_sel, > + .enable =3D max17135_vcom_enable, > + .disable =3D max17135_vcom_disable, > + .is_enabled =3D max17135_vcom_is_enabled, > +}; > + > +static int max17135_vcom_of_parse(struct device_node *np, > + const struct regulator_desc *desc, > + struct regulator_config *config) > +{ > + struct max17135 *ddata =3D config->driver_data; > + u32 min, max; > + > + /* A single voltage in the DT is the calibration of this panel. */ > + if (!of_property_read_u32(np, "regulator-min-microvolt", &min) && > + !of_property_read_u32(np, "regulator-max-microvolt", &max) && > + min =3D=3D max) > + ddata->vcom_programmed =3D true; > + > + return 0; > +} [Severity: Medium] Can constraint clamping during devm_regulator_register() prematurely mark ddata->vcom_programmed true when the device tree defines a voltage range (min < max)? When both regulator-min-microvolt and regulator-max-microvolt are specified, of_get_regulation_constraints() sets constraints->apply_uV =3D true. If the chip's default MAX17135_REG_DVR value (such as MAX17135_DVR_POR at 3.05 V or MAX17135_DVR_FACTORY at 1.77 V) falls outside [min, max], machine_constraints_voltage() clamps the voltage into range by calling max17135_vcom_set_voltage_sel() before devm_regulator_register() returns. That writes the uncalibrated range boundary into MAX17135_REG_DVR and sets ddata->vcom_programmed =3D true, which suppresses the uncalibrated VCOM warning in max17135_probe() and allows max17135_vcom_enable() to enable VCOM at the boundary voltage before a consumer sets a calibrated value. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202-max17135-v= 1-0-beae6b70d575@gmail.com?part=3D2