Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2438008pxb; Fri, 8 Oct 2021 07:50:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7qK/4/c89gd9F2Bk0KgoOFid5xDwQq61f8dan4+WXBvw2wk7FSltUAhfDTyeWWyYd6obS X-Received: by 2002:a17:907:3312:: with SMTP id ym18mr4753540ejb.370.1633704602351; Fri, 08 Oct 2021 07:50:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1633704602; cv=pass; d=google.com; s=arc-20160816; b=sNL6yl2lgdjNOAUBYKvo/8BLuYQXzUJezQNhtX110bycRf20Kd9EVoEuPV+edsVhp6 UZxCYj/U9qiEKemWGL/C7QSQ6xNYu4APxE9R/25Idfhx1U25O+y+2+LToFE0vWWFYG8H 37r5ftKmkr0tsXpxNZZrNtmvXKgjbRylARR5UlYJNM/ndy/0MTSddFqvG+hE2qtrA0jA ie67KBbP4TNVmGVoCt75gw9DtLJuxVbVh71JrSGldQtA5VeIfY1bDbzU52l9yjU0PZox fcxwb1hR5NUeH6GpRtCdNWeKC/asefaDXxAGnqV3mxdZLiejhOZ+Ze+OOFNxAsFPQBmL Dk3g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=xEtB7mq3hSIDYqJZSn6cq2Yw/pWJuIL4Lh9EyyJseOY=; b=OOP8pfXBIdHd1XH0qUNb5eKZymEw86XPumj0K6aqcT6Xq2U+dNsT86ePi6HaUWbwx3 q1KsgDrYW9vvuQMjrmHHGCmZUEHkBCBLBm/NT5sK6ifE1ydOKDC6ZyUeOE7Bo8CEk+Y1 2x/AfZKmYP9OlO6uxYpg+OBIQJdqboNM4dZ2JgyhQP6mWyEU8DuRBfgsmyobqQeH+5p4 Hi2pQR+o76KSUoL4wTyBXWvYa48EASGos1mIfoNPc/dlHHrHdTyhQ+N8CmMAh5L6ymsH 3tJZbHBgfuBGacXpczhcMymZ+AD2eRWSHcDWqo02ik7tFPYFiODMdaRC8Zfd6u/eIM1u 5Ikg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=qjQiL8Hj; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr15si3199747ejb.721.2021.10.08.07.49.38; Fri, 08 Oct 2021 07:50:02 -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=@Nvidia.com header.s=selector2 header.b=qjQiL8Hj; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242444AbhJHOtU (ORCPT + 99 others); Fri, 8 Oct 2021 10:49:20 -0400 Received: from mail-bn8nam12on2042.outbound.protection.outlook.com ([40.107.237.42]:38753 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230511AbhJHOtT (ORCPT ); Fri, 8 Oct 2021 10:49:19 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SX253S7fcLyFlaC7GySdc841WDfVYQm/465vHYdfIrpaGDgjEIFfTi/tB+9G5ZGmSVQrgjiGtXhqR3vdUs0+2XPa5LXzmVLmv4mavofiS9vfoDLzftAPeTBFEJ6KC9xShPJvqEIe1gSA3qOiYcT+9s5pkVFV0zpq7nP9bVh8g2xfRbg6pAcAyBPcgT5zmLaOntxzZYjtHoVOVM4Zb4PrHvFAa/WWgKEjnxEXeZOZxDxwcNCx8qQyW8lFI6ybDaWxZMmy1ykXfUIFepll1k8lAWwpDBqqGyr6FQIYQ3tgMuDATdO6Mgvwb7Nhyp1bZs/psiNH4Hbu4/Sb/spQ6aOcWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xEtB7mq3hSIDYqJZSn6cq2Yw/pWJuIL4Lh9EyyJseOY=; b=N6HIDrgfsbA1/1iWbwdKU2RC1RVuVxq5Wu0Og0JTlxqlvBhK3OQnOhFVTPpUA0Epsrao9hFUMsjSB0Bs/IhiHvXwzNEb29BBqFaM4cj9uvkOymSltrExACvuZGnotvuvwMiqO+/kf0kTn7H4do0sqlk8OWGHTy0ZGbjzcxVgeuaTlVaYbEGiFj7FD5auPvUudofmEyAggXV1OnFQ+F72fcDQYUnHLN/PVk+LYKwJwpbBMkX+z36esas1EnIAjSaUk6SyMJ9L7VemwAn5+WKgFC+ufc+rewXVkZ3HCZFm0LthHqI4hpVUK8cQU3mK+UvRbsapitnOaGwOaXmvyhiGAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xEtB7mq3hSIDYqJZSn6cq2Yw/pWJuIL4Lh9EyyJseOY=; b=qjQiL8HjOp1+CebFx93zwPqUO0HwsEb49SGUk0chMSxFCYMn1SUkE8pJhRb6IQU5LLleZM440VCiPgUCm7eyu/AlpbMZaRec6Nx+o2gdAMKEoMQs+aiNn5D6IW7SGsul5Hxh0FTVtsMnpoVHY/a/HhOlrHn5qxzEBwA9SVWAVg+e0eZUJ8g52As8q1JCuPfMFUTtYbnRQx78c9LZ17Uy0ZhI8qZ2ycUYSQ+Vn5ggNxC8LK6bcWuLpie/fSp7PA+zy+H0VqH/mgSKMVMgZF4rKtRpfC4TGufXxOkn8rn7Q1YnbukHVL4QROBngJ6eu7mz5TKwY7m87qRqjcrXEXSqXA== Received: from CH2PR12MB3895.namprd12.prod.outlook.com (2603:10b6:610:2a::13) by CH2PR12MB4101.namprd12.prod.outlook.com (2603:10b6:610:a8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Fri, 8 Oct 2021 14:47:22 +0000 Received: from CH2PR12MB3895.namprd12.prod.outlook.com ([fe80::a46b:a8b7:59d:9142]) by CH2PR12MB3895.namprd12.prod.outlook.com ([fe80::a46b:a8b7:59d:9142%5]) with mapi id 15.20.4566.026; Fri, 8 Oct 2021 14:47:22 +0000 From: Asmaa Mnebhi To: Andrew Lunn CC: Linus Walleij , Andy Shevchenko , "open list:GPIO SUBSYSTEM" , netdev , linux-kernel , ACPI Devel Maling List , Jakub Kicinski , Bartosz Golaszewski , "David S. Miller" , "Rafael J. Wysocki" , David Thompson Subject: RE: [PATCH v3 1/2] gpio: mlxbf2: Introduce IRQ support Thread-Topic: [PATCH v3 1/2] gpio: mlxbf2: Introduce IRQ support Thread-Index: AQHXsLi5/ezHFM2t80qMnoiP1wWjOauzEi0AgADJmACABBI7EIAAAriAgAACbtCAAAsjgIABjviQgAHxZACADcUy8A== Date: Fri, 8 Oct 2021 14:47:21 +0000 Message-ID: References: <20210923202216.16091-1-asmaa@nvidia.com> <20210923202216.16091-2-asmaa@nvidia.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: lunn.ch; dkim=none (message not signed) header.d=none;lunn.ch; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a26349d3-673a-41ea-d665-08d98a6a891a x-ms-traffictypediagnostic: CH2PR12MB4101: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: d5JXHRkTTwfOLj4gp+IVi4UyBeSrbDNw2+A6aG4KpMmP90hdzxJ92UzL9G1mxfDnoqpidd9daPd6OyZxS7rEFMeqOeN+9AQ6mcguMMO20OFCFV13U5r+wy/WacQNM4F5w8eF/wP1fpGO6TLa+CuRsf2HKdDnhZMIeeyKuvwyM9mCP7xMl6bvIvL4D2TevUWzHoVw6UM29e1SPT+/e5BWo4ngFBkGedO/Ks7C1oIj7FXoQKtRFLMjt8tUBbqpCk9Vkk/JTYNzMjVlyYt0AWnxny/5Ox0fiYHluadg7HMArZzKrMWlIijWj666Z72mFMtF16AROaBHV3tUqu1LFulb21WOp2XqVIZuQ4vEcj5OEw2n3OLiyLvcr9t1ktWAuKYoWIN1Lj0FKGtDtKKhmlaAxCr1UuOz/VYTpt0PGyyXzsLGzcTrrQGwHrbQatRwrNYvQDQKupx8Jjd4T3hfITDMtzyTOrYjvGou0J+PDhWgbym8VMJfxZi1yzn6sqRqo93r/pNiC+L6M9kwsxvN7ee2JuH4EpTCcBAsmt8pBRtN35t+W8I9XaQawS6BXzaz0KCoVIXxScOqgPsuXQqma3qTW9VR6E7/Xrf8CiEzNcVU93O8CdgQRVf6R1pQNkA7c9sJGKPFRTFlo5ZXnfEVibNcWxgpuhz+onr6003SGMadqNOb2cGCnS61lyEf9/ZhhngEXFyyN37CYS/uXfzBGusIGg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH2PR12MB3895.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(26005)(38070700005)(52536014)(5660300002)(76116006)(66946007)(64756008)(55016002)(86362001)(66476007)(66556008)(4326008)(9686003)(107886003)(186003)(66446008)(508600001)(8676002)(7416002)(2906002)(38100700002)(54906003)(8936002)(316002)(71200400001)(122000001)(33656002)(6506007)(6916009)(7696005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Jw8B0p2WfKHSFZJaGi8uPZ505IAe3941ztDSqmNMI3GnVVmVnjGRcKSQ1AsV?= =?us-ascii?Q?tmy8UMM1k0PUnKFhsqpv/yXmY6v8KQQsmq23JCWwUTf8L0nfRFGssCMN8Yox?= =?us-ascii?Q?bmU9D707O6YzDM1hAKPRB8JcNlE8zT+pJUldjqn0jzmqcIS2f2bLqnGCkKEg?= =?us-ascii?Q?V1skLhDQKwi3LGfh8ZZRVAxTAdZ1HOh4S8Tb5o1RGgeIKXHP/l1YzgJHvhIc?= =?us-ascii?Q?buXVLmKzN5vOU6EsCA8oz/XUBOSLaBnzhxwGW6YKN74p2bzzaBbBQxafkbam?= =?us-ascii?Q?c5uG12m1gUVS4D3vyLdgRnKAT2fRoAIN5KbFhO9bUbR6NTnhGBL7wBg77Ckt?= =?us-ascii?Q?BDTgnTuGJVO8RQOeefVxfqbUSuO+Xv+msDZJ7hYXTqCZl+wQjmUDTb/GYmbk?= =?us-ascii?Q?aR54H+ikfFqLypS49ZexcSav7QgMSKkRZtKgH+NqQ9eAVrTa9r6EhsMYvrrM?= =?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RsrU?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB3895.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a26349d3-673a-41ea-d665-08d98a6a891a X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2021 14:47:22.0270 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: OPzdXLWVBYNcOTDeJ1kSiuNO5VA7wUwHUivZ0p47gUc2irVJVfyLg2dDdhOqQzLBiPE+0Mjm4bMBSbTUSLwyUw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4101 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > In KSZ9031, Register MII_KSZPHY_INTCS=3D0x1B reports all interrupt=20 > events and clear on read. So if there are 4 different interrupts, once it= is read once, all 4 clear at once. > The micrel.c driver has defined ack_interrupt to read the above reg=20 > and is called every time the interrupt handler phy_interrupt is called. S= o in this case, we should be good. > The code flow in our case would look like this: > - 2 interrupt sources (for example, link down followed by link up) set=20 > in MII_KSZPHY_INTCS > - interrupt handler (phy_interrupt) reads MII_KSZPHY_INT which=20 > automatically clears both interrupts > - another internal source triggers and sets the register. > - The second edge will be caught accordingly by the GPIO. > I still think there is a small race window. You product manager needs to = decide if that is acceptable, or if you should poll the PHY. I talked to both our managers and the HW team and they said it is ok to use= the interrupt for our product. > Anyway, it is clear the hardware only does level interrupts, so the GPIO = driver should only accept level interrupts. -EINVAL otherwise. There is an on going conversation with HW folks to address this for future = BlueField generations. Thank you. Asmaa