zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.83k stars 6.6k forks source link

Convert GPIO users to new GPIO API #20017

Closed carlescufi closed 4 years ago

carlescufi commented 5 years ago

List of users to convert:

Boards (DONE)

Module Assignee PR Done
boards/arm/actinius_icarus @anangl #20798
boards/arm/degu_evk @anangl #20798
boards/arm/hexiwear_k64 @MaureenHelm #21346
boards/arm/mimxrt1020_evk @MaureenHelm N/A - uses hal driver directly
boards/arm/mimxrt1050_evk @MaureenHelm N/A - uses hal driver directly
boards/arm/mimxrt1060_evk @MaureenHelm N/A - uses hal driver directly
boards/arm/mimxrt1064_evk @MaureenHelm N/A - uses hal driver directly
boards/arm/nrf52840_pca10090 @anangl #20184
boards/arm/particle_* @pabigot #21249
boards/arm/nrf52_pca20020 @pabigot
boards/arm/nrf9160_pca10090 @anangl

Drivers

Module Assignee PR Done
drivers/audio/tlv320dac310x @carlescufi #22172
drivers/bluetooth/hci @erwango #21062
drivers/can @karstenkoenig #20944
drivers/display/ssd1306 @jfischer-phytec-iot #21687
drivers/display/ssd16xx @jfischer-phytec-iot #21686
drivers/display/st7789v @jfischer-phytec-iot #22146
drivers/display/ili9340 @jfischer-phytec-iot #22146
drivers/display/mb_display.c @carlescufi #22157
drivers/eeprom/eeprom_at2x @pabigot #22219
drivers/ethernet/enc424j600-enc28j60 @jfischer-phytec-iot #22130
drivers/i2c/i2c_esp32 @ExtremeGTX #20194
drivers/ieee802154/ieee802154_cc1200 @tbursztyka, @pabigot #22323
drivers/ieee802154/ieee802154_cc2520 @tbursztyka, @pabigot #22323
drivers/ieee802154/ieee802154_mcr20a @jfischer-phytec-iot #22186
drivers/ieee802154/ieee802154_rf2xx*.c @mnkp #22214
drivers/led
drivers/led_strip @mbolivar https://github.com/zephyrproject-rtos/zephyr/pull/20393
drivers/lora @pabigot #22218
drivers/modem @carlescufi #22168
drivers/pwm/pwm_led_esp32 @ExtremeGTX #19753
drivers/spi/spi_context.h @erwango #21062
drivers/wifi/eswifi @erwango #21066
drivers/wifi/winc1500 @tbursztyka, @pabigot #22324

Samples

Module Assignee PR Done
samples/basic/blinky
samples/basic/button
samples/basic/threads @mnkp #21116
samples/bluetooth/hci_spi @erwango #22134
samples/bluetooth/mesh @mnkp #22122
samples/bluetooth/mesh_demo @mnkp #22122
samples/boards/96b_argonkey/microphone @avisconti #21203
samples/boards/96b_argonkey/sensors @avisconti #21203
samples/boards/bbc_microbit/ line_follower_robot @carlescufi #22068
samples/boards/bbc_microbit/pong @carlescufi #22068
samples/boards/bbc_microbit/sound @carlescufi #22068
samples/boards/nrf52/mesh/* @carlescufi #22129
samples/boards/reel_board/mesh_badge @carlescufi #22137
samples/boards/sensortile_box @avisconti #20941
samples/boards/up_squared/gpio_counter @dcpleung #21503
samples/drivers/CAN @karstenkoenig #20944
samples/drivers/espi @albertofloyd @franciscomunoz ~#22154~ #22298
samples/drivers/gpio @mnkp #21117 ✓ Removed
samples/drivers/lcd_hd44780 @carlescufi #22098
samples/drivers/led_apa102c_bitbang @carlescufi #22099
samples/net/lwm2m_client @carlescufi #22092
samples/net/nats @nashif Removed in master ✓removed
samples/net/wifi/src/wifi_test.c @pabigot #22324
samples/sensor/fxos8700-hid @jfischer-phytec-iot #22139
samples/subsys/usb/hid-cdc @jfischer-phytec-iot #22139
samples/subsys/usb/hid-mouse @anangl #20237

Other (DONE)

Module Assignee PR Done
subsys/disk/disk_access_usdhc.c @JunYangNXP #21349
subsys/disk/disk_access_spi_sdhc.c @MaureenHelm #21918
subsys/usb/usb_device.c @jfischer-phytec-iot #22102
tests/bluetooth/mesh @carlescufi #22162
tests/boards/intel_s1000_crb @dcpleung #21471 #21983
tests/drivers/gpio/gpio_basic_api @pabigot @mnkp
tests/drivers/pinmux/pinmux_basic_api @mnkp #21619

Sensors (DONE)

Module Assignee PR Done
drivers/sensor/adt7420 @pabigot #21559
drivers/sensor/adxl362 @pabigot #21561
drivers/sensor/adxl372 @pabigot #21562
drivers/sensor/amg88xx @jfischer-phytec-iot #21579
drivers/sensor/apds9960 @jfischer-phytec-iot #21267 ✓ [ on reelboard ]
drivers/sensor/bma280 @pabigot #22104 no hw
drivers/sensor/bmc150_magn @pabigot #22110 no hw [EOL, not documented on BMI site]
drivers/sensor/bmg160 @pabigot #22111 no hw [EOL, not documented on BMI site]
drivers/sensor/bmi160 @pabigot #21582
drivers/sensor/ccs811 @pabigot #22072
drivers/sensor/dht @pabigot #21527
drivers/sensor/fxas21002 @MaureenHelm #21343
drivers/sensor/fxos8700 @MaureenHelm #21311
drivers/sensor/hmc5883l @microbuilder #21718
drivers/sensor/hts221 @pabigot #19834
drivers/sensor/iis3dhhc @avisconti #20941
drivers/sensor/isl29035 @pabigot #21523
drivers/sensor/lis2dh @pabigot #22113
drivers/sensor/lis2ds12 @avisconti #22040
drivers/sensor/lis2dw12 @avisconti #20941
drivers/sensor/lis2mdl @avisconti #21958
drivers/sensor/lis3mdl @avisconti #21972
drivers/sensor/lps22hh @avisconti #20941
drivers/sensor/lsm6dsl @pabigot #19839
drivers/sensor/lsm6dso @avisconti #20941
drivers/sensor/lsm9ds0_gyro @pabigot #22114
drivers/sensor/mcp9808 @pabigot #21427
drivers/sensor/mpu6050 @pabigot #21566
drivers/sensor/sht3xd @pabigot #20295
drivers/sensor/stts751 @avisconti #21828
drivers/sensor/sx9500 @pabigot #22115
drivers/sensor/ti_hdc @jfischer-phytec-iot #21543
drivers/sensor/tmp007 @pabigot #22135 ✓ [EOL, not documented on TI site]
drivers/sensor/vl53l0x @erwango #21063 ✓ [on several boards]
vikrant8052 commented 5 years ago

@carlescufi Is that mean I have to update said Apps (via submitting new PRs) with latest GPIO APIs ?

carlescufi commented 5 years ago

@carlescufi Is that mean I have to update said Apps (via submitting new PRs) with latest GPIO APIs ?

Yes, please. Send a Pull Request against the topic-gpio branch, since that is the branch we are targeting, not master.

vikrant8052 commented 5 years ago

@carlescufi

https://github.com/zephyrproject-rtos/zephyr/pull/16648/commits/ff873b8a49b30cc7b20c91d7fee058d30d060d33 & we have to take reference from this link for modifications (for nrfx). right ?

carlescufi commented 5 years ago

@carlescufi

ff873b8 & we have to take reference from this link for modifications (for nrfx). right ?

That is modifying an actual GPIO driver, not a user of it. Take a look at the one of the PRs listed in the table in the main description of the issue to get a better feeling.

pabigot commented 5 years ago

@vikrant8051 Specifically you should look at the commits with these subjects:

since the only GPIO use in the samples you're responsible for are toggling LEDs and responding to button presses. The only significant change in API will be in button handling.

(Note: The SHA1s above will change when the topic-branch is updated, so look for the commit message if you can't find them.)

pabigot commented 5 years ago

Some notes on converting GPIO users. If this is useful it may be edited for clarifications/extensions.

A working idiom to handle interrupts is exemplified in the converted driver for st,hts221 (PENDING: See also #21548):

NOTE Some drivers may use gpio_pin_write(..., ACTIVE) where the driver currently defines ACTIVE as zero or non-zero. A complete conversion solution would update the driver to use gpio_pin_set(..., 0) (or 1) and specify the active level in the devicetree flags. A minimal conversion may be achieved by using gpio_pin_set_raw(..., ACTIVE).

jenmwms commented 4 years ago

Can someone please explain the reasoning to remove tests/boards/intel_s1000_crb? I need to include rationale in the commit for #21471 . Any thoughts, @dcpleung, @carlescufi?

avisconti commented 4 years ago

@carlescufi I am still owner of the following 3 items: lis2dh, lis2ds12, lsm9ds0_gyro. I am not sure I'll be able to complete them in the timeframe, as I have other urgencies till end of January. Is there anyone who can volunteer on those tasks?

avisconti commented 4 years ago

@carlescufi I am still owner of the following 3 items: lis2dh, lis2ds12, lsm9ds0_gyro. I am not sure I'll be able to complete them in the timeframe, as I have other urgencies till end of January. Is there anyone who can volunteer on those tasks?

OK, I changed also lis2ds12 (see #22040). I think I'll not be able to proceed with the remaining two (lis2dh and lsm9ds0_gyro).

pabigot commented 4 years ago

I think I'm tapped to handle anything that's left over, which I will do but I can't test them unless somebody can identify a shield or inexpensive supported dev board that has them.

avisconti commented 4 years ago

I think I'm tapped to handle anything that's left over, which I will do but I can't test them unless somebody can identify a shield or inexpensive supported dev board that has them.

Maybe we can just test the compilation for the moment? Let see what @erwango and @carlescufi have to say.

pabigot commented 4 years ago

Yes, we have agreement that build-test is sufficient so we can make progress, but we're also supposed to annotate devices that have not been verified on real hardware somehow. AFAIK there is no documentation of how that's to be done.

carlescufi commented 4 years ago

@avisconti yes, that is the agreement for this particular branch at least. @pabigot This should come together with the discussion about how to document stability per-API. It can either be done in Doxygen or else in the upcoming maintainers file.

avisconti commented 4 years ago

@carlescufi @pabigot I removed my ownership for lis2dh and lsm9ds0_gyro.

carlescufi commented 4 years ago

@carlescufi @pabigot I removed my ownership for lis2dh and lsm9ds0_gyro.

OK, thanks. @pabigot will take those two.

pabigot commented 4 years ago

All identified conversions have been completed. Any more that are discovered will be addressed when topic-gpio merges to master, or in master.