Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2143290rdh; Sat, 25 Nov 2023 15:46:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IE6NDnNq8uVnC14tIBr+qT77oFswPXPUTyQnFGdplITbSUq2HAlKxJKmOb3YGuy7fJL2ro7 X-Received: by 2002:a05:6808:1642:b0:3a8:6693:135d with SMTP id az2-20020a056808164200b003a86693135dmr8580620oib.49.1700955993417; Sat, 25 Nov 2023 15:46:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700955993; cv=none; d=google.com; s=arc-20160816; b=n16HUimZFgwzV98hWufyp4hR4l54TxCm2knY36lccuSnATYcbwyoUeDqzMn4ck78Td dDSJOSOB2QurpHrMT1UIDFerdqtOnTPQhwZNV+EtTpchhKCyxw1CzYNQ7TxkMwJ7FmPZ +T0iFS6d/fsdXUsB7Y7BX9dc93tYHp9OzTMs9tUFBAsLekr741T7to+WQPZ+7C9IN40G f13Q3hBUSI7UVW2tIkGtDbmolOKt9wNOq11nTS0QgUtiLTskST5lyDoEm/cqMvZvKlIq +gLY8Qq84SBuNpyCbxHVB1JZp5y9yOdpcRWm4RHs3o+gfrg1AhsQO/mepiYl/9VD5O6a SxPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=+hFIt0HmR86o9B8NpKYxKa6/Sz6hTZOcUx/vMSf/X6U=; fh=v1x1h6Lt9N60wh/tvDkXloB7804kMI2dGeQt+HfD+dY=; b=nEZ8fjLAlyjioJ1DSx0Y8qCFnC+UegubvJW5QFawcWf+W+YxdvCD1dkTBwTyVmMqgZ /dJgJcmlqBl5sBJJLZllyMS9tWthRgKzhzoxGcdjwMDXvw+rZtvo7PcE5dvHyzQ85XYa 0b4WHc6xe/oDbaGcRAk/RyPN+TlFvIiQN2X8Cu/euAM+8JMXtFRAJSZW5GSnXXkxvACh 7yX6YPtkEUkhshVaX4WK9UcZ6mdELE6PPnviSBkQdPzFudBUY5A+eqs3kryyC4h8aImH VG2oph1ffeID+afTV+0Ld46vIv2sLT3dAzUrHWy5VezAiSYBpYQfgsewWGgEb/y0Phf2 pkMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LclWgNdL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id 36-20020a630f64000000b005bdfb77e559si6730417pgp.468.2023.11.25.15.46.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 15:46:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LclWgNdL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id BDDCB80737DF; Sat, 25 Nov 2023 15:46:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229505AbjKYXqK (ORCPT + 99 others); Sat, 25 Nov 2023 18:46:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjKYXqJ (ORCPT ); Sat, 25 Nov 2023 18:46:09 -0500 Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC212F0 for ; Sat, 25 Nov 2023 15:46:15 -0800 (PST) Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-5cc5988f85eso30326737b3.2 for ; Sat, 25 Nov 2023 15:46:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700955975; x=1701560775; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+hFIt0HmR86o9B8NpKYxKa6/Sz6hTZOcUx/vMSf/X6U=; b=LclWgNdLtUgCrUPOz6lD3ZYZbcpRee6fMR/vU7nM6ALljxSs+nHiAPxhdn0PSNQZ45 /NzJnENKNul8QwZ4M1RQ7s0pimQ3Lyorza8qzPmfwh4RidoNcR7x+Y80Ej9GAuRwtAGk /d1OCBYf7mwpEB/V6QDEefCokgH5kAnZhj7uR3EN6fBiHei/FTXD7ItT9NfbkbpEuoC0 Vw7trBQZltdFgxdbJhBeHceIL8ZFrdvKP4r3VZYkEuS6dln94oMLpsCAz+mq1iO3YNfr aO0nTRHE+eQghND6Cn6/18oymsAEMKzgBRArZ9Fto2kz0mFMF8DoW2mYPEurvAVC5/bg Q0UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700955975; x=1701560775; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+hFIt0HmR86o9B8NpKYxKa6/Sz6hTZOcUx/vMSf/X6U=; b=ncoPRr1uJyqKnmqZZEhLYYySM+n7IL1QtqXm5zrtc+kvod6MTdQpmYe7WD1Wlbzb/a ZTK6+urBwnEDjLXo0dAyU8ykHCTYSVTO8OI5ETnAkH3z8WXmV4GExMFK01c22wYedY9X FR3Hif6AHLn0ah7eo/SWR7o1ztEjH+SzIpqf8TVu76F/b2yewCG2wVVq9vYH3R/RBYfd E6BbwtNn9FZD8dA1CpWKJDdOCQ9/4atphovSeIk9tGiLMak0tbx9nfJrWOnqN5tfGW7H U6kDyEvalo3a9/qxyosGdtOMDLS6KblWj5ZGfXSnODhBvDpK/2c+ZU57EoXHYtB9c0dH azGg== X-Gm-Message-State: AOJu0YyzDIqxTdeooueoVTPWQnGqOK57RBegqsC4hs24jC4i8RcCMQJ6 yU6K87GQ6pNhCxrb0BNDT7xZ38xSAzW51gf51D4GNg== X-Received: by 2002:a0d:fcc2:0:b0:59f:b0d9:5df2 with SMTP id m185-20020a0dfcc2000000b0059fb0d95df2mr8159218ywf.0.1700955974890; Sat, 25 Nov 2023 15:46:14 -0800 (PST) MIME-Version: 1.0 References: <20231123-mv88e6xxx-leds-v1-1-3c379b3d23fb@linaro.org> In-Reply-To: From: Linus Walleij Date: Sun, 26 Nov 2023 00:46:03 +0100 Message-ID: Subject: Re: [PATCH RFC] net: dsa: mv88e6xxx: Support LED control To: Andrew Lunn Cc: Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Christian Marangi , Tim Harvey , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sat, 25 Nov 2023 15:46:30 -0800 (PST) On Thu, Nov 23, 2023 at 5:13=E2=80=AFPM Andrew Lunn wrote: > What i would really like to see happen is that the DSA core handles > the registration of the LEDs, similar to how phylib does. The DT > binding should be identical for all DSA devices, so there is no need > for each driver to do its own parsing. > > There are some WIP patches at > > https://github.com/lunn/linux.git leds-offload-support-reduced-auto-netde= v > > which implement this. Feel free to make use of them. Oh it's quite a lot of patches, I really cannot drive that because there ar= e so many things about them that I don't understand the thinking behind... But I like what I see! While I defined the bits a bit differently, some of it looks similar enough= . > > +/* Entries are listed in selector order */ > > +static const struct mv88e6xxx_led_hwconfig mv88e6xxx_led_hwconfigs[] = =3D { > > You need to be careful with naming. These are probably specific to the > 6352. Different switches probably have different capabilities. So it > would be good to have the names reflect the switch family they are > valid for. OK I'll try to name them like such. > When we come to add support for other switch families, i wounder how > tables like this scale. Is there some things which can be shared, if > we break the table up? I need to check the data sheets. We will see I guess. It falls back to the whole question of whether supporting all variants in a single module is even scaling. So far it does I guess? One day the MV88E6xxx may need to be broken into submodules. Yours, Linus Walleij