Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp387422rwi; Mon, 31 Oct 2022 02:44:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5+VPPH2gPr/Iz0CtVyK5mqPBOqb9CYQt8ufhGd1FedSPXvnLYFhT6QLMwa+sQj9kjDFyF9 X-Received: by 2002:a17:906:7944:b0:73c:838:ac3d with SMTP id l4-20020a170906794400b0073c0838ac3dmr11916980ejo.242.1667209471371; Mon, 31 Oct 2022 02:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667209471; cv=none; d=google.com; s=arc-20160816; b=it17iOpQnxaPrsF89lm73aZTmIV9GKn9afhK98xhgI2wRtbTHq1Z3r7WTdYN+pw9cZ pR+Xp2NY23bp5MUnu9+pGGCcQcTXN6BBa+oI0LyWMu9yqf3efC1mS93BRfX5SpAvYivl L1D5NKI2ckArTbFrP+FmRa8BHE1z3n4imLh0ZudmdSZ4dozj0xHP9fugFzv89xK02gmn yNsINMO3h5ohJWDTLbegIIPX0Ub+P9WJC2RHj/DbQThgvJAvNtRJM+3J2EaH/Bg+Rt4/ orNLVGtDMbpFTygGYnPgKTRw71mTcLNFbUN0xUey2QIPJZ1sQ/0a/litWDb5uclsLLTo wE0g== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=o7+2kRnAp/YuTGCqJ3wFlKN9NcwbPbK7tK+udVoUYls=; b=zO7V10uo9yueqbtNqDGqlWSA9Nx0G2NN5TJSmggyPVl/n2to+oZPfBfu3UngugfZvR tR5Sa9JjwawD85IKLTJ+/u/twHWlUBrUcEfPxZU/RUC2JY1wX+DknQllhObas7i+7q0J pfx4gDHksldDWeQG5cyVdwvSQQ0S5fZz9ORVhLu+xcbRpdO1sNbQ4Dr1Gv1yiduRwUL9 /Jwto8WocGHlkpEF2uh25U+Nw89wdWYPShkzzTlLuwfE/j05Qeec+o+LtZCicBf8EveJ I7ghfXTzFKQAJ4mbKHGDsIPR1SVCCN9uS8JrNqrE3Fq4wLgys2UNIqT8FmRGRg9fULDl 3/nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CilgLNxM; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd30-20020a170907629e00b0078d2848bca9si7911485ejc.704.2022.10.31.02.44.07; Mon, 31 Oct 2022 02:44:31 -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=@kernel.org header.s=k20201202 header.b=CilgLNxM; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230259AbiJaJfP (ORCPT + 99 others); Mon, 31 Oct 2022 05:35:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbiJaJfM (ORCPT ); Mon, 31 Oct 2022 05:35:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 890B46353; Mon, 31 Oct 2022 02:35:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 38AA8B8133A; Mon, 31 Oct 2022 09:35:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 233A8C43470; Mon, 31 Oct 2022 09:35:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667208908; bh=IzjdJvJoYXUsl9z05KFgJWsGxn4+PzgaGUgkMQtF2zU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CilgLNxMqlIsiOz8YJhBdKUZDEvjiQH9oUgaCv4ADWHQ6JnyBsFFVMqOE4y1bt3QY Dadygk4vA3yniWmt9ardJvt0jHxcGi2VxnsxLKqyCSDljOBNoBMOu6sngn0taHim9e SAS/rTtcBM6rnSC3nNK634YR6va0seVSbVxaspD4LHuQvI6KUAinmq+mzqSOSVziQh ja3Z2UWJoi+dcZGsNaQjozhp5Fdp7W4xP/I2bcTbJkQkazoHkF5j4ELoKyVjfRjNMf D4jMbu5aBYd1NdC6YG5b7CvzHcyqQ975+Voo5vStfLLs71AzzRKnUdDWr8dNtvmsNN OjlnZ4P/UvIBg== Date: Mon, 31 Oct 2022 09:35:01 +0000 From: Lee Jones To: Colin Foster Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Russell King , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Vladimir Oltean , Florian Fainelli , Vivien Didelot , Andrew Lunn , Krzysztof Kozlowski , Rob Herring Subject: Re: [RFC v4 net-next 12/17] mfd: ocelot: add shared resource names for switch functionality Message-ID: References: <20221008185152.2411007-1-colin.foster@in-advantage.com> <20221008185152.2411007-13-colin.foster@in-advantage.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221008185152.2411007-13-colin.foster@in-advantage.com> X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Sat, 08 Oct 2022, Colin Foster wrote: > The switch portion of the Ocelot chip relies on several resources. Define > the resource names here, so they can be referenced by both the switch > driver and the MFD. > > Signed-off-by: Colin Foster > --- > > v4 > * New patch. Previous versions had entire structures shared, > this only requires that the names be shared. > > --- > include/linux/mfd/ocelot.h | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/include/linux/mfd/ocelot.h b/include/linux/mfd/ocelot.h > index dd72073d2d4f..b80f2f5ff1d6 100644 > --- a/include/linux/mfd/ocelot.h > +++ b/include/linux/mfd/ocelot.h > @@ -13,6 +13,15 @@ > > struct resource; > > +#define OCELOT_RES_NAME_ANA "ana" > +#define OCELOT_RES_NAME_QS "qs" > +#define OCELOT_RES_NAME_QSYS "qsys" > +#define OCELOT_RES_NAME_REW "rew" > +#define OCELOT_RES_NAME_SYS "sys" > +#define OCELOT_RES_NAME_S0 "s0" > +#define OCELOT_RES_NAME_S1 "s1" > +#define OCELOT_RES_NAME_S2 "s2" I've never been a fan of defining name strings. The end of the define name is identical to the resource names. This also makes grepping that much harder for little gain. -- Lee Jones [李琼斯]