]> Git Repo - J-u-boot.git/blame - drivers/power/power_dialog.c
imx: imx8mn_evk: correct stack/malloc adress
[J-u-boot.git] / drivers / power / power_dialog.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
20831061
FE
2/*
3 * Copyright (C) 2011 Samsung Electronics
4 * Lukasz Majewski <[email protected]>
20831061
FE
5 */
6
7#include <common.h>
f7ae49fc 8#include <log.h>
c7336815 9#include <power/pmic.h>
20831061 10#include <dialog_pmic.h>
c7336815 11#include <errno.h>
20831061 12
c7336815 13int pmic_dialog_init(unsigned char bus)
20831061 14{
20831061 15 static const char name[] = "DIALOG_PMIC";
c7336815
ŁM
16 struct pmic *p = pmic_alloc();
17
18 if (!p) {
19 printf("%s: POWER allocation error!\n", __func__);
20 return -ENOMEM;
21 }
20831061
FE
22
23 p->name = name;
ed5157e8 24 p->number_of_regs = DIALOG_NUM_OF_REGS;
20831061
FE
25
26 p->interface = PMIC_I2C;
27 p->hw.i2c.addr = CONFIG_SYS_DIALOG_PMIC_I2C_ADDR;
28 p->hw.i2c.tx_num = 1;
c7336815 29 p->bus = bus;
20831061
FE
30
31 return 0;
32}
This page took 0.376636 seconds and 4 git commands to generate.