diff mbox series

[U-Boot,v2,2/3] i2c: muxes: pca954x: clarify enable field

Message ID 20190409065743.32174-2-luca@lucaceresoli.net
State Awaiting Upstream
Delegated to: Heiko Schocher
Headers show
Series [U-Boot,v2,1/3] i2c: muxes: pca954x: update list of supported devices | expand

Commit Message

Luca Ceresoli April 9, 2019, 6:57 a.m. UTC
The chip_desc.enable field is used only for muxes, not for switches.
Document it and remove the unused values.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Heiko Schocher <hs@denx.de>

---

Changes v1 -> v2:
 - fix typo in commit message (Michal)
---
 drivers/i2c/muxes/pca954x.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Michal Simek April 9, 2019, 7:03 a.m. UTC | #1
On 09. 04. 19 8:57, Luca Ceresoli wrote:
> The chip_desc.enable field is used only for muxes, not for switches.
> Document it and remove the unused values.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Reviewed-by: Heiko Schocher <hs@denx.de>
> 
> ---
> 
> Changes v1 -> v2:
>  - fix typo in commit message (Michal)
> ---
>  drivers/i2c/muxes/pca954x.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
> index bd4e9abe5f3c..5669753ce14d 100644
> --- a/drivers/i2c/muxes/pca954x.c
> +++ b/drivers/i2c/muxes/pca954x.c
> @@ -22,7 +22,7 @@ enum pca_type {
>  };
>  
>  struct chip_desc {
> -	u8 enable;
> +	u8 enable; /* Enable mask in ctl register (used for muxes only) */
>  	enum muxtype {
>  		pca954x_ismux = 0,
>  		pca954x_isswi,
> @@ -48,12 +48,10 @@ static const struct chip_desc chips[] = {
>  		.width = 8,
>  	},
>  	[PCA9548] = {
> -		.enable = 0x8,
>  		.muxtype = pca954x_isswi,
>  		.width = 8,
>  	},
>  	[PCA9646] = {
> -		.enable = 0x0,
>  		.muxtype = pca954x_isswi,
>  		.width = 4,
>  	},
> 

Acked-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal
Heiko Schocher April 9, 2019, 1:16 p.m. UTC | #2
Hello Luca,

Am 09.04.2019 um 08:57 schrieb Luca Ceresoli:
> The chip_desc.enable field is used only for muxes, not for switches.
> Document it and remove the unused values.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Reviewed-by: Heiko Schocher <hs@denx.de>
> 
> ---
> 
> Changes v1 -> v2:
>   - fix typo in commit message (Michal)
> ---
>   drivers/i2c/muxes/pca954x.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Heiko Schocher<hs@denx.de>

bye,
Heiko
Heiko Schocher April 10, 2019, 5:42 a.m. UTC | #3
Hello Luca,

Am 09.04.2019 um 08:57 schrieb Luca Ceresoli:
> The chip_desc.enable field is used only for muxes, not for switches.
> Document it and remove the unused values.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Reviewed-by: Heiko Schocher <hs@denx.de>
> 
> ---
> 
> Changes v1 -> v2:
>   - fix typo in commit message (Michal)
> ---
>   drivers/i2c/muxes/pca954x.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)

Applied to u-boot-i2c.git master

Thanks!

bye,
Heiko
diff mbox series

Patch

diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
index bd4e9abe5f3c..5669753ce14d 100644
--- a/drivers/i2c/muxes/pca954x.c
+++ b/drivers/i2c/muxes/pca954x.c
@@ -22,7 +22,7 @@  enum pca_type {
 };
 
 struct chip_desc {
-	u8 enable;
+	u8 enable; /* Enable mask in ctl register (used for muxes only) */
 	enum muxtype {
 		pca954x_ismux = 0,
 		pca954x_isswi,
@@ -48,12 +48,10 @@  static const struct chip_desc chips[] = {
 		.width = 8,
 	},
 	[PCA9548] = {
-		.enable = 0x8,
 		.muxtype = pca954x_isswi,
 		.width = 8,
 	},
 	[PCA9646] = {
-		.enable = 0x0,
 		.muxtype = pca954x_isswi,
 		.width = 4,
 	},