Re: [RFC PATCH 0/6] Refactor device configuration

Tomasz Bursztyka

Hi Vlad,
Hi everyone,

I'd like to propose we revisit the way that devices are configured in
Zephyr. This is very RFC, please poke holes wherever you see fit.

Currently, most drivers define one or more device instances which can be
activated and configured from Kconfig. This has several drawbacks:

- It limits the number of devices which can be defined. If you have 3
DW I2C controllers, you need to add one more set of config variables
and structures.

- It makes interaction with external tools difficult. We are working
on a hardware configuration tool that will enable the user to choose
components from a catalog and generate a Zephyr config based on that.
I think you will need to clarify that before anything. I guess we are
all curious to see what it
will look like and how much it's affecting Zephyr. You are, afaik in
your patches, moving away
from Kconfig as we used to do. I am not saying it's good or bad, I just
lack the final goal: this tool
your are talking about. Would be great to see what it is all about.

We can generate Kconfig, but it's not a very robust approach. Given
an I2C device, its master may be called CONFIG_MYDEV_I2C_BUS,
CONFIG_MYDEV_0_I2C_MASTER or anything else.

Patches 1-4 introduce the needed wrappers and some fixes.
Fixes can go already to gerrit I think.


Join to automatically receive all group messages.