linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jamie@jamieiles.com (Jamie Iles)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] watchdog: add support for the Synopsys DesignWare WDT
Date: Wed, 12 Jan 2011 11:30:54 +0000	[thread overview]
Message-ID: <20110112113054.GA2658@pulham.picochip.com> (raw)
In-Reply-To: <AANLkTim2LJVA+qJNqYd2uPNKjP54kuyvsZ7-T3jSJsta@mail.gmail.com>

On Wed, Jan 12, 2011 at 02:27:47PM +0530, viresh kumar wrote:
> Jamie,
> 
> On Wed, Jan 12, 2011 at 1:54 PM, Jamie Iles <jamie@jamieiles.com> wrote:
> >> I don't know why, but checkpatch used to give few errors which it is
> >> not giving now.
> >> Like:
> >> - Mixing spaces and tabs
> >> - Line over 80 columns.
> >>
> >> There are few places in this patch where i have seen these issues, but
> >> checkpatch doesn't
> >> report them at all.
> >
> > Hmm, the only lines over 80 chars are printk lines and I can't see any
> > with mixed spaces and tabs...
> 
> There are few in file drivers/watchdog/dw_wdt.c
> line 40-45, 127, 133, 156, 167, 204, 216, 315, 319.

I do need to fix up the register locations (40-45) but the others are ok 
- they are tab indented to get to a multiple of 8 then spaces to align 
to the '(' brackets etc.

> >> I know it doesn't make sense for a platform to have support for clk framework
> >> and pass rate through plat data. But this code will always take
> >> pdata->rate, if it is passed.
> >> Wouldn't it be better if we reverse the sequence.
> >>
> >> if (clk)
> >> ?rate = clk_get_rate(...);
> >> else {
> >> ?pdata = pdev->dev.platform_data;
> >> ?if (pdata)
> >> ? rate = pdata->rate;
> >> }
> >>
> >> and then following code
> >
> > That's what I did first (without the test that clk is not NULL) but
> > switched it the other way round so that the platform can override the
> > frequency by setting platform_data->clk_rate to nonzero. ?That just
> > seems a little more flexible and easy for testing but I'm happy to
> > switch the order if you feel that's important.
> >
> 
> Problem will occur if rate is dynamically changed and we are still believing
> on platform code's clk_rate.
> Would be better if we switch order. i.e. give priority to clk_get_rate over
> pdata->rate.

If the platform can change the rate then I don't see why it would define 
the rate in the platform data though.  Anyway, I can make the change and 
issue a warning and fail the probe if we're using the rate from 
clk_get_rate() and there is a non-zero rate in the platform data.

Jamie

  parent reply	other threads:[~2011-01-12 11:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-10 15:59 [PATCH] watchdog: add support for the Synopsys DesignWare WDT Jamie Iles
2011-01-12  5:16 ` viresh kumar
2011-01-12  8:24   ` Jamie Iles
2011-01-12  8:57     ` viresh kumar
2011-01-12  9:07       ` Russell King - ARM Linux
2011-01-12 11:30       ` Jamie Iles [this message]
2011-01-12 11:38         ` viresh kumar
2011-01-12 12:33           ` Jamie Iles
2011-01-21 18:08   ` Jamie Iles
2011-01-24  4:06     ` viresh kumar
  -- strict thread matches above, loose matches on Subject: below --
2011-01-10 10:55 Jamie Iles
2011-01-10 13:21 ` Wim Van Sebroeck
2011-01-10 13:33   ` Jamie Iles
2011-01-10 13:58 ` Wim Van Sebroeck
2011-01-07 11:41 Jamie Iles

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=20110112113054.GA2658@pulham.picochip.com \
    --to=jamie@jamieiles.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 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).