Re: Xilinx iic i2c bus interface GPIO support for i2c-mux in Linux.

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

 



Hi Robin,

On Wed, 8 Feb 2012 13:46:15 -0600, Robin Holt wrote:
> We are using a Xilinx FPGA which implements a series of i2c bus
> interfaces.  We are planning on implementing a single-bit GPIO
> (XIIC_GPO_REG_OFFSET) which is included in that logic block to act
> as a MUX selector (also in the FPGA) between two separate i2c busses.
> 
> This will require a GPIO driver in the linux kernel.
> 
> Is it better to try and change the i2c-xiic.c code which already knows
> about the GPO register to handle that additional GPIO or should we be
> implementing the GPIO driver outside the i2c driver and then use the
> standard i2c-mux support available in newer kernels?

Both are possible. It depends if there are other GPIOs on your FPGA
which you will have to access from other drivers for other purposes. If
there are such other GPIOs then it certainly makes sense to have a
clean, separate gpio driver for your FPGA, and have all consumers bind
to it. If not, then I'd keep things simple and embed everything in
i2c-xiic.c, especially if the two i2c buses are truly separated and
there is no common trunk (i2c-mux would create 3 segments.)

-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux