This file contains prototypes of all the functions to be defined for each PMIC chip. The implementation of these may differ from PMIC chip to PMIC chip. More...
Data Structures | |
struct | mxc_pmic |
Functions | |
static int | spi_rw (struct spi_device *spi, u8 *buf, size_t len) |
void | pmic_get_revision (pmic_version_t *ver) |
int | pmic_spi_setup (struct spi_device *spi) |
int | pmic_init_registers (void) |
unsigned int | pmic_get_active_events (unsigned int *active_events) |
int | pmic_event_mask (type_event event) |
int | pmic_event_unmask (type_event event) |
This file contains prototypes of all the functions to be defined for each PMIC chip. The implementation of these may differ from PMIC chip to PMIC chip.
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 |
References pmic_write_reg().
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 |
References pmic_write_reg().
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. |
References pmic_read(), and pmic_write().
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 |
References pmic_version_t::id, pmic_read(), and pmic_version_t::revision.
Referenced by pmic_probe(), and spi_rw().
int pmic_init_registers | ( | void | ) |
This function initializes the PMIC registers.
References pmic_write().
Referenced by pmic_probe(), and spi_rw().
int pmic_spi_setup | ( | struct spi_device * | spi | ) |
This function initializes the SPI device parameters for this PMIC.
spi | the SPI slave device(PMIC) |
References mxc_pmic::spi.
Referenced by pmic_probe(), and spi_rw().
static int spi_rw | ( | struct spi_device * | spi, | |
u8 * | buf, | |||
size_t | len | |||
) | [inline, static] |
This function is called to transfer data to PMIC on SPI.
spi | the SPI slave device(PMIC) | |
buf | the pointer to the data buffer | |
len | the length of the data to be transferred |
References pmic_event_mask(), pmic_event_unmask(), pmic_get_active_events(), pmic_get_revision(), pmic_init_registers(), and pmic_spi_setup().
Referenced by pmic_read(), and pmic_write().
© Freescale Semiconductor, Inc., 2007.
All rights reserved. Freescale Confidential Proprietary NDA Required |
![]() |