iiconf.h (419f843fffd06af29c104330063fb6c22546ea28) | iiconf.h (422d05da14fe063e5d187d81a328fa7b362d069f) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 1998, 2001 Nicolas Souchu 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 33 unchanged lines hidden (view full) --- 42 * Options affecting iicbus_request_bus() 43 */ 44#define IIC_DONTWAIT 0 45#define IIC_NOINTR 0 46#define IIC_WAIT 0x1 47#define IIC_INTR 0x2 48#define IIC_INTRWAIT (IIC_INTR | IIC_WAIT) 49#define IIC_RECURSIVE 0x4 | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 1998, 2001 Nicolas Souchu 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 33 unchanged lines hidden (view full) --- 42 * Options affecting iicbus_request_bus() 43 */ 44#define IIC_DONTWAIT 0 45#define IIC_NOINTR 0 46#define IIC_WAIT 0x1 47#define IIC_INTR 0x2 48#define IIC_INTRWAIT (IIC_INTR | IIC_WAIT) 49#define IIC_RECURSIVE 0x4 |
50#define IIC_REQBUS_DEV 0x8 /* See struct iic_reqbus_data, below. */ |
|
50 51/* | 51 52/* |
53 * The original iicbus->bridge callback api took a pointer to an int containing 54 * flags. The new api allows a pointer to this struct, with IIC_REQBUS_DEV set 55 * in the flags to let the implementation know the pointer is actually to this 56 * struct which has the flags word first, followed by the device_t of the 57 * requesting bus and device. 58 * 59 * Note that the requesting device may not be a i2c slave device which is a 60 * child of the requested bus -- it may be a mux device which is electrically 61 * part of the bus hierarchy, but whose driver belongs to some other bus 62 * hierarchy such as gpio. 63 */ 64struct iic_reqbus_data { 65 int flags; /* Flags from the set defined above. */ 66 device_t bus; /* The iicbus being requested. */ 67 device_t dev; /* The device requesting the bus. */ 68}; 69 70/* |
|
52 * i2c modes 53 */ 54#define IIC_MASTER 0x1 55#define IIC_SLAVE 0x2 56#define IIC_POLLED 0x4 57 58/* 59 * i2c speed --- 105 unchanged lines hidden --- | 71 * i2c modes 72 */ 73#define IIC_MASTER 0x1 74#define IIC_SLAVE 0x2 75#define IIC_POLLED 0x4 76 77/* 78 * i2c speed --- 105 unchanged lines hidden --- |