> > +#define REG_SIZE                   0x8000
> > +
> > +#define I2C_REGMAP_VAL                     8
> > +#define I2C_REGMAP_REG                     16
> > +
> > +#define KSZ_REGMAP_COMMON(n, width)
>               \
> > +{                                                                  \
> > +   .name                   = n,                                    \
> > +   .max_register           = REG_SIZE - (width),                   \
> > +   .reg_bits               = I2C_REGMAP_REG,                       \
> > +   .val_bits               = I2C_REGMAP_VAL * (width),             \
> > +   .reg_stride             = (width),                              \
> > +   .reg_format_endian      = REGMAP_ENDIAN_BIG,
>       \
> > +   .val_format_endian      = REGMAP_ENDIAN_BIG,
>       \
> > +}
> This comes from my regmap RFC series, right ? Why do we need to redefine
> it here again ?

This is different from the SPI version.  The variables pad_bits, 
read_flag_mask, and write_flag_mask are not used.  reg_bits is also different.

For KSZ8795 SPI the differences are SPI_ADDR_S, SPI_TURNAROUND_S, and 
SPI_CMD_LEN.

Reply via email to