From patchwork Thu Jun 23 14:57:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9195397 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B3C8A6075F for ; Thu, 23 Jun 2016 14:57:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A56FF2843A for ; Thu, 23 Jun 2016 14:57:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A0F92845B; Thu, 23 Jun 2016 14:57:43 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DB202843A for ; Thu, 23 Jun 2016 14:57:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751138AbcFWO5k (ORCPT ); Thu, 23 Jun 2016 10:57:40 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35573 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750950AbcFWO5j (ORCPT ); Thu, 23 Jun 2016 10:57:39 -0400 Received: by mail-wm0-f68.google.com with SMTP id a66so11659159wme.2 for ; Thu, 23 Jun 2016 07:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=c4TiBh10nwJC7ymzhWhud/IrSm6z4wiokeg3A0gpQZY=; b=NVVJwap0HCXsc0OUa9jvlZSO1+UOgjPdEDAuC0hx6gyp9JjfCoXzr5zFp9BFw1NVyd QadQV2C7KRSHguR1vs1bBxhOsBuA+7iDjBPuMYxl3vJC0aeY0zMKvZTlorcbd0BOIPxY vm7/EnilNEz2HJ2aoyUBLFTn2IEgwWi7Y4Jr90MIV1/k9IAe05dM2YMo8ksnc++yaGeD NX2KIEAFlwl+ccgMbelZu2Nn1qtQrbTQyNWSiOnMPdg5ve6dwXsbNLNyNEDagQLvwwf+ qZik2sWD2PQq9OycIsxVkaQYcx28T/Sw5lzY3lBZdwNnmZ5o0dFwPcMKdvJOP1Jm0GkS 3fjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=c4TiBh10nwJC7ymzhWhud/IrSm6z4wiokeg3A0gpQZY=; b=CljTq6FceVdT7zzaWY0/24DQcewhZ2edxFUeJ+kDgcHfawQKMRedU78vkcbsKMBHxr vyQlpEnaJQoYMUDnZEFsDnzOBndjiFtvU23pfPzok9ZjKpF4Vj3AY2OQMPzw9Io8EYPc uToMjmJoCl1XIZA/Ix7yFd8LBzjMVwc1lemjc6MMooBdJ1tuUat+ZeCJ7tpyvjtQ8Ptp NhV3gGNTzc2jvDRfEKL6F4GX5vRX+O15UOETcsqhrQbYROP+QFb1uGP07GbbjmgSL2FM PZCftSvNvHRvk0FeKxqs6kYLvTlHPiscJlH0FXCijhjYWEM2UlU66jyFpimejZhnWTyB TdPw== X-Gm-Message-State: ALyK8tI2bB7Tswy65+5wgE+sTvcidy5T+aupssWQkFJjB8lzVQbb5PNlA0y+9P4oeYGm7g== X-Received: by 10.194.9.38 with SMTP id w6mr29413187wja.62.1466693857913; Thu, 23 Jun 2016 07:57:37 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD3CD1B0478F6703992958538.dip0.t-ipconnect.de. [2003:dc:d3cd:1b04:78f6:7039:9295:8538]) by smtp.googlemail.com with ESMTPSA id yr4sm535503wjc.18.2016.06.23.07.57.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jun 2016 07:57:37 -0700 (PDT) From: Martin Blumenstingl To: ath9k-devel@qca.qualcomm.com, linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org Cc: nbd@nbd.name, Martin Blumenstingl Subject: [PATCH 1/6] ath9k: Allow configuration of LED polarity in platform data. Date: Thu, 23 Jun 2016 16:57:09 +0200 Message-Id: <20160623145714.20576-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160623145714.20576-1-martin.blumenstingl@googlemail.com> References: <20160623145714.20576-1-martin.blumenstingl@googlemail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some devices running OpenWrt need this and it makes sense to add this to ath9k_platform_data as the next patches will add a devicetree (boolean) property for it as well. Suggested-by: Vittorio Gambaletta Signed-off-by: Martin Blumenstingl --- drivers/net/wireless/ath/ath9k/init.c | 3 +++ include/linux/ath9k_platform.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 2ee8624..384929d 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -527,6 +527,9 @@ static int ath9k_init_soc_platform(struct ath_softc *sc) return ret; } + if (pdata->led_active_high) + ah->config.led_active_high = true; + if (pdata->tx_gain_buffalo) ah->config.tx_gain_buffalo = true; diff --git a/include/linux/ath9k_platform.h b/include/linux/ath9k_platform.h index e66153d..76860a4 100644 --- a/include/linux/ath9k_platform.h +++ b/include/linux/ath9k_platform.h @@ -40,6 +40,7 @@ struct ath9k_platform_data { bool tx_gain_buffalo; bool disable_2ghz; bool disable_5ghz; + bool led_active_high; int (*get_mac_revision)(void); int (*external_reset)(void);