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)
Sat, Oct 26, 1:08 PM
Unknown Object (File)
Sat, Oct 26, 1:07 PM
Unknown Object (File)
Sat, Oct 26, 1:07 PM
Unknown Object (File)
Sat, Oct 26, 1:07 PM
Unknown Object (File)
Sat, Oct 26, 12:46 PM
Unknown Object (File)
Sep 24 2024, 11:04 AM
Unknown Object (File)
Sep 22 2024, 8:59 PM
Unknown Object (File)
Sep 22 2024, 8:59 PM
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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 47058
Build 43947: arc lint + arc unit

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