Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5603231rwd; Wed, 24 May 2023 04:25:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5g7c6bXrxI2Hew5wRIUo2/0Q6M15PHyNLaj0CDH7dsEy9DsUyfeeWs1myajsx6Im71Wzzg X-Received: by 2002:a05:6a20:3c87:b0:10b:b9b3:3c9d with SMTP id b7-20020a056a203c8700b0010bb9b33c9dmr10426015pzj.49.1684927532781; Wed, 24 May 2023 04:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684927532; cv=none; d=google.com; s=arc-20160816; b=uExdvdI56WRdzS6mAH361UFEwZRXinL/N9mzq2+z022XzyVhVDYISm7V+jRnCxsyz1 URehSjTljOxAAvEZvT2o8/kXCk869h3XkLOzoxU1lLso/R47fQmqHmJFNffD5OW40LQv 9PN8WMsGNdOAsG1sGEBIAwMzR9C4zxuYih9EqYVQfoP5/tBb7yC07rd5eq3V2uVKk/vy MLRWTh7/ASG7wrONhvnejhJ2mjdDzplYle747EoyogYO7HKDjjv1AQVyfyseWByx8AI4 fyxBJ9/oDmQ5TtFrJaTB7rAJ5/AHC3gtw4VJsOfUT8Ybe/rrh7cKuNnVmgK8fAb6pkEd hD4g== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XoQFJmkKfwgmsrJJEGq4Qu9as50JmMOn5lMOLqmC2QQ=; b=ICpVm+d9cxBInLpWvP4M9GP7vgqiQuaQN1Ry60Ay2L5k/Esyxa6ots7vJ6qKWQ6XZG T0MVhHGtz8LlNCYAQtHf4sJfyd8/NIJK8BA29xBoTqJXr/OLq44pYFad0qbUAAMHbKL4 1QY8UMvqJ3AVTG69XWnfqO9etX51WI8IeQRvqGEqQY05zOA5BYGcUUiBrtTduDQ0ha2I QCJV9v/EzHd9bJZmLQOLBS6bmZnVdQrCO2ZNExoEOYM4LKRcWmBQ+U49YMjM3Xke7KWD ujc4z/S0yG0MJhPf63pupmleW2EtKiHoopWysvj/hQkxlmdIrpX6auYSd3lTCPEQ8RcC kBmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="uw7G/dz0"; 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 d64-20020a633643000000b00519b9bfd43dsi2344179pga.480.2023.05.24.04.25.18; Wed, 24 May 2023 04:25:32 -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="uw7G/dz0"; 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 S233249AbjEXKUo (ORCPT + 99 others); Wed, 24 May 2023 06:20:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233871AbjEXKUF (ORCPT ); Wed, 24 May 2023 06:20:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 751D3E63; Wed, 24 May 2023 03:19:16 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 09B2E63244; Wed, 24 May 2023 10:19:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 164C8C433EF; Wed, 24 May 2023 10:19:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684923555; bh=MtWBtQ6aAoXyFoAVZRww941etajSf0Pwbm9hhrT6pfI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uw7G/dz0llS7lUVaJS3D/WIC2fhIKJtExPpIgjQ39YeXVmiLGXkU5Ri0nDd/oRAjX MbO1fPei28wWMNb9S2cN6YRwWJozrzW0pUWKG6EXbQRR2uY6O+5VNA1t/EiVPn++UV 5EmwX1oe+gLkciKaBdnNVa/u9LcGxIyyYqIea6XpMNNVKmQrneaI2dSx/kPnnx4Ijm LUq1nUZ+8BGqp9oTCjq7GJ6LDCVC5pYolCKy5f9f2Vx03Ih5qSsQmkQeyA/C6UdNTu w9xjsQ2IquFlRofxLlUSpf2XJ9F9nk6lxXhugYHyLVHbqHDGawytYtkrbtYvg9SMMX h5YfmNsf8cfYA== Date: Wed, 24 May 2023 11:19:09 +0100 From: Mark Brown To: Andy Shevchenko Cc: zhuyinbo , Rob Herring , Krzysztof Kozlowski , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jianmin Lv , wanghongliang@loongson.cn, Liu Peibao , loongson-kernel@lists.loongnix.cn Subject: Re: [PATCH v11 2/2] spi: loongson: add bus driver for the loongson spi controller Message-ID: <39e99d0b-9a5a-446d-aed7-efee21216ec1@sirena.org.uk> References: <20230522071030.5193-1-zhuyinbo@loongson.cn> <20230522071030.5193-3-zhuyinbo@loongson.cn> <35b0500c-d7fe-6479-eeff-d45bbf9a9426@loongson.cn> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Xqg6i+1FCvZAy4Oy" Content-Disposition: inline In-Reply-To: X-Cookie: You will be divorced within a year. X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 --Xqg6i+1FCvZAy4Oy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 24, 2023 at 11:42:34AM +0300, Andy Shevchenko wrote: > On Wed, May 24, 2023 at 10:52=E2=80=AFAM zhuyinbo = wrote: > > >> +#define LOONGSON_SPI_SPCR_REG 0x00 > > >> +#define LOONGSON_SPI_SPSR_REG 0x01 > > >> +#define LOONGSON_SPI_FIFO_REG 0x02 > > >> +#define LOONGSON_SPI_SPER_REG 0x03 > > >> +#define LOONGSON_SPI_PARA_REG 0x04 > > >> +#define LOONGSON_SPI_SFCS_REG 0x05 > > >> +#define LOONGSON_SPI_TIMI_REG 0x06 > > > Where is this used outside of the main driver? > > These definitions are only used in core.c > Then the obvious question, why are they located in *.h? It's absolutely fine to put them in a header file, that's a perfectly normal way of writing code - it helps keep the driver a bit smaller by putting big piles of defines in a separate file, that can help make things a bit more manageable. --Xqg6i+1FCvZAy4Oy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmRt5JwACgkQJNaLcl1U h9Ci5Af+NaHg1gQJOq8Q4R3aAaMCss64c2eb1tgoVaaTl1dAsuDyMvXBh/gZiY7Q a8XqU5QVk9o7HD7UpvdY3f6ZlpakU9WdUfqsSX/XCaBheAa7MISY1NGyNkAjcDOl hR17A+BK5REb3dlYcWsONd5fouuKl+KsOipPSOFVTeU3VJuIIlGQUFGaw74hxMsa LWgZHOpAiCsgCMyyeJrzNgSl62j+iOeg4SIRbumZzvFdoFQbb5wnIzEzlWLDWgBd vvYaqdcTlNTz5wQLjzyUDUsocO4LxXPLwJz5ljlnbji0CUzbc6h9XtUV6OoRohIE H+u7g0Ma8nEu/VhuZiUszak7EoXxCA== =SXKy -----END PGP SIGNATURE----- --Xqg6i+1FCvZAy4Oy--