From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 746B4C43215 for ; Thu, 14 Nov 2019 14:13:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 48F4120727 for ; Thu, 14 Nov 2019 14:13:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kTe0B79e" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726628AbfKNON2 (ORCPT ); Thu, 14 Nov 2019 09:13:28 -0500 Received: from mail-ua1-f68.google.com ([209.85.222.68]:43435 "EHLO mail-ua1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727343AbfKNON0 (ORCPT ); Thu, 14 Nov 2019 09:13:26 -0500 Received: by mail-ua1-f68.google.com with SMTP id k11so1889338ual.10 for ; Thu, 14 Nov 2019 06:13:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FJX4pImmW+1dIAMZK03BtkAIeMegqqUoxzHSgtg4Ca4=; b=kTe0B79e9Q3wfvE896/JqCWZWDPTHUnKJF3MXGJCz0VulZPNVJNms03VWhWhosu0r5 65u5iTmqWQfZhZU6bZ43HtCH3t9odmp08GyQa+kXxDCOH1M9z2/nD017md8ls95KA8VP ScIOnZqRoEAnVGwumKypo7R1jHWTsqOLnL6eBU/RaI2+hdZynt2GBCuBi/hTtG43ri6w rXa5aWAOZxBY1H9M1Y57rS3KQgGaa/rz8QLbkYvZ2P8SjOkhJh96iSXBPr0zCcnFlfWj USwGVkvBZ+QWGkRyEY9OPWD6vy6WDksT8kV8rKsKHSBpk+Gwww5b9A0D0ZRiHDza1Lch oI1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FJX4pImmW+1dIAMZK03BtkAIeMegqqUoxzHSgtg4Ca4=; b=aGsohnwuMQx9qfqY8QJWAWT1PtWyr/dXnH4Z8n6rWG7w2mMfZ5Ek2PzYfjRu2vq924 v8hwtCCQLXBzLwHRItUTYuxm0pU1u0D65bLTCNvyTyRzmMGOQ7z9ww0OlqJe5Xq0KXK+ Fq4o4AGWfTc8HGXqfXuxp1x0z/IMPDssK6IrztqtyYPEM7oORwcoSu/TP/RorFLUG7HW Jw8AtAnL2HywZm2UNGFd1g+ZGJX9NBZPKkH4LEfb+bx50hRoIFpcD5Y3ERvPbGBgQNpP MSP6MxmHQ4THeKUYZE+9de9jGFTPXGbaQLpLhlpa6xoaJAKRnd1X3SnW+FMkuJal/HdT Qtsg== X-Gm-Message-State: APjAAAVhHCtHYEij3ulXVEkCEa3XgRMKNav5k+aAvkmBJnzkFVCR3Tel iHV6Xdo2SUHjbdLGE4gVE51MekFCMa/9SLsszzLsiA== X-Google-Smtp-Source: APXvYqx4RK4gWYtCk+erym1uLlCEMYfvmcIf3PPkVWWUkOMrPhdQcGSzRSUDsyWVm4ZWkUAyeM62b0wXUC2Rr+arkK8= X-Received: by 2002:ab0:3399:: with SMTP id y25mr5562495uap.100.1573740804146; Thu, 14 Nov 2019 06:13:24 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ulf Hansson Date: Thu, 14 Nov 2019 15:12:48 +0100 Message-ID: Subject: Re: [PATCH v3 02/12] net: wireless: ti: wl1251 add device tree support To: "H. Nikolaus Schaller" Cc: =?UTF-8?Q?Beno=C3=AEt_Cousson?= , Tony Lindgren , Rob Herring , Mark Rutland , Russell King , Kalle Valo , Mike Rapoport , David Sterba , "Rafael J. Wysocki" , Petr Mladek , Sakari Ailus , Kefeng Wang , Yangtao Li , Alexios Zavras , Thomas Gleixner , Allison Randal , Greg Kroah-Hartman , John Stultz , Bjorn Helgaas , DTML , Discussions about the Letux Kernel , "linux-mmc@vger.kernel.org" , kernel@pyra-handheld.com, linux-wireless , Linux Kernel Mailing List , netdev , linux-omap , Linux ARM Content-Type: text/plain; charset="UTF-8" Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, 7 Nov 2019 at 11:31, H. Nikolaus Schaller wrote: > > We will have the wl1251 defined as a child node of the mmc interface > and can read setup for gpios, interrupts and the ti,use-eeprom > property from there instead of pdata to be provided by pdata-quirks. > > Fixes: 81eef6ca9201 ("mmc: omap_hsmmc: Use dma_request_chan() for requesting DMA channel") > > Signed-off-by: H. Nikolaus Schaller > Acked-by: Kalle Valo > --- > drivers/net/wireless/ti/wl1251/sdio.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c > index 677f1146ccf0..c54a273713ed 100644 > --- a/drivers/net/wireless/ti/wl1251/sdio.c > +++ b/drivers/net/wireless/ti/wl1251/sdio.c > @@ -16,6 +16,9 @@ > #include > #include > #include > +#include > +#include > +#include > > #include "wl1251.h" > > @@ -217,6 +220,7 @@ static int wl1251_sdio_probe(struct sdio_func *func, > 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(); > if (IS_ERR(hw)) > @@ -248,6 +252,15 @@ static int wl1251_sdio_probe(struct sdio_func *func, > wl->power_gpio = wl1251_board_data->power_gpio; > wl->irq = wl1251_board_data->irq; > wl->use_eeprom = wl1251_board_data->use_eeprom; > + } else 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); This isn't needed as it seems. Perhaps remove or keep it as optional? > + wl->irq = of_irq_get(np, 0); > + > + if (wl->power_gpio == -EPROBE_DEFER || wl->irq == -EPROBE_DEFER) { > + ret = -EPROBE_DEFER; > + goto disable; > + } > } > > if (gpio_is_valid(wl->power_gpio)) { > -- Kind regards Uffe