From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-watchdog <linux-watchdog@vger.kernel.org>,
Wim Van Sebroeck <wim@iguana.be>,
linux-kernel <linux-kernel@vger.kernel.org>,
kernel <kernel@savoirfairelinux.com>
Subject: Re: [v2,3/3] watchdog: max63xx: add heartbeat to platform data
Date: Mon, 22 Jun 2015 16:46:13 -0400 (EDT) [thread overview]
Message-ID: <497353189.111212.1435005973106.JavaMail.zimbra@savoirfairelinux.com> (raw)
In-Reply-To: <20150622165938.GA1526@roeck-us.net>
Hi Guenter,
On Jun 22, 2015, at 12:59 PM, Guenter Roeck linux@roeck-us.net wrote:
> Hi Vivien,
>
> On Wed, Jun 17, 2015 at 06:59:00PM -0400, Vivien Didelot wrote:
>> Actually, there is no way but the module parameter to set the desired
>> heartbeat. This patch allows a platform code to set it in the device
>> platform data. This is convenient for platforms and built-in drivers.
>>
>> To do so, initialize heartbeat to zero to allow the module parameter to
>> take precedence over the platform setting. If not set, it will still
>> default to DEFAULT_HEARTBEAT.
>
> I think that warrants a bit of discussion. Is the chip used on an
> x86 system (no devicetree), and is there reason to believe that the
> default watchdog timeout is not good enough until the watchdog application
> starts and can configure it to a different value ?
Indeed, I am using a MAX6373 device on an embedded Atom platform. The
default 60s heartbeat is not valid for this chip. I need the setting
with 10s heartbeat and 60s delay.
> This is also a bit more complicated since gpio pin 0 can be a valid gpio
> pin number, so you'd have to explicitly state "don't use gpio" in the
> platform data.
Indeed. Also, you may have a gpio pin 0 and don't want to use it. I'd
prefer to avoid any additional boolean if possible. Having at least one
positive integer seems safe. Would this be better?
/* GPIO or memory mapped? */
if (platform_get_resource(pdev, IORESOURCE_MEM, 0))
err = max63xx_mmap_init(pdev, wdt);
else if (wdt->pdata && (wdt->pdata->wdi || wdt->pdata->set0 ||
wdt->pdata->set1 || wdt->pdata->set2))
err = max63xx_gpio_init(pdev, wdt);
else
err = -EINVAL;
if (err)
return err;
Thanks,
-v
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2015-06-22 20:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 22:58 [PATCH v2 1/3] watchdog: max63xx: dynamically allocate device Vivien Didelot
2015-06-17 22:58 ` [PATCH v2 2/3] watchdog: max63xx: add GPIO support Vivien Didelot
2015-06-22 16:53 ` [v2,2/3] " Guenter Roeck
2015-06-22 20:43 ` Vivien Didelot
2015-06-27 16:17 ` Guenter Roeck
2015-06-30 5:21 ` Vivien Didelot
2015-06-17 22:59 ` [PATCH v2 3/3] watchdog: max63xx: add heartbeat to platform data Vivien Didelot
2015-06-22 16:59 ` [v2,3/3] " Guenter Roeck
2015-06-22 20:46 ` Vivien Didelot [this message]
2015-06-22 16:41 ` [v2,1/3] watchdog: max63xx: dynamically allocate device Guenter Roeck
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=497353189.111212.1435005973106.JavaMail.zimbra@savoirfairelinux.com \
--to=vivien.didelot@savoirfairelinux.com \
--cc=kernel@savoirfairelinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=wim@iguana.be \
/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
all inboxes | Powered by JetHome®