Received: by 10.223.185.111 with SMTP id b44csp1274105wrg; Sat, 10 Mar 2018 02:12:44 -0800 (PST) X-Google-Smtp-Source: AG47ELt9ZqPlWDfxfCD9QXeh1O+h92k4H/ZfMIOmxziebISt+8fitCYyiwy8dyipxTHxQIxAlKFR X-Received: by 10.99.43.67 with SMTP id r64mr1293546pgr.403.1520676764482; Sat, 10 Mar 2018 02:12:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520676764; cv=none; d=google.com; s=arc-20160816; b=fO9u6Bn6MfR+T+CnKRfFMX7kMOi7/wdhkN8/0EESlu85VsKoBxZXD4nk/HbHntCov4 x7/6iockC0JigSfqo/K3lJ10fFsKV3/0K/J6+zTf6gJjxXGEYomLv9CR2KK6myfa8wXx qETrYvHA+JRLRt+wQM3811UlAE8QgQONnbbZaDS0+wqtIIbdA4TPeNQmzbxTmCHSuW00 5vvwA9/qxo2FytMJXyWvNJio+xVNJTHIxn6iGFJ6MTiJ81AHcBvT29Afmj+JpOK1mFmv Xy1pmZyeYmBkUVGEfnx92qtN5LY6xdGGoucnOouZ6RzIUOHqLnvliaP0hbO3kNqKqFwr S6Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=xmTceQ9YdepsAz1wR/NpbhRH+j1+1ZV2UJJX1E0TTao=; b=Aj0lbyUD/S3idRpmuS7AbSs1xvQ8Gl/x1sbkKGgjvW/ym2k4wd4AEzlWMDY8koLmMM cDL6BMWyDxc0CwhRTJ0txXISgcWdxC8EKRWOO+84X/UVg/XVeXiLEBfXjTrM2HKz8ZxC M8WK8f5BmSI2JGNXgn/8CzOOTVFl9ZN2PfjeCtYb51a4rDxeIXsdsdNzSQg3l5hNRgA0 0QjGY/Jz0lssBKIQIfHat4fNNNtbfYqp0cfa9t1qtiNgcLeOPVFzzJyuaihrENer4NI9 Q8wZt2MwE61IThJ038xxdWyYi55ONi5D8vuvSPG8vp3OxhSWnDKOsK6cIJWT8riRBDdq 0SlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o+yGdu+D; 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 x4si2153855pgo.278.2018.03.10.02.12.18; Sat, 10 Mar 2018 02:12: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=o+yGdu+D; 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 S1751990AbeCJKKu (ORCPT + 99 others); Sat, 10 Mar 2018 05:10:50 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:34729 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751735AbeCJKKs (ORCPT ); Sat, 10 Mar 2018 05:10:48 -0500 Received: by mail-pl0-f67.google.com with SMTP id u13-v6so6624035plq.1; Sat, 10 Mar 2018 02:10:48 -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; bh=xmTceQ9YdepsAz1wR/NpbhRH+j1+1ZV2UJJX1E0TTao=; b=o+yGdu+DOFnmrHV7OrJIRvSyi/Dry7QinmR2R1eIYCyBPz5T1Ic4a3F/6ZFKC0xMqG +6sG85hPFk7t/YiyzXSYxzAysFVy/we4e4PkdikS/6KxDae3JjR1Cdr3fqWVSXkCGON+ 7A5NUMwiXKyJwnTEEZuSs7zBThzPiamanevfQyROg8nsVcx1tLjKtcNOIEh86Z1Zp0xN pX1BWsbhe1V6Ft87a0HIgVFAtzIPOciNm3byDSjIHHEWATz5NFWAVOwv3NtY0ijK3tjR GdtLSopka8EJSJwJWUgkFIY8tLTfcoozoDQbejICvRlLmj14Kund4lZL6DA6Vosj02zC 4EVQ== 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; bh=xmTceQ9YdepsAz1wR/NpbhRH+j1+1ZV2UJJX1E0TTao=; b=MKf/1Iau6P/oWY3dLMxe51YBdh6BqKEj/KjH60i5OqBrQ+GckSSs/9R6+qLXsq4joL PNHhxdtFHyIb8j43v1aW0JMdmcRHYJNq7QBldS3ul241nk8DTRBjhSXVdkjBsmv7RZiN YaIAePQyQ3taUkSIaqZC+2N3EIV8uHl3ps9GJCp9yamy3b2xbYLMCkfRN1oF57cRbBsZ bTayhiAXEcVOLs47fTmaDv9fU7o+cMD9RFWaLHVEuumAJ3Ab3OBtLp7gEcXbKsklwLcP rOpq47VVDxPUJwKUFg7wry95IXDIYPLforymtU8Pc+OvBdYMb6q5Rysj9d8drRX/53Qa xaNQ== X-Gm-Message-State: AElRT7GBgOlC0w5eZje8CeAE74vaKzbGog63528Ww790XdoYfGGGbmA9 0tXbWQi+8yvV478hOci+FoY= X-Received: by 2002:a17:902:56c:: with SMTP id 99-v6mr1590149plf.53.1520676647633; Sat, 10 Mar 2018 02:10:47 -0800 (PST) Received: from shreeya-VirtualBox ([103.212.140.128]) by smtp.gmail.com with ESMTPSA id b130sm6058649pga.62.2018.03.10.02.10.44 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 10 Mar 2018 02:10:45 -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 v5] Staging: iio: adis16209: Change some macro names Date: Sat, 10 Mar 2018 15:40:14 +0530 Message-Id: <1520676614-9556-1-git-send-email-shreeya.patel23498@gmail.com> X-Mailer: git-send-email 2.7.4 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 and have slight indentation in field definitions to make them clearly different from the register addresses. Signed-off-by: Shreeya Patel --- Changes in v5 -Re-send the corrected patch. 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..ed2e89f 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