Re: Inconsistent and ever-changing device naming in Zephyr


Jon Medhurst (Tixy) <tixy@...>
 

On Fri, 2017-02-10 at 17:43 +0300, Paul Sokolovsky wrote:
Hmm, my concern was about having to have per-board or per-soc yaml
files (which I think is a wrong step) e.g. to have to do mappings
from say FOO_UART_<REG_ADDRESS> to FOO_UART_0, FOO_UART_1 etc. Seems
to me that DT parser can be smart and sort things by <REG_ADDRESS>
and assign them instance numbers 0..N.
I understand this discusses details of DT bindings and processing, but
for my own and other folks' understanding, I'd like to point that for a
device name (as in: the string you pass to device_get_binding()
indeed), any automatic means of derivation e.g. based on base address
won't work.
Yes, I agree with that. That's why I original asked about which 'name'
aliases in DT we're being used for, a) the name you pass to
device_get_binding, or b) the name used in C macro name inside the
device implementation, or, I guess c) both, if you have different
aliases to do that.

a) makes sense and what this email thread seems to agree on, but b) was
what was hinted at when I asked about avoiding the need for the current
fixup file workaround in the RFC patchset. So I was trying to get some
clarity. (Guess that means I sorta hijacked the thread, sorry)

--
Tixy

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