1 // SPDX-License-Identifier: GPL-2.0+
4 * Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
11 int board_get(struct udevice **devp)
13 return uclass_first_device_err(UCLASS_BOARD, devp);
16 int board_detect(struct udevice *dev)
18 struct board_ops *ops = board_get_ops(dev);
23 return ops->detect(dev);
26 int board_get_bool(struct udevice *dev, int id, bool *val)
28 struct board_ops *ops = board_get_ops(dev);
33 return ops->get_bool(dev, id, val);
36 int board_get_int(struct udevice *dev, int id, int *val)
38 struct board_ops *ops = board_get_ops(dev);
43 return ops->get_int(dev, id, val);
46 int board_get_str(struct udevice *dev, int id, size_t size, char *val)
48 struct board_ops *ops = board_get_ops(dev);
53 return ops->get_str(dev, id, size, val);
56 UCLASS_DRIVER(board) = {
59 .post_bind = dm_scan_fdt_dev,