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=1796242472; b=T2CtvllPcqFTpk/xiGA06YZrXk/OwhKPB81kwqOVyR+qGz4zFvOI4YS0KRozARJWj9fT gsWKRlzf4VtZPGSwqczDE7r/F1U2gN10fO2LdGwr0z2NHlVl9pX9TXsKUJDtoq0AWkNQA Svc58CPrIiPZ+BWf6SZWjFSCWytxeGyzRaYFiqoqulGkZjgwYa8rD6LGdoYkZmAJ2Sutn p819rXpFCRDXUIdMHQKX4RsVwpBQUynteIE2sZYrq8FFHWLns7sn5YbGtt0evSv57rA2O Av+fYfkuT72rYs4q1Kd0uPhvmda8k6MP6JPX4azDDFT7wzOBAedFGTpO0pvGhGUijDQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796242472; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=UfLaBT81GcLHkh0eV6eFbPTz5c53gzxni1oBMlhZRh4=; b=BCyfh1Vxo6hJ4dCWCqXmJ1yq2ag6Ihr+9Eh2JoWVrrM+RAgP2Qk8bpjTS9tUZVDC2ibl T52T15w2fgnhHqbKD5Wy4tfliBffsM94n7elIdcFwsUFfy7LnjbEfatO2CsB9jR/8upUO C3Hqo1uOwyiWfuFnJa6A6ynlKg+rP6mERXV0sKrc51KrEkyQ8mPAO0+7zE/7TVQYoIE1U sI1mBlHS+SN9XyDljhOont6Gvw+24nDpFV/XH1k9xtARbMzx/N/E/evcja1lCKxbH998+ +hCDwWW7KATAaPkbJ+PxD8BlIe8Dv8bpHVDLSnijdXGXi4qb/Z11xiMJgIlZxnZPZSg== 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=GsDBQOAc; 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 810E4606A322; Wed, 2 Dec 2026 20:14:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GsDBQOAc Received: by smtp.kernel.org (Postfix) with ESMTPSA id A472F1F00893; Wed, 2 Dec 2026 20:14:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796242472; bh=UfLaBT81GcLHkh0eV6eFbPTz5c53gzxni1oBMlhZRh4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=GsDBQOAcTruqaONz+MvfKKW7DFvtVbJUALbsgn3txaFl3IbqTsA7+vwLAoVhPOn+P lRDibmOMoBDaXRQGBNde1uFwenEtr0MiVR1Z2MLCfLHv//1LMN5J2X6nrMVIa5C3Kw Gmgk9l5VoCt7G2p36SCSQv3C8QsnpV6e8kjse19JSNZU5+xTc00EQE4lN3NLBsvjHC wksQhV5MYRD0kzStWNrfOWqabIBu+JVjfk0xZbEr72IdjvcBQA6V1dGHQOIpB8Kq4G ISg0W0p3yAHGWpcrQ6ZGsPUNn1cGNWrHusGpxqX9+asg0xSOwSRB+7aFbDMFLbVmRu MF/xiBfnR5fwA== Date: Wed, 2 Dec 2026 20:14:27 +0000 From: Lee Jones To: Svyatoslav Ryhel Cc: sashiko-reviews@lists.linux.dev, devicetree@vger.kernel.org, mfd@lists.linux.dev, robh@kernel.org, conor+dt@kernel.org Subject: Re: [PATCH v6 4/5] mfd: max8907: Convert to use device managed poweroff handler Message-ID: <20261202201427.GG98551@kernel.org> References: <20261123150224.199601-1-clamor95@gmail.com> <20261123150224.199601-5-clamor95@gmail.com> <20261202164246.GN43081@kernel.org> X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, 02 Dec 2026, Svyatoslav Ryhel wrote: > ср, 2 груд. 2026 р. о 18:42 Lee Jones пише: > > > > On Mon, 23 Nov 2026, sashiko-bot@kernel.org wrote: > > > > > Thank you for your contribution! Sashiko AI review found 1 potential > > > issue to consider: > > > - [Medium] mfd: max8907: max8907_i2c_probe() drops > > > maxim,system-power-controller check > > > -- > > > > > > commit b8bc64d186feb8ec318721e193d4a0bf70c6eebf > > > Author: Svyatoslav Ryhel > > > > > > mfd: max8907: Convert to use device managed poweroff handler > > > > > > This commit replaces devm_register_sys_off_handler() with > > > devm_register_power_off_handler() and switches the DT check from > > > maxim,system-power-controller to of_device_is_system_power_controller(). > > > > > > > diff --git a/drivers/mfd/max8907.c b/drivers/mfd/max8907.c > > > > index f1cabb666d8ed..5d17971a8e9ab 100644 > > > > --- a/drivers/mfd/max8907.c > > > > +++ b/drivers/mfd/max8907.c > > > > @@ -189,8 +189,6 @@ static int max8907_i2c_probe(struct i2c_client *i2c) > > > > struct device *dev = &i2c->dev; > > > > struct max8907 *max8907; > > > > int ret; > > > > - bool pm_off = of_property_read_bool(dev->of_node, > > > > - "maxim,system-power-controller"); > > > > > > > > max8907 = devm_kzalloc_obj(dev, struct max8907); > > > > if (!max8907) > > > > @@ -241,12 +239,10 @@ static int max8907_i2c_probe(struct i2c_client *i2c) > > > > if (ret) > > > > return dev_err_probe(dev, ret, "Failed to add MFD devices\n"); > > > > > > > > - if (pm_off) { > > > > - ret = devm_register_sys_off_handler(dev, SYS_OFF_MODE_POWER_OFF, > > > > - SYS_OFF_PRIO_DEFAULT, > > > > - max8907_power_off, max8907); > > > > + if (of_device_is_system_power_controller(dev->of_node)) { > > > > + ret = devm_register_power_off_handler(dev, max8907_power_off, max8907); > > > > if (ret) > > > > - return dev_err_probe(dev, ret, "failed to register sys-off handler\n"); > > > > + return dev_err_probe(dev, ret, "failed to register power-off handler\n"); > > > > } > > > > > > > > return 0; > > > > > > [Severity: Medium] > > > Should max8907_i2c_probe() continue checking the legacy > > > maxim,system-power-controller property as a fallback alongside > > > of_device_is_system_power_controller()? > > > > > > of_device_is_system_power_controller() only checks the standard > > > system-power-controller property. In commit "regulator: dt-bindings: > > > maxim,max8907: Convert to DT schema" earlier in this series, > > > Documentation/devicetree/bindings/regulator/maxim,max8907.yaml keeps > > > maxim,system-power-controller as a deprecated property rather than > > > removing it, and commit "mfd: max8907: Remove platform_data based probing" > > > notes that external DTBs may exist. On a board booting with an existing > > > DTB that uses maxim,system-power-controller, max8907_i2c_probe() will now > > > skip registering the power-off handler, leaving the system unable to power > > > off via the PMIC. > > > > Do I assume that your silence means that you do not agree? > > > > I usually like submitters to at least acknowledge the warning. > > > > Literally in the commit message: > > "There are no in-kernel users of maxim,system-power-controller property and > all new users will use generic system-power-controller so check for the > legacy property can be removed." Interesting that Sashiko didn't pick that up. -- Lee Jones