include/linux/platform_data/brcmfmac.h

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

File Facts

System
Linux kernel
Corpus path
include/linux/platform_data/brcmfmac.h
Extension
.h
Size
6790 bytes
Lines
186
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: exported/initcall integration point
Status
integration 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

* the kernel. If built-in then do note that it uses module_init (and
 * module_exit) routines which equal device_initcall. So if you intend to
 * create a module with the platform specific data for the brcmfmac and have
 * it built-in to the kernel then use a higher initcall then device_initcall
 * (see init.h). If this is not done then brcmfmac will load without problems
 * but will not pickup the platform data.
 *
 * When the driver does not "detect" platform driver data then it will continue
 * without reporting anything and just assume there is no data needed. Which is
 * probably true for most platforms.
 */

/**
 * enum brcmf_bus_type - Bus type identifier. Currently SDIO, USB and PCIE are
 *			 supported.
 */
enum brcmf_bus_type {
	BRCMF_BUSTYPE_SDIO,
	BRCMF_BUSTYPE_USB,
	BRCMF_BUSTYPE_PCIE
};


/**
 * struct brcmfmac_sdio_pd - SDIO Device specific platform data.
 *
 * @txglomsz:		SDIO txglom size. Use 0 if default of driver is to be
 *			used.
 * @drive_strength:	is the preferred drive_strength to be used for the SDIO
 *			pins. If 0 then a default value will be used. This is
 *			the target drive strength, the exact drive strength
 *			which will be used depends on the capabilities of the
 *			device.
 * @oob_irq_supported:	does the board have support for OOB interrupts. SDIO
 *			in-band interrupts are relatively slow and for having
 *			less overhead on interrupt processing an out of band
 *			interrupt can be used. If the HW supports this then
 *			enable this by setting this field to true and configure
 *			the oob related fields.
 * @oob_irq_nr,
 * @oob_irq_flags:	the OOB interrupt information. The values are used for
 *			registering the irq using request_irq function.
 * @broken_sg_support:	flag for broken sg list support of SDIO host controller.
 *			Set this to true if the SDIO host controller has higher
 *			align requirement than 32 bytes for each scatterlist
 *			item.
 * @sd_head_align:	alignment requirement for start of data buffer.
 * @sd_sgentry_align:	length alignment requirement for each sg entry.
 * @reset:		This function can get called if the device communication
 *			broke down. This functionality is particularly useful in
 *			case of SDIO type devices. It is possible to reset a
 *			dongle via sdio data interface, but it requires that
 *			this is fully functional. This function is chip/module
 *			specific and this function should return only after the
 *			complete reset has completed.
 */
struct brcmfmac_sdio_pd {
	int		txglomsz;
	unsigned int	drive_strength;
	bool		oob_irq_supported;
	unsigned int	oob_irq_nr;
	unsigned long	oob_irq_flags;
	bool		broken_sg_support;
	unsigned short	sd_head_align;
	unsigned short	sd_sgentry_align;
	void		(*reset)(void);
};

/**
 * struct brcmfmac_pd_cc_entry - Struct for translating user space country code
 *				 (iso3166) to firmware country code and
 *				 revision.
 *
 * @iso3166:	iso3166 alpha 2 country code string.
 * @cc:		firmware country code string.
 * @rev:	firmware country code revision.
 */
struct brcmfmac_pd_cc_entry {
	char	iso3166[BRCMFMAC_COUNTRY_BUF_SZ];
	char	cc[BRCMFMAC_COUNTRY_BUF_SZ];
	s32	rev;
};

/**
 * struct brcmfmac_pd_cc - Struct for translating country codes as set by user
 *			   space to a country code and rev which can be used by
 *			   firmware.
 *
 * @table_size:	number of entries in table (> 0)
 * @table:	array of 1 or more elements with translation information.

Annotation

Implementation Notes