From patchwork Fri Sep 2 10:32:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Ramadoss X-Patchwork-Id: 12964011 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 494C9C6FA83 for ; Fri, 2 Sep 2022 10:32:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235461AbiIBKcm (ORCPT ); Fri, 2 Sep 2022 06:32:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235792AbiIBKce (ORCPT ); Fri, 2 Sep 2022 06:32:34 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22373B2CE4; Fri, 2 Sep 2022 03:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1662114754; x=1693650754; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yKhV1QeaMdj5PolCerUiy3X7/Y2GvbFjvuGsxtDBMo8=; b=TulDct2L8pJvNJsmpGu2rSs4zB9vEkWlUWV/vIhSRpv50lCIR9JmrJZ+ 8dnM6INqeWKxjCL1okNOtmlvKpmSKUoXALw44n+bCD45VBSe5clHeTSS3 c0WmLzBQhBeXg2G4B5+DZq4XI0Z5DZ9EtfD0LjuoPh7IDuJjywcyBi4Qi ulTQxrkA3hisX2ymhD66VwEJ/HGrWjzlAdgcgYdZ39H0moZ0t0o5JWxNg 5nq+A+qICghKE2vmWRZo/zIOHX2JRQoAOamsWQhCmhuaMBFzmDu2Y4gGE ZiZHfxhMiTXr5MtqtWpa/iY0FEjlvqMCjB6ox3FXPk39Wa3R1MHsh14zT w==; X-IronPort-AV: E=Sophos;i="5.93,283,1654585200"; d="scan'208";a="178772912" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 02 Sep 2022 03:32:31 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Fri, 2 Sep 2022 03:32:21 -0700 Received: from CHE-LT-I17769U.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Fri, 2 Sep 2022 03:32:16 -0700 From: Arun Ramadoss To: , CC: Woojung Huh , , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Russell King" , Tristram Ha Subject: [Patch net-next 0/3] net: dsa: microchip: lan937x: enable interrupt for internal phy link detection Date: Fri, 2 Sep 2022 16:02:07 +0530 Message-ID: <20220902103210.10743-1-arun.ramadoss@microchip.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This patch series enables the internal phy link detection for lan937x using the interrupt method. lan937x acts as the interrupt controller for the internal ports and phy, the irq_domain is registered for the individual ports and in turn for the individual port interrupts. RFC v3 -> Patch v1 - Removed the RFC v3 1/3 from the series - changing exit from reset - Changed the variable name in ksz_port from irq to pirq - Added the check for return value of irq_find_mapping during phy irq registeration. - Moved the clearing of POR_READY_INT from girq_thread_fn to lan937x_reset_switch RFC v2 -> v3 - Used the interrupt controller implementation of phy link Changes in RFC v2 - fixed the compilation issue Arun Ramadoss (3): net: dsa: microchip: add reference to ksz_device inside the ksz_port net: dsa: microchip: lan937x: clear the POR_READY_INT status bit net: dsa: microchip: lan937x: add interrupt support for port phy link drivers/net/dsa/microchip/ksz_common.c | 13 + drivers/net/dsa/microchip/ksz_common.h | 18 ++ drivers/net/dsa/microchip/ksz_spi.c | 2 + drivers/net/dsa/microchip/lan937x.h | 1 + drivers/net/dsa/microchip/lan937x_main.c | 368 ++++++++++++++++++++++- drivers/net/dsa/microchip/lan937x_reg.h | 12 + 6 files changed, 410 insertions(+), 4 deletions(-) base-commit: aa51b80e1af47b3781abb1fb1666445a7616f0cd