From patchwork Wed Feb 3 06:22:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitkumar Karwar X-Patchwork-Id: 8198681 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 946779F38B for ; Wed, 3 Feb 2016 06:25:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B8BB920251 for ; Wed, 3 Feb 2016 06:25:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D13B420212 for ; Wed, 3 Feb 2016 06:25:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932986AbcBCGZx (ORCPT ); Wed, 3 Feb 2016 01:25:53 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:1440 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756375AbcBCGZt (ORCPT ); Wed, 3 Feb 2016 01:25:49 -0500 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.15.0.59/8.15.0.59) with SMTP id u136Plkm012021; Tue, 2 Feb 2016 22:25:47 -0800 Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 20sw0hqpfw-1 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 02 Feb 2016 22:25:47 -0800 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1104.5; Tue, 2 Feb 2016 22:25:46 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server id 15.0.1104.5 via Frontend Transport; Tue, 2 Feb 2016 22:25:46 -0800 Received: from pe-lt101 (unknown [10.31.130.118]) by maili.marvell.com (Postfix) with ESMTP id 668733F7048; Tue, 2 Feb 2016 22:25:44 -0800 (PST) Received: from pe-lt101 (pe-lt077 [127.0.0.1]) by pe-lt101 (8.14.4/8.14.4) with ESMTP id u136MEoE027496; Tue, 2 Feb 2016 22:22:14 -0800 Received: (from root@localhost) by pe-lt101 (8.14.4/8.14.4/Submit) id u136MDnc027495; Tue, 2 Feb 2016 22:22:13 -0800 From: Amitkumar Karwar To: CC: Cathy Luo , , , Nishant Sarmukadam , Xinming Hu , Amitkumar Karwar Subject: [PATCH v2 2/3] mwifiex: parse chip specific gpio from device tree Date: Tue, 2 Feb 2016 22:22:03 -0800 Message-ID: <1454480524-27463-2-git-send-email-akarwar@marvell.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1454480524-27463-1-git-send-email-akarwar@marvell.com> References: <1454480524-27463-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-1602030123 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)