Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759269AbcDHXBO (ORCPT ); Fri, 8 Apr 2016 19:01:14 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:45738 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759234AbcDHXBM (ORCPT ); Fri, 8 Apr 2016 19:01:12 -0400 Subject: Re: [PATCH V3] net: emac: emac gigabit ethernet controller driver To: Bjorn Andersson Cc: Andrew Lunn , Rob Herring , Gilad Avidov , netdev , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , linux-arm-msm , Sagar Dharia , shankerd@codeaurora.org, Greg Kroah-Hartman , vikrams@codeaurora.org, Christopher Covington References: <1451440135-25771-1-git-send-email-gavidov@codeaurora.org> <20151231231039.GA8886@rob-hp-laptop> <56ABADEA.40801@codeaurora.org> <5706B4EF.2050600@codeaurora.org> <20160407201009.GA16136@lunn.ch> <5706D493.8020700@codeaurora.org> <20160408005317.GA28125@lunn.ch> <5708013F.90207@codeaurora.org> From: Timur Tabi Message-ID: <57083834.2060102@codeaurora.org> Date: Fri, 8 Apr 2016 18:01:08 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1351 Lines: 32 Bjorn Andersson wrote: > It sounds like you're trying to say that the pins used can be are > muxed as GPIO or MDIO, in the TLMM. I'm not 100% sure, but I think that's correct. If you don't want to have normal networking, you could connect those external pins to some GPIO device (like an LED or whatever), and then configure the pin muxing for GPIO purposes. But if that's true, it's only true on the FSM9900. On the QDF2432, those lines are not connected to the TLMM. They are instead hard-wired to the Emac. > In the downstream kernel this is often seen with the drivers calling > gpio_request() to "reserve" said pins, but all you should do is > described the desired configuration and muxing in the pinctrl node, > reference that from your driver and simply ignore the fact that those > pins could have been used as GPIO pins. That makes sense, but I think the driver already does that. https://patchwork.ozlabs.org/patch/561667/ Function emac_probe_resources() has a call to of_get_named_gpio(). And then emac_mac_up() calls gpio_request(). As far as I can tell, that's it. I'm guessing that the of_get_named_gpio() call needs to be changed somehow, but I'm not sure how. -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation collaborative project.