Received: by 10.223.185.116 with SMTP id b49csp1575814wrg; Sun, 4 Mar 2018 05:13:44 -0800 (PST) X-Google-Smtp-Source: AG47ELvuQKNyFpEL2R60GBx+Nabu9GL4vAWupqJukFzPHU/38Hp9vuUyvZ/us1OfTwJ6PDBd3lC+ X-Received: by 2002:a17:902:4581:: with SMTP id n1-v6mr10535734pld.135.1520169224466; Sun, 04 Mar 2018 05:13:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520169224; cv=none; d=google.com; s=arc-20160816; b=M9+zjRShkD/6/3rVVAzW2PUHR4i5x97ohknAtODz/LmzCHhy8gXPj1ecqcAFBv7ld/ 9Iy4d4BJiX8fh7S4vCyGFNFjXPkvI57DtzzpQ3aX7KrcRPMFTvzZ8wdR5OpRe1ObzZu9 u7DXlGa1f0bsvcyGLWrIuNj60zNtCNNpmhoGmqYUZKtREq6TdxpquDksPlshxHC5sQ6M lNiTqfT4j+UyEMvSmOOf0Uto4G7NSDEHXbkMpHsrkxwiIBF2NAthVIeiJJa6rEbkG9Zs Fb+XSPAhZOxM5TZH7SAtUhJh4olRx6H1ukllNRqX33Kyr22iCamKQmEzOGOZjQN9wvcd 1ehQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=+8o5a6PYLndUn0joLWsUyrYKwESwJssuArJzl1+SHB4=; b=sa+2setM4UuLHsggrwzyRbIfF4+y9EWld2nK/571Op8gnsmO6MQwkyJUAitrmZmCzv U2Inh43AqqdnJgvEU7uncjmf1zRrcOV1z01ES5wnKSMiGeLPVqGqQMJecegVpIuqjrcX uSeJWc2ZDGIerfKqMMiJSNUy9sBga0w0ybJmmngvpHYxfme+uAHPG+G1z3arILIiJWeU MLYipZdaYyIgl8D5CqrQOVtRaJuimsGHKMJ5YvblBRcUn9lMypO9WCVC9ORW0KpCrxc4 XI/q/y7xhbDXzWXMGlWBVrlt9B9a+CL8v3aqeAkujeLbBejTDIezJ0nQWN4o9thXUb5q rXPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EwH7czDu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o11si6892698pgc.820.2018.03.04.05.13.29; Sun, 04 Mar 2018 05:13:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EwH7czDu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752686AbeCDMlZ (ORCPT + 99 others); Sun, 4 Mar 2018 07:41:25 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:39857 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752566AbeCDMlX (ORCPT ); Sun, 4 Mar 2018 07:41:23 -0500 Received: by mail-pl0-f67.google.com with SMTP id s13-v6so8182603plq.6; Sun, 04 Mar 2018 04:41:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+8o5a6PYLndUn0joLWsUyrYKwESwJssuArJzl1+SHB4=; b=EwH7czDuJIoZYEhKisuIfdP4jWG4p3SOcgGSp7dNdbJxLvGJoJN982SBqJDl4UUEhX IPe0fTbmAv6NhAwHnEBTBbK60iDuv5wzFlLXi4ETcmXJuPspVCapEqt5ykJdw8XYd8H/ Scxd1ci0nk7D5waHTIi2WtS2rPEXk2g9frbisWQIbRPH90r5aBQxZPaDh34jcGSLYZeb 4LY68VeEatM1dvl4T3N3WRpVbydYoeCvPgd0iKE/B5OfJ/l0GRMRT1JwLYfIWLCfmzod R2DZDvYNTSO3MtP+An+BHjlCU49LWhup21TE2j8R0c3K6Teuq7VUi7oLAZIAy4Dp8sC7 ajNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+8o5a6PYLndUn0joLWsUyrYKwESwJssuArJzl1+SHB4=; b=W4pcOf1Wu+qhL+U9gEDRxhsMpIN1vC9G/eN5mNjETWfBr57SDZuFbjKchZ+nZovOH6 4Dj0QnRzZGieId6ppjdjcQOXFr7HuBwlem62niwa6wL9/A4Isc1ylvK6Qfl7+3emxKh8 PdpP4cS0LBznN1wenPD8rCN7FPH5d3xwqnlcCd0QthukGQMtc23c976l0WA3uDawsCLp FtJ9JKoQNinXJmwQZNxRvn0G53PJDpPWAbXigkRKBCFrpsiFTFWEkRgcGemkknbbrPnk RWPNg9kZMVeVrJs+e8L3cuocOfrzs5qd9igGxw/s1Cbb+gHJio5cIqbaVIl127FgNkhv hCLg== X-Gm-Message-State: APf1xPBtYD0miH2TzHAF+BdeOsIxEMU17hezBDY+73qe1HiUW7hdLuq5 Af2t32zMAhjVWfvebJwWhME= X-Received: by 2002:a17:902:467:: with SMTP id 94-v6mr10017313ple.57.1520167282500; Sun, 04 Mar 2018 04:41:22 -0800 (PST) Received: from shreeya-VirtualBox ([103.212.140.139]) by smtp.gmail.com with ESMTPSA id e22sm17637447pgn.50.2018.03.04.04.41.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 04 Mar 2018 04:41:22 -0800 (PST) From: Shreeya Patel To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, daniel.baluta@gmail.com Cc: Shreeya Patel Subject: [PATCH v3 2/4] Staging: iio: adis16209: Change some macro names Date: Sun, 4 Mar 2018 18:11:17 +0530 Message-Id: <3880510489f196d93ccb3ef7551e0216009d4a10.1520164945.git.shreeya.patel23498@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make some of the macro names according to the names given in the datasheet of the adis16209 driver. Signed-off-by: Shreeya Patel --- Changes in v3 -Introduce this new patch for v3 of the series. drivers/staging/iio/accel/adis16209.c | 48 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/staging/iio/accel/adis16209.c b/drivers/staging/iio/accel/adis16209.c index d8aef9c..eb5c878 100644 --- a/drivers/staging/iio/accel/adis16209.c +++ b/drivers/staging/iio/accel/adis16209.c @@ -68,21 +68,21 @@ #define ADIS16209_MSC_CTRL_ACTIVE_HIGH BIT(1) #define ADIS16209_MSC_CTRL_DATA_RDY_DIO2 BIT(0) -#define ADIS16209_DIAG_STAT_REG 0x3C -#define ADIS16209_DIAG_STAT_ALARM2 BIT(9) -#define ADIS16209_DIAG_STAT_ALARM1 BIT(8) -#define ADIS16209_DIAG_STAT_SELFTEST_FAIL_BIT 5 -#define ADIS16209_DIAG_STAT_SPI_FAIL_BIT 3 -#define ADIS16209_DIAG_STAT_FLASH_UPT_BIT 2 +#define ADIS16209_STAT_REG 0x3C +#define ADIS16209_STAT_ALARM2 BIT(9) +#define ADIS16209_STAT_ALARM1 BIT(8) +#define ADIS16209_STAT_SELFTEST_FAIL_BIT 5 +#define ADIS16209_STAT_SPI_FAIL_BIT 3 +#define ADIS16209_STAT_FLASH_UPT_FAIL_BIT 2 /* Power supply above 3.625 V */ -#define ADIS16209_DIAG_STAT_POWER_HIGH_BIT 1 +#define ADIS16209_STAT_POWER_HIGH_BIT 1 /* Power supply below 3.15 V */ -#define ADIS16209_DIAG_STAT_POWER_LOW_BIT 0 +#define ADIS16209_STAT_POWER_LOW_BIT 0 -#define ADIS16209_GLOB_CMD_REG 0x3E -#define ADIS16209_GLOB_CMD_SW_RESET BIT(7) -#define ADIS16209_GLOB_CMD_CLEAR_STAT BIT(4) -#define ADIS16209_GLOB_CMD_FACTORY_CAL BIT(1) +#define ADIS16209_CMD_REG 0x3E +#define ADIS16209_CMD_SW_RESET BIT(7) +#define ADIS16209_CMD_CLEAR_STAT BIT(4) +#define ADIS16209_CMD_FACTORY_CAL BIT(1) #define ADIS16209_ERROR_ACTIVE BIT(14) @@ -238,29 +238,29 @@ static const struct iio_info adis16209_info = { }; static const char * const adis16209_status_error_msgs[] = { - [ADIS16209_DIAG_STAT_SELFTEST_FAIL_BIT] = "Self test failure", - [ADIS16209_DIAG_STAT_SPI_FAIL_BIT] = "SPI failure", - [ADIS16209_DIAG_STAT_FLASH_UPT_BIT] = "Flash update failed", - [ADIS16209_DIAG_STAT_POWER_HIGH_BIT] = "Power supply above 3.625V", - [ADIS16209_DIAG_STAT_POWER_LOW_BIT] = "Power supply below 3.15V", + [ADIS16209_STAT_SELFTEST_FAIL_BIT] = "Self test failure", + [ADIS16209_STAT_SPI_FAIL_BIT] = "SPI failure", + [ADIS16209_STAT_FLASH_UPT_FAIL_BIT] = "Flash update failed", + [ADIS16209_STAT_POWER_HIGH_BIT] = "Power supply above 3.625V", + [ADIS16209_STAT_POWER_LOW_BIT] = "Power supply below 3.15V", }; static const struct adis_data adis16209_data = { .read_delay = 30, .msc_ctrl_reg = ADIS16209_MSC_CTRL_REG, - .glob_cmd_reg = ADIS16209_GLOB_CMD_REG, - .diag_stat_reg = ADIS16209_DIAG_STAT_REG, + .glob_cmd_reg = ADIS16209_CMD_REG, + .diag_stat_reg = ADIS16209_STAT_REG, .self_test_mask = ADIS16209_MSC_CTRL_SELF_TEST_EN, .self_test_no_autoclear = true, .startup_delay = ADIS16209_STARTUP_DELAY_MS, .status_error_msgs = adis16209_status_error_msgs, - .status_error_mask = BIT(ADIS16209_DIAG_STAT_SELFTEST_FAIL_BIT) | - BIT(ADIS16209_DIAG_STAT_SPI_FAIL_BIT) | - BIT(ADIS16209_DIAG_STAT_FLASH_UPT_BIT) | - BIT(ADIS16209_DIAG_STAT_POWER_HIGH_BIT) | - BIT(ADIS16209_DIAG_STAT_POWER_LOW_BIT), + .status_error_mask = BIT(ADIS16209_STAT_SELFTEST_FAIL_BIT) | + BIT(ADIS16209_STAT_SPI_FAIL_BIT) | + BIT(ADIS16209_STAT_FLASH_UPT_FAIL_BIT) | + BIT(ADIS16209_STAT_POWER_HIGH_BIT) | + BIT(ADIS16209_STAT_POWER_LOW_BIT), }; static int adis16209_probe(struct spi_device *spi) -- 2.7.4