Re: [PATCH v4 3/8] hw/misc/pca9552: Use the PCA9552_PIN_COUNT definition

2020-06-22 Thread Cédric Le Goater
On 6/22/20 10:37 AM, Philippe Mathieu-Daudé wrote: > On 6/22/20 8:25 AM, Cédric Le Goater wrote: >> On 6/21/20 12:58 AM, Philippe Mathieu-Daudé wrote: >>> The current code models the PCA9552, but there are comments >>> saying the code could be easily adapted for the rest of the >>> PCA955x family.

Re: [PATCH v4 3/8] hw/misc/pca9552: Use the PCA9552_PIN_COUNT definition

2020-06-22 Thread Philippe Mathieu-Daudé
On 6/22/20 8:25 AM, Cédric Le Goater wrote: > On 6/21/20 12:58 AM, Philippe Mathieu-Daudé wrote: >> The current code models the PCA9552, but there are comments >> saying the code could be easily adapted for the rest of the >> PCA955x family. >> Since we assume we have at most 16 pins (for the PCA95

Re: [PATCH v4 3/8] hw/misc/pca9552: Use the PCA9552_PIN_COUNT definition

2020-06-21 Thread Cédric Le Goater
On 6/21/20 12:58 AM, Philippe Mathieu-Daudé wrote: > The current code models the PCA9552, but there are comments > saying the code could be easily adapted for the rest of the > PCA955x family. > Since we assume we have at most 16 pins (for the PCA9552), > add a definition and check the instance doe

[PATCH v4 3/8] hw/misc/pca9552: Use the PCA9552_PIN_COUNT definition

2020-06-20 Thread Philippe Mathieu-Daudé
The current code models the PCA9552, but there are comments saying the code could be easily adapted for the rest of the PCA955x family. Since we assume we have at most 16 pins (for the PCA9552), add a definition and check the instance doesn't use more than this number. This makes the code a bit saf