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

[TOPIC-GPIO] drivers: gpio_sx1509b: update to use new GPIO API #19379

Merged
merged 1 commit into from
Oct 14, 2019

Conversation

pabigot
Copy link
Collaborator

@pabigot pabigot commented Sep 25, 2019

Convert the SX1509B driver to the new API.

This also includes general cleanup to the driver as it's based on work that had been done for #11880.

This driver does not pass gpio_api_1pin. See #19692.

@zephyrbot
Copy link
Collaborator

zephyrbot commented Sep 25, 2019

All checks are passing now.

checkpatch (informational only, not a failure)

-:430: WARNING:LONG_LINE: line over 80 characters
#430: FILE: drivers/gpio/gpio_sx1509b.c:267:
+	int rc = i2c_reg_write_word_be(drv_data->i2c_master, cfg->i2c_slave_addr,

-:438: WARNING:LONG_LINE: line over 80 characters
#438: FILE: drivers/gpio/gpio_sx1509b.c:275:
+	LOG_DBG("write %04x msk %04x val %04x => %04x: %d", orig_out, mask, value, out, rc);

- total: 0 errors, 2 warnings, 658 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Your patch has style problems, please review.

NOTE: Ignored message types: AVOID_EXTERNS BRACES CONFIG_EXPERIMENTAL CONST_STRUCT DATE_TIME FILE_PATH_CHANGES MINMAX NETWORKING_BLOCK_COMMENT_STYLE PRINTK_WITHOUT_KERN_LEVEL SPLIT_STRING VOLATILE

NOTE: If any of the errors are false positives, please report
      them to the maintainers.

Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages.

@pabigot pabigot changed the title drivers: gpio_sx1509b: update to use new GPIO API [TOPIC-GPIO] drivers: gpio_sx1509b: update to use new GPIO API Oct 8, 2019
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.

LGTM with minor comments.

drivers/gpio/gpio_sx1509b.c Outdated Show resolved Hide resolved
drivers/gpio/gpio_sx1509b.c Outdated Show resolved Hide resolved
drivers/gpio/gpio_sx1509b.c Outdated Show resolved Hide resolved
drivers/gpio/gpio_sx1509b.c Outdated Show resolved Hide resolved
drivers/gpio/gpio_sx1509b.c Outdated Show resolved Hide resolved
drivers/gpio/gpio_sx1509b.c Outdated Show resolved Hide resolved
drivers/gpio/gpio_sx1509b.c Outdated Show resolved Hide resolved
drivers/gpio/gpio_sx1509b.c Outdated Show resolved Hide resolved
@pabigot pabigot force-pushed the gpio/sx1509b branch 2 times, most recently from cd222e8 to 3106384 Compare October 9, 2019 15:13
@pabigot
Copy link
Collaborator Author

pabigot commented Oct 9, 2019

@mnkp all requests should be addressed ; see the last force-push for diffs.

Update driver code and board files to use new GPIO configuration flags
such as GPIO_ACTIVE_LOW. Also add implementation of new port_* driver
API.

Tested on external SX1509B breakout board and Thingy:52.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
@MaureenHelm MaureenHelm merged commit 9b59c75 into zephyrproject-rtos:topic-gpio Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Boards area: Build System area: GPIO area: Tests Issues related to a particular existing or missing test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants