From patchwork Mon Mar 5 07:49:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Jha X-Patchwork-Id: 10258283 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 920DF60134 for ; Mon, 5 Mar 2018 07:50:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8043428946 for ; Mon, 5 Mar 2018 07:50:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7486A2896D; Mon, 5 Mar 2018 07:50:14 +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=-5.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB, 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 03E6728946 for ; Mon, 5 Mar 2018 07:50:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933203AbeCEHuL (ORCPT ); Mon, 5 Mar 2018 02:50:11 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:37668 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933171AbeCEHuI (ORCPT ); Mon, 5 Mar 2018 02:50:08 -0500 Received: by mail-pg0-f68.google.com with SMTP id y26so6517931pgv.4; Sun, 04 Mar 2018 23:50:08 -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=3Thva6RSRkTdHBOh5wf4OcSvVmY/jTHmwKHzsHsyLdo=; b=tii2PzKnJ4wt71fJw4NHmAKbBs+v6mVQEtYpVifeG2u9fSCgfCdYMq74pBHkWDNFW1 1tLEXKF8qFCDNifQGBKpue4k9LMOE/2aUOMxXkZyJpkSlzuBb7c1ovQs5+RdhNrO4Dio G2SVARHW9mj/yX9aqI9bBf+3HHvkPG9qIDtDAxHZw6JmWa3BLTS4w3tzkLvImQxzJSWE fRapAhpZ2pWRtSEn7rjhYV1yJMMmEFQ6f4/N6TKn/J+wlQmovc7qlzu1g0qq95IRNuYJ hF65/g4Bi0BYwzn2EdzZynENim9GekGcAiv4kvk9husvIPm8unSnFsbOi6HxbgmB6KOo 8Hvg== 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=3Thva6RSRkTdHBOh5wf4OcSvVmY/jTHmwKHzsHsyLdo=; b=RKRKxSx3lXbeGn9CDLPEfS0mf24u1Kbz2GfCqwDkc3ZIJRqgafCRXpcFgEXV/RdbjZ 5ynkN2IVTtrOy9CTg646XP0G3TKYq3TMMq2v7vKQtz4LPM/rCyZLlcw2f32sjo8+Qy4/ TAkXeV9Cy6ZO3uDqHgDjTraZZfr6onuLk82Uswf1/rGcFnMoEf6Eav3DLnvjCz7wPHSD A0kLBjwJAyPQ7EBrYboEkg2tdLml9LlvJxnmCvVQF5ZHKQTsYQXPF2V6hFx+wObgPWqk bvPcIA3JdcJJO7AlGWODXXDANkS9289bftaRHqlequ51V/BIAckQunC349VjKMpL6LyJ nPCA== X-Gm-Message-State: APf1xPDbeQriDt6ATKrUKUcqnf8F1GbenVNXOiuD3gb3D+E2VvjbrQpF vt98kBVAfBpoHGRtWIN2FsQ= X-Google-Smtp-Source: AG47ELuk0saIawEKeiPLx4ML91whBkBoDjLXFCVG6+LMnYFf3dLmmWgurtNVnu4HB7cthD9s7U3Jxg== X-Received: by 10.98.32.200 with SMTP id m69mr14469201pfj.82.1520236208227; Sun, 04 Mar 2018 23:50:08 -0800 (PST) Received: from localhost.localdomain ([103.46.193.14]) by smtp.gmail.com with ESMTPSA id 125sm21674256pff.114.2018.03.04.23.50.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 04 Mar 2018 23:50:07 -0800 (PST) From: Himanshu Jha To: jic23@kernel.org Cc: lars@metafoo.de, Michael.Hennerich@analog.com, 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, Himanshu Jha Subject: [PATCH 04/11] Staging: iio: accel: Rename few macro definitions Date: Mon, 5 Mar 2018 13:19:23 +0530 Message-Id: <1520236170-14668-5-git-send-email-himanshujha199640@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520236170-14668-1-git-send-email-himanshujha199640@gmail.com> References: <1520236170-14668-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 Rename few macros with appropriate names specifying their usage/function. Signed-off-by: Himanshu Jha --- drivers/staging/iio/accel/adis16201.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/staging/iio/accel/adis16201.c b/drivers/staging/iio/accel/adis16201.c index 59c1166..445cb56 100644 --- a/drivers/staging/iio/accel/adis16201.c +++ b/drivers/staging/iio/accel/adis16201.c @@ -20,9 +20,8 @@ #include #include -#define ADIS16201_STARTUP_DELAY 220 - -#define ADIS16201_FLASH_CNT 0x00 +#define ADIS16201_STARTUP_DELAY_MS 220 +#define ADIS16201_FLASH_CNT 0x00 /* Data Output Register Information */ #define ADIS16201_SUPPLY_OUT 0x02 @@ -69,7 +68,7 @@ #define ADIS16201_MSC_CTRL_DATA_RDY_EN BIT(2) -#define ADIS16201_MSC_CTRL_ACTIVE_HIGH BIT(1) +#define ADIS16201_MSC_CTRL_ACTIVE_DATA_RDY_HIGH BIT(1) #define ADIS16201_MSC_CTRL_DATA_RDY_DIO1 BIT(0) @@ -80,14 +79,14 @@ #define ADIS16201_DIAG_STAT_SPI_FAIL_BIT 3 -#define ADIS16201_DIAG_STAT_FLASH_UPT_BIT 2 +#define ADIS16201_DIAG_STAT_FLASH_UPT_FAIL_BIT 2 #define ADIS16201_DIAG_STAT_POWER_HIGH_BIT 1 #define ADIS16201_DIAG_STAT_POWER_LOW_BIT 0 #define ADIS16201_GLOB_CMD_SW_RESET BIT(7) -#define ADIS16201_GLOB_CMD_FACTORY_CAL BIT(1) +#define ADIS16201_GLOB_CMD_FACTORY BIT(1) #define ADIS16201_ERROR_ACTIVE BIT(14) @@ -231,7 +230,7 @@ static const struct iio_info adis16201_info = { static const char * const adis16201_status_error_msgs[] = { [ADIS16201_DIAG_STAT_SPI_FAIL_BIT] = "SPI failure", - [ADIS16201_DIAG_STAT_FLASH_UPT_BIT] = "Flash update failed", + [ADIS16201_DIAG_STAT_FLASH_UPT_FAIL_BIT] = "Flash update failed", [ADIS16201_DIAG_STAT_POWER_HIGH_BIT] = "Power supply above 3.625V", [ADIS16201_DIAG_STAT_POWER_LOW_BIT] = "Power supply below 3.15V", }; @@ -244,11 +243,11 @@ static const struct adis_data adis16201_data = { .self_test_mask = ADIS16201_MSC_CTRL_SELF_TEST_EN, .self_test_no_autoclear = true, - .startup_delay = ADIS16201_STARTUP_DELAY, + .startup_delay = ADIS16201_STARTUP_DELAY_MS, .status_error_msgs = adis16201_status_error_msgs, .status_error_mask = BIT(ADIS16201_DIAG_STAT_SPI_FAIL_BIT) | - BIT(ADIS16201_DIAG_STAT_FLASH_UPT_BIT) | + BIT(ADIS16201_DIAG_STAT_FLASH_UPT_FAIL_BIT) | BIT(ADIS16201_DIAG_STAT_POWER_HIGH_BIT) | BIT(ADIS16201_DIAG_STAT_POWER_LOW_BIT), };