Re: DT property keep-power-in-suspend and how WiFi drivers use it

Ulf Hansson <[email protected]>
Newsgroups dev.linux.lists.brcm80211,org.kernel.vger.linux-mmc,org.kernel.vger.linux-wireless
Message-ID <CAPDyKFqH+YHu-uxmTN_LJi7Q2DjcRLx2WBu6-hKsaz+3T0L+iQ@mail.gmail.com>
[...]

> >>>
> >>> The corresponding SDIO func-driver may call
> >>> sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER). In this way, the mmc
> >>> core will leave the SDIO card powered-on during system suspend.
> >>> Although, unless it's really necessary, it's ofcourse a bad idea as it
> >>> would mean wasting energy when the system is suspended.
> >>
> >> Just to get my understanding right: The brcm_fmac driver would be the
> >> SDIO func-driver in my case, right?
> >
> > Correct. The one that is registered with sdio_register_driver().
>
> I guess I would just write a patch for the corresponding SDIO
> func-driver, adding a DeviceTree property directly in that SDIO
> func-driver (not the mmc host driver) so this can be enabled just for
> these specific boards, or would you suggest a different solution?

Right, a DT property indicating that we can't power-cycle the SDIO
card is probably the correct way.

We have a bunch of properties already in the host's node related to
this, so adding another one there should be fine too, I think.
Otherwise, an SDIO func device may be described in a child-node of the
mmc host's node (see
Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml).

Kind regards
Uffe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.