no-OS
Classes | Macros | Enumerations | Functions | Variables
lt8722.h File Reference

Header file for the LT8722 Driver. More...

#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include "no_os_gpio.h"
#include "no_os_spi.h"
#include "no_os_units.h"
#include "no_os_util.h"
Include dependency graph for lt8722.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  lt8722_reg
 LT8722 register structure. More...
 
struct  lt8722_command
 LT8722 command structure. More...
 
struct  lt8722_packet
 LT8722 packet structure. More...
 
struct  lt8722_init_param
 Initialization parameter for the LT8722 device. More...
 
struct  lt8722_dev
 Device descriptor for LT8722. More...
 

Macros

#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
 

Enumerations

enum  lt8722_enable_req {
  LT8722_ENABLE_REQ_DISABLED,
  LT8722_ENABLE_REQ_ENABLED
}
 VCC LDO enable bit and linear power stage enable request bit. More...
 
enum  lt8722_swen_req {
  LT8722_SWEN_REQ_DISABLED,
  LT8722_SWEN_REQ_ENABLED
}
 PWM switch enable request bit. More...
 
enum  lt8722_sw_frq_set {
  LT8722_SW_FRQ_SET_0_5MHZ,
  LT8722_SW_FRQ_SET_1MHZ,
  LT8722_SW_FRQ_SET_1_5MHZ,
  LT8722_SW_FRQ_SET_2MHZ,
  LT8722_SW_FRQ_SET_2_5MHZ,
  LT8722_SW_FRQ_SET_3MHZ,
  LT8722_SW_FRQ_SET_3MHZ_2,
  LT8722_SW_FRQ_SET_3MHZ_3
}
 PWM switch frequency control bits. More...
 
enum  lt8722_sw_frq_adj {
  LT8722_SW_FRQ_ADJ_0_PERCENT,
  LT8722_SW_FRQ_ADJ_POSITIVE_15_PERCENT,
  LT8722_SW_FRQ_ADJ_NEGATIVE_15_PERCENT,
  LT8722_SW_FRQ_ADJ_0_PERCENT_2
}
 PWM switch frequency adjustment bits. More...
 
enum  lt8722_vcc_vreg {
  LT8722_VCC_VREG_3_1V,
  LT8722_VCC_VREG_3_4V
}
 VCC LDO regulation control bits. More...
 
enum  lt8722_sw_vc_int {
  LT8722_SW_VC_INT_0_252A,
  LT8722_SW_VC_INT_0_594A,
  LT8722_SW_VC_INT_0_936A,
  LT8722_SW_VC_INT_1_278A,
  LT8722_SW_VC_INT_1_620A,
  LT8722_SW_VC_INT_1_962A,
  LT8722_SW_VC_INT_2_304A,
  LT8722_SW_VC_INT_2_646A
}
 Typical peak inductor current after BST-SW refresh period control bits. More...
 
enum  lt8722_pwr_lim {
  LT8722_PWR_LIM_2W,
  LT8722_PWR_LIM_NO_LIMIT,
  LT8722_PWR_LIM_3W,
  LT8722_PWR_LIM_3_5W
}
 Linear power stage MOSFET power limit control bits. More...
 
enum  lt8722_sys_dc {
  LT8722_SYS_DC_20_80_DUTY_CYCLE,
  LT8722_SYS_DC_15_85_DUTY_CYCLE,
  LT8722_SYS_DC_10_90_DUTY_CYCLE
}
 PWM duty cycle control bits. More...
 
enum  lt8722_amux {
  LT8722_AMUX_VILIMP,
  LT8722_AMUX_VILIMN,
  LT8722_AMUX_VDAC,
  LT8722_AMUX_VOUT,
  LT8722_AMUX_IOUT,
  LT8722_AMUX_V2P5,
  LT8722_AMUX_V1P25,
  LT8722_AMUX_V1P65,
  LT8722_AMUX_VTEMP,
  LT8722_AMUX_VIN,
  LT8722_AMUX_VCC,
  LT8722_AMUX_VDDIO,
  LT8722_AMUX_VSFB,
  LT8722_AMUX_VSFB_2,
  LT8722_AMUX_VSFB_3,
  LT8722_AMUX_VSFB_4
}
 Analog multiplexer control bits. More...
 
enum  lt8722_aout_en {
  LT8722_AOUT_EN_DISABLED,
  LT8722_AOUT_EN_ENABLED
}
 Analog output buffer enable control bits. More...
 

Functions

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...
 

Variables

struct lt8722_reg lt8722_regs [LT8722_NUM_REGISTERS]
 

Detailed Description

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.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. 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.
  3. 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.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 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.

Macro Definition Documentation

◆ LT8722_ACK_ACKNOWLEDGE

#define LT8722_ACK_ACKNOWLEDGE   0xA5

◆ LT8722_ACK_NON_ACKNOWLEDGE

#define LT8722_ACK_NON_ACKNOWLEDGE   0xC3

◆ LT8722_ACK_STUCK_AT_0

#define LT8722_ACK_STUCK_AT_0   0x00

◆ LT8722_ACK_STUCK_AT_1

#define LT8722_ACK_STUCK_AT_1   0xFF

◆ LT8722_ACK_UNSUPPORTED_ADDRESS

#define LT8722_ACK_UNSUPPORTED_ADDRESS   0x0F

◆ LT8722_AMUX_MASK

#define LT8722_AMUX_MASK   NO_OS_GENMASK(3, 0)

◆ LT8722_AMUX_TEST_MASK

#define LT8722_AMUX_TEST_MASK   NO_OS_GENMASK(5, 4)

◆ LT8722_AOUT_EN_MASK

#define LT8722_AOUT_EN_MASK   NO_OS_BIT(6)

◆ LT8722_CP_UVLO_MASK

#define LT8722_CP_UVLO_MASK   NO_OS_BIT(9)

◆ LT8722_CRC_POLYNOMIAL

#define LT8722_CRC_POLYNOMIAL   0x07

◆ LT8722_DAC_OFFSET

#define LT8722_DAC_OFFSET   1250000000LL

◆ LT8722_DAC_RESOLUTION

#define LT8722_DAC_RESOLUTION   25

◆ LT8722_DAC_VREF

#define LT8722_DAC_VREF   2500000000LL

◆ LT8722_DATA_READ_COMMAND

#define LT8722_DATA_READ_COMMAND   0xF4

◆ LT8722_DATA_READ_COMMAND_SIZE

#define LT8722_DATA_READ_COMMAND_SIZE   8

◆ LT8722_DATA_WRITE_COMMAND

#define LT8722_DATA_WRITE_COMMAND   0xF2

◆ LT8722_DATA_WRITE_COMMAND_SIZE

#define LT8722_DATA_WRITE_COMMAND_SIZE   8

◆ LT8722_ENABLE_REQ_MASK

#define LT8722_ENABLE_REQ_MASK   NO_OS_BIT(0)

◆ LT8722_FAULTS_MASK

#define LT8722_FAULTS_MASK   NO_OS_GENMASK(10, 5)

◆ LT8722_MAX_REGISTER_SIZE

#define LT8722_MAX_REGISTER_SIZE   4

◆ LT8722_MIN_OT_MASK

#define LT8722_MIN_OT_MASK   NO_OS_BIT(3)

◆ LT8722_NUM_REGISTERS

#define LT8722_NUM_REGISTERS   8

◆ LT8722_OVER_CURRENT_MASK

#define LT8722_OVER_CURRENT_MASK   NO_OS_BIT(5)

◆ LT8722_POR_OCC_MASK

#define LT8722_POR_OCC_MASK   NO_OS_BIT(4)

◆ LT8722_PWR_LIM_MASK

#define LT8722_PWR_LIM_MASK   NO_OS_GENMASK(18, 15)

◆ LT8722_PWR_LIM_POS

#define LT8722_PWR_LIM_POS   15

◆ LT8722_SPI_RST_MASK

#define LT8722_SPI_RST_MASK   NO_OS_BIT(14)

◆ LT8722_SPI_RST_RESET

#define LT8722_SPI_RST_RESET   0b1

◆ LT8722_SPIS_AMUX

#define LT8722_SPIS_AMUX   0x07

◆ LT8722_SPIS_AMUX_DEFAULT_VALUE

#define LT8722_SPIS_AMUX_DEFAULT_VALUE   0x00

◆ LT8722_SPIS_AMUX_MASK

#define LT8722_SPIS_AMUX_MASK   NO_OS_GENMASK(6, 0)

◆ LT8722_SPIS_AMUX_SIZE

#define LT8722_SPIS_AMUX_SIZE   7

◆ LT8722_SPIS_COMMAND

#define LT8722_SPIS_COMMAND   0x00

◆ LT8722_SPIS_COMMAND_DEFAULT_VALUE

#define LT8722_SPIS_COMMAND_DEFAULT_VALUE   0x08A214

◆ LT8722_SPIS_COMMAND_MASK

#define LT8722_SPIS_COMMAND_MASK   NO_OS_GENMASK(21, 0)

◆ LT8722_SPIS_COMMAND_SIZE

#define LT8722_SPIS_COMMAND_SIZE   22

◆ LT8722_SPIS_DAC

#define LT8722_SPIS_DAC   0x04

◆ LT8722_SPIS_DAC_DEFAULT_VALUE

#define LT8722_SPIS_DAC_DEFAULT_VALUE   0xFF000000

◆ LT8722_SPIS_DAC_ILIMN

#define LT8722_SPIS_DAC_ILIMN   0x02

◆ LT8722_SPIS_DAC_ILIMN_DEFAULT_VALUE

#define LT8722_SPIS_DAC_ILIMN_DEFAULT_VALUE   0x1FF

◆ LT8722_SPIS_DAC_ILIMN_MASK [1/2]

#define LT8722_SPIS_DAC_ILIMN_MASK   NO_OS_GENMASK(8, 0)

◆ LT8722_SPIS_DAC_ILIMN_MASK [2/2]

#define LT8722_SPIS_DAC_ILIMN_MASK   NO_OS_GENMASK(8, 0)

◆ LT8722_SPIS_DAC_ILIMN_MAX

#define LT8722_SPIS_DAC_ILIMN_MAX   0x1FF

◆ LT8722_SPIS_DAC_ILIMN_MIN

#define LT8722_SPIS_DAC_ILIMN_MIN   0x030

◆ LT8722_SPIS_DAC_ILIMN_SIZE

#define LT8722_SPIS_DAC_ILIMN_SIZE   9

◆ LT8722_SPIS_DAC_ILIMP

#define LT8722_SPIS_DAC_ILIMP   0x03

◆ LT8722_SPIS_DAC_ILIMP_DEFAULT_VALUE

#define LT8722_SPIS_DAC_ILIMP_DEFAULT_VALUE   0x000

◆ LT8722_SPIS_DAC_ILIMP_MASK [1/2]

#define LT8722_SPIS_DAC_ILIMP_MASK   NO_OS_GENMASK(8, 0)

◆ LT8722_SPIS_DAC_ILIMP_MASK [2/2]

#define LT8722_SPIS_DAC_ILIMP_MASK   NO_OS_GENMASK(8, 0)

◆ LT8722_SPIS_DAC_ILIMP_MAX

#define LT8722_SPIS_DAC_ILIMP_MAX   0x1CE

◆ LT8722_SPIS_DAC_ILIMP_MIN

#define LT8722_SPIS_DAC_ILIMP_MIN   0x000

◆ LT8722_SPIS_DAC_ILIMP_SIZE

#define LT8722_SPIS_DAC_ILIMP_SIZE   9

◆ LT8722_SPIS_DAC_MASK [1/2]

#define LT8722_SPIS_DAC_MASK   NO_OS_GENMASK(31, 0)

◆ LT8722_SPIS_DAC_MASK [2/2]

#define LT8722_SPIS_DAC_MASK   NO_OS_GENMASK(31, 0)

◆ LT8722_SPIS_DAC_SIZE

#define LT8722_SPIS_DAC_SIZE   32

◆ LT8722_SPIS_OV_CLAMP

#define LT8722_SPIS_OV_CLAMP   0x05

◆ LT8722_SPIS_OV_CLAMP_DEFAULT_VALUE

#define LT8722_SPIS_OV_CLAMP_DEFAULT_VALUE   0xF

◆ LT8722_SPIS_OV_CLAMP_MASK [1/2]

#define LT8722_SPIS_OV_CLAMP_MASK   NO_OS_GENMASK(3, 0)

◆ LT8722_SPIS_OV_CLAMP_MASK [2/2]

#define LT8722_SPIS_OV_CLAMP_MASK   NO_OS_GENMASK(3, 0)

◆ LT8722_SPIS_OV_CLAMP_SIZE

#define LT8722_SPIS_OV_CLAMP_SIZE   4

◆ LT8722_SPIS_STATUS

#define LT8722_SPIS_STATUS   0x01

◆ LT8722_SPIS_STATUS_DEFAULT_VALUE

#define LT8722_SPIS_STATUS_DEFAULT_VALUE   0x0

◆ LT8722_SPIS_STATUS_MASK

#define LT8722_SPIS_STATUS_MASK   NO_OS_GENMASK(10, 0)

◆ LT8722_SPIS_STATUS_SIZE

#define LT8722_SPIS_STATUS_SIZE   11

◆ LT8722_SPIS_UV_CLAMP

#define LT8722_SPIS_UV_CLAMP   0x06

◆ LT8722_SPIS_UV_CLAMP_DEFAULT_VALUE

#define LT8722_SPIS_UV_CLAMP_DEFAULT_VALUE   0x0

◆ LT8722_SPIS_UV_CLAMP_MASK [1/2]

#define LT8722_SPIS_UV_CLAMP_MASK   NO_OS_GENMASK(3, 0)

◆ LT8722_SPIS_UV_CLAMP_MASK [2/2]

#define LT8722_SPIS_UV_CLAMP_MASK   NO_OS_GENMASK(3, 0)

◆ LT8722_SPIS_UV_CLAMP_SIZE

#define LT8722_SPIS_UV_CLAMP_SIZE   4

◆ LT8722_SRVO_ILIM_MASK

#define LT8722_SRVO_ILIM_MASK   NO_OS_BIT(1)

◆ LT8722_SRVO_PLIM_MASK

#define LT8722_SRVO_PLIM_MASK   NO_OS_BIT(2)

◆ LT8722_STATUS_ACQUISITION_COMMAND

#define LT8722_STATUS_ACQUISITION_COMMAND   0xF0

◆ LT8722_STATUS_ACQUISITION_COMMAND_SIZE

#define LT8722_STATUS_ACQUISITION_COMMAND_SIZE   4

◆ LT8722_SW_FRQ_ADJ_MASK

#define LT8722_SW_FRQ_ADJ_MASK   NO_OS_GENMASK(6, 5)

◆ LT8722_SW_FRQ_SET_MASK

#define LT8722_SW_FRQ_SET_MASK   NO_OS_GENMASK(4, 2)

◆ LT8722_SW_VC_INT_MASK

#define LT8722_SW_VC_INT_MASK   NO_OS_GENMASK(13, 11)

◆ LT8722_SWEN_MASK

#define LT8722_SWEN_MASK   NO_OS_BIT(0)

◆ LT8722_SWEN_REQ_MASK

#define LT8722_SWEN_REQ_MASK   NO_OS_BIT(1)

◆ LT8722_SYS_DC_MASK

#define LT8722_SYS_DC_MASK   NO_OS_GENMASK(8, 7)

◆ LT8722_TSD_MASK

#define LT8722_TSD_MASK   NO_OS_BIT(6)

◆ LT8722_V2P5_UVLO_MASK

#define LT8722_V2P5_UVLO_MASK   NO_OS_BIT(10)

◆ LT8722_VCC_UVLO_MASK

#define LT8722_VCC_UVLO_MASK   NO_OS_BIT(7)

◆ LT8722_VCC_VREG_MASK

#define LT8722_VCC_VREG_MASK   NO_OS_BIT(9)

◆ LT8722_VDDIO_UVLO_MASK

#define LT8722_VDDIO_UVLO_MASK   NO_OS_BIT(8)

◆ LT8722_VOLTAGE_SCALE

#define LT8722_VOLTAGE_SCALE   NANO

Enumeration Type Documentation

◆ lt8722_amux

Analog multiplexer control bits.

Enumerator
LT8722_AMUX_VILIMP 
LT8722_AMUX_VILIMN 
LT8722_AMUX_VDAC 
LT8722_AMUX_VOUT 
LT8722_AMUX_IOUT 
LT8722_AMUX_V2P5 
LT8722_AMUX_V1P25 
LT8722_AMUX_V1P65 
LT8722_AMUX_VTEMP 
LT8722_AMUX_VIN 
LT8722_AMUX_VCC 
LT8722_AMUX_VDDIO 
LT8722_AMUX_VSFB 
LT8722_AMUX_VSFB_2 
LT8722_AMUX_VSFB_3 
LT8722_AMUX_VSFB_4 

◆ lt8722_aout_en

Analog output buffer enable control bits.

Enumerator
LT8722_AOUT_EN_DISABLED 

Disable

LT8722_AOUT_EN_ENABLED 

Enable

◆ lt8722_enable_req

VCC LDO enable bit and linear power stage enable request bit.

Enumerator
LT8722_ENABLE_REQ_DISABLED 

Disable bit

LT8722_ENABLE_REQ_ENABLED 

Enable bit

◆ lt8722_pwr_lim

Linear power stage MOSFET power limit control bits.

Enumerator
LT8722_PWR_LIM_2W 

2W

LT8722_PWR_LIM_NO_LIMIT 

No limit

LT8722_PWR_LIM_3W 

3W

LT8722_PWR_LIM_3_5W 

3.5W

◆ lt8722_sw_frq_adj

PWM switch frequency adjustment bits.

Enumerator
LT8722_SW_FRQ_ADJ_0_PERCENT 

0%

LT8722_SW_FRQ_ADJ_POSITIVE_15_PERCENT 

+15%

LT8722_SW_FRQ_ADJ_NEGATIVE_15_PERCENT 

-15%

LT8722_SW_FRQ_ADJ_0_PERCENT_2 

0%

◆ lt8722_sw_frq_set

PWM switch frequency control bits.

Enumerator
LT8722_SW_FRQ_SET_0_5MHZ 

0.5 MHz

LT8722_SW_FRQ_SET_1MHZ 

1 MHz

LT8722_SW_FRQ_SET_1_5MHZ 

1.5 MHz

LT8722_SW_FRQ_SET_2MHZ 

2 MHz

LT8722_SW_FRQ_SET_2_5MHZ 

2.5 MHz

LT8722_SW_FRQ_SET_3MHZ 

3 MHz

LT8722_SW_FRQ_SET_3MHZ_2 

3 MHz

LT8722_SW_FRQ_SET_3MHZ_3 

3 MHz

◆ lt8722_sw_vc_int

Typical peak inductor current after BST-SW refresh period control bits.

Enumerator
LT8722_SW_VC_INT_0_252A 

0.252A

LT8722_SW_VC_INT_0_594A 

0.594A

LT8722_SW_VC_INT_0_936A 

0.936A

LT8722_SW_VC_INT_1_278A 

1.278A

LT8722_SW_VC_INT_1_620A 

1.620A

LT8722_SW_VC_INT_1_962A 

1.962A

LT8722_SW_VC_INT_2_304A 

2.304A

LT8722_SW_VC_INT_2_646A 

2.646A

◆ lt8722_swen_req

PWM switch enable request bit.

Enumerator
LT8722_SWEN_REQ_DISABLED 

Disable bit

LT8722_SWEN_REQ_ENABLED 

Enable bit

◆ lt8722_sys_dc

PWM duty cycle control bits.

Enumerator
LT8722_SYS_DC_20_80_DUTY_CYCLE 

20% - 80%

LT8722_SYS_DC_15_85_DUTY_CYCLE 

15% - 85%

LT8722_SYS_DC_10_90_DUTY_CYCLE 

10% - 90%

◆ lt8722_vcc_vreg

VCC LDO regulation control bits.

Enumerator
LT8722_VCC_VREG_3_1V 

3.1V

LT8722_VCC_VREG_3_4V 

3.4V

Function Documentation

◆ lt8722_clear_faults()

int lt8722_clear_faults ( struct lt8722_dev dev)

Clear LT8722 device faults.

Clear LT8722 faults

Parameters
dev- LT8722 device descriptor
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_dac_to_voltage()

int64_t lt8722_dac_to_voltage ( int32_t  dac)

Convert DAC code to nanovolts.

Convert DAC code to voltage

Parameters
dac- DAC code.
Returns
Voltage value in nanovolts.
Here is the caller graph for this function:

◆ lt8722_get_amux()

int lt8722_get_amux ( struct lt8722_dev dev,
enum lt8722_amux value,
uint8_t *  test 
)

Get analot output signal source of LT8722 device.

Get analog output signal source

Parameters
dev- LT8722 device descriptor
value- Analog output signal source value.
test- AMUX_TEST value.
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_get_aout_en()

int lt8722_get_aout_en ( struct lt8722_dev dev,
bool value 
)

Get analog output buffer status of LT8722 device.

Get analog output buffer status

Parameters
dev- LT8722 device descriptor
value- Analog output buffer status value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_get_dac()

int lt8722_get_dac ( struct lt8722_dev dev,
uint32_t *  value 
)

Get DAC code of LT8722 device.

Get output voltage

Parameters
dev- LT8722 device descriptor
value- DAC value
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_get_en_pin()

int lt8722_get_en_pin ( struct lt8722_dev dev,
uint8_t *  value 
)

Get EN pin of LT8722 device.

Get EN pin

Parameters
dev- LT8722 device descriptor
value- EN pin value.
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_get_enable_req()

int lt8722_get_enable_req ( struct lt8722_dev dev,
bool value 
)

Get ENABLE_REQ field in LT8722 device.

Get ENABLE_REQ

Parameters
dev- LT8722 device descriptor
value- Enable if true, disabled otherwise
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_get_output_voltage()

int lt8722_get_output_voltage ( struct lt8722_dev dev,
int64_t *  value 
)

Get output volatge of LT8722 device.

Get output voltage

Parameters
dev- LT8722 device descriptor
value- Output voltage value in nanovolts.
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_get_pwr_lim()

int lt8722_get_pwr_lim ( struct lt8722_dev dev,
enum lt8722_pwr_lim value 
)

Get LDR power dissipation limit of LT8722 device.

Get LDR power dissipation limit

Parameters
dev- LT8722 device descriptor
value- LDR power dissipation limit value
Returns
0 in case of success, negative error code otherwise

◆ lt8722_get_spis_dac_ilimn()

int lt8722_get_spis_dac_ilimn ( struct lt8722_dev dev,
uint16_t *  value 
)

Get negative output current limit of LT8722 device.

Get positive output current limit

Parameters
dev- LT8722 device descriptor
value- Negative output current limit value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_get_spis_dac_ilimp()

int lt8722_get_spis_dac_ilimp ( struct lt8722_dev dev,
uint16_t *  value 
)

Get positive output current limit of LT8722 device.

Get positive output current limit

Parameters
dev- LT8722 device descriptor
value- Positive output current limit value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_get_spis_ov_clamp()

int lt8722_get_spis_ov_clamp ( struct lt8722_dev dev,
uint8_t *  value 
)

Get positive output voltage limit of LT8722 device.

Get positive output voltage limit

Parameters
dev- LT8722 device descriptor
value- Positive output voltage limit value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_get_spis_uv_clamp()

int lt8722_get_spis_uv_clamp ( struct lt8722_dev dev,
uint8_t *  value 
)

Get negative output voltage limit of LT8722 device.

Get negative output voltage limit

Parameters
dev- LT8722 device descriptor
value- Negative output voltage limit value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_get_status()

int lt8722_get_status ( struct lt8722_dev dev,
uint16_t *  status 
)

Get LT8722 device status.

Get LT8722 status

Parameters
dev- LT8722 device descriptor
status- Status value to be returned.
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_get_sw_frq_adj()

int lt8722_get_sw_frq_adj ( struct lt8722_dev dev,
enum lt8722_sw_frq_adj value 
)

Get switching frequency adjustment of LT8722 device.

Get switching frequency adjustment

Parameters
dev- LT8722 device descriptor
value- Switching frequency value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_get_sw_frq_set()

int lt8722_get_sw_frq_set ( struct lt8722_dev dev,
enum lt8722_sw_frq_set value 
)

Get switching frequency of LT8722 device.

Get switching frequency

Parameters
dev- LT8722 device descriptor
value- Switching frequency value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_get_sw_vc_int()

int lt8722_get_sw_vc_int ( struct lt8722_dev dev,
enum lt8722_sw_vc_int value 
)

Get initial peak inductor current of LT8722 device.

Get initial peak inductor current

Parameters
dev- LT8722 device descriptor
value- Peak inductor current value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_get_swen_pin()

int lt8722_get_swen_pin ( struct lt8722_dev dev,
uint8_t *  value 
)

Get SWEN pin of LT8722 device.

Get SWEN pin

Parameters
dev- LT8722 device descriptor
value- SWEN pin value.
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_get_swen_req()

int lt8722_get_swen_req ( struct lt8722_dev dev,
bool value 
)

Get switching enable of LT8722 device.

Get SWEN_REQ

Parameters
dev- LT8722 device descriptor
value- Enable if true, disabled otherwise
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_get_sys_dc()

int lt8722_get_sys_dc ( struct lt8722_dev dev,
enum lt8722_sys_dc value 
)

Get PWM duty cycle of LT8722 device.

Get PWM duty cycle

Parameters
dev- LT8722 device descriptor
value- PWM duty cycle value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_get_vcc_vreg()

int lt8722_get_vcc_vreg ( struct lt8722_dev dev,
enum lt8722_vcc_vreg value 
)

Get internal circuitry voltage source of LT8722 device.

Get internal circuitry voltage source

Parameters
dev- LT8722 device descriptor
value- VCC voltage regulator output
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_init()

int lt8722_init ( struct lt8722_dev **  device,
struct lt8722_init_param init_param 
)

Initialize the LT8722 device.

Initialize the LT8722 device descriptor.

Parameters
device- LT8722 device descriptor
init_param- Initialization parameter containing information about the LT8722 device to be initialized.
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_reg_read()

int lt8722_reg_read ( struct lt8722_dev dev,
uint8_t  address,
uint32_t *  data 
)

Read data from LT8722 device.

Read data from LT8722 device.

Parameters
dev- LT8722 device descriptor
address- Register address.
data- Received data.
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_reg_write()

int lt8722_reg_write ( struct lt8722_dev dev,
uint8_t  address,
uint32_t  data 
)

Write data to LT8722 device.

Write data to LT8722 device.

Parameters
dev- LT8722 device descriptor
address- Register address.
data- Data to be written.
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_reg_write_mask()

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.

Write data to LT8722 device with mask.

Parameters
dev- LT8722 device descriptor
address- Register address.
mask- Mask to be applied.
data- Data to be written.
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_remove()

int lt8722_remove ( struct lt8722_dev dev)

Free the resources allocated by the lt8722_init()

Remove resources allocated by the init function.

Parameters
dev- LT8722 device descriptor
Returns
- 0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_reset()

int lt8722_reset ( struct lt8722_dev dev)

Shutdown the LT8722 device.

Reset device

Parameters
dev- LT8722 device descriptor
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_set_amux()

int lt8722_set_amux ( struct lt8722_dev dev,
enum lt8722_amux  value,
uint8_t  test 
)

Set analot output signal source of LT8722 device.

Set analog output signal source

Parameters
dev- LT8722 device descriptor
value- Analog output signal source value
test- AMUX_TEST value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_set_aout_en()

int lt8722_set_aout_en ( struct lt8722_dev dev,
bool  value 
)

Set analog output buffer status of LT8722 device.

Set analog output buffer status

Parameters
dev- LT8722 device descriptor
value- Analog output buffer status value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_set_dac()

int lt8722_set_dac ( struct lt8722_dev dev,
uint32_t  value 
)

Set DAC code of LT8722 device.

Set output voltage

Parameters
dev- LT8722 device descriptor
value- DAC value
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_set_en_pin()

int lt8722_set_en_pin ( struct lt8722_dev dev,
uint8_t  value 
)

Set EN pin of LT8722 device.

Set EN pin

Parameters
dev- LT8722 device descriptor
value- EN pin value.
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_set_enable_req()

int lt8722_set_enable_req ( struct lt8722_dev dev,
bool  value 
)

Set ENABLE_REQ field in LT8722 device.

Set ENABLE_REQ

Parameters
dev- LT8722 device descriptor
value- Enable if true, disabled otherwise
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_set_output_voltage()

int lt8722_set_output_voltage ( struct lt8722_dev dev,
int64_t  value 
)

Set output volatge of LT8722 device.

Set output voltage

Parameters
dev- LT8722 device descriptor
value- Output voltage value in nanovolts.
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_set_pwr_lim()

int lt8722_set_pwr_lim ( struct lt8722_dev dev,
enum lt8722_pwr_lim  value 
)

Set LDR power dissipation limit of LT8722 device.

Set LDR power dissipation limit

Parameters
dev- LT8722 device descriptor
value- LDR power dissipation limit value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_set_spis_dac_ilimn()

int lt8722_set_spis_dac_ilimn ( struct lt8722_dev dev,
uint16_t  value 
)

Set negative output current limit of LT8722 device.

Set negative output current limit

Parameters
dev- LT8722 device descriptor
value- Negative output current limit value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_set_spis_dac_ilimp()

int lt8722_set_spis_dac_ilimp ( struct lt8722_dev dev,
uint16_t  value 
)

Set positive output current limit of LT8722 device.

Set positive output current limit

Parameters
dev- LT8722 device descriptor
value- Positive output current limit value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_set_spis_ov_clamp()

int lt8722_set_spis_ov_clamp ( struct lt8722_dev dev,
uint8_t  value 
)

Set positive output voltage limit of LT8722 device.

Set positive output voltage limit

Parameters
dev- LT8722 device descriptor
value- Positive output voltage limit value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_set_spis_uv_clamp()

int lt8722_set_spis_uv_clamp ( struct lt8722_dev dev,
uint8_t  value 
)

Set negative output voltage limit of LT8722 device.

Set negative output voltage limit

Parameters
dev- LT8722 device descriptor
value- Negative output voltage limit value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_set_sw_frq_adj()

int lt8722_set_sw_frq_adj ( struct lt8722_dev dev,
enum lt8722_sw_frq_adj  value 
)

Set switching frequency adjustment of LT8722 device.

Set switching frequency adjustment

Parameters
dev- LT8722 device descriptor
value- Switching frequency adjustment value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_set_sw_frq_set()

int lt8722_set_sw_frq_set ( struct lt8722_dev dev,
enum lt8722_sw_frq_set  value 
)

Set switching frequency of LT8722 device.

Set switching frequency

Parameters
dev- LT8722 device descriptor
value- Switching frequency value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_set_sw_vc_int()

int lt8722_set_sw_vc_int ( struct lt8722_dev dev,
enum lt8722_sw_vc_int  value 
)

Set initial peak inductor current of LT8722 device.

Set initial peak inductor current

Parameters
dev- LT8722 device descriptor
value- Peak inductor current value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_set_swen_pin()

int lt8722_set_swen_pin ( struct lt8722_dev dev,
uint8_t  value 
)

Set SWEN pin of LT8722 device.

Set SWEN pin

Parameters
dev- LT8722 device descriptor
value- SWEN pin value.
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_set_swen_req()

int lt8722_set_swen_req ( struct lt8722_dev dev,
bool  value 
)

Set switching enable of LT8722 device.

Set SWEN_REQ

Parameters
dev- LT8722 device descriptor
value- Enable if true, disabled otherwise
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_set_sys_dc()

int lt8722_set_sys_dc ( struct lt8722_dev dev,
enum lt8722_sys_dc  value 
)

Set PWM duty cycle of LT8722 device.

Set PWM duty cycle

Parameters
dev- LT8722 device descriptor
value- PWM duty cycle value
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_set_vcc_vreg()

int lt8722_set_vcc_vreg ( struct lt8722_dev dev,
enum lt8722_vcc_vreg  value 
)

Set internal circuitry voltage source of LT8722 device.

Set internal circuitry voltage source

Parameters
dev- LT8722 device descriptor
value- VCC voltage regulator output
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_shutdown()

int lt8722_shutdown ( struct lt8722_dev dev)

Reset the LT8722 device.

Shutdown device

Parameters
dev- LT8722 device descriptor
Returns
0 in case of succes, negative error code otherwise

◆ lt8722_transaction()

int lt8722_transaction ( struct lt8722_dev dev,
struct lt8722_packet packet 
)

LT8722 device SPI transaction.

LT8722 device SPI transaction

Parameters
dev- LT8722 device descriptor
packet- LT8722 packet.
Returns
0 in case of succes, negative error code otherwise
Here is the caller graph for this function:

◆ lt8722_voltage_to_dac()

int32_t lt8722_voltage_to_dac ( int64_t  voltage)

Convert voltage to DAC code.

Convert voltage to DAC code

Parameters
voltage- Voltage value in nanovolts.
Returns
DAC code.
Here is the caller graph for this function:

Variable Documentation

◆ lt8722_regs

struct lt8722_reg lt8722_regs[LT8722_NUM_REGISTERS]