Page MenuHomeFreeBSD

da9063_iic: Add new driver for the Dialog Semiconductor DA9063 PMIC
ClosedPublic

Authored by jrtc27 on Aug 14 2022, 5:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 31 2023, 1:53 AM
Unknown Object (File)
Dec 27 2023, 4:41 PM
Unknown Object (File)
Dec 23 2023, 4:59 AM
Unknown Object (File)
Dec 23 2023, 3:37 AM
Unknown Object (File)
Nov 9 2023, 7:38 AM
Unknown Object (File)
Nov 8 2023, 4:33 AM
Unknown Object (File)
Oct 30 2023, 2:11 AM
Unknown Object (File)
Oct 5 2023, 6:37 AM
Subscribers

Details

Summary

This is an MFD with regulators, an RTC and a watchdog, among other
things. This adds the necessary infrastructure for specific children to
be added.

Note that the PMIC can also be attached via SPI, not just I2C, and so
the interface is abstracted. No SPI implementation is added, however.

This is the PMIC on SiFive's HiFive Unmatched.

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Just wondering about the path, we don't do per-vendor directory.
We have sys/dev/iicbus/pmic, maybe da9063_iic.c should be there and the rest in a new sys/dev/pmic/dialog directory ?

In D36199#821842, @manu wrote:

Just wondering about the path, we don't do per-vendor directory.
We have sys/dev/iicbus/pmic, maybe da9063_iic.c should be there and the rest in a new sys/dev/pmic/dialog directory ?

We have sys/dev/{altera,cadence,intel,xilinx} already. I'm a bit reluctant to scatter it across the tree as I feel it's nicer to have it all grouped in one place. Also sys/dev/pmic/dialog might suggest that everything under there is PMIC drivers, which da9063_rtc *technically* is but spiritually isn't, it's an RTC that just so happens to in a PMIC chip.

In D36199#821842, @manu wrote:

Just wondering about the path, we don't do per-vendor directory.
We have sys/dev/iicbus/pmic, maybe da9063_iic.c should be there and the rest in a new sys/dev/pmic/dialog directory ?

We have sys/dev/{altera,cadence,intel,xilinx} already. I'm a bit reluctant to scatter it across the tree as I feel it's nicer to have it all grouped in one place. Also sys/dev/pmic/dialog might suggest that everything under there is PMIC drivers, which da9063_rtc *technically* is but spiritually isn't, it's an RTC that just so happens to in a PMIC chip.

Yeah ok, fine with me then.
Can you add to the commit message in which board it's found ? (I guess it's one of the sifive board ?)

This revision is now accepted and ready to land.Aug 16 2022, 7:21 AM
sys/dev/dialog/da9063/da9063_if.m
29

I think the functionality of the methods is self-evident, but there should be at least a top-level comment in this file documenting what the interface is for/why it is needed.

Renamed da9063 to da9063_pmic and added comment header to kobj interface file

This revision now requires review to proceed.Aug 22 2022, 7:27 PM
This revision is now accepted and ready to land.Sep 13 2022, 4:43 PM