On 16-02-25 02:05 PM, Vinicius Costa Gomes wrote:
Dmitriy Korovkin <dmitriy.korovkin(a)windriver.com> writes:
It would be good to have design changes for pinmux outlined in oneGood idea, this is going to be useful to see if what I have in mind is
text. Are we talking about code consolidation for Quark SE/D2000 or
the global change for all pinmuxes? Are we touching the part referred
aligned with what other's have.
This is a rough sketch of what's I am working on:
* Code organization:
* Galileo is a special case, and to avoid copied functions in the
pinmux_dev driver, '_galileo_set_pin()' will be made available to both
the "board" driver and "dev" driver via the 'pinmux_galileo_priv.h'
I agree, Galileo is a special case and it's initialization code may/will
share enough code with development part. I think, pinmux_galileo_priv.c
will implement those common functions, am I right?
The drivers in 'pinmux' will have only the equivalent of
'_pinmux_defaults()' part of the 'board/*/pinmux.c' files.
The drivers in 'pinmux_dev' will provide the pinmux reconfiguration part that
you refer below.
If we are just changing code for two SoCs, I have no problem with itAt first what comes to mind is that we could have a common header that
at all. If we are changing the architecture, we really need the new
approach clean, as the following concerns come up: - pinmuxing may be
implemented on a SoC or on a board level (Quark SE vs. Galileo), as
well as other architectures may implement it on a different way (FRDM
k64F, which is coming).
provides functions that are used by a family of boards. Or are you
talking about something else? (I don't know anything about FRDM k64F)
As far as I see, FRDM k64f looks like something in between Galileo and
Quark SE in terms of complexity.
- reconfiguring pinmux from an application is not usual practice, butWe will provide the pinmux_dev driver for applications that wish to do this.
quite possible. Cutting this functionality off may make problems in
case of "we have this pinmux configuration by default, but for this
particular sample project we need to change it".
- pinmux_initialize() may and sometimes should not be implemented byThe board drivers (in 'pinmux'), in the common case, will write directly
calling set(), get() and other API functions, but implemented
individually, just not to slow down the booting process.
in the registers, configuring multiple pins at the same time,
maintaining what we have right now in Zephyr.