summaryrefslogtreecommitdiffstats
path: root/src/soc/mediatek/common/rtc_pwrap_ops.c
blob: b32c90d6b869f45ab160d7922cd8d54cfdc69a7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* SPDX-License-Identifier: GPL-2.0-only */

#include <assert.h>
#include <soc/pmic_wrap_common.h>
#include <soc/rtc.h>

void rtc_read(u16 addr, u16 *rdata)
{
	s32 ret;

	*rdata = 0;
	ret = pwrap_read(addr, rdata);
	assert(ret == 0);
}

void rtc_write(u16 addr, u16 wdata)
{
	s32 ret;

	ret = pwrap_write(addr, wdata);
	assert(ret == 0);
}