All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Raphaël Assénat" <raph@8d.com>
To: Mike Rapoport <mike@compulab.co.il>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] RTC v3020 fixes
Date: Wed, 15 Aug 2007 08:59:53 -0400	[thread overview]
Message-ID: <46C2F8C9.6020806@8d.com> (raw)
In-Reply-To: <46C292F2.1050401@compulab.co.il>

Mike Rapoport wrote:
> Fix off-by-one in month calculations
> Add delay for bus accesses to satisfy Tw > 500ns
> 
*snip*
> @@ -135,7 +140,7 @@ static int v3020_set_time(struct device *dev, struct 
> rtc_time *dt)
>      v3020_set_reg(chip, V3020_MINUTES,     BIN2BCD(dt->tm_min));
>      v3020_set_reg(chip, V3020_HOURS,     BIN2BCD(dt->tm_hour));
>      v3020_set_reg(chip, V3020_MONTH_DAY,    BIN2BCD(dt->tm_mday));
> -    v3020_set_reg(chip, V3020_MONTH,     BIN2BCD(dt->tm_mon));
> +    v3020_set_reg(chip, V3020_MONTH,     BIN2BCD(dt->tm_mon) + 1);

This should be BIN2BCD(dt->tm_mon + 1)) instead. Otherwise, in october (month 
9), the final value will be 0xa instead of 0x10.

Other than that, the patch looks fine to me. You can add
Acked-by: Raphael Assenat <raph@8d.com> to the updated patch.

Please add Alessandro Zummo <a.zummo@towertech.it> in the CC list to make sure 
he sees it.

Best regards,
Raphaël Assénat

  reply	other threads:[~2007-08-15 13:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-15  5:45 [PATCH] RTC v3020 fixes Mike Rapoport
2007-08-15 12:59 ` Raphaël Assénat [this message]
2007-08-15 14:02   ` Mike Rapoport
  -- strict thread matches above, loose matches on Subject: below --
2007-08-23  6:28 Mike Rapoport
2007-08-23  6:56 ` Satyam Sharma
2007-08-23  7:34   ` Mike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46C2F8C9.6020806@8d.com \
    --to=raph@8d.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike@compulab.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.