Am 04.03.2013 14:56, schrieb Gabor Juhos:
> Hi Alex,
> 
>> I also thought on this for a moment.
>> But:
>> I found no examples which did this like it shoud be done here. But could be 
>> that I've overseen such one.
>> The leds have different colors so names so the struct gpio_led will be
>> different (besides fewer leds in general..). To not get confused about the 
>> names
>> (which include color..) also the defines for them could or should be 
>> additional
>> ones.
>> Having two structs for the leds, two dirxxx_setup's with the different
>> ath79_register_leds_gpio calls, and to be exact without the usb led and 
>> switch
>> leds (so a second different struct) didn't seem a small change for the .c 
>> file.
>> More like two of them done in one.
>> After that, I thought its more straightforward to make an own one. Don't u
>> think so too?>
> 
> Adding another structure with five LEDs is not a big deal. Alternatively the 
> LED
> names can be changed from the setup routine. For the switch LED configuration,
> you don't need another structure. Simply set the led_cfg field to NULL.
> 
>> Else, how have the
>> MIPS_MACHINE(ATH79_MACH_DIR_835_A1, "DIR-835-A1",
>>           "D-Link DIR-835 rev. A1",
>>           dir835a1_setup);
>> part(s) to look like in the 825-c1.c to be able to decide which function to 
>> call for each model? And this will be enough?
> 
> You can create a common setup function for the generic parts and then call 
> that
> from the model specific setup routine. See how it is done in the
> 'mach-tl-mr3x20.c' and in the 'mach-rb4xx.c' files for example.
> 
> -Gabor

So as far as I can see the name needs to be generalized in
target/linux/ar71xx/config-3.7
(in target/linux/ar71xx/patches-3.7/6xx-MIPS-ath79-add-)
arch/mips/ath79/Kconfig
arch/mips/ath79/Makefile
and could stay splitted like it is for the rest?

But I still don't really see the benefit of this added complexity.. .
As I also could say all db120's should go into one .c .

Alex
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to