.
OK - I was wrong.
Notice I specified "12 volt" wiring
However I may have misunderstood the original situation. People are
talking about attic and wires in the wall. The way "I" understood the
question the OP had a device that mounted on the wall very close to
the ceiling on either the main floor of a 2 storie, or the basement of
either a single or multi story building, with an electrical outlet at
the normal low-level postion directly above the location of the
device, where the wall-wart could be connected. The question as I
understood it was whether he could pass the power cable from the wall
wart down through the upper floor and the ceiling below..
Now - ASSUMING this is a single family residence and the
ceiling/floor is not required to be a total fire stop, there is no
building code violation involved in drilling a hole in the ceiling or
the floor. Also, I'm assuming, as usually is the case, the cavity
between the upper floor and lower ceiling is not stuffed with
insulation, which means any wiring in that cavity does not need to be
oversized or de-rated for elevated temperatures.
Also I'm ASSUMING the power supply is a pluf connected UL or CSA
approved pwer supply that is current limited and listed as an
ultra-low voltage class 1 or class 2 current limited device. with
integrated wiring..
If all these assumptions are true, I don't believe there is any code
that SPECIFICALLY prevents the OP from drilling a hole in the floor
above and in the ceiling below and dropping the cord down to the wall
mounted device. This does not "hide" the wires, but it greatly reduces
the amount of exposed cable and removes the "wall wart" from view in
the primary living space..
This is how I interpreted the original question.
Running a piece of flexible tubing between the floors to guide the
wire and prevent accidental damage might possibly be adviseable, but
not required..
In my understanding the power supply MUST be accessible and can not
be "permanently installed"
Low voltage "lighting" is addressed in the code and is a different
story UNLESS it is a "light tape" or "rope" type lighting device,
which at least in Canadian Electrica Code, is exempt.
Installing in an unfinished attic space might cross the line due to
"accessibility" and insulation issues.