All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Lee Jones <lee.jones@linaro.org>, Eddie Huang <eddie.huang@mediatek.com>
Cc: Wolfram Sang <wsa@the-dreams.de>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Sascha Hauer <kernel@pengutronix.de>,
	srv_heupstream@mediatek.com, Rob Herring <robh+dt@kernel.org>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	David Box <david.e.box@linux.intel.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Doug Anderson <dianders@chromium.org>,
	Max Schwarz <max.schwarz@online.de>,
	Boris BREZILLON <boris.brezillon@free-electrons.com>,
	Anders Berg <anders.berg@avagotech.com>,
	Neelesh Gupta <neelegup@linux.vnet.ibm.com>,
	Simon Glass <sjg@chromium.org>, Jim Cromie <jim.cromie@gmail.com>,
	Wei Yan <sledge.yanwei@huawei.com>,
	Bjorn Andersson <bjorn.andersson@sonymobile.com>,
	Beniamino Galvani <b.galvani@gmail.com>,
	Xudong Chen <xudong.chen@mediatek.com>,
	Liguo Zhang <liguo.zhang@mediatek.com>,
	linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH v6 0/3] ARM: mediatek: Add driver for Mediatek I2C
Date: Tue, 28 Apr 2015 12:08:12 +0200	[thread overview]
Message-ID: <1430215692.4445.16.camel@chaos.site> (raw)
In-Reply-To: <20150428100206.GL11956@x1>

Hi Lee, Eddie,

Le Tuesday 28 April 2015 à 11:02 +0100, Lee Jones a écrit :
> On Tue, 28 Apr 2015, Eddie Huang wrote:
> 
> > This series is for Mediatek SoCs I2C controller common bus driver.
> > 
> > Earlier MTK SoC ((for example, MT6589, MT8135)) I2C HW has some limitationes.
> > New generation SoC like MT8173 fix following limitations:
> > 
> > 1. Only support one i2c_msg number. One exception is WRRD (write then read)
> > mode. WRRD can have two i2c_msg numbers.
> > 
> > 2. Mediatek I2C controller support WRRD(write then read) mode, in WRRD
> > mode the Repeat Start will be issued between 2 messages.
> > In this driver if 2 messages is first write then read, the driver will
> > combine 2 messages using Write-Read mode so the RS will be issued between
> > the 2 messages.
> > 
> > 3. The max transfer data length is 255 in one message. In WRRD mode, the
> > max data length of second msg is 31.
> > 
> > MT8135 and MT6589 can control I2C pins on PMIC(MT6397) by setting the i2c
> > registers in MT8135 side. In this case, driver should set OFFSET_PATH_DIR
> > bit first, the operation on other registers are still the same.
> > For now MT6589/MT8135 support this, MT6577/MT6595/MT8127 do not support.
> > For example, If want to use I2C4/5/6 pins on MT8135 just need to enable
> > the pinmux, else if want to use I2C pins on PMIC(MT6397) need to add
> > "mediatek,have-pmic" property in the .dts file of each platform.
> > 
> > This driver is based on 4.1-rc1.
> > 
> > Change in v6:
> > 1. Update binding document not use default clock-frequency as example.
> > 2. Add mtk_i2c_compatible struct and pass hardware capabilities
> >    through of_device_id
> > 3. Remove some hardware setting in mtk_i2c_do_transfer to mtk_i2c_init_hw
> >    so just init one time.
> > 4. Correct mtk_i2c_parse_dt don't set default clock bug.
> > 
> > Change in v5:
> > Apply new i2c_adapter_quirks patch [2]. Change to use dam_map_single to map
> > dma buffer. Add spinlock to fix race condition. Check of_property_read_u32
> > return value. Remove I2C_FUNC_10BIT_ADDR capability due to driver not implement.
> > Add MT8173 I2C driver.
> > 
> > Change in v4:
> > Modify to support i2c_adapter_quirks base on Wolfram's patch [1].
> > Remove check transfer size and WRRD combine code. Instead, fill quirk
> > property and let i2c_check_for_quirks to do the filter.
> > 
> > [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/314804.html
> > [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-February/325744.html
> > 
> > Eddie Huang (1):
> >   I2C: mediatek: Add driver for MediaTek MT8173 I2C controller
> > 
> > Xudong Chen (2):
> >   dt-bindings: Add I2C bindings for mt65xx/mt81xx.
> >   I2C: mediatek: Add driver for MediaTek I2C controller
> > 
> >  .../devicetree/bindings/i2c/i2c-mt6577.txt         |  41 ++
> >  drivers/i2c/busses/Kconfig                         |   9 +
> >  drivers/i2c/busses/Makefile                        |   1 +
> >  drivers/i2c/busses/i2c-mt65xx.c                    | 748 +++++++++++++++++++++
> >  4 files changed, 799 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
> >  create mode 100644 drivers/i2c/busses/i2c-mt65xx.c
> 
> Why have you sent me this?

Mind you, I was wondering exactly the same ;-)


-- 
Jean Delvare
SUSE L3 Support


WARNING: multiple messages have this Message-ID (diff)
From: Jean Delvare <jdelvare@suse.de>
To: Lee Jones <lee.jones@linaro.org>, Eddie Huang <eddie.huang@mediatek.com>
Cc: Wolfram Sang <wsa@the-dreams.de>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Sascha Hauer <kernel@pengutronix.de>,
	srv_heupstream@mediatek.com, Rob Herring <robh+dt@kernel.org>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	David Box <david.e.box@linux.intel.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Doug Anderson <dianders@chromium.org>,
	Max Schwarz <max.schwarz@online.de>,
	Boris BREZILLON <boris.brezillon@free-electrons.com>,
	Anders Berg <anders.berg@avagotech.com>,
	Neelesh Gupta <neelegup@linux.vnet.ibm.com>,
	Simon Glass <sjg@chromium.org>, Jim Cromie <jim.cromie@gmail.com>,
	Wei Yan <sledge.yanwei@huawei.com>,
	Bjorn Andersson <bjorn.andersson@sonymobile.com>,
	Beniamino Galvani <b.galvani@gmail.com>,
	Xudong Chen <xudong.chen@mediatek.com>, Liguo Zhang <liguo.zhang>
Subject: Re: [PATCH v6 0/3] ARM: mediatek: Add driver for Mediatek I2C
Date: Tue, 28 Apr 2015 12:08:12 +0200	[thread overview]
Message-ID: <1430215692.4445.16.camel@chaos.site> (raw)
In-Reply-To: <20150428100206.GL11956@x1>

Hi Lee, Eddie,

Le Tuesday 28 April 2015 à 11:02 +0100, Lee Jones a écrit :
> On Tue, 28 Apr 2015, Eddie Huang wrote:
> 
> > This series is for Mediatek SoCs I2C controller common bus driver.
> > 
> > Earlier MTK SoC ((for example, MT6589, MT8135)) I2C HW has some limitationes.
> > New generation SoC like MT8173 fix following limitations:
> > 
> > 1. Only support one i2c_msg number. One exception is WRRD (write then read)
> > mode. WRRD can have two i2c_msg numbers.
> > 
> > 2. Mediatek I2C controller support WRRD(write then read) mode, in WRRD
> > mode the Repeat Start will be issued between 2 messages.
> > In this driver if 2 messages is first write then read, the driver will
> > combine 2 messages using Write-Read mode so the RS will be issued between
> > the 2 messages.
> > 
> > 3. The max transfer data length is 255 in one message. In WRRD mode, the
> > max data length of second msg is 31.
> > 
> > MT8135 and MT6589 can control I2C pins on PMIC(MT6397) by setting the i2c
> > registers in MT8135 side. In this case, driver should set OFFSET_PATH_DIR
> > bit first, the operation on other registers are still the same.
> > For now MT6589/MT8135 support this, MT6577/MT6595/MT8127 do not support.
> > For example, If want to use I2C4/5/6 pins on MT8135 just need to enable
> > the pinmux, else if want to use I2C pins on PMIC(MT6397) need to add
> > "mediatek,have-pmic" property in the .dts file of each platform.
> > 
> > This driver is based on 4.1-rc1.
> > 
> > Change in v6:
> > 1. Update binding document not use default clock-frequency as example.
> > 2. Add mtk_i2c_compatible struct and pass hardware capabilities
> >    through of_device_id
> > 3. Remove some hardware setting in mtk_i2c_do_transfer to mtk_i2c_init_hw
> >    so just init one time.
> > 4. Correct mtk_i2c_parse_dt don't set default clock bug.
> > 
> > Change in v5:
> > Apply new i2c_adapter_quirks patch [2]. Change to use dam_map_single to map
> > dma buffer. Add spinlock to fix race condition. Check of_property_read_u32
> > return value. Remove I2C_FUNC_10BIT_ADDR capability due to driver not implement.
> > Add MT8173 I2C driver.
> > 
> > Change in v4:
> > Modify to support i2c_adapter_quirks base on Wolfram's patch [1].
> > Remove check transfer size and WRRD combine code. Instead, fill quirk
> > property and let i2c_check_for_quirks to do the filter.
> > 
> > [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/314804.html
> > [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-February/325744.html
> > 
> > Eddie Huang (1):
> >   I2C: mediatek: Add driver for MediaTek MT8173 I2C controller
> > 
> > Xudong Chen (2):
> >   dt-bindings: Add I2C bindings for mt65xx/mt81xx.
> >   I2C: mediatek: Add driver for MediaTek I2C controller
> > 
> >  .../devicetree/bindings/i2c/i2c-mt6577.txt         |  41 ++
> >  drivers/i2c/busses/Kconfig                         |   9 +
> >  drivers/i2c/busses/Makefile                        |   1 +
> >  drivers/i2c/busses/i2c-mt65xx.c                    | 748 +++++++++++++++++++++
> >  4 files changed, 799 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
> >  create mode 100644 drivers/i2c/busses/i2c-mt65xx.c
> 
> Why have you sent me this?

Mind you, I was wondering exactly the same ;-)


-- 
Jean Delvare
SUSE L3 Support

WARNING: multiple messages have this Message-ID (diff)
From: jdelvare@suse.de (Jean Delvare)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 0/3] ARM: mediatek: Add driver for Mediatek I2C
Date: Tue, 28 Apr 2015 12:08:12 +0200	[thread overview]
Message-ID: <1430215692.4445.16.camel@chaos.site> (raw)
In-Reply-To: <20150428100206.GL11956@x1>

Hi Lee, Eddie,

Le Tuesday 28 April 2015 ? 11:02 +0100, Lee Jones a ?crit :
> On Tue, 28 Apr 2015, Eddie Huang wrote:
> 
> > This series is for Mediatek SoCs I2C controller common bus driver.
> > 
> > Earlier MTK SoC ((for example, MT6589, MT8135)) I2C HW has some limitationes.
> > New generation SoC like MT8173 fix following limitations:
> > 
> > 1. Only support one i2c_msg number. One exception is WRRD (write then read)
> > mode. WRRD can have two i2c_msg numbers.
> > 
> > 2. Mediatek I2C controller support WRRD(write then read) mode, in WRRD
> > mode the Repeat Start will be issued between 2 messages.
> > In this driver if 2 messages is first write then read, the driver will
> > combine 2 messages using Write-Read mode so the RS will be issued between
> > the 2 messages.
> > 
> > 3. The max transfer data length is 255 in one message. In WRRD mode, the
> > max data length of second msg is 31.
> > 
> > MT8135 and MT6589 can control I2C pins on PMIC(MT6397) by setting the i2c
> > registers in MT8135 side. In this case, driver should set OFFSET_PATH_DIR
> > bit first, the operation on other registers are still the same.
> > For now MT6589/MT8135 support this, MT6577/MT6595/MT8127 do not support.
> > For example, If want to use I2C4/5/6 pins on MT8135 just need to enable
> > the pinmux, else if want to use I2C pins on PMIC(MT6397) need to add
> > "mediatek,have-pmic" property in the .dts file of each platform.
> > 
> > This driver is based on 4.1-rc1.
> > 
> > Change in v6:
> > 1. Update binding document not use default clock-frequency as example.
> > 2. Add mtk_i2c_compatible struct and pass hardware capabilities
> >    through of_device_id
> > 3. Remove some hardware setting in mtk_i2c_do_transfer to mtk_i2c_init_hw
> >    so just init one time.
> > 4. Correct mtk_i2c_parse_dt don't set default clock bug.
> > 
> > Change in v5:
> > Apply new i2c_adapter_quirks patch [2]. Change to use dam_map_single to map
> > dma buffer. Add spinlock to fix race condition. Check of_property_read_u32
> > return value. Remove I2C_FUNC_10BIT_ADDR capability due to driver not implement.
> > Add MT8173 I2C driver.
> > 
> > Change in v4:
> > Modify to support i2c_adapter_quirks base on Wolfram's patch [1].
> > Remove check transfer size and WRRD combine code. Instead, fill quirk
> > property and let i2c_check_for_quirks to do the filter.
> > 
> > [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/314804.html
> > [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-February/325744.html
> > 
> > Eddie Huang (1):
> >   I2C: mediatek: Add driver for MediaTek MT8173 I2C controller
> > 
> > Xudong Chen (2):
> >   dt-bindings: Add I2C bindings for mt65xx/mt81xx.
> >   I2C: mediatek: Add driver for MediaTek I2C controller
> > 
> >  .../devicetree/bindings/i2c/i2c-mt6577.txt         |  41 ++
> >  drivers/i2c/busses/Kconfig                         |   9 +
> >  drivers/i2c/busses/Makefile                        |   1 +
> >  drivers/i2c/busses/i2c-mt65xx.c                    | 748 +++++++++++++++++++++
> >  4 files changed, 799 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
> >  create mode 100644 drivers/i2c/busses/i2c-mt65xx.c
> 
> Why have you sent me this?

Mind you, I was wondering exactly the same ;-)


-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2015-04-28 10:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-28  8:31 [PATCH v6 0/3] ARM: mediatek: Add driver for Mediatek I2C Eddie Huang
2015-04-28  8:31 ` Eddie Huang
2015-04-28  8:31 ` Eddie Huang
2015-04-28  8:31 ` [PATCH v6 1/3] dt-bindings: Add I2C bindings for mt65xx/mt81xx Eddie Huang
2015-04-28  8:31   ` Eddie Huang
2015-04-28  8:31   ` Eddie Huang
2015-04-29  5:18   ` rajeev kumar
2015-04-29  5:18     ` rajeev kumar
2015-04-29  5:18     ` rajeev kumar
2015-04-28  8:31 ` [PATCH v6 2/3] I2C: mediatek: Add driver for MediaTek I2C controller Eddie Huang
2015-04-28  8:31   ` Eddie Huang
2015-04-28  8:31   ` Eddie Huang
2015-04-28  8:31 ` [PATCH v6 3/3] I2C: mediatek: Add driver for MediaTek MT8173 " Eddie Huang
2015-04-28  8:31   ` Eddie Huang
2015-04-28  8:31   ` Eddie Huang
2015-04-28  8:36   ` Marc Kleine-Budde
2015-04-28  8:36     ` Marc Kleine-Budde
2015-04-28  8:36     ` Marc Kleine-Budde
2015-04-28  8:44     ` Eddie Huang
2015-04-28  8:44       ` Eddie Huang
2015-04-28  8:44       ` Eddie Huang
2015-04-28 10:02 ` [PATCH v6 0/3] ARM: mediatek: Add driver for Mediatek I2C Lee Jones
2015-04-28 10:02   ` Lee Jones
2015-04-28 10:02   ` Lee Jones
2015-04-28 10:08   ` Jean Delvare [this message]
2015-04-28 10:08     ` Jean Delvare
2015-04-28 10:08     ` 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=1430215692.4445.16.camel@chaos.site \
    --to=jdelvare@suse.de \
    --cc=anders.berg@avagotech.com \
    --cc=arnd@arndb.de \
    --cc=b.galvani@gmail.com \
    --cc=bjorn.andersson@sonymobile.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=david.e.box@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=eddie.huang@mediatek.com \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jim.cromie@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=lee.jones@linaro.org \
    --cc=liguo.zhang@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=max.schwarz@online.de \
    --cc=neelegup@linux.vnet.ibm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sjg@chromium.org \
    --cc=sledge.yanwei@huawei.com \
    --cc=srv_heupstream@mediatek.com \
    --cc=wsa@the-dreams.de \
    --cc=xudong.chen@mediatek.com \
    /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 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.