[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BY1PR11MB0439511ECE1723524D4DB4ADEC9C0@BY1PR11MB0439.namprd11.prod.outlook.com>
Date: Fri, 18 Jan 2019 20:25:14 +0000
From: <Tristram.Ha@...rochip.com>
To: <marex@...x.de>
CC: <vivien.didelot@...oirfairelinux.com>,
<UNGLinuxDriver@...rochip.com>, <netdev@...r.kernel.org>,
<f.fainelli@...il.com>, <andrew@...n.ch>,
<dan.carpenter@...cle.com>, <pavel@....cz>,
<sergio.paracuellos@...il.com>
Subject: RE: [PATCH RFC v1] net: dsa: microchip: add KSZ9477 I2C driver
> > +#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.
Powered by blists - more mailing lists