coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pcf8523.c File Reference
#include <commonlib/bsd/bcd.h>
#include <console/console.h>
#include <device/smbus.h>
#include <version.h>
#include "chip.h"
Include dependency graph for pcf8523.c:

Go to the source code of this file.

Functions

static void pcf8523_set_build_date (struct device *dev)
 
static void pcf8523_set_user_date (struct device *dev)
 
static void pcf8523_final (struct device *dev)
 
static void pcf8523_init (struct device *dev)
 
static void pcf8523_enable (struct device *dev)
 

Variables

static struct device_operations pcf8523c_ops
 
struct chip_operations drivers_i2c_pcf8523_ops
 

Function Documentation

◆ pcf8523_enable()

static void pcf8523_enable ( struct device dev)
static

Definition at line 126 of file pcf8523.c.

◆ pcf8523_final()

static void pcf8523_final ( struct device dev)
static

Definition at line 28 of file pcf8523.c.

References bcd2bin(), BIOS_INFO, device::chip_ops, DAY_REG, HOUR_REG, MINUTE_REG, MONTH_REG, chip_operations::name, OS_BIT, printk, SECOND_REG, smbus_read_byte(), and YEAR_REG.

Here is the call graph for this function:

◆ pcf8523_init()

◆ pcf8523_set_build_date()

static void pcf8523_set_build_date ( struct device dev)
static

Definition at line 10 of file pcf8523.c.

References coreboot_build_date, bcd_date::day, DAY_REG, bcd_date::month, MONTH_REG, smbus_write_byte(), bcd_date::weekday, WEEKDAY_REG, bcd_date::year, and YEAR_REG.

Referenced by pcf8523_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pcf8523_set_user_date()

static void pcf8523_set_user_date ( struct device dev)
static

Definition at line 19 of file pcf8523.c.

References bin2bcd(), device::chip_info, config, DAY_REG, MONTH_REG, smbus_write_byte(), WEEKDAY_REG, and YEAR_REG.

Referenced by pcf8523_init().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ drivers_i2c_pcf8523_ops

struct chip_operations drivers_i2c_pcf8523_ops
Initial value:
= {
.enable_dev = pcf8523_enable
}
static void pcf8523_enable(struct device *dev)
Definition: pcf8523.c:126

Definition at line 126 of file pcf8523.c.

◆ pcf8523c_ops

struct device_operations pcf8523c_ops
static
Initial value:
= {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.init = pcf8523_init,
.final = pcf8523_final
}
static void noop_read_resources(struct device *dev)
Standard device operations function pointers shims.
Definition: device.h:73
static void noop_set_resources(struct device *dev)
Definition: device.h:74
static void pcf8523_init(struct device *dev)
Definition: pcf8523.c:41
static void pcf8523_final(struct device *dev)
Definition: pcf8523.c:28

Definition at line 41 of file pcf8523.c.