From patchwork Mon Jan 20 09:21:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 1225781 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fi.rohmeurope.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 481R5F0gXDz9sR1 for ; Mon, 20 Jan 2020 20:22:08 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726642AbgATJWH (ORCPT ); Mon, 20 Jan 2020 04:22:07 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:34904 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbgATJWH (ORCPT ); Mon, 20 Jan 2020 04:22:07 -0500 Received: by mail-lj1-f195.google.com with SMTP id j1so33020755lja.2; Mon, 20 Jan 2020 01:22:05 -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=5QNVtAV9LaUH05D29OP9f7feVsXbDJBH0BokQEGeup4=; b=t60JVTyOZzFzeG+t3trU/QAN7yFrEZeQsUbo1kGGfnovaRRiPyzPw+dDuv6xx5BxxQ w1sxTC0oiCo9LM2fdprgCP/DG0gnNrFdpDhpC1zGwJlvXaYhmAsMiJsXqdP17OInIUCA 0vAH63VWXtPvyd8GgdKypfP76SyKAE7SsV9A5E87OrPAH0jwMLzFHf8TZlkdVL13ckeC iBf6qlY36VyU/inI7wx2ZYupnNzCNcVq4F+nVrd7Io6PmnVGwMT+rI9jGxUiV8qxhyGo iblzaHeacBZTiJHlsWwtoAkT+m6qzSPT330atNvB8ANVAYwWoAU4hhsVQHl7k3cW+o3p rzOA== X-Gm-Message-State: APjAAAWT1fPmsclUqod3iL6ItUgDGM4+noYk3Pg0uqrQmS9OarPipKym txp+bn0wT2GPT464d0Mz2jo= X-Google-Smtp-Source: APXvYqzZrImG4w7dSD6Ts2Pz2OrkRSy9Df8jJq2qJSfOwYXgHA1ytm6kJdHuPWz6JJbI8W/ij8K5Yg== X-Received: by 2002:a2e:86d6:: with SMTP id n22mr13149472ljj.77.1579512124272; Mon, 20 Jan 2020 01:22:04 -0800 (PST) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id u23sm3593470lfg.89.2020.01.20.01.22.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 01:22:03 -0800 (PST) Date: Mon, 20 Jan 2020 11:21:51 +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 , Liam Girdwood , Mark Brown , Jonathan Corbet , Michael Turquette , Stephen Boyd , Linus Walleij , Bartosz Golaszewski , Alessandro Zummo , Alexandre Belloni , Greg Kroah-Hartman , Arnd Bergmann , Mauro Carvalho Chehab , Wolfram Sang , Phil Edworthy , Noralf =?iso-8859-1?q?Tr=F8nnes?= , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org Subject: [PATCH v12 09/10] mfd: bd70528: Fix hour register mask Message-ID: 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 Acked-for-MFD-by: Lee Jones --- 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