Linux I2C development
 help / color / mirror / Atom feed
From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Michael Lawnick <nospam_lawnick-Mmb7MZpHnFY@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Request for Clarification: old - legacy - new driver model
Date: Mon, 9 Mar 2009 15:38:51 +0100	[thread overview]
Message-ID: <20090309153851.6d92729e@hyperion.delvare> (raw)
In-Reply-To: <gp385s$a2i$1@ger.gmane.org>

On Mon, 09 Mar 2009 15:13:16 +0100, Michael Lawnick wrote:
> Hi Jean,
> 
> I have now got a 2.6.28.7 Kernel to play with on my board.
> I assume I have to patch some files to get the same play ground as you,
> right? Could you give me the msgIds/links?

Sorry but I don't quire follow you here. What play ground are you
talking about?

> Jean Delvare said the following:
> > Hi Michael,
> (...)
> >> > This is one of the 3 ways the new model can work, yes.
> >>
> >> And the other 2?
> > 
> > I wrote a document explaining the 3 available methods. I am attaching
> > it to this mail. Please read it. If it is clear enough, I plan to add
> > it to Documentation/i2c. If it's no clear enough, well, ask your
> > additional questions and I'll try to improve the document.
>
> Reads good. I'll ack your post from today.

Thank you!

> (...)
> > I2C bus control (such as declaration of which devices are there)
> > through sysfs doesn't exist today, but could be added for cases such as
> > yours. I also can see the value of making mux drivers have a standard
> > sysfs interface to disable some channels, to allow hot-plug scenarios
> > such as yours. But I'd rather integrate Rodolfo's work as is first, and
> > add features later. Even that promises to be slow...
> 
> I'm currently thinking about making a module that allows to trigger
> probing of buses, something like
> insmod i2cDevProbe.ko "modname",busNo,devNo
> Could finally be integrated into subsystem if there are more folks that
> like it.

I don't like the idea at all. Module parameters are not exactly a
convenient interface. As a matter of fact this is what we have today,
with the difference that the parameters are passed to relevant driver
directly rather than to a dedicated module (see the I2C_CLIENT_INSMOD*
macros in include/linux/i2c.h), and we are trying to move away from it
because they are highly user-unfriendly. What you propose is slightly
better than what we have in some respects, but that's not a significant
enough improvement to justify the move.

And your proposal has many drawbacks/lacks, too. For example, how do
you remove a device instance which you have created by mistake? How do
you create a new device instance when the i2cDevProbe.ko module is
already loaded? Just two problems off the top of my head, but there are
probably more.

I definitely prefer a sysfs-based approach as I initially mentioned,
this is much more flexible. If you have an urgent need for this
feature, we can add an action point to the wiki and start working on an
implementation. I suggest you start with creating your wiki account
then.

-- 
Jean Delvare

  reply	other threads:[~2009-03-09 14:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-18 12:37 Request for Clarification: old - legacy - new driver model Michael Lawnick
2009-02-18 17:36 ` Wolfram Sang
     [not found]   ` <20090218173645.GD3049-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-02-19 14:17     ` Michael Lawnick
2009-02-20 12:53       ` Jean Delvare
     [not found]         ` <20090220135300.353cd53a-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-02-24 15:09           ` Michael Lawnick
2009-02-25  8:00             ` Jean Delvare
     [not found]               ` <20090225090002.2c31dbf1-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-02-26 11:09                 ` Michael Lawnick
2009-02-26 13:28                   ` Jean Delvare
     [not found]                     ` <20090226142854.2b6f72e4-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-02-26 15:16                       ` Michael Lawnick
2009-02-27  9:36                       ` Michael Lawnick
2009-03-05 14:57                         ` Jean Delvare
     [not found]                           ` <20090305155713.46ac1968-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-03-09 14:13                             ` Michael Lawnick
2009-03-09 14:38                               ` Jean Delvare [this message]
     [not found]                                 ` <20090309153851.6d92729e-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-03-10  6:45                                   ` Michael Lawnick
     [not found]                                     ` <20090310103609.0d756775@hyperion.delvare>
     [not found]                                       ` <20090310114215.181300@gmx.net>
     [not found]                                         ` <20090310114215.181300-hi6Y0CQ0nG0@public.gmane.org>
2009-03-10 11:47                                           ` Michael Lawnick

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=20090309153851.6d92729e@hyperion.delvare \
    --to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=nospam_lawnick-Mmb7MZpHnFY@public.gmane.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