linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: kernel list <linux-kernel@vger.kernel.org>
Cc: Patrick Mochel <mochel@osdl.org>, Pavel Machek <pavel@ucw.cz>,
	torvalds@osdl.org
Subject: Re: [PM] Patrick: which part of "maintainer" and "peer review" needs explaining to you?
Date: Sun, 24 Aug 2003 13:08:07 +0100	[thread overview]
Message-ID: <20030824130807.C16635@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20030823114738.B25729@flint.arm.linux.org.uk>; from rmk@arm.linux.org.uk on Sat, Aug 23, 2003 at 11:47:38AM +0100

Ok, another issue.

UCB1x00 devices.  I now have two implementations of drivers for these
devices, one trying to use the device/driver model and failing badly
with only half the functionality supported.  The other one is based
around one class, one class device, and several class interfaces.

What we have for the class model is:

  MCP driver (on platform bus) ----> UCB1x00 device

  UCB1x00 core driver ---> UCB1x00 class device contained within core driver
                           data structure

Then we have the UCB1x00 touchscreen, audio, random platform specific
GPIO drivers (0 to 13), random ADC drivers (0 to 4) which are class
interfaces.  The GPIO signals get used as interrupts, key inputs
(so would be an input device driver), another (slow) control bus,
or random device control.

The advantage with the class implementation is that you can register
as many class interfaces as you like against one class device - so
the UCB1x00 driver itself doesn't have to worry about the platform
specific details.  Those can be handled by a separate per-platform
"interface".

The class implementation seems to be better, but I'm hitting a snag -
power management.  The touchscreen and audio needs suspend/resume
support to work correctly (so DMA can be shut down, and touchscreen
threads woken up to ensure we aren't missing an interrupt.)

Unfortunately, the class model doesn't provide this functionality.

The device model does, but that then gives us a problem - how to handle
all the platform specific implementation details (ie, gpio and adc
drivers) sanely.  We can't create 17 struct devices just to let
platform specific drivers bind to what they need - that'd be insane
in terms of the overhead (struct bus_type + n * struct device
+ m * struct device_driver) but it does get us power management.

And one big UCB1x00 driver would be stuffed full of ifdefs, with
sound, input, and other random subsystem drivers all rolled into one.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


  parent reply	other threads:[~2003-08-24 12:08 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-22 21:08 [PM] Patrick: which part of "maintainer" and "peer review" needs explaining to you? Pavel Machek
2003-08-22 21:25 ` Patrick Mochel
2003-08-22 21:53   ` Pavel Machek
2003-08-22 22:05     ` Patrick Mochel
2003-08-23  1:03       ` Nigel Cunningham
2003-08-23 16:22       ` Benjamin Herrenschmidt
2003-08-25 19:05         ` [PM] powering down special devices Patrick Mochel
2003-08-25 19:53           ` Benjamin Herrenschmidt
2003-08-25  9:52       ` [PM] Patrick: which part of "maintainer" and "peer review" needs explaining to you? Pavel Machek
2003-08-22 22:10   ` Pavel Machek
2003-08-22 22:13     ` Patrick Mochel
2003-08-22 22:17       ` Patrick Mochel
2003-08-22 22:36   ` Pavel Machek
2003-08-23 10:47   ` Russell King
2003-08-24 11:54     ` Russell King
2003-08-26 15:39       ` [PM] Config Options Patrick Mochel
2003-08-24 12:08     ` Russell King [this message]
2003-08-25 15:47     ` [PM] Patrick: which part of "maintainer" and "peer review" needs explaining to you? Patrick Mochel
2003-08-25 16:27       ` Russell King
2003-08-25 16:57         ` Matt Porter
2003-08-25 17:14           ` Russell King
2003-08-25 17:34             ` Matt Porter
2003-08-28 15:38         ` Platform Devices Patrick Mochel
2003-09-01 12:02         ` [PM] Patrick: which part of "maintainer" and "peer review" needs explaining to you? Pavel Machek
2003-09-02 17:41           ` Jens Axboe
2003-09-09 20:19             ` Benjamin Herrenschmidt
2003-09-09 20:24               ` Jens Axboe
2003-09-09 21:43               ` Patrick Mochel
2003-09-09 22:54                 ` Pavel Machek
2003-09-09 23:07                   ` Patrick Mochel
2003-09-09 23:07                     ` [PM] Passing suspend level down to drivers Pavel Machek
2003-09-09 23:23                       ` Patrick Mochel
2003-09-10  0:06                         ` Pavel Machek
2003-09-10  6:12                       ` Stephen Rothwell
2003-09-10 11:48                         ` Alan Cox
2003-09-09 23:15                     ` [PM] Patrick: which part of "maintainer" and "peer review" needs explaining to you? Alan Cox
2003-09-09 22:56               ` Pavel Machek
2003-08-25 17:16       ` Russell King
2003-08-22 22:04 ` Timothy Miller

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=20030824130807.C16635@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@osdl.org \
    --cc=pavel@ucw.cz \
    --cc=torvalds@osdl.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).