Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2519062ybi; Sun, 9 Jun 2019 13:54:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCK+vcbAqaw2ldTSyE4ziVCi20XxCPMqfFDf+sYf4G6SlCigyxlbiYQKDek09jSdW/9wMx X-Received: by 2002:a63:49:: with SMTP id 70mr13074792pga.163.1560113676006; Sun, 09 Jun 2019 13:54:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560113675; cv=none; d=google.com; s=arc-20160816; b=aH2LQb1XpQqvID0uEp02BOoWiIbv3YAM9YW3rgFHu62CANyCOEP6+eKB1sjAQbMy6f 47+sFngNpg3D3KbRTxwvypDFAmgtz1Ft2bjAB+umSwl133iW6SG07B+lqPctpHxZRqYk No+lCKaObOEZzDxv3Ymb3CgXeaLT5iGexFKhTmtKnWAwmFiLnn+1P4IH498hd5jQVRgu j1yGwzkcTh4fsfDk6TcphGxqsgtBNN69GcSXOgfvwRo8KLsFOpeZDZdfWbA+4uzwvR7K xzz5NSRgKGRRoH278x/pFif9OAKAv3T+mDjOgQ2hh5WelXqbuTnhvw20DLby0pRKWtXC IMzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=FStuUFDr6pWfqwcxZHJSy3S6K3fzmCuAmblscqliAdo=; b=ZoRADGncQNATmxniUCS+3jMqKIDF/nNHWaDdKBoCKGRbUM+ssS+VJGnNt/1GL2+/OK mTGPY3PoeppXBQpyvY+lobU/igEjJ1YJbRUHoAO4lqMrphPbnVMWNK0Tz8Ciz+uXvKho v3A0BmA1z58SX9mH6hH8gzEk7+xgLG7xzyQmf18U8HT7mjauzYAA0HobAcuafYbpNgBZ mHfLhuSM6pz59+XCQ4y/ztXDqAXCzNwWN+FyoQLNZlMiiN4PBXj64XQehVQGRv5Mly+8 uiDrFXGUQpEQFxdyy/u/Sn8vVtAVCtYOkGd7w6XKJsKl4ow8TSbcA9dLgJLy1mW5m7Nq Cw3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=HBaLoNxa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z18si7393289pgv.229.2019.06.09.13.54.20; Sun, 09 Jun 2019 13:54:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=HBaLoNxa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730312AbfFIUwv (ORCPT + 99 others); Sun, 9 Jun 2019 16:52:51 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:39618 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727697AbfFIUwv (ORCPT ); Sun, 9 Jun 2019 16:52:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=FStuUFDr6pWfqwcxZHJSy3S6K3fzmCuAmblscqliAdo=; b=HBaLoNxau4W5qno+6Ps9FZdaI/ kp/EFWHoALihy96YCGNsxEB1HM9XOHb9CIYHRp0atmBCqR/OFMwU1ONTiTfAcm7Hcm0QbrpZ3CIFl 2oMJYOqmpdZj8Lyks4npNdO1qktnf+yrBT4CX5kiV7MyLaYE9ztWnVc5eEjShKUmemIg=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1ha4o1-0002Xb-EW; Sun, 09 Jun 2019 22:52:45 +0200 Date: Sun, 9 Jun 2019 22:52:45 +0200 From: Andrew Lunn To: Martin Blumenstingl Cc: netdev@vger.kernel.org, linux-gpio@vger.kernel.org, linux-amlogic@lists.infradead.org, linus.walleij@linaro.org, bgolaszewski@baylibre.com, peppe.cavallaro@st.com, alexandre.torgue@st.com, joabreu@synopsys.com, devicetree@vger.kernel.org, narmstrong@baylibre.com, khilman@baylibre.com, linux-kernel@vger.kernel.org, davem@davemloft.net, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC next v1 3/5] net: stmmac: use GPIO descriptors in stmmac_mdio_reset Message-ID: <20190609205245.GC8247@lunn.ch> References: <20190609180621.7607-1-martin.blumenstingl@googlemail.com> <20190609180621.7607-4-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190609180621.7607-4-martin.blumenstingl@googlemail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + struct gpio_desc *reset_gpio; > + > if (data->reset_gpio < 0) { > struct device_node *np = priv->device->of_node; > > - data->reset_gpio = of_get_named_gpio(np, > - "snps,reset-gpio", 0); > - if (data->reset_gpio < 0) > - return 0; > + reset_gpio = devm_gpiod_get_optional(priv->device, > + "snps,reset", > + GPIOD_OUT_LOW); > + if (IS_ERR(reset_gpio)) > + return PTR_ERR(reset_gpio); > > - data->active_low = of_property_read_bool(np, > - "snps,reset-active-low"); Hi Martin I think you need to keep this here. You can then use it to decide how to change gpio_desc to remove flags that should be ignored. Andrew