Skip to contentSkip to conversation

i2c: rcar_i2c: Remove the driver

PATCH New Marek Vasut 2 participants 9 messages May 1, 2018 – May 10, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 i2c: rcar_i2c: Remove the driver

Remove the rcar_i2c driver, since it's no longer used by any board and will be superseded by a DM and DT capable variant.

Cc Heiko Schocher <[email protected]>
Cc Nobuhiro Iwamatsu <[email protected]>
---
 drivers/i2c/Makefile   |   1 -
 drivers/i2c/rcar_i2c.c | 293 -------------------------------------------------
 2 files changed, 294 deletions(-)
 delete mode 100644 drivers/i2c/rcar_i2c.c
drivers/i2c/Makefile +0 -1
index 169a2f1d7a..4a6e06fbc5 100644
@@ -30,7 +30,6 @@ obj-$(CONFIG_SYS_I2C_MVTWSI) += mvtwsi.o
 obj-$(CONFIG_SYS_I2C_MXC) += mxc_i2c.o
 obj-$(CONFIG_SYS_I2C_MXS) += mxs_i2c.o
 obj-$(CONFIG_SYS_I2C_OMAP24XX) += omap24xx_i2c.o
-obj-$(CONFIG_SYS_I2C_RCAR) += rcar_i2c.o
 obj-$(CONFIG_SYS_I2C_RCAR_IIC) += rcar_iic.o
 obj-$(CONFIG_SYS_I2C_ROCKCHIP) += rk_i2c.o
 obj-$(CONFIG_SYS_I2C_S3C24X0) += s3c24x0_i2c.o exynos_hs_i2c.o
drivers/i2c/rcar_i2c.c deleted +0 -293

293 lines not on this page · raw message

Signature · 1 line
2.16.2
#1 lore raw

PATCH 2/4 i2c: rcar_i2c: Add DM and DT capable I2C driver

Add derivative of the rcar_i2c driver which is capable of probing itself from DM and uses DT.

Cc Heiko Schocher <[email protected]>
Cc Nobuhiro Iwamatsu <[email protected]>
---
 drivers/i2c/Kconfig    |   6 +
 drivers/i2c/Makefile   |   1 +
 drivers/i2c/rcar_i2c.c | 355 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 362 insertions(+)
 create mode 100644 drivers/i2c/rcar_i2c.c
drivers/i2c/Kconfig +6 -0
index 7fb201d8e6..5eceab9ea8 100644
@@ -339,6 +339,12 @@ config SYS_OMAP24_I2C_SPEED
 	  OMAP24xx Slave speed channel 0
 endif
 
+config SYS_I2C_RCAR_I2C
+	bool "Renesas RCar I2C driver"
+	depends on (RCAR_GEN3 || RCAR_GEN2) && DM_I2C
+	help
+	  Support for Renesas RCar I2C controller.
+
 config SYS_I2C_RCAR_IIC
 	bool "Renesas RCar Gen3 IIC driver"
 	depends on (RCAR_GEN3 || RCAR_GEN2) && DM_I2C
drivers/i2c/Makefile +1 -0
index 4a6e06fbc5..4e9f233cda 100644
@@ -30,6 +30,7 @@ obj-$(CONFIG_SYS_I2C_MVTWSI) += mvtwsi.o
 obj-$(CONFIG_SYS_I2C_MXC) += mxc_i2c.o
 obj-$(CONFIG_SYS_I2C_MXS) += mxs_i2c.o
 obj-$(CONFIG_SYS_I2C_OMAP24XX) += omap24xx_i2c.o
+obj-$(CONFIG_SYS_I2C_RCAR_I2C) += rcar_i2c.o
 obj-$(CONFIG_SYS_I2C_RCAR_IIC) += rcar_iic.o
 obj-$(CONFIG_SYS_I2C_ROCKCHIP) += rk_i2c.o
 obj-$(CONFIG_SYS_I2C_S3C24X0) += s3c24x0_i2c.o exynos_hs_i2c.o
drivers/i2c/rcar_i2c.c new file +355 -0

355 lines not on this page · raw message

Signature · 1 line
2.16.2
#2 lore raw

PATCH 2/4 i2c: rcar_i2c: Add DM and DT capable I2C driver

Hello Marek,

Am 01.05.2018 um 09:03 schrieb Marek Vasut:

Quoted 6 lines

Add derivative of the rcar_i2c driver which is capable of probing itself from DM and uses DT.

Cc Heiko Schocher <[email protected]>
Cc Nobuhiro Iwamatsu <[email protected]>
Quoted 6 lines
---
  drivers/i2c/Kconfig    |   6 +
  drivers/i2c/Makefile   |   1 +
  drivers/i2c/rcar_i2c.c | 355 +++++++++++++++++++++++++++++++++++++++++++++++++
  3 files changed, 362 insertions(+)

create mode 100644 drivers/i2c/rcar_i2c.c

I fixed patch 1/4 and tried to apply this patch, but checkpatch says:

--2018-05-10 09:16:48-- http://patchwork.ozlabs.org/patch/906952/mbox
Auflösen des Hostnamens patchwork.ozlabs.org (patchwork.ozlabs.org)… 203.11.71.1, 2401:3900:2:1::2 Verbindungsaufbau zu patchwork.ozlabs.org (patchwork.ozlabs.org)|203.11.71.1|:80 … verbunden. HTTP-Anforderung gesendet, auf Antwort wird gewartet … 301 Moved Permanently
Platz: /patch/906952/mbox/ [folgend]
--2018-05-10 09:16:49-- http://patchwork.ozlabs.org/patch/906952/mbox/
Wiederverwendung der bestehenden Verbindung zu patchwork.ozlabs.org:80. HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: nicht spezifiziert [text/plain]
Wird in »mbox« gespeichert.

mbox [ <=>

                                 ]  11,38K  --.-KB/s    in 0,01s
2018-05-10 09:16:50 (933 KB/s) - »mbox« gespeichert [11653]

WARNING: please write a paragraph that describes the config symbol fully #37: FILE: drivers/i2c/Kconfig:342:
+config SYS_I2C_RCAR_I2C

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #59:
new file mode 100644

WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #64: FILE: drivers/i2c/rcar_i2c.c:1:
+/*

CHECK: Blank lines aren't necessary after an open brace '{' #214: FILE: drivers/i2c/rcar_i2c.c:151:
+ for (i = 0; i < msg->len; i++) {
+

total: 0 errors, 3 warnings, 1 checks, 374 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

mbox has style problems, please review.

NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE NETWORKING_BLOCK_COMMENT_STYLE PREFER_ETHER_ADDR_COPY USLEEP_RANGE

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
Wende an: i2c: rcar_i2c: Add DM and DT capable I2C driver

Coukd you please send a rebased version of the patchset?

Thanks!

Beside of this, you can add my to patch 1 and 2:

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#3 lore raw

PATCH 3/4 ARM: rmobile: Enable DM capable RCar I2C driver on Lager

In reply to Marek Vasut

Enable the DM capable driver instead of the legacy one.

Cc Nobuhiro Iwamatsu <[email protected]>
---
 configs/lager_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/lager_defconfig +1 -0
index 1071da24d2..7dcd9b7dd8 100644
@@ -53,6 +53,7 @@ CONFIG_CLK_RENESAS=y
 CONFIG_DM_GPIO=y
 CONFIG_RCAR_GPIO=y
 CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_RCAR_I2C=y
 CONFIG_SYS_I2C_RCAR_IIC=y
 CONFIG_DM_MMC=y
 CONFIG_SH_MMCIF=y
Signature · 1 line
2.16.2
#4 lore raw

PATCH 3/4 ARM: rmobile: Enable DM capable RCar I2C driver on Lager

Hello Marek,

Am 01.05.2018 um 09:03 schrieb Marek Vasut:

Quoted 13 lines

Enable the DM capable driver instead of the legacy one.

Cc Nobuhiro Iwamatsu <[email protected]>
---
  configs/lager_defconfig | 1 +
  1 file changed, 1 insertion(+)
configs/lager_defconfig +0 -0
index 1071da24d2..7dcd9b7dd8 100644

configs/lager_defconfig CONFIG_CLK_RENESAS=y · line 57

Quoted 5 lines
configs/lager_defconfig +1 -0
@@ -53,6 +53,7 @@ CONFIG_CLK_RENESAS=y
  CONFIG_DM_GPIO=y
  CONFIG_RCAR_GPIO=y
  CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_RCAR_I2C=y
  CONFIG_SYS_I2C_RCAR_IIC=y

Isn;t CONFIG_SYS_I2C_RCAR_IIC also a i2c driver?

Has this SoC 2 different i2c drivers?

If so, you can add my

(Also to patch 4)

configs/lager_defconfig CONFIG_CLK_RENESAS=y · line 59

Quoted 3 lines
configs/lager_defconfig +0 -0
  CONFIG_DM_MMC=y
  CONFIG_SH_MMCIF=y

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#5 lore raw

PATCH 3/4 ARM: rmobile: Enable DM capable RCar I2C driver on Lager

Quoted 1 line · Heiko Schocher

Hello Marek,

Hi,

Quoted 22 lines

Am 01.05.2018 um 09:03 schrieb Marek Vasut:

Quoted 13 lines

Enable the DM capable driver instead of the legacy one.

Cc Nobuhiro Iwamatsu <[email protected]>

---
  configs/lager_defconfig | 1 +

  1 file changed, 1 insertion(+)
configs/lager_defconfig +0 -0
index 1071da24d2..7dcd9b7dd8 100644
@@ -53,6 +53,7 @@ CONFIG_CLK_RENESAS=y
Quoted 5 lines

  CONFIG_DM_GPIO=y
  CONFIG_RCAR_GPIO=y
  CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_RCAR_I2C=y
  CONFIG_SYS_I2C_RCAR_IIC=y

Isn;t CONFIG_SYS_I2C_RCAR_IIC also a i2c driver?

Quoted 1 line

Has this SoC 2 different i2c drivers?

Yes :)

Quoted 12 lines

If so, you can add my

(Also to patch 4)

Quoted 3 lines

  CONFIG_DM_MMC=y
  CONFIG_SH_MMCIF=y

bye,
Heiko

Signature · 2 lines
Best regards,
Marek Vasut
#6 lore raw

PATCH 4/4 ARM: rmobile: Enable DM capable RCar I2C driver on Silk

In reply to Marek Vasut

Enable the DM capable driver instead of the legacy one.

Cc Nobuhiro Iwamatsu <[email protected]>
---
 configs/silk_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/silk_defconfig +1 -0
index 4cb1179a68..70c5219502 100644
@@ -53,6 +53,7 @@ CONFIG_CLK_RENESAS=y
 CONFIG_DM_GPIO=y
 CONFIG_RCAR_GPIO=y
 CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_RCAR_I2C=y
 CONFIG_SYS_I2C_RCAR_IIC=y
 CONFIG_DM_MMC=y
 CONFIG_SH_MMCIF=y
Signature · 1 line
2.16.2
#7 lore raw

PATCH 1/4 i2c: rcar_i2c: Remove the driver

In reply to Marek Vasut

Hello Marek,

Am 01.05.2018 um 09:03 schrieb Marek Vasut:

Quoted 11 lines

Remove the rcar_i2c driver, since it's no longer used by any board and will be superseded by a DM and DT capable variant.

Cc Heiko Schocher <[email protected]>
Cc Nobuhiro Iwamatsu <[email protected]>
---
  drivers/i2c/Makefile   |   1 -
  drivers/i2c/rcar_i2c.c | 293 -------------------------------------------------
  2 files changed, 294 deletions(-)

delete mode 100644 drivers/i2c/rcar_i2c.c

checkpatch says:

2018-05-08 03:12:02,870:CON    :tbotlib   # tb_ctrl: WARNING: added, moved or deleted 

file(s), does MAINTAINERS need updating?
#41:
deleted file mode 100644

total: 0 errors, 1 warnings, 0 checks, 7 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

mbox has style problems, please review.

And applying patch to current mainline fails:

2018-05-08 03:12:04,014:CON    :tbotlib   # tb_ctrl: git am -3 mbox
2018-05-08 03:12:04,156:CON    :tbotlib   # tb_ctrl: Applying: i2c: rcar_i2c: Remove the driver

Using index info to reconstruct a base tree...
M drivers/i2c/Makefile
M drivers/i2c/rcar_i2c.c
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): drivers/i2c/rcar_i2c.c deleted in i2c: rcar_i2c: Remove the driver and modified in HEAD. Version HEAD of drivers/i2c/rcar_i2c.c left in tree. Auto-merging drivers/i2c/Makefile
error: Failed to merge in the changes.
Patch failed at 0001 i2c: rcar_i2c: Remove the driver
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
hs at pollux [ 5:12:04] ttbott>

see full log:
http://xeidos.ddns.net/tbot/id_740/tbot.txt

Before I make a dummy mistake, can you please rebase your patchset?

Thanks!

Hmm.. why do you remove the driver in this patch, and add it again in patch 2 ?

Isn;t it better to squash this 2 patches into one, so we see your changes?

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#8 lore raw

PATCH 1/4 i2c: rcar_i2c: Remove the driver

Quoted 55 lines · Heiko Schocher

Hello Marek,

Am 01.05.2018 um 09:03 schrieb Marek Vasut:

Quoted 6 lines

Remove the rcar_i2c driver, since it's no longer used by any board and will be superseded by a DM and DT capable variant.

Cc Heiko Schocher <[email protected]>
Cc Nobuhiro Iwamatsu <[email protected]>
Quoted 6 lines

---
  drivers/i2c/Makefile   |   1 -
  drivers/i2c/rcar_i2c.c | 293
-------------------------------------------------
  2 files changed, 294 deletions(-)
  delete mode 100644 drivers/i2c/rcar_i2c.c

checkpatch says:

2018-05-08 03:12:02,870:CON    :tbotlib   # tb_ctrl: WARNING:

added, moved or deleted file(s), does MAINTAINERS need updating? #41:
deleted file mode 100644

total: 0 errors, 1 warnings, 0 checks, 7 lines checked

NOTE: For some of the reported defects, checkpatch may be able to       mechanically convert to the typical style using --fix or --fix-inplace.

mbox has style problems, please review.

And applying patch to current mainline fails:

2018-05-08 03:12:04,014:CON    :tbotlib   # tb_ctrl: git am -3 mbox
2018-05-08 03:12:04,156:CON    :tbotlib   # tb_ctrl: Applying: i2c:

rcar_i2c: Remove the driver
Using index info to reconstruct a base tree...
M    drivers/i2c/Makefile
M    drivers/i2c/rcar_i2c.c
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): drivers/i2c/rcar_i2c.c deleted in i2c:
rcar_i2c: Remove the driver and modified in HEAD. Version HEAD of drivers/i2c/rcar_i2c.c left in tree.
Auto-merging drivers/i2c/Makefile
error: Failed to merge in the changes.
Patch failed at 0001 i2c: rcar_i2c: Remove the driver
The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". hs at pollux [ 5:12:04] ttbott>

see full log:
http://xeidos.ddns.net/tbot/id_740/tbot.txt

Quoted 6 lines

Before I make a dummy mistake, can you please rebase your patchset?

Thanks!

Hmm.. why do you remove the driver in this patch, and add it again in patch 2 ?

I am replacing it with a different/new driver, since the old one is broken.

Quoted 2 lines

Isn;t it better to squash this 2 patches into one, so we see your changes?

No, that'd be just unreviewable mess. Review 2/4 as a new driver.

Signature · 2 lines
Best regards,
Marek Vasut