include/linux/platform_data/mlxreg.h

Source file repositories/reference/linux-study-clean/include/linux/platform_data/mlxreg.h

File Facts

System
Linux kernel
Corpus path
include/linux/platform_data/mlxreg.h
Extension
.h
Size
7756 bytes
Lines
240
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct mlxreg_core_hotplug_notifier {
	char identity[MLXREG_CORE_LABEL_MAX_SIZE];
	void *handle;
	int (*user_handler)(void *handle, enum mlxreg_hotplug_kind kind, u8 action);
};

/**
 * struct mlxreg_hotplug_device - I2C device data:
 *
 * @adapter: I2C device adapter;
 * @client: I2C device client;
 * @brdinfo: device board information;
 * @nr: I2C device adapter number, to which device is to be attached;
 * @pdev: platform device, if device is instantiated as a platform device;
 * @action: action to be performed upon event receiving;
 * @handle: user handle to be passed by user handler function;
 * @user_handler: user handler function associated with the event;
 * @notifier: pointer to event notifier block;
 *
 * Structure represents I2C hotplug device static data (board topology) and
 * dynamic data (related kernel objects handles).
 */
struct mlxreg_hotplug_device {
	struct i2c_adapter *adapter;
	struct i2c_client *client;
	struct i2c_board_info *brdinfo;
	int nr;
	struct platform_device *pdev;
	enum mlxreg_hotplug_device_action action;
	void *handle;
	int (*user_handler)(void *handle, enum mlxreg_hotplug_kind kind, u8 action);
	struct mlxreg_core_hotplug_notifier *notifier;
};

/**
 * struct mlxreg_core_data - attributes control data:
 *
 * @label: attribute label;
 * @reg: attribute register;
 * @mask: attribute access mask;
 * @bit: attribute effective bit;
 * @capability: attribute capability register;
 * @reg_prsnt: attribute presence register;
 * @reg_sync: attribute synch register;
 * @reg_pwr: attribute power register;
 * @reg_ena: attribute enable register;
 * @mode: access mode;
 * @np: pointer to node platform associated with attribute;
 * @hpdev: hotplug device data;
 * @notifier: pointer to event notifier block;
 * @health_cntr: dynamic device health indication counter;
 * @attached: true if device has been attached after good health indication;
 * @regnum: number of registers occupied by multi-register attribute;
 * @slot: slot number, at which device is located;
 * @secured: if set indicates that entry access is secured;
 */
struct mlxreg_core_data {
	char label[MLXREG_CORE_LABEL_MAX_SIZE];
	u32 reg;
	u32 mask;
	u32 bit;
	u32 capability;
	u32 reg_prsnt;
	u32 reg_sync;
	u32 reg_pwr;
	u32 reg_ena;
	umode_t	mode;
	struct device_node *np;
	struct mlxreg_hotplug_device hpdev;
	struct mlxreg_core_hotplug_notifier *notifier;
	u32 health_cntr;
	bool attached;
	u8 regnum;
	u8 slot;
	u8 secured;
};

/**
 * struct mlxreg_core_item - same type components controlled by the driver:
 *
 * @data: component data;
 * @kind: kind of hotplug attribute;
 * @aggr_mask: group aggregation mask;
 * @reg: group interrupt status register;
 * @mask: group interrupt mask;
 * @capability: group capability register;
 * @cache: last status value for elements fro the same group;
 * @count: number of available elements in the group;
 * @ind: element's index inside the group;
 * @inversed: if 0: 0 for signal status is OK, if 1 - 1 is OK;

Annotation

Implementation Notes