From: Wolfgang Denk Date: Thu, 05 Nov 2009 23:43:28 +0100 Subject: [U-Boot] [PATCH 1/2] ARM Conditionally compile board LED functions In-Reply-To: <4AF339E1.9060809@windriver.com> References: <1257292804-10612-1-git-send-email-Tom.Rix@windriver.com> <1257292804-10612-2-git-send-email-Tom.Rix@windriver.com> <20091105202420.0842A3F6EC@gemini.denx.de> <4AF339E1.9060809@windriver.com> Message-ID: <20091105224328.27F1B3F6EC@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Tom, In message <4AF339E1.9060809@windriver.com> you wrote: > > The arguments for using weak are getting weak :P :-P > Using weak is less relevant with the #ifdef's But it's the wrong direction your heading. We should get rid of #ifdef's, not add new ones. With #ifdef's, you have different versions of the code, which increases the multitude of configurations that actually need to be tested. With weak, you have one version of the code only. > The benefit now is that boards that use the led functions do > not have to define all of them. That's just an indication of a broken implementation. Normally you would provide the weak functions in a central place, where any board configuration which wants can overwrite them, or not. > I am open to ideas on how to kill weak off completely. You got it wrong. We want to kill off the #ifdef's. > Has a general led driver layer ever been proposed ? > Something to convert status led for a mixture of #defines and weak > symbols to something that had a register function and some > file_ops ? We use status LEDs on many boards, without real issues. It's only AT91 which suffers from this mess. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "There is nothing new under the sun, but there are lots of old things we don't know yet." - Ambrose Bierce