Bug 239693 - [patch] arm/axp81x: Switch to iicdev_readfrom/writeto
Summary: [patch] arm/axp81x: Switch to iicdev_readfrom/writeto
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: arm Any
: --- Affects Some People
Assignee: freebsd-arm (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2019-08-07 12:27 UTC by Chuhong Yuan
Modified: 2021-01-14 14:51 UTC (History)
1 user (show)

See Also:


Attachments
axp81x patch (1.14 KB, patch)
2019-08-07 12:27 UTC, Chuhong Yuan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chuhong Yuan 2019-08-07 12:27:35 UTC
Created attachment 206330 [details]
axp81x patch

Use iicdev_readfrom/writeto to shrink the code size.
Comment 1 Mitchell Horne freebsd_committer freebsd_triage 2021-01-14 14:51:14 UTC
Hi, thanks for your submission. I posted this patch for additional review in hopes to get it submitted, but manu@ pointed out that he had looked into this before, and this particular device is incompatible with these helper functions.

His comment from the review at https://reviews.freebsd.org/D28104:

> Yeah I remember now.
> RSB isn't really i2c and we can't use those (I was sure that I tested at some point).
> using this code will boot but will fail as soon as we try to change the cpu freq (when we try to talk to the PMIC)
> root@pine64-lts:~ # sysctl dev.cpu.0.freq=1152
> dev.cpu.0.freq: iichb0: RTA not known for address 0x23
> axp8xx_pmu0: Setting vdd-cpux (dcdc2) to 1300000<->1300000
> <hang here>
> Since we cannot communicate with the PMIC we will hang as soon as the CPU reaches the desired freq and not have the correct needed voltage.