From patchwork Fri Apr 22 03:24:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hermes Zhang X-Patchwork-Id: 565218 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EADD3C433F5 for ; Fri, 22 Apr 2022 03:24:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443730AbiDVD1t (ORCPT ); Thu, 21 Apr 2022 23:27:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443780AbiDVD1h (ORCPT ); Thu, 21 Apr 2022 23:27:37 -0400 Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFA4C4D623; Thu, 21 Apr 2022 20:24:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1650597885; x=1682133885; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=bDkBpCp5feiSpGjQLvuWHjxX6inrI6WZw2ly5p4/hyc=; b=N9pLSulflr/MM0RUc0XqBOIWnAq6kiaaQJGofAMCTLKAoGcBQnW34b+y zOzr2jQPzLv7RecuQxmwQjsxKsc4QBUnXXVgvzJryKJe2qdmS3LgbWbIX 7Yb299Gqh+z/D43Fam19M/W/l1D4X2i0f8WtsbIi5VXt/qKH8wIT2Yj7w D8A8XuiqaIkYVz81hoO1FrOBfFyfEnOX2zLOqKQtvVIcMCFlSiqI06I2g j2FVpsLg6vZCUkmLKPEzu+cPZ4TvOUpyxOz9tfLwT4lGQpcBqXpq03xDf rHMOEISXg5ZKO+NBDoPrMLHfnNjNQYUc9j9ULhX/F6Z3U9JDFZdY8eE62 w==; From: Hermes Zhang To: Arend van Spriel , Franky Lin , Hante Meuleman , Kalle Valo , "David S. Miller" , "Jakub Kicinski" , Paolo Abeni CC: , Hermes Zhang , , , , , Subject: [PATCH] brcmfmac: of: introduce new property to allow disable PNO Date: Fri, 22 Apr 2022 11:24:28 +0800 Message-ID: <20220422032428.3404284-1-chenhui.zhang@axis.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Hermes Zhang The PNO feature need to be disable for some scenario in different product. This commit introduce a new property to allow the product-specific toggling of this feature. Signed-off-by: Hermes Zhang --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c index 8623bde5eb70..15f190368a8b 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c @@ -11,6 +11,7 @@ #include "core.h" #include "common.h" #include "of.h" +#include "feature.h" static int brcmf_of_get_country_codes(struct device *dev, struct brcmf_mp_device *settings) @@ -102,6 +103,9 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, if (bus_type != BRCMF_BUSTYPE_SDIO) return; + if (of_find_property(np, "pno-disable", NULL)) + settings->feature_disable |= BIT(BRCMF_FEAT_PNO); + if (of_property_read_u32(np, "brcm,drive-strength", &val) == 0) sdio->drive_strength = val;