From patchwork Thu Jul 27 15:26:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Bara X-Patchwork-Id: 1813829 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=Ot63R368; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4RBZPZ4Gkdz1ydv for ; Fri, 28 Jul 2023 01:26:58 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234628AbjG0P04 (ORCPT ); Thu, 27 Jul 2023 11:26:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234601AbjG0P0x (ORCPT ); Thu, 27 Jul 2023 11:26:53 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CAD61FEC; Thu, 27 Jul 2023 08:26:51 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2b9352ff1aeso16516681fa.1; Thu, 27 Jul 2023 08:26:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690471609; x=1691076409; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=HdSNTdHfu3gmfnNmRZ2hSNcbvNs2kLgKcLc95quFvnE=; b=Ot63R368iSKukEqX+qAC4oDZKw7GhuAcTMUwho6PAJxiZPK18ngo6jwMnRNjiuzviz gkNNylRKqi6X9L757EsPpYKtFQbb+RisWEfUA7RsDkNumkHgzLUMmqFLAHr3lKvhDSwK 8PV4j7sGqydTylHtyOuW4gSPtQA2vrTCKNIKIYvCxERNkgGIj0YZBYvAtZgmqR49kRpu zFs6RIg1CIIzvsIpWz9XGwByufeeGFj0TxgY/irWUd3jqAt2Oq3Y1V58/Oe2h2e/Jhgw v2Lr2YfuiySrvgVuQlpMUK9oe7nguXRcd27XtW6kfzZBJwE5OgkWmCXgcpt+DJrRVsha AlDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690471609; x=1691076409; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HdSNTdHfu3gmfnNmRZ2hSNcbvNs2kLgKcLc95quFvnE=; b=eZafKpHztt883cNJSapLYwJPKb4jb6YuijerDHWUQKEep+zHi1LF60auiLjiDF6x6i OPG5Gz6seYUVKeR/3VE0dXH1VNY2whJlOiCmEqM20BK7KS4hBYZysmNAtfK7tj4fAM7e GOfDKZ54AJqN48YY32jSZt+RJvdSu5BIScB1PxURneNvcrpiPh/lRtAECwy3eND1i+Jo L741sUPUFesQm2RKbv1DBMY0Lqhnl1nDAhVbuKax6YZbTLzsx2lRcGVW0OYbK2C0oWt3 huHyGB4cg54COmZEUYoX/W9rKzpi33x6VFrc+dwsydJrlrqNnqZRqv92xC2y8sv15AyK +lKw== X-Gm-Message-State: ABy/qLb0QAiQeJTCOiiglxXyBKsVuIbn/AISvwa5yXICWy5qCD7BzrAh JQPI7OqYKJsl5d+bjgDrGJjZATqU1bi9xaKX X-Google-Smtp-Source: APBJJlECjtY232aDHswklrgmAPFnRUY97te2qhkbwXkITkFGmWaf+ews7rGxaiPlP3xdW7gRsnxVOg== X-Received: by 2002:a05:6512:3c86:b0:4f8:7568:e94b with SMTP id h6-20020a0565123c8600b004f87568e94bmr2351473lfv.56.1690471609243; Thu, 27 Jul 2023 08:26:49 -0700 (PDT) Received: from [127.0.1.1] ([91.230.2.244]) by smtp.gmail.com with ESMTPSA id b17-20020adfde11000000b003143765e207sm2350622wrm.49.2023.07.27.08.26.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 08:26:49 -0700 (PDT) From: Benjamin Bara Date: Thu, 27 Jul 2023 17:26:39 +0200 Subject: [PATCH 4/6] mfd: tps65219: Specify restart mode MIME-Version: 1.0 Message-Id: <20230727-pca9450-reboot-v1-4-c8edb27bf404@skidata.com> References: <20230727-pca9450-reboot-v1-0-c8edb27bf404@skidata.com> In-Reply-To: <20230727-pca9450-reboot-v1-0-c8edb27bf404@skidata.com> To: Lee Jones , Thierry Reding , Jonathan Hunter , Tony Lindgren , Liam Girdwood , Mark Brown , Dmitry Osipenko , Robin Gong , Jerome Neanne Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, Benjamin Bara X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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-tegra@vger.kernel.org From: Benjamin Bara As the tps65219 supports both, a cold and a warm reset, register a cold and a warm restart handler. Signed-off-by: Benjamin Bara --- drivers/mfd/tps65219.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c index 0e0c42e4fdfc..85752b93256e 100644 --- a/drivers/mfd/tps65219.c +++ b/drivers/mfd/tps65219.c @@ -278,12 +278,21 @@ static int tps65219_probe(struct i2c_client *client) } } - ret = devm_register_restart_handler(tps->dev, - tps65219_restart_handler, - tps); + ret = devm_register_cold_restart_handler(tps->dev, + tps65219_restart_handler, + tps); if (ret) { - dev_err(tps->dev, "cannot register restart handler, %d\n", ret); + dev_err(tps->dev, "cannot register cold restart handler, %d\n", ret); + return ret; + } + + ret = devm_register_warm_restart_handler(tps->dev, + tps65219_restart_handler, + tps); + + if (ret) { + dev_err(tps->dev, "cannot register warm restart handler, %d\n", ret); return ret; }