From patchwork Thu Sep 20 09:11:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10607237 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EBBAC14BD for ; Thu, 20 Sep 2018 09:28:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA8DF2CE2E for ; Thu, 20 Sep 2018 09:28:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE8012CE39; Thu, 20 Sep 2018 09:28:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6B3F22CE2E for ; Thu, 20 Sep 2018 09:28:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=NNuf/z/ltGeWewo4khlrLMtUTpqiRcYqY5zVl/ZIigk=; b=Whz 4VleXfGB5TgDTXMOoYLYsN/JWjqVCROaGPJ9BUbMeIOTPwi7QFhvvyHfDqfX5JDeax+aDj8c33X4k RX6QwD9XGb1vdKUlf6GeBhaPvx3KHUFXTk/8lID+zkoMDcyKL5zi9/IKXlziZ/L+PIwBHU3/xEmKU WfBobJ8wCnnKodkhlf/XRVdvKHZxwrD9E+OqtowlJE4Pw9+bio5hKkaS2kOrnkXnG9dVgNqdCayI1 a0FKPDJII1YRTnz14s+ZOVN+5Eqppbf6Ug6zmmBbC7PH1aYCVlA5B+QcEUoPk09J4sDaB6nL+8mmb S0AVMD0FQKGujdaqS1wRY2k3ZEM8USA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g2vG1-0000cb-BY; Thu, 20 Sep 2018 09:28:21 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g2vEH-0007yC-EL for linux-mediatek@bombadil.infradead.org; Thu, 20 Sep 2018 09:26:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=pw/3Ou2WGhELONyM0UrepawMF0jpmxR1kjMXLWuYdsE=; b=Zu3U9VrkZl5/QXjuFwAwiqcNt gXEdVhU5Eb2Z5k1BoRw2mY+WIWxdOzEy3fs0dvE9HZSSo3APgm0B+f+lHNLacN08Nao922eFz65S6 /KtTo5FFLyShaCORzqDm2J9IIHHgFAcE6uKdWg9xrMR/mH5UC7JyYeqwKWK2AmFEuoe8hUf7vM2Oc 3eSFJIv2nQsa/9otte51L4A4OycaxCAVMiebYbQZjezIsgmT2A5kjaD7Ik3L+BkzkBpGiedktNbiL Mz0+P1bu/aPA7XAgfqnUhmVl7sHTnsfHEaQcfaRQHxuaymTyW6PwERum+dQFYxeHUaK5CR09RRNMq gXBJc47YQ==; Received: from mail-wr1-f67.google.com ([209.85.221.67]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g2v0n-0000VI-8Z for linux-mediatek@lists.infradead.org; Thu, 20 Sep 2018 09:12:38 +0000 Received: by mail-wr1-f67.google.com with SMTP id a108-v6so8565721wrc.13 for ; Thu, 20 Sep 2018 02:12:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pw/3Ou2WGhELONyM0UrepawMF0jpmxR1kjMXLWuYdsE=; b=sio+11OViI9qBYl1ZLkox3OhbYIIPIlSeglwLBBR2v3bA1l9beQcrbcqVsyWj0i4jh QcX9kp7VDwKV/PP9MAlM9z81Np2Hf1TQP3HMBVCZUWUowxzRgi+8c3RwyjBBPTCngz7q n+BfkS4VovG25q5h1XzNKqLw5UOj0CkzcnOhQQm6nnaPnVX0F8La+V+FiW0QJ1KnOYOG p5Lxg+mhwVWXAsmVtY8s0JlzBoaNEjXiOr0ErVlRC9ebrwAnkPIg2HyJYIk1afTe/0Mz ENlNtX2oB/zbGlzYfat0TumRYalOTKr0gnWH/ayTnnQ1HVUn5DSrvXix4zZ368h2jmsx pDfQ== X-Gm-Message-State: APzg51BNmWIxe/30z6IRb0zjAbkBwdGC7+8qU4+bV/tmODWKY1VIlyBI 64pmRVF61aKZquMbXzaPUmBx5g== X-Google-Smtp-Source: ANB0VdamWXQonkYEbS0qEYBlTV3QTk3EAjzoscMK8ncROWQgc0hK5z9xxOYfGycdzoUXlPmC1EMLhw== X-Received: by 2002:a5d:5344:: with SMTP id t4-v6mr33325409wrv.257.1537434743728; Thu, 20 Sep 2018 02:12:23 -0700 (PDT) Received: from localhost.localdomain.com (nat-pool-mxp-t.redhat.com. [149.6.153.186]) by smtp.gmail.com with ESMTPSA id 34-v6sm35501691wra.20.2018.09.20.02.12.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Sep 2018 02:12:22 -0700 (PDT) From: Lorenzo Bianconi To: nbd@nbd.name Subject: [PATCH 00/20] unify mt76x2 and mt76x0 eeprom code Date: Thu, 20 Sep 2018 11:11:47 +0200 Message-Id: X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180920_051237_330864_2F3A1D21 X-CRM114-Status: UNSURE ( 9.44 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sgruszka@redhat.com, linux-mediatek@lists.infradead.org, linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This series unify most of eeprom parsing between mt76x2 and mt76x0 driver. That patchset will be used to properly support mt76x0e chipsets without duplicating the code. Lorenzo Bianconi (19): mt76: move seq_put_array in mt76-core module mt76: move common eeprom definitions in mt76x02-lib module mt76: move eeprom utility routines in mt76x02_eeprom.h mt76: move mt76x2_eeprom_get in mt76x02_eeprom.h mt76: move mt76x02_mac_setaddr in mt76x02-lib module mt76: move mt76x2_get_efuse_data in mt76x02-lib module mt76: move mt76x2_ext_pa_enabled routine in mt76x02_eeprom.c mt76x0: remove mt76x0_set_country_reg routine mt76: add mt76x02_get_rx_gain and mt76x02_get_lna_gain utility routines mt76x0: unify lna_gain parsing mt76x0: unify rssi_offset parsing mt76x0: unify temperature offset parsing mt76x0: unify freq offset parsing mt76: move mt76x02_eeprom_parse_hw_cap in mt76x02-lib module mt76x0: unify parse hw capabilities mt76: move mt76x2_tssi_enabled in mt76x02_eeprom.h mt76x0: remove eeprom dependency from mt76x0_set_tx_power_per_rate mt76x0: remove eeprom dependency from mt76x0_set_tx_power_per_chan mt76x0: use shared debugfs implementation Felix Fietkau (1): mt76: add stbc entries to mt76_rate_power drivers/net/wireless/mediatek/mt76/Makefile | 3 +- drivers/net/wireless/mediatek/mt76/debugfs.c | 12 + drivers/net/wireless/mediatek/mt76/mt76.h | 5 +- .../wireless/mediatek/mt76/mt76x0/debugfs.c | 92 +--- .../wireless/mediatek/mt76/mt76x0/eeprom.c | 513 +++++++----------- .../wireless/mediatek/mt76/mt76x0/eeprom.h | 119 +--- .../wireless/mediatek/mt76/mt76x0/mt76x0.h | 5 +- .../net/wireless/mediatek/mt76/mt76x0/phy.c | 68 +-- .../wireless/mediatek/mt76/mt76x02_eeprom.c | 156 ++++++ .../wireless/mediatek/mt76/mt76x02_eeprom.h | 194 +++++++ .../net/wireless/mediatek/mt76/mt76x02_mac.c | 18 + .../net/wireless/mediatek/mt76/mt76x02_mac.h | 1 + .../wireless/mediatek/mt76/mt76x2_debugfs.c | 33 +- .../wireless/mediatek/mt76/mt76x2_eeprom.c | 239 +++----- .../wireless/mediatek/mt76/mt76x2_eeprom.h | 122 +---- .../net/wireless/mediatek/mt76/mt76x2_init.c | 6 +- .../net/wireless/mediatek/mt76/mt76x2_mcu.c | 2 +- .../mediatek/mt76/mt76x2_mcu_common.c | 5 +- .../net/wireless/mediatek/mt76/mt76x2_phy.c | 8 +- .../mediatek/mt76/mt76x2_phy_common.c | 16 +- drivers/net/wireless/mediatek/mt76/mt76x2u.h | 1 - .../net/wireless/mediatek/mt76/mt76x2u_init.c | 5 +- .../net/wireless/mediatek/mt76/mt76x2u_mac.c | 24 +- .../net/wireless/mediatek/mt76/mt76x2u_main.c | 2 +- .../net/wireless/mediatek/mt76/mt76x2u_phy.c | 6 +- 25 files changed, 740 insertions(+), 915 deletions(-) create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.h