From patchwork Sun Nov 24 10:35:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H. Nikolaus Schaller" X-Patchwork-Id: 11259111 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 952D414E5 for ; Sun, 24 Nov 2019 10:36:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 78AD2207FC for ; Sun, 24 Nov 2019 10:36:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=goldelico.com header.i=@goldelico.com header.b="rNbz4trI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726887AbfKXKgF (ORCPT ); Sun, 24 Nov 2019 05:36:05 -0500 Received: from mo4-p02-ob.smtp.rzone.de ([85.215.255.82]:20346 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725980AbfKXKgE (ORCPT ); Sun, 24 Nov 2019 05:36:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1574591762; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=FOKRqZKiYN4ZS+sSz57FNY4af5eAANqrgGGZiRiCefI=; b=rNbz4trIZvrPGzaCWxRRRYt2Pe3c8iWQsf/4IuJ7RXtAMa5H0FOQFPTb9bjAQ5KT3s DgKCf17JtLlxtjn3LuTXnGBQggDQ7KGPlEcCcElBaq8T/OGU/elTL363gWqFZf3V+RIj HNobdQl/c81g044EMwID+5A/QVBBFzSusEVxexQgeRTyKnTKKKiS61xpHdtvakZZ/k7T hwvS6/n6y5d6Kg2tMGjX47oLuVDre+HG0gEfxkAB8HFiQ4qJ0gZn6qCQNey5LZNFO/Sa IEGdpVs22m08nOzaEG3a/vPWg7p1/aJWSLRxuyuM6UHgGoPXskx+ZskMR0F7CsvmT9Nt EDkg== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1mfYzBGHXH4HEaKeuIV" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 44.29.0 DYNA|AUTH) with ESMTPSA id L09db3vAOAZmw8v (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Sun, 24 Nov 2019 11:35:48 +0100 (CET) From: "H. Nikolaus Schaller" To: Ulf Hansson , Kalle Valo , Rob Herring , Mark Rutland , "H. Nikolaus Schaller" , Thomas Gleixner , Greg Kroah-Hartman , Alexios Zavras Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, kernel@pyra-handheld.com Subject: [PATCH 1/2] DTS: bindings: wl1251: mark ti,power-gpio as optional Date: Sun, 24 Nov 2019 11:35:45 +0100 Message-Id: X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org It is now only useful for SPI interface. Power control of SDIO mode is done through mmc core. Suggested by: Ulf Hansson Signed-off-by: H. Nikolaus Schaller Acked-by: Rob Herring --- Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt b/Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt index f38950560982..88fd28d15eac 100644 --- a/Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt +++ b/Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt @@ -9,11 +9,12 @@ Required properties: - spi-max-frequency : Maximum SPI clocking speed of device in Hz - interrupts : Should contain interrupt line - vio-supply : phandle to regulator providing VIO -- ti,power-gpio : GPIO connected to chip's PMEN pin Optional properties: - ti,wl1251-has-eeprom : boolean, the wl1251 has an eeprom connected, which provides configuration data (calibration, MAC, ...) +- ti,power-gpio : GPIO connected to chip's PMEN pin if operated in + SPI mode - Please consult Documentation/devicetree/bindings/spi/spi-bus.txt for optional SPI connection related properties, From patchwork Sun Nov 24 10:35:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H. Nikolaus Schaller" X-Patchwork-Id: 11259115 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BDA3E913 for ; Sun, 24 Nov 2019 10:36:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A0E042073F for ; Sun, 24 Nov 2019 10:36:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=goldelico.com header.i=@goldelico.com header.b="C0cNMLno" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726945AbfKXKgL (ORCPT ); Sun, 24 Nov 2019 05:36:11 -0500 Received: from mo4-p02-ob.smtp.rzone.de ([85.215.255.81]:10875 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726813AbfKXKgF (ORCPT ); Sun, 24 Nov 2019 05:36:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1574591762; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=G2q76eNt4fD7xNecIuKnJaMYN+pua9d0B6y+REMDix8=; b=C0cNMLno+xns5Uv2UtfG5nsVCTDAyAd5iw7jrhB3hRMkP9LVeIvhuPRhoKDZCxFI/6 lesYCMa+6ISuoNCv9F4sM9gWqZJW0SJ7gPwCvvq0HKijJmNrb4uvMiBZPrHfmbsmxyLi xTQL22mkLXpAx8JOrNgXBpjChATkqUfsupBtOM21PNCLPoZBSkJ/LDaZzYjG7haKAlFW 0QMUBSPxBvM9wL9nqXfhiKBq5Op7yb08haO7dxUsG12z9KzgfiFdznFdPKNZXt4bOIu9 xnkE1H4MUoMvx0vRTdlQYkKyioMiFDjNsJw8reg6u/QVnFCNtogfbC8X6Lx1AUNre/1C BkLg== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1mfYzBGHXH4HEaKeuIV" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 44.29.0 DYNA|AUTH) with ESMTPSA id L09db3vAOAZmw8w (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Sun, 24 Nov 2019 11:35:48 +0100 (CET) From: "H. Nikolaus Schaller" To: Ulf Hansson , Kalle Valo , Rob Herring , Mark Rutland , "H. Nikolaus Schaller" , Thomas Gleixner , Greg Kroah-Hartman , Alexios Zavras Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, kernel@pyra-handheld.com Subject: [PATCH 2/2] net: wireless: ti: wl1251: sdio: remove ti,power-gpio Date: Sun, 24 Nov 2019 11:35:46 +0100 Message-Id: X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Remove handling of this property from code. Note that wl->power_gpio is still needed in the header file for SPI mode (N900). Suggested by: Ulf Hansson Signed-off-by: H. Nikolaus Schaller --- drivers/net/wireless/ti/wl1251/sdio.c | 30 --------------------------- 1 file changed, 30 deletions(-) diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c index df0c20a555e3..82446196f9a8 100644 --- a/drivers/net/wireless/ti/wl1251/sdio.c +++ b/drivers/net/wireless/ti/wl1251/sdio.c @@ -15,9 +15,7 @@ #include #include #include -#include #include -#include #include #include "wl1251.h" @@ -162,15 +160,6 @@ static int wl1251_sdio_set_power(struct wl1251 *wl, bool enable) printk("%s %d\n", __func__, enable); if (enable) { - /* - * Power is controlled by runtime PM, but we still call board - * callback in case it wants to do any additional setup, - * for example enabling clock buffer for the module. - */ - if (gpio_is_valid(wl->power_gpio)) - gpio_set_value(wl->power_gpio, true); - - ret = pm_runtime_get_sync(&func->dev); if (ret < 0) { pm_runtime_put_sync(&func->dev); @@ -188,9 +177,6 @@ printk("%s %d\n", __func__, enable); ret = pm_runtime_put_sync(&func->dev); if (ret < 0) goto out; - - if (gpio_is_valid(wl->power_gpio)) - gpio_set_value(wl->power_gpio, false); } out: @@ -245,27 +231,11 @@ printk("%s: of=%pOFcC\n", __func__, np); wl1251_board_data = wl1251_get_platform_data(); if (!IS_ERR(wl1251_board_data)) { - wl->power_gpio = wl1251_board_data->power_gpio; wl->irq = wl1251_board_data->irq; wl->use_eeprom = wl1251_board_data->use_eeprom; } else if (np) { wl->use_eeprom =of_property_read_bool(np, "ti,wl1251-has-eeprom"); - wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0); wl->irq = of_irq_get(np, 0); - - if (wl->power_gpio == -EPROBE_DEFER || wl->irq == -EPROBE_DEFER) { - ret = -EPROBE_DEFER; - goto disable; - } - } - - if (gpio_is_valid(wl->power_gpio)) { - ret = devm_gpio_request(&func->dev, wl->power_gpio, - "wl1251 power"); - if (ret) { - wl1251_error("Failed to request gpio: %d\n", ret); - goto disable; - } } if (wl->irq) {