Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4283371pxf; Tue, 23 Mar 2021 07:15:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxK0ITFW6Wmp9sgC5eOEduaaseDi1v8qYFK8OgJ13wpzhsJOnoVkdL15Gc1TPK6L/hRoogQ X-Received: by 2002:a17:906:9888:: with SMTP id zc8mr5309374ejb.310.1616508936407; Tue, 23 Mar 2021 07:15:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616508936; cv=none; d=google.com; s=arc-20160816; b=eHYVX0Zgn8NVFIEIyDXpPzqXut/66AvLPxf/VNVo7zl43Crw+RDQE6BAuDgk3+5Nxc ENxasimdalgShv02SqpiFmdMY153+AjMng8JhLHfTus80i6hFXSJfFkesI0PDWswqhbT v3N4zqa5nufS4hNWp8ZXTYIAQzURkwejiImZWO4SkL3/yd3Srg2l3zeq0tmyKY4Bq50I kWV3qhkE4ztdDTG6XITtBeQCy7qQyer6KWWuxtbVgTY/Hb+KRvoBO/5p/rYVSh0nNaUy iiB/Qfg0MyRaLZ5iKxlXmgscZGcpYmU8bKlx1vYpM8XD2hOPyKsOrSt/BgIPOTZ4fQso vnBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=l19bR+nFxXiu4GIfVq6f/m3LcDLqMDiNOa9Zpl4Ovvc=; b=b1XZJN8KOfZmIMYDKhFU4BfeljXD12jyeOuvWJdRZaovqjAdhIb6aTGfBacF+rcLrh kjTSAy3xJcaBohItujjRXloGtyIDK+8KQEQz0tB/1XX+/iqCforP7RhzZ3zV2wz8Dpm8 ZAuNsRUaUWYKF8lPb6+DOEm4gELfnWoGvCOVI/aRwbYQVuTrfml0EJAXL8sZ0K0tL/dy bBv8S7kp8B+yBuVviwy9ZC4acPRecBI/1W/VuDsI+4XL3WAjOx/L3q4rESrkes3deU/q RlvYym/PnK+M5v/fopTpok6CwHOAUZqh2ZAww1QuZiIciZ3cJOabB0qKNVf3aDJ8rsgM K5NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K2WN6O0R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b25si13570790ejv.506.2021.03.23.07.14.51; Tue, 23 Mar 2021 07:15:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K2WN6O0R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232227AbhCWONF (ORCPT + 99 others); Tue, 23 Mar 2021 10:13:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232176AbhCWOMg (ORCPT ); Tue, 23 Mar 2021 10:12:36 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8199C061763 for ; Tue, 23 Mar 2021 07:12:35 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id b14so13584907lfv.8 for ; Tue, 23 Mar 2021 07:12:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=l19bR+nFxXiu4GIfVq6f/m3LcDLqMDiNOa9Zpl4Ovvc=; b=K2WN6O0RNtylg2y5kj+7tUO3G3Ow+0lo/9Kbfq2doL0HIfUyReVmwWRdhF0uGNJ2OX Sf9sQUS2cU+99jYx7m3iFdK6k47YBGTOsnDBoiJD97coMPMO/lhH3U2sptWPOEIKO4H7 YKr76EcmmC4dtIC8svew3hPv2dkrnaPY/Lq4EyGjEcvwN9FoVLvmOC/7dMwxApzKoebv SNkM+3naV4PXRdlZ/+86gfwzP06/2XLnnBDnSB/PWjL2e1cGIZAgoKHGTGQy8UxmfpbI qszWcnijbnse7HrTyooN+GkyEGYI6hkC3TXrEPzfmKXfvlr8EjllH/lgx+m5Xjj/4kQ9 swaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=l19bR+nFxXiu4GIfVq6f/m3LcDLqMDiNOa9Zpl4Ovvc=; b=hOipbWUTxptmraQuboih6OYdNd13MfUhqXTeNNBURt3/xI3BRE5Vd3PpwAwKpWG1jm Mco/XKzMokhXUHFd8jce5bVH7oHp1J7Y4TQNYgvjzHRr6Pja5+p+KN8yRXQ+nAcgwOWC xL75sVLQXrkU5/IbDXqzozCx+weOxPKvOlAlZ8uFTcG6Qvl5o84unLEoA/aSn0tUR61M viZzhPXSRbwll1dOUyZwaEewAr8vFScMWfEbuiXh4bpvGQLNFSlKWlWZ2SxMK29eGkUN FvZcNDA2Ahf/a59lwZRKCX4nOiUaoDjRp6v2ydGK1b6yoJNu6egvk1S2oTiUpRsiahem GT7Q== X-Gm-Message-State: AOAM531+uNengi7q5bua1smmpBllyRXinDkN3jeDtjn2uZb9EallZEpj lA89F3Yn9VSrDVQpQkTq/ydexC7j1m1Bi2WXNZoexg== X-Received: by 2002:a19:501b:: with SMTP id e27mr2822930lfb.584.1616508753810; Tue, 23 Mar 2021 07:12:33 -0700 (PDT) MIME-Version: 1.0 References: <20210315132501.441681-1-Jerome.Pouiller@silabs.com> <20210315132501.441681-9-Jerome.Pouiller@silabs.com> <4503971.bAhddQ8uqO@pc-42> In-Reply-To: <4503971.bAhddQ8uqO@pc-42> From: Ulf Hansson Date: Tue, 23 Mar 2021 15:11:56 +0100 Message-ID: Subject: Re: [PATCH v5 08/24] wfx: add bus_sdio.c To: =?UTF-8?B?SsOpcsO0bWUgUG91aWxsZXI=?= Cc: linux-wireless , netdev , driverdevel , Linux Kernel Mailing List , Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , DTML , Rob Herring , linux-mmc , =?UTF-8?Q?Pali_Roh=C3=A1r?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 Mar 2021 at 18:14, J=C3=A9r=C3=B4me Pouiller wrote: > > Hello Ulf, > > On Monday 22 March 2021 13:20:35 CET Ulf Hansson wrote: > > On Mon, 15 Mar 2021 at 14:25, Jerome Pouiller > > wrote: > > > > > > From: J=C3=A9r=C3=B4me Pouiller > > > > > > Signed-off-by: J=C3=A9r=C3=B4me Pouiller > > > --- > > > drivers/net/wireless/silabs/wfx/bus_sdio.c | 259 +++++++++++++++++++= ++ > > > 1 file changed, 259 insertions(+) > > > create mode 100644 drivers/net/wireless/silabs/wfx/bus_sdio.c > > > > [...] > > > > > +static const struct sdio_device_id wfx_sdio_ids[] =3D { > > > + { SDIO_DEVICE(SDIO_VENDOR_ID_SILABS, SDIO_DEVICE_ID_SILABS_WF= 200) }, > > > + { }, > > > +}; > > > +MODULE_DEVICE_TABLE(sdio, wfx_sdio_ids); > > > + > > > +struct sdio_driver wfx_sdio_driver =3D { > > > + .name =3D "wfx-sdio", > > > + .id_table =3D wfx_sdio_ids, > > > + .probe =3D wfx_sdio_probe, > > > + .remove =3D wfx_sdio_remove, > > > + .drv =3D { > > > + .owner =3D THIS_MODULE, > > > + .of_match_table =3D wfx_sdio_of_match, > > > > It's not mandatory to support power management, like system > > suspend/resume. However, as this looks like this is a driver for an > > embedded SDIO device, you probably want this. > > > > If that is the case, please assign the dev_pm_ops here and implement > > the ->suspend|resume() callbacks. > > I have no platform to test suspend/resume, so I have only a > theoretical understanding of this subject. I see. > > I understanding is that with the current implementation, the > device will be powered off on suspend and then totally reset > (including reloading of the firmware) on resume. I am wrong? You are correct, for a *removable* SDIO card. In this case, the mmc/sdio core will remove the corresponding SDIO card/device and its corresponding SDIO func devices at system suspend. It will then be redetected at system resume (and the SDIO func driver re-probed). Although, as this is an embedded SDIO device, per definition it's not a removable card (MMC_CAP_NONREMOVABLE should be set for the corresponding mmc host), the SDIO card will stick around and instead the ->suspend|resume() callback needs to be implemented for the SDIO func driver. > > This behavior sounds correct to me. You would expect something > more? Yes, see above. Kind regards Uffe