Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: i2c: dw: Enable PINCTRL conjuction with dt prop 'pinctrl-0' #83371

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

soburi
Copy link
Member

@soburi soburi commented Dec 24, 2024

If there is a pinctrl-0 property, PINCTRL will be enabled in conjunction with it.

@@ -5,7 +5,7 @@ menuconfig I2C_DW
bool "Design Ware I2C support"
default y
depends on DT_HAS_SNPS_DESIGNWARE_I2C_ENABLED
select PINCTRL if DT_HAS_RASPBERRYPI_PICO_I2C_ENABLED
select PINCTRL if $(dt_compat_any_has_prop,$(DT_COMPAT_I2C_DW),pinctrl-0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The compatible is called snps,designware-i2c, so maybe you should check something like DT_COMPAT_SNPS_DESIGNWARE_I2C?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is an IP core that is used by multiple SoCs. Some of them do not have pinctrl, so we need to check.

Copy link
Collaborator

@tagunil tagunil Dec 24, 2024

Choose a reason for hiding this comment

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

This is an IP core that is used by multiple SoCs. Some of them do not have pinctrl, so we need to check.

Yeah, that's for sure. I've done the same for the DW SPI core. My only point is the specific compatible name, which is used to generate the variable you're trying to use.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I got it. It was still a draft, not yet tested. Thank you.

Copy link
Member Author

Choose a reason for hiding this comment

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

It worked fine with applying your point. Thank you.

If there is a pinctrl-0 property, PINCTRL will be enabled in
conjunction with it.

Signed-off-by: TOKITA Hiroshi <[email protected]>
@soburi soburi force-pushed the dw_i2c_pinctrl_enable_by_prop branch from 0554984 to ab4baa1 Compare December 24, 2024 23:13
@soburi soburi marked this pull request as ready for review December 24, 2024 23:14
@zephyrbot zephyrbot added area: I2C size: XS A PR changing only a single line of code labels Dec 24, 2024
@zephyrbot zephyrbot requested a review from teburd December 24, 2024 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: I2C size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants