All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Samuel Ortiz" <sameo@linux.intel.com>,
	"Pádraig Brady" <P@draigBrady.com>
Subject: Re: [PATCH v2 0/8] watchdog: w83627hf: Convert to watchdog infrastructure
Date: Sat, 23 Mar 2013 08:01:36 -0700	[thread overview]
Message-ID: <20130323150136.GA17355@roeck-us.net> (raw)
In-Reply-To: <20130323125742.GG7867@spo001.leaseweb.com>

On Sat, Mar 23, 2013 at 01:57:42PM +0100, Wim Van Sebroeck wrote:
> Hi Guenter,
> 
> > > In 2011 I started something similar but then with the MFD approach in mind.
> > > Goal was also to clean-up the w836* watchdog drivers and get a clean driver that
> > > supports all Winbond super-I/O based watchdog drivers.
> > > 
> > > I dug op the development code again. I'll post it in a next e-mail so that we can
> > > see what the best way forward is. Note: I took the MFD approach because:
> > > 1) all superio shares the similar functions for using the Super-I/O registers.
> > > 2) Goal is to have low-level driver that support the specific super-I/O chipsets
> > > and that does the platform stuff for hwmon, watchdog, gpio, ...
> > > 
> > Hi Wim,
> > 
> > I started with a similar approach, only I used mfd cells to pass on platform
> > specific information such as the device type and the superio base address.
> > I still have the patchset for the mfd driver, in case you are interested.
> > My code is based on the patches submitted by Rodolfo Giometti a couple
> > of years ago. Want me to post it ?
> 
> If it's not v1 then I am interested.
> I think it depends on the super-I/O chipset of what info you can pass. I would
> not use mfd cells for the winbond driver but use platform data (similar to
> drivers/mfd/adp5520.c) because you don't need more then just pass some data.
> 
Actually one can pass platform data through mfd cells, which is what I do.
I pass the SIO address, the chip type (as enum), and the chip name to the
platform driver.

> > What I noticed in my testing is that the superio address range (2e or 4e),
> > which the drivers currently take as granted, is at least on my systems
> > (all three of them) reserved by ACPI. Unfortunately that means one can not
> > use the mfd infrastructure to pass on the superio memory region,
> > since it checks for acpi conflicts. With that I gave up on the idea and
> > reverted to using request_muxed_region. That seemed simpler and accomplish
> > the same as long as all drivers actually use it.
> 
> Noticed the same. That's why passing the platform data together with the
> superio-address and type seems the best way to go. I also kept the superio_enter
> and superio_exit a function in the low level driver because I used a lock to
> make sure that the hwmon code doesn't start doing things when the watchdog is
> doing things. But I think that the request_muxed_region is doing something similar
> also.
> 
Yes, it does the same. Only difference is that using a function in the mfd
driver increases the use count on it when a client module is loaded.

Patch follows.

Thanks,
Guenter

  reply	other threads:[~2013-03-23 22:43 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-10 23:14 [PATCH v2 0/8] watchdog: w83627hf: Convert to watchdog infrastructure Guenter Roeck
2013-03-10 23:14 ` [PATCH v2 1/7] " Guenter Roeck
2013-03-10 23:14   ` Guenter Roeck
2013-03-10 23:14 ` [PATCH v2 2/7] watchdog: w83627hf: Enable watchdog only once Guenter Roeck
2013-03-19 17:26   ` Pádraig Brady
2013-03-19 17:26     ` Pádraig Brady
2013-03-19 20:02     ` Guenter Roeck
2013-03-19 20:02       ` Guenter Roeck
2013-03-21 18:40       ` Pádraig Brady
2013-03-21 18:40         ` Pádraig Brady
2013-03-10 23:14 ` [PATCH v2 3/7] watchdog: w83627hf: Enable watchdog device only if not already enabled Guenter Roeck
2013-03-10 23:14 ` [PATCH v2 4/7] watchdog: w83627hf: Use helper functions to access superio registers Guenter Roeck
2013-03-10 23:14 ` [PATCH v2 5/7] watchdog: w83627hf: Auto-detect IO address and supported chips Guenter Roeck
2013-03-10 23:14 ` [PATCH v2 6/7] watchdog: w83627hf: Add support for W83697HF and W83697UG Guenter Roeck
2013-03-10 23:15 ` [PATCH v2 7/7] watchdog: Remove drivers " Guenter Roeck
2013-03-10 23:15   ` Guenter Roeck
2013-03-22 20:52 ` [PATCH v2 0/8] watchdog: w83627hf: Convert to watchdog infrastructure Wim Van Sebroeck
2013-03-22 21:09   ` [RFC] winbond Super-I/O MFD driver Wim Van Sebroeck
2013-03-22 21:09     ` Wim Van Sebroeck
2013-03-23  0:28   ` [PATCH v2 0/8] watchdog: w83627hf: Convert to watchdog infrastructure Guenter Roeck
2013-03-23 12:57     ` Wim Van Sebroeck
2013-03-23 15:01       ` Guenter Roeck [this message]
2013-03-23 15:15       ` mfd: Core driver for W836{2389}7[T]HF Guenter Roeck
2013-03-23 17:49     ` mfd: Core driver for Winbond chips Guenter Roeck
2013-03-24  2:39       ` Guenter Roeck
2013-04-09  9:37       ` Samuel Ortiz
2013-04-09 11:36         ` Guenter Roeck
2013-04-09 11:45           ` Wim Van Sebroeck
2013-04-09 16:18             ` Guenter Roeck
2013-04-09 17:31               ` Wim Van Sebroeck
2013-04-10  0:36                 ` Guenter Roeck
2013-04-10 20:59                   ` Wim Van Sebroeck
2013-04-29 15:00                     ` Guenter Roeck
2013-04-09 11:37         ` Wim Van Sebroeck

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=20130323150136.GA17355@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=P@draigBrady.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --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.