|
#define | LT8722_CRC_POLYNOMIAL 0x07 |
|
#define | LT8722_MAX_REGISTER_SIZE 4 |
|
#define | LT8722_NUM_REGISTERS 8 |
|
#define | LT8722_STATUS_ACQUISITION_COMMAND 0xF0 |
|
#define | LT8722_DATA_WRITE_COMMAND 0xF2 |
|
#define | LT8722_DATA_READ_COMMAND 0xF4 |
|
#define | LT8722_STATUS_ACQUISITION_COMMAND_SIZE 4 |
|
#define | LT8722_DATA_WRITE_COMMAND_SIZE 8 |
|
#define | LT8722_DATA_READ_COMMAND_SIZE 8 |
|
#define | LT8722_ACK_ACKNOWLEDGE 0xA5 |
|
#define | LT8722_ACK_NON_ACKNOWLEDGE 0xC3 |
|
#define | LT8722_ACK_UNSUPPORTED_ADDRESS 0x0F |
|
#define | LT8722_ACK_STUCK_AT_0 0x00 |
|
#define | LT8722_ACK_STUCK_AT_1 0xFF |
|
#define | LT8722_SPIS_COMMAND 0x00 |
|
#define | LT8722_SPIS_STATUS 0x01 |
|
#define | LT8722_SPIS_DAC_ILIMN 0x02 |
|
#define | LT8722_SPIS_DAC_ILIMP 0x03 |
|
#define | LT8722_SPIS_DAC 0x04 |
|
#define | LT8722_SPIS_OV_CLAMP 0x05 |
|
#define | LT8722_SPIS_UV_CLAMP 0x06 |
|
#define | LT8722_SPIS_AMUX 0x07 |
|
#define | LT8722_SPIS_COMMAND_SIZE 22 |
|
#define | LT8722_SPIS_STATUS_SIZE 11 |
|
#define | LT8722_SPIS_DAC_ILIMN_SIZE 9 |
|
#define | LT8722_SPIS_DAC_ILIMP_SIZE 9 |
|
#define | LT8722_SPIS_DAC_SIZE 32 |
|
#define | LT8722_SPIS_OV_CLAMP_SIZE 4 |
|
#define | LT8722_SPIS_UV_CLAMP_SIZE 4 |
|
#define | LT8722_SPIS_AMUX_SIZE 7 |
|
#define | LT8722_SPIS_COMMAND_MASK NO_OS_GENMASK(21, 0) |
|
#define | LT8722_SPIS_STATUS_MASK NO_OS_GENMASK(10, 0) |
|
#define | LT8722_SPIS_DAC_ILIMN_MASK NO_OS_GENMASK(8, 0) |
|
#define | LT8722_SPIS_DAC_ILIMP_MASK NO_OS_GENMASK(8, 0) |
|
#define | LT8722_SPIS_DAC_MASK NO_OS_GENMASK(31, 0) |
|
#define | LT8722_SPIS_OV_CLAMP_MASK NO_OS_GENMASK(3, 0) |
|
#define | LT8722_SPIS_UV_CLAMP_MASK NO_OS_GENMASK(3, 0) |
|
#define | LT8722_SPIS_AMUX_MASK NO_OS_GENMASK(6, 0) |
|
#define | LT8722_SPIS_COMMAND_DEFAULT_VALUE 0x08A214 |
|
#define | LT8722_SPIS_STATUS_DEFAULT_VALUE 0x0 |
|
#define | LT8722_SPIS_DAC_ILIMN_DEFAULT_VALUE 0x1FF |
|
#define | LT8722_SPIS_DAC_ILIMP_DEFAULT_VALUE 0x000 |
|
#define | LT8722_SPIS_DAC_DEFAULT_VALUE 0xFF000000 |
|
#define | LT8722_SPIS_OV_CLAMP_DEFAULT_VALUE 0xF |
|
#define | LT8722_SPIS_UV_CLAMP_DEFAULT_VALUE 0x0 |
|
#define | LT8722_SPIS_AMUX_DEFAULT_VALUE 0x00 |
|
#define | LT8722_ENABLE_REQ_MASK NO_OS_BIT(0) |
|
#define | LT8722_SWEN_REQ_MASK NO_OS_BIT(1) |
|
#define | LT8722_SW_FRQ_SET_MASK NO_OS_GENMASK(4, 2) |
|
#define | LT8722_SW_FRQ_ADJ_MASK NO_OS_GENMASK(6, 5) |
|
#define | LT8722_SYS_DC_MASK NO_OS_GENMASK(8, 7) |
|
#define | LT8722_VCC_VREG_MASK NO_OS_BIT(9) |
|
#define | LT8722_SW_VC_INT_MASK NO_OS_GENMASK(13, 11) |
|
#define | LT8722_SPI_RST_MASK NO_OS_BIT(14) |
|
#define | LT8722_PWR_LIM_POS 15 |
|
#define | LT8722_PWR_LIM_MASK NO_OS_GENMASK(18, 15) |
|
#define | LT8722_SPI_RST_RESET 0b1 |
|
#define | LT8722_SWEN_MASK NO_OS_BIT(0) |
|
#define | LT8722_SRVO_ILIM_MASK NO_OS_BIT(1) |
|
#define | LT8722_SRVO_PLIM_MASK NO_OS_BIT(2) |
|
#define | LT8722_MIN_OT_MASK NO_OS_BIT(3) |
|
#define | LT8722_POR_OCC_MASK NO_OS_BIT(4) |
|
#define | LT8722_OVER_CURRENT_MASK NO_OS_BIT(5) |
|
#define | LT8722_TSD_MASK NO_OS_BIT(6) |
|
#define | LT8722_VCC_UVLO_MASK NO_OS_BIT(7) |
|
#define | LT8722_VDDIO_UVLO_MASK NO_OS_BIT(8) |
|
#define | LT8722_CP_UVLO_MASK NO_OS_BIT(9) |
|
#define | LT8722_V2P5_UVLO_MASK NO_OS_BIT(10) |
|
#define | LT8722_FAULTS_MASK NO_OS_GENMASK(10, 5) |
|
#define | LT8722_SPIS_DAC_ILIMN_MASK NO_OS_GENMASK(8, 0) |
|
#define | LT8722_SPIS_DAC_ILIMN_MIN 0x030 |
|
#define | LT8722_SPIS_DAC_ILIMN_MAX 0x1FF |
|
#define | LT8722_SPIS_DAC_ILIMP_MASK NO_OS_GENMASK(8, 0) |
|
#define | LT8722_SPIS_DAC_ILIMP_MIN 0x000 |
|
#define | LT8722_SPIS_DAC_ILIMP_MAX 0x1CE |
|
#define | LT8722_SPIS_DAC_MASK NO_OS_GENMASK(31, 0) |
|
#define | LT8722_SPIS_OV_CLAMP_MASK NO_OS_GENMASK(3, 0) |
|
#define | LT8722_SPIS_UV_CLAMP_MASK NO_OS_GENMASK(3, 0) |
|
#define | LT8722_AMUX_MASK NO_OS_GENMASK(3, 0) |
|
#define | LT8722_AMUX_TEST_MASK NO_OS_GENMASK(5, 4) |
|
#define | LT8722_AOUT_EN_MASK NO_OS_BIT(6) |
|
#define | LT8722_DAC_RESOLUTION 25 |
|
#define | LT8722_DAC_OFFSET 1250000000LL |
|
#define | LT8722_DAC_VREF 2500000000LL |
|
#define | LT8722_VOLTAGE_SCALE NANO |
|
|
int32_t | lt8722_voltage_to_dac (int64_t voltage) |
| Convert voltage to DAC code. More...
|
|
int64_t | lt8722_dac_to_voltage (int32_t dac) |
| Convert DAC code to nanovolts. More...
|
|
int | lt8722_transaction (struct lt8722_dev *dev, struct lt8722_packet *packet) |
| LT8722 device SPI transaction. More...
|
|
int | lt8722_reg_read (struct lt8722_dev *dev, uint8_t address, uint32_t *data) |
| Read data from LT8722 device. More...
|
|
int | lt8722_reg_write (struct lt8722_dev *dev, uint8_t address, uint32_t data) |
| Write data to LT8722 device. More...
|
|
int | lt8722_reg_write_mask (struct lt8722_dev *dev, uint8_t address, uint32_t mask, uint32_t data) |
| Write to LT8722 device register with mask. More...
|
|
int | lt8722_get_status (struct lt8722_dev *dev, uint16_t *status) |
| Get LT8722 device status. More...
|
|
int | lt8722_clear_faults (struct lt8722_dev *dev) |
| Clear LT8722 device faults. More...
|
|
int | lt8722_set_enable_req (struct lt8722_dev *dev, bool value) |
| Set ENABLE_REQ field in LT8722 device. More...
|
|
int | lt8722_get_enable_req (struct lt8722_dev *dev, bool *value) |
| Get ENABLE_REQ field in LT8722 device. More...
|
|
int | lt8722_set_swen_req (struct lt8722_dev *dev, bool value) |
| Set switching enable of LT8722 device. More...
|
|
int | lt8722_get_swen_req (struct lt8722_dev *dev, bool *value) |
| Get switching enable of LT8722 device. More...
|
|
int | lt8722_set_sw_frq_set (struct lt8722_dev *dev, enum lt8722_sw_frq_set value) |
| Set switching frequency of LT8722 device. More...
|
|
int | lt8722_get_sw_frq_set (struct lt8722_dev *dev, enum lt8722_sw_frq_set *value) |
| Get switching frequency of LT8722 device. More...
|
|
int | lt8722_set_sw_frq_adj (struct lt8722_dev *dev, enum lt8722_sw_frq_adj value) |
| Set switching frequency adjustment of LT8722 device. More...
|
|
int | lt8722_get_sw_frq_adj (struct lt8722_dev *dev, enum lt8722_sw_frq_adj *value) |
| Get switching frequency adjustment of LT8722 device. More...
|
|
int | lt8722_set_vcc_vreg (struct lt8722_dev *dev, enum lt8722_vcc_vreg value) |
| Set internal circuitry voltage source of LT8722 device. More...
|
|
int | lt8722_get_vcc_vreg (struct lt8722_dev *dev, enum lt8722_vcc_vreg *value) |
| Get internal circuitry voltage source of LT8722 device. More...
|
|
int | lt8722_set_sw_vc_int (struct lt8722_dev *dev, enum lt8722_sw_vc_int value) |
| Set initial peak inductor current of LT8722 device. More...
|
|
int | lt8722_get_sw_vc_int (struct lt8722_dev *dev, enum lt8722_sw_vc_int *value) |
| Get initial peak inductor current of LT8722 device. More...
|
|
int | lt8722_set_pwr_lim (struct lt8722_dev *dev, enum lt8722_pwr_lim value) |
| Set LDR power dissipation limit of LT8722 device. More...
|
|
int | lt8722_get_pwr_lim (struct lt8722_dev *dev, enum lt8722_pwr_lim *value) |
| Get LDR power dissipation limit of LT8722 device. More...
|
|
int | lt8722_set_sys_dc (struct lt8722_dev *dev, enum lt8722_sys_dc value) |
| Set PWM duty cycle of LT8722 device. More...
|
|
int | lt8722_get_sys_dc (struct lt8722_dev *dev, enum lt8722_sys_dc *value) |
| Get PWM duty cycle of LT8722 device. More...
|
|
int | lt8722_set_spis_dac_ilimn (struct lt8722_dev *dev, uint16_t value) |
| Set negative output current limit of LT8722 device. More...
|
|
int | lt8722_get_spis_dac_ilimn (struct lt8722_dev *dev, uint16_t *value) |
| Get negative output current limit of LT8722 device. More...
|
|
int | lt8722_set_spis_dac_ilimp (struct lt8722_dev *dev, uint16_t value) |
| Set positive output current limit of LT8722 device. More...
|
|
int | lt8722_get_spis_dac_ilimp (struct lt8722_dev *dev, uint16_t *value) |
| Get positive output current limit of LT8722 device. More...
|
|
int | lt8722_set_dac (struct lt8722_dev *dev, uint32_t value) |
| Set DAC code of LT8722 device. More...
|
|
int | lt8722_get_dac (struct lt8722_dev *dev, uint32_t *value) |
| Get DAC code of LT8722 device. More...
|
|
int | lt8722_set_spis_ov_clamp (struct lt8722_dev *dev, uint8_t value) |
| Set positive output voltage limit of LT8722 device. More...
|
|
int | lt8722_get_spis_ov_clamp (struct lt8722_dev *dev, uint8_t *value) |
| Get positive output voltage limit of LT8722 device. More...
|
|
int | lt8722_set_spis_uv_clamp (struct lt8722_dev *dev, uint8_t value) |
| Set negative output voltage limit of LT8722 device. More...
|
|
int | lt8722_get_spis_uv_clamp (struct lt8722_dev *dev, uint8_t *value) |
| Get negative output voltage limit of LT8722 device. More...
|
|
int | lt8722_set_aout_en (struct lt8722_dev *dev, bool value) |
| Set analog output buffer status of LT8722 device. More...
|
|
int | lt8722_get_aout_en (struct lt8722_dev *dev, bool *value) |
| Get analog output buffer status of LT8722 device. More...
|
|
int | lt8722_set_amux (struct lt8722_dev *dev, enum lt8722_amux value, uint8_t test) |
| Set analot output signal source of LT8722 device. More...
|
|
int | lt8722_get_amux (struct lt8722_dev *dev, enum lt8722_amux *value, uint8_t *test) |
| Get analot output signal source of LT8722 device. More...
|
|
int | lt8722_set_output_voltage (struct lt8722_dev *dev, int64_t value) |
| Set output volatge of LT8722 device. More...
|
|
int | lt8722_get_output_voltage (struct lt8722_dev *dev, int64_t *value) |
| Get output volatge of LT8722 device. More...
|
|
int | lt8722_shutdown (struct lt8722_dev *dev) |
| Reset the LT8722 device. More...
|
|
int | lt8722_reset (struct lt8722_dev *dev) |
| Shutdown the LT8722 device. More...
|
|
int | lt8722_set_swen_pin (struct lt8722_dev *dev, uint8_t value) |
| Set SWEN pin of LT8722 device. More...
|
|
int | lt8722_get_swen_pin (struct lt8722_dev *dev, uint8_t *value) |
| Get SWEN pin of LT8722 device. More...
|
|
int | lt8722_set_en_pin (struct lt8722_dev *dev, uint8_t value) |
| Set EN pin of LT8722 device. More...
|
|
int | lt8722_get_en_pin (struct lt8722_dev *dev, uint8_t *value) |
| Get EN pin of LT8722 device. More...
|
|
int | lt8722_init (struct lt8722_dev **device, struct lt8722_init_param *init_param) |
| Initialize the LT8722 device. More...
|
|
int | lt8722_remove (struct lt8722_dev *dev) |
| Free the resources allocated by the lt8722_init() More...
|
|
Header file for the LT8722 Driver.
- Author
- Ramon Cristopher Calam (ramon.nosp@m.cris.nosp@m.tophe.nosp@m.r.ca.nosp@m.lam@a.nosp@m.nalo.nosp@m.g.com)
Copyright 2024(c) Analog Devices, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
- The use of this software may or may not infringe the patent rights of one or more patent holders. This license does not release you from the requirement that you obtain separate licenses from these patent holders to use this software.
- Use of the software either in source or binary form, must be run on or directly connected to an Analog Devices Inc. component.
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.