linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Eddi De Pieri <eddi-soWH+0lSOSbR7s880joybQ@public.gmane.org>
Cc: Guenter Roeck
	<guenter.roeck-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>,
	Ben Dooks <ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: [PATCH] i2c multiplexer driver for Proliant microserver N36L
Date: Tue, 6 Dec 2011 09:39:06 +0100	[thread overview]
Message-ID: <20111206093906.21dccf8d@endymion.delvare> (raw)
In-Reply-To: <CAKdnbx5V=qfa5dshRudHx+M3o8Eb6qJXCVG+ZBaBwCeKaoQYNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi Eddi,

Please don't top-post, and only include as much context as necessary in
your replies.

On Mon, 5 Dec 2011 23:57:10 +0100, Eddi De Pieri wrote:
> I tried in rewriting the driver... but I can't understand the right way...
> 
> since sb800 is a southbus, the mux driver must be defined as
> i2c_device, platform_device, or pci_device?

Your question doesn't make sense. A driver can't be defined as a
device. But anyway I think I understand where your confusion comes
from. The SMBus multiplexing as it exists on the SB800 is very
different from what was implemented for the Tyan S4882 and S4985 boards.

In fact, now that I have a SB800 datasheet, I better understand what
you were doing and how it should be implemented. I don't even think you
need the multiplexer framework for the SB800. My understanding is that
it has 4 almost independent SMBus ports. The only thing that is shared
between them is the register set. Contrary to the S4882 and S4985 board
multiplexing, it is totally board-independent. So support should go to the
i2c-piix4 driver directly.

BTW please avoid comments in Italian in your code. Not everyone reads
Italian. Use English.

> I tried using i2c_device structure, but I can't make sb800 to match
> the id_Table..
> I tried usign pci_device structure, but the driver overwrite the pci
> space so kernel hangs...

You don't need a multiplexer device at all. Please just have i2c-piix4
driver register 4 i2c_adapter devices for the SB800. This would be a
3-step process:

1* Turn piix4_adapter to an array, so that it can hold up to 4
   i2c_adapter structures.
2* Add a mutex to prevent concurrent access to the register set. It
   should be initialized in piix4_setup_sb800(), taken at the very
   beginning of piix4_access() and released at the very end of this
   function.
3* Add support for ports 1, 2 and 3 of the SB800.

This would ideally be 3 incremental patches to make testing and review
easy. I can help with parts 1 and 2 if you want, as this can be tested
without a SB800. But it should be fairly easy overall.

-- 
Jean Delvare

  parent reply	other threads:[~2011-12-06  8:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-25 22:07 [PATCH] i2c multiplexer driver for Proliant microserver N36L Eddi De Pieri
     [not found] ` <CAKdnbx7xeygkOK=BR+3vUrWT3GEt=PZrxgrEMvEB5nkOfAF0bg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-27 22:55   ` Ben Dooks
     [not found]     ` <20111127225514.GO19115-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2011-12-03 15:31       ` Eddi De Pieri
2011-12-03 16:27         ` [lm-sensors] " Guenter Roeck
     [not found]           ` <20111203162757.GA24302-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>
2011-12-03 16:42             ` Eddi De Pieri
     [not found]               ` <CAKdnbx54R9t-mS9-EvyT-618wVp-YH0YDO++=m5t-JqR6h=GCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-03 17:08                 ` Jean Delvare
     [not found]                   ` <20111203180819.2ddbcb3a-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-12-05 22:57                     ` Eddi De Pieri
     [not found]                       ` <CAKdnbx5V=qfa5dshRudHx+M3o8Eb6qJXCVG+ZBaBwCeKaoQYNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-06  8:39                         ` Jean Delvare [this message]
     [not found]                           ` <20111206093906.21dccf8d-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-12-07 14:57                             ` Eddi De Pieri
2012-02-24 18:56                           ` Thomas Brandon
     [not found]                             ` <loom.20120215T165236-509-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2012-02-24 19:04                               ` Thomas Brandon
     [not found]                                 ` <CAM5MpD5R4xde4Li1NCDoErisXs7oRMAgW7swuCwga80MkU3VMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-27  8:42                                   ` Thomas Brandon
     [not found]                                     ` <CAM5MpD46pT1N2f5yZb0yW1O8CjH7B969TmvxDZztMfwBoyom3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-14  8:28                                       ` Eddi De Pieri
     [not found]                                         ` <CAKdnbx7tiMaU1c971a+P2vhE_owO_zd8EXhKR7cAwrH=evVQ6g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-29 17:44                                           ` Jean Delvare
2012-06-13  5:44                                       ` Eddi De Pieri
     [not found]                                         ` <CAKdnbx4MUfU086F7navt52WaoF4q_+3G+DHn7u2qic+FU50OiA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-13  7:47                                           ` Jean Delvare
     [not found]                                             ` <20120613094739.360967aa-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-06-13 16:59                                               ` [PATCH 0/3] i2c-piix4: Multiple piix4-compatible SMBus support (revised) Andrew Armenia
2012-06-13 16:59                                                 ` [PATCH 1/3] i2c-piix4: eliminate piix4_smba global variable Andrew Armenia
     [not found]                                                   ` <1339606749-4578-2-git-send-email-andrew-Lwj1yN59in/Ib2jZbfQ/kQ@public.gmane.org>
2012-06-13 19:37                                                     ` Jean Delvare
     [not found]                                                 ` <1339606749-4578-1-git-send-email-andrew-Lwj1yN59in/Ib2jZbfQ/kQ@public.gmane.org>
2012-06-13 16:59                                                   ` [PATCH 2/3] i2c-piix4: separate registration and probing code Andrew Armenia
     [not found]                                                     ` <1339606749-4578-3-git-send-email-andrew-Lwj1yN59in/Ib2jZbfQ/kQ@public.gmane.org>
2012-06-14 19:38                                                       ` Jean Delvare
2012-06-13 16:59                                                 ` [PATCH 3/3] i2c-piix4: support AMD auxiliary SMBus controller Andrew Armenia
     [not found]                                                   ` <1339606749-4578-4-git-send-email-andrew-Lwj1yN59in/Ib2jZbfQ/kQ@public.gmane.org>
2012-06-15  8:31                                                     ` Jean Delvare
     [not found]                                                       ` <20120615103153.3ea7c009-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-06-15 13:43                                                         ` Andrew Armenia
     [not found]                                                           ` <CA+jCKRVsMNf7Yj7fP4c6+4ff__v5qsea7rYYqHv25XFBi8v9yg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-16  6:51                                                             ` Jean Delvare
2012-06-15  9:22                                               ` [PATCH] i2c multiplexer driver for Proliant microserver N36L Jean Delvare

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=20111206093906.21dccf8d@endymion.delvare \
    --to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
    --cc=ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=eddi-soWH+0lSOSbR7s880joybQ@public.gmane.org \
    --cc=guenter.roeck-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lm-sensors-GZX6beZjE8VD60Wz+7aTrA@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;
as well as URLs for NNTP newsgroup(s).