Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp352520pxu; Sun, 25 Oct 2020 03:05:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKWWt+gJ6AFQxKhqGk9NOD+X3MXNdj6uo7exw2asCM64moyv2xr3VP9/5ScxMXuC8Hxta4 X-Received: by 2002:a17:906:4a03:: with SMTP id w3mr10712571eju.15.1603620330595; Sun, 25 Oct 2020 03:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603620330; cv=none; d=google.com; s=arc-20160816; b=CuNHPz11n4IHp01hLyhpmERHL+VXiG4FzN8uH2xOTpyDPAttN8J2saZVnm6mqF0XD3 ilxW2emcI5xg1rt0d+7f6Te9f+DxMdlIr+FE8aH68yK8P/TJtuTLOB8PWZBkbP8+YGfb Hifz67g8OZ1MEtRbO1mfCi4c903oT5jW19EKFuJvsIhnLsOMiYO0J8X2BndC3ADII2BA 6T8rS6crIa6adzVfPF+pYm2lILLmzejtwvt0LQ/uCJIx3xwdJZWk6RGOFA92oumqonej dHUyyoP1sROmvttljkMdd14TeFnz0t8tA0gGrR8g29E4w4OaTRknWi8vCTXh3WqLC1UQ VAAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=HbXAuisRkbCjpst8/x7U7SZEv2Tpc4KYDd1+sDc2lys=; b=ixmiqsMpLiEfobskPYP2JHOybqCmHAKMOmOrYcHH5YTP1ocE+EIPnxOCPq2QeeP4aS MMUfHAeKYnHFd0ZUboo1L85xJdskhFhtwOyRKyQwTLNGAc+1osTc6Z7AafI2dePDAFfF QM5uGQn/CdffSIrhlnkOOZWMTrzEqE9AWatugoGsPSHH18LTzRiKoVcDLOUj9EXwCKAp YWu+zBtUNKSOiHHqnitt4twBUZzE6XQiRRmTiLsUr/u+sOO9swsoUAPhqaxjeOi891rU tkDq4VGp71+J2uqqkDTnAGdNLqzqaLRSZ000qAdp4X9O49+GCh6+GoalieQpW3Z3y7gF fAmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b="d4l/vB6n"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c16si4736350edy.220.2020.10.25.03.05.08; Sun, 25 Oct 2020 03:05:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b="d4l/vB6n"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1768237AbgJYISK (ORCPT + 99 others); Sun, 25 Oct 2020 04:18:10 -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