Messages in this thread |  | | Subject | Re: [PATCH v21 2/2] drm/bridge: Add I2C based driver for ps8640 bridge | From | Ezequiel Garcia <> | Date | Wed, 18 Dec 2019 14:22:00 -0300 |
| |
On Wed, 2019-12-18 at 16:21 +0100, Enric Balletbo i Serra wrote: > Hi Ezequiel, > > Many thanks for the review, I am just preparing the next version to send. > [..] > > > + > > > +#define PAGE1_VSTART 0x6b > > > +#define PAGE2_SPI_CFG3 0x82 > > > +#define I2C_TO_SPI_RESET 0x20 > > > +#define PAGE2_ROMADD_BYTE1 0x8e > > > +#define PAGE2_ROMADD_BYTE2 0x8f > > > +#define PAGE2_SWSPI_WDATA 0x90 > > > +#define PAGE2_SWSPI_RDATA 0x91 > > > +#define PAGE2_SWSPI_LEN 0x92 > > > +#define PAGE2_SWSPI_CTL 0x93 > > > +#define TRIGGER_NO_READBACK 0x05 > > > +#define TRIGGER_READBACK 0x01 > > > +#define PAGE2_SPI_STATUS 0x9e > > > +#define SPI_READY 0x0c > > > +#define PAGE2_GPIO_L 0xa6 > > > +#define PAGE2_GPIO_H 0xa7 > > > +#define PS_GPIO9 BIT(1) > > > +#define PAGE2_IROM_CTRL 0xb0 > > > +#define IROM_ENABLE 0xc0 > > > +#define IROM_DISABLE 0x80 > > > +#define PAGE2_SW_RESET 0xbc > > > +#define SPI_SW_RESET BIT(7) > > > +#define MPU_SW_RESET BIT(6) > > > +#define PAGE2_ENCTLSPI_WR 0xda > > > +#define PAGE2_I2C_BYPASS 0xea > > > +#define I2C_BYPASS_EN 0xd0 > > > +#define PAGE2_MCS_EN 0xf3 > > > +#define MCS_EN BIT(0) > > > +#define PAGE3_SET_ADD 0xfe > > > +#define PAGE3_SET_VAL 0xff > > > +#define VDO_CTL_ADD 0x13 > > > +#define VDO_DIS 0x18 > > > +#define VDO_EN 0x1c > > > +#define PAGE4_REV_L 0xf0 > > > +#define PAGE4_REV_H 0xf1 > > > +#define PAGE4_CHIP_L 0xf2 > > > +#define PAGE4_CHIP_H 0xf3 > > > + > > > +#define PAGE0_DP_CNTL 0 > > > > Unused macro. > > > > > +#define PAGE1_VDO_BDG 1 > > > +#define PAGE2_TOP_CNTL 2 > > > +#define PAGE3_DSI_CNTL1 3 > > > +#define PAGE4_MIPI_PHY 4 > > > > Ditto... maybe others as well? > > > > I removed all the unused macros. >
In this case, given these PAGEX_XXX refer to the I2C ancillaries, maybe you can leave them.
Moreover, I'd put them in an enum, to emphasize their relationship.
Regards, Ezequiel
|  |