2
* Registration hooks for PMICs used with OMAP
4
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License version 2 as
9
* published by the Free Software Foundation.
12
#include <linux/init.h>
13
#include <linux/kernel.h>
20
* omap_init_all_pmic() - trigger point for all PMIC initializers
22
void __init omap_init_all_pmic(void)
29
* omap_pmic_register_data() - Register the PMIC information to OMAP mapping
30
* @omap_pmic__maps: array ending with a empty element representing the maps
32
int __init omap_pmic_register_data(struct omap_pmic_map *omap_pmic_maps)
34
struct voltagedomain *voltdm;
35
struct omap_pmic_map *map;
45
if (!omap_are_we_running_on(map->omap_revs))
48
voltdm = voltdm_lookup(map->name);
49
if (IS_ERR_OR_NULL(voltdm)) {
50
pr_err("%s: unable to find map %s\n",__func__,
54
if (IS_ERR_OR_NULL(map->pmic_data)) {
55
pr_warning("%s: domain[%s] has no pmic data\n",__func__,
60
r = omap_voltage_register_pmic(voltdm, map->pmic_data);
62
pr_warning("%s: domain[%s] register returned %d\n",
63
__func__, map->name, r);
66
if (map->special_action) {
67
r = map->special_action(voltdm);
68
WARN(r, "%s: domain[%s] action returned %d\n", __func__,