This file contains MC13783 specific PMIC code. This implementaion may differ for each PMIC chip. More...
Functions | |
int | pmic_read (unsigned int reg_num, unsigned int *reg_val) |
int | pmic_write (int reg_num, const unsigned int reg_val) |
int | pmic_spi_setup (struct spi_device *spi) |
int | pmic_init_registers (void) |
void | pmic_get_revision (pmic_version_t *ver) |
unsigned int | pmic_get_active_events (unsigned int *active_events) |
int | pmic_event_unmask (type_event event) |
int | pmic_event_mask (type_event event) |
bool | pmic_check_sensor (t_sensor sensor) |
PMIC_STATUS | pmic_get_sensors (t_sensor_bits *sensor_bits) |
This file contains MC13783 specific PMIC code. This implementaion may differ for each PMIC chip.
bool pmic_check_sensor | ( | t_sensor | sensor | ) |
This function is called to read all sensor bits of PMIC.
sensor | Sensor to be checked. |
References pmic_read_reg().
Referenced by pmic_convity_tasklet().
int pmic_event_mask | ( | type_event | event | ) |
This function sets a bit in mask register of pmic to disable an event IT.
event | the event to be masked |
Referenced by callback_tsi(), pmic_event_unsubscribe(), and spi_rw().
int pmic_event_unmask | ( | type_event | event | ) |
This function unsets a bit in mask register of pmic to unmask an event IT.
event | the event to be unmasked |
Referenced by mc13783_adc_convert(), pmic_event_subscribe(), and spi_rw().
unsigned int pmic_get_active_events | ( | unsigned int * | active_events | ) |
This function reads the interrupt status registers of PMIC and determine the current active events.
active_events | array pointer to be used to return active event numbers. |
Referenced by pmic_event_task(), and spi_rw().
void pmic_get_revision | ( | pmic_version_t * | ver | ) |
This function returns the PMIC version in system.
ver | pointer to the pmic_version_t structure |
Referenced by pmic_probe(), and spi_rw().
PMIC_STATUS pmic_get_sensors | ( | t_sensor_bits * | sensor_bits | ) |
This function checks one sensor of PMIC.
sensor_bits | structure of all sensor bits. |
References pmic_read_reg().
Referenced by callback_chg_detect().
int pmic_init_registers | ( | void | ) |
This function initializes the PMIC registers.
Referenced by pmic_probe(), and spi_rw().
int pmic_read | ( | unsigned int | reg_num, | |
unsigned int * | reg_val | |||
) |
This function is called to read a register on PMIC.
reg_num | number of the pmic register to be read | |
reg_val | return value of register |
References mxc_pmic::spi, and spi_rw().
Referenced by pmic_get_active_events(), pmic_get_revision(), pmic_read_reg(), and pmic_write_reg().
int pmic_spi_setup | ( | struct spi_device * | spi | ) |
This function initializes the SPI device parameters for this PMIC.
spi | the SPI slave device(PMIC) |
Referenced by pmic_probe(), and spi_rw().
int pmic_write | ( | int | reg_num, | |
const unsigned int | reg_val | |||
) |
This function is called to write a value to the register on PMIC.
reg_num | number of the pmic register to be written | |
reg_val | value to be written |
Referenced by pmic_get_active_events(), pmic_init_registers(), and pmic_write_reg().
© Freescale Semiconductor, Inc., 2007.
All rights reserved. Freescale Confidential Proprietary NDA Required |
![]() |