OpenBIC
OpenSource Bridge-IC
isl69259.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef ISL69259_H
17#define ISL69259_H
18
19#include "stdint.h"
20#include "sensor.h"
21
22#define TWO_COMPLEMENT_NEGATIVE_BIT BIT(15)
23#define ADJUST_IOUT_RANGE 2
24
26 uint8_t *buff;
27 uint32_t len;
28};
29
30bool isl69260_get_vout_max(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt);
31bool isl69260_get_vout_min(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt);
32bool isl69260_set_vout_max(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt);
33bool isl69260_set_vout_min(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt);
34bool isl69259_fwupdate(uint8_t bus, uint8_t addr, uint8_t *img_buff, uint32_t img_size);
35bool isl69259_get_raa_hex_mode(uint8_t bus, uint8_t addr, uint8_t *mode);
36bool isl69259_get_raa_crc(uint8_t bus, uint8_t addr, uint8_t mode, uint32_t *crc);
37bool get_raa_remaining_wr(uint8_t bus, uint8_t addr, uint8_t mode, uint16_t *remain);
38bool isl69260_get_vout_command(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt);
39bool isl69260_set_vout_command(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt);
40bool isl69260_get_vr_status(sensor_cfg *cfg, uint8_t rail, uint8_t vr_status_rail,
41 uint16_t *vr_status);
42bool isl69260_clear_vr_status(sensor_cfg *cfg, uint8_t rail);
43
44#endif
uint8_t addr
Definition: isl69259.c:0
bool isl69259_get_raa_crc(uint8_t bus, uint8_t addr, uint8_t mode, uint32_t *crc)
Definition: isl69259.c:294
bool isl69260_set_vout_command(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt)
Definition: isl69259.c:635
bool get_raa_remaining_wr(uint8_t bus, uint8_t addr, uint8_t mode, uint16_t *remain)
Definition: isl69259.c:273
bool isl69260_set_vout_max(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt)
Definition: isl69259.c:176
bool isl69260_get_vout_command(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt)
Definition: isl69259.c:617
bool isl69260_clear_vr_status(sensor_cfg *cfg, uint8_t rail)
Definition: isl69259.c:726
bool isl69259_get_raa_hex_mode(uint8_t bus, uint8_t addr, uint8_t *mode)
Definition: isl69259.c:370
bool isl69259_fwupdate(uint8_t bus, uint8_t addr, uint8_t *img_buff, uint32_t img_size)
Definition: isl69259.c:491
bool isl69260_get_vout_max(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt)
Definition: isl69259.c:142
bool isl69260_get_vout_min(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt)
Definition: isl69259.c:159
bool isl69260_set_vout_min(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt)
Definition: isl69259.c:193
bool isl69260_get_vr_status(sensor_cfg *cfg, uint8_t rail, uint8_t vr_status_rail, uint16_t *vr_status)
Definition: isl69259.c:652
uint8_t mode
Definition: plat_ncsi.h:5
Definition: sensor.h:255
Definition: isl69259.h:25
uint8_t * buff
Definition: isl69259.h:26
uint32_t len
Definition: isl69259.h:27