From patchwork Wed Jan 31 22:37:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 195003 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp67665dyc; Wed, 31 Jan 2024 14:39:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDRljEba9JBH2XhMgla603lZdT4N8NUc4QD74Lsnt2w4t5zHSZ93/hzSafSHBzUMFrTTbo X-Received: by 2002:a17:903:3296:b0:1d9:3f86:3453 with SMTP id jh22-20020a170903329600b001d93f863453mr1637614plb.20.1706740796995; Wed, 31 Jan 2024 14:39:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706740796; cv=pass; d=google.com; s=arc-20160816; b=edbN5I0pBKrf6fWlI+fuxBX+DbqidK8FWPl95YL58lorID3j81yVQI2WxfQeJPo16L UZBVOTf3TNVyFB+eDsqg1i2omfvLEYKSF/Dj+i5e9kjoSkm4Svk5gg4lEg52YoyZa6bG GroDyc3EWmBs2AI3zfZxoH98DDRkGGn1xPNDBl5iBqVeaz7hAGTNg/MVCMo4uqS4BkjD UrUYP3HCM3l2cFhb53c3TQurEP42EK29dTpz5O3D2MBKgOaMS9fYD/EkUmEYa7waPw14 F5MLNVp4EfB1IMFZCgjqw8rUFyMR/1re0Fk/5RkfooJMoKmigHEJpFh5AvdWJ7vh9b0Y Y+sQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=dtLJJ49D/VVSAFpOTc5rh0hgC/Wh9sQ3F5R/ApzLoDU=; fh=XmONm0dSKB5wUCjYyoX87Q+OWUWWJlC0hUtoNiK1Dig=; b=mlSiowfHntOW+6eQmXAk+va+gj4JuN3xVTu06oegcKx3OjXFh3PD0kyMsPXBlEdGw6 wW6h7wCeI4jo1xR4JQ7utN64km4r56OuHVkVBkbjlD1mG1DKLbk7mvjwLNZcK3hdFUDF ZFhgslqIqjTpNN1LrDRFJWR7TASw11x+kZy+1tZp8NJ8T6e0QWjB+9ZxPB5IFkss00XZ 13Lkat5ZsOAcOrAF5zXPYqmbBhc0S1SapbISqRvyUNd3gz0/QlYIfiQMBu0sm/8qzg0/ +C3XHkgp/C2YQdNKVUK3FzD5jCCKzBTbYtjgzfw/hzrb4RmV8qRSnn8BPGN0qgnVNR+X PhAQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mjIJsYT8; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-47262-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47262-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCWxaonS7TYNh5JoJUT1JDlDx67MFVhkmw5wFPdmsR53OwIY7Z98Lp0epjuxwaNMIvcK63m04hAVZ+Lqfiv6dSyiU9LqhQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id jj20-20020a170903049400b001d93ddd76fcsi1178630plb.249.2024.01.31.14.39.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:39:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47262-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mjIJsYT8; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-47262-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47262-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 09B8B291814 for ; Wed, 31 Jan 2024 22:38:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F6CF3B793; Wed, 31 Jan 2024 22:37:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mjIJsYT8" 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 EF5C03A278 for ; Wed, 31 Jan 2024 22:37:27 +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=1706740650; cv=none; b=Uf8ah6t94esn+r2CUgo82Pj+/R7Hdm/aZMSzHFovNhNqGkAU9cUqT38+Zp8SSOzUFwlVu8F0NW95t66rqUJ8QUAkWr4G45zwyXQLx0gaznLw/B2W8cuXHSPzl1dpp2XpX0eMf9WotCGP4OUypI4+ySTuxBzIvoF+rtBC0hnlzdQ= 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.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 Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-5112cb7ae27so451542e87.0 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=Q6RyDBE9Vm+7jNct/LVtL0JpDUfPTRrp7fbLFn9gLNiIuYHfz7d1Zx7WqXfnhS0ovn 4bZjvh7RVwZOTSTfoI5dhvgkCgv5+LoM+N0Wi08M42HKx3XZJip8JAt2LF8WuiY7bIak RxPso/gYTJ6uD26pyARMSiO3Wv9iPpD/NiCVB4hqPE7LhsR234Nu+W9c4dK0Y0dbUDHr VSkSP/xU3efl7ysZprWL3tu9zSTee8hUN56OixHnVFknOtUsWJ/9+j6rYZzokhb5ec5H XIl26xjdhhlpzk2LbREN2YuQMSjjyB3XtGPAuGU1HmWjwciGIgHzm6A7a6Q/6fc3FREB 5p5Q== X-Gm-Message-State: AOJu0YxpbNGElK1m+sp+sbCwhKymdlpnU4OJu4j3X5iqEq1srLh9Xz2E eOJOWa3QSM8mhW3WDBYuHsOiVXxSYNIGFQGVSK+L/AYqQcuPbup4n1JLJMGq1vA= 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-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789647437932893032 X-GMAIL-MSGID: 1789647437932893032 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 Acked-by: Toke Høiland-Jørgensen --- 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: 194999 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp67131dyc; Wed, 31 Jan 2024 14:38:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHLIDId+abN1IAK5vroQYftNSbAzpwBNDuY7eLlvN8jCYSxB9E27a2XY80sJ9vN2DpV2kNb X-Received: by 2002:a0c:f18f:0:b0:68c:45ed:eab with SMTP id m15-20020a0cf18f000000b0068c45ed0eabmr711691qvl.18.1706740720364; Wed, 31 Jan 2024 14:38:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706740720; cv=pass; d=google.com; s=arc-20160816; b=siz4feeht9ziO0F3JeMlCHmmQAngd1iYkPmvbj7I+TVZtazKfjbrbrNOwkR93CdKR8 /Rwzqjx7qaeC/ESJex2EMq28WdqNGl2Xoy1KMou3UyowkirGAXaUkrRHog3QVVtXaCBp XIhYhN4FL4AN1QoXMiKlwcWwmoTluDQR+jNCEjYGmS+QRf4zvKoazr6BLLNrWeHxtC5c xUR+DkG3J6NZvs2aalZBn/18eiOPurcUcbpvI1fgpxS2rI1srRGFGh90nYZv0QMFsmVs C/hlnvfyx2vxX55ctpBG09wWCMVK0BXYfleA5WLxp7xQ+GERANMQfk7AX1SrxUvJAXS2 FX1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=qflVRgaLPtLFWdxTtNrz5ppvd0xQoWg+EunwCWy5ijM=; fh=tvH4HNj7C0S8MWp8tpuiK800I6skmRVZjc2S1tOEsNE=; b=cZ+ehige2rJ0q2JpJfU+9kXa30FsEoUDbx7pqzdJU5A0nyRkqs5CW4BIf+XFx8veX5 akwHPXtK+xklXmeFdpikm8Wk4tvMO9qASmzRINga/g8FPZMsFnp04KSTuhVkeMxGsDxm POVTkWgEY74H43Javw/C8YUZujq6P7M3BWmeF7MkR8jT+2kGioHMei1kzM/dfZpBCKk+ 5YHGutFCLOs460N3wg6l2krAjvOeWHLno2CkYc+xKOPwN0LKLp472t/FkZxTLkioTzxg MfU0wbwlmvgZPXLiwFJXvTnrbRtLPuXaU/RaRhfV9qWGHvhso6iNL6IftccW1rHJt9pB gflQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qi0hhmFC; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-47263-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47263-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCXMdyBBQPZpFpWYtQJNE49wcHbUhdmCr8lDErUkcawivFFoAqfAitFm9/ut1doWIjEBlhthBP+5auyyB4vdyubu73/ECw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id eq6-20020ad45966000000b0068c561463cesi6121948qvb.373.2024.01.31.14.38.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:38:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47263-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qi0hhmFC; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-47263-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47263-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2C8551C23BAB for ; Wed, 31 Jan 2024 22:38:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6925A3BB3F; Wed, 31 Jan 2024 22:37:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Qi0hhmFC" 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 D715F364CA for ; Wed, 31 Jan 2024 22:37:28 +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=Vp1n5w1oH8gGfKdJGy3av/NsvtHlNfwRrSimPwxHje5HlfF9nxp5LeBaEOhLuA80+WUtRuiqlTO6nZ193zQ5Tn8FivtUkYacDlMnEPrNE+kGyNwGhksKmQCysYwQ79i5frAKJ8Fl8/aMig0qwDPArUF9tTBeF1on+ooL0BffqNQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740652; 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=Z00cM7EBOw165qTZYxiPjj8BBv3VMzVfI88OxvTtHUxuZ4465KmHAkJndRp6xDJycXwkWEFm4wDTNgWirtqk07sW384WnD/DjyfRCdTFB2fLKY3JwxLxfa87tFTznKiVfi9avidyZsCjWnzVb90h3Qyg5IoNzlDpqmH08czai0w= 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.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 Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-5110fae7af5so344313e87.0 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=AbDB+0YM2IxTBR64Lt/hp9gnWBd5KWCFpCaUfyuGEHxlZGBLXQmsjVextYwvfcsgSa OEb3uX3htvaCRBLHCkwnHBpnRJay/Rs8vkRZkEa/oRO7E4vOpxtjVY3JLdFIJ/zE0DX9 3XHUFeo2t8F6jlfhAl4bYHevVO2ghnSVn1sFFwnD/hjI4Kc9tXTjdtIaFzMrUkz8S3J5 9FEBkX49KVbYSJmPjobuX2zQgZvBteS6MWty2O0EIHAtHfrnDTkqmjeJx1h3A4ItljGu /pYsIEPnR3wq8cDI4GrxzLYRa2q5r0SiHbBpeo3BnYcQhWKntjzJppI/Vd6Svvs9t94e xtmw== X-Gm-Message-State: AOJu0YyTcR+9NeJENInYA7Nci9KuTCkMYN6LutLQqye+9+gPpmZym5ZV cHiyVJkeyX/YvDVF8cfDIrtJk3ckk+xM/js+j87JF7Uy3TmeaLSmrOGtNRdTBJU= 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-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789647357685426417 X-GMAIL-MSGID: 1789647357685426417 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: 195002 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp67307dyc; Wed, 31 Jan 2024 14:39:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IG/K56PdSvaqmTH3C1NfrFhhV49EPiGd/MHraKTlUs55AHZeV0NP7chqHkmTruOQlTVIoky X-Received: by 2002:a05:6214:e8b:b0:686:af0d:bae5 with SMTP id hf11-20020a0562140e8b00b00686af0dbae5mr4265303qvb.60.1706740747157; Wed, 31 Jan 2024 14:39:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706740747; cv=pass; d=google.com; s=arc-20160816; b=y8vcfKTm0s7nkceIH2wGounC+vJmeVRUSpJ9jLQvwYXaU8KehrPLLCgakSFphTF21m 0yqH97bAfH9rFV046ZG/qdJSD11leMAD0XOyyk7N2R4ORpx5T8quDhUqaTqRfZMcsCBa MiywASkn+3nCKJLmech3vHjN5DQTI7+jKUZCr9ZMKeMNIz9B4lB+J4ve0tsJ5YAMRLFi qY19KauJZcyYI0DzXzZUslTyVIzzt150F12H1LizzAJXVgEsbhlNLLLEAVvyyf2Jrzk9 racyyWcN40AtqdDQAMyFYRIZlwVg0rQL4EB+KRMtUIIt4bKtYQFPM7i3Ajj23q3mFuUp 9DUg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=/DrXHgtRj4uXVnKQSHYAiPmivQLWMpRFu04w8Lw2Uhw=; fh=QO+xJIpIUZTA7XLqZoJrRFfkt091gCnxPV/UT322jco=; b=CAwj5RRfOaoyGy6EbssnCJ6UVO5WJGwKAvuS+jYMzKgBXBEBG/syyoWezr+TBgnzx+ AuQ44Ox0r3KmCelcM0kL1gN/lVoA3oQjLFhNcoYErQ45hPfVovlPTXR3SSGZ67DhpXxD D5Aizu1oElJel7GqYkap7t2y/FvgOtZC9Kbas7jxrT4hq/dqLOrlT2YzRs/9IfHvNchT zhQ4dHfdQUHw5AeTi84XKHV9QVNMcbGvDO33uOdN0E099bA8Shi43hhlCSNidjRlvZYd HCEQd2FNfrXbwH4MU59m7xIfLyeyYgo4tQSgoJW1oh2KDaiDiCLa3mzSmQg1xtXt6zN5 AplQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hE4m2gYb; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-47265-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47265-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCWM9rMjuvSQtlysZ0WoP3+xqgSikvJHznbfxSd4UNBwOdwTAFQ9nNOpo9w/sf1rxNXcOLIVuc3FtXB/IaDIzgQjOYMF8Q== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q8-20020ad45748000000b0068c5268d4a8si6382957qvx.574.2024.01.31.14.39.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:39:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47265-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hE4m2gYb; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-47265-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47265-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D77801C25664 for ; Wed, 31 Jan 2024 22:39:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60A8B3CF51; Wed, 31 Jan 2024 22:37:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hE4m2gYb" Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (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 709BC3A8D2 for ; Wed, 31 Jan 2024 22:37:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740654; cv=none; b=iFaOjNC359s3WymISqFNVUAY1KR0G7w8mwudC9p+OL+JhucejkUCvilj7D1S0oz/t3eJp3GHec14h0gHYkWisbAgDmPV0BuY9gTaX/hodRw5xN67S0n77DN7fXqKVAnIIddxoXgywM2PcZqz5Z5MdQ0S5s20mt8SH3+YF5NL7H4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740654; c=relaxed/simple; bh=qs2IwTXMaVMdAglmU0WRwo3NIfb2WrdCf70I7utlgJg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WxrFP0262kdSl3u0oO+Du/gth6/vlUbdlzVmiFMshsXDt13Vi7NPak0KhRRpgELaPcjuMQ4SCTQC9QdcNFjOSaPJobnhKjqew9uER4K244ejufq8anM9xha8qDKV0crgpIKwdeMetMHv3Bc0xLe0aMip1joEehTPXQTOeLbbsv0= 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.45 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 Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-5112cb7ae27so451604e87.0 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=GXlO7ODVwhDeSJYJK5lT/aasBLN60oj7c6lltzEY3XiqPfMOjRovvnJj/zgRaU/+c1 dRCDZk/Uo8kTlNdndGt5V4t2d3FE/E8L0Jq18tq/icC7d04SZXJq5sIlWYfMN/+sj/mt 6SibvX3dlUDvV8MCRpw6M39PL8txqhM850qXy5rvK3h2qDhOi623voJ4CTXfIERW/1D0 Hpi5kbchBWQzpBdhXw7yzHuTg2CjKKDdKkk3HMKu2TRSvDDqcvqhCxZqEE3m+JActXPU nqiq6n/3cPiImiexkC86A/DxBVa3Iuemn3hUU1RZQJRpPhRxclBQG8NhV8P7mbVzcR0U 24SQ== X-Gm-Message-State: AOJu0Yyk95ccth34AjEpfMyCxi2+jI+9PmGQbyHI8zU2na/qau4ITOpd PQEP6KKnzbFwMA4EoUs80+civOnFgnCVGjjsDrm+l1pq0m2D6Oh4qESfwaUpRAQ= 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-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789647385667454718 X-GMAIL-MSGID: 1789647385667454718 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: 195001 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp67264dyc; Wed, 31 Jan 2024 14:38:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IEoTdZ+rQjjPqAvLwy3wsX7BSiOetyY9nqPUVtKAYW3GEKWZA5hg3lOshbD4qlDPtXZemAb X-Received: by 2002:a05:620a:2b87:b0:785:447c:d379 with SMTP id dz7-20020a05620a2b8700b00785447cd379mr396009qkb.35.1706740739089; Wed, 31 Jan 2024 14:38:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706740739; cv=pass; d=google.com; s=arc-20160816; b=Pgj19zdQ0POEtoRU7Aj6f6cNqaLwqo+x2PU0eIL07oR8PKPDaPLD6lJn8YNMhKe6Al 6Ia4Ojl0nRqKrZDKtXWAcf6xPEtS1oJr/UTAXL5IySkPAZsEJstCt9B+ZUhBawsQWRZp weahqTBae3K+RjoH0Se/sHaz2CAO8NXDqhglv4C1D9KdDtQ/B9k1zvWJcZDa/+GJn2bZ qEO8RGDL3BYBDcnXEvcYjNbP+s3uPEQ4h3tCGObj8fIQXnRe1sOZ/E2T4q+jVe4oJczz 2aMMn6ZrsDm0Q/UBGGRM1CA/uzslRxYpjCppCUY4CHP7T1ZytDQlxcSvxpnyjfE4APxE cOBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=Ugdn3z0/uQcbatROe8KemahKg/7jjvyhRHQgV89WdMo=; fh=Mx8TYWeHPgPK8BWv+KRcDA3XxihYs5BpwXRYjHymkZk=; b=m6qvNl7vdvSvFSoZGdnmFQfhcV9iCKS5yFHr1u1fWCIVQCug5w/teh0n2pJb1zfVBW s8B/NavHloTbo0D0ebjbd46Ds7zsJZ5zXaCthm3JoMI506pkTZhIPKvOhQ41Fe1L2gkp TrwLX84tpGEkJSPs283iqOqm6WyodkJBliuG/Kls45cBI80y5ysBUZwUhqYcKPYtTHH8 3+LFAYVSpapW28TLNh1p2VKyZRNljeFSkEsYdMFvUuu8Ygz/d5mmrfY0gaiY52JO2WaT eD2m2hnz5gJn8BBRXnQNpq3GmmcTVtLcyRuu2jZ7db9zUuoeVPJzNHqhHFiFmQAxW21K o0VQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xK41zBb/"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-47264-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47264-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCUXUMOex5eW3gRSj1r1TDXZSCPT67E2vmr7j0he/uunmhvOPVxG8afXS8GnHQKgbpW/9nRfOg3gVOVY6aCCiOlndIwbiQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d4-20020a05620a204400b00783f409e769si9485117qka.751.2024.01.31.14.38.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:38:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47264-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xK41zBb/"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-47264-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47264-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DC0981C227E9 for ; Wed, 31 Jan 2024 22:38:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B75D33C68A; Wed, 31 Jan 2024 22:37:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="xK41zBb/" 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 96E2B3A8F2 for ; Wed, 31 Jan 2024 22:37:31 +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=1706740653; cv=none; b=XHvPUHEYk1L4f0mbc3/Y8Rw5jMlj64c3+McF6yzLV5Q+ha8Fye2eDqZ7AX5VYAluHpH9ebQVILE3FGyoPZh971OnedS5KicOY/T9TWSVQ+SdsOkn1Yb8Pv91NnEg8z0qczW89QpZVaeK2zJaNH47ar7bgNw8ZLLFeypIhGT+47w= 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.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 Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-510322d5363so383035e87.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=JT/FHzdIq/hBy6RfT9rItPxgdxePFMfy0jUuB8TGaWttvEqOUVrMbkWWzYDrjtivxc bujWlPm2bZkt7PzwrMMZ7u4kcArTXguzErSA0oYZOjIMAhcOqE15buW0ef96UhXzfddF QPuDcn59JHMlPIDcEQ0KMo5S6gIiZkkT4mnkFXiKD0AyLZ9vTUaDsNqp/VfOyMe1BL5J wLoh1Gd+JJbOWuYbTde8OQDr7svGaKAJLPuUNbG+5GUwnzosJkCu3zYHq4BbMVeIbINF uvxmR7av6wvqRT+HnzPEuO8GRzDq1Td7s05UwUxLcYD41hDOjjhKFOnGRzlyLljYVN75 CSuA== X-Gm-Message-State: AOJu0YzDvhGFQFyitUx/CAv9NEbSEFc2UZDsm4QcHFwBVEOuFMiw7PJi M/9jFo42XWRrfVBVTNugLxWwSboPxwqEkshe5WQJcLZr8laT01AtJxSIhcZUZCA= 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-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789647377503117237 X-GMAIL-MSGID: 1789647377503117237 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: 195013 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp77076dyc; Wed, 31 Jan 2024 15:02:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEd81H/KTKK74NjrgeVK5JmZM2EvMF6c45fSgfEMO2sMpoRFAfgBxFSNYmnI6P+rr+ROfbk X-Received: by 2002:a05:6a20:b7aa:b0:19b:1eda:ab61 with SMTP id fh42-20020a056a20b7aa00b0019b1edaab61mr362448pzb.54.1706742140567; Wed, 31 Jan 2024 15:02:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706742140; cv=pass; d=google.com; s=arc-20160816; b=NJ0zD68LhOCh0SGZjn9g4ES+iBKKdA33ecUtJZ7tpB+zfxZfrttdpbWpU1nbnyNmfO eHxmWQWpfxIstjziUFnzjctD1eTkNefV9Vf0CdNE8TYaQ5kWDn6KSu98mwwT/KB5wRv3 8mS7qXW2EcTHrj6Ib1GWTey05GWaTZ6F8TnUvhI4JOO774OoDWGM8eHqYBDy11pajuN9 xXbMDkZshLRqyd1sWDdFhmeCeNdTcW8VFwQV7H+GbzYHGG47PInUIzER3Q7N2brn/Cz9 6wYPpwVNg346dp+KGxpbdh4eYTwuWG0MTwbepPJluB6foztOg2t1i86Rc9pbb3VIlF1o soQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=Syf6YeMPz8gpPA3EVgI80juDku+cwPRF2yHgIUcG34U=; fh=7aokB0ZHLlSkhgwKUqbMt0iUABqdaTPXAPy6M1e0BlI=; b=nGWHuI4v+bbMK0d7aUuHafnXAo7f07DDYU8QcW4Ch+tUF9+acEw1aHsKY4WFmppqJS 2uEA5hplmzbW5l87cNFhIaZQivUwioJPzG+rWe1Zf8rSu8jEmZJPV0xBdH3xB7GPL5k9 wJJQ5wPgBxLOfQWk3JCV8ApPqpL7nVMmAUUqXuPfhT/tnFrwVB73wuH1K359D1A7ugOW 00SCX6I23nbLDvSWH8rainXhIJZE4jHiWCexJXzfSrFRLfW3DFCtTbnrQaeuPPz7GaBJ ZUyvzR6fBF/sj0ptx++ZST/kwepNRI5vvmdlY2sFZBXi/9IR34/WRugOXbZ84x3Y5M60 8Nyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HDPT9GmH; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-47266-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47266-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCXXIXKYVXRqyNN+5j1yuEEXKE7LYeIztZ2Y6AOyWnw+Xgsq7gfOufJDPI0AansUX9S0Jg4cQPtQI4M1//kvGXxZWKCzig== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id r18-20020aa78b92000000b006ddc1bf70ecsi10204286pfd.34.2024.01.31.15.02.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 15:02:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47266-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HDPT9GmH; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-47266-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47266-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 796BEB2BDF7 for ; Wed, 31 Jan 2024 22:39:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88EDD3CF57; Wed, 31 Jan 2024 22:37:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HDPT9GmH" Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (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 BF4863AC34 for ; Wed, 31 Jan 2024 22:37:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740654; cv=none; b=Mufuy/6p5o3Zv36lquvSWcS0t1/Bv+0e2RXxakCkQvwfpiXC76ffgVc9cQO9N/GwdRYBN2yZoEUIuf2CrRrtZPHcArR8QLlRwVMEEFD2CWUbuPjVCfRM7UhG0vF+vIVPUT7ijivjWKK0W4GTvTJhaxGXg/ZX5ffIPH96LjXQH5M= 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.43 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 Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-510221ab3ebso413346e87.1 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=wKKDaGfr8sz3vKm//IU+lfyUq71eGSDrCnYHNZVdp+4dY8zubVkeIM/DLhXoo8sc+O dd2HbOBSljB2KEZOzv4b5IB1VAqXx154Am74LEHZkDEAVWkEY7umuyOQQOjE2ZmoeG23 dmBmV+0in7VFnk9HavXv6XmG4j10kRxrRI1VHee4EQyokWIEuAN21GA0Xv3COTvZJhXH 4b8S8H9Gc/dQzsC72WjNURF7O2QsTKNkK9mzrkRuvrGQILLcqDzHawHlDIFkE5ZZYACq BqubqLRVR28jYZSgMVT0pBDUNJVGC7/Va4DCQb9a1WoYHxkP0oTKn8hqHTuhy/yPgTrp MKPg== X-Gm-Message-State: AOJu0Yyfa3QbC315KkEQYdL8+P45g83TokV5JyfLu+kWiV1vFdqPdQFa Fx2YWuSsvAsewPzJilyrKtpZxJyxa8KI1O+gqE5Iw729TM3WtLIL3q6DktTMWLM= 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-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789648846932221011 X-GMAIL-MSGID: 1789648846932221011 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: 195004 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp68045dyc; Wed, 31 Jan 2024 14:40:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFFbKth+JpmhYVtXP+u2vipSP+NfTAmVUB9eK5mu7til1Q5EjKUuiWHRfKNTg7k1NyMhUjO X-Received: by 2002:a17:90a:43e2:b0:290:146b:ed81 with SMTP id r89-20020a17090a43e200b00290146bed81mr3256904pjg.8.1706740849926; Wed, 31 Jan 2024 14:40:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706740849; cv=pass; d=google.com; s=arc-20160816; b=aTsGsoM4bi/18Pmp3S6u39Jajt3CMk4rviav3k2uttA7fzjbp/juCliJDlRRJu8U+W E1eA0DQxZZo4/eBdxrg485Crgs5vP9FfA4NgGrMQek3eVvDDp3lITCJyh7ZBcqlu0LRE HKNzm0vyxdf3dGueRk1iq1CDHBqKifud5YfKg3LL8SsE2ZxsMYn2mE2aS/5l3vCgYzaN YzPrMt9Cu7UEfyvo+nJjt81mvmV7MxZJ6E2DtYJvlP0WnTv9b0p2IqqO9oFSJUWrf42e iVZdgQi68CBZ33kjeTHFe8a0rGqKJoSR4de0oAf9ulTNn66GrbEXfpZIe8sSG1tsFm3I tijA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=okzddJtDl2wZ92vdZoXz+eQZ4Yo4IwWgeQb2Nkz5V54=; fh=ufn5Wul3oG6eQdaQJ7MtzUo9Zb3YgopFubPeNMawuAM=; b=Mrjv73l0C5ifo5kt+YSmaRZ3fY2DSgJbL74GY1eGgb/NbdpqNlua7criENuuYgRdtd TcP3xnDBQf5euJLyPHo/Xe37WEs+oH/dEnzHtjPykRAvUe/S1VykDTpeLehfmUVl9iXO 316xfPldZ7GCOD5qHS57OMgZj+jlH8gscREAHi8FNZ49vtjTVLi3MkMlRcrgQK9ocLRf NKZco0Zf6M3HrQMH5XgJ4kdW8CSs/lrmokf9eORWmGoMMhxbSU8SsuJGng1riboo+EHH XcWULNQ3SVnrSUygnKpKI0yCb/0bOz5iemLCbkt4c2gBUvltFVsT1QO+FUBEO8IuIICv G+KQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aBhqhn4j; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-47267-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47267-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCVBnBca6t6VNEiLQJcOju19hBLeIvHVm5jfeXbuRTHBt0NImEQgNxNo2OmVdU/QwlOchOzbbDE53Y/3UbUMsrUAkg4pqg== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ga22-20020a17090b039600b00295dcfeb4afsi2206162pjb.2.2024.01.31.14.40.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:40:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47267-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aBhqhn4j; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-47267-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47267-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A2B382924E0 for ; Wed, 31 Jan 2024 22:39:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7571C3A8D2; Wed, 31 Jan 2024 22:37:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="aBhqhn4j" Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (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 C94043B29A for ; Wed, 31 Jan 2024 22:37:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740656; cv=none; b=KOhDYl/Bzk0qurce9PwMd7q0QvO6zVp4tdWXcdGOtDj5D5nLuTYd/xgdYLb8SwGFWpE89KBLQt6fAbj6ym7h6DcxpSMxdlhfTFNbWFIzkL/2j18L7lsl34qQ6P3OpHCLM3ho6yiU2i/tjdruZNdMb3WxbSXstqhCQWOaHL+yLWk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706740656; c=relaxed/simple; bh=WvEjD8jcit9p/EBjrR1N6NawFgsZhp6NvZZ3ZQiGnQs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=f6ROl58LQJbZP/kBK3jgvGkmSJC8STrp9W9+wKntJHtQvqyK9qSznHQnZhA6jrN3iXnvdabf9GtYfSa9JfeO/v6NuvwrD3EJcxoqunXBaQ6wgDjSl6WTZCXGUeQMQcCtyrTk8sacX1hhk1KjhWcAIIA7qnAx5blX9P88IBcjtpc= 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.52 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 Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-51124e08565so448130e87.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=JklKR9csx1glPjZAi3moQvN2JBMvU1M7i+MBpolPqPCaAyC723/bt39lrTFDCiet30 ewThfO036wEUyHDa/7EMkFOyK6opuKwgGYOo5HgPHaaMA/p73Ek9g3o1KazR2/TzYVlW MW/hT7moNmK6c2SZf2InHEvE8dB+71zMS/+QpuVl5Z+oWdqWNq/glezXFY82xNGuF02J F313wjV50MCBfzG5JMT3DxZti7i2bnse+gvfA7yJlgO2GL5qVb7GKAxobUmBXYUzfMeQ tXeQzQNYoK/PzmpZfXYLhKQJCIWBcNhdiG8HQsDDUcxp1TR8/G6fJmJ+c9nuOQSJLkEG zoiQ== X-Gm-Message-State: AOJu0YxcdiNfWYrMIk3400lCBC4CijYWctsCtTKVXOuSTT6pgd34ObO1 zjfO48yEByVcYLn5GCAjvKFt1sAsyySJXreEYZDowPL1HHoGgNl0pvYtyfFkQlc= 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-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789647493568808929 X-GMAIL-MSGID: 1789647493568808929 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 */