From: Guenter Roeck <linux@roeck-us.net>
To: "Ji-Ze Hong (Peter Hong)" <hpeter@gmail.com>, wim@iguana.be
Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
peter_hong@fintek.com.tw, tom_tsai@fintek.com.tw,
"Ji-Ze Hong (Peter Hong)" <hpeter+linux_kernel@gmail.com>
Subject: Re: [PATCH] watchdog: f71808e_wdt: Add F81866 support
Date: Tue, 7 Jun 2016 18:59:37 -0700 [thread overview]
Message-ID: <57577C09.7060009@roeck-us.net> (raw)
In-Reply-To: <663dec87-8b9e-f7a5-0224-991e8c528705@gmail.com>
On 06/07/2016 06:40 PM, Ji-Ze Hong (Peter Hong) wrote:
> Hi Guenter,
>
> Guenter Roeck 於 2016/6/7 下午 10:06 寫道:
>> On 06/05/2016 11:58 PM, Ji-Ze Hong (Peter Hong) wrote:
>>> +#define SIO_REG_PORT_SEL 0x27 /* F81866 Multi-Function Register */
>>> +#define SIO_REG_GPIO1 0x2c /*
>>> + * GPIO1 Control Register when 27h
>>> + * BIT3:2 = 01 & BIT0 = 0
>>> + *
>>> + * The PIN 70(GPIO15/WDTRST) is
>>> + * controlled by 2Ch:
>>> + * BIT5: 0 -> WDTRST#
>>> + * 1 -> GPIO15
>>> + */
>>> +
>> Please keep register defines in order, and move the explanation
>> to where the register values are set.
>
> OK. BTW, should I rename SIO_REG_PORT_SEL & SIO_REG_GPIO1 to
> SIO_F81866_REG_PORT_SEL & SIO_F81866_REG_GPIO1? It's only used by
> F81866.
>
Might be a good idea.
Thanks,
Guenter
>>> + case f81866:
>>> + /* Set pin 70 to WDTRST# */
>>> + superio_clear_bit(watchdog.sioaddr, SIO_REG_PORT_SEL, 9);
>>> + superio_set_bit(watchdog.sioaddr, SIO_REG_PORT_SEL, 4);
>>> + superio_clear_bit(watchdog.sioaddr, SIO_REG_GPIO1, 0x20);
>>
>> Using BIT() here would be a bit nicer. Yes, I know, it isn't done
>> everywhere
>> in this driver, but that doesn't mean we should not do it in added code.
>
> I'll use BIT() to re-write it.
>
> Thanks
prev parent reply other threads:[~2016-06-08 1:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 6:58 [PATCH] watchdog: f71808e_wdt: Add F81866 support Ji-Ze Hong (Peter Hong)
2016-06-07 14:06 ` Guenter Roeck
2016-06-08 1:40 ` Ji-Ze Hong (Peter Hong)
2016-06-08 1:59 ` Guenter Roeck [this message]
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=57577C09.7060009@roeck-us.net \
--to=linux@roeck-us.net \
--cc=hpeter+linux_kernel@gmail.com \
--cc=hpeter@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=peter_hong@fintek.com.tw \
--cc=tom_tsai@fintek.com.tw \
--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 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.