From: Maxime Ripard <maxime.ripard@free-electrons.com> To: Arnd Bergmann <arnd@arndb.de> Cc: Boris BREZILLON <boris.brezillon@free-electrons.com>, Wolfram Sang <wsa@the-dreams.de>, Randy Dunlap <rdunlap@infradead.org>, Hans de Goede <hdegoede@redhat.com>, Shuge <shuge@allwinnertech.com>, kevin@allwinnertech.com, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org Subject: Re: [PATCH v5 2/2] i2c: sunxi: add P2WI (Push/Pull 2 Wire Interface) controller support Date: Tue, 10 Jun 2014 16:36:04 +0200 [thread overview] Message-ID: <20140610143604.GC7054@lukather> (raw) In-Reply-To: <6454089.IP8IFVsofj@wuerfel> [-- Attachment #1: Type: text/plain, Size: 1926 bytes --] Hi Arnd, On Tue, Jun 10, 2014 at 03:54:56PM +0200, Arnd Bergmann wrote: > On Tuesday 10 June 2014 15:47:16 Boris BREZILLON wrote: > > > > +config I2C_SUN6I_P2WI > > + tristate "Allwinner sun6i internal P2WI controller" > > + depends on ARCH_SUNXI > > + help > > + If you say yes to this option, support will be included for the > > + P2WI (Push/Pull 2 Wire Interface) controller embedded in some sunxi > > + SOCs. > > + The P2WI looks like an SMBus controller (which supports only byte > > + accesses), except that it only supports one slave device. > > + This interface is used to connect to specific PMIC devices (like the > > + AXP221). > > + > > Sorry for the stupid question, but why is this an i2c driver if the > hardware protocol is completely different? It's not completely different. It deviates, but still looks very similar to i2c, and to be precise, SMBus. You'll have the full discussion that led to do this in i2c here: http://www.spinics.net/lists/linux-i2c/msg15066.html Also, one significant thing to take into account is that the communication with a device starts as I2C, only to switch to this protocol after some initialization sequence. > I understand that a lot of devices can be driven using either spi or > i2c, and we have two sets of {directories,maintainers,bus_types,...} > for them. Your description sounds like this is a separate option > that isn't any closer to i2c than it is to spi. That's not true. It's *much* closer from I2C than it is from SPI. > Would it perhaps be better to expose it only as a regmap rather than > an i2c host? That could be a solution, but is it a common practice to define a bus adapter driver in a regmap driver? Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: maxime.ripard@free-electrons.com (Maxime Ripard) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 2/2] i2c: sunxi: add P2WI (Push/Pull 2 Wire Interface) controller support Date: Tue, 10 Jun 2014 16:36:04 +0200 [thread overview] Message-ID: <20140610143604.GC7054@lukather> (raw) In-Reply-To: <6454089.IP8IFVsofj@wuerfel> Hi Arnd, On Tue, Jun 10, 2014 at 03:54:56PM +0200, Arnd Bergmann wrote: > On Tuesday 10 June 2014 15:47:16 Boris BREZILLON wrote: > > > > +config I2C_SUN6I_P2WI > > + tristate "Allwinner sun6i internal P2WI controller" > > + depends on ARCH_SUNXI > > + help > > + If you say yes to this option, support will be included for the > > + P2WI (Push/Pull 2 Wire Interface) controller embedded in some sunxi > > + SOCs. > > + The P2WI looks like an SMBus controller (which supports only byte > > + accesses), except that it only supports one slave device. > > + This interface is used to connect to specific PMIC devices (like the > > + AXP221). > > + > > Sorry for the stupid question, but why is this an i2c driver if the > hardware protocol is completely different? It's not completely different. It deviates, but still looks very similar to i2c, and to be precise, SMBus. You'll have the full discussion that led to do this in i2c here: http://www.spinics.net/lists/linux-i2c/msg15066.html Also, one significant thing to take into account is that the communication with a device starts as I2C, only to switch to this protocol after some initialization sequence. > I understand that a lot of devices can be driven using either spi or > i2c, and we have two sets of {directories,maintainers,bus_types,...} > for them. Your description sounds like this is a separate option > that isn't any closer to i2c than it is to spi. That's not true. It's *much* closer from I2C than it is from SPI. > Would it perhaps be better to expose it only as a regmap rather than > an i2c host? That could be a solution, but is it a common practice to define a bus adapter driver in a regmap driver? Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140610/45786f14/attachment.sig>
next prev parent reply other threads:[~2014-06-10 14:40 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-06-10 13:47 [PATCH v5 0/2] i2c: sunxi: add P2WI controller support Boris BREZILLON 2014-06-10 13:47 ` Boris BREZILLON 2014-06-10 13:47 ` [PATCH v5 1/2] i2c: sunxi: add P2WI DT bindings documentation Boris BREZILLON 2014-06-10 13:47 ` Boris BREZILLON 2014-06-10 13:47 ` [PATCH v5 2/2] i2c: sunxi: add P2WI (Push/Pull 2 Wire Interface) controller support Boris BREZILLON 2014-06-10 13:47 ` Boris BREZILLON 2014-06-10 13:54 ` Arnd Bergmann 2014-06-10 13:54 ` Arnd Bergmann 2014-06-10 14:36 ` Maxime Ripard [this message] 2014-06-10 14:36 ` Maxime Ripard 2014-06-10 14:47 ` Arnd Bergmann 2014-06-10 14:47 ` Arnd Bergmann 2014-06-11 7:52 ` Boris BREZILLON 2014-06-11 7:52 ` Boris BREZILLON 2014-06-11 7:52 ` Boris BREZILLON 2014-06-11 8:07 ` Arnd Bergmann 2014-06-11 8:07 ` Arnd Bergmann 2014-06-10 19:45 ` Wolfram Sang 2014-06-10 19:45 ` Wolfram Sang 2014-06-11 7:42 ` Boris BREZILLON 2014-06-11 7:42 ` Boris BREZILLON 2014-06-11 7:42 ` Boris BREZILLON
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=20140610143604.GC7054@lukather \ --to=maxime.ripard@free-electrons.com \ --cc=arnd@arndb.de \ --cc=boris.brezillon@free-electrons.com \ --cc=devicetree@vger.kernel.org \ --cc=hdegoede@redhat.com \ --cc=kevin@allwinnertech.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-doc@vger.kernel.org \ --cc=linux-i2c@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=rdunlap@infradead.org \ --cc=shuge@allwinnertech.com \ --cc=wsa@the-dreams.de \ /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: linkBe 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.