From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51F17C43334 for ; Wed, 20 Jul 2022 08:19:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238215AbiGTITs (ORCPT ); Wed, 20 Jul 2022 04:19:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236253AbiGTITr (ORCPT ); Wed, 20 Jul 2022 04:19:47 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5EBC6A9E7 for ; Wed, 20 Jul 2022 01:19:45 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id a5so24988847wrx.12 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=1B0QJ7AEIKVa++5gMiUgLB8n9RrRF9XfmRdCugMbF0CvTxUNDFnIWTGN3eYCqv7S/M shb/p+dJtB51d4vvoJzrztwtY9Sq0Z0c3GoPzPz+Zkq7o8A0EzHEuobQF6xpZKAmPipw gEntvGenPdEBPNXeMQSPeGWyzjniVlrfQ5sRBVAgnEryIhBdD2n7XPW4gJO864bX43bd NhBFfZ/IxMbIxSqlWJ+S8O9IAzyAV+qON1Fg0jtUHgegHChjQdCh49RUA69enQVroGck MeSxXKlDPJWAAUua2Oc9a7G02sUYQoYMcbDrnmCluPQIBa6vfBowAl3gIPzWMWz72PkT CJow== X-Gm-Message-State: AJIora9MvGd6Z5+fjtxgwyuBTfbLy7W810yhouTPDGZpmYuYLypss6/4 Tt17DimHlQ2YOKUbDrT2YomaZg== X-Google-Smtp-Source: AGRyM1tKM9yWRqu/6hb5ToXfPCjx8kO+ohEW+UULtwcZ7Bj7hyGH5XdN95owydZj/Z9UEhfe392XnQ== 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: Precedence: bulk List-ID: X-Mailing-List: devicetree@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