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=1796229770; b=XeITRy6QY0J8f++byCSds/O6+qFzVNTnWkUCkBgQ9vpYFfmdm81iiAy5X/bLoS7fzzZZ KULOLqmQ/iFrGm6YLfjC/PVKhA8rbYGZByVjhheezxBZZ7ppam32aCn55LE03fj/NUEDU FhENKM1D35lXulljhvobU9JffW2ajuUpRfpYAsH56R8wojx+/1/hpvyTd1Kd7Rclocbf4 +6zMoC3gaaMdTJg3CIluiLk04k2L1lNrC0aQXEJrTUB75t+bMLaBfHO+W5kHKoUgwEj/c qWfYzsAjnVEpP41wre0hj/ht69NGYLVhJwEvo+fP8viq8Z4QtpzUG5CGAKE7vPj5fTQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796229770; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=cKCz/EcswknIT7An8dUryFaCdtgXr5nUSB8DzOv8Ug0=; b=ksZ90I7H5aw3mH+V3bCUKD9NPAj/zvEH7ZYoxZitBetzBMPkkQHABZKbzVjl6nM1svF9 w5lVeMHNtHfaEOi+rkHL1oizzHW3vMOEoE+XWZnNJjRS4tKknz85tKIWKFq1Q6qvuoOo3 9XJ4Hr+bpjvf1BWVG2u5XWl/Q4NULGbg+yXYRPOVJY908cKWvBHgLIrlsEWwjWnN+7y1q A98KFDJe8F9DH+NIBTGmcevLnIAT2GFRdKgBDV1E9KbMDhzhfxFbfxWnaNfy1cnonLcJn wvlnVZCUT6PE773IA1fYbOG8RQGovyzBbW97zvPkVBcPBwrclF1g/x5223fGeByzN8w== 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=g+aR9JZ0; 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 C0C5E606A31A; Wed, 2 Dec 2026 16:42:50 +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=g+aR9JZ0 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 071C01F00893; Wed, 2 Dec 2026 16:42:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796229770; bh=cKCz/EcswknIT7An8dUryFaCdtgXr5nUSB8DzOv8Ug0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=g+aR9JZ0yNuylvBwZmvVyTUPxTFPfx6e1ZjT6eG+BnCKo6b1F+dAMQEsvk5mpuyn1 bK8JBgJbt9yg8AhBPwvzhtWD17X2U6XL8e4Dclfa5WzeV3iaJsf+li1ZzyIqCM6YdD Xs+VIrOFPN/Cemz6l4gQsmbnjDGPEFETk6Pj6lrQhNlWdcm8f22unJNYc/9op+zCBB 2UpeMaoYYUhHDZT4lmADDnsno8MiibyPOtjvrUN9CdiGGwfWd/yTlwJ5kvo1EeVw7L giVtF/Lkg+NzxRDijg3yFptyq3p83KbeqTISEBXFQr9PIBYSGpzTf1VN7Orzz61DZM /ZL33+Wd9sMyg== Date: Wed, 2 Dec 2026 16:42:46 +0000 From: Lee Jones To: sashiko-reviews@lists.linux.dev Cc: Svyatoslav Ryhel , 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: <20261202164246.GN43081@kernel.org> References: <20261123150224.199601-1-clamor95@gmail.com> <20261123150224.199601-5-clamor95@gmail.com> 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=us-ascii Content-Disposition: inline In-Reply-To: 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. -- Lee Jones