From patchwork Mon Feb 10 12:33:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 231939 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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 18C6AC352A4 for ; Mon, 10 Feb 2020 12:55:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD21F20708 for ; Mon, 10 Feb 2020 12:55:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581339325; bh=EoklstDWNnn2rWz0l7oezB9IjLDwq59jnrNWLRfUkFg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=lTRnSPcJcn0YhD9JV/hhJj6567WaATIpnJsUvuEn5GrfIu8aJbifZe1szcFWqWdNW mZTczqt036K1EPFQXMcXA8uH3SHS3rVpDLqRMUVtTMEINOsZubb2xAMynHF7+1jh34 RFEQcWxeUS2GCtQ/qvezSarHKoEADjc+HeN/aZRo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729305AbgBJMzY (ORCPT ); Mon, 10 Feb 2020 07:55:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:44888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730075AbgBJMlt (ORCPT ); Mon, 10 Feb 2020 07:41:49 -0500 Received: from localhost (unknown [209.37.97.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B229B2080C; Mon, 10 Feb 2020 12:41:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338508; bh=EoklstDWNnn2rWz0l7oezB9IjLDwq59jnrNWLRfUkFg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A/TGU23ZwtTK2L9YPJhG6cfR8RhGmg12oX+soGsU1pS7Ty8TSV+ZqBcgz34dpFG2a VHSMQzrU0RiNEWI+tE5zhyOsev0rdNZqDB8r2rQHOcn4wrHJZPDM4RSc46KH9kCD36 /G3LD7ORCluAUT7icZxulTTtnhKjiu5A7h4RNEw0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matti Vaittinen , Alexandre Belloni , Lee Jones Subject: [PATCH 5.5 311/367] mfd: bd70528: Fix hour register mask Date: Mon, 10 Feb 2020 04:33:44 -0800 Message-Id: <20200210122452.013434780@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Matti Vaittinen commit 6c883472e1c11cb05561b6dd0c28bb037c2bf2de upstream. 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 Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman --- include/linux/mfd/rohm-bd70528.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/mfd/rohm-bd70528.h +++ b/include/linux/mfd/rohm-bd70528.h @@ -317,7 +317,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