Server IP : 172.67.216.182 / Your IP : 172.70.147.108 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/src/linux-headers-5.15.0-142/include/linux/ |
Upload File : |
/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * * i2c-mux.h - functions for the i2c-bus mux support * * Copyright (c) 2008-2009 Rodolfo Giometti <[email protected]> * Copyright (c) 2008-2009 Eurotech S.p.A. <[email protected]> * Michael Lawnick <[email protected]> */ #ifndef _LINUX_I2C_MUX_H #define _LINUX_I2C_MUX_H #ifdef __KERNEL__ #include <linux/bitops.h> struct i2c_mux_core { struct i2c_adapter *parent; struct device *dev; unsigned int mux_locked:1; unsigned int arbitrator:1; unsigned int gate:1; void *priv; int (*select)(struct i2c_mux_core *, u32 chan_id); int (*deselect)(struct i2c_mux_core *, u32 chan_id); int num_adapters; int max_adapters; struct i2c_adapter *adapter[]; }; struct i2c_mux_core *i2c_mux_alloc(struct i2c_adapter *parent, struct device *dev, int max_adapters, int sizeof_priv, u32 flags, int (*select)(struct i2c_mux_core *, u32), int (*deselect)(struct i2c_mux_core *, u32)); /* flags for i2c_mux_alloc */ #define I2C_MUX_LOCKED BIT(0) #define I2C_MUX_ARBITRATOR BIT(1) #define I2C_MUX_GATE BIT(2) static inline void *i2c_mux_priv(struct i2c_mux_core *muxc) { return muxc->priv; } struct i2c_adapter *i2c_root_adapter(struct device *dev); /* * Called to create an i2c bus on a multiplexed bus segment. * The chan_id parameter is passed to the select and deselect * callback functions to perform hardware-specific mux control. */ int i2c_mux_add_adapter(struct i2c_mux_core *muxc, u32 force_nr, u32 chan_id, unsigned int class); void i2c_mux_del_adapters(struct i2c_mux_core *muxc); #endif /* __KERNEL__ */ #endif /* _LINUX_I2C_MUX_H */