From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9877C55179 for ; Sun, 25 Oct 2020 08:18:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A1DB422202 for ; Sun, 25 Oct 2020 08:18:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=walle.cc header.i=@walle.cc header.b="d4l/vB6n" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1768243AbgJYISM (ORCPT ); Sun, 25 Oct 2020 04:18:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1768204AbgJYISF (ORCPT ); Sun, 25 Oct 2020 04:18:05 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90853C0613CE; Sun, 25 Oct 2020 01:18:05 -0700 (PDT) Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id B917322EE3; Sun, 25 Oct 2020 09:17:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1603613881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HbXAuisRkbCjpst8/x7U7SZEv2Tpc4KYDd1+sDc2lys=; b=d4l/vB6nvsFp8wUk9aRedzg8d2KlhKTW9CZTrvxFr6PCM2O1iRBB6TErtsdclvGCK8paTK aRLDGK0+PcRzhzdBGk4LQ5O8jXZEqB2G1ebFB+Db9fGnob0DZk3lmDAcgZ84Xu51EM1EMI OLFQ1NVp5qlf36Rq2z8fFbfxgJYKPm0= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 25 Oct 2020 09:17:58 +0100 From: Michael Walle To: Ioana Ciornei Cc: Andrew Lunn , Heiner Kallweit , Russell King , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Alexandru Ardelean , Andre Edich , Antoine Tenart , Baruch Siach , Christophe Leroy , Dan Murphy , Divya Koppera , Florian Fainelli , Hauke Mehrtens , Jerome Brunet , Kavya Sree Kotagiri , Linus Walleij , Marco Felsch , Marek Vasut , Martin Blumenstingl , Mathias Kresin , Maxim Kochetkov , Neil Armstrong , Nisar Sayed , Oleksij Rempel , Philippe Schenker , Willy Liu , Yuiko Oshino Subject: Re: [RFC net-next 0/5] net: phy: add support for shared interrupts In-Reply-To: <20201024121412.10070-1-ioana.ciornei@nxp.com> References: <20201024121412.10070-1-ioana.ciornei@nxp.com> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <1b7a22ba10ed5d63743c045a182ce5f9@walle.cc> X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 2020-10-24 14:14, schrieb Ioana Ciornei: > - Every PHY driver gains a .handle_interrupt() implementation that, for > the most part, would look like below: > > irq_status = phy_read(phydev, INTR_STATUS); > if (irq_status < 0) { > phy_error(phydev); > return IRQ_NONE; > } > > if (irq_status == 0) > return IRQ_NONE; > > phy_trigger_machine(phydev); > > return IRQ_HANDLED; Would it make sense to provide this (default) version inside the core? Simple PHY drivers then just could set the callback to this function. (There must be some property for the INTR_STATUS, which is likely to be different between different PHYs, though). -michael