mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Holler <holler@ahsoftware.de>
To: Jean Delvare <khali@linux-fr.org>
Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	Till Harbaum <till@harbaum.org>
Subject: Re: [PATCH 1/2] i2c: Add possibility for user-defined (i2c-)devices for bus-drivers.
Date: Wed, 14 Nov 2012 13:38:36 +0100	[thread overview]
Message-ID: <50A390CC.9000208@ahsoftware.de> (raw)
In-Reply-To: <20121114104050.79df8cd9@endymion.delvare>

Hello,

Am 14.11.2012 10:40, schrieb Jean Delvare:

>> It isn't possible to do such, because the only ID available for
>> i2c-busses is given them at runtime. So people have to live with that
>> imho artificially problem, if they use my patch. I don't have any other
>> solution until the numbering is predictable. But I assume you already
>> know all that, otherwise you wouldn't have mentioned it.
>
> The problem is inherent to external, hot-plug I2C adapters. You can't
> predict their bus number, and actually you can't even always predict
> their name. In the case of usb-tiny-i2c, you may be able to look-up the
> bus number from the adapter name, but you won't be able to always
> differentiate between two adapters, if they are connected to paired USB
> ports.
>
> This is a design issue with the i2c-tiny-usb hardware in the first
> place. If it is needed to differentiate between adapters, their would
> need to be a locally unique ID in every adapter, which the kernel can
> query. I suppose this was not deemed necessary at design time, as most
> people will only connect one such adapter at a time to their system.

Actually many of the available USB devices (e.g. many usb-serials) don't 
offer a unique ID by themself. That isn't just a problem of the 
i2c-tiny-usb. But in contrast to other solutions, it shouldn't be very 
hard to give those adapters a unique ID. As the whole SUB solution is 
just software (and open source), one likely just would to write some 
small piece of additional code.

> I have already experienced this and yes, it is a pain. But I would
> think that a system designed without a RTC in the first place has
> another way of getting its time correct at boot time, for example NTP.
> As I understand it the RTC chip is only there to set the system time at
> boot, right, the actual timekeeping during run-time is still done by the
> CPU?

Whatever those people which want to us it decide. If I didn't want to 
help other people by offering them some small documentation about how to 
build such theirself, I wouldn't have taken the usual and almost 
unavoidable pain trying feed some silly patches into the kernel. ;)

Anyway, maybe Till Harbaum will like that solution and won't get blocked 
by you. And maybe in some years we will see how many other bus-drivers 
have adopted the same solution. In fact the in-driver solution was my 
first one and I've thought others might be interested too, so I've moved 
the few lines from the driver itself into the i2c-core before I sent the 
patches. Unfortunately a waste of time.

Regards,

Alexander


  reply	other threads:[~2012-11-14 12:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-13 18:06 Alexander Holler
2012-11-13 18:06 ` [PATCH 2/2] i2c: i2c-tiny-usb: Add parameter for optional user-defined devices Alexander Holler
2012-11-13 18:55 ` [PATCH 1/2] i2c: Add possibility for user-defined (i2c-)devices for bus-drivers Jean Delvare
2012-11-13 20:23   ` Alexander Holler
2012-11-13 20:52     ` [PATCH] i2c: i2c-tiny-usb: Add parameter for optional i2c-devices Alexander Holler
2012-11-13 22:42       ` Alan Cox
2012-11-13 23:41         ` Alexander Holler
2012-11-13 21:08     ` [PATCH 1/2] i2c: Add possibility for user-defined (i2c-)devices for bus-drivers Jean Delvare
2012-11-13 21:24       ` Alexander Holler
2012-11-13 21:42         ` Jean Delvare
2012-11-13 23:38           ` Alexander Holler
2012-11-14  9:40             ` Jean Delvare
2012-11-14 12:38               ` Alexander Holler [this message]
2012-11-14 19:22                 ` till
2012-11-14 23:34                   ` Alexander Holler
     [not found]                     ` <1639554.ZUOmHr6Yka@lxtiha>
2012-11-15 11:44                       ` Alexander Holler
2012-11-19 13:38                   ` Alexander Holler
2012-11-23 14:35               ` Alexander Holler
2012-11-14  2:47           ` Alexander Holler
2012-11-14  9:08             ` Alexander Holler

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=50A390CC.9000208@ahsoftware.de \
    --to=holler@ahsoftware.de \
    --cc=khali@linux-fr.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=till@harbaum.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome