On 1/18/19 9:25 PM, tristram...@microchip.com wrote:
>>> +#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.

The SPI and I2C protocol of the switch is different ?

-- 
Best regards,
Marek Vasut

Reply via email to