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

Staging/max32670 #2238

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Staging/max32670 #2238

wants to merge 3 commits into from

Conversation

dbogdan
Copy link
Contributor

@dbogdan dbogdan commented Jul 2, 2024

Pull Request Description

MAX32670 VDDIO selection support for SPI and UART.

PR Type

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • Breaking change (has dependencies in other repos or will cause CI to fail)

PR Checklist

  • I have followed the Coding style guidelines
  • I have performed a self-review of the changes
  • I have commented my code, at least hard-to-understand parts
  • I have build all projects affected by the changes in this PR
  • I have tested in hardware affected projects, at the relevant boards
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe etc), if applies

For consistency reasons, to match the other Maxim targets.

Signed-off-by: Dragos Bogdan <[email protected]>
Comment on lines +65 to +90
static int32_t _max_spi_config_pins(struct no_os_spi_desc *desc)
{
struct max_spi_init_param *eparam;
mxc_gpio_cfg_t spi_pins;

eparam = desc->extra;

switch(desc->device_id) {
case 0:
spi_pins = gpio_cfg_spi0;
break;
case 1:
spi_pins = gpio_cfg_spi1;
break;
case 2:
spi_pins = gpio_cfg_spi2;
break;
default:
return -EINVAL;
}

spi_pins.vssel = eparam->vssel;
MXC_GPIO_Config(&spi_pins);

return 0;
}
Copy link
Contributor

@CiprianRegus CiprianRegus Jul 3, 2024

Choose a reason for hiding this comment

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

May be worth mentioning in the commit message that MAX32670 only has 1 CS per SPI instance (which is already included in the gpio_cfg_spi pin config structs), so we don't need to configure it independently, as for the other Maxim drivers.

Copy link
Contributor

@amiclaus amiclaus 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 to me overall, just some of the commits are lacking a body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants