Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1585512pxb; Mon, 11 Oct 2021 08:58:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCssd+AGDaV3Fcx5NR1C3CZBZKiJKPMYh4G4I0IA4z/AVmrZ4hyOadZVjGzbaOQJ5oUvLe X-Received: by 2002:a63:f90b:: with SMTP id h11mr18625802pgi.165.1633967917641; Mon, 11 Oct 2021 08:58:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633967917; cv=none; d=google.com; s=arc-20160816; b=oQeL1/xm3Pv4Rh+IZQsI5bLDBZ0pRX123e0dlUrkGKoHwqmh5YdhJlAnoQAoRiggSI IPo7farvfSt1cttC6r/Jkd4WNCyemLLI8j5sH8Tv3dHpSWpkFCnLxNaj+WlRHQZw7ohG F46OLpxgBkEDd1qwbjfx0gG/AXNGNk4x0dOftUqpkxk/zVpBfajMoE/+7lKsxjUT+8Xl id/I+bcxfWFsXjKR0dGp/BRxYTafTpBtVdK5oPp7E72X7FaJAC1BRFLwrNTSXTU+pz/U HlCEjSTXDafSizuCajQVbByb4q95XVKWIqqrFiIpRNOlDHpTRpp1y11ovYMCpwtC1XBE eCDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=M/NKSIINQuepNIEZxBv+oRniDH8nmCopBihtJA4++RA=; b=lmef4ZHDSI8m/i9Kn6kjsFbfveg5QK7G41S1QzwIXOc2mJ5+UbX/VeTtq5Ck6uc2j0 A71wxuNJ2TkWvhi4JjXz2KJETtMcZRXfFyVaARS9bftg2qk19Y19uYhq8ymc1R0LNkla 9Qxfh6OMblVrZ+VAKOc0AUpf/Dw+P1I6jPARp221LHu8FvyMXSdfrO+vMTc72/+QtDmb YX4WB9aS4unzoe3QwRLPRlAu+W6pQNICFvvGOEjV19y0wICh6XamGW7c7ePzxBlqmSQE y+yEsqqsQBpLOSPjzXe7x4s5/13U+KIrOUlGye2g6rPwizpECFjJrmeeSN7uloFhjH5K HurA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l184si11175335pfl.52.2021.10.11.08.58.23; Mon, 11 Oct 2021 08:58:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239378AbhJKP6x (ORCPT + 99 others); Mon, 11 Oct 2021 11:58:53 -0400 Received: from hostingweb31-40.netsons.net ([89.40.174.40]:38156 "EHLO hostingweb31-40.netsons.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236154AbhJKP6r (ORCPT ); Mon, 11 Oct 2021 11:58:47 -0400 Received: from [77.244.183.192] (port=63592 helo=melee.dev.aim) by hostingweb31.netsons.net with esmtpa (Exim 4.94.2) (envelope-from ) id 1mZxfO-00DXft-DY; Mon, 11 Oct 2021 17:56:42 +0200 From: Luca Ceresoli To: linux-kernel@vger.kernel.org Cc: Luca Ceresoli , Lee Jones , Rob Herring , Alessandro Zummo , Alexandre Belloni , Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Wim Van Sebroeck , Guenter Roeck , devicetree@vger.kernel.org, linux-rtc@vger.kernel.org, linux-watchdog@vger.kernel.org, Chiwoong Byun , Laxman Dewangan Subject: [PATCH 3/8] rtc: max77686: rename day-of-month defines Date: Mon, 11 Oct 2021 17:56:10 +0200 Message-Id: <20211011155615.257529-4-luca@lucaceresoli.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211011155615.257529-1-luca@lucaceresoli.net> References: <20211011155615.257529-1-luca@lucaceresoli.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hostingweb31.netsons.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lucaceresoli.net X-Get-Message-Sender-Via: hostingweb31.netsons.net: authenticated_id: luca+lucaceresoli.net/only user confirmed/virtual account not confirmed X-Authenticated-Sender: hostingweb31.netsons.net: luca@lucaceresoli.net X-Source: X-Source-Args: X-Source-Dir: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RTC_DATE and REG_RTC_DATE are used for the registers holding the day of month. Rename these constants to mean what they mean. Signed-off-by: Luca Ceresoli --- drivers/rtc/rtc-max77686.c | 16 ++++++++-------- include/linux/mfd/max77686-private.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c index bac52cdea97d..7e765207f28e 100644 --- a/drivers/rtc/rtc-max77686.c +++ b/drivers/rtc/rtc-max77686.c @@ -57,7 +57,7 @@ enum { RTC_WEEKDAY, RTC_MONTH, RTC_YEAR, - RTC_DATE, + RTC_MONTHDAY, RTC_NR_TIME }; @@ -119,7 +119,7 @@ enum max77686_rtc_reg_offset { REG_RTC_WEEKDAY, REG_RTC_MONTH, REG_RTC_YEAR, - REG_RTC_DATE, + REG_RTC_MONTHDAY, REG_ALARM1_SEC, REG_ALARM1_MIN, REG_ALARM1_HOUR, @@ -150,7 +150,7 @@ static const unsigned int max77686_map[REG_RTC_END] = { [REG_RTC_WEEKDAY] = MAX77686_RTC_WEEKDAY, [REG_RTC_MONTH] = MAX77686_RTC_MONTH, [REG_RTC_YEAR] = MAX77686_RTC_YEAR, - [REG_RTC_DATE] = MAX77686_RTC_DATE, + [REG_RTC_MONTHDAY] = MAX77686_RTC_MONTHDAY, [REG_ALARM1_SEC] = MAX77686_ALARM1_SEC, [REG_ALARM1_MIN] = MAX77686_ALARM1_MIN, [REG_ALARM1_HOUR] = MAX77686_ALARM1_HOUR, @@ -233,7 +233,7 @@ static const unsigned int max77802_map[REG_RTC_END] = { [REG_RTC_WEEKDAY] = MAX77802_RTC_WEEKDAY, [REG_RTC_MONTH] = MAX77802_RTC_MONTH, [REG_RTC_YEAR] = MAX77802_RTC_YEAR, - [REG_RTC_DATE] = MAX77802_RTC_DATE, + [REG_RTC_MONTHDAY] = MAX77802_RTC_MONTHDAY, [REG_ALARM1_SEC] = MAX77802_ALARM1_SEC, [REG_ALARM1_MIN] = MAX77802_ALARM1_MIN, [REG_ALARM1_HOUR] = MAX77802_ALARM1_HOUR, @@ -288,7 +288,7 @@ static void max77686_rtc_data_to_tm(u8 *data, struct rtc_time *tm, /* Only a single bit is set in data[], so fls() would be equivalent */ tm->tm_wday = ffs(data[RTC_WEEKDAY] & mask) - 1; - tm->tm_mday = data[RTC_DATE] & 0x1f; + tm->tm_mday = data[RTC_MONTHDAY] & 0x1f; tm->tm_mon = (data[RTC_MONTH] & 0x0f) - 1; tm->tm_year = data[RTC_YEAR] & mask; tm->tm_yday = 0; @@ -309,7 +309,7 @@ static int max77686_rtc_tm_to_data(struct rtc_time *tm, u8 *data, data[RTC_MIN] = tm->tm_min; data[RTC_HOUR] = tm->tm_hour; data[RTC_WEEKDAY] = 1 << tm->tm_wday; - data[RTC_DATE] = tm->tm_mday; + data[RTC_MONTHDAY] = tm->tm_mday; data[RTC_MONTH] = tm->tm_mon + 1; if (info->drv_data->alarm_enable_reg) { @@ -565,8 +565,8 @@ static int max77686_rtc_start_alarm(struct max77686_rtc_info *info) data[RTC_MONTH] |= (1 << ALARM_ENABLE_SHIFT); if (data[RTC_YEAR] & info->drv_data->mask) data[RTC_YEAR] |= (1 << ALARM_ENABLE_SHIFT); - if (data[RTC_DATE] & 0x1f) - data[RTC_DATE] |= (1 << ALARM_ENABLE_SHIFT); + if (data[RTC_MONTHDAY] & 0x1f) + data[RTC_MONTHDAY] |= (1 << ALARM_ENABLE_SHIFT); ret = regmap_bulk_write(info->rtc_regmap, map[REG_ALARM1_SEC], data, ARRAY_SIZE(data)); diff --git a/include/linux/mfd/max77686-private.h b/include/linux/mfd/max77686-private.h index b1482b3cf353..3acceeedbaba 100644 --- a/include/linux/mfd/max77686-private.h +++ b/include/linux/mfd/max77686-private.h @@ -152,7 +152,7 @@ enum max77686_rtc_reg { MAX77686_RTC_WEEKDAY = 0x0A, MAX77686_RTC_MONTH = 0x0B, MAX77686_RTC_YEAR = 0x0C, - MAX77686_RTC_DATE = 0x0D, + MAX77686_RTC_MONTHDAY = 0x0D, MAX77686_ALARM1_SEC = 0x0E, MAX77686_ALARM1_MIN = 0x0F, MAX77686_ALARM1_HOUR = 0x10, @@ -352,7 +352,7 @@ enum max77802_rtc_reg { MAX77802_RTC_WEEKDAY = 0xCA, MAX77802_RTC_MONTH = 0xCB, MAX77802_RTC_YEAR = 0xCC, - MAX77802_RTC_DATE = 0xCD, + MAX77802_RTC_MONTHDAY = 0xCD, MAX77802_RTC_AE1 = 0xCE, MAX77802_ALARM1_SEC = 0xCF, MAX77802_ALARM1_MIN = 0xD0, -- 2.25.1