4 * Copyright (C) 2006, 2007 OpenWrt.org
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 struct vlynq_mapping
{
28 } __attribute__ ((packed
));
30 struct vlynq_device_id
{
41 u32 regs_start
, regs_end
;
42 u32 mem_start
, mem_end
;
43 u32 irq_start
, irq_end
;
45 struct vlynq_regs
*local
;
46 struct vlynq_regs
*remote
;
52 int (*probe
)(struct vlynq_device
*dev
);
53 int (*remove
)(struct vlynq_device
*dev
);
54 struct device_driver driver
;
57 #define to_vlynq_driver(drv) container_of(drv, struct vlynq_driver, driver)
59 struct plat_vlynq_ops
{
60 int (*on
)(struct vlynq_device
*dev
);
61 void (*off
)(struct vlynq_device
*dev
);
64 #define to_vlynq_device(device) container_of(device, struct vlynq_device, dev)
66 extern struct bus_type vlynq_bus_type
;
68 extern int __vlynq_register_driver(struct vlynq_driver
*driver
,
69 struct module
*owner
);
71 static inline int vlynq_register_driver(struct vlynq_driver
*driver
)
73 return __vlynq_register_driver(driver
, THIS_MODULE
);
76 extern void vlynq_unregister_driver(struct vlynq_driver
*driver
);
77 extern int vlynq_device_enable(struct vlynq_device
*dev
);
78 extern void vlynq_device_disable(struct vlynq_device
*dev
);
79 extern u32
vlynq_local_id(struct vlynq_device
*dev
);
80 extern u32
vlynq_remote_id(struct vlynq_device
*dev
);
81 extern void vlynq_set_local_mapping(struct vlynq_device
*dev
,
83 struct vlynq_mapping
*mapping
);
84 extern void vlynq_set_remote_mapping(struct vlynq_device
*dev
,
86 struct vlynq_mapping
*mapping
);
87 extern int vlynq_virq_to_irq(struct vlynq_device
*dev
, int virq
);
88 extern int vlynq_irq_to_virq(struct vlynq_device
*dev
, int irq
);
89 extern int vlynq_set_local_irq(struct vlynq_device
*dev
, int virq
);
90 extern int vlynq_set_remote_irq(struct vlynq_device
*dev
, int virq
);
92 #endif /* __VLYNQ_H__ */
This page took 0.053618 seconds and 5 git commands to generate.