drm/panthor: Don't add write fences to the shared BOs
[drm/drm-misc.git] / arch / mips / include / asm / gio_device.h
blob159087f5386e9efd04b5c98d4204278371638f35
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/device.h>
3 #include <linux/mod_devicetable.h>
5 struct gio_device_id {
6 __u8 id;
7 };
9 struct gio_device {
10 struct device dev;
11 struct resource resource;
12 unsigned int irq;
13 unsigned int slotno;
15 const char *name;
16 struct gio_device_id id;
17 unsigned id32:1;
18 unsigned gio64:1;
20 #define to_gio_device(d) container_of(d, struct gio_device, dev)
22 struct gio_driver {
23 const char *name;
24 struct module *owner;
25 const struct gio_device_id *id_table;
27 int (*probe)(struct gio_device *, const struct gio_device_id *);
28 void (*remove)(struct gio_device *);
29 void (*shutdown)(struct gio_device *);
31 struct device_driver driver;
33 #define to_gio_driver(drv) container_of(drv, struct gio_driver, driver)
35 extern struct gio_device *gio_dev_get(struct gio_device *);
36 extern void gio_dev_put(struct gio_device *);
38 extern int gio_device_register(struct gio_device *);
39 extern void gio_device_unregister(struct gio_device *);
40 extern void gio_release_dev(struct device *);
42 static inline void gio_device_free(struct gio_device *dev)
44 gio_release_dev(&dev->dev);
47 extern int gio_register_driver(struct gio_driver *);
48 extern void gio_unregister_driver(struct gio_driver *);
50 #define gio_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev)
51 #define gio_set_drvdata(_dev, data) dev_set_drvdata(&(_dev)->dev, (data))
53 extern void gio_set_master(struct gio_device *);