Received: by 10.213.65.68 with SMTP id h4csp1950341imn; Thu, 5 Apr 2018 06:37:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx48kFm6NbuIospsixytthy9smNjSpgxaWH5tzS9HKj/qSYNe0uiF5hm/QyIktZ2HkKh8GGNS X-Received: by 10.167.129.215 with SMTP id c23mr12764953pfn.17.1522935456129; Thu, 05 Apr 2018 06:37:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522935456; cv=none; d=google.com; s=arc-20160816; b=XXIEqKWKs3i/RuitD/8WkpOklcSq6vR9lufha0qNiEJ7oAxPKbUTE58L7nOS2Xfgx4 IMzDbREmX7cm4rBc9CS2GQZwD6hA9bXe8y21xPUevnchkp/8jiV8JEX3Xn4MGQuN399h RyhNKYOLMgudq1BUAAgev0Tq7KgHMtnp3Znhws7JEOCzrVdEE1TBfh3Br/04SsJT319g lT7WKaE/YZJ6YPgdyrHhx4AKJ77S4htvSLd3TBKMv2XBPe1qtve9H+8SVnLSsA8+PprP IS79X16686It6AELj5Ka2xYqzoqRrToVatvraYqCME6+/vdSOPbzFs4igtVk/BsNgUJe qwng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=lX/RRZPvms3LDvbXXzEIlARB2Zo0l8xyZ0QyWtFeopY=; b=Xt9f2q1ZQVKu3wCvtmg8RVo4oL7to1tXv8b6nfHftsvDB58HPZcstp20mPmc8gXQz+ czQuOgno/nhzJc94CXxxGiph7jnvD+lUVBoqeJESGtPqbN8vBD4Z51jQR75LhVSVqRRw lQU8/B+IMPAjr/XfuTrkJLEZZN4b7Ml5Hd8zqJfJDW0xH+hQ5p48uYNDS2F/JZmRnNC8 Az7yf0przHUzNL4fJP42IDd3eRmuzoOgL7XQtHtbo6OlMa3N2WrgFmv+i0YDfGeEk8QL lEK0cCX78nX+zekkF4gRX0Zrwu2VNL/VWbA3npvN9ZetCAj9l8U8sux0FU5Xk1lDpf9S 1wqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=fCCRQ3Uh; 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 e9si3178238pgn.17.2018.04.05.06.37.22; Thu, 05 Apr 2018 06:37:36 -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=fCCRQ3Uh; 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 S1751412AbeDENfi (ORCPT + 99 others); Thu, 5 Apr 2018 09:35:38 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:39623 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751165AbeDENfh (ORCPT ); Thu, 5 Apr 2018 09:35:37 -0400 Received: by mail-wr0-f196.google.com with SMTP id c24so28457298wrc.6; Thu, 05 Apr 2018 06:35:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=lX/RRZPvms3LDvbXXzEIlARB2Zo0l8xyZ0QyWtFeopY=; b=fCCRQ3Uh/tUC9WBHwWymSmCXNfg7ndHqRpT1GNWa7fJhAGf40onbGr82zl+iTI+66O z4j3TzULGK9l53HhHuecstjlOhQmDiq6gB8awfAIxOwO+Nb1JTjeqQF99yLjGm3Ye8Tb 2e2AeXeP2Ree6dGAdxpi0W0RVYmYJWQ3h4L/gOD+XjDCIXLDzdqBXe1X0l/815hpSQkx 4+P9icr8GIXzIi9QUNJIz/MQNDzr37SKdjfZkDf76+w0oKbNWpBRccvdz4A64qNa4tCY aYDU0TcGzbl6csKLlZVYxf6VKykZrXfBJ2P3om8yM+oCxpjCiiPILWn1hePOJ6KPYofY RtaQ== 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:date:message-id; bh=lX/RRZPvms3LDvbXXzEIlARB2Zo0l8xyZ0QyWtFeopY=; b=hiHafn8FMByG4UrgPlfa0K+kT+EZAgaAG7t+e2ehaPhgtJFS1giinD51AY+Ml0P7Em OAKMESBl799Gye9Jg9Ap1AMLa7FDM5IQ4uQ0sm7Va6a9PaqnK2RaC0eayFka1o4o0Dad RW48+VYNfY0dMnnqq0f8CsFQRGQN1Bj3vI35uNhzoG58P0MyvEjVvoaKJIPTcznYPHmg BCCF9LZQdw7KP4mlxFxHHQak9Z7oJQonjqNEjo/GNX2kXhek2+UTYf+uKU7IcXGm1A31 9b/Oj3n+1lqpZQnaMD43xquZ1nvCRFUMkT6mNhx7S841p3SnYKXW3h04QaFy/29SWysT DaBw== X-Gm-Message-State: ALQs6tD24vBT+yJd2pfqEFBonuM+GmsgBQ83rf80irrqeAVXxgu5er5t LepPxT+jvIGslzVjEm0MhTtBtGqn X-Received: by 2002:a19:5750:: with SMTP id l77-v6mr14289120lfb.10.1522935330532; Thu, 05 Apr 2018 06:35:30 -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 o2sm1285724lja.86.2018.04.05.06.35.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Apr 2018 06:35:29 -0700 (PDT) From: Esben Haabendal To: netdev@vger.kernel.org Cc: Esben Haabendal , Rasmus Villemoes , Andrew Lunn , Florian Fainelli , linux-kernel@vger.kernel.org (open list) Subject: [PATCH] net: phy: marvell: Enable interrupt function on LED2 pin Date: Thu, 5 Apr 2018 15:35:04 +0200 Message-Id: <20180405133504.12257-1-esben.haabendal@gmail.com> X-Mailer: git-send-email 2.16.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Esben Haabendal The LED2[2]/INTn pin on Marvell 88E1318S as well as 88E1510/12/14/18 needs to be configured to be usable as interrupt not only when WOL is enabled, but whenever we rely on interrupts from the PHY. Signed-off-by: Esben Haabendal Cc: Rasmus Villemoes --- drivers/net/phy/marvell.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) 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); +} + static int m88e1121_config_aneg_rgmii_delays(struct phy_device *phydev) { int mscr; @@ -2090,7 +2105,7 @@ static struct phy_driver marvell_drivers[] = { .config_aneg = &m88e1318_config_aneg, .read_status = &marvell_read_status, .ack_interrupt = &marvell_ack_interrupt, - .config_intr = &marvell_config_intr, + .config_intr = &m88e1318_config_intr, .did_interrupt = &m88e1121_did_interrupt, .get_wol = &m88e1318_get_wol, .set_wol = &m88e1318_set_wol, @@ -2189,7 +2204,7 @@ static struct phy_driver marvell_drivers[] = { .config_aneg = &m88e1510_config_aneg, .read_status = &marvell_read_status, .ack_interrupt = &marvell_ack_interrupt, - .config_intr = &marvell_config_intr, + .config_intr = &m88e1318_config_intr, .did_interrupt = &m88e1121_did_interrupt, .get_wol = &m88e1318_get_wol, .set_wol = &m88e1318_set_wol, -- 2.16.3