mtd: Use kasprintf() instead of fixed buffer formatting
[linux/fpc-iii.git] / drivers / staging / board / board.h
blob5609daf4d8695f0294fc44a3d7da2b614acc34c0
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __BOARD_H__
3 #define __BOARD_H__
5 #include <linux/init.h>
6 #include <linux/of.h>
8 struct board_staging_clk {
9 const char *clk;
10 const char *con_id;
11 const char *dev_id;
14 struct board_staging_dev {
15 /* Platform Device */
16 struct platform_device *pdev;
17 /* Clocks (optional) */
18 const struct board_staging_clk *clocks;
19 unsigned int nclocks;
20 /* Generic PM Domain (optional) */
21 const char *domain;
24 struct resource;
26 bool board_staging_dt_node_available(const struct resource *resource,
27 unsigned int num_resources);
28 int board_staging_gic_setup_xlate(const char *gic_match, unsigned int base);
29 void board_staging_gic_fixup_resources(struct resource *res, unsigned int nres);
30 int board_staging_register_clock(const struct board_staging_clk *bsc);
31 int board_staging_register_device(const struct board_staging_dev *dev);
32 void board_staging_register_devices(const struct board_staging_dev *devs,
33 unsigned int ndevs);
35 #define board_staging(str, fn) \
36 static int __init runtime_board_check(void) \
37 { \
38 if (of_machine_is_compatible(str)) \
39 fn(); \
41 return 0; \
42 } \
44 device_initcall(runtime_board_check)
46 #endif /* __BOARD_H__ */