Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp172770lqs; Thu, 13 Jun 2024 07:10:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVynXIkGBUkAESxiabwrS2+I4OvPyfDV27hLTs0Ea+aSjav18a01BRWAUkn35ovioyJi11QHT2UNfZtXK55iu9vS5CwSMsntRdL6tjmKA== X-Google-Smtp-Source: AGHT+IHFfeasN1bnn0SS8dYfbm5ClMwfW6Wu9crblnnGeGPa4RK86sDMAf/iHYfIyGV+DgUWzSYf X-Received: by 2002:a17:906:fc04:b0:a5a:2d30:b8c1 with SMTP id a640c23a62f3a-a6f47d56b20mr319553066b.14.1718287835620; Thu, 13 Jun 2024 07:10:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718287835; cv=pass; d=google.com; s=arc-20160816; b=FW0Ypt3x/IUQ18WWjFRd1ItZ9qzCNGFzkvs3ChR3gY/ieUHzc6mNN0jHv+Icckn+2K ZUzGNupzEFVR+MjtB447IoBK9PJGBLPWq3UbmGtNbbNKMvMIiuIHm6kWxTXPtMrNvCJt RHzjxqkU46fHtzFuJ7G9KbP/HTx90G5uYqBRjLg0rmpwzhFFxsjyamBrYqthx/GoJZhg uoROV27IgIARyFbjG8FHoYUDo7PFubqsZLVsC8RwaNsCTDjihWLh1YA40txE78pMCA30 FXuGtNRHW4ezX1tXLgMcQt61MTLRUNDmMQLQu9/mitRPOZWiVSCFgpM4RsHnsZVbEfa5 dm7A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=EiSm/eUhJPdOIyUa5VFuIncGFB6F3tSxO/MVBLvrj6o=; fh=hf7yt6gAq86lBfLhZUgknSIsFJxesf1c5mfeIKl6aZk=; b=kJ0pDeRAzeGQCzlCB3vDABLlTqRMJHWI/LJ4LQWiU1+Tj0qlpejbjK12bevzAgAz6I 8ATh/swdy4Zn1++Sqxsl7AEBgBSJnahwQ2slqYWUiIGNF8nc0LqCTjOqbJZ+GPzMAL/P CuLPR4ByaZjtWAnrDi7LdY/TBFPsCEzAEOq6tH3cYR9Q/hKjPTxgNndE1ttqI7LHKfMr s6mU/bpeHseu0P1f4zzW2dehjWSzu9i56jD/fNgtaJatfNWblq2N4MGhNhwQhSN14DM3 GVWGWFPDeNDcvh8hdBeS8qQg5eXjNJovZmwB/GkGbqoN5oYDUbXS5b3xokk9kmwrhUQp PUZg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=obA6lYP1; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-wireless+bounces-8979-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8979-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56dfaf80si76522666b.694.2024.06.13.07.10.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 07:10:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8979-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=obA6lYP1; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-wireless+bounces-8979-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8979-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 50D451F21A9B for ; Thu, 13 Jun 2024 14:10:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5226A145B01; Thu, 13 Jun 2024 14:10:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="obA6lYP1" X-Original-To: linux-wireless@vger.kernel.org Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42725144D28; Thu, 13 Jun 2024 14:10:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718287822; cv=none; b=IsrRFxS20GNZUbttzQVgwv0OlrImZvCO1ioTrqjR+qYDfDmhoodWe/SUTKEln+AN4k/KnRYMB0shmDw5xvra8zWpoc5BtJsZBH2TGdxftmO7lZiYsiKP2eQeg8o5ckDcmsOqBjOcyrguMSja9l14Xg5dt3XVINlIwTJb/FxFUIw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718287822; c=relaxed/simple; bh=/3/RjwKiLLAAqUv9PGd3NtY0FMHGe7Zhcncw6CpFJDY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Fvx6M/UshU1ORLMFP4br1orO3lBbEGeDsZzCJ3791/vHsFHPHlWmSCJiFT0hiEnOsgJnJko4hRwk636FjjmwlZf3nySfGyN4QD91H6WNfx6bsvO6m8lN4844YkvOYRxDD81zXSCjv4q/hITxZzbMuN4yipdc59CtjTvkY+6FAlA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=obA6lYP1; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 094581BF20B; Thu, 13 Jun 2024 14:10:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1718287813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EiSm/eUhJPdOIyUa5VFuIncGFB6F3tSxO/MVBLvrj6o=; b=obA6lYP1b5MFxeoJiVqPP5phg75NGILqBqn3OQSWn7qDIUS0GFj5JWpWoxJeMc+0JKVPmI 3ecr7Kcv+LbogiiGP4XXyjxBAPp3EjXYRVTxn1tFLR0mt8w3Ut9Bwonq4IITdVW2v91GEL 6+1n+ZWiqMjGbdCVT/+LvdXWJ1t7xk2HDFme3CnJ8uMOAC3zd5lvwB6BH4eD8LkX98fzUD 5pnHnK9lu7DbQaToC4ZqCWqQ38sH4lf3zt1I6tImB2PyFYJIJj5R9/F1u01BO35+wTCEgO aHnSSEIZiXX4XJ0C2fZWoT9iOPoIC78oZM+5WjFxZNuW/gP3VVpX+MkwaWvjtg== From: =?utf-8?q?Alexis_Lothor=C3=A9?= Date: Thu, 13 Jun 2024 16:06:43 +0200 Subject: [PATCH 4/6] wifi: wilc1000: move sdio suspend method next to resume and pm ops definition Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240613-wilc_suspend-v1-4-c2f766d0988c@bootlin.com> References: <20240613-wilc_suspend-v1-0-c2f766d0988c@bootlin.com> In-Reply-To: <20240613-wilc_suspend-v1-0-c2f766d0988c@bootlin.com> To: linux-wireless@vger.kernel.org Cc: Ajay Singh , Claudiu Beznea , Kalle Valo , Thomas Petazzoni , linux-kernel@vger.kernel.org, =?utf-8?q?Alexis_Lothor=C3=A9?= X-Mailer: b4 0.13.0 X-GND-Sasl: alexis.lothore@bootlin.com Just move the suspend method next to the resume method in the sdio part Signed-off-by: Alexis Lothoré --- drivers/net/wireless/microchip/wilc1000/sdio.c | 47 +++++++++++++------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c index fb4de3de1140..21398a3c600b 100644 --- a/drivers/net/wireless/microchip/wilc1000/sdio.c +++ b/drivers/net/wireless/microchip/wilc1000/sdio.c @@ -249,30 +249,6 @@ static bool wilc_sdio_is_init(struct wilc *wilc) return sdio_priv->isinit; } -static int wilc_sdio_suspend(struct device *dev) -{ - struct sdio_func *func = dev_to_sdio_func(dev); - struct wilc *wilc = sdio_get_drvdata(func); - int ret; - - dev_info(dev, "sdio suspend\n"); - - if (!IS_ERR(wilc->rtc_clk)) - clk_disable_unprepare(wilc->rtc_clk); - - if (wilc->suspend_event) { - host_sleep_notify(wilc); - } - - ret = wilc_sdio_reset(wilc); - if (ret) { - dev_err(&func->dev, "Fail reset sdio\n"); - return ret; - } - - return 0; -} - static int wilc_sdio_enable_interrupt(struct wilc *dev) { struct sdio_func *func = container_of(dev->dev, struct sdio_func, dev); @@ -993,6 +969,29 @@ static const struct wilc_hif_func wilc_hif_sdio = { .hif_is_init = wilc_sdio_is_init, }; +static int wilc_sdio_suspend(struct device *dev) +{ + struct sdio_func *func = dev_to_sdio_func(dev); + struct wilc *wilc = sdio_get_drvdata(func); + int ret; + + dev_info(dev, "sdio suspend\n"); + + if (!IS_ERR(wilc->rtc_clk)) + clk_disable_unprepare(wilc->rtc_clk); + + if (wilc->suspend_event) + host_sleep_notify(wilc); + + ret = wilc_sdio_reset(wilc); + if (ret) { + dev_err(&func->dev, "Fail reset sdio\n"); + return ret; + } + + return 0; +} + static int wilc_sdio_resume(struct device *dev) { struct sdio_func *func = dev_to_sdio_func(dev); -- 2.45.2