From patchwork Tue Sep 13 16:04:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Ramadoss X-Patchwork-Id: 12975020 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 27C5EC54EE9 for ; Tue, 13 Sep 2022 17:17:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232759AbiIMRRd (ORCPT ); Tue, 13 Sep 2022 13:17:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232556AbiIMRRM (ORCPT ); Tue, 13 Sep 2022 13:17:12 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 857187B2B7; Tue, 13 Sep 2022 09:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1663085097; x=1694621097; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=30ncN3R5OS4B2mylYvpP3Y31V9SE3zfiIEbI05xrU8A=; b=V/4w4Owzgovf7ktoVfJpaLyRGKDHnZhtIfPEwXthbSqyOQlYD183kTFG 4NBH5xThcoAEQWN2OMNfKt7CZvLqpVbk7eUTUP+5299+K8DHIWp2snSzW dY0lsSGW1SqhOvBAeySvuKuUoSv2zvjyXNYx8laUu6d/e/py1HXGJvmGZ khDiRdcviUWOG5beJHv25UdDTSLfMkWkoa0RYdgL6vPbfeIr3obbWuxqr F5jzHwpT5SKy8EwgtybmZZqwddRFW0FdznkE/P/6dGn8NBRV3KPTAsKk/ PZQfaBuWv8peQv/aJofCK371Pesj+IBQoS1Ym76q67TJBnZcai0x7fPJv g==; X-IronPort-AV: E=Sophos;i="5.93,313,1654585200"; d="scan'208";a="180333181" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 13 Sep 2022 09:04:54 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Tue, 13 Sep 2022 09:04:48 -0700 Received: from CHE-LT-I17769U.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Tue, 13 Sep 2022 09:04:41 -0700 From: Arun Ramadoss To: , CC: , , , , , , , , , , , , , , Subject: [Patch net-next 0/5] net: dsa: microchip: ksz9477: enable interrupt for internal phy link detection Date: Tue, 13 Sep 2022 21:34:22 +0530 Message-ID: <20220913160427.12749-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 implements the common interrupt handling for ksz9477 based switches and lan937x. The ksz9477 and lan937x has similar interrupt registers except ksz9477 has 4 port based interrupts whereas lan937x has 6 interrupts. The patch moves the phy interrupt hanler implemented in lan937x_main.c to ksz_common.c, along with the mdio_register functionality. Changes in RFC -> v1 - modified the return -ENODEV to 0 if mdio node not present Arun Ramadoss (5): net: dsa: microchip: determine number of port irq based on switch type net: dsa: microchip: enable phy interrupts only if interrupt enabled in dts net: dsa: microchip: lan937x: return zero if mdio node not present net: dsa: microchip: move interrupt handling logic from lan937x to ksz_common net: phy: micrel: enable interrupt for ksz9477 phy drivers/net/dsa/microchip/ksz_common.c | 435 +++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 10 + drivers/net/dsa/microchip/lan937x_main.c | 425 ---------------------- drivers/net/phy/micrel.c | 2 + 4 files changed, 447 insertions(+), 425 deletions(-) base-commit: c9ae520ac3faf2f272b5705b085b3778c7997ec8