|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH v2 3/4] hw/gpio: add PCA9536 i2c gpio expander |
Date: | Thu, 9 Feb 2023 09:00:13 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 |
On 8/2/23 23:43, Titus Rwantare wrote:
This device has the same register layout as the pca9538, but 4 fewer gpio pins. This commit lowers the number of pins initialised, and reuses the pca9538 logic. Reviewed-by: Hao Wu <wuhaotsh@google.com> Signed-off-by: Titus Rwantare <titusr@google.com> --- hw/gpio/pca_i2c_gpio.c | 18 ++++++++++++++++++ include/hw/gpio/pca_i2c_gpio.h | 2 ++ 2 files changed, 20 insertions(+)
+static void pca9536_gpio_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc = DEVICE_CLASS(klass); + I2CSlaveClass *k = I2C_SLAVE_CLASS(klass); + PCAGPIOClass *pc = PCA_I2C_GPIO_CLASS(klass); + + dc->desc = "PCA9536 4-bit I/O expander"; + pc->num_pins = PCA9536_NUM_PINS; + + k->recv = pca9538_recv; + k->send = pca9538_send;
Can we rename as pca953x_recv() / pca953x_send() in previous patch? Otherwise, Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
[Prev in Thread] | Current Thread | [Next in Thread] |