git: 4bce8178af85 - stable/14 - iicbus/mux/pca954x: add support for PCA9546 I2C Switch
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 01 Apr 2024 23:47:29 UTC
The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4bce8178af8544cf0cc2cfc742bbe50ad43af738 commit 4bce8178af8544cf0cc2cfc742bbe50ad43af738 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2024-02-21 09:10:55 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2024-04-01 23:46:10 +0000 iicbus/mux/pca954x: add support for PCA9546 I2C Switch Add support for the 4 channel I2C switch from NXP by adding a new description struct and the list entries. Compared to x=[2345] which require code to support the INT, for this one no further changes are needed. Tested on: WHLE-LS1088A using a SPF+ Reviewed by: imp (cherry picked from commit c81df1c112621803abe6a43aa89238c830e86b72) --- sys/dev/iicbus/mux/pca954x.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/dev/iicbus/mux/pca954x.c b/sys/dev/iicbus/mux/pca954x.c index aebd55d6c311..befa0db39172 100644 --- a/sys/dev/iicbus/mux/pca954x.c +++ b/sys/dev/iicbus/mux/pca954x.c @@ -3,7 +3,7 @@ * * Copyright (c) 2019 Ian Lepore <ian@freebsd.org> * Copyright (c) 2020-2021 Andriy Gapon - * Copyright (c) 2022 Bjoern A. Zeeb + * Copyright (c) 2022-2024 Bjoern A. Zeeb * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -69,6 +69,13 @@ static struct pca954x_descr pca9540_descr = { .enable = 0x04, }; +static struct pca954x_descr pca9546_descr = { + .partname = "pca9546", + .description = "PCA9546 I2C Switch", + .type = PCA954X_SW, + .numchannels = 4, +}; + static struct pca954x_descr pca9547_descr = { .partname = "pca9547", .description = "PCA9547 I2C Mux", @@ -87,6 +94,7 @@ static struct pca954x_descr pca9548_descr = { #ifdef FDT static struct ofw_compat_data compat_data[] = { { "nxp,pca9540", (uintptr_t)&pca9540_descr }, + { "nxp,pca9546", (uintptr_t)&pca9546_descr }, { "nxp,pca9547", (uintptr_t)&pca9547_descr }, { "nxp,pca9548", (uintptr_t)&pca9548_descr }, { NULL, 0 }, @@ -94,6 +102,7 @@ static struct ofw_compat_data compat_data[] = { #else static struct pca954x_descr *part_descrs[] = { &pca9540_descr, + &pca9546_descr, &pca9547_descr, &pca9548_descr, };