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

Convert SAM drivers to DT_INST #22806

Merged
merged 2 commits into from
Feb 21, 2020

Conversation

galak
Copy link
Collaborator

@galak galak commented Feb 13, 2020

No description provided.

@galak
Copy link
Collaborator Author

galak commented Feb 13, 2020

Moved the commits related to SAM into one PR, so easier to get review that way.

@zephyrbot zephyrbot added the area: Watchdog Watchdog label Feb 13, 2020
@galak
Copy link
Collaborator Author

galak commented Feb 13, 2020

TODO:
drivers/adc/adc_sam0.c
drivers/adc/adc_sam_afec.c
drivers/counter/counter_sam0_tc32.c
drivers/flash/flash_sam.c
drivers/gpio/gpio_sam0.c
drivers/gpio/gpio_sam.c
drivers/hwinfo/hwinfo_sam.c
drivers/i2c/i2c_sam0.c
drivers/i2c/i2c_sam_twi.c
drivers/i2c/i2c_sam_twihs.c
drivers/pinmux/pinmux_sam0.c
drivers/serial/Kconfig.sam0
drivers/serial/uart_sam0.c
drivers/serial/uart_sam.c
drivers/serial/usart_sam.c
drivers/spi/spi_sam0.c
drivers/spi/spi_sam.c
drivers/usb/device/usb_dc_sam.c

Copy link
Member

@mnkp mnkp left a comment

Choose a reason for hiding this comment

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

Looks good, though I believe it is too early to convert all remaining SAM drivers to DT_INST. This family requires pinctrl data to be provided by DTS. For now we could convert watchdog, as this PR proposes, GPIO and counter. Any driver that doesn't require pinctlr.

soc/arm/atmel_sam/sam4e/dts_fixup.h Outdated Show resolved Hide resolved
@mnkp mnkp added the platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) label Feb 18, 2020
Convert driver to use DT_INST_ defines.

Signed-off-by: Kumar Gala <[email protected]>
Convert driver to use DT_INST_ defines.  The preferred defines for
drivers are DT_INST_.

Signed-off-by: Kumar Gala <[email protected]>
@galak
Copy link
Collaborator Author

galak commented Feb 18, 2020

Looks good, though I believe it is too early to convert all remaining SAM drivers to DT_INST. This family requires pinctrl data to be provided by DTS. For now we could convert watchdog, as this PR proposes, GPIO and counter. Any driver that doesn't require pinctlr.

Going to handle this with a mix of DT_INST and DT_NODELABEL. Once NODELABEL is in place I'll work up a PR to show the mix of pinctrl + driver.

@galak galak changed the base branch from master to topic-devicetree February 18, 2020 21:36
@galak galak requested a review from mnkp February 19, 2020 16:22
Copy link
Member

@mnkp mnkp left a comment

Choose a reason for hiding this comment

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

I haven't done full review before, I was under impression that more drivers will be added to this PR. The two commits converting watchdog and entropy drivers look good.

@galak
Copy link
Collaborator Author

galak commented Feb 21, 2020

I haven't done full review before, I was under impression that more drivers will be added to this PR. The two commits converting watchdog and entropy drivers look good.

I was thinking its best to merge and close out the PRs for the easy stuff and than have follow on PRs. Was thinking this was going to go faster, and thus the previous model that you are thinking about.

@galak galak merged this pull request into zephyrproject-rtos:topic-devicetree Feb 21, 2020
@galak galak deleted the dt-inst-sam branch February 21, 2020 17:58
@nandojve nandojve mentioned this pull request Feb 26, 2020
61 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Watchdog Watchdog platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants