Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5240873imw; Wed, 20 Jul 2022 01:40:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vrRta6jJdSa6duVv30irt9C1MW1ykhlphNoL4efrE/uvSdf/AqwG6lUCwjd4hjp1NMGvxF X-Received: by 2002:a17:90a:e7d1:b0:1f0:2304:f57f with SMTP id kb17-20020a17090ae7d100b001f02304f57fmr4145744pjb.133.1658306406123; Wed, 20 Jul 2022 01:40:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658306406; cv=none; d=google.com; s=arc-20160816; b=MzIr6nSpYp1IHfGSmWnS4u1S10W9QwUNFZZwIupqq56fFr737MIoO7N38LGzGYgaXI OmHTJdCrGcWnhR20N/dk3NfdA2CLSgvdbHdeK+hYXWARXorfgVD+05ZNoVss1a+eLB7O pXLXqsTFUQRUX9X+ZOszaRXy9mWPUcqU45BvE6zA7KN1G0iP14FA8Epps2NAIkEfd4G9 m/wLvflj0Zm18wYMqM6GWp+JpwT+/l0VUC6X2uRnjmGEQhRx50SsJITWaJd9oSAjtaR9 gGOdfQ5w9tiaiG9wqLyRCfJWJODzt4h4Y4a2cgPw65zh62sqRgdkzpkmIOHGAWt+K+Hd +yZw== 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=H3cfWCLBlBYx1Erw4k3ViEzQD+OSmuEO+WWt3HWcPoA=; b=Uw3cRmKg1ilqp3/UABxWiT7iXi08V/Ed2iMasp1ZeWWJOZVCwFQROMTApoA+3WdToP gAaYFDI7oSHNAopYexKIl5t/l45TjnDVOn1OBYn7QxJFT9keUix2fYbM2ezAcydtjISq m6PklzS+1NTlL6EVBiPZOHikGNn1yeRkGZG2dOKIaYzFq0CkhFcBJIlNb6CuL5eVd/o8 g+IcAVunDuRFzuJ2SwBUVm20xF99DO6wsm+46ThNBG1S798CxiONZ891t5L7yJwJhFbW yzLp/+a8qicRxFMDWa6nwjhV7i2JUN4DAtVN2edVFrb8vpRDuWp8XJYWKHQeaq+neJWZ eKnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rR6JZ+S7; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020a170902cf0400b0016bdd7a58e1si21786054plg.154.2022.07.20.01.39.50; Wed, 20 Jul 2022 01:40:06 -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=@linaro.org header.s=google header.b=rR6JZ+S7; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232647AbiGTITt (ORCPT + 99 others); Wed, 20 Jul 2022 04:19:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237547AbiGTITr (ORCPT ); Wed, 20 Jul 2022 04:19:47 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD5F069F0E for ; Wed, 20 Jul 2022 01:19:45 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id z12so25032642wrq.7 for ; Wed, 20 Jul 2022 01:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=H3cfWCLBlBYx1Erw4k3ViEzQD+OSmuEO+WWt3HWcPoA=; b=rR6JZ+S7IixgYfovd+L1INMwl+54Px8Y0e+3XmVtikQZpCf5s9gkH9XepDR74CWKOZ 9JLTcSPGceYWc1eOO1jx2oXTj8YqOvqS+wG9p4hW9xU9asnbOrl0muhhwwYVM34sKjyS rGNKO6m3k8yyWwgDgA44/wk7ypQ69ZOBiVbJOXplDd3cyZ4R2JYioguX7H/tVjlI2fGM q7p8VdQq0WofPlTG8vZcUCZqagSXzBP8TgIbaBoy52M3B4BtUM57AKJhWQroXQr2u/Ik Q2rYGF/IHqCPOuX/qRNGSq9ICsXBurc2g1nYPIlCV4spj2cX1em/XfRo3bW2bZ0s+rWq tK5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=H3cfWCLBlBYx1Erw4k3ViEzQD+OSmuEO+WWt3HWcPoA=; b=aE/I9XWIWn8KN9lfh6lbLpOTCbUYTjGuTF2oEsjGjWzShNY6wsEzW5S270TkaDOYUI opzIIrJMpVKaxpUBtTAifiH7EWCEiBY9z/Na7oWzSguw4n8IeRtj9U8ou2TeG71qAm8u Q1PH8B/rgnUvcnCvUQ9GUqXpFyRp2SN4USCCKYgwbyTsvVD/kr0S4GJess09JDnXLl5f 0icCQ07i5eQ23gjhOB46fiE4aZNb6kG/HFQDW/EDXVE5D/NPAxEITc4RWMyyyFemxpuU CtHcgG+bdzcVNSrDncTFKxsPRJhWlHpbCxtHh+ygN8SP2Ofk6YE86vJ0hTlir4wD0D3R V5Ew== X-Gm-Message-State: AJIora9wII2h6rknBsFNEksrcfQ4bYSRrAf2rwg+k/cLUX/etK3DAquf kAwz+uvzsmpN1uBKhvuGkDJnWA== X-Received: by 2002:a5d:64c8:0:b0:21d:9873:bbf0 with SMTP id f8-20020a5d64c8000000b0021d9873bbf0mr29529081wri.150.1658305184429; Wed, 20 Jul 2022 01:19:44 -0700 (PDT) Received: from google.com (cpc155339-bagu17-2-0-cust87.1-3.cable.virginm.net. [86.27.177.88]) by smtp.gmail.com with ESMTPSA id bg42-20020a05600c3caa00b003a31b79dc0esm8936892wmb.1.2022.07.20.01.19.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 01:19:43 -0700 (PDT) Date: Wed, 20 Jul 2022 09:19:41 +0100 From: Lee Jones To: Colin Foster Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, Vladimir Oltean , Rob Herring , Krzysztof Kozlowski , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lars Povlsen , Steen Hegelund , UNGLinuxDriver@microchip.com, Linus Walleij , Wolfram Sang , Terry Bowman , Andy Shevchenko , katie.morris@in-advantage.com Subject: Re: [PATCH v13 net-next 9/9] mfd: ocelot: add support for the vsc7512 chip via spi Message-ID: References: <20220705204743.3224692-1-colin.foster@in-advantage.com> <20220705204743.3224692-10-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: 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_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Tue, 19 Jul 2022, Colin Foster wrote: > On Mon, Jul 18, 2022 at 03:18:28PM +0100, Lee Jones wrote: > > On Tue, 05 Jul 2022, Colin Foster wrote: > > > > > +MODULE_IMPORT_NS(MFD_OCELOT_SPI); > > > diff --git a/drivers/mfd/ocelot-spi.c b/drivers/mfd/ocelot-spi.c > > > new file mode 100644 > > > index 000000000000..0c1c5215c706 > > > --- /dev/null > > > +++ b/drivers/mfd/ocelot-spi.c > > > @@ -0,0 +1,317 @@ > > > +// SPDX-License-Identifier: (GPL-2.0 OR MIT) > > > +/* > > > + * SPI core driver for the Ocelot chip family. > > > + * > > > + * This driver will handle everything necessary to allow for communication over > > > + * SPI to the VSC7511, VSC7512, VSC7513 and VSC7514 chips. The main functions > > > + * are to prepare the chip's SPI interface for a specific bus speed, and a host > > > + * processor's endianness. This will create and distribute regmaps for any > > > + * children. > > > + * > > > + * Copyright 2021, 2022 Innovative Advantage Inc. > > > + * > > > + * Author: Colin Foster > > > + */ > > > + > > > +#include > > > +#include > > > +#include > > > +#include > > > +#include > > > + > > > +#include > > > + > > > +#include "ocelot.h" > > > + > > > +#define REG_DEV_CPUORG_IF_CTRL 0x0000 > > > +#define REG_DEV_CPUORG_IF_CFGSTAT 0x0004 > > > + > > > +#define CFGSTAT_IF_NUM_VCORE (0 << 24) > > > +#define CFGSTAT_IF_NUM_VRAP (1 << 24) > > > +#define CFGSTAT_IF_NUM_SI (2 << 24) > > > +#define CFGSTAT_IF_NUM_MIIM (3 << 24) > > > + > > > +#define VSC7512_DEVCPU_ORG_RES_START 0x71000000 > > > +#define VSC7512_DEVCPU_ORG_RES_SIZE 0x38 > > > + > > > +#define VSC7512_CHIP_REGS_RES_START 0x71070000 > > > +#define VSC7512_CHIP_REGS_RES_SIZE 0x14 > > > + > > > +struct spi_device; > > > > Why not just #include? > > I mis-understood this to mean drivers/mfd/ocelot-spi.c when it meant > drivers/mfd/ocelot.h. Thanks. > > https://patchwork.kernel.org/project/netdevbpf/patch/20220701192609.3970317-10-colin.foster@in-advantage.com/#24921057 > > """ > You missed a lot of forward declarations that are used in this file. > > Like > > struct spi_device; > """ spi_device is used in *this* file. You should explicitly add the include file. -- Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog