From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423291AbcFNEoW (ORCPT ); Tue, 14 Jun 2016 00:44:22 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34520 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750942AbcFNEoU (ORCPT ); Tue, 14 Jun 2016 00:44:20 -0400 MIME-Version: 1.0 In-Reply-To: References: From: Michal Suchanek Date: Tue, 14 Jun 2016 06:43:39 +0200 Message-ID: Subject: Re: [linux-sunxi] [PATCH v3 07/13] spi: sunxi: rename constants to match between sun4i and sun6i To: Julian Calaby Cc: linux-sunxi , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Maxime Ripard , Chen-Yu Tsai , Russell King , Mark Brown , Arnd Bergmann , Olof Johansson , Krzysztof Kozlowski , Javier Martinez Canillas , Simon Horman , Sjoerd Simons , Thierry Reding , Alison Wang , Timo Sigurdsson , Jonathan Liu , Gerhard Bertelsmann , Priit Laes , devicetree , "Mailing List, Arm" , "linux-kernel@vger.kernel.org" , linux-spi Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On 14 June 2016 at 01:31, Julian Calaby wrote: > Hi Michal, > > On Tue, Jun 14, 2016 at 3:46 AM, Michal Suchanek wrote: >> SUNXI_CTL_ -> SUNXI_TFR_CTL_ >> SUNXI_TFR_CTL_LMTF -> SUNXI_TFR_CTL_FBS > > I don't know these abbreviations, are they both referring to the same thing? > >> SUNXI_TFR_CTL_CS_ACTIVE_LOW -> SUNXI_TFR_CTL_SPOL > > It looks like you're making the constant name less descriptive here. > Is the old version (CS_ACTIVE_LOW) incorrect? > >> and some SUNXI_???_CTL_ -> SUNXI_CTL_ >> for constants migrated to different registers between sun4i and sun6i >> >> No functional change. >> >> #define SUNXI_INT_CTL_REG 0x0c >> diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c >> index a27bf8f..f26b52a 100644 >> --- a/drivers/spi/spi-sun6i.c >> +++ b/drivers/spi/spi-sun6i.c >> @@ -26,9 +26,9 @@ >> #define SUNXI_FIFO_DEPTH 128 >> >> #define SUNXI_GBL_CTL_REG 0x04 >> -#define SUNXI_GBL_CTL_BUS_ENABLE BIT(0) >> -#define SUNXI_GBL_CTL_MASTER BIT(1) >> -#define SUNXI_GBL_CTL_TP BIT(7) >> +#define SUNXI_CTL_ENABLE BIT(0) >> +#define SUNXI_CTL_MASTER BIT(1) >> +#define SUNXI_CTL_TP BIT(7) > > If these are bit definitions for the GBL register, why throw that > information away? Those bits are on the TFR register in the earlier IP so it makes perfect sense to me this way. Thanks Michal