From patchwork Mon Feb 8 10:15:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitkumar Karwar X-Patchwork-Id: 8247511 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 C55C8BEEE5 for ; Mon, 8 Feb 2016 10:19:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CCE96201C8 for ; Mon, 8 Feb 2016 10:19:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 84C4920390 for ; Mon, 8 Feb 2016 10:19:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751946AbcBHKTV (ORCPT ); Mon, 8 Feb 2016 05:19:21 -0500 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:22357 "EHLO mx0a-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751511AbcBHKTU (ORCPT ); Mon, 8 Feb 2016 05:19:20 -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 u18AF8TF010298; Mon, 8 Feb 2016 02:19:18 -0800 Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 20xah51ads-1 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 08 Feb 2016 02:19:18 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1104.5; Mon, 8 Feb 2016 02:19:17 -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; Mon, 8 Feb 2016 02:19:17 -0800 Received: from pe-lt101 (unknown [10.31.130.183]) by maili.marvell.com (Postfix) with ESMTP id 8D5263F703F; Mon, 8 Feb 2016 02:19:17 -0800 (PST) Received: from pe-lt101 (pe-lt077 [127.0.0.1]) by pe-lt101 (8.14.4/8.14.4) with ESMTP id u18AFeTi017514; Mon, 8 Feb 2016 02:15:40 -0800 Received: (from root@localhost) by pe-lt101 (8.14.4/8.14.4/Submit) id u18AFd34017513; Mon, 8 Feb 2016 02:15:39 -0800 From: Amitkumar Karwar To: CC: Nishant Sarmukadam , , , Xinming Hu , Amitkumar Karwar Subject: [PATCH v3 2/3] mwifiex: parse chip specific gpio from device tree Date: Mon, 8 Feb 2016 02:15:27 -0800 Message-ID: <1454926528-17480-2-git-send-email-akarwar@marvell.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1454926528-17480-1-git-send-email-akarwar@marvell.com> References: <1454926528-17480-1-git-send-email-akarwar@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-02-08_05:, , 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-1602080187 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.2 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 a8b6939..8c011eb 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) { @@ -2157,6 +2158,14 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta, bool init) adapter->dt_node = mwifiex_plt_dev ? mwifiex_plt_dev->dev.of_node : NULL; 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)