Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1640912pxb; Fri, 20 Nov 2020 15:08:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvsj+i0DOdDqF6Ondxvrp46ujd6iB16H9A3qBWrjTbOog14uxo25Lro5PGOgBhvJjJiLMj X-Received: by 2002:aa7:cfcd:: with SMTP id r13mr13162231edy.63.1605913694637; Fri, 20 Nov 2020 15:08:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605913694; cv=none; d=google.com; s=arc-20160816; b=pC4pMfqapI6KRldYQuoKwZXhB0GdHaR7uCPSplvrsqCrTtvLBYrILoaEqtdJ9ctawu nsSFvY7xsFSsty128ILsmPz+dvp8o0YI/d4jfThiNGdKY+pCPBaQIafvLuxzlHbbyFCd PgC6wCv/VWyXfP7kAr26ETBSPMixO1cRdL7V2VDGwQwOLkwLCI3aHWFj4WosoqBNva+j MEoA0EZpW7mjy3e5T0yRH4h3BpbFATATMagJsKURKYTWX/dpx0WmISGBXuFXLSHEs1EX Sg5qdUqvDXB9Jn4C4MWM63CpKEP8OC+2s9WyqZ9TSPnH7YIo9HR2Y8qDKq5QNQuFYyuW NPsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=oMctvuL0LC+KbeCtLx97RH5qb5AFi0FCJMWr7Dkegdo=; b=jncvbmrJ3eb6vhTqVL8BV0gutWDtarNUmLIbJYmGEQVpJau0ynBWJGI+mg7HWmZQBH 67bDOSFvaqbCNpYxkck4z0gjts20xQGuHN3RBe/knaF7aQ4YiAz3tjNbvPKzsK/y5cG6 epeJLELCGUTwg4BSHPR1/vSlOTQ4A4KCGN8fPu2RpV55m7zQzaMHFLQFXERovaKZ9bEX Lv5wdmvwuhOC8poNQA4WLOgp3ktOrPn/9RPYp78xOJyh9ki1F5jSWw1SJyuPB2CeMvXg BuG2JbHJGPdy6FKASfYhj1rMu7GDC1p452iTehfEuJC+yXgI9YtG+E6Y5XDPKT/uXwrz 4OXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZIKpyZtl; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j14si2543726ejx.329.2020.11.20.15.07.36; Fri, 20 Nov 2020 15:08:14 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=ZIKpyZtl; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728278AbgKTXDH (ORCPT + 99 others); Fri, 20 Nov 2020 18:03:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726255AbgKTXDG (ORCPT ); Fri, 20 Nov 2020 18:03:06 -0500 Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97849C0613CF; Fri, 20 Nov 2020 15:03:06 -0800 (PST) Received: by mail-ed1-x544.google.com with SMTP id cf17so7598676edb.2; Fri, 20 Nov 2020 15:03:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=oMctvuL0LC+KbeCtLx97RH5qb5AFi0FCJMWr7Dkegdo=; b=ZIKpyZtlYnalRfgua4tDJvzTB1P4zGLzphXi3kaf+fNDlkSMXIRdvlCEOXtaXhJ/wj TwBenfyrQ54JzkHaxiDIi2JG9qC0aw3jUd//HjA2PyS6g76DnyEPUqzKG1YZrwRtEzBG j2sda3U3OkxPuFUaECRjsmQ/A7wx7CfhqTPyl95d8DX/KwDC7a7L2OST1V6Kl0kzCb0K FsZz309LgKlnEhPQTAWgvojHHou6KYIM9906uh8b2uTHMTFsItor2fPmaxP+5KkgWDWg aL2basu+I7M1xiOWdyg+IcFYdOXkbigMYZ/0VVYtTWSKwFzEFFMmBFIDx7iRgBvW84MU Wj+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=oMctvuL0LC+KbeCtLx97RH5qb5AFi0FCJMWr7Dkegdo=; b=iWgvzY3vhuylp9lt10E6LiuVIxaTU3VupxsfprL7Pn2fDGrprh69y/7yhl9t3N8mB7 ejw8R9IkZ/v8uaVliWZAtr4tuQuQkQUGwR8Fm3AMoR6FqMPSbL1oV2UUY17hGs2a4Nem KUUpFA5N0dXoYYEPSKbpSQuV0dvnwcimuNq7RkZIff+0BX/ppGePR+sUnF+/x6mcUxQg /eUyO6/+jxXro72kvxlPVHOtq2PzA95CmpplZkVLZUqMXfeG6/uPJahBMVfq0diVtNZ2 lywbtXiXO9qZqZuQV787IUkiv2ZEApkE+thGLjWj7JCoyNjf9MpQjeg9BAYwfn3r3nq/ 3mbw== X-Gm-Message-State: AOAM5300VoGnAJVshCY+oIZjZKqtbS8FTXdU5NRtLxpQURH4REJUsBDd NtbWG+J+38dqs+BhXXrUI1Y= X-Received: by 2002:a05:6402:114c:: with SMTP id g12mr37402873edw.167.1605913385354; Fri, 20 Nov 2020 15:03:05 -0800 (PST) Received: from skbuf ([188.25.2.177]) by smtp.gmail.com with ESMTPSA id j9sm1623904ejf.105.2020.11.20.15.03.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 15:03:04 -0800 (PST) Date: Sat, 21 Nov 2020 01:03:02 +0200 From: Vladimir Oltean To: Christian Eggers Cc: Jakub Kicinski , Andrew Lunn , Richard Cochran , Rob Herring , Vivien Didelot , "David S . Miller" , Kurt Kanzenbach , George McCollister , Marek Vasut , Helmut Grohne , Paul Barker , Codrin Ciubotariu , Tristram Ha , Woojung Huh , Microchip Linux Driver Support , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v3 06/12] net: dsa: microchip: ksz9477: basic interrupt support Message-ID: <20201120230302.znjnsqnv7jm3vjdt@skbuf> References: <20201118203013.5077-1-ceggers@arri.de> <20201118203013.5077-7-ceggers@arri.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201118203013.5077-7-ceggers@arri.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 18, 2020 at 09:30:07PM +0100, Christian Eggers wrote: > Interrupts are required for TX time stamping. Probably they could also > be used for PHY connection status. > > This patch only adds the basic infrastructure for interrupts, no > interrupts are finally enabled nor handled. > > Signed-off-by: Christian Eggers > --- Reviewed-by: Vladimir Oltean > +static int ksz9477_enable_port_interrupts(struct ksz_device *dev, bool enable) > +{ > + u32 data, mask = GENMASK(dev->port_cnt - 1, 0); > + int ret; > + > + ret = ksz_read32(dev, REG_SW_PORT_INT_MASK__4, &data); > + if (ret) > + return ret; > + > + /* bits in REG_SW_PORT_INT_MASK__4 are low active */ s/low active/active low/ > + if (enable) > + data &= ~mask; > + else > + data |= mask; > + > + return ksz_write32(dev, REG_SW_PORT_INT_MASK__4, data); > +}