From patchwork Fri Jan 17 09:40:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 207385 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED96DC33CB6 for ; Fri, 17 Jan 2020 09:40:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE5462053B for ; Fri, 17 Jan 2020 09:40:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726867AbgAQJkn (ORCPT ); Fri, 17 Jan 2020 04:40:43 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:38070 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726329AbgAQJkn (ORCPT ); Fri, 17 Jan 2020 04:40:43 -0500 Received: by mail-lj1-f196.google.com with SMTP id w1so25808684ljh.5; Fri, 17 Jan 2020 01:40:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Ud7ITkHfz2ijo2Ha+C03I2MlyX1iXMzzUr4DSwAJUp4=; b=AxSzcTGVMgLG6qweOEXe69Qmw7l8x/87ekakAZxptTBQLHGaBsHSh9SePHTQh/63oO 75aiVcK702OAGPAXmeagOKR8HdRh696GR9itmVm3lVst35jmSoitFORhJ4XMd5vkDjvt dd4sXelFYddXyQheseRPjD+Wbrvs1FmmkF+iw64nbJ9+TGVjQQG5IPEi+tWmJ4C2edxa xq4xYblqJczXPdW25vJe8YdDzF75qTgg2oeWqIpUeORHIeHu7pks+jlYlyuXTUqUiD3q s9w9tIKwhnsaVvWveYPMhoGQoIvbm9KwfTpKTcTTL0oHqjU2zX8It8alBljsLfikcTb9 oUAA== X-Gm-Message-State: APjAAAV4n+H32/59O5vKHGpbxxOVWOE+pdlxkyyC/YYa5GAgFPhWq3EG JhDulea0464egLl/Ob+uv5I= X-Google-Smtp-Source: APXvYqzkzDMAwILnjn1DfFXZsETXmDHz1zkgO6ZkLPVdkfV8O+faQ4l3dY5eN0CZc51RgCfs4lbEKw== X-Received: by 2002:a2e:7311:: with SMTP id o17mr5240842ljc.197.1579254040425; Fri, 17 Jan 2020 01:40:40 -0800 (PST) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id b19sm12124210ljk.25.2020.01.17.01.40.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2020 01:40:39 -0800 (PST) Date: Fri, 17 Jan 2020 11:40:28 +0200 From: Matti Vaittinen To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com Cc: Jacek Anaszewski , Pavel Machek , Dan Murphy , Rob Herring , Mark Rutland , Lee Jones , Michael Turquette , Stephen Boyd , Linus Walleij , Bartosz Golaszewski , Liam Girdwood , Mark Brown , Alessandro Zummo , Alexandre Belloni , Matti Vaittinen , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org Subject: [PATCH v10 09/13] mfd: bd70528: Fix hour register mask Message-ID: <8609d42822a6ce3755e2166b8c1246b3b04eeb78.1579249511.git.matti.vaittinen@fi.rohmeurope.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org When RTC is used in 24H mode (and it is by this driver) the maximum hour value is 24 in BCD. This occupies bits [5:0] - which means correct mask for HOUR register is 0x3f not 0x1f. Fix the mask Fixes: 32a4a4ebf768 ("rtc: bd70528: Initial support for ROHM bd70528 RTC") Signed-off-by: Matti Vaittinen Acked-by: Alexandre Belloni --- Changes: Splitted this fix into separate patch which can be applied to 5.4 too include/linux/mfd/rohm-bd70528.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mfd/rohm-bd70528.h b/include/linux/mfd/rohm-bd70528.h index 2ad2320d0a96..edae6f7afd8e 100644 --- a/include/linux/mfd/rohm-bd70528.h +++ b/include/linux/mfd/rohm-bd70528.h @@ -311,7 +311,7 @@ enum { #define BD70528_MASK_RTC_MINUTE 0x7f #define BD70528_MASK_RTC_HOUR_24H 0x80 #define BD70528_MASK_RTC_HOUR_PM 0x20 -#define BD70528_MASK_RTC_HOUR 0x1f +#define BD70528_MASK_RTC_HOUR 0x3f #define BD70528_MASK_RTC_DAY 0x3f #define BD70528_MASK_RTC_WEEK 0x07 #define BD70528_MASK_RTC_MONTH 0x1f