mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-21 00:42:16 +00:00
d7aacaddca
Allow architecture specific data in struct platform_device V3. With this patch struct pdev_archdata is added to struct platform_device, similar to struct dev_archdata in found in struct device. Useful for architecture code that needs to keep extra data associated with each platform device. Struct pdev_archdata is different from dev.platform_data, the convention is that dev.platform_data points to driver-specific data. It may or may not be required by the driver. The format of this depends on driver but is the same across architectures. The structure pdev_archdata is a place for architecture specific data. This data is handled by architecture specific code (for example runtime PM), and since it is architecture specific it should _never_ be touched by device driver code. Exactly like struct dev_archdata but for platform devices. [rjw: This change is for power management mostly and that's why it goes through the suspend tree.] Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
39 lines
647 B
C
39 lines
647 B
C
/*
|
|
* Arch specific extensions to struct device
|
|
*
|
|
* This file is released under the GPLv2
|
|
*/
|
|
#ifndef _ASM_SPARC_DEVICE_H
|
|
#define _ASM_SPARC_DEVICE_H
|
|
|
|
struct device_node;
|
|
struct of_device;
|
|
|
|
struct dev_archdata {
|
|
void *iommu;
|
|
void *stc;
|
|
void *host_controller;
|
|
|
|
struct device_node *prom_node;
|
|
struct of_device *op;
|
|
|
|
int numa_node;
|
|
};
|
|
|
|
static inline void dev_archdata_set_node(struct dev_archdata *ad,
|
|
struct device_node *np)
|
|
{
|
|
ad->prom_node = np;
|
|
}
|
|
|
|
static inline struct device_node *
|
|
dev_archdata_get_node(const struct dev_archdata *ad)
|
|
{
|
|
return ad->prom_node;
|
|
}
|
|
|
|
struct pdev_archdata {
|
|
};
|
|
|
|
#endif /* _ASM_SPARC_DEVICE_H */
|