Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2973347rwl; Thu, 13 Apr 2023 13:45:16 -0700 (PDT) X-Google-Smtp-Source: AKy350YGmtnL1/00JBKNw1TNlHA1xoMfFK38Jf+548oGexZ/oWV7/i/TQZRXgasThghPBfp2MBWX X-Received: by 2002:a17:902:f811:b0:19f:87b5:1873 with SMTP id ix17-20020a170902f81100b0019f87b51873mr210189plb.62.1681418716654; Thu, 13 Apr 2023 13:45:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681418716; cv=none; d=google.com; s=arc-20160816; b=HcXwVCHK7mEDsBrvblNEBzmLz1sfzhLCCjArJkrrRRdPPgt0ubDCkxQAmI29JzA6UI X9ujTm4XXld1YntHD5nuXd93JbUUu87KVPf4eC0f61Q+V8m0fdU8Tz1/4IKcBsLoDZVu zhGa6BB/5WJCW2kW3jlV8ns0ihaQHHU2Z7rkPzCFnDG5/cHeCxDcJtA1PDpp/ExkJ82X Lgdny36aVfrdD0buxFijxXRKG6jsu5iiyLZG1auvT1fykU0o6MMO11EfMICHPUmLBe2a V9KPSFnBPIq1YbUjntYsLS3XkV21c+cP3QufhieZaDA5a1FTN2X/hK0MRLSXeKzX05p0 KwxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=aQknPjdMp36XN50BA7UPq7UF0PNrURjHD/hSL+RqZ9A=; b=FpYn2LNwPOPQAP4RkPFDjsaAsc/pT5xrTVO0pwBcJT2LzZ+hlv9ezwpBp8nfNJNN7z ZE+KuYZtTJcBhrCa/ZMBa143hWu4CcXpokNg1HpwY5mE/nQnMKt/6prHEW3uHxwO1adG QNLdcXHc1DeXjpNEi4QmUMxFFstZU24vQr/8mF3nLuQErQpq12v7hINpcESFbElqIGIf HFaRK8nkAxKnFBdiDuQi7AuEkAoi+U8Zd4P5n5e8ZipTi+f1yqGtXTJEGCB0xWZbtT3d Uv8WMH8KsYsJ0h+WqE6mHqdoeU5rwZoNI9BMYNvajIxvQa3+C+DBjoLrNLoitKUHEM2m GbaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=kmYPb5E7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g23-20020a63f417000000b0050fab1dcafesi2777731pgi.109.2023.04.13.13.44.36; Thu, 13 Apr 2023 13:45:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=kmYPb5E7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229689AbjDMUhL (ORCPT + 99 others); Thu, 13 Apr 2023 16:37:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbjDMUhK (ORCPT ); Thu, 13 Apr 2023 16:37:10 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CE224EDE; Thu, 13 Apr 2023 13:37:06 -0700 (PDT) Received: from [192.168.2.90] (109-252-119-170.nat.spd-mgts.ru [109.252.119.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id 0C865660321C; Thu, 13 Apr 2023 21:37:02 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1681418224; bh=JYou/upPsTWTi2mO280E/Fj7pMcfP3hcdjqr6bkXksg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=kmYPb5E77nAg+/FHO4VVWar0Dy0Kh8V/cOreEgC+SvI9k8nlkPj8uDq0c7vWhvf4o i4AVdGEkxBWj17e9JLmJSZJOOfiGrvspDo83iRx+jqmHNo6eh8cxBevfcsH95nZlHh ZllYQkWyIyZkwe4Hz4QWlPfTCiDLnVSfjuNrsd4Wa3Yavz3AqsULPsvjQfchBGsd3R EDVNpjPj6fKnv7qSdUqDKdQHxgHCUpxpglOBxyOtBBtupjlKs3I0qKEXK9Z5x3ybpO EAPjrcyPorP2Ce7KANEowPx5kiB/OJ0K3aXdYYIDClmvAUA0iNxZ0PWYIXA8nZXdiQ 95yGQRGjtdeZw== Message-ID: <2df6f002-dcf8-1073-d0b5-a9843103096a@collabora.com> Date: Thu, 13 Apr 2023 23:36:59 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH v4 3/4] mfd: tps6586x: use devm-based power off handler Content-Language: en-US To: Benjamin Bara , Wolfram Sang , Lee Jones , rafael.j.wysocki@intel.com Cc: peterz@infradead.org, jonathanh@nvidia.com, richard.leitner@linux.dev, treding@nvidia.com, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org, Benjamin Bara References: <20230327-tegra-pmic-reboot-v4-0-b24af219fb47@skidata.com> <20230327-tegra-pmic-reboot-v4-3-b24af219fb47@skidata.com> From: Dmitry Osipenko In-Reply-To: <20230327-tegra-pmic-reboot-v4-3-b24af219fb47@skidata.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/13/23 10:46, Benjamin Bara wrote: > +static int tps6586x_power_off_handler(struct sys_off_data *data) > { > - if (tps6586x_clr_bits(tps6586x_dev, TPS6586X_SUPPLYENE, EXITSLREQ_BIT)) > - return; > + struct device *tps6586x_dev = data->cb_data; > + int ret; > + > + ret = tps6586x_clr_bits(tps6586x_dev, TPS6586X_SUPPLYENE, EXITSLREQ_BIT); > + if (ret) > + return ret; > > - tps6586x_set_bits(tps6586x_dev, TPS6586X_SUPPLYENE, SLEEP_MODE_BIT); > + return tps6586x_set_bits(tps6586x_dev, TPS6586X_SUPPLYENE, SLEEP_MODE_BIT); Handlers must return NOTIFY_DONE or notifier_from_errno(). Sorry for missing this previously. -- Best regards, Dmitry