From patchwork Wed Nov 9 22:42:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 17860 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp601692wru; Wed, 9 Nov 2022 14:49:50 -0800 (PST) X-Google-Smtp-Source: AMsMyM6Nf+IoDmpEqWhfehX1+wwGUQV5Y0SYc1nZiMeU07AKksChNlvXxR+uBdM/PqSdPEWl9O5W X-Received: by 2002:a17:906:34c8:b0:79e:4880:dd83 with SMTP id h8-20020a17090634c800b0079e4880dd83mr1879607ejb.166.1668034190591; Wed, 09 Nov 2022 14:49:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668034190; cv=none; d=google.com; s=arc-20160816; b=hlPJ/REBEZBq2vYmFAbXXxnAOFAn7mKbImGEBYnJmF91DGpms8zJIyEX2VhDboHAgt /fqw5YEn7j8l4A1u4c/xee8VX3fQyDnyK9PN6d9F7NdELweVcsbuH/sSBT1li8/zZc/E 20LCo/RP76ihpR/G6NmPyUGfb8uv0pJOF6CMBa4aP0NRSrNwbpwt3WNsTNqF7vHJL/wv xgknMps1rhfUgZ4Ao3aOcvqIcrU0x3IpMVDwj1YlEuozOOD7bN94jD6Xu/fZ5JQqLxmM lGJgAi6TarYRVPZbHahdmRijbosBdpPTZ6gy6ZIlDAFweYOZJDiCW7690pcCeew/LPor 1ygA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=1ssYymsxkXdmTSFU0hvcEkwkIoh7xAypCTM5P5Govko=; b=Xmp6tbZRsMkfjn2+egBqzgBi4Rj0KAGwjQnp9FcevkySx8ecmWdB6KO0vKTfL5clpC sC6FVIf3ngiEXADOnpxgbF3eF++ZFj/3bdjFf8ozykO9UwObN+z/LtgHVQZV07WGVwe1 /vpQTckmcXVDU3XLvoGVlazh3zC2dsG7ClZwq4+C6Y26v0Xu79GHs7osQtRBUT5Oy3zw avdDhFsnIwbcaVUOpnaRu5anmaXolqoAzbB/+FocxOokjQUV41q/SfEQAL/P3qL5uldx CInQ0AfwisGKgDYKn1OTfL8Wj7cECwsuLXbLY7e6eplEJ5/0dqlRDPqMqE8VKOPbl6/5 Acww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Gnns+h8o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hs29-20020a1709073e9d00b0078d38cda44bsi18100882ejc.694.2022.11.09.14.49.26; Wed, 09 Nov 2022 14:49:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Gnns+h8o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232193AbiKIWnA (ORCPT + 99 others); Wed, 9 Nov 2022 17:43:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229516AbiKIWm6 (ORCPT ); Wed, 9 Nov 2022 17:42:58 -0500 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6827D13D; Wed, 9 Nov 2022 14:42:55 -0800 (PST) Received: by mail-pl1-x636.google.com with SMTP id d20so30560plr.10; Wed, 09 Nov 2022 14:42:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1ssYymsxkXdmTSFU0hvcEkwkIoh7xAypCTM5P5Govko=; b=Gnns+h8o5AhIOXBqLaKWICAXOgSZMznymYnrEBDzfZviX7IPTd82rZRJap6bkYZ65Q nf7zqCUUYfKYgb8vUHJ1SE4HYKUtGTYttvHkM4Uv4Tc+WQN3hJWTE4UyzQ8hCR7jFPvN AYWmjq1oQWfKCK4dhHu0xypt5weHNbO6m0O8yz8BkAxv6Yzt2+8winicehFZLNYw05En oIFA/LFH4a2keePJIVF0oOOYZYYGLcwFXHeMLozOxOmhy+ozzosYisx24NouFVVXb+Ro yorzilL0AouMTZlrbzQToS56O+cH9/dQv8mbv23td9kWJqNkw8u7EQ3WTeqyeJgENyn4 1Qew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1ssYymsxkXdmTSFU0hvcEkwkIoh7xAypCTM5P5Govko=; b=R5O2ZI5XQkCR9SR375uzpPwcV5AXTvRMtzmePzEzxrUGY8lkyI6czVqDT8pLSzTHVh tMUHl3hNgOE85bMKraT+gTn/+z6c4ZFsvmkVY2FhD6GcFeKBrGC9Obp4xRtllH+4AyZY qUTQmq9jb8OSdc3qVogY1UBMnRNoOVI2Y0tH/Ro/9wayS1V7D2lBsRu+Wg8k7uHPf0QN q05O4gSgs1ZBY82h3wOZII/M6QpDywheKhDhpMB8h4OxgLXmPUs1XeQUy15nhG4+YzFH VZEUXh7S5bT6xprYdWKyb6UDkToC0KWfIWIZSPtcueZTQ5xOkz6tb9oIStuaBKNY9VxP PILw== X-Gm-Message-State: ACrzQf0o9mdBjYGE0IBsFaYwbIBQAX9Eq3+Sg9nLW0VIcqXy63WIGwW4 Lvx++1fCM2uOa0qLmbpS5fA= X-Received: by 2002:a17:902:cf42:b0:182:bccf:619f with SMTP id e2-20020a170902cf4200b00182bccf619fmr1272698plg.9.1668033775073; Wed, 09 Nov 2022 14:42:55 -0800 (PST) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:9d:2:6af4:9e55:5482:c0de]) by smtp.gmail.com with ESMTPSA id k17-20020a63ff11000000b0046f9f4a2de6sm7995042pgi.74.2022.11.09.14.42.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 14:42:54 -0800 (PST) From: Dmitry Torokhov To: Kalle Valo , Tony Lindgren Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH v2 1/3] ARM: OMAP2+: pdata-quirks: stop including wl12xx.h Date: Wed, 9 Nov 2022 14:42:48 -0800 Message-Id: <20221109224250.2885119-1-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749060619175357071?= X-GMAIL-MSGID: =?utf-8?q?1749060619175357071?= As of commit 2398c41d6432 ("omap: pdata-quirks: remove openpandora quirks for mmc3 and wl1251") the code no longer creates an instance of wl1251_platform_data, so there is no need for including this header. Signed-off-by: Dmitry Torokhov Acked-by: Tony Lindgren --- Changes in v2: added fix to arch/arm/mach-omap2/pdata-quirks.c Note this series was only compile-tested. arch/arm/mach-omap2/pdata-quirks.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 9deba798cc91..baba73fd6f11 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include From patchwork Wed Nov 9 22:42:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 17862 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp602169wru; Wed, 9 Nov 2022 14:51:04 -0800 (PST) X-Google-Smtp-Source: AMsMyM78FKn3qsraqRa8srJXa5sRTibGtfHFQfjNmz6asgXEkGODHwn+dj9YjCvKXgzlXda99jeL X-Received: by 2002:a17:907:1dc7:b0:7ad:83d5:6abd with SMTP id og7-20020a1709071dc700b007ad83d56abdmr56214914ejc.412.1668034264422; Wed, 09 Nov 2022 14:51:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668034264; cv=none; d=google.com; s=arc-20160816; b=09uS2sFRb+vZnINCkHXnzhaW0M+REF8qxdChtmhjJMD6jIoBYX0RGdGv0htWBgtVFD P4iT8Jb8MrjWW4tGoG63ULpFSXpS6x9Trh271xW+iwN651fePfvACeaC1FxGq75184TC FgsS4xWQ72vyEO3MsXyFnVtuigYbKqdivrRVMxg+h2rZH3BHtrM1gfRsjw0uFg/TUDjj iU4RNlDtTe8X5hyDPB35gCgnEFHhn/wiyNEbrJ9Ze93BUAVAqa0tMEUxo8UgCPZB4MNt UoYvS/lcJVo1Z5odZMd0M5oPUZUxe6dB6jAbcOuKTWaVE29C28SAxXEoMvooYjnXx0w5 AVeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vb0Gs488yvsxkSMkYVmJzJWdckJ7k6xbmeU+rrY4bs0=; b=CQ0LLN/G5vWUsmA5bBodvQj2jczU01WkIhj1MTdQpKDFILCIctSgt/BKUYCbOVgLjv 50+UXUZpCohaCGrVzO+Cwq9cdMm/jjrbjyt3UUZBC8SLzV/CUzGEBbYET0ry2uqZME7K 2Y6DhnnjT6111u3VzIraq4pODcMvDrBGsQ7iwfQtstNARQ8BE+jftJTta5sm1eDqx4oc zEoDF31I8j+PiNqu2r5vA+Alztft79+3qZrly76FbFQRKEquWVM1yUkmhwDRP3tT9C0y crYF6WmoTbzVE52gFJD1sNF+s1mWlnUurAZeQM3lbve6VFiCALBMpr+S3D6rSoAtvjt3 WxYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=o814sDfr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq11-20020a1709073f0b00b007ae4ed48293si88352ejc.281.2022.11.09.14.50.41; Wed, 09 Nov 2022 14:51:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=o814sDfr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231837AbiKIWnC (ORCPT + 99 others); Wed, 9 Nov 2022 17:43:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230109AbiKIWm7 (ORCPT ); Wed, 9 Nov 2022 17:42:59 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 679D91B9CC; Wed, 9 Nov 2022 14:42:57 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id k7so45350pll.6; Wed, 09 Nov 2022 14:42:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vb0Gs488yvsxkSMkYVmJzJWdckJ7k6xbmeU+rrY4bs0=; b=o814sDfrZd0iixpQ/zwFRvuqLuGxqhGS8tNbUNhT14+GIvjsr7fRW8qHjomICh/BKx oNUSXtVpudNvDeZFPQgBmzpDk/Z9fLtidJjqOkciv7yt4oqQds9NVc0PQtJovrIO+pJD M12bmMaCXsPgWQqZcjrI30P3LpjOJiu8e8RWV4o6DDTl5CFKITDZFiQGgkoK3yv1bm6n tH6/ONZ+nzgIItL0mr0ajpL4XTHdu68AzB57PJcKsefcA+I8WXk8JG7Tojdmk2X3NdKV TERT7I6Q7YguaXAH6aXDVpuZyufhLp5DPvR1uz1c9WQXmUW4dAL9MOn7Z7xrHGG+1g4T glEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vb0Gs488yvsxkSMkYVmJzJWdckJ7k6xbmeU+rrY4bs0=; b=Yh+QhYHYTwoOrFfHGkeaXYf3sYLNvPMQ+fXpuAVYMbtcfxMmtLDBnoRI1z+rGDfOx9 102xvoA7fY9/64eiY+rJCAFfVuTf/Ah9HmbZh1X5TatG7NxZQAaGMLR31W8CdAeigCMV fPj/YStpy98viGLVW9XGsFIEJeyctLTOSueJ02GW0JDeGAyPswft0NCU53htHyXXwXx0 uSQS6T8QUKoj1Z4DWVj/I6V9IL7BtU5nXALKxIlU1sl0x1WAPOUBBJL304kwy/xV3r2Y BW6wG7NLp/4niTcLyNLcVF97yN1Eul//XBGhFgmXOKdDGm8GsDNkq96gBWRrc874secz T3OQ== X-Gm-Message-State: ACrzQf2ngm4Ui7IR9q9P+FNAMqAQG/ZBQM35EhA0LSKLnlpApK0l34M2 HrXrvaFH91wReGG+NXwa4co= X-Received: by 2002:a17:902:d38d:b0:186:9fc5:6c13 with SMTP id e13-20020a170902d38d00b001869fc56c13mr62900281pld.73.1668033776751; Wed, 09 Nov 2022 14:42:56 -0800 (PST) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:9d:2:6af4:9e55:5482:c0de]) by smtp.gmail.com with ESMTPSA id k17-20020a63ff11000000b0046f9f4a2de6sm7995042pgi.74.2022.11.09.14.42.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 14:42:56 -0800 (PST) From: Dmitry Torokhov To: Kalle Valo , Tony Lindgren Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH v2 2/3] wifi: wl1251: drop support for platform data Date: Wed, 9 Nov 2022 14:42:49 -0800 Message-Id: <20221109224250.2885119-2-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog In-Reply-To: <20221109224250.2885119-1-dmitry.torokhov@gmail.com> References: <20221109224250.2885119-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749060696876704161?= X-GMAIL-MSGID: =?utf-8?q?1749060696876704161?= Remove support for configuring the device via platform data because there are no users of wl1251_platform_data left in the mainline kernel. Signed-off-by: Dmitry Torokhov --- MAINTAINERS | 1 - drivers/net/wireless/ti/Kconfig | 8 ---- .../net/wireless/ti/wilink_platform_data.c | 35 --------------- drivers/net/wireless/ti/wl1251/sdio.c | 8 +--- drivers/net/wireless/ti/wl1251/spi.c | 15 ++----- drivers/net/wireless/ti/wlcore/spi.c | 1 - include/linux/wl12xx.h | 44 ------------------- 7 files changed, 4 insertions(+), 108 deletions(-) delete mode 100644 drivers/net/wireless/ti/wilink_platform_data.c delete mode 100644 include/linux/wl12xx.h diff --git a/MAINTAINERS b/MAINTAINERS index 03ae061c5f6f..e51716599335 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -20724,7 +20724,6 @@ W: https://wireless.wiki.kernel.org/en/users/Drivers/wl12xx W: https://wireless.wiki.kernel.org/en/users/Drivers/wl1251 T: git git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx.git F: drivers/net/wireless/ti/ -F: include/linux/wl12xx.h TIMEKEEPING, CLOCKSOURCE CORE, NTP, ALARMTIMER M: John Stultz diff --git a/drivers/net/wireless/ti/Kconfig b/drivers/net/wireless/ti/Kconfig index 7c0b17a76fe2..3fcd9e395f72 100644 --- a/drivers/net/wireless/ti/Kconfig +++ b/drivers/net/wireless/ti/Kconfig @@ -18,12 +18,4 @@ source "drivers/net/wireless/ti/wl18xx/Kconfig" # keep last for automatic dependencies source "drivers/net/wireless/ti/wlcore/Kconfig" -config WILINK_PLATFORM_DATA - bool "TI WiLink platform data" - depends on WLCORE_SDIO || WL1251_SDIO - default y - help - Small platform data bit needed to pass data to the sdio modules. - - endif # WLAN_VENDOR_TI diff --git a/drivers/net/wireless/ti/wilink_platform_data.c b/drivers/net/wireless/ti/wilink_platform_data.c deleted file mode 100644 index 1de6a62d526f..000000000000 --- a/drivers/net/wireless/ti/wilink_platform_data.c +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * This file is part of wl12xx - * - * Copyright (C) 2010-2011 Texas Instruments, Inc. - */ - -#include -#include -#include - -static struct wl1251_platform_data *wl1251_platform_data; - -int __init wl1251_set_platform_data(const struct wl1251_platform_data *data) -{ - if (wl1251_platform_data) - return -EBUSY; - if (!data) - return -EINVAL; - - wl1251_platform_data = kmemdup(data, sizeof(*data), GFP_KERNEL); - if (!wl1251_platform_data) - return -ENOMEM; - - return 0; -} - -struct wl1251_platform_data *wl1251_get_platform_data(void) -{ - if (!wl1251_platform_data) - return ERR_PTR(-ENODEV); - - return wl1251_platform_data; -} -EXPORT_SYMBOL(wl1251_get_platform_data); diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c index c9a4e9a43400..301bd0043a43 100644 --- a/drivers/net/wireless/ti/wl1251/sdio.c +++ b/drivers/net/wireless/ti/wl1251/sdio.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -197,7 +196,6 @@ static int wl1251_sdio_probe(struct sdio_func *func, struct wl1251 *wl; struct ieee80211_hw *hw; struct wl1251_sdio *wl_sdio; - const struct wl1251_platform_data *wl1251_board_data; struct device_node *np = func->dev.of_node; hw = wl1251_alloc_hw(); @@ -225,11 +223,7 @@ static int wl1251_sdio_probe(struct sdio_func *func, wl->if_priv = wl_sdio; wl->if_ops = &wl1251_sdio_ops; - wl1251_board_data = wl1251_get_platform_data(); - if (!IS_ERR(wl1251_board_data)) { - wl->irq = wl1251_board_data->irq; - wl->use_eeprom = wl1251_board_data->use_eeprom; - } else if (np) { + if (np) { wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom"); wl->irq = of_irq_get(np, 0); if (wl->irq == -EPROBE_DEFER) { diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c index 9df38726e8b0..08d9814b49c1 100644 --- a/drivers/net/wireless/ti/wl1251/spi.c +++ b/drivers/net/wireless/ti/wl1251/spi.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -226,16 +225,13 @@ static const struct wl1251_if_operations wl1251_spi_ops = { static int wl1251_spi_probe(struct spi_device *spi) { - struct wl1251_platform_data *pdata = dev_get_platdata(&spi->dev); struct device_node *np = spi->dev.of_node; struct ieee80211_hw *hw; struct wl1251 *wl; int ret; - if (!np && !pdata) { - wl1251_error("no platform data"); + if (!np) return -ENODEV; - } hw = wl1251_alloc_hw(); if (IS_ERR(hw)) @@ -259,14 +255,9 @@ static int wl1251_spi_probe(struct spi_device *spi) goto out_free; } - if (np) { - wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom"); - wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0); - } else if (pdata) { - wl->power_gpio = pdata->power_gpio; - wl->use_eeprom = pdata->use_eeprom; - } + wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom"); + wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0); if (wl->power_gpio == -EPROBE_DEFER) { ret = -EPROBE_DEFER; goto out_free; diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c index 7eae1ec2eb2b..2d2edddc77bd 100644 --- a/drivers/net/wireless/ti/wlcore/spi.c +++ b/drivers/net/wireless/ti/wlcore/spi.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h deleted file mode 100644 index 03d61f1d23ab..000000000000 --- a/include/linux/wl12xx.h +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * This file is part of wl12xx - * - * Copyright (C) 2009 Nokia Corporation - * - * Contact: Luciano Coelho - */ - -#ifndef _LINUX_WL12XX_H -#define _LINUX_WL12XX_H - -#include - -struct wl1251_platform_data { - int power_gpio; - /* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */ - int irq; - bool use_eeprom; -}; - -#ifdef CONFIG_WILINK_PLATFORM_DATA - -int wl1251_set_platform_data(const struct wl1251_platform_data *data); - -struct wl1251_platform_data *wl1251_get_platform_data(void); - -#else - -static inline -int wl1251_set_platform_data(const struct wl1251_platform_data *data) -{ - return -ENOSYS; -} - -static inline -struct wl1251_platform_data *wl1251_get_platform_data(void) -{ - return ERR_PTR(-ENODATA); -} - -#endif - -#endif From patchwork Wed Nov 9 22:42:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 17863 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp602932wru; Wed, 9 Nov 2022 14:53:19 -0800 (PST) X-Google-Smtp-Source: AMsMyM7DhdoqPaBWe/hIN1JybnY3qDYfzKzGciRtySKPVvQL0KHAl9NQRphrUmQA9uJ46HyS67zw X-Received: by 2002:a17:906:7945:b0:73b:e605:f31 with SMTP id l5-20020a170906794500b0073be6050f31mr59245445ejo.129.1668034399491; Wed, 09 Nov 2022 14:53:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668034399; cv=none; d=google.com; s=arc-20160816; b=0iz9q6Ohrvd6tqisPoRJDNSKpXq4436Sfs5PEbZei9WrS8VnKKoEFN4pZNO/9X4AVf ULtVYEV2k4FSQCUsenTBJKcFjRBDeIJYkBn491eC5c0Vi9r4gEHPEgFN0/mR8G7L0u58 y1fyyLvUJARY7Qa1pUMmv+vy01qsOwf/AOdQ/grPUPPWtjcWQIEVTyi3THgfrwTS59pM zGkf8TIVBFh/iaoT0AagBytD3d//iKOgaYqUGGX0EzzImk9gRb5k+2ncC8Vv+dktBRNY OzJSWhN9ooWkMsBNTS8cxoZZ1DgCftxCZ4U3HbqAvrtb9MVeZTL7C8Sko+LRaewfFHGp mIbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=L0G2DVVUMf7cHKHLQzDr07aNL++y343oa2P66Ro/wtY=; b=GPE1bpF/KRM+fYJXHMVjcfiC0oqKT1gSbW1LSPZ7FTgEZTd9aSqnbUhue/nteftKWL cIPvLWaGD5a8BFewACHJi6aiVmXkBGTsKlm3jVsUDcEWZfYz3HpShMs+8LaC8nD/1Qco gAyJWE5GfaNV1elH75JID7TSUrTj74HRlZ0A6eLXBcMUeBVlMLZ1iaEsCNj837Z6cvp/ UTGlRmkxgd+YT/sLnklUe29EYpNw/hc28tV7c0wOUp/K4+k49CcVC4CT29D1kJvqDk7F lq4rrWNLRbMWzuGxA0Qv7sTX3HLkZmVs1MfWSEAY4BiTFc3xsjF2KzUIeb41oOrZPUfp P0fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Yg7m1C87; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hs29-20020a1709073e9d00b0078d38cda44bsi18100882ejc.694.2022.11.09.14.52.49; Wed, 09 Nov 2022 14:53:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Yg7m1C87; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232209AbiKIWnG (ORCPT + 99 others); Wed, 9 Nov 2022 17:43:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232180AbiKIWnA (ORCPT ); Wed, 9 Nov 2022 17:43:00 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 332E51D652; Wed, 9 Nov 2022 14:42:59 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id k7so45404pll.6; Wed, 09 Nov 2022 14:42:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=L0G2DVVUMf7cHKHLQzDr07aNL++y343oa2P66Ro/wtY=; b=Yg7m1C87ehGWJ0w9aL96YvWkzYmmCr+af4ui+VJ5BMmxIV2ip9zdJ7eHn6Hxamxhl7 Y9YSTagO8x/N4V2I6ds6OyC94yanCRqY7fO75z4KTnmzHMpzRKip1zXjjAdrIisA1o0D Ah70biHSSNT6Z5VIHPDYFxnAKjoVlYPkZJLN148s+Hk1lx4J71Hc13q6d+/bQ0Vj5Br+ U2/5FsW7jxyXdkDHvolMddQZiq6502jUHvY1Q45TJC1zvQnx3mICJmC3JUgyV3eam+kY B/y48BY6yHPcDWzM3nPIxEUWlM+ACoslnTDnXXbzmjcgCOM0delXajF/RWMTZiZIVgpb OsMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L0G2DVVUMf7cHKHLQzDr07aNL++y343oa2P66Ro/wtY=; b=oCFh/8/2l5HtuaERJOjUiEt1tDzalRJeUpUbY4ndYPaYV0RK/sVZXLJTxFB95D0f0C qJJQXSbXKfuxDUMsqXb0CEfNAQ5TYt0BDcUIXBP4+VZsnakXS88zon/FRFWVH3iNEhvf DU5QhZ8NJg8joMJWo/rhpCQSJIKx9qHUJ+Kld2qJH3h/Rz5V+cxiv67VFsfebfRDziUo h/Qa/Q9BnIt+MKVNsKt5EgHDeD6622/L32cw/TtV1tsaO+mNr32iTVEB9xJNCffdi/OE 2lALmN4kldWxqVwr/mAy2muA6nmv7kJ7L4rzh3S+lYJD8kDQx61W5mk0vmf7dOJa84JP TMtg== X-Gm-Message-State: ACrzQf2Kq10Jpsb2pHn4hDVkS+6/Tqv63DQYXxodDOsntqsZGvUpkF9t AYwBynRNJjRhvCSF6xKAWLA= X-Received: by 2002:a17:90a:74cb:b0:213:9b4c:ecc2 with SMTP id p11-20020a17090a74cb00b002139b4cecc2mr65576018pjl.154.1668033778453; Wed, 09 Nov 2022 14:42:58 -0800 (PST) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:9d:2:6af4:9e55:5482:c0de]) by smtp.gmail.com with ESMTPSA id k17-20020a63ff11000000b0046f9f4a2de6sm7995042pgi.74.2022.11.09.14.42.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 14:42:57 -0800 (PST) From: Dmitry Torokhov To: Kalle Valo , Tony Lindgren Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH v2 3/3] wifi: wl1251: switch to using gpiod API Date: Wed, 9 Nov 2022 14:42:50 -0800 Message-Id: <20221109224250.2885119-3-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog In-Reply-To: <20221109224250.2885119-1-dmitry.torokhov@gmail.com> References: <20221109224250.2885119-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749060838531128143?= X-GMAIL-MSGID: =?utf-8?q?1749060838531128143?= Switch the driver from legacy gpio API to the newer gpiod API. Signed-off-by: Dmitry Torokhov --- drivers/net/wireless/ti/wl1251/spi.c | 63 +++++++++++++------------ drivers/net/wireless/ti/wl1251/wl1251.h | 1 - 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c index 08d9814b49c1..29292f06bd3d 100644 --- a/drivers/net/wireless/ti/wl1251/spi.c +++ b/drivers/net/wireless/ti/wl1251/spi.c @@ -5,6 +5,7 @@ * Copyright (C) 2008 Nokia Corporation */ +#include #include #include #include @@ -12,15 +13,19 @@ #include #include #include -#include +#include #include -#include #include #include "wl1251.h" #include "reg.h" #include "spi.h" +struct wl1251_spi { + struct spi_device *spi; + struct gpio_desc *power_gpio; +}; + static irqreturn_t wl1251_irq(int irq, void *cookie) { struct wl1251 *wl; @@ -34,13 +39,9 @@ static irqreturn_t wl1251_irq(int irq, void *cookie) return IRQ_HANDLED; } -static struct spi_device *wl_to_spi(struct wl1251 *wl) -{ - return wl->if_priv; -} - static void wl1251_spi_reset(struct wl1251 *wl) { + struct wl1251_spi *wl_spi = wl->if_priv; u8 *cmd; struct spi_transfer t; struct spi_message m; @@ -60,7 +61,7 @@ static void wl1251_spi_reset(struct wl1251 *wl) t.len = WSPI_INIT_CMD_LEN; spi_message_add_tail(&t, &m); - spi_sync(wl_to_spi(wl), &m); + spi_sync(wl_spi->spi, &m); wl1251_dump(DEBUG_SPI, "spi reset -> ", cmd, WSPI_INIT_CMD_LEN); @@ -69,6 +70,7 @@ static void wl1251_spi_reset(struct wl1251 *wl) static void wl1251_spi_wake(struct wl1251 *wl) { + struct wl1251_spi *wl_spi = wl->if_priv; struct spi_transfer t; struct spi_message m; u8 *cmd = kzalloc(WSPI_INIT_CMD_LEN, GFP_KERNEL); @@ -112,7 +114,7 @@ static void wl1251_spi_wake(struct wl1251 *wl) t.len = WSPI_INIT_CMD_LEN; spi_message_add_tail(&t, &m); - spi_sync(wl_to_spi(wl), &m); + spi_sync(wl_spi->spi, &m); wl1251_dump(DEBUG_SPI, "spi init -> ", cmd, WSPI_INIT_CMD_LEN); @@ -128,6 +130,7 @@ static void wl1251_spi_reset_wake(struct wl1251 *wl) static void wl1251_spi_read(struct wl1251 *wl, int addr, void *buf, size_t len) { + struct wl1251_spi *wl_spi = wl->if_priv; struct spi_transfer t[3]; struct spi_message m; u8 *busy_buf; @@ -157,7 +160,7 @@ static void wl1251_spi_read(struct wl1251 *wl, int addr, void *buf, t[2].len = len; spi_message_add_tail(&t[2], &m); - spi_sync(wl_to_spi(wl), &m); + spi_sync(wl_spi->spi, &m); /* FIXME: check busy words */ @@ -168,6 +171,7 @@ static void wl1251_spi_read(struct wl1251 *wl, int addr, void *buf, static void wl1251_spi_write(struct wl1251 *wl, int addr, void *buf, size_t len) { + struct wl1251_spi *wl_spi = wl->if_priv; struct spi_transfer t[2]; struct spi_message m; u32 *cmd; @@ -190,7 +194,7 @@ static void wl1251_spi_write(struct wl1251 *wl, int addr, void *buf, t[1].len = len; spi_message_add_tail(&t[1], &m); - spi_sync(wl_to_spi(wl), &m); + spi_sync(wl_spi->spi, &m); wl1251_dump(DEBUG_SPI, "spi_write cmd -> ", cmd, sizeof(*cmd)); wl1251_dump(DEBUG_SPI, "spi_write buf -> ", buf, len); @@ -208,8 +212,10 @@ static void wl1251_spi_disable_irq(struct wl1251 *wl) static int wl1251_spi_set_power(struct wl1251 *wl, bool enable) { - if (gpio_is_valid(wl->power_gpio)) - gpio_set_value(wl->power_gpio, enable); + struct wl1251_spi *wl_spi = wl->if_priv; + + if (wl_spi->power_gpio) + gpiod_set_value_cansleep(wl_spi->power_gpio, enable); return 0; } @@ -227,12 +233,19 @@ static int wl1251_spi_probe(struct spi_device *spi) { struct device_node *np = spi->dev.of_node; struct ieee80211_hw *hw; + struct wl1251_spi *wl_spi; struct wl1251 *wl; int ret; if (!np) return -ENODEV; + wl_spi = devm_kzalloc(&spi->dev, sizeof(*wl_spi), GFP_KERNEL); + if (!wl_spi) + return -ENOMEM; + + wl_spi->spi = spi; + hw = wl1251_alloc_hw(); if (IS_ERR(hw)) return PTR_ERR(hw); @@ -241,7 +254,7 @@ static int wl1251_spi_probe(struct spi_device *spi) SET_IEEE80211_DEV(hw, &spi->dev); spi_set_drvdata(spi, wl); - wl->if_priv = spi; + wl->if_priv = wl_spi; wl->if_ops = &wl1251_spi_ops; /* This is the only SPI value that we need to set here, the rest @@ -257,25 +270,17 @@ static int wl1251_spi_probe(struct spi_device *spi) wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom"); - wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0); - if (wl->power_gpio == -EPROBE_DEFER) { - ret = -EPROBE_DEFER; - goto out_free; - } - - if (gpio_is_valid(wl->power_gpio)) { - ret = devm_gpio_request_one(&spi->dev, wl->power_gpio, - GPIOF_OUT_INIT_LOW, "wl1251 power"); - if (ret) { + wl_spi->power_gpio = devm_gpiod_get_optional(&spi->dev, "ti,power", + GPIOD_OUT_LOW); + ret = PTR_ERR_OR_ZERO(wl_spi->power_gpio); + if (ret) { + if (ret != -EPROBE_DEFER) wl1251_error("Failed to request gpio: %d\n", ret); - goto out_free; - } - } else { - wl1251_error("set power gpio missing in platform data"); - ret = -ENODEV; goto out_free; } + gpiod_set_consumer_name(wl_spi->power_gpio, "wl1251 power"); + wl->irq = spi->irq; if (wl->irq < 0) { wl1251_error("irq missing in platform data"); diff --git a/drivers/net/wireless/ti/wl1251/wl1251.h b/drivers/net/wireless/ti/wl1251/wl1251.h index 23ae07dd4c2e..83adbc3c25dc 100644 --- a/drivers/net/wireless/ti/wl1251/wl1251.h +++ b/drivers/net/wireless/ti/wl1251/wl1251.h @@ -262,7 +262,6 @@ struct wl1251 { void *if_priv; const struct wl1251_if_operations *if_ops; - int power_gpio; int irq; bool use_eeprom;