[PATCH rtems 2/3] confdefs: Add configure macro for libi2c
Vijay Kumar Banerjee
vijay at rtems.org
Thu Jul 27 23:33:09 UTC 2023
On Tue, Jul 25, 2023 at 12:23 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
>
>
> On 25.07.23 04:31, Vijay Kumar Banerjee wrote:
> > On Mon, Jul 24, 2023 at 10:09 AM Sebastian Huber
> > <sebastian.huber at embedded-brains.de> wrote:
> >> On 20.07.23 03:10, Vijay Kumar Banerjee wrote:
> >>> Add CONFIGURE_APPLICATION_NEEDS_LIBI2C_DRIVER define
> >> Do we really need this? What happens if an I2C device needs interrupts
> >> during initialization?
> >>
> > the libi2c initialize calls rtems_io_register_driver, which requires
> > `CONFIGURE_MAXIMUM_DRIVERS` defined from the application. In some
> > BSPs, like mvme3100, libi2c is initialized at sysinit, causing the
> > application to crash without the define. Adding this confdefs macro
> > allows the user to add the libi2c if it is needed by the app, or omit
> > it without crashing the system. In its current state, libi2c requires
> > the BSP to handle registering the buses and drivers after
> > initialization, the interrupt can be handled by the BSP I2C handler.
>
> Ok, maybe one option is to use IMFS_make_generic_node() instead of using
> rtems_io_register_driver(). Another option is to use the new I2C framework.
>
> If you really need this new application configuration option, then
> please document it:
>
> https://docs.rtems.org/branches/master/eng/req/howto.html#application-configuration-options
>
Thanks for the review and suggestions. I am unsure how much work it
would be to refactor the BSP to use the new I2C framework, but that is
likely the neatest approach. For now, I will send a v2 of this
patchset with documentation. It would be good to have libi2c working
on mvme3100 in RTEMS 6.
Best regards,
Vijay
> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax: +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
More information about the devel
mailing list