Created attachment 206330 [details] axp81x patch Use iicdev_readfrom/writeto to shrink the code size.
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.