Skip to content

Conversation

@pabigot
Copy link
Contributor

@pabigot pabigot commented Jan 29, 2020

This PR augments #22241 with additional commits to resolve various problems.

From #22241 (comment) are fixes to the devicetree binding names, along with other build errors.

Also added are platform configurations to test the driver builds. For CC1200 the resulting application does not link due to configuration conflicts.

@zephyrbot
Copy link

zephyrbot commented Jan 29, 2020

All checks are passing now.

checkpatch (informational only, not a failure)

-:43: WARNING:LONG_LINE: line over 80 characters
#43: FILE: drivers/ieee802154/ieee802154_cc1200.c:733:
+	struct device *gpio = device_get_binding(DT_INST_0_TI_CC1200_INT_GPIOS_CONTROLLER);

-:49: WARNING:LONG_LINE: line over 80 characters
#49: FILE: drivers/ieee802154/ieee802154_cc1200.c:739:
+	cc1200->gpios[CC1200_GPIO_IDX_GPIO0].pin = DT_INST_0_TI_CC1200_INT_GPIOS_PIN;

-:267: WARNING:LONG_LINE: line over 80 characters
#267: FILE: drivers/ieee802154/ieee802154_cc2520.c:977:
+	cc2520->gpios[CC2520_GPIO_IDX_VREG_EN].pin = DT_INST_0_TI_CC2520_VREG_EN_GPIOS_PIN;

-:269: WARNING:LONG_LINE: line over 80 characters
#269: FILE: drivers/ieee802154/ieee802154_cc2520.c:979:
+			   GPIO_OUTPUT_LOW | DT_INST_0_TI_CC2520_VREG_EN_GPIOS_FLAGS);

-:278: WARNING:LONG_LINE: line over 80 characters
#278: FILE: drivers/ieee802154/ieee802154_cc2520.c:988:
+	cc2520->gpios[CC2520_GPIO_IDX_RESET].pin = DT_INST_0_TI_CC2520_RESET_GPIOS_PIN;

-:280: WARNING:LONG_LINE: line over 80 characters
#280: FILE: drivers/ieee802154/ieee802154_cc2520.c:990:
+			   GPIO_OUTPUT_LOW | DT_INST_0_TI_CC2520_RESET_GPIOS_FLAGS);

-:289: WARNING:LONG_LINE: line over 80 characters
#289: FILE: drivers/ieee802154/ieee802154_cc2520.c:999:
+	cc2520->gpios[CC2520_GPIO_IDX_FIFO].pin = DT_INST_0_TI_CC2520_FIFO_GPIOS_PIN;

-:300: WARNING:LONG_LINE: line over 80 characters
#300: FILE: drivers/ieee802154/ieee802154_cc2520.c:1010:
+	cc2520->gpios[CC2520_GPIO_IDX_CCA].pin = DT_INST_0_TI_CC2520_CCA_GPIOS_PIN;

-:311: WARNING:LONG_LINE: line over 80 characters
#311: FILE: drivers/ieee802154/ieee802154_cc2520.c:1021:
+	cc2520->gpios[CC2520_GPIO_IDX_SFD].pin = DT_INST_0_TI_CC2520_SFD_GPIOS_PIN;

-:322: WARNING:LONG_LINE: line over 80 characters
#322: FILE: drivers/ieee802154/ieee802154_cc2520.c:1032:
+	cc2520->gpios[CC2520_GPIO_IDX_FIFOP].pin = DT_INST_0_TI_CC2520_FIFOP_GPIOS_PIN;

- total: 0 errors, 10 warnings, 420 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
Copy link
Contributor Author

pabigot commented Jan 29, 2020

@jfischer-phytec-iot This is essentially the same as the branch you provided (thanks) except that I added a copyright statement for the sample overlay to avoid a checkpatch warning.

I also added a commit to address @mnkp's request for consistent GPIO initial output values.

@pabigot pabigot changed the title [TOPIC-GPIO] revisions to winc1500 driver PR [TOPIC-GPIO] revisions to 802154 driver PR Jan 30, 2020
@pabigot pabigot changed the title [TOPIC-GPIO] revisions to 802154 driver PR [TOPIC-GPIO] revisions to winc1500 driver PR Jan 30, 2020
@pabigot pabigot changed the title [TOPIC-GPIO] revisions to winc1500 driver PR [TOPIC-GPIO] revisions to 802154 driver PR Jan 30, 2020
@pabigot pabigot marked this pull request as ready for review January 30, 2020 13:59
@pabigot pabigot force-pushed the gpio/802154 branch 2 times, most recently from 5632ba4 to 2ce24d7 Compare January 30, 2020 17:08
Copy link
Member

Choose a reason for hiding this comment

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

Let's initialize all outputs to a known value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Low seems to be the off/in-reset state so I went with that.

@pabigot pabigot force-pushed the gpio/802154 branch 2 times, most recently from e1b260b to 2b56ff7 Compare February 1, 2020 10:59
Tomasz Bursztyka added 2 commits February 3, 2020 04:32
Update to use new API for GPIO pin configuration and operation.  Fix
invalid arithmetic on void pointer.  Mark all CC2520 GPIOs as required
in binding.

Signed-off-by: Tomasz Bursztyka <[email protected]>
Signed-off-by: Peter Bigot <[email protected]>
Update to use new API for GPIO pin configuration and operation.  Fix
invalid arithmetic on void pointer.  Convert to support devicetree.

Signed-off-by: Tomasz Bursztyka <[email protected]>
Signed-off-by: Peter Bigot <[email protected]>
@pabigot pabigot merged commit 18a6955 into zephyrproject-rtos:topic-gpio Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants