Received: by 10.213.65.68 with SMTP id h4csp869003imn; Fri, 6 Apr 2018 10:15:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx49EUgexIGL1IzUX9aH2BS6jrNvKsil1cajkgLnFbOvqtzQiRZ/4Z6v1fZo9KZCOKEerEC2O X-Received: by 10.167.133.85 with SMTP id y21mr7903332pfn.139.1523034920008; Fri, 06 Apr 2018 10:15:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523034919; cv=none; d=google.com; s=arc-20160816; b=VGbcxp9f5Lv1B0LKX4uOCdLJywMX8z+llw9qB0C2vXpX/ZykjdSlQ+53wh6REFSd0F U2TGDBj6+ssSc/x4fjU+eY6jkECUM77BWf0PTkNFKFdmjTWVMsJnuSxa7efee+eTK13q Kr2cRpIo/ScKBY5ji2TNyw1uc5UpNadpF/EJzc/YG0p24HCTw9563m71NJqJIR/WBhIP ThugNif+nckZoB8sMob4qgoGe8NDo6ZPti9W8R0DhEQa7KiiVEvH3UUZkhGnUc8HGWv8 YIYXigWKVt6dVCcmcDiZRIJLD/v5/6LfRpj1AG4Od27QISRw5C/3Z0cCHi8chYQb4mIi UipA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=SPzHT+JXXPN3SDAzQlCuqKAU9D4ht/Fah96+Zy8MQWk=; b=pAdcEuS48Rpx24QmNJBaRf5baxnr6QDhiEVH7oq8gaonuQcCMoF8GUcSGgK1QY8VwB 1Fc9rJB/JWfOHl51pX7R5q0fsET7iJKYRCeUdfuwefZtrxxC4u6bp8TnW36RMIw9O6iE UDPisTQiQC2mZcGD050QGUlLI+Lc4mcePpbwkojM4wOvyhx46WaOmf75ZsSRbJz26qhD H7psCYBsMbtkTjfu6ZHjhJBiCobht15wgdpmcXg12IAVb3McRJvWh0sg+UynfROYlXfQ cWX/5Ifh2WyCoCVRjSdvZ3ryoQItPgiICspFb93vrqgXpYHdtObeOBA3luCpADe5pMbc GEdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=B3t7MNn5; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s73si8405241pfe.128.2018.04.06.10.14.43; Fri, 06 Apr 2018 10:15:19 -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=@gmail.com header.s=20161025 header.b=B3t7MNn5; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752394AbeDFRLH (ORCPT + 99 others); Fri, 6 Apr 2018 13:11:07 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:35337 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751606AbeDFRLC (ORCPT ); Fri, 6 Apr 2018 13:11:02 -0400 Received: by mail-lf0-f65.google.com with SMTP id j20-v6so1523897lfk.2; Fri, 06 Apr 2018 10:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=SPzHT+JXXPN3SDAzQlCuqKAU9D4ht/Fah96+Zy8MQWk=; b=B3t7MNn5dCdd44I5/2e/N1XVOvrR+6jbxh135e5GmPDEb8PeHSVHvboowPef3P+DUd RpHN1OV9ttlerlkgVslV+jUh5pXRcS9x+D/2ZOEZ6+hNzMDp7N68tksa60+cz/Yjy7O6 zMskndBX7uMN3WAjCbix/VJYBhnIIsghQp9baZD5i6sDo+9F0y8XQo673osO6W1xlUbz Nuc/RWgw75jYVEgO9w+6r9R/2wmyeT37gtGr5ETytyl6761LQ0ERZ0njB4mCGVRsdDc3 jJpbxbdQOxPzD0mF1h52uVYKXHLxa+Vrf9KPJo3pCNNx68Hei/zp+QzxaxLjFdW1C2tX TZWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=SPzHT+JXXPN3SDAzQlCuqKAU9D4ht/Fah96+Zy8MQWk=; b=gswgaRGUmRL8veCKyORyK4ziUdlgMdtAUnRiLv83Gs1tvLgpUpusxyDjov6NNc9I0x ZI0JM25T4ZV8cTuNDFBRtV8RnLRhFOFkX8fchSapj59ucFce9Xf3wOlzH3UKTFL66aFB Q0nOWMnbSvWrWnHfeGUqQhC4Q3zchFw5L2KXm1QQLujGBmQ1tYA78hMLHTW3P1oBwqPS 4zorO61FT7h6+W7YkdpSTeeJsMoAj2R95teMG55En9rivjgi1VjNqaIN+HvWIoGs3e9j zracBIpxr6Jzn8NTVF50r7FDhBnnJlg51ubbL5jXwEvMzPJ89jdUYu1SYSzpZdVr6Om0 MrEA== X-Gm-Message-State: AElRT7Eoo9RvFRpzzIiMpV833A719wUDJChGkgPIf0EHUYkTCia23Pkl RgKJKyFNUfVGWrAqviHplq4= X-Received: by 10.46.137.83 with SMTP id b19mr17567506ljk.111.1523034660776; Fri, 06 Apr 2018 10:11:00 -0700 (PDT) Received: from localhost (87-57-30-174-static.dk.customer.tdc.net. [87.57.30.174]) by smtp.gmail.com with ESMTPSA id 76sm1809895ljs.93.2018.04.06.10.10.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Apr 2018 10:11:00 -0700 (PDT) From: Esben Haabendal To: Andrew Lunn Cc: Bhadram Varka , Rasmus Villemoes , Florian Fainelli , open list , "netdev\@vger.kernel.org" Subject: Re: [PATCH] net: phy: marvell: Enable interrupt function on LED2 pin References: <20180405133504.12257-1-esben.haabendal@gmail.com> <4d9e0665abf7408988fc4ce20c26a08f@bgmail102.nvidia.com> <20180405144355.GB32663@lunn.ch> Date: Fri, 06 Apr 2018 19:10:58 +0200 In-Reply-To: <20180405144355.GB32663@lunn.ch> (Andrew Lunn's message of "Thu, 5 Apr 2018 16:43:55 +0200") Message-ID: <871sfs1crh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrew Lunn writes: >> diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index >> 0e0978d8a0eb..f03a510f1247 100644 >> --- a/drivers/net/phy/marvell.c >> +++ b/drivers/net/phy/marvell.c >> @@ -457,6 +457,21 @@ static int marvell_of_reg_init(struct phy_device >> *phydev) } #endif /* CONFIG_OF_MDIO */ >> >> +static int m88e1318_config_intr(struct phy_device *phydev) { >> + int err; >> + >> + err = marvell_config_intr(phydev); >> + if (err) >> + return err; >> + >> + /* Setup LED[2] as interrupt pin (active low) */ >> + return phy_modify(phydev, MII_88E1318S_PHY_LED_TCR, >> + MII_88E1318S_PHY_LED_TCR_FORCE_INT, >> + MII_88E1318S_PHY_LED_TCR_INTn_ENABLE | >> + MII_88E1318S_PHY_LED_TCR_INT_ACTIVE_LOW); >> >> Can we move this part of the code to m88e1121_config_init() ? >> >> Every time whether we disable or enable the interrupts this part of code >> will execute. > > Yes, doing this once would be better. But please allow the LED pin to > be used as an LED when not using interrupts. phy_interrupt_is_valid() > should be involved somehow. This should be addressed in v2 of the patch which I have already posted. /Esben