From patchwork Fri Mar 16 20:06:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Jha X-Patchwork-Id: 10290065 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2C0D0601A0 for ; Fri, 16 Mar 2018 20:09:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A7BA28E0F for ; Fri, 16 Mar 2018 20:09:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F14B28F90; Fri, 16 Mar 2018 20:09:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SBL_CSS, RCVD_IN_SORBS_WEB, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CA2528E0F for ; Fri, 16 Mar 2018 20:09:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752360AbeCPUHJ (ORCPT ); Fri, 16 Mar 2018 16:07:09 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34374 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752216AbeCPUHF (ORCPT ); Fri, 16 Mar 2018 16:07:05 -0400 Received: by mail-pg0-f68.google.com with SMTP id m15so4498496pgc.1; Fri, 16 Mar 2018 13:07:05 -0700 (PDT) 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=kKJFrnLuvSXJVCfGL0guBWsOlt9bBYDMOQTCxDw14YY=; b=iNBlTudjcGij36qEJBg8eL7VhbA//Z9BANWrLG/TwPuRMJQsvBBgS1r/uvZFiDlTCL ANtFQJXHpoPs6LArrVqT0AXr+a7mfptuatWp+M1Lm6LrMi1eKNflTDh4k1xBh0qCfIsR RR26rZPTV+4lDT2kHh+6Jz9lktji2RaV7bVWV2nMjB5O5skKcuw3M27AY+/3PMXkGeKk 7bD5ct4dbGk9wO+oNXF/AaqEYyXwDUrgpmQAP5lhqUA6sV6/hK+PvfTx9ux/D7kRTTl8 VHHtaDIl+ObFT0pOKeC6Q4JLY25RCdqkQdEvoHwjlO1LEq7qiGwj/hfO7UA50KOrptEi jreQ== 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=kKJFrnLuvSXJVCfGL0guBWsOlt9bBYDMOQTCxDw14YY=; b=fX84GWMe69cngaXdLcRjf2oWdVpDMuNVcblZxDsR21VnRDqE07s80oMMgiK2/w1ixN EoN1LRH0pbaxniNvZ1FpkJ522kAiTXFqtrVIgygv36lH+2cw9eiSB+iL874M9OefGF/4 a+L1Muav6tgYQzu0L8yIwZBkKX8Ez6abVLfk4ki4O44YSO4TgQoGgScMSIc+a5UVr4Fv OizqEsNfVB92R5wx2BxVWyQPh+TCx8N7Yw2sblz3ZurfJiU6Fyjydn1ipmHonkzmq3V/ rSuErAqP6NunThc/QfC7RDKnxdDOmwS02eaOOGz3+RZP/3yPSu0cHxitbA9iga7oEFZi ocPQ== X-Gm-Message-State: AElRT7F+HfoYM5rM6qfidQgs/+j03H6HPKMm2n9EX53N1Snsqubyw0RF cm2tnj5sTYIwMVy8LsUDgFQ= X-Google-Smtp-Source: AG47ELuVVaAlHPvNP2UjEIoMKsX2yx2PzFSX0VKGS7y++TYDWt7Zs3b09JqF9uGIfmatItZU1SLhyQ== X-Received: by 10.99.176.71 with SMTP id z7mr1486955pgo.74.1521230824795; Fri, 16 Mar 2018 13:07:04 -0700 (PDT) Received: from localhost.localdomain ([103.46.193.14]) by smtp.gmail.com with ESMTPSA id s9sm15605347pfm.39.2018.03.16.13.07.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Mar 2018 13:07:04 -0700 (PDT) From: Himanshu Jha To: jic23@kernel.org Cc: lars@metafoo.de, Michael.Hennerich@analog.com, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, daniel.baluta@gmail.com, 21cnbao@gmail.com, Himanshu Jha Subject: [PATCH v2 3/9] Staging: iio: accel: adis16201: Add _REG suffix to reisters Date: Sat, 17 Mar 2018 01:36:20 +0530 Message-Id: <1521230786-18155-4-git-send-email-himanshujha199640@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521230786-18155-1-git-send-email-himanshujha199640@gmail.com> References: <1521230786-18155-1-git-send-email-himanshujha199640@gmail.com> Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a _REG suffix to distinguish between registers and the register bit fileds. Signed-off-by: Himanshu Jha --- v2: -reordered patch series. drivers/staging/iio/accel/adis16201.c | 84 +++++++++++++++++------------------ 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/drivers/staging/iio/accel/adis16201.c b/drivers/staging/iio/accel/adis16201.c index 6c06c0d..0c63cd0 100644 --- a/drivers/staging/iio/accel/adis16201.c +++ b/drivers/staging/iio/accel/adis16201.c @@ -24,62 +24,62 @@ #define ADIS16201_FLASH_CNT 0x00 -#define ADIS16201_SUPPLY_OUT 0x02 +#define ADIS16201_SUPPLY_OUT_REG 0x02 -#define ADIS16201_XACCL_OUT 0x04 +#define ADIS16201_XACCL_OUT_REG 0x04 -#define ADIS16201_YACCL_OUT 0x06 +#define ADIS16201_YACCL_OUT_REG 0x06 -#define ADIS16201_AUX_ADC 0x08 +#define ADIS16201_AUX_ADC_REG 0x08 -#define ADIS16201_TEMP_OUT 0x0A +#define ADIS16201_TEMP_OUT_REG 0x0A -#define ADIS16201_XINCL_OUT 0x0C +#define ADIS16201_XINCL_OUT_REG 0x0C -#define ADIS16201_YINCL_OUT 0x0E +#define ADIS16201_YINCL_OUT_REG 0x0E -#define ADIS16201_XACCL_OFFS 0x10 +#define ADIS16201_XACCL_OFFS_REG 0x10 -#define ADIS16201_YACCL_OFFS 0x12 +#define ADIS16201_YACCL_OFFS_REG 0x12 -#define ADIS16201_XACCL_SCALE 0x14 +#define ADIS16201_XACCL_SCALE_REG 0x14 -#define ADIS16201_YACCL_SCALE 0x16 +#define ADIS16201_YACCL_SCALE_REG 0x16 -#define ADIS16201_XINCL_OFFS 0x18 +#define ADIS16201_XINCL_OFFS_REG 0x18 -#define ADIS16201_YINCL_OFFS 0x1A +#define ADIS16201_YINCL_OFFS_REG 0x1A -#define ADIS16201_XINCL_SCALE 0x1C +#define ADIS16201_XINCL_SCALE_REG 0x1C -#define ADIS16201_YINCL_SCALE 0x1E +#define ADIS16201_YINCL_SCALE_REG 0x1E -#define ADIS16201_ALM_MAG1 0x20 +#define ADIS16201_ALM_MAG1_REG 0x20 -#define ADIS16201_ALM_MAG2 0x22 +#define ADIS16201_ALM_MAG2_REG 0x22 -#define ADIS16201_ALM_SMPL1 0x24 +#define ADIS16201_ALM_SMPL1_REG 0x24 -#define ADIS16201_ALM_SMPL2 0x26 +#define ADIS16201_ALM_SMPL2_REG 0x26 -#define ADIS16201_ALM_CTRL 0x28 +#define ADIS16201_ALM_CTRL_REG 0x28 -#define ADIS16201_AUX_DAC 0x30 +#define ADIS16201_AUX_DAC_REG 0x30 -#define ADIS16201_GPIO_CTRL 0x32 +#define ADIS16201_GPIO_CTRL_REG 0x32 -#define ADIS16201_MSC_CTRL 0x34 +#define ADIS16201_MSC_CTRL_REG 0x34 -#define ADIS16201_SMPL_PRD 0x36 +#define ADIS16201_SMPL_PRD_REG 0x36 /* Operation, filter configuration */ -#define ADIS16201_AVG_CNT 0x38 +#define ADIS16201_AVG_CNT_REG 0x38 -#define ADIS16201_SLP_CNT 0x3A +#define ADIS16201_SLP_CNT_REG 0x3A -#define ADIS16201_DIAG_STAT 0x3C +#define ADIS16201_DIAG_STAT_REG 0x3C -#define ADIS16201_GLOB_CMD 0x3E +#define ADIS16201_GLOB_CMD_REG 0x3E #define ADIS16201_MSC_CTRL_SELF_TEST_EN BIT(8) @@ -125,10 +125,10 @@ enum adis16201_scan { }; static const u8 adis16201_addresses[] = { - [ADIS16201_SCAN_ACC_X] = ADIS16201_XACCL_OFFS, - [ADIS16201_SCAN_ACC_Y] = ADIS16201_YACCL_OFFS, - [ADIS16201_SCAN_INCLI_X] = ADIS16201_XINCL_OFFS, - [ADIS16201_SCAN_INCLI_Y] = ADIS16201_YINCL_OFFS, + [ADIS16201_SCAN_ACC_X] = ADIS16201_XACCL_OFFS_REG, + [ADIS16201_SCAN_ACC_Y] = ADIS16201_YACCL_OFFS_REG, + [ADIS16201_SCAN_INCLI_X] = ADIS16201_XINCL_OFFS_REG, + [ADIS16201_SCAN_INCLI_Y] = ADIS16201_YINCL_OFFS_REG, }; static int adis16201_read_raw(struct iio_dev *indio_dev, @@ -232,16 +232,16 @@ static int adis16201_write_raw(struct iio_dev *indio_dev, } static const struct iio_chan_spec adis16201_channels[] = { - ADIS_SUPPLY_CHAN(ADIS16201_SUPPLY_OUT, ADIS16201_SCAN_SUPPLY, 0, 12), - ADIS_TEMP_CHAN(ADIS16201_TEMP_OUT, ADIS16201_SCAN_TEMP, 0, 12), - ADIS_ACCEL_CHAN(X, ADIS16201_XACCL_OUT, ADIS16201_SCAN_ACC_X, + ADIS_SUPPLY_CHAN(ADIS16201_SUPPLY_OUT_REG, ADIS16201_SCAN_SUPPLY, 0, 12), + ADIS_TEMP_CHAN(ADIS16201_TEMP_OUT_REG, ADIS16201_SCAN_TEMP, 0, 12), + ADIS_ACCEL_CHAN(X, ADIS16201_XACCL_OUT_REG, ADIS16201_SCAN_ACC_X, BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14), - ADIS_ACCEL_CHAN(Y, ADIS16201_YACCL_OUT, ADIS16201_SCAN_ACC_Y, + ADIS_ACCEL_CHAN(Y, ADIS16201_YACCL_OUT_REG, ADIS16201_SCAN_ACC_Y, BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14), - ADIS_AUX_ADC_CHAN(ADIS16201_AUX_ADC, ADIS16201_SCAN_AUX_ADC, 0, 12), - ADIS_INCLI_CHAN(X, ADIS16201_XINCL_OUT, ADIS16201_SCAN_INCLI_X, + ADIS_AUX_ADC_CHAN(ADIS16201_AUX_ADC_REG, ADIS16201_SCAN_AUX_ADC, 0, 12), + ADIS_INCLI_CHAN(X, ADIS16201_XINCL_OUT_REG, ADIS16201_SCAN_INCLI_X, BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14), - ADIS_INCLI_CHAN(X, ADIS16201_YINCL_OUT, ADIS16201_SCAN_INCLI_Y, + ADIS_INCLI_CHAN(X, ADIS16201_YINCL_OUT_REG, ADIS16201_SCAN_INCLI_Y, BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14), IIO_CHAN_SOFT_TIMESTAMP(7) }; @@ -261,9 +261,9 @@ static const char * const adis16201_status_error_msgs[] = { static const struct adis_data adis16201_data = { .read_delay = 20, - .msc_ctrl_reg = ADIS16201_MSC_CTRL, - .glob_cmd_reg = ADIS16201_GLOB_CMD, - .diag_stat_reg = ADIS16201_DIAG_STAT, + .msc_ctrl_reg = ADIS16201_MSC_CTRL_REG, + .glob_cmd_reg = ADIS16201_GLOB_CMD_REG, + .diag_stat_reg = ADIS16201_DIAG_STAT_REG, .self_test_mask = ADIS16201_MSC_CTRL_SELF_TEST_EN, .self_test_no_autoclear = true,