Re: how to provide own out of tree implementation/replacement of existing driver


Bolivar, Marti
 

Maybe we can work towards removing the 'select' statements in those
cases and using 'imply' instead?

https://github.com/torvalds/linux/commit/237e3ad0f195d8fd34f1299e45f04793832a16fc

"Cufi, Carles" <Carles.Cufi@nordicsemi.no> writes:

Hi Jan,

This has been done in the past in the following way:

https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/entropy/Kconfig.nrf5#L7

It's not ideal, but it's the only current solution I am aware of.

Regards,

Carles

-----Original Message-----
From: users@lists.zephyrproject.org <users@lists.zephyrproject.org> On
Behalf Of Jan Pohanka via lists.zephyrproject.org
Sent: 17 June 2020 08:48
To: Bolivar, Marti <Marti.Bolivar@nordicsemi.no>
Cc: Zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] how to provide own out of tree
implementation/replacement of existing driver

Hello,
yes, but I'm afraid that this would work only in simplest cases eg.
when an in-tree driver is not selected as dependency etc...

Ășt 16. 6. 2020 v 23:07 odesĂ­latel Bolivar, Marti
<Marti.Bolivar@nordicsemi.no> napsal:

Hi,

You should be able to just disable the in-tree driver using Kconfig
and use your own out of tree driver.

"Jan Pohanka via lists.zephyrproject.org"
<xhpohanka=gmail.com@lists.zephyrproject.org> writes:

Hello,

I would like to use my own implementation of an existing driver. Is
there any way to do that? I have found an amend feature in
https://github.com/zephyrproject-rtos/zephyr/pull/19980 but I cannot
make it work. If I understand correctly it is intended more to add
some functionality than completely replace.
In my use-case it would be probably easier to use out of tree
implementation for some time than maintain patches for the main
tree.
In fact I need just to add support for new soc from the stm32 family
that is not yet in existing drivers (clock, watchdog, ethernet,
etc).
Later when our code is polished, I will prepare pull-requests.

best regards
Jan

Join users@lists.zephyrproject.org to automatically receive all group messages.