blob: b22696bf9a3f561859b0c314ab16b8e2b25fe872 [file] [log] [blame]
Duy Truong790f06d2013-02-13 16:38:12 -08001/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
Michael Bohan86e30dc2012-01-05 14:16:43 -08002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#include <linux/spmi.h>
14#include <linux/of_irq.h>
15
16#ifdef CONFIG_OF_SPMI
Michael Bohan86622b32012-02-08 16:59:00 -080017/**
18 * of_spmi_register_devices() - Register devices in the SPMI Device Tree
19 * @ctrl: spmi_controller which devices should be registered to.
20 *
21 * This routine scans the SPMI Device Tree, allocating resources and
22 * creating spmi_devices according to the SPMI bus Device Tree
23 * hierarchy. Details of this hierarchy can be found in
24 * Documentation/devicetree/bindings/spmi. This routine is normally
25 * called from the probe routine of the driver registering as a
26 * spmi_controller.
27 */
Michael Bohan86e30dc2012-01-05 14:16:43 -080028int of_spmi_register_devices(struct spmi_controller *ctrl);
29#else
30static int of_spmi_register_devices(struct spmi_controller *ctrl)
31{
32 return -ENXIO;
33}
34#endif /* CONFIG_OF_SPMI */