[U-Boot] [PATCH] i2c: muxes: pca954x: look up width from chip_desc

Chris Packham judge.packham at gmail.com
Fri Sep 29 23:27:36 UTC 2017


On 30/09/2017 2:43 AM, "Marek BehĂșn" <marek.behun at nic.cz> wrote:

On Fri, 29 Sep 2017 10:53:36 +1300
Chris Packham <judge.packham at gmail.com> wrote:


>  struct pca954x_priv {
> @@ -39,14 +40,17 @@ static const struct chip_desc chips[] = {
>       [PCA9544] = {
>               .enable = 0x4,
>               .muxtype = pca954x_ismux,
> +             .width = 4,
>       },
>       [PCA9547] = {
>               .enable = 0x8,
>               .muxtype = pca954x_ismux,
> +             .width = 8,
>       },
>       [PCA9548] = {
>               .enable = 0x8,
>               .muxtype = pca954x_isswi,
> +             .width = 8,
>       },
>  };

Hmm, looking at this now, isn't one of the enable or width fields
redundant? They both have same values in all entries.


They happen to have the same value but they have different meanings. In
fact enable isn't actually used for the isswi code path.


More information about the U-Boot mailing list