From patchwork Wed Jan 31 22:37:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 769503 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF55A3A1DF for ; Wed, 31 Jan 2024 22:37:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740650; cv=none; b=Ic5pXMMEBEaHscuJEEGMsnMo5CofbSpbsRjTtiOaLfjNyYB79LN2vtgEhUX1iRxGgZIWRkMADQ2qaspa2KUzpcilEpGQCRlcU/yqiUyGI8y8Q4fziBYGrWtwIYiZCQDYfKyx4miqUJ6sDxBfCOhrT7+7dVPfYQcGmYsvZJWsujg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740650; c=relaxed/simple; bh=xEeZnTStjXW+P4mPZi6D/2+tjnokrcA0eBD1CbKd8MU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=T7HfEiV12Yk7ayVaDKQHJ9sFbYrsoRIfngtHkBN7kFIi8F28Cw2PqXOK1PJ+T7xnRApdUyT9VNZbRI48r31aiTI5WcvD1HJSnZGo1y+oPxsQKVx1WPdG8c3ZjDH1xuTQecTozMQSRTXVGFh9ZC8VK9roTTXHxXZ/RD+Gp/MMhas= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=mjIJsYT8; arc=none smtp.client-ip=209.85.167.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mjIJsYT8" Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-5101f2dfdadso387091e87.2 for ; Wed, 31 Jan 2024 14:37:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706740646; x=1707345446; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=dtLJJ49D/VVSAFpOTc5rh0hgC/Wh9sQ3F5R/ApzLoDU=; b=mjIJsYT8Wf2NqPUJZ7aMZ+dzziwm45gx1GKrbIPR6JkzFZ9sYbJiYicYdb7xWyriHJ ZBKgtfIyebqgKFV0AhVPiQND9QtVKV1/jKTyjONxhshy1YgfF1gRRw7Fra/lKbjDUETB TrnohDpZBDrQ+/1oIv2mYUV6HrHV88Pdw2YCXUA0bsy/KlDwFQ17CThYxnZWm7Ah3Y87 rd6fm3HzyeiVDnHPsBrd+a1ciDog5b6g473U87rTNRgLKzyHbptVneInR+/nXcOMUjbV YG2DpKBbau1anIJ3jwD6ZLb1daAt4NvAMUuMV1Hdv+xec2FIpd2xbERqHoxwnSeRWip+ qQsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706740646; x=1707345446; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dtLJJ49D/VVSAFpOTc5rh0hgC/Wh9sQ3F5R/ApzLoDU=; b=wcOul7LGYrsbTkT647wju4Cfl/vJHtnzTy5SX4j8ZaJ156+/OxI7KBURvZjT+rwrGs r8MJQvdtqq+XToWffvJ2LU62NP/fiGUtzQuS99U0eKycI8MB3WoV6S5PcSadmBJr0Kst 1S5xBIldv0d9rRQYPc96zr5k8p75SHBAObShNYhInT7PS/QSfV0la1E3Vn5JyGgNxBxl MQrIZu8RkBqoSeTgBAKu0/97mfe2p4huG+EDWlIMvEzPZa4FjFbK5JX27tTTtXbnr4nM VVhHs4hOadKlEteNYkNIKUor+bMhmtjU3VmqgesXOsWuqYkyn8rGia9Czuzjasx8JbXe 7sbA== X-Gm-Message-State: AOJu0Yz4sKckoS99l6UEQ5dePS9em56fLCF5k+iZszwMgd0dk7ddtYE6 RU2bTk0zu2+wk15bX76W2LRMNnEMjrCOw38GjgfSzDYkQSzVL6LzuFyTqFNw7IM= X-Google-Smtp-Source: AGHT+IGqo/WAMhlei83aqBH+2aI0bsnoI1goaE4Rtzf4Ns0DDE/tJyzFfiZlyjHv+57hLxfWYytPWA== X-Received: by 2002:a05:6512:259:b0:511:b9a:8225 with SMTP id b25-20020a056512025900b005110b9a8225mr517980lfo.26.1706740645904; Wed, 31 Jan 2024 14:37:25 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXI7ulUucw+ILUhbCKkyrl1gPSZ1vKCiwSPVqR0EWTbaO3HmZWLCZ7olBmXfr5We7oBEvitXqNorItj42KF2SCRXy4Q6doWgwdlJTh+bDJHHMv/B2gPhXzW6Vbq1pi/9yX49e7e3drSSkJwPWaAqXMB9fpUnnEuq7ChPNkiGZjMhIzQSDTVLJlsKCVQ7DANRMH0hiEzgJQevL9sqA7hX40jrbS9aZcP9AuE8qRj2kcmGksAnDskl/ZoDnzrkhb4qY9HR04rlHowRwCKoIGw+Lp2h2P7f0qEleA2UyRv2oFnYk0z6KvaCCFAO1C7bnfsDZfl1xXufuiIvPASdozDoMQ0hUU4uuuHx5gRXdNzAi1cklDK24mzssrkbt79/F9mzdSuG1q81nqjjckAJSihunSRc8kfCLV0lr2w7eMqHsn0+rBj6CUMhE39em6yVIXZ1lDyPYzj34c9jfse1g== Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id v25-20020a05651203b900b0051023149df3sm1976021lfp.248.2024.01.31.14.37.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:37:25 -0800 (PST) From: Linus Walleij Date: Wed, 31 Jan 2024 23:37:20 +0100 Subject: [PATCH 1/6] wifi: ath9k: Obtain system GPIOS from descriptors Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240131-descriptors-wireless-v1-1-e1c7c5d68746@linaro.org> References: <20240131-descriptors-wireless-v1-0-e1c7c5d68746@linaro.org> In-Reply-To: <20240131-descriptors-wireless-v1-0-e1c7c5d68746@linaro.org> To: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= , Kalle Valo , Arend van Spriel , Franky Lin , Hante Meuleman , Andy Shevchenko , Arnd Bergmann , Lee Jones , Brian Norris , Srinivasan Raju Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, Linus Walleij X-Mailer: b4 0.12.4 The ath9k has an odd use of system-wide GPIOs: if the chip does not have internal GPIO capability, it will try to obtain a GPIO line from the system GPIO controller: if (BIT(gpio) & ah->caps.gpio_mask) ath9k_hw_gpio_cfg_wmac(...); else if (AR_SREV_SOC(ah)) ath9k_hw_gpio_cfg_soc(ah, gpio, out, label); Where ath9k_hw_gpio_cfg_soc() will attempt to issue gpio_request_one() passing the local GPIO number of the controller (0..31) to gpio_request_one(). This is somewhat peculiar and possibly even dangerous: there is nowadays no guarantee of the numbering of these system-wide GPIOs, and assuming that GPIO 0..31 as used by ath9k would correspond to GPIOs 0..31 on the system as a whole seems a bit wild. My best guess is that everyone actually using this driver has support for the local (custom) GPIO API and the bit in h->caps.gpio_mask is always set for any GPIO the driver may try to obtain, so this facility to use system-wide GPIOs is actually unused and could be deleted. Anyway: I cannot know if this is really the case, so implement a fallback handling using GPIO descriptors obtained from the ah->dev device indexed 0..31. These can for example be passed in the device tree, ACPI or through board files. I doubt that anyone will use them, but this makes it possible to obtain a system-wide GPIO for any of the 0..31 GPIOs potentially requested by the driver. Signed-off-by: Linus Walleij --- drivers/net/wireless/ath/ath9k/hw.c | 29 +++++++++++++++-------------- drivers/net/wireless/ath/ath9k/hw.h | 3 ++- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 5982e0db45f9..ee6705836746 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include "hw.h" @@ -2727,19 +2727,25 @@ static void ath9k_hw_gpio_cfg_output_mux(struct ath_hw *ah, u32 gpio, u32 type) static void ath9k_hw_gpio_cfg_soc(struct ath_hw *ah, u32 gpio, bool out, const char *label) { + enum gpiod_flags flags = out ? GPIOD_OUT_LOW : GPIOD_IN; + struct gpio_desc *gpiod; int err; - if (ah->caps.gpio_requested & BIT(gpio)) + if (ah->gpiods[gpio]) return; - err = gpio_request_one(gpio, out ? GPIOF_OUT_INIT_LOW : GPIOF_IN, label); - if (err) { + /* Obtains a system specific GPIO descriptor from another GPIO controller */ + gpiod = devm_gpiod_get_index(ah->dev, NULL, gpio, flags); + + if (IS_ERR(gpiod)) { + err = PTR_ERR(gpiod); ath_err(ath9k_hw_common(ah), "request GPIO%d failed:%d\n", gpio, err); return; } - ah->caps.gpio_requested |= BIT(gpio); + gpiod_set_consumer_name(gpiod, label); + ah->gpiods[gpio] = gpiod; } static void ath9k_hw_gpio_cfg_wmac(struct ath_hw *ah, u32 gpio, bool out, @@ -2800,11 +2806,6 @@ void ath9k_hw_gpio_free(struct ath_hw *ah, u32 gpio) return; WARN_ON(gpio >= ah->caps.num_gpio_pins); - - if (ah->caps.gpio_requested & BIT(gpio)) { - gpio_free(gpio); - ah->caps.gpio_requested &= ~BIT(gpio); - } } EXPORT_SYMBOL(ath9k_hw_gpio_free); @@ -2832,8 +2833,8 @@ u32 ath9k_hw_gpio_get(struct ath_hw *ah, u32 gpio) val = REG_READ(ah, AR_GPIO_IN(ah)) & BIT(gpio); else val = MS_REG_READ(AR, gpio); - } else if (BIT(gpio) & ah->caps.gpio_requested) { - val = gpio_get_value(gpio) & BIT(gpio); + } else if (ah->gpiods[gpio]) { + val = gpiod_get_value(ah->gpiods[gpio]); } else { WARN_ON(1); } @@ -2856,8 +2857,8 @@ void ath9k_hw_set_gpio(struct ath_hw *ah, u32 gpio, u32 val) AR7010_GPIO_OUT : AR_GPIO_IN_OUT(ah); REG_RMW(ah, out_addr, val << gpio, BIT(gpio)); - } else if (BIT(gpio) & ah->caps.gpio_requested) { - gpio_set_value(gpio, val); + } else if (ah->gpiods[gpio]) { + gpiod_set_value(ah->gpiods[gpio], val); } else { WARN_ON(1); } diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 450ab19b1d4e..1eb4ff8955ae 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -302,7 +303,6 @@ struct ath9k_hw_capabilities { u8 max_rxchains; u8 num_gpio_pins; u32 gpio_mask; - u32 gpio_requested; u8 rx_hp_qdepth; u8 rx_lp_qdepth; u8 rx_status_len; @@ -783,6 +783,7 @@ struct ath_hw { struct ath9k_hw_capabilities caps; struct ath9k_channel channels[ATH9K_NUM_CHANNELS]; struct ath9k_channel *curchan; + struct gpio_desc *gpiods[32]; union { struct ar5416_eeprom_def def; From patchwork Wed Jan 31 22:37:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 768811 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E02C839FE0 for ; Wed, 31 Jan 2024 22:37:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740651; cv=none; b=bUW/orM84qnkVtCR47MSJ1yuD1VKiROe9oaN0HwBcKKrwQEfXxHYhnWZJUtRKx36PD7pUwjFbeB/1VjdC7iJPRw3aCyglxB0AXFzoYUiOXB6lvYjR77gAAtPS0HMuy2T+QQxXy6cN/JQY8z6lbmjXffBuN+hrc9yvEuRtQ/x6zo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740651; c=relaxed/simple; bh=ionRqyl3Q5D/E0zHp+ahunwML94VNC0kY+YxXQFZSkI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cUoBppslRNu9vn87V4TbGjD70egKn1MVImcc6G7dbAMt8jODsm75yQtSE0j+21PdTUs2wzjMCMLe7txmjiey0K/c+5MzOmBAh2vinKf3Uf1riJXW0v7FttyHdWm+tdNrbXHqml+M0TebVzWsAsQWDU8CQLQdTdsras+T8G2NC3s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Qi0hhmFC; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Qi0hhmFC" Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-510322d5363so382989e87.1 for ; Wed, 31 Jan 2024 14:37:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706740647; x=1707345447; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=qflVRgaLPtLFWdxTtNrz5ppvd0xQoWg+EunwCWy5ijM=; b=Qi0hhmFCsNkMp/q47OpcNF4m/IKeKpLiaTFE3uxMVD8NDNEi2MjxFIzCeREc5FT6t9 7Zcva/+qvRZW7tOLIj272qhPEMA68ZtK8iASx4B2KkcGcRHxjuZREsYZ7fEzB60OkSy4 4XMVJ1Y9iLq6RwNvun1IRulYFx8AVPydYc62oxAcuEFUEwhPPy8Tqx8oHtYt74to9b4e 6m1Tgy5TDoqxu4CzlZcG+9IEnIopmig2y3c7FClz2xJHtRyCrQqwxVlp3Wq0sQxSdP3s Mb3Iq5qLHpnE5chkoU4wzPNzIqqQzU4rpn3tOC3sq2dDl5TwWPBVgvJwunp1L7NSyUh4 lgKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706740647; x=1707345447; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qflVRgaLPtLFWdxTtNrz5ppvd0xQoWg+EunwCWy5ijM=; b=xLGdQNMcjqMOezazZbW0MTr22mpZyerKVNgkZ4NOY2T7ygwLUDwx4hHbBZamvWQXL1 vQ8pbdaa/Hbt7j2TBCe2iICirUsQ+wwjFcjBppw8UzoGUz64XbbOsxofmw9wQ6ZgC5Pa h05ERK5VhEaKJWw+mdzh/9AevcfJr1xsZFnngbM4l/adyzlZ2pJgVvVshsiD2omo/D8e zuD4QFy58tf1hZ0Whn8J1Nk8aFlFs+pV35fzd9kWh4/XOAYSdP8CuuPJTCBba8GGcy42 9A25HStFsJLo3kNB7yW6V2t4fYzRyH2DSwSPmAE1Q94sok33yzuDtL2URWU7YqBpOyof M7Cg== X-Gm-Message-State: AOJu0Yx4PEOHps9c+nahCLiAXCzJOA8C0DfTSXXEr8eHahGyuIRZcrir Tnhl+7y19PuIIsEn25uK12CGFYZhX2vHU44gLSnDvpGq8vF/fx6vcAm+ubUI3DM= X-Google-Smtp-Source: AGHT+IHP0c4yw2cb1tH3KkasvEXgTEolgi4dREEGX3xay5jvaVY2tiuki6tuV3gEcKIvvbPP+uZjEw== X-Received: by 2002:ac2:5b05:0:b0:511:24da:ca21 with SMTP id v5-20020ac25b05000000b0051124daca21mr658246lfn.9.1706740646978; Wed, 31 Jan 2024 14:37:26 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCV7zI291CvMzGbV4tDVdfrqcKTOar2yqyKSFlxpyCD7d45AtujJIIbroRHBkJHsWBnjyHD6BlU8dpKV4N/pA7kM0EzB3ZApSk1Rt22Xv3wQ7nxrcWzbGQAc8/ZyYgeXLD3UiXESHU1q/j9vCWMMHwGW906VzXWk42CMbFZb//wPshMvslQWHCE8lADQEVs311nLGpjkwdmw73TpScJY/5QBf2eOCiFDOuI9TgYAAC3lKhG1c1YtZnmouR5WhO3AhZZ6Kidh/GPd+i8AkA24WYbHNhAYvJTB5v6PFIsFzvfxlA74Kzo1HgaCReCd9ViVglwSxzSEPdBkwqwmBFSUxTxKJirKdN6SQ/jnV+G2qmeCdg7Em8I5SERp5DUDZ7fROS5f5D4Is60LxNoC37mKVOL7ix6wuP8oVg6wLGr5yTOzgmwJZS2N63JvHay5VcY1Hk3AaKkMoBT1Baurdw== Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id v25-20020a05651203b900b0051023149df3sm1976021lfp.248.2024.01.31.14.37.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:37:26 -0800 (PST) From: Linus Walleij Date: Wed, 31 Jan 2024 23:37:21 +0100 Subject: [PATCH 2/6] wifi: ti: wlcore: sdio: Drop unused include Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240131-descriptors-wireless-v1-2-e1c7c5d68746@linaro.org> References: <20240131-descriptors-wireless-v1-0-e1c7c5d68746@linaro.org> In-Reply-To: <20240131-descriptors-wireless-v1-0-e1c7c5d68746@linaro.org> To: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= , Kalle Valo , Arend van Spriel , Franky Lin , Hante Meuleman , Andy Shevchenko , Arnd Bergmann , Lee Jones , Brian Norris , Srinivasan Raju Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, Linus Walleij X-Mailer: b4 0.12.4 The file is including the legacy GPIO header but is not using any symbols from it, drop the header. Signed-off-by: Linus Walleij --- drivers/net/wireless/ti/wlcore/sdio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c index f0686635db46..45dcc7b400c3 100644 --- a/drivers/net/wireless/ti/wlcore/sdio.c +++ b/drivers/net/wireless/ti/wlcore/sdio.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include From patchwork Wed Jan 31 22:37:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 769502 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 709EC3A8D5 for ; Wed, 31 Jan 2024 22:37:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740652; cv=none; b=HLInxTwYS8O6YA888XmOewCDL/RvicEAW1nxj7O3znoZsJcsgRuR+DFFEbzpFjOsSKt6J5Ksjpl2w2qP6Pk8OnOahf08IvZ/aV6iYzN0QckV0+MuaaxPH878OYq73EbUMdSbfJpMUKhwc3v8dRUz71NdcUEPQccgEwdAIdcy9fM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740652; c=relaxed/simple; bh=qs2IwTXMaVMdAglmU0WRwo3NIfb2WrdCf70I7utlgJg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PpELgmVWY7pWArQAHr8F5cTUyCqVwC9nRkCfgbiY3AytY4xKRiwPlykgDlA7fdEmkp0Hedq7bM0NtnLS+uNN3WP/g1HGCtu1kwnd/1dsPm7DXD+JiwULauAaqdrWtmsCuZKpkV6tE4Px7d0xRTEaEUyyjiwNAhCl9LiWL7mTfO4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=hE4m2gYb; arc=none smtp.client-ip=209.85.167.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hE4m2gYb" Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-51032e62171so347674e87.3 for ; Wed, 31 Jan 2024 14:37:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706740648; x=1707345448; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=/DrXHgtRj4uXVnKQSHYAiPmivQLWMpRFu04w8Lw2Uhw=; b=hE4m2gYbteTmy+sHgBEvYTf/3i94+39FzSnKtC7MC3Edb1qOEms7VKkvlcPFu+aMPZ seJrnYiHtl1qKDHtxzCS5F4zFH6cIMu+UeKZtUX1xpaue9JByhaYkclg5RYuiM5fJKi0 8skSsGHf+W34cS4fsXDqF3BHpaKW5M5Lp9XJPhgIAQRd9BEuA9iy9BI5FKM2YQqLcp+W hSD6ogXPVM4tYdwQOLvSa8Ql6jtnZyVEPcY7S662e3uY9681auDMDnfshDVI4bCh4iP3 wj0BcacuT0n6OiHw+LEufQYoHJJ9tTYTXvmHL7AGhcoksaH2ONyelbx5uhc2s0UGE63f HrUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706740648; x=1707345448; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/DrXHgtRj4uXVnKQSHYAiPmivQLWMpRFu04w8Lw2Uhw=; b=BIgMvSK8/eMuPsXR6iaVmtCPx9hCDdM8LQNO0OEH50H0SsTssiZ5S2Zpg33NLxn2Iy 2YaUO21zG4Ko9Pv/R+M5spGqfT7hxPROr0LWqYrAZeu1GxV4vEngHKyVxg6xqxqCXlO5 AqVRsax8lN5Aag8WyM2iAhxHe3JR3S6wFP1W84GEbIat7E0xVZXUApWSJMApc07zYt3U YD1+w2TrlcpvM5pudsOMBx1QTFrwGXB38R2Bhx+4tfq8sWqR7G8QtnWzx42+8WtWDnCL W2McY6S/tr9h9fFvsfFjmpKR3S5rIN/0qTv93zhB3g7+1CREvnyW96DXWeaYUsHOcb2M 7WeQ== X-Gm-Message-State: AOJu0YwpHJo0jWI+97an++rkiJy6xaDi0RNKyd9KatF1g62d1zeAIIDK rxtU0E6Ruj5rUhY+qdsMDFzyfQV6ML6iIalhZaku5vEF0ocz9ejYsJjRHah+LBk= X-Google-Smtp-Source: AGHT+IHi2rdan0vzvY3WJ53/OhmnsWjwEgrGErJ9PujYvsVhU6yQ5terlMO9S1GY55tz3i4rJ67UrA== X-Received: by 2002:a05:6512:74f:b0:511:ecf:e5df with SMTP id c15-20020a056512074f00b005110ecfe5dfmr480442lfs.28.1706740648240; Wed, 31 Jan 2024 14:37:28 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXMQDd0jdlmjd8LP1gDqtuZnmdtJ/f8Xv3tT40eOqMozES6c/VXBoJuzMJweWxBCFWWaB01StTnH2fi2WG8laVUthcdxf1Bw8IiozdWj7hZ9jT+2Y+Yws4kQLkSLrjQyGJOEVlQ/t2C6tbfe4OIRPi8YzW80V+bEGdDuggS4QBfDI+Uak8OsVWouEQ5+59ICBDHXabvmZlpO2lV48Tl09GF0zlfJmTcZ5vUE+XM7JZp91jHRUlEMUAZqi6QNbebP2SiV9Ke8mHwCRsNlQS7su/EbFOGr9u3bO81mUHA/de45UDIoqi7D7fby3N87oco9+fBgXfgFeJs4SsIfZcYDox0yGL21Y9bwk7WvksU/g6eak5dcKVA8brkgRS+V5Vsz42wEjnbuNI8s7CgcLMhArrB+nDPh8CfJgB0lmgC1/K3Yen6kW3XIrsNkq1uGWgjPMpdUMnPYhQs3OLSMA== Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id v25-20020a05651203b900b0051023149df3sm1976021lfp.248.2024.01.31.14.37.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:37:27 -0800 (PST) From: Linus Walleij Date: Wed, 31 Jan 2024 23:37:22 +0100 Subject: [PATCH 3/6] brcm80211: brcmsmac: Drop legacy header Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240131-descriptors-wireless-v1-3-e1c7c5d68746@linaro.org> References: <20240131-descriptors-wireless-v1-0-e1c7c5d68746@linaro.org> In-Reply-To: <20240131-descriptors-wireless-v1-0-e1c7c5d68746@linaro.org> To: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= , Kalle Valo , Arend van Spriel , Franky Lin , Hante Meuleman , Andy Shevchenko , Arnd Bergmann , Lee Jones , Brian Norris , Srinivasan Raju Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, Linus Walleij X-Mailer: b4 0.12.4 The driver is using all the modern abstractions to obtain and use GPIOs and the legacy header is unused, so drop it. Fixes: a8e59744e16b ("gpiolib: split linux/gpio/driver.h out of linux/gpio.h") Signed-off-by: Linus Walleij --- drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c index 89c8829528c2..9540a05247c2 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include #include -#include #include #include #include From patchwork Wed Jan 31 22:37:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 768810 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FFFA3A1DD for ; Wed, 31 Jan 2024 22:37:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740653; cv=none; b=Iw4jqqXy8sOo8HE+kDn70d+NnM0h2Jdbm0GRH2sRuXQzUqBDDZBzKj4zWypP9ynOIp6kJkX99Jev8LHRaK14qEh92hRpcik37nnpPBYOM9fdyjuhceDQ/Zx7P+Qc12+Ou4w+auSyygNcA+ltV4jA115A251CqRH6MwV86An3ESQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740653; c=relaxed/simple; bh=LPemJiJDNeh1UetE8kKmrKuqS+5AJjwLvDRlUyR+Sac=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MfnTFchqCH5LSQhPRiR8eu6cdfD8TWyREQdLN88vOXUlVbXCSqv6zWMKydBpdhtXFlSA5COnYUVC2VDI3BXSRO6MqMvuwzPV191yUuFIfCSHpJOZh1/iUnob+aosB2oTw68toH6V1+qpAKsANiXnSOb6+uDEkkeASQg4lS7mX4s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=xK41zBb/; arc=none smtp.client-ip=209.85.208.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="xK41zBb/" Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2d066b532f0so4896281fa.1 for ; Wed, 31 Jan 2024 14:37:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706740649; x=1707345449; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Ugdn3z0/uQcbatROe8KemahKg/7jjvyhRHQgV89WdMo=; b=xK41zBb/Lj1h91UQ8DKnG2IT/SiD0N5spF5QLZZ/SQ7h8F4J3uzdRh1KRsrtPkX2HH W+k9mn8r46yuDQySDv01qsb+3gStMFt5EDnapwsCaBIzKdCtzFkY37TxxDO370nIXYlu R/MerCWNhhHDl9pLFr5z7e2029SwFr3CDjnPHJwoMKBDoz5tohUFQiFymkiP3ABahN+C 1QfIo7+ZOZciys6lVQtwmh0GSJkitsMsdYjpwzFnE91uSJ/HAZj4djVR1z9fok7ND53r MRVRhutbPREJ3oL/fx0OCRX3PDoatWOAa/+s6vBA0uQY9lO9ueVDjUxH37G00JyW2++w ZGJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706740649; x=1707345449; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ugdn3z0/uQcbatROe8KemahKg/7jjvyhRHQgV89WdMo=; b=PrLtqB47nGe/Y9AYbqQIVqtMfZxzSiyM8SpDjL3SURf5Xkmsrpxr6dEQmVJ+DOZHBW uzN0/dMLJGHBHFV3QQnYQj6usrTUo4b68WHY0ylQO/KKNjyDI6iCmCZfjDhONIolxtFh C3rClE7pBpCLm/uapBbUKfgt5JFzJOLfG/tGRGerT226kd4AgtTmKhUN5sSCiovaBAPs Q6dmDW4AlwQFyHeaJDLN2lmUAnCpsrapYtDjwlg9OrS8Ae/lJU7iUhRgrwhsAfE9y79a 0RMnqTiyWflvVuHp23C/pb9kpwaFqrQlDd/6MPQvkABxGPAAA/oRbtFUO2vvx9jyn1HT 8mCg== X-Gm-Message-State: AOJu0YzaPERyx/PoEOZqMo1JXvQfKvdvBw8U14DxVH5OVHcYG2nexJei guof0jLduigdTkYUQ2gXUzrpR9K4LbQIxXAfq6fruWsbb7zvQet65earYNAJc8A= X-Google-Smtp-Source: AGHT+IHpMnm1d8vLLtzUTLq39bCw1dZD+PGE4OO35/C+h81CWbe7/xfuSysDp+9/iHlIPVPxtuq6YA== X-Received: by 2002:a05:6512:3692:b0:50e:7fc8:f40c with SMTP id d18-20020a056512369200b0050e7fc8f40cmr615587lfs.54.1706740649659; Wed, 31 Jan 2024 14:37:29 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCW1n2xLa5N2sdxGgFM2Mp6PPCu5n7ZYPla/ItamJtmzai0Ja480F4WO/7J69GEWvh2m5OQTNI2nCHqd6axJIyZ/qk7kRIeei9WHnKXHga3EMElD/lgPCxBQD7ORw3ltBA4DMFAmYFwIcz3sBS9FQYpVsVuiTaLdJNoK/NdQ28W03SDcX46ptn8r8OjNUf/I8ZUvQgigK/jUO6A0YPx4uLtLdn8Jp1vCYPHHBJolVXJM6yamXBuhFrLq+WlFVDJgYIc6/nz7TOM8A6KYcW5k3U/HLPtfR7Ccj5ODsE8bCLXV6jQIJ+RFCmk1MybpiiqRHxXuPAC0oRRNnXFa+Dn6HrcJ1CBQuccG22xhNN0vaj8d4vvQcjIhf3BQnU+ri/pSt5UjliEk36j1DG3P9fQZKteoMoG2oU4lH4OaVJ6+CeJDKdDnoKz4UCbfP035vk/QA0AJb+2SuPNbOs0KOA== Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id v25-20020a05651203b900b0051023149df3sm1976021lfp.248.2024.01.31.14.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:37:28 -0800 (PST) From: Linus Walleij Date: Wed, 31 Jan 2024 23:37:23 +0100 Subject: [PATCH 4/6] wifi: mwifiex: Drop unused headers Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240131-descriptors-wireless-v1-4-e1c7c5d68746@linaro.org> References: <20240131-descriptors-wireless-v1-0-e1c7c5d68746@linaro.org> In-Reply-To: <20240131-descriptors-wireless-v1-0-e1c7c5d68746@linaro.org> To: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= , Kalle Valo , Arend van Spriel , Franky Lin , Hante Meuleman , Andy Shevchenko , Arnd Bergmann , Lee Jones , Brian Norris , Srinivasan Raju Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, Linus Walleij X-Mailer: b4 0.12.4 The mwifiex driver include two legacy GPIO headers but does not use symbols from any of them. The driver does contain some "gpio" handling code, but this is some custom GPIO interface, not the Linux GPIO. Signed-off-by: Linus Walleij --- drivers/net/wireless/marvell/mwifiex/main.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h index 318b42b1896f..175882485a19 100644 --- a/drivers/net/wireless/marvell/mwifiex/main.h +++ b/drivers/net/wireless/marvell/mwifiex/main.h @@ -28,11 +28,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include From patchwork Wed Jan 31 22:37:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 769501 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B718939FE0 for ; Wed, 31 Jan 2024 22:37:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740654; cv=none; b=u3iiN49DOqjl69yNyy0+sW2djSdUh4WjEQiqWFeLVvc4JUnqxXow8GMJDYFWS4Zx595P3WxnJH8Z8ia0D2yhD/RCOsOAFK6EXJ9BFmWn6tIy1Wd/RZ5IThVnlxP0Sv794Y1UEDWCJ/vK9lB4JezDJvz9QTSbyrJ9DSB87B8J/aQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740654; c=relaxed/simple; bh=5XJc9ghGuRNHdIp0vfzuqM/TEK4kPBeBAS0v6fakgGg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=f1p0nkcFfci1JVo86rFtFqC0p5NhZDT/GG/pPywr5ncmybHtposh/uAIW7Erw22eb4sUGFL9EXt4DbgWdwo9CYXsbpjV7m1orNenGZfQpXPsuuvCMdePIH3r3VXDDqfDOETAlT1qiBMyx3zaoGkMzYrKIX4jNhjLsX/1Uu3VuQE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=HDPT9GmH; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HDPT9GmH" Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-51124d43943so360910e87.2 for ; Wed, 31 Jan 2024 14:37:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706740651; x=1707345451; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Syf6YeMPz8gpPA3EVgI80juDku+cwPRF2yHgIUcG34U=; b=HDPT9GmHUOZD/Yxh3GJWuhrCPWKJLyKNbT46T56qYwQ+t5C19KazrGlqwdkAhYpEhN KpkMVoQQlG/7efMR2W00TmnczusNjTZC4pwOEuHwHeK6J3GodI9ohefzpuojTJLiYqiP jK3li270zlCFQLl3aRlWfhn12jP/9ZddXGH8Ar/zGBgviUIc/GMbR5CyFES753ea0jOh fGqqfCK5QVj53AANaws3osrNz5mr78baCIs7QkxwVA2D89IRCtTntKaJ1tz9Du37P/rk NnBQlkQqSTlc2654wYemX6X2VqrqYOsZ9wt0tmZdpVsKclCg+BOyYXm0az4Uxk4cETVm CuOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706740651; x=1707345451; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Syf6YeMPz8gpPA3EVgI80juDku+cwPRF2yHgIUcG34U=; b=jrG7VBlFlj0ZojOrC4QPir3pOeNpV5thB5C83Y+R4DnsztYo2xhkISwRVeM/t/244M WpbC70GSZY8PGwLrm2JTUBlY3DHivgq+gOfjL18C4tmlGTG37qOuLL5Vj/XZMy+RXs5q Kn//SAY4lTyoDP4ppPseR20v0JPXPDO3X7zX37zkOOCxmMfKEjaJuhYcUHg3EbvPrwuP cbJKgxR4MOun90+x9NKDQ4TKT0Md9E6hiAcRxUxIIvDDPpKxm2a6xzwma1t1zBmIxx01 GMMooN+ysiqyfh262SdwLUNdmwS51lKI5kqfWfYuR9Xd5wbXMSfVIp2Zx23f/NH2Xbdt XWMA== X-Gm-Message-State: AOJu0Yzoqdf0okFlWpK4Jzbfu3glfz0hzD25uYcoW//Kvw9rRtL2j5XV Aqgh+nW/vgEYszbPmzb7yxm/zY2DmK8r/ScUgc+A080LEgMmcHB/n8FGRVM3xWc= X-Google-Smtp-Source: AGHT+IFabhNFUnvdjOxg++L9fXcb6SseUl3cRggcgn5z5FCEUpUkxPFCH2Fjl+pik3OVtLZSD+aU/g== X-Received: by 2002:ac2:4286:0:b0:510:1ac1:652a with SMTP id m6-20020ac24286000000b005101ac1652amr516477lfh.53.1706740650892; Wed, 31 Jan 2024 14:37:30 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVU6Xf2k7fLJCsGaXJ48xSGR/ZEOgNNv73JxVK6al6D6h+kwLhNizQIheA/90lTULztjTEEKfX+3/KgEleOjYGyA0TnU1HRdffRBekVLCBsGPdip21OBVuPWgPhsF5aYeXOK5XSNHVbdJSp021SsqUGhnoqYgSPfrxYeh9/dE+OdLwuYbPH0vFGMaaJ4GsBITxAtMMEGDcYt5rqSUNQGygPLeHXkhyrXLZe2QJGfx6rRlsx4SKAgLQF7Q6cCXBl43Pej4mGMa9UqoTubJnXHDbW+qb7nC/BFcLPnEONINAp4qVE75tgiMAeoYuTeE4DZgWSqXVY3hXvwe6QVpoje2IfttB64b1IyRgD3ZWZI5Isv9lPmMjrpLeAYqmgiDfyUYaBCZGGG+KXLAzinIGiFlbNgE33LfOUA3RHGRYBxgdTIPkgqgEUvbH+JrTO/dnKhFM/Ogfi+IIOrD57Jw== Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id v25-20020a05651203b900b0051023149df3sm1976021lfp.248.2024.01.31.14.37.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:37:30 -0800 (PST) From: Linus Walleij Date: Wed, 31 Jan 2024 23:37:24 +0100 Subject: [PATCH 5/6] wifi: plfxlc: Drop unused include Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240131-descriptors-wireless-v1-5-e1c7c5d68746@linaro.org> References: <20240131-descriptors-wireless-v1-0-e1c7c5d68746@linaro.org> In-Reply-To: <20240131-descriptors-wireless-v1-0-e1c7c5d68746@linaro.org> To: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= , Kalle Valo , Arend van Spriel , Franky Lin , Hante Meuleman , Andy Shevchenko , Arnd Bergmann , Lee Jones , Brian Norris , Srinivasan Raju Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, Linus Walleij X-Mailer: b4 0.12.4 The driver includes the legacy GPIO header but does not use any symbols from it. Drop the include. Signed-off-by: Linus Walleij --- drivers/net/wireless/purelifi/plfxlc/mac.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/purelifi/plfxlc/mac.c b/drivers/net/wireless/purelifi/plfxlc/mac.c index 506d2f31efb5..6f5857d09af0 100644 --- a/drivers/net/wireless/purelifi/plfxlc/mac.c +++ b/drivers/net/wireless/purelifi/plfxlc/mac.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include From patchwork Wed Jan 31 22:37:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 768809 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C94503B29D for ; Wed, 31 Jan 2024 22:37:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740657; cv=none; b=mIpexP+YhlKc7vFpSubKU+/syJgJaVELetcBWcdGr5uYQgW5SteV0bjglz9lv2IwRVRIV1yNUzlWdEayRvPcs858EncDKG6nOsfm6K6pVQzX6HUdGNJduqGMi/ja89r8AukTPuR1Yehlgg+yuLwIFOqlyeO/IxiqjXVf5b0PN5o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740657; c=relaxed/simple; bh=WvEjD8jcit9p/EBjrR1N6NawFgsZhp6NvZZ3ZQiGnQs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IxwlkGJGk6TEO5H6i+EgbjV/kZBL7oKIxSBzgEk2WY07FvIvM3VyeTZDcv97zqVe2rm5A7m9LXW+aA8LuoOb7vN4Exf0S9Gngti7zTyws7zbqo7BFRAaqmblK2b1/5xsmJz0NvgglDllASQ+GdWXubkf/3WpIvTXcET1ZM7omsw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=aBhqhn4j; arc=none smtp.client-ip=209.85.167.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="aBhqhn4j" Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-51124e08565so448128e87.3 for ; Wed, 31 Jan 2024 14:37:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706740652; x=1707345452; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=okzddJtDl2wZ92vdZoXz+eQZ4Yo4IwWgeQb2Nkz5V54=; b=aBhqhn4jpqKVsL42Zp9armYhYRFNPAKOL2ufm6CGUzf9KNynM7FSlLgUudv2Bmch5/ ArugxE8+TRa05dVM6JoKuDq83PYn/RPJNFDLdbR+XqVqJ/TXvsW89+tGpkw4Mlobwj+A uL6+WXcl8wn1hVZTEDRezstVFFttL0AmCOfXItDGvOuBgpIH/jzKphwan99TnMqa+03p ugng4cv1CNCY+ze9NLrxPIFGMYtsxD4Mg1QnnJookpddW2HMZyJABn0+Eda/x9dzgxzG 0R2oQpC3S1kBdc13KPEE8sKZ61oiL1kfVXf4tkSlk3ZMNEr9QVNZtxEq4GfVS1uwppc/ saWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706740652; x=1707345452; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=okzddJtDl2wZ92vdZoXz+eQZ4Yo4IwWgeQb2Nkz5V54=; b=FfbLdZcB+ySIHqqFiXJNCR9MECU7xaqr5159wdMc3PRE405p8GAfwWm/tReEbuQKsY 73gKPtrkBHVFSVqfFd4uJJnWEPDEXq4sztyU1ZQ0EUbw1DmsYXG+zuZOyDZHqrUgLQdj vtVKfkMO8wbNeV5tKIhRFP5E2Vdv7N8khIsP31jmfiiRhQu+iApU9qu1sqn/j44/vqLR HnFsUNThTCkmwjQSri9GsSad3KfzvmWm+ObNL/gXRDmvZD9axWx/x59Xbzqc8H9pCqfG YWBks6sljsbwVLEOk5X6JHBpFetPrjWDYP55ZeEWgFpiyDnQYNccH7lGn2WGYiqI9Ppg KBgg== X-Gm-Message-State: AOJu0YyyAZmpL5Hnf6hEEqiOGAZRtGpTmxxaIJgDSwmJvoc+ukuo/cVU BYc1DvNl11jAmuavac4nF1rWtbljAUOPtolh+cp+FWfJApYBkhZZPrc0coMcYOs= X-Google-Smtp-Source: AGHT+IGH+EAgSWIqZG+M7RJ7mnt9a9Op044NAH4HNCWte2NJHhvM0dhLGwPCcBNJqTdJxc5Kkuqs9w== X-Received: by 2002:a05:6512:4db:b0:511:211b:43e0 with SMTP id w27-20020a05651204db00b00511211b43e0mr607338lfq.67.1706740651893; Wed, 31 Jan 2024 14:37:31 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVmMjpi/JZHvgCPf0wWOUcgxhE44ZJ1CcrefxPHn3urkFqe8PyCMR2Ap73e1z7vbcWYclVFMIwn6t/jRE0miJi/wOngtnIiuy17U+6HTtTIPJyiDTB3FrdpEfhTCCZ8MSyL0M0+KO5ZLfo02uzSy6kyxqouDICtztL4lQtL+eSvLKZVUDYwjq9QJ/ni8VJEfSJTBgwG3DPoZSipr2zFbie9GXaNMHvou8x1aGcpIjr+hVt6nZRisYSM37W0CvNQd5y11I84WJAVglqnbFttCIyTHCWaxI36Pd3CFqsrJJRTOW63Hxy6cf4AA6VOSCK3eA/dC68tGvDVKbE1KKAzRzsylgHnVxQD/6i4d75wIwhWb/AaqLbLnqh2wf2WbEL2OBGXQDBTujPoGLRWTQhow214dH9W6M1qngNCQRjFjUSG8zOryilrr2nYqStsjEFxr6ZpDw7uUAln9Tmbig== Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id v25-20020a05651203b900b0051023149df3sm1976021lfp.248.2024.01.31.14.37.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:37:31 -0800 (PST) From: Linus Walleij Date: Wed, 31 Jan 2024 23:37:25 +0100 Subject: [PATCH 6/6] wifi: cw1200: Convert to GPIO descriptors Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240131-descriptors-wireless-v1-6-e1c7c5d68746@linaro.org> References: <20240131-descriptors-wireless-v1-0-e1c7c5d68746@linaro.org> In-Reply-To: <20240131-descriptors-wireless-v1-0-e1c7c5d68746@linaro.org> To: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= , Kalle Valo , Arend van Spriel , Franky Lin , Hante Meuleman , Andy Shevchenko , Arnd Bergmann , Lee Jones , Brian Norris , Srinivasan Raju Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, Linus Walleij X-Mailer: b4 0.12.4 The CW1200 uses two GPIOs to control the powerup and reset pins, get these from GPIO descriptors instead of being passed as platform data from boardfiles. The RESET line will need to be marked as active low as we will let gpiolib handle the polarity inversion. The SDIO case is a bit special since the "card" need to be powered up before it gets detected on the SDIO bus and properly probed. Fix this by using board-specific GPIOs assigned to device "NULL". There are currently no in-tree users. Signed-off-by: Linus Walleij --- drivers/net/wireless/st/cw1200/cw1200_sdio.c | 42 +++++++++------- drivers/net/wireless/st/cw1200/cw1200_spi.c | 71 ++++++++++++++++------------ include/linux/platform_data/net-cw1200.h | 4 -- 3 files changed, 65 insertions(+), 52 deletions(-) diff --git a/drivers/net/wireless/st/cw1200/cw1200_sdio.c b/drivers/net/wireless/st/cw1200/cw1200_sdio.c index 4c30b5772ce0..00c4731d8f8e 100644 --- a/drivers/net/wireless/st/cw1200/cw1200_sdio.c +++ b/drivers/net/wireless/st/cw1200/cw1200_sdio.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include @@ -178,12 +178,15 @@ static int cw1200_sdio_irq_unsubscribe(struct hwbus_priv *self) return ret; } +/* Like the rest of the driver, this only supports one device per system */ +static struct gpio_desc *cw1200_reset; +static struct gpio_desc *cw1200_powerup; + static int cw1200_sdio_off(const struct cw1200_platform_data_sdio *pdata) { - if (pdata->reset) { - gpio_set_value(pdata->reset, 0); + if (cw1200_reset) { + gpiod_set_value(cw1200_reset, 0); msleep(30); /* Min is 2 * CLK32K cycles */ - gpio_free(pdata->reset); } if (pdata->power_ctrl) @@ -196,16 +199,21 @@ static int cw1200_sdio_off(const struct cw1200_platform_data_sdio *pdata) static int cw1200_sdio_on(const struct cw1200_platform_data_sdio *pdata) { - /* Ensure I/Os are pulled low */ - if (pdata->reset) { - gpio_request(pdata->reset, "cw1200_wlan_reset"); - gpio_direction_output(pdata->reset, 0); + /* Ensure I/Os are pulled low (reset is active low) */ + cw1200_reset = devm_gpiod_get_optional(NULL, "reset", GPIOD_OUT_HIGH); + if (IS_ERR(cw1200_reset)) { + pr_err("could not get CW1200 SDIO reset GPIO\n"); + return PTR_ERR(cw1200_reset); } - if (pdata->powerup) { - gpio_request(pdata->powerup, "cw1200_wlan_powerup"); - gpio_direction_output(pdata->powerup, 0); + gpiod_set_consumer_name(cw1200_reset, "cw1200_wlan_reset"); + cw1200_powerup = devm_gpiod_get_optional(NULL, "powerup", GPIOD_OUT_LOW); + if (IS_ERR(cw1200_powerup)) { + pr_err("could not get CW1200 SDIO powerup GPIO\n"); + return PTR_ERR(cw1200_powerup); } - if (pdata->reset || pdata->powerup) + gpiod_set_consumer_name(cw1200_powerup, "cw1200_wlan_powerup"); + + if (cw1200_reset || cw1200_powerup) msleep(10); /* Settle time? */ /* Enable 3v3 and 1v8 to hardware */ @@ -226,13 +234,13 @@ static int cw1200_sdio_on(const struct cw1200_platform_data_sdio *pdata) } /* Enable POWERUP signal */ - if (pdata->powerup) { - gpio_set_value(pdata->powerup, 1); + if (cw1200_powerup) { + gpiod_set_value(cw1200_powerup, 1); msleep(250); /* or more..? */ } - /* Enable RSTn signal */ - if (pdata->reset) { - gpio_set_value(pdata->reset, 1); + /* Deassert RSTn signal, note active low */ + if (cw1200_reset) { + gpiod_set_value(cw1200_reset, 0); msleep(50); /* Or more..? */ } return 0; diff --git a/drivers/net/wireless/st/cw1200/cw1200_spi.c b/drivers/net/wireless/st/cw1200/cw1200_spi.c index c82c0688b549..9df7f46588b4 100644 --- a/drivers/net/wireless/st/cw1200/cw1200_spi.c +++ b/drivers/net/wireless/st/cw1200/cw1200_spi.c @@ -11,7 +11,7 @@ */ #include -#include +#include #include #include #include @@ -38,6 +38,8 @@ struct hwbus_priv { const struct cw1200_platform_data_spi *pdata; spinlock_t lock; /* Serialize all bus operations */ wait_queue_head_t wq; + struct gpio_desc *reset; + struct gpio_desc *powerup; int claimed; }; @@ -275,12 +277,12 @@ static void cw1200_spi_irq_unsubscribe(struct hwbus_priv *self) free_irq(self->func->irq, self); } -static int cw1200_spi_off(const struct cw1200_platform_data_spi *pdata) +static int cw1200_spi_off(struct hwbus_priv *self, const struct cw1200_platform_data_spi *pdata) { - if (pdata->reset) { - gpio_set_value(pdata->reset, 0); + if (self->reset) { + /* Assert RESET, note active low */ + gpiod_set_value(self->reset, 1); msleep(30); /* Min is 2 * CLK32K cycles */ - gpio_free(pdata->reset); } if (pdata->power_ctrl) @@ -291,18 +293,12 @@ static int cw1200_spi_off(const struct cw1200_platform_data_spi *pdata) return 0; } -static int cw1200_spi_on(const struct cw1200_platform_data_spi *pdata) +static int cw1200_spi_on(struct hwbus_priv *self, const struct cw1200_platform_data_spi *pdata) { /* Ensure I/Os are pulled low */ - if (pdata->reset) { - gpio_request(pdata->reset, "cw1200_wlan_reset"); - gpio_direction_output(pdata->reset, 0); - } - if (pdata->powerup) { - gpio_request(pdata->powerup, "cw1200_wlan_powerup"); - gpio_direction_output(pdata->powerup, 0); - } - if (pdata->reset || pdata->powerup) + gpiod_direction_output(self->reset, 1); /* Active low */ + gpiod_direction_output(self->powerup, 0); + if (self->reset || self->powerup) msleep(10); /* Settle time? */ /* Enable 3v3 and 1v8 to hardware */ @@ -323,13 +319,13 @@ static int cw1200_spi_on(const struct cw1200_platform_data_spi *pdata) } /* Enable POWERUP signal */ - if (pdata->powerup) { - gpio_set_value(pdata->powerup, 1); + if (self->powerup) { + gpiod_set_value(self->powerup, 1); msleep(250); /* or more..? */ } - /* Enable RSTn signal */ - if (pdata->reset) { - gpio_set_value(pdata->reset, 1); + /* Assert RSTn signal, note active low */ + if (self->reset) { + gpiod_set_value(self->reset, 0); msleep(50); /* Or more..? */ } return 0; @@ -381,20 +377,33 @@ static int cw1200_spi_probe(struct spi_device *func) spi_get_chipselect(func, 0), func->mode, func->bits_per_word, func->max_speed_hz); - if (cw1200_spi_on(plat_data)) { + self = devm_kzalloc(&func->dev, sizeof(*self), GFP_KERNEL); + if (!self) { + pr_err("Can't allocate SPI hwbus_priv."); + return -ENOMEM; + } + + /* Request reset asserted */ + self->reset = devm_gpiod_get_optional(&func->dev, "reset", GPIOD_OUT_HIGH); + if (IS_ERR(self->reset)) + return dev_err_probe(&func->dev, PTR_ERR(self->reset), + "could not get reset GPIO\n"); + gpiod_set_consumer_name(self->reset, "cw1200_wlan_reset"); + + self->powerup = devm_gpiod_get_optional(&func->dev, "powerup", GPIOD_OUT_LOW); + if (IS_ERR(self->powerup)) + return dev_err_probe(&func->dev, PTR_ERR(self->powerup), + "could not get powerup GPIO\n"); + gpiod_set_consumer_name(self->reset, "cw1200_wlan_powerup"); + + if (cw1200_spi_on(self, plat_data)) { pr_err("spi_on() failed!\n"); - return -1; + return -ENODEV; } if (spi_setup(func)) { pr_err("spi_setup() failed!\n"); - return -1; - } - - self = devm_kzalloc(&func->dev, sizeof(*self), GFP_KERNEL); - if (!self) { - pr_err("Can't allocate SPI hwbus_priv."); - return -ENOMEM; + return -ENODEV; } self->pdata = plat_data; @@ -416,7 +425,7 @@ static int cw1200_spi_probe(struct spi_device *func) if (status) { cw1200_spi_irq_unsubscribe(self); - cw1200_spi_off(plat_data); + cw1200_spi_off(self, plat_data); } return status; @@ -434,7 +443,7 @@ static void cw1200_spi_disconnect(struct spi_device *func) self->core = NULL; } } - cw1200_spi_off(dev_get_platdata(&func->dev)); + cw1200_spi_off(self, dev_get_platdata(&func->dev)); } static int __maybe_unused cw1200_spi_suspend(struct device *dev) diff --git a/include/linux/platform_data/net-cw1200.h b/include/linux/platform_data/net-cw1200.h index c510734405bb..89d0ec6f7d46 100644 --- a/include/linux/platform_data/net-cw1200.h +++ b/include/linux/platform_data/net-cw1200.h @@ -14,8 +14,6 @@ struct cw1200_platform_data_spi { /* All others are optional */ bool have_5ghz; - int reset; /* GPIO to RSTn signal (0 disables) */ - int powerup; /* GPIO to POWERUP signal (0 disables) */ int (*power_ctrl)(const struct cw1200_platform_data_spi *pdata, bool enable); /* Control 3v3 / 1v8 supply */ int (*clk_ctrl)(const struct cw1200_platform_data_spi *pdata, @@ -30,8 +28,6 @@ struct cw1200_platform_data_sdio { /* All others are optional */ bool have_5ghz; bool no_nptb; /* SDIO hardware does not support non-power-of-2-blocksizes */ - int reset; /* GPIO to RSTn signal (0 disables) */ - int powerup; /* GPIO to POWERUP signal (0 disables) */ int irq; /* IRQ line or 0 to use SDIO IRQ */ int (*power_ctrl)(const struct cw1200_platform_data_sdio *pdata, bool enable); /* Control 3v3 / 1v8 supply */