From patchwork Thu Mar 8 18:16:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shreeya Patel X-Patchwork-Id: 10268645 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 1D901602BD for ; Thu, 8 Mar 2018 18:16:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D8EB223A7 for ; Thu, 8 Mar 2018 18:16:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0201228684; Thu, 8 Mar 2018 18:16:25 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham 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 8F112223A7 for ; Thu, 8 Mar 2018 18:16:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754458AbeCHSQY (ORCPT ); Thu, 8 Mar 2018 13:16:24 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:43570 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752151AbeCHSQX (ORCPT ); Thu, 8 Mar 2018 13:16:23 -0500 Received: by mail-pl0-f66.google.com with SMTP id f23-v6so3755467plr.10; Thu, 08 Mar 2018 10:16: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; bh=qCuEgKMU3OMLpWXsyXG2uX+KCURz5s+4it84+WbNiUU=; b=u2GNQq109e+wT/31Xwm+L6xPXJziCXIeHF/ZMh/U8KynSWkRVfqjOrQ18U7g8NVdBL EnX+hUX/+te13q4/wZuouL5BqHEUOpNyjy8SvgVaRI35/BocF+EIKeCZEeZGiiJ+Yxmm KUnb2wivMcG/rODV/HcLfeeoT7XmcyulP85ssb6NfRLXwrUuuESWXt4JBDEAkx79rz42 wzb5fhPXv/o7yOQKoXL06f9WOsHND0PcOhGtbGE7yGYkrMAj+6NGpAukVAlYtPXYsH9N wJX5MRMc00Crwd30obWUeN/iMkdy9bBRDo+PUCnAVAjfrqCqgv6f/adQLWqzVyghF+wK UwXg== 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=qCuEgKMU3OMLpWXsyXG2uX+KCURz5s+4it84+WbNiUU=; b=lhoD9iyW80+6SrfV9S3mijwnssCviTAJPxFmXr/RpjA6REN1bF87fo8b9qyK21UgnI 9UjeBHrUceVeWHWbRmSIS4YOdRlr8sZyrNotyv2IqinR9rmj9YIXxVTSWspKRk+sF6BW WT5prG/CPYWnNsmDzC0WqEy4rpbaP911/bskgy074SfTUeMXniPtV7T56FfVQsajFYYn /4+Gy9C71j1QUPG9dJ4J2+ZQdPg4RlIfLQdennvcCMrIvKngsYm4eATZ2Xa64FT8p/sL RxM3cruEcapjsbDhJWzR+ywB1OJyuV3YxO8/jBlxuJV8yNLerxlRoRSEkdIyYWj6C2s5 LnHA== X-Gm-Message-State: AElRT7G3YioltwvuBCRzwfxAyftqvRacQd7jljAH0PP0NkTzxB2qEMgS eAF15tr1lBNe3tjct/p9mzI= X-Google-Smtp-Source: AG47ELunE2rZnbA3qoE5sA/fL4ddaeE/dBCRrKVB6UjBOYo2aTjh8s7rK0jOeJKCiupM1K4Bjxbgvg== X-Received: by 2002:a17:902:b185:: with SMTP id s5-v6mr5695370plr.109.1520532983221; Thu, 08 Mar 2018 10:16:23 -0800 (PST) Received: from shreeya-VirtualBox ([103.212.140.137]) by smtp.gmail.com with ESMTPSA id l19sm36169157pgn.31.2018.03.08.10.16.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Mar 2018 10:16:21 -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 v4] Staging: iio: adis16209: Change some macro names Date: Thu, 8 Mar 2018 23:46:17 +0530 Message-Id: <1520532977-10653-1-git-send-email-shreeya.patel23498@gmail.com> X-Mailer: git-send-email 2.7.4 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 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 v4 -Have slight indentation in field definitions. 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 eb5c878..19636e2 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_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 +#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 /* Power supply above 3.625 V */ -#define ADIS16209_STAT_POWER_HIGH_BIT 1 +#define ADIS16209_DIAG_STAT_POWER_HIGH_BIT 1 /* Power supply below 3.15 V */ -#define ADIS16209_STAT_POWER_LOW_BIT 0 +#define ADIS16209_DIAG_STAT_POWER_LOW_BIT 0 -#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_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_ERROR_ACTIVE BIT(14) @@ -238,29 +238,29 @@ static const struct iio_info adis16209_info = { }; static const char * const adis16209_status_error_msgs[] = { - [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", + [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", }; static const struct adis_data adis16209_data = { .read_delay = 30, .msc_ctrl_reg = ADIS16209_MSC_CTRL_REG, - .glob_cmd_reg = ADIS16209_CMD_REG, - .diag_stat_reg = ADIS16209_STAT_REG, + .glob_cmd_reg = ADIS16209_GLOB_CMD_REG, + .diag_stat_reg = ADIS16209_DIAG_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_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), + .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), }; static int adis16209_probe(struct spi_device *spi)