linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] I2C: mediatek: Add driver for MediaTek I2C controller
Date: Mon, 3 Nov 2014 09:11:05 +0100	[thread overview]
Message-ID: <20141103081105.GD14482@pengutronix.de> (raw)
In-Reply-To: <CABuKBe+RXboBEZD7Bu_kSbVwiapJJcAuuw_wo=xw67osJWJ20w@mail.gmail.com>

On Thu, Oct 30, 2014 at 02:16:04PM +0100, Matthias Brugger wrote:
> 2014-10-29 6:37 GMT+01:00 Xudong Chen <xudong.chen@mediatek.com>:
> > +static int mt_i2c_do_transfer(struct mt_i2c *i2c)
> > +{
> > +       u16 addr_reg;
> > +       u16 control_reg;
> > +       int tmo = i2c->adap.timeout;
> > +
> > +       i2c->trans_stop = false;
> > +       i2c->irq_stat = 0;
> > +
> > +       /* If use i2c pin from PMIC mt6397 side, need set PATH_DIR first */
> > +       if (i2c->have_pmic)
> > +               i2c_writew(I2C_CONTROL_WRAPPER, i2c, OFFSET_PATH_DIR);
> 
> So this is some sort of multiplexer bit, right?
> I think in this case we need to build a multi function device (mfd)
> where the pmic driver will set this bit.

This bit is in the i2c controller register space, so it shouldn't be
controlled by some other driver. I think the configuration of this
register is already in the correct place. What I could think of is that
the PMIC could implement a pinctrl driver and the i2c controller driver
gets the pins from the PMIC. Anyway, the controlling of this bit would
still be in the i2c driver.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  parent reply	other threads:[~2014-11-03  8:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29  5:37 [PATCH 0/3] ARM: mediatek: Add driver for Mediatek I2C controller Xudong Chen
2014-10-29  5:37 ` [PATCH 1/3] dt-bindings: Add I2C bindings for mt65xx/mt81xx Xudong Chen
2014-10-30 12:38   ` Matthias Brugger
2014-10-31  1:38     ` xudong chen
2014-10-31 10:50       ` Matthias Brugger
2014-10-29  5:37 ` [PATCH 2/3] ARM: mediatek: Add I2C node for mt8135 and mt8127 Xudong Chen
2014-10-29  5:37 ` [PATCH 3/3] I2C: mediatek: Add driver for MediaTek I2C controller Xudong Chen
2014-10-30 13:16   ` Matthias Brugger
2014-10-30 13:25     ` Wolfram Sang
2014-10-30 14:49       ` Yingjoe Chen
2014-10-31  6:31     ` xudong chen
2014-10-31 10:48       ` Matthias Brugger
2014-10-31 14:38         ` Yingjoe Chen
2014-10-31 16:10           ` Matthias Brugger
2014-11-03  5:44             ` xudong chen
2014-11-03  8:11     ` Sascha Hauer [this message]
2014-10-29  6:26 ` [PATCH 0/3] ARM: mediatek: Add driver for Mediatek " xudong chen

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=20141103081105.GD14482@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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).