Skip to content

Commit

Permalink
regulator: cp9314: Documents OTP table naming scheme
Browse files Browse the repository at this point in the history
Adds a block comment relating the OTP table names to their
respective PTE_2 values.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
  • Loading branch information
rriveramcrus authored and cirrus-kor-lion committed Oct 24, 2023
1 parent 8d82a03 commit cd3a45f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/regulator/regulator_cp9314.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,14 @@ static int regulator_cp9314_otp_init(const struct device *dev)
uint8_t value;
int ret;

/**
* The PTE_2 field in the PTE_REG_2 register contains the value representing the OTP
* burned on the CP9314 device. The PTE_2 values in relation to the OTP table names
* are shown below.
*
* OTP-1 = 0x0, OTP-2 = 0x1, OTP-3 = 0x3, OTP-4 = 0x4
*/

ret = i2c_reg_read_byte_dt(&config->i2c, CP9314_REG_PTE_REG_2, &value);
if (ret < 0) {
return ret;
Expand Down

0 comments on commit cd3a45f

Please sign in to comment.