/** * struct mux_control_ops - Mux controller operations for a mux chip. * @set: Set the state of the given mux controller.
*/ struct mux_control_ops { int (*set)(struct mux_control *mux, int state);
};
/** * struct mux_control - Represents a mux controller. * @lock: Protects the mux controller state. * @chip: The mux chip that is handling this mux controller. * @cached_state: The current mux controller state, or -1 if none. * @states: The number of mux controller states. * @idle_state: The mux controller state to use when inactive, or one * of MUX_IDLE_AS_IS and MUX_IDLE_DISCONNECT. * @last_change: Timestamp of last change * * Mux drivers may only change @states and @idle_state, and may only do so * between allocation and registration of the mux controller. Specifically, * @cached_state is internal to the mux core and should never be written by * mux drivers.
*/ struct mux_control { struct semaphore lock; /* protects the state of the mux */
struct mux_chip *chip; int cached_state;
unsignedint states; int idle_state;
ktime_t last_change;
};
/** * struct mux_chip - Represents a chip holding mux controllers. * @controllers: Number of mux controllers handled by the chip. * @dev: Device structure. * @id: Used to identify the device internally. * @ops: Mux controller operations. * @mux: Array of mux controllers that are handled.
*/ struct mux_chip { unsignedint controllers; struct device dev; int id;
/** * mux_chip_priv() - Get the extra memory reserved by mux_chip_alloc(). * @mux_chip: The mux-chip to get the private memory from. * * Return: Pointer to the private memory reserved by the allocator.
*/ staticinlinevoid *mux_chip_priv(struct mux_chip *mux_chip)
{ return &mux_chip->mux[mux_chip->controllers];
}
/** * mux_control_get_index() - Get the index of the given mux controller * @mux: The mux-control to get the index for. * * Return: The index of the mux controller within the mux chip the mux * controller is a part of.
*/ staticinlineunsignedint mux_control_get_index(struct mux_control *mux)
{ return mux - mux->chip->mux;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.