Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp38457750rwd; Wed, 12 Jul 2023 07:59:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlFqDwZFVWc0EIkYCk/uNAbgTTNwIx3IUO3XNawJ/2nDG/G5zDS3otKSjBuZ6S2WLQNLpxgl X-Received: by 2002:a17:906:7313:b0:974:c32c:b485 with SMTP id di19-20020a170906731300b00974c32cb485mr21799023ejc.45.1689173967277; Wed, 12 Jul 2023 07:59:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689173967; cv=none; d=google.com; s=arc-20160816; b=FqwGQiq7osoaVvlVIzKOAo1doI7qEF8z6AotaSySfre3YGQbXhntrjZL9EZFalJ6Rj SHPa+XyfOkFdQtmJh0shIESTMKmj/lf0nkw31+xp4J9ttyY5gbHP4iLYXJF5/8cjKt/Y sMsOCuBfCmrulvlPd+65XMvTw93kPhfXGhJZegy8L6wWJhOnQSivjniF9i0AGaw7hGmg dKgnYJXxmgkD70dAhtQAHb/FUpxdiaHICH8t6tW7nL8uQRLb/PbJf6q/TCAU7Jw25KYi 6hWomxWI3Wbo/0NEWduDtYtqHEXG25BVo1T/PP16w1nlBmZ5UsJ/qGMcqeeHE0jRa+BL GKQg== 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=BINkZ1i4PKbO0+fsSVwUWsXVzisxjT4/2QKSssOySGM=; fh=8DGrid4eYYRrTER9mRazoCCJ0zdtyqaYK11bVh9OgfY=; b=OfmT0Ex5C2AgEAAMN2BwN4LUZbUaDtlcd+20ZcTlOzwotROFkwUuahqT7Tnoupsz3d xxtdIs1PlcQNiK7foH1GF+DtcJsSH5Sr6U6hQoLfvdveQ9eNIt4pCYHDhHxx9RowX6Ex WHns4ussow4RXoTZfhl4Ra6PDL/Aq6CXlKc5WVyQOs5xuFIWrP5TcyYSuUFsql4lis38 dpKFFBZsgvY77nhB1CttJmEwHK6bUxndV9xLI0HSoukkS+bZpRSyTRvK31onGF+u/9Ym LuQ3TVBAuu2t9PdJYHpjQ7dOdMbMEpOLmilU7ZzmiU9NKU5lKLtpGrBz16kUchOskpcz 8qHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=QFjAs1Wz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d26-20020a17090694da00b009936afb1e23si4461857ejy.130.2023.07.12.07.59.02; Wed, 12 Jul 2023 07:59:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=QFjAs1Wz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231578AbjGLOz7 (ORCPT + 99 others); Wed, 12 Jul 2023 10:55:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231460AbjGLOz5 (ORCPT ); Wed, 12 Jul 2023 10:55:57 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF2A7BB; Wed, 12 Jul 2023 07:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=BINkZ1i4PKbO0+fsSVwUWsXVzisxjT4/2QKSssOySGM=; b=QFjAs1WzTxEUF8chDYKA9DlGDT sJN8HV/wvVUFJ/zD7PJtGdfq1i92ZgHRlm5fg55/irDCuSja/uKzralkXH7VLBsgLEZmnQe4zgYlU lN19WBy4XwBfRdY19J53pq29mtBpk2kvNWYzpny1Epr9p1/GdmI8IsU8isimR/DqV40A=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qJbFo-0019Hu-Gx; Wed, 12 Jul 2023 16:55:44 +0200 Date: Wed, 12 Jul 2023 16:55:44 +0200 From: Andrew Lunn To: Christian Marangi Cc: Colin Foster , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, Linus Walleij , UNGLinuxDriver@microchip.com, Daniel Machon , Steen Hegelund , Lars Povlsen , Florian Fainelli , Vladimir Oltean Subject: Re: [RFC RESEND v1 pinctrl-next 0/1] add blink and activity functions to SGPIO Message-ID: <39b297b0-5266-4f4b-ade6-8ccb95e90411@lunn.ch> References: <20230712022250.2319557-1-colin.foster@in-advantage.com> <64ae73ce.050a0220.fe1a6.4b8a@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <64ae73ce.050a0220.fe1a6.4b8a@mx.google.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 12, 2023 at 03:59:10AM +0200, Christian Marangi wrote: > On Tue, Jul 11, 2023 at 07:22:49PM -0700, Colin Foster wrote: > > Preface (new for resend): > > > > This is a resend of a patch I'd sent a couple years back. At that time, > > I was told to wait for hardware-offloaded LEDS. It looks like that time > > has finally come, so I've changed this from PATCH down to an RFC to make > > sure this is the right approach for the framework. > > > > Ocelot chips (VSC7511, VSC7512, VSC7513, VSC7514) have support for > > hardware-offloaded LEDs based on network activity. This is currenty > > managed by way of pinctrl-microchip-sgpio (and this current patch). > > > > The purpose of this resend is two-fold. First, to come up with an idea > > of how this pinctrl-microchip-sgpio module can fit in with the new > > hardware-offloaded netdev triggers Christian Marangi recently added. Is > > this something that should be in the pinctrl module itself? Or should > > there be a drivers/net/ethernet/mscc/ocelot_leds.c module that I should > > add? > > > > I'm a bit out of the loop on what magic OEM did to make LED work on > ocelot but I feel an ocelot_leds submodule is needed. > > To correctly supports the hw many API needs to be defined and for switch > I would stick with how things are done with qca8k, codewise and DT wise > (with how LEDs are defined in DT) > > Ideally the feature for MAC will be generilized and added to the DSA ops > struct, so having things in the DSA driver would make the migration > easier. `ocelot` is a bit of an odd device, since it is both a DSA device for felix and seville and a pure switchdev device for ocelot. You need some integration with the switch driver, because i expect only the switch driver has the knowledge of how LEDs are mapped to struct netdev and ports. And in order to offload blinking you need that mapping. I have some WIP patches to add a generalized DSA interface for LEDs, and support for mv88e6xxx. I would also like to move qca8k over to that. So it could be that felix and seville would use that. Ocelot would need to do it slightly different, but i expect it is just a layer on top of some shared code, much like the rest of ocelot. Having pinmux in the middle is interesting. I've no idea how that will work, but i've not looked at it. Andrew