qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/2] hw/i2c: Adds pca954x i2c mux switch device


From: Corey Minyard
Subject: Re: [PATCH 0/2] hw/i2c: Adds pca954x i2c mux switch device
Date: Mon, 5 Apr 2021 14:58:34 -0500

On Sat, Apr 03, 2021 at 03:28:08PM -0700, Patrick Venture wrote:
> The i2c mux device pca954x implements two devices:
>  - the pca9546 and pca9548.
> 
> Patrick Venture (2):
>   hw/i2c/core: add reachable state boolean
>   hw/i2c: add pca954x i2c-mux switch

Looking this over, the code looks good, but I have a few general
questions:

* Can you register the same slave address on different channels?  That's
  something you could do with real hardware and might be required at
  some time.  It looks like to me that you can't with this patch set,
  but maybe I'm missing something.

* Can you add devices to the secondary I2C busses on the mux using the
  standard QEMU device model, or is the function call required?

I ask because I did a pca9540 and pca9541 device, but I've never
submitted it because I didn't think it would ever be needed.  It takes a
different tack on the problem; it creates the secondary busses as
standard QEMU I2C busses and bridges them.  You can see it at

   github.com:cminyard/qemu.git master-i2c-rebase

If you design can do the things I ask, then it's better.  If not, then
I'm not sure.

-corey

> 
>  MAINTAINERS                      |   6 +
>  hw/i2c/Kconfig                   |   4 +
>  hw/i2c/core.c                    |   6 +
>  hw/i2c/i2c_mux_pca954x.c         | 182 +++++++++++++++++++++++++++++++
>  hw/i2c/meson.build               |   1 +
>  hw/i2c/trace-events              |   5 +
>  include/hw/i2c/i2c.h             |   3 +
>  include/hw/i2c/i2c_mux_pca954x.h |  60 ++++++++++
>  8 files changed, 267 insertions(+)
>  create mode 100644 hw/i2c/i2c_mux_pca954x.c
>  create mode 100644 include/hw/i2c/i2c_mux_pca954x.h
> 
> -- 
> 2.31.0.208.g409f899ff0-goog
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]