e2cfe8770c4680349bec25b2aab1600e9037f70b
2 * Copyright (C) 2006, 2007 OpenWrt.org
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include <linux/device.h>
23 #include <linux/module.h>
24 #include <linux/types.h>
26 struct vlynq_mapping
{
29 } __attribute__ ((packed
));
31 struct vlynq_device_id
{
62 enum vlynq_divisor divisor
;
63 u32 regs_start
, regs_end
;
64 u32 mem_start
, mem_end
;
65 u32 irq_start
, irq_end
;
67 struct vlynq_regs
*local
;
68 struct vlynq_regs
*remote
;
74 int (*probe
)(struct vlynq_device
*dev
);
75 int (*remove
)(struct vlynq_device
*dev
);
76 struct device_driver driver
;
79 #define to_vlynq_driver(drv) container_of(drv, struct vlynq_driver, driver)
81 struct plat_vlynq_ops
{
82 int (*on
)(struct vlynq_device
*dev
);
83 void (*off
)(struct vlynq_device
*dev
);
86 #define to_vlynq_device(device) container_of(device, struct vlynq_device, dev)
88 extern struct bus_type vlynq_bus_type
;
90 extern int __vlynq_register_driver(struct vlynq_driver
*driver
,
91 struct module
*owner
);
93 static inline int vlynq_register_driver(struct vlynq_driver
*driver
)
95 return __vlynq_register_driver(driver
, THIS_MODULE
);
98 extern void vlynq_unregister_driver(struct vlynq_driver
*driver
);
99 extern int vlynq_device_enable(struct vlynq_device
*dev
);
100 extern void vlynq_device_disable(struct vlynq_device
*dev
);
101 extern u32
vlynq_remote_id(struct vlynq_device
*dev
);
102 extern void vlynq_set_local_mapping(struct vlynq_device
*dev
,
104 struct vlynq_mapping
*mapping
);
105 extern void vlynq_set_remote_mapping(struct vlynq_device
*dev
,
107 struct vlynq_mapping
*mapping
);
108 extern int vlynq_virq_to_irq(struct vlynq_device
*dev
, int virq
);
109 extern int vlynq_irq_to_virq(struct vlynq_device
*dev
, int irq
);
110 extern int vlynq_set_local_irq(struct vlynq_device
*dev
, int virq
);
111 extern int vlynq_set_remote_irq(struct vlynq_device
*dev
, int virq
);
113 #endif /* __VLYNQ_H__ */
This page took 0.056836 seconds and 3 git commands to generate.