linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: bd70528: Fix hour register mask
@ 2020-01-15  8:29 Matti Vaittinen
  2020-01-17  7:44 ` Vaittinen, Matti
  0 siblings, 1 reply; 6+ messages in thread
From: Matti Vaittinen @ 2020-01-15  8:29 UTC (permalink / raw)
  To: matti.vaittinen, mazziesaccount
  Cc: Lee Jones, Alexandre Belloni, linux-kernel

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 <matti.vaittinen@fi.rohmeurope.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---

I just noticed this was never applied. I'd like to get this in as
we currently have bd70528 RTC not working in few exiting releases.
(Or it works as long as time is not set at the evening :/)

I think this once was in RTC tree but was dropped as Lee mentioned this
belongs to MFD. Thus I dared to add the Alexandre's acked-by - please
let me know if this is not Ok.

Lee, can you please pull this in so that we get the fix
in-tree? I guess the fixes tag helps this to be included in some
existing branches.

 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 1013e60c5b25..b0109ee6dae2 100644
--- 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
-- 
2.21.0


-- 
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =] 

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mfd: bd70528: Fix hour register mask
  2020-01-15  8:29 [PATCH] mfd: bd70528: Fix hour register mask Matti Vaittinen
@ 2020-01-17  7:44 ` Vaittinen, Matti
  2020-01-17  7:57   ` gregkh
  0 siblings, 1 reply; 6+ messages in thread
From: Vaittinen, Matti @ 2020-01-17  7:44 UTC (permalink / raw)
  To: mazziesaccount; +Cc: sashal, gregkh, linux-kernel, lee.jones, alexandre.belloni

Hello Lee, Alexandre, Greg & Sasha

On Wed, 2020-01-15 at 10:29 +0200, Matti Vaittinen wrote:
> 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 <matti.vaittinen@fi.rohmeurope.com>
> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
> 
> I just noticed this was never applied. I'd like to get this in as
> we currently have bd70528 RTC not working in few exiting releases.
> (Or it works as long as time is not set at the evening :/)
> 
> I think this once was in RTC tree but was dropped as Lee mentioned
> this
> belongs to MFD. Thus I dared to add the Alexandre's acked-by - please
> let me know if this is not Ok.
> 
> Lee, can you please pull this in so that we get the fix
> in-tree? I guess the fixes tag helps this to be included in some
> existing branches.

Actually - I don't know if applying this in MFD is good idea. The
BD71828 support series

(
https://lore.kernel.org/lkml/cover.1579078681.git.matti.vaittinen@fi.rohmeurope.com/
)

will fix this when applied (and conflict with this if both are
applied). I would like to get this fix in 5.4 though - but I don't
think the BD71828 series should be in 5.4.

Is it possible to get this in 5.4 stable - while leaving this out of
current MFD tree and applying the BD71828 series to MFD?

> 
>  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 1013e60c5b25..b0109ee6dae2 100644
> --- 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
> -- 
> 2.21.0
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mfd: bd70528: Fix hour register mask
  2020-01-17  7:44 ` Vaittinen, Matti
@ 2020-01-17  7:57   ` gregkh
  2020-01-17  8:06     ` Vaittinen, Matti
  0 siblings, 1 reply; 6+ messages in thread
From: gregkh @ 2020-01-17  7:57 UTC (permalink / raw)
  To: Vaittinen, Matti
  Cc: mazziesaccount, sashal, linux-kernel, lee.jones, alexandre.belloni

On Fri, Jan 17, 2020 at 07:44:07AM +0000, Vaittinen, Matti wrote:
> Hello Lee, Alexandre, Greg & Sasha
> 
> On Wed, 2020-01-15 at 10:29 +0200, Matti Vaittinen wrote:
> > 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 <matti.vaittinen@fi.rohmeurope.com>
> > Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> > ---
> > 
> > I just noticed this was never applied. I'd like to get this in as
> > we currently have bd70528 RTC not working in few exiting releases.
> > (Or it works as long as time is not set at the evening :/)
> > 
> > I think this once was in RTC tree but was dropped as Lee mentioned
> > this
> > belongs to MFD. Thus I dared to add the Alexandre's acked-by - please
> > let me know if this is not Ok.
> > 
> > Lee, can you please pull this in so that we get the fix
> > in-tree? I guess the fixes tag helps this to be included in some
> > existing branches.
> 
> Actually - I don't know if applying this in MFD is good idea. The
> BD71828 support series
> 
> (
> https://lore.kernel.org/lkml/cover.1579078681.git.matti.vaittinen@fi.rohmeurope.com/
> )
> 
> will fix this when applied (and conflict with this if both are
> applied). I would like to get this fix in 5.4 though - but I don't
> think the BD71828 series should be in 5.4.
> 
> Is it possible to get this in 5.4 stable - while leaving this out of
> current MFD tree and applying the BD71828 series to MFD?

We only take patches that are in Linus's tree for the stable tree,
unless there are very big reasons not to do so (i.e. it is totally
rewritten in a different way there.)

Once the change/fix is in Linus's tree, then you can backport it to
stable in a different way if you want, but you need to give lots of
reasons why it is done that way.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mfd: bd70528: Fix hour register mask
  2020-01-17  7:57   ` gregkh
@ 2020-01-17  8:06     ` Vaittinen, Matti
  2020-01-17 10:10       ` Lee Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Vaittinen, Matti @ 2020-01-17  8:06 UTC (permalink / raw)
  To: gregkh; +Cc: mazziesaccount, sashal, linux-kernel, lee.jones, alexandre.belloni


On Fri, 2020-01-17 at 08:57 +0100, gregkh@linuxfoundation.org wrote:
> On Fri, Jan 17, 2020 at 07:44:07AM +0000, Vaittinen, Matti wrote:
> > 
> > Is it possible to get this in 5.4 stable - while leaving this out
> > of
> > current MFD tree and applying the BD71828 series to MFD?
> 
> We only take patches that are in Linus's tree for the stable tree,
> unless there are very big reasons not to do so (i.e. it is totally
> rewritten in a different way there.)
> 
> Once the change/fix is in Linus's tree, then you can backport it to
> stable in a different way if you want, but you need to give lots of
> reasons why it is done that way.

Right. Thanks for the explanation Greg. I have no _strong_ reasons -
which means I'll split the RTC support patch in BD71828 series into two
- first of the patches being this fix, second being the BD71828
support. Then this fix can be taken in 5.4 after it has been merged to
Linus' tree - the BD71828 support can be omitted from 5.4

I hope the BD71828 series could still make it to next release - but if
it wont, then it might be in next after that :]

Lee, please skip this one, I'll do v10 of the BD71828 series where this
fix is included as separate fix-patch.

Regards
	Matti

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mfd: bd70528: Fix hour register mask
  2020-01-17  8:06     ` Vaittinen, Matti
@ 2020-01-17 10:10       ` Lee Jones
  2020-01-17 10:11         ` Vaittinen, Matti
  0 siblings, 1 reply; 6+ messages in thread
From: Lee Jones @ 2020-01-17 10:10 UTC (permalink / raw)
  To: Vaittinen, Matti
  Cc: gregkh, mazziesaccount, sashal, linux-kernel, alexandre.belloni

On Fri, 17 Jan 2020, Vaittinen, Matti wrote:

> 
> On Fri, 2020-01-17 at 08:57 +0100, gregkh@linuxfoundation.org wrote:
> > On Fri, Jan 17, 2020 at 07:44:07AM +0000, Vaittinen, Matti wrote:
> > > 
> > > Is it possible to get this in 5.4 stable - while leaving this out
> > > of
> > > current MFD tree and applying the BD71828 series to MFD?
> > 
> > We only take patches that are in Linus's tree for the stable tree,
> > unless there are very big reasons not to do so (i.e. it is totally
> > rewritten in a different way there.)
> > 
> > Once the change/fix is in Linus's tree, then you can backport it to
> > stable in a different way if you want, but you need to give lots of
> > reasons why it is done that way.
> 
> Right. Thanks for the explanation Greg. I have no _strong_ reasons -
> which means I'll split the RTC support patch in BD71828 series into two
> - first of the patches being this fix, second being the BD71828
> support. Then this fix can be taken in 5.4 after it has been merged to
> Linus' tree - the BD71828 support can be omitted from 5.4
> 
> I hope the BD71828 series could still make it to next release - but if
> it wont, then it might be in next after that :]
> 
> Lee, please skip this one, I'll do v10 of the BD71828 series where this
> fix is included as separate fix-patch.

Will look out for it.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mfd: bd70528: Fix hour register mask
  2020-01-17 10:10       ` Lee Jones
@ 2020-01-17 10:11         ` Vaittinen, Matti
  0 siblings, 0 replies; 6+ messages in thread
From: Vaittinen, Matti @ 2020-01-17 10:11 UTC (permalink / raw)
  To: lee.jones; +Cc: mazziesaccount, sashal, gregkh, linux-kernel, alexandre.belloni


On Fri, 2020-01-17 at 10:10 +0000, Lee Jones wrote:
> On Fri, 17 Jan 2020, Vaittinen, Matti wrote:
> 
> > On Fri, 2020-01-17 at 08:57 +0100, gregkh@linuxfoundation.org
> > wrote:
> > > On Fri, Jan 17, 2020 at 07:44:07AM +0000, Vaittinen, Matti wrote:
> > > > Is it possible to get this in 5.4 stable - while leaving this
> > > > out
> > > > of
> > > > current MFD tree and applying the BD71828 series to MFD?
> > > 
> > > We only take patches that are in Linus's tree for the stable
> > > tree,
> > > unless there are very big reasons not to do so (i.e. it is
> > > totally
> > > rewritten in a different way there.)
> > > 
> > > Once the change/fix is in Linus's tree, then you can backport it
> > > to
> > > stable in a different way if you want, but you need to give lots
> > > of
> > > reasons why it is done that way.
> > 
> > Right. Thanks for the explanation Greg. I have no _strong_ reasons
> > -
> > which means I'll split the RTC support patch in BD71828 series into
> > two
> > - first of the patches being this fix, second being the BD71828
> > support. Then this fix can be taken in 5.4 after it has been merged
> > to
> > Linus' tree - the BD71828 support can be omitted from 5.4
> > 
> > I hope the BD71828 series could still make it to next release - but
> > if
> > it wont, then it might be in next after that :]
> > 
> > Lee, please skip this one, I'll do v10 of the BD71828 series where
> > this
> > fix is included as separate fix-patch.
> 
> Will look out for it.
> 
Thanks! It should be on it's way through the mail servers :]

Br,
	Matti Vaittinen


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-17 10:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15  8:29 [PATCH] mfd: bd70528: Fix hour register mask Matti Vaittinen
2020-01-17  7:44 ` Vaittinen, Matti
2020-01-17  7:57   ` gregkh
2020-01-17  8:06     ` Vaittinen, Matti
2020-01-17 10:10       ` Lee Jones
2020-01-17 10:11         ` Vaittinen, Matti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).