Skip to content

Conversation

@fabiobaltieri
Copy link
Member

The it8801 template is helpful but in the current state it does not allow changing the device address as that is in the template itself. Fix that by moving the template content down a level in the hierarchy, so that it extends the mfd device itself rather than than instantiate it, then the base instance can have any address, now the only limitation is that only one instance is possible, but that is probably alright for now.

Alternatives would be to use a define for the address, or even a template per address, but this feels like a better compromise for now. This may also use
#82825 in the future if that ever becomes a thing.

Copy link
Contributor

@vphirema vphirema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested works

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I accidentally left a space earlier.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh thank you, fixed

The it8801 template is helpful but in the current state it does not
allow changing the device address as that is in the template itself. Fix
that by moving the template content down a level in the hierarchy, so
that it extends the mfd device itself rather than than instantiate it,
then the base instance can have any address, now the only limitation is
that only one instance is possible, but that is probably alright for
now.

Alternatives would be to use a define for the address, or even a
template per address, but this feels like a better compromise for now.
This may also use
zephyrproject-rtos#82825 in the future if
that ever becomes a thing.

Signed-off-by: Fabio Baltieri <[email protected]>
@kartben kartben merged commit b716b06 into zephyrproject-rtos:main Dec 31, 2024
24 checks passed
@fabiobaltieri fabiobaltieri deleted the ite-template-refactor branch February 28, 2025 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: GPIO area: Input Input Subsystem and Drivers area: MFD area: PWM Pulse Width Modulation area: RISCV RISCV Architecture (32-bit & 64-bit) platform: ITE ITE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants