RTEMS | Add the support for i2c driver in the aarch64/raspberrypi bsp (!363)
Gedare Bloom (@gedare)
gitlab at rtems.org
Tue Jun 24 16:03:12 UTC 2025
Gedare Bloom started a new discussion on bsps/aarch64/raspberrypi/i2c/raspberrypi-i2c.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/363#note_125129
> + case raspberrypi_bscm1:
> + bus_path = "/dev/i2c-1";
> + break;
> + case raspberrypi_bscm3:
> + bus_path = "/dev/i2c-3";
> + break;
> + case raspberrypi_bscm4:
> + bus_path = "/dev/i2c-4";
> + break;
> + case raspberrypi_bscm5:
> + bus_path = "/dev/i2c-5";
> + break;
> + case raspberrypi_bscm6:
> + bus_path = "/dev/i2c-6";
> + break;
> + default:
you could check the correctness of `device` before you call the `i2c_bus_alloc_and_init`. This is preferable "Parameter checking should be done first with early error returns." https://docs.rtems.org/docs/main/eng/coding-conventions.html#readability
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/363#note_125129
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250624/0c0f63ad/attachment-0001.htm>
More information about the bugs
mailing list