From patchwork Wed Feb 3 06:14:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitkumar Karwar X-Patchwork-Id: 8198631 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C32B1BEEE5 for ; Wed, 3 Feb 2016 06:18:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E645D2022D for ; Wed, 3 Feb 2016 06:18:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10C7A201BB for ; Wed, 3 Feb 2016 06:18:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756090AbcBCGR6 (ORCPT ); Wed, 3 Feb 2016 01:17:58 -0500 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:5514 "EHLO mx0a-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754995AbcBCGR5 (ORCPT ); Wed, 3 Feb 2016 01:17:57 -0500 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.15.0.59/8.15.0.59) with SMTP id u136HEl5016599; Tue, 2 Feb 2016 22:17:56 -0800 Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 20svyv7nhq-1 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 02 Feb 2016 22:17:56 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1104.5; Tue, 2 Feb 2016 22:17:55 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1104.5 via Frontend Transport; Tue, 2 Feb 2016 22:17:55 -0800 Received: from pe-lt101 (unknown [10.31.130.118]) by maili.marvell.com (Postfix) with ESMTP id E2BE13F7040; Tue, 2 Feb 2016 22:17:54 -0800 (PST) Received: from pe-lt101 (pe-lt077 [127.0.0.1]) by pe-lt101 (8.14.4/8.14.4) with ESMTP id u136EOAL027357; Tue, 2 Feb 2016 22:14:25 -0800 Received: (from root@localhost) by pe-lt101 (8.14.4/8.14.4/Submit) id u136EOrq027356; Tue, 2 Feb 2016 22:14:24 -0800 From: Amitkumar Karwar To: CC: Cathy Luo , , , Nishant Sarmukadam , Xinming Hu , Amitkumar Karwar Subject: [PATCH 2/3] mwifiex: parse chip specific gpio from device tree Date: Tue, 2 Feb 2016 22:14:19 -0800 Message-ID: <1454480060-27314-2-git-send-email-akarwar@marvell.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1454480060-27314-1-git-send-email-akarwar@marvell.com> References: <1454480060-27314-1-git-send-email-akarwar@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-02-03_04:, , signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1601100000 definitions=main-1602030119 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Xinming Hu This patch parse chip specific gpio parameter from device tree. Corresponding binding file is also updated. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar --- Documentation/devicetree/bindings/mwifiex.txt | 6 ++++-- drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/mwifiex.txt b/Documentation/devicetree/bindings/mwifiex.txt index 39b6a74..367c97e 100644 --- a/Documentation/devicetree/bindings/mwifiex.txt +++ b/Documentation/devicetree/bindings/mwifiex.txt @@ -11,7 +11,9 @@ Optional properties: - mwifiex,caldata* : A series of properties with marvell,caldata prefix, represent Calibration data downloaded to the device during initialization. This is an array of unsigned values. - + - mwifiex,chip-gpio : Chip's wakeup gpio pin number. This needs to be downloaded + to to firmware. Chip notifies wifi wakeup signal to SOC + through this pin. Example: @@ -24,6 +26,6 @@ mwifiex { mwifiex,caldata_00_txpwrlimit_2g_cfg_set = /bits/ 8 < 0x01 0x00 0x06 0x00 0x08 0x02 0x89 0x01 ...>; - + mwifiex,chip-gpio = <3>; }; diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c index 64fc697..e6123af 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c @@ -2134,6 +2134,7 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta, bool init) enum state_11d_t state_11d; struct mwifiex_ds_11n_tx_cfg tx_cfg; u8 sdio_sp_rx_aggr_enable; + u32 data; if (first_sta) { if (priv->adapter->iface_type == MWIFIEX_PCIE) { @@ -2156,6 +2157,14 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta, bool init) */ adapter->dt_node = mwifiex_plt_dev->dev.of_node; if (adapter->dt_node) { + if (of_property_read_u32(adapter->dt_node, + "mwifiex,chip-gpio", + &data) == 0) { + mwifiex_dbg(adapter, INFO, + "chip_gpio = 0x%x\n", data); + adapter->hs_cfg.gpio = data; + } + ret = mwifiex_dnld_dt_cfgdata(priv, adapter->dt_node, "mwifiex,caldata"); if (ret)