All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eugen.Hristev at microchip.com <Eugen.Hristev@microchip.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] w1: fix build without CONFIG_W1_EEPROM
Date: Tue, 23 Oct 2018 08:40:27 +0000	[thread overview]
Message-ID: <671758ff-0375-167b-6ca7-cdaf4d1d9519@microchip.com> (raw)
In-Reply-To: <f6c7f915-2ac1-3274-a623-acef26a745f9@flowbird.group>



On 23.10.2018 11:31, Martin Fuzzey wrote:
> 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.

I tried as much as possible to decouple the W1 bus from the W1 EEPROM 
memories. It is possible that we will have a different framework for 
EEPROMs that will include both 1wire and i2c eeproms, and then the 
interfacing would be pretty easy to change to.

That's why I am thinking that w1 bus read should not be much affected if 
the 1w EEPROMs are unknown to U-boot

> 
> Regards,
> 
> Martin
> 
> 

  reply	other threads:[~2018-10-23  8:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-22 16:51 [U-Boot] [PATCH] w1: fix build without CONFIG_W1_EEPROM Martin Fuzzey
2018-10-23  7:07 ` Eugen.Hristev at microchip.com
2018-10-23  8:31   ` Martin Fuzzey
2018-10-23  8:40     ` Eugen.Hristev at microchip.com [this message]
2018-10-23 14:09       ` Martin Fuzzey
2018-10-23 22:31         ` Lukasz Majewski
2018-10-24 10:08           ` Eugen.Hristev at microchip.com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=671758ff-0375-167b-6ca7-cdaf4d1d9519@microchip.com \
    --to=eugen.hristev@microchip.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.