| /freebsd/crypto/heimdal/lib/kadm5/ |
| H A D | ipropd_master.c | 2 * Copyright (c) 1997 - 2008 Kungliga Tekniska Högskolan 52 struct sockaddr_un addr; in make_signal_socket() local 61 memset (&addr, 0, sizeof(addr)); in make_signal_socket() 62 addr.sun_family = AF_UNIX; in make_signal_socket() 63 strlcpy (addr.sun_path, fn, sizeof(addr.sun_path)); in make_signal_socket() 64 unlink (addr.sun_path); in make_signal_socket() 65 if (bind (fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) in make_signal_socket() 66 krb5_err (context, 1, errno, "bind %s", addr.sun_path); in make_signal_socket() 74 fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); in make_signal_socket() 76 krb5_err (context, 1, rk_SOCK_ERRNO, "socket AF=%d", ai->ai_family); in make_signal_socket() [all …]
|
| /freebsd/sys/dev/intpm/ |
| H A D | intpm.c | 1 /*- 62 #define INTSMB_LOCK(sc) mtx_lock(&(sc)->lock) 63 #define INTSMB_UNLOCK(sc) mtx_unlock(&(sc)->lock) 64 #define INTSMB_LOCK_ASSERT(sc) mtx_assert(&(sc)->lock, MA_OWNED) 73 static int intsmb_quick(device_t dev, u_char slave, int how); 74 static int intsmb_sendb(device_t dev, u_char slave, char byte); 75 static int intsmb_recvb(device_t dev, u_char slave, char *byte); 76 static int intsmb_writeb(device_t dev, u_char slave, char cmd, char byte); 77 static int intsmb_writew(device_t dev, u_char slave, char cmd, short word); 78 static int intsmb_readb(device_t dev, u_char slave, char cmd, char *byte); [all …]
|
| /freebsd/sys/dev/iicbus/ |
| H A D | iiconf.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 44 * system errno value later. This lets controller- and bus-layer code get 54 * Translate IIC_Exxxxx status values to vaguely-equivelent errno values. 75 * IIC_ERRNO marker bit. If lots of high-order bits are set, in iic2errno() 76 * then it's one of the negative pseudo-errors such as ERESTART in iic2errno() 77 * and we return it as-is. Otherwise it's a plain "small in iic2errno() 99 if (sc->owner) in iicbus_intr() 100 IICBUS_INTR(sc->owner, event, buf); in iicbus_intr() 113 error = mtx_sleep(sc, &sc->lock, IICPRI|PCATCH, "iicreq", 0); in iicbus_poll() [all …]
|
| H A D | icee.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 57 * AT24 parts have a "write page size" that differs per-device, and a "read page 68 int addr; /* Slave address on the bus */ member 112 #define CDEV2SOFTC(dev) ((dev)->si_drv1) 135 ofw_bus_search_compatible(dev, compat_data)->ocd_data; in icee_probe() 137 device_set_desc(dev, d->name); in icee_probe() 154 ofw_bus_search_compatible(sc->dev, compat_data)->ocd_data; in icee_init() 156 sc->size = d->size; in icee_init() 157 sc->type = d->type; in icee_init() [all …]
|
| H A D | iic.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 59 uint8_t addr; member 64 uint16_t slave; member 71 u_char slave; member 87 #define IIC_LOCK(cdp) sx_xlock(&(cdp)->lock) 88 #define IIC_UNLOCK(cdp) sx_xunlock(&(cdp)->lock) 157 sc->sc_dev = dev; in iic_attach() 158 sc->sc_devnode = make_dev(&iic_cdevsw, device_get_unit(dev), in iic_attach() 161 if (sc->sc_devnode == NULL) { in iic_attach() [all …]
|
| H A D | iicbb.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 31 * Generic I2C bit-banging code 42 * (c) 1998 Gerd Knorr <kraxel@cs.tu-berlin.de> 136 device_set_desc(dev, "I2C bit-banging driver"); in iicbb_probe() 146 sc->iicbus = device_add_child(dev, "iicbus", DEVICE_UNIT_ANY); in iicbb_attach() 147 if (!sc->iicbus) in iicbb_attach() 150 sc->scl_low_timeout = DEFAULT_SCL_LOW_TIMEOUT; in iicbb_attach() 154 "delay", CTLFLAG_RD, &sc->udelay, in iicbb_attach() 159 "scl_low_timeout", CTLFLAG_RWTUN, &sc->scl_low_timeout, in iicbb_attach() [all …]
|
| /freebsd/sys/dev/glxiic/ |
| H A D | glxiic.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 36 * The driver is implemented as an interrupt-driven state machine, 37 * supporting both master and slave mode. 63 /* CS5536 PCI-ISA ID. */ 152 uint8_t addr; /* Own address. */ member 168 #define GLXIIC_LOCK(_sc) mtx_lock(&_sc->mtx) 169 #define GLXIIC_UNLOCK(_sc) mtx_unlock(&_sc->mtx) 171 mtx_init(&_sc->mtx, device_get_nameunit(_sc->dev), "glxiic", MTX_DEF) 173 mtx_sleep(_sc, &_sc->mtx, IICPRI, "glxiic", 0) [all …]
|
| /freebsd/sys/dev/mlx4/mlx4_ib/ |
| H A D | mlx4_ib_mad.c | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 61 #define GET_BLK_PTR_FROM_EQE(eqe) be32_to_cpu(eqe->event.port_mgmt_change.params.tbl_change_info.bl… 62 #define GET_MASK_FROM_EQE(eqe) be32_to_cpu(eqe->event.port_mgmt_change.params.tbl_change_info.tbl_e… 102 return cpu_to_be64(atomic_inc_return(&ctx->tid)) | in mlx4_ib_get_new_demux_tid() 117 inmailbox = mlx4_alloc_cmd_mailbox(dev->dev); in mlx4_MAD_IFC() 120 inbox = inmailbox->buf; in mlx4_MAD_IFC() 122 outmailbox = mlx4_alloc_cmd_mailbox(dev->dev); in mlx4_MAD_IFC() 124 mlx4_free_cmd_mailbox(dev->dev, inmailbox); in mlx4_MAD_IFC() 138 if (mlx4_is_mfunc(dev->dev) && in mlx4_MAD_IFC() [all …]
|
| /freebsd/usr.sbin/smbmsg/ |
| H A D | smbmsg.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 55 static int cflag = -1; /* SMBus cmd */ 56 static int iflag = -1; /* input data */ 57 static int oflag = -1; /* output data */ 59 static int slave = -1; /* slave address */ variable 83 "usage: smbmsg [-f dev] -p\n" in usage() 84 " smbmsg [-f dev] -s slave [-F fmt] [-c cmd] [-w] " in usage() 85 "[-i incnt] [-o outcnt] [outdata ...]\n"); in usage() 98 return (-1); in getnum() [all …]
|
| /freebsd/sys/dev/pcf/ |
| H A D | pcf.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 65 while (counter--) { in pcf_wait_byte() 91 if (sc->pcf_started) { in pcf_stop_locked() 95 sc->pcf_started = 0; in pcf_stop_locked() 111 } while (k--); in pcf_noack() 117 pcf_repeated_start(device_t dev, u_char slave, int timeout) in pcf_repeated_start() argument 124 device_printf(dev, " >> repeated start for slave %#x\n", in pcf_repeated_start() 125 (unsigned)slave); in pcf_repeated_start() 130 /* set slave address to PCF. Last bit (LSB) must be set correctly in pcf_repeated_start() [all …]
|
| /freebsd/sys/dev/smbus/ |
| H A D | smbconf.h | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 78 SMBUS_IVAR_ADDR, /* slave address of the device */ 91 SMBUS_ACCESSOR(addr, ADDR, int) 97 #define smbus_quick(bus,slave,how) \ argument 98 (SMBUS_QUICK(device_get_parent(bus), slave, how)) 99 #define smbus_sendb(bus,slave,byte) \ argument 100 (SMBUS_SENDB(device_get_parent(bus), slave, byte)) 101 #define smbus_recvb(bus,slave,byte) \ argument 102 (SMBUS_RECVB(device_get_parent(bus), slave, byte)) [all …]
|
| H A D | smbus.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 48 uint8_t addr; member 69 mtx_init(&sc->lock, device_get_nameunit(dev), "smbus", MTX_DEF); in smbus_attach() 86 mtx_destroy(&sc->lock); in smbus_detach() 125 int addr; in smbus_hinted_child() local 127 addr = 0; in smbus_hinted_child() 128 resource_int_value(dname, dunit, "addr", &addr); in smbus_hinted_child() 129 if (addr > UINT8_MAX) { in smbus_hinted_child() 130 device_printf(bus, "ignored incorrect slave address hint 0x%x" in smbus_hinted_child() [all …]
|
| /freebsd/sys/dev/iicbus/pmic/ |
| H A D | act8846.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 56 {"active-semi,act8846", 1}, 60 #define LOCK(_sc) sx_xlock(&(_sc)->lock) 61 #define UNLOCK(_sc) sx_xunlock(&(_sc)->lock) 62 #define LOCK_INIT(_sc) sx_init(&(_sc)->lock, "act8846") 63 #define LOCK_DESTROY(_sc) sx_destroy(&(_sc)->lock); 64 #define ASSERT_LOCKED(_sc) sx_assert(&(_sc)->lock, SA_XLOCKED); 65 #define ASSERT_UNLOCKED(_sc) sx_assert(&(_sc)->lock, SA_UNLOCKED); 74 uint8_t addr; in act8846_read() local [all …]
|
| /freebsd/sys/dev/amdsmb/ |
| H A D | amdsmb.c | 1 /*- 94 #define SMB_STS_PEC 0x1f /* PEC (CRC-8) Error */ 114 #define AMDSMB_LOCK(amdsmb) mtx_lock(&(amdsmb)->lock) 115 #define AMDSMB_UNLOCK(amdsmb) mtx_unlock(&(amdsmb)->lock) 116 #define AMDSMB_LOCK_ASSERT(amdsmb) mtx_assert(&(amdsmb)->lock, MA_OWNED) 119 (bus_read_1(amdsmb->res, register)) 121 (bus_write_1(amdsmb->res, register, value)) 127 PCI_DESCR("AMD-8111 SMBus 2.0 Controller") } 138 device_set_desc(dev, tbl->descr); in amdsmb_probe() 149 amdsmb_sc->rid = PCIR_BAR(0); in amdsmb_attach() [all …]
|
| /freebsd/sys/contrib/device-tree/Bindings/fsi/ |
| H A D | fsi.txt | 4 The FSI bus is probe-able, so the OS is able to enumerate FSI slaves, and 6 nodes to probed engines. This allows for fsi engines to expose non-probeable 8 that is an I2C master - the I2C bus can be described by the device tree under 13 the fsi-master-* binding specifications. 16 represent the FSI slaves and their slave engines. As a basic outline: 18 fsi-master { 19 /* top-level of FSI bus topology, bound to an FSI master driver and 22 fsi-slave@<link,id> { 23 /* this node defines the FSI slave device, and is handled 26 fsi-slave-engine@<addr> { [all …]
|
| /freebsd/sys/arm/nvidia/ |
| H A D | as3722.c | 1 /*- 52 #include <dt-bindings/mfd/as3722.h> 64 #define LOCK(_sc) sx_xlock(&(_sc)->lock) 65 #define UNLOCK(_sc) sx_xunlock(&(_sc)->lock) 66 #define LOCK_INIT(_sc) sx_init(&(_sc)->lock, "as3722") 67 #define LOCK_DESTROY(_sc) sx_destroy(&(_sc)->lock); 68 #define ASSERT_LOCKED(_sc) sx_assert(&(_sc)->lock, SA_XLOCKED); 69 #define ASSERT_UNLOCKED(_sc) sx_assert(&(_sc)->lock, SA_UNLOCKED); 79 uint8_t addr; in as3722_read() local 82 {0, IIC_M_WR, 1, &addr}, in as3722_read() [all …]
|
| /freebsd/sys/arm64/nvidia/tegra210/ |
| H A D | max77620_rtc.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 83 #define LOCK(_sc) sx_xlock(&(_sc)->lock) 84 #define UNLOCK(_sc) sx_xunlock(&(_sc)->lock) 85 #define LOCK_INIT(_sc) sx_init(&(_sc)->lock, "max77620_rtc") 86 #define LOCK_DESTROY(_sc) sx_destroy(&(_sc)->lock); 102 uint8_t addr; in max77620_rtc_read() local 105 {0, IIC_M_WR, 1, &addr}, in max77620_rtc_read() 109 msgs[0].slave = sc->bus_addr; in max77620_rtc_read() 110 msgs[1].slave = sc->bus_addr; in max77620_rtc_read() [all …]
|
| H A D | max77620.c | 1 /*- 51 #include <dt-bindings/mfd/max77620.h> 63 #define LOCK(_sc) sx_xlock(&(_sc)->lock) 64 #define UNLOCK(_sc) sx_xunlock(&(_sc)->lock) 65 #define LOCK_INIT(_sc) sx_init(&(_sc)->lock, "max77620") 66 #define LOCK_DESTROY(_sc) sx_destroy(&(_sc)->lock); 67 #define ASSERT_LOCKED(_sc) sx_assert(&(_sc)->lock, SA_XLOCKED); 68 #define ASSERT_UNLOCKED(_sc) sx_assert(&(_sc)->lock, SA_UNLOCKED); 78 uint8_t addr; in max77620_read() local 81 {0, IIC_M_WR, 1, &addr}, in max77620_read() [all …]
|
| /freebsd/share/doc/psd/21.ipc/ |
| H A D | 5.t | 58 support only in-band signaling (i.e. the urgent data is 75 of the out-of-band data, but only notification that it is pending. 101 then reads the out-of-band byte. 135 A process may also read or peek at the out-of-band data 138 the urgent data in-band with the normal data, and only sends 141 With such protocols, the out-of-band byte may not yet have arrived 144 Worse, there may be enough in-band data in the input buffer 153 This treatment is available as a socket-level option, SO_OOBINLINE; 159 but no out-of-band data are lost. 161 Non-Blocking Sockets [all …]
|
| /freebsd/sys/dev/iicbus/sensor/ |
| H A D | htu21.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 52 * - Measurement Specialties HTU21D datasheet, 53 * - Sensirion SHT21 datasheet, 54 * - Silicon Labs Si7021 datasheet, 55 * - HTU2X Serial Number Reading application note, 56 * - Sensirion Electronic Identification Code (How to read-out the serial number 132 msgs[0].slave = sc->sc_addr; in htu21_get_measurement() 137 msgs[1].slave = sc->sc_addr; in htu21_get_measurement() 157 msgs[0].slave = sc->sc_addr; in htu21_get_measurement_nohold() [all …]
|
| /freebsd/sys/contrib/device-tree/Bindings/arm/tegra/ |
| H A D | nvidia,nvec.txt | 4 - compatible : should be "nvidia,nvec". 5 - reg : the iomem of the i2c slave controller 6 - interrupts : the interrupt line of the i2c slave controller 7 - clock-frequency : the frequency of the i2c bus 8 - gpios : the gpio used for ec request 9 - slave-addr: the i2c address of the slave controller 10 - clocks : Must contain an entry for each entry in clock-names. 11 See ../clocks/clock-bindings.txt for details. 12 - clock-names : Must include the following entries: 14 - div-clk [all …]
|
| /freebsd/sys/contrib/device-tree/Bindings/mfd/ |
| H A D | 88pm860x.txt | 4 - compatible : "marvell,88pm860x" 5 - reg : the I2C slave address for the 88pm860x chip 6 - interrupts : IRQ line for the 88pm860x chip 7 - interrupt-controller: describes the 88pm860x as an interrupt controller (has its own domain) 8 - #interrupt-cells : should be 1. 9 - The cell is the 88pm860x local IRQ number 12 - marvell,88pm860x-irq-read-clr: inicates whether interrupt status is cleared by read 13 - marvell,88pm860x-slave-addr: 88pm860x are two chips solution. <reg> stores the I2C address 17 88pm860x consists of a large and varied group of sub-devices: 20 ------ ------------ ----------- [all …]
|
| /freebsd/usr.sbin/i2c/ |
| H A D | i2c.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (C) 2008-2009 Semihalf, Michal Hajduk and Bartlomiej Sieka 60 uint32_t addr; member 75 fprintf(stderr, "usage: %s -a addr [-f device] [-d [r|w]] [-o offset] " in usage() 76 "[-w [0|8|16|16LE|16BE]] [-c count] [-m [tr|ss|rs|no]] [-b] [-v]\n", in usage() 78 fprintf(stderr, " %s -s [-f device] [-n skip_addr] -v\n", in usage() 80 fprintf(stderr, " %s -r [-f device] -v\n", getprogname()); in usage() 168 usage("Bad -n argument, expected (first) hex-digit"); in parse_skip() 171 usage("Bad -n argument, expected (second) hex-digit"); in parse_skip() [all …]
|
| /freebsd/sys/dev/xilinx/ |
| H A D | xlnx_pcib.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2020-2025 Ruslan Bukin <br@bsdpad.com> 8 * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the 98 { -1, 0 } 109 { "xlnx,xdma-host-3.00", 1 }, 110 { "xlnx,axi-pcie-host-1.00.a", 1 }, 119 reg = bus_read_4(sc->res, XLNX_PCIE_RPERRFRR); in xlnx_pcib_clear_err_interrupts() 122 device_printf(sc->dev, "Requested ID: %x\n", in xlnx_pcib_clear_err_interrupts() 124 bus_write_4(sc->res, XLNX_PCIE_RPERRFRR, ~0U); in xlnx_pcib_clear_err_interrupts() [all …]
|
| /freebsd/sys/dev/iicbus/pmic/silergy/ |
| H A D | sy8106a.c | 1 /*- 71 uint16_t addr; member 85 msg[0].slave = sc->addr; in sy8106a_read() 90 msg[1].slave = sc->addr; in sy8106a_read() 110 msg.slave = sc->addr; in sy8106a_write() 132 sy8106a_read(sc->base_dev, VOUT_COM, &val, 1); in sy8106a_regnode_enable() 137 sy8106a_write(sc->base_dev, VOUT_COM, val); in sy8106a_regnode_enable() 139 *udelay = sc->param->ramp_delay; in sy8106a_regnode_enable() 155 sy8106a_read(sc->base_dev, VOUT1_SEL, &oval, 1); in sy8106a_regnode_set_voltage() 160 val = SEL_GO | ((min_uvolt - SEL_VOLTAGE_BASE) / SEL_VOLTAGE_STEP); in sy8106a_regnode_set_voltage() [all …]
|