2019-12-09 10:20:44

by Eugen Hristev

[permalink] [raw]
Subject: [PATCH v3 1/4] dt-bindings: i2c: at91: cosmetic formatting of compatible list

From: Eugen Hristev <[email protected]>

Format the list of compatibles with one compatible per line.

Suggested-by: Peter Rosin <[email protected]>
Signed-off-by: Eugen Hristev <[email protected]>
Acked-by: Ludovic Desroches <[email protected]>
---
Documentation/devicetree/bindings/i2c/i2c-at91.txt | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-at91.txt b/Documentation/devicetree/bindings/i2c/i2c-at91.txt
index 2210f43..d35cd63 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-at91.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-at91.txt
@@ -1,10 +1,16 @@
I2C for Atmel platforms

Required properties :
-- compatible : Must be "atmel,at91rm9200-i2c", "atmel,at91sam9261-i2c",
- "atmel,at91sam9260-i2c", "atmel,at91sam9g20-i2c", "atmel,at91sam9g10-i2c",
- "atmel,at91sam9x5-i2c", "atmel,sama5d4-i2c", "atmel,sama5d2-i2c" or
- "microchip,sam9x60-i2c"
+- compatible : Must be one of:
+ "atmel,at91rm9200-i2c",
+ "atmel,at91sam9261-i2c",
+ "atmel,at91sam9260-i2c",
+ "atmel,at91sam9g20-i2c",
+ "atmel,at91sam9g10-i2c",
+ "atmel,at91sam9x5-i2c",
+ "atmel,sama5d4-i2c",
+ "atmel,sama5d2-i2c",
+ "microchip,sam9x60-i2c".
- reg: physical base address of the controller and length of memory mapped
region.
- interrupts: interrupt number to the cpu.
--
2.7.4


2019-12-09 10:20:47

by Eugen Hristev

[permalink] [raw]
Subject: [PATCH v3 2/4] i2c: at91: fix clk_offset for sam9x60

From: Eugen Hristev <[email protected]>

In SAM9X60 datasheet, FLEX_TWI_CWGR register description mentions clock
offset of 3 cycles (compared to 4 in eg. SAMA5D3).
This is the same offset as in SAMA5D2.

Fixes: b00277923743 ("i2c: at91: add new platform support for sam9x60")
Suggested-by: Codrin Ciubotariu <[email protected]>
Signed-off-by: Eugen Hristev <[email protected]>
Acked-by: Ludovic Desroches <[email protected]>
Reviewed-by: Codrin Ciubotariu <[email protected]>
---
Changes in v3:
- fixed typo in commit description

Changes in v2:
- Sorry, wrong subject line. Modified to SAM9X60 .


drivers/i2c/busses/i2c-at91-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-at91-core.c b/drivers/i2c/busses/i2c-at91-core.c
index e13af48..5137e62 100644
--- a/drivers/i2c/busses/i2c-at91-core.c
+++ b/drivers/i2c/busses/i2c-at91-core.c
@@ -174,7 +174,7 @@ static struct at91_twi_pdata sama5d2_config = {

static struct at91_twi_pdata sam9x60_config = {
.clk_max_div = 7,
- .clk_offset = 4,
+ .clk_offset = 3,
.has_unre_flag = true,
.has_alt_cmd = true,
.has_hold_field = true,
--
2.7.4

2019-12-09 10:21:23

by Eugen Hristev

[permalink] [raw]
Subject: [PATCH v3 4/4] dt-bindings: i2c: at91: fix i2c-sda-hold-time-ns documentation for sam9x60

From: Eugen Hristev <[email protected]>

SAM9X60 also supports i2c-sda-hold-time-ns. Fix the documentation accordingly.

Fixes: 2034e3f4c9a5 ("dt-bindings: i2c: at91: add new compatible")
Signed-off-by: Eugen Hristev <[email protected]>
---
Changes in v3:
- new patch

Documentation/devicetree/bindings/i2c/i2c-at91.txt | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-at91.txt b/Documentation/devicetree/bindings/i2c/i2c-at91.txt
index d35cd63..d4bad86 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-at91.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-at91.txt
@@ -24,8 +24,10 @@ Optional properties:
- dma-names: should contain "tx" and "rx".
- atmel,fifo-size: maximum number of data the RX and TX FIFOs can store for FIFO
capable I2C controllers.
-- i2c-sda-hold-time-ns: TWD hold time, only available for "atmel,sama5d4-i2c"
- and "atmel,sama5d2-i2c".
+- i2c-sda-hold-time-ns: TWD hold time, only available for:
+ "atmel,sama5d4-i2c",
+ "atmel,sama5d2-i2c",
+ "microchip,sam9x60-i2c".
- Child nodes conforming to i2c bus binding

Examples :
--
2.7.4

2019-12-09 11:15:01

by Eugen Hristev

[permalink] [raw]
Subject: [PATCH v3 3/4] i2c: at91: remote default value initialization

From: Eugen Hristev <[email protected]>

Platform data structs are initialized by default with zero values.
Thus it becomes redundant to initialize them manually to zero (false).
Remove extra false initialization for field members in structs.

Suggested-by: Wolfram Sang <[email protected]>
Signed-off-by: Eugen Hristev <[email protected]>
Reviewed-by: Ludovic Desroches <[email protected]>
---
drivers/i2c/busses/i2c-at91-core.c | 39 --------------------------------------
1 file changed, 39 deletions(-)

diff --git a/drivers/i2c/busses/i2c-at91-core.c b/drivers/i2c/busses/i2c-at91-core.c
index 5137e62..3da1a8a 100644
--- a/drivers/i2c/busses/i2c-at91-core.c
+++ b/drivers/i2c/busses/i2c-at91-core.c
@@ -66,55 +66,26 @@ static struct at91_twi_pdata at91rm9200_config = {
.clk_max_div = 5,
.clk_offset = 3,
.has_unre_flag = true,
- .has_alt_cmd = false,
- .has_hold_field = false,
- .has_dig_filtr = false,
- .has_adv_dig_filtr = false,
- .has_ana_filtr = false,
};

static struct at91_twi_pdata at91sam9261_config = {
.clk_max_div = 5,
.clk_offset = 4,
- .has_unre_flag = false,
- .has_alt_cmd = false,
- .has_hold_field = false,
- .has_dig_filtr = false,
- .has_adv_dig_filtr = false,
- .has_ana_filtr = false,
};

static struct at91_twi_pdata at91sam9260_config = {
.clk_max_div = 7,
.clk_offset = 4,
- .has_unre_flag = false,
- .has_alt_cmd = false,
- .has_hold_field = false,
- .has_dig_filtr = false,
- .has_adv_dig_filtr = false,
- .has_ana_filtr = false,
};

static struct at91_twi_pdata at91sam9g20_config = {
.clk_max_div = 7,
.clk_offset = 4,
- .has_unre_flag = false,
- .has_alt_cmd = false,
- .has_hold_field = false,
- .has_dig_filtr = false,
- .has_adv_dig_filtr = false,
- .has_ana_filtr = false,
};

static struct at91_twi_pdata at91sam9g10_config = {
.clk_max_div = 7,
.clk_offset = 4,
- .has_unre_flag = false,
- .has_alt_cmd = false,
- .has_hold_field = false,
- .has_dig_filtr = false,
- .has_adv_dig_filtr = false,
- .has_ana_filtr = false,
};

static const struct platform_device_id at91_twi_devtypes[] = {
@@ -142,23 +113,13 @@ static const struct platform_device_id at91_twi_devtypes[] = {
static struct at91_twi_pdata at91sam9x5_config = {
.clk_max_div = 7,
.clk_offset = 4,
- .has_unre_flag = false,
- .has_alt_cmd = false,
- .has_hold_field = false,
- .has_dig_filtr = false,
- .has_adv_dig_filtr = false,
- .has_ana_filtr = false,
};

static struct at91_twi_pdata sama5d4_config = {
.clk_max_div = 7,
.clk_offset = 4,
- .has_unre_flag = false,
- .has_alt_cmd = false,
.has_hold_field = true,
.has_dig_filtr = true,
- .has_adv_dig_filtr = false,
- .has_ana_filtr = false,
};

static struct at91_twi_pdata sama5d2_config = {
--
2.7.4

2020-01-06 14:36:11

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v3 2/4] i2c: at91: fix clk_offset for sam9x60

On Mon, Dec 09, 2019 at 10:20:02AM +0000, [email protected] wrote:
> From: Eugen Hristev <[email protected]>
>
> In SAM9X60 datasheet, FLEX_TWI_CWGR register description mentions clock
> offset of 3 cycles (compared to 4 in eg. SAMA5D3).
> This is the same offset as in SAMA5D2.
>
> Fixes: b00277923743 ("i2c: at91: add new platform support for sam9x60")
> Suggested-by: Codrin Ciubotariu <[email protected]>
> Signed-off-by: Eugen Hristev <[email protected]>
> Acked-by: Ludovic Desroches <[email protected]>
> Reviewed-by: Codrin Ciubotariu <[email protected]>

Applied to for-current, thanks!


Attachments:
(No filename) (686.00 B)
signature.asc (849.00 B)
Download all attachments

2020-01-06 14:36:20

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v3 3/4] i2c: at91: remote default value initialization

On Mon, Dec 09, 2019 at 10:20:05AM +0000, [email protected] wrote:
> From: Eugen Hristev <[email protected]>
>
> Platform data structs are initialized by default with zero values.
> Thus it becomes redundant to initialize them manually to zero (false).
> Remove extra false initialization for field members in structs.
>
> Suggested-by: Wolfram Sang <[email protected]>
> Signed-off-by: Eugen Hristev <[email protected]>
> Reviewed-by: Ludovic Desroches <[email protected]>

Applied to for-next, thanks!


Attachments:
(No filename) (564.00 B)
signature.asc (849.00 B)
Download all attachments

2020-01-06 14:36:52

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v3 1/4] dt-bindings: i2c: at91: cosmetic formatting of compatible list

On Wed, Dec 18, 2019 at 03:37:16PM -0600, Rob Herring wrote:
> On Mon, 9 Dec 2019 10:19:59 +0000, <[email protected]> wrote:
> >
> > From: Eugen Hristev <[email protected]>
> >
> > Format the list of compatibles with one compatible per line.
> >
> > Suggested-by: Peter Rosin <[email protected]>
> > Signed-off-by: Eugen Hristev <[email protected]>
> > Acked-by: Ludovic Desroches <[email protected]>

Applied to for-next, thanks!


Attachments:
(No filename) (490.00 B)
signature.asc (849.00 B)
Download all attachments

2020-01-06 14:37:36

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v3 4/4] dt-bindings: i2c: at91: fix i2c-sda-hold-time-ns documentation for sam9x60

On Mon, Dec 09, 2019 at 10:20:07AM +0000, [email protected] wrote:
> From: Eugen Hristev <[email protected]>
>
> SAM9X60 also supports i2c-sda-hold-time-ns. Fix the documentation accordingly.
>
> Fixes: 2034e3f4c9a5 ("dt-bindings: i2c: at91: add new compatible")
> Signed-off-by: Eugen Hristev <[email protected]>

Applied to for-current, thanks!


Attachments:
(No filename) (390.00 B)
signature.asc (849.00 B)
Download all attachments