Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp51994rwp; Wed, 12 Jul 2023 09:32:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlFb2EqUoEvArVy2W7DM5FWAgJdw9waDMtq2KGP51qPWVTRLkiikiVq70dw/C3KF1Cz3I9XM X-Received: by 2002:a5d:63cc:0:b0:313:f18d:1f2c with SMTP id c12-20020a5d63cc000000b00313f18d1f2cmr18924985wrw.38.1689179523181; Wed, 12 Jul 2023 09:32:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689179523; cv=pass; d=google.com; s=arc-20160816; b=kf7hB+C7rMayeXSBV4L0pi7bpMMh6KTzEFpVPHYYiTsBqPXzUet1QWKuGkKX4b3hJU Ma5iU6x+W42e80EvfVsAdcyji6z2W31dKG/N6KwIEOKLNKJKKTv6zScSUpHewDwZCXRD dJjqWohWEMgTEK7GSIFtoFQt/D3WgvDQ0iVYuZuAm07lStJAU2/9reiJ8LUnpDj7NZq1 bXTXKDUx9x2ErCpngAkZLGzLtJ+3UQ2cbgmhRarBH2mmnq2fr4aphKRd0VDJVa3kuoLW knJ9Ka38Fmfw8u01LNSFQgcas8X0znWTfx3tHa0ONOWOf5/FMh1cxpBMxQB/eov+4Tfr UaAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MTw6IRD3xSiG5WMxt5smunU2lDoy2dUyZLPdLMagCUM=; fh=XO/xH5O29kAdCQDN6j/iJu/nuOyI8x47Duf5uNQzPSM=; b=cI51JPWqZyCjaP4vovUQzFWnqvMLeno3g1HVzw8kV67WCLFUHLGrphsgg35ObL1vzM tmvJ8HpK7T7717xf/rk/6cyFEohN5JACTyhl9SswkDP4rjZFMnAiqhZXmSfjVggQ0ZsY JLbL7nzOeRIJae17U/11UAynEfcmjK4JJjeWUhbz9yGPnw5penqXca5jNQdeCfM4eg4K 5IRz9IRFGRJAW6zqxllD/Sy0oaQEwM1yn+7Xyq6QBl2SQ+wor8WvAbk4ysTO6UPBbGDJ IUmKfltN2RiLxiaQQOQFJxSYv/7ujZSX+fVBgOJMxAO/HuWu/n754oqw3UoRUk0Y5YdW KsiA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=H5em6qWP; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a4-20020a17090680c400b00992fef5cff9si4225270ejx.497.2023.07.12.09.31.38; Wed, 12 Jul 2023 09:32:03 -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=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=H5em6qWP; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233714AbjGLPic (ORCPT + 99 others); Wed, 12 Jul 2023 11:38:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233706AbjGLPia (ORCPT ); Wed, 12 Jul 2023 11:38:30 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2121.outbound.protection.outlook.com [40.107.243.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 715B11BD5; Wed, 12 Jul 2023 08:38:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bXQhAvYr7cfydhS2DCn2rWq9PW7YjcZSaPfd/dZKpld32smwTW+T+TanNMvYduxB+qrLhGAicK/jHZJ4yFqgg3NHlYFcoIN+0OO33StrBfmmgp2fcGdssQgC/AgtX7/Bd4g+9thZr2uGBNlFNlg602Qg3OHZQJ8ntD8Iz5lSuFHr7z8kwWjzkejC87YWiVQT3zF1jx81YwvEK8d8rE5gGLDrw2sOZziCLGc1V0mA6ybuNpRsJai0R4h1asM8Le2m71org6TM/Vs/f4SmO2uxWJMiojXJi1zZ7q7XvouMkIVsLaLvysFuHYaNWEQzxISxXjmBo5ed7O6kFrNCCxcUEQ== 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=MTw6IRD3xSiG5WMxt5smunU2lDoy2dUyZLPdLMagCUM=; b=NYgOlYzbe2Uj8ZzE+qmPoWeP8Z6ku3bULdedEORlNCNOjrvu1iaFpK1Y7FzOwtYt7r6fg/GDiS/8Qt/42/f0wCAwvLseol8YYgfXgA3cqOYTpUIGjE/6s8cKfX/LckxHzod6DdumD+8gAm5tVsV8ZMd+ICmkudmFhizAO11sR3KGP3t3li+oknOszIsGiOuU5rscFHjnMf5lFD4WNxK8qjfs5w/aXOkROIp4zpOE1b7cZfN2FtfWGTJU6cxzgIg6D+lqjxvYqn9P8ieDo5f7SKF/2DfAV6mTeUtGsNsvxz1dNoqjVivi16oHq+McngkLaQQQBSAEShb8I6UE9wJgUg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MTw6IRD3xSiG5WMxt5smunU2lDoy2dUyZLPdLMagCUM=; b=H5em6qWPO5QaHZBE3Rul4JX5mYOF4h/5fC1v8H2TcopuppzwRvXrTIjt/XEasu98grA5phwhLezz5O8rws/BFQ0tdBLS1Ys9hDz4PAwIbPmNeZruZbVqhuv5EFiUqI6clgOoUXU0F2if5cwhc8AP0FyOqKb0opxP+fWYEd00Mn8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by PH7PR10MB6484.namprd10.prod.outlook.com (2603:10b6:510:1ef::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Wed, 12 Jul 2023 15:38:22 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::f575:8f7d:c91:5078]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::f575:8f7d:c91:5078%6]) with mapi id 15.20.6588.017; Wed, 12 Jul 2023 15:38:22 +0000 Date: Wed, 12 Jul 2023 08:38:16 -0700 From: Colin Foster To: Andrew Lunn Cc: Christian Marangi , 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: References: <20230712022250.2319557-1-colin.foster@in-advantage.com> <64ae73ce.050a0220.fe1a6.4b8a@mx.google.com> <39b297b0-5266-4f4b-ade6-8ccb95e90411@lunn.ch> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <39b297b0-5266-4f4b-ade6-8ccb95e90411@lunn.ch> X-ClientProxiedBy: SJ0PR03CA0135.namprd03.prod.outlook.com (2603:10b6:a03:33c::20) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2351:EE_|PH7PR10MB6484:EE_ X-MS-Office365-Filtering-Correlation-Id: 0420b603-fa00-46c3-3f03-08db82ee05e5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T42nY1xeI6S3NkdKsTqWMEHkR2qksYwcUg5wRAxrnNMen+QBFAm3F5QEi3ArgloX/HROeJPgAxTE7glmEYtpywhjPnFi/I75N+p4moycEsSJ7FTN4N6hmbByKtjIjfOoEr2r3S8mjxwMR6J2ptrhHnkjCdzQcn0mpF0kLgxhdin3SrXnfLeoyLnv/6p6OUySAUFoX2hiAUmMoWFW6qxtwS6Cj+EiR/vNX7pwOzhbtZlAaSDAcsh5PWQMrZbeoVQk54BTOOjccB6HrYXpN2WoFnTnCIwWChAiBP8O0P6j3do4HBWXwbKdUyizy8+/hHCp4mDr+pn7xpPMK6k0b/ZJZ7Z7ovefpgjXx4ji/NtcmA3SaCSdGmbVlqqLXE4QDQd58L6yQ60WrMJRU6eXWIBiDgNeCMuCrEbQtgayPLVzUxT4kazo7EwlVNkxz5QkxXKO7lVEAZBm7cluRJIVkNJkVSUywlnFnnaW6gj0/bEAf7DzdNLrckn58AhnjN+UIzT3x3EzrZ0NYeBa+E96nw5HFvD6DlX6AuxtJxumq7m1utzsD2uOCF+TytEXjRALxcik X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(7916004)(376002)(136003)(366004)(346002)(396003)(39840400004)(451199021)(66899021)(478600001)(6486002)(6666004)(54906003)(83380400001)(86362001)(2906002)(66946007)(33716001)(186003)(6506007)(9686003)(6512007)(38100700002)(8676002)(26005)(316002)(4326008)(66476007)(5660300002)(8936002)(66556008)(6916009)(41300700001)(44832011)(7416002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?hloRw0xzmxozY4RiYLGKUzXeAnnNNsQcW6aVmZ2Y53nZ7r7pz1q8VB9djBAH?= =?us-ascii?Q?wjjCOUeIxHtXZHsC6NpjIwUvrTar0FNZSSufN0phzfuovbv3VEmRh1v41S9X?= =?us-ascii?Q?XJ1XfmR23Sq1ovEosLAd1C3egh7ICYsoDOoVwzbxtmo97L4/oUoAWGDMmZbk?= =?us-ascii?Q?g1VQdjDgdtEzcDC21Dk8DBthdY/cNsIl9ox1RArIo/XDUlaHypRUz+AvWNGY?= =?us-ascii?Q?EDPRxYsktYoEJRpYu+zyKrFYQzQpeB9AXYU/NdQcpX3SKxRx7IKCToxD0vzs?= =?us-ascii?Q?hOj1ABFbxvxOMcI9VdOl//jGrvTvwkGw7sUBxmpVZHSCCDs0/XDpdSldu3JS?= =?us-ascii?Q?8THltZDNsej6twBMqtpJa+xOxYf6cOg8NFbRaDSzB/M4bQlJIPy5OP5Mwkm1?= =?us-ascii?Q?QHtGCGRjVdYD0s4xaOmz6DsDMvuVsFeUzzipHtxpjW1Qoip9fs4R7NgSVGUY?= =?us-ascii?Q?FWZ2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xsCMBWZLsCX?= =?us-ascii?Q?h+ukV4ki+IhOK+z4m1UcO7aBnGqMLqb8dsNNMBD6fqmTXIiqovFM7G3WhCrx?= =?us-ascii?Q?uYpvc8T76hGJz/d2VnPeTNJk2Jt/H2QMUCljT3cIQl8/+r2IlHkottp9QArV?= =?us-ascii?Q?zgo4SLq1vEOXkc8hn35cXyAzuMFUlE7ieZtfYwXm2wyeWH1vC28g78zKzVVR?= =?us-ascii?Q?cbvEUEluwi9YCze10RJWb0RKiytKPchTmjyUQsg/JkhWnfty5Wr7kPytwtBz?= =?us-ascii?Q?0w=3D=3D?= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0420b603-fa00-46c3-3f03-08db82ee05e5 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 15:38:22.0716 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zwJW08vKAipCsBvaX1uzFOzhy1lZxtJHk2tq3ZJrgdOixwM5gjC9dmq7vX9Wx1FZql87bz/smo9fH9Ex6mYRMjbvNKtV6M6nVexTUzsQWi0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6484 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi Andrew and Christian, On Wed, Jul 12, 2023 at 04:55:44PM +0200, Andrew Lunn wrote: > 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. The configuration is basically SPI to an GPIO expander. The ocelot chip fully manages the SPI bus. > > > > 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. Now you tell me :-) > > 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. Based on this comment, I might sit on the sidelines for a couple more cycles. > > Having pinmux in the middle is interesting. I've no idea how that will > work, but i've not looked at it. Yeah, I'm not exactly sure either. And integration with the switch driver will be interesting to say the least. I don't know if Felix / Seville have this capability (probably not). I'll keep all this on the back of my mind. It seems like there will definitely be some subtleties in any way. I figure it is better to bring up the concept earlier than later, so thanks for the feedback! > > Andrew