[U-Boot] [PATCH] w1: fix build without CONFIG_W1_EEPROM
Martin Fuzzey
martin.fuzzey at flowbird.group
Tue Oct 23 08:31:40 UTC 2018
On 23/10/18 09:07, Eugen.Hristev at microchip.com wrote:
>
> On 22.10.2018 19:51, Martin Fuzzey wrote:
>> Building with CONFIG_W1 and CONFIG_CMD_W1 but without CONFIG_W1_EEPROM
>> fails with
>> drivers/w1/w1-uclass.c:104: undefined reference to `w1_eeprom_register_new_device'
>> cmd/w1.c:93: undefined reference to `w1_eeprom_read_buf'
>>
>> Fix this.
> I would prefer if you let the w1 read command to be accessible
> regardless if CONFIG_W1_EEPROM is defined or not. Hence have only the w1
> eeprom reads under the ifdef...
> The w1_read checks for devices anyway and for the bus, so it should
> print invalid bus/device if nothing is present there.
> Any opinion on this ?
I don't really have a strong opinion on this.
Completely removing non implemented commands seems to be a common thing
to do in u-boot (cmd/i2c.c for instance) presumably to keep the image
size as small as possible.
But for the one wire case the code space saving is likely to be small
and, currently at least, there is little point buiding without
CONFIG_W1_EEPROM, not sure if that will change some day - of course
there are other types of one wire devices like various sensors but they
are probably of less interest in the context of a bootloader.
Let's wait a bit and see what Maxime or anyone else has to say about this.
Regards,
Martin
More information about the U-Boot
mailing list