On Sat, May 31, 2014 at 3:48 PM, Wolfram Sang <[email protected]> wrote:
>
>> Right, I read the function which provides the functionality, but my
>> point is; I don't think my patch changes the semantics in a way which
>> would adversely affect this option. If you think that it does, can you
>> specify how please?
>
> Currently, if a driver would be DT only and does not provide a seperate
> i2c_device_id table, then the driver is unusable with method 4. I don't
> like to have some drivers being capable of it and some not.
>
>> Does the sysfs method create a i2c_device_id table? If not, how does
>> it probe successfully pre-patch?
>
> The sysfs method creates a device. Its name is matched against
> i2c_device_ids only since it does not have a node pointer for DT to be
> matched against.
Is this really so useful on embedded systems?
I was under the impression that this method was something used
on say PC desktops with temperature monitors and EEPROMs
on some I2C link on the PCB, usage entirely optional and fun
for userspace hacks.
And when we say "people use it" do we mean "sensors-detect
uses it, on desktops", really?
Yours,
Linus Walleij
On Mon, Jun 02, 2014 at 02:16:59PM +0200, Linus Walleij wrote:
> On Sat, May 31, 2014 at 3:48 PM, Wolfram Sang <[email protected]> wrote:
> >
> >> Right, I read the function which provides the functionality, but my
> >> point is; I don't think my patch changes the semantics in a way which
> >> would adversely affect this option. If you think that it does, can you
> >> specify how please?
> >
> > Currently, if a driver would be DT only and does not provide a seperate
> > i2c_device_id table, then the driver is unusable with method 4. I don't
> > like to have some drivers being capable of it and some not.
> >
> >> Does the sysfs method create a i2c_device_id table? If not, how does
> >> it probe successfully pre-patch?
> >
> > The sysfs method creates a device. Its name is matched against
> > i2c_device_ids only since it does not have a node pointer for DT to be
> > matched against.
>
> Is this really so useful on embedded systems?
Well, this feature is at least nice with embedded:
---
* You are developing a driver on a test board, where you soldered the I2C
device yourself.
---
Or during HW bringup, you this or that driver for a device (out-of-tree
vs. in-kernel), and hey, the RTC even has an EEPROM at another address,
let's try. Such things are the use cases I have mostly seen and those
customers liked it.
The problem is that we are talking about matching against I2C slave
drivers. I can't see a line between embedded and non-embedded when it
comes to slaves. They are just slaves and could be on any hardware.
Keeping the bigger picture in mind, IMO it is cumbersome if some drivers
support user-space instantiation and some not.
Though, I wouldn't mind if compatible entries could be passed to the
'new_device' file, in addition to i2c_device_ids. Yet, this needs some
extra handling I haven't found the time for, yet.
On Mon, Jun 2, 2014 at 2:38 PM, Wolfram Sang <[email protected]> wrote:
> Though, I wouldn't mind if compatible entries could be passed to the
> 'new_device' file, in addition to i2c_device_ids. Yet, this needs some
> extra handling I haven't found the time for, yet.
Hm that's a way forward then I guess... but passing a compatible
string to that same file is a bit arbitrarily ambigous. So we'd rather
add a new instatiation file named new_device_of_compatible or so?
Yours,
Linus Walleij
On Mon, 02 Jun 2014, Wolfram Sang wrote:
> On Mon, Jun 02, 2014 at 02:16:59PM +0200, Linus Walleij wrote:
> > On Sat, May 31, 2014 at 3:48 PM, Wolfram Sang <[email protected]> wrote:
> > >
> > >> Right, I read the function which provides the functionality, but my
> > >> point is; I don't think my patch changes the semantics in a way which
> > >> would adversely affect this option. If you think that it does, can you
> > >> specify how please?
> > >
> > > Currently, if a driver would be DT only and does not provide a seperate
> > > i2c_device_id table, then the driver is unusable with method 4. I don't
> > > like to have some drivers being capable of it and some not.
> > >
> > >> Does the sysfs method create a i2c_device_id table? If not, how does
> > >> it probe successfully pre-patch?
> > >
> > > The sysfs method creates a device. Its name is matched against
> > > i2c_device_ids only since it does not have a node pointer for DT to be
> > > matched against.
> >
> > Is this really so useful on embedded systems?
>
> Well, this feature is at least nice with embedded:
>
> ---
>
> * You are developing a driver on a test board, where you soldered the I2C
> device yourself.
>
> ---
>
> Or during HW bringup, you this or that driver for a device (out-of-tree
> vs. in-kernel), and hey, the RTC even has an EEPROM at another address,
> let's try. Such things are the use cases I have mostly seen and those
> customers liked it.
>
> The problem is that we are talking about matching against I2C slave
> drivers. I can't see a line between embedded and non-embedded when it
> comes to slaves. They are just slaves and could be on any hardware.
> Keeping the bigger picture in mind, IMO it is cumbersome if some drivers
> support user-space instantiation and some not.
>
> Though, I wouldn't mind if compatible entries could be passed to the
> 'new_device' file, in addition to i2c_device_ids. Yet, this needs some
> extra handling I haven't found the time for, yet.
Actually, I'm just about to submit a new set.
Hopefully we cover some bases.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Am 02.06.2014 14:16, schrieb Linus Walleij:
> On Sat, May 31, 2014 at 3:48 PM, Wolfram Sang <[email protected]> wrote:
>>
>>> Right, I read the function which provides the functionality, but my
>>> point is; I don't think my patch changes the semantics in a way which
>>> would adversely affect this option. If you think that it does, can you
>>> specify how please?
>>
>> Currently, if a driver would be DT only and does not provide a seperate
>> i2c_device_id table, then the driver is unusable with method 4. I don't
>> like to have some drivers being capable of it and some not.
>>
>>> Does the sysfs method create a i2c_device_id table? If not, how does
>>> it probe successfully pre-patch?
>>
>> The sysfs method creates a device. Its name is matched against
>> i2c_device_ids only since it does not have a node pointer for DT to be
>> matched against.
>
> Is this really so useful on embedded systems?
>
> I was under the impression that this method was something used
> on say PC desktops with temperature monitors and EEPROMs
> on some I2C link on the PCB, usage entirely optional and fun
> for userspace hacks.
>
We use it for dynamic instantiating whole subsystems with multiplexers,
sensors, controllers in an embedded system. The device list is taken
from an I2C eeprom which gets read on hotplug.
KR
Michael
On Mon, Jun 2, 2014 at 4:29 PM, Michael Lawnick <[email protected]> wrote:
> Am 02.06.2014 14:16, schrieb Linus Walleij:
>> Is this really so useful on embedded systems?
>>
>> I was under the impression that this method was something used
>> on say PC desktops with temperature monitors and EEPROMs
>> on some I2C link on the PCB, usage entirely optional and fun
>> for userspace hacks.
>>
> We use it for dynamic instantiating whole subsystems with multiplexers,
> sensors, controllers in an embedded system. The device list is taken from an
> I2C eeprom which gets read on hotplug.
Does this mean that you have stored the names (strings) that are used
by the Linux kernel for identifying the devices into your EEPROM?
That means that you have made the kernel-internal device driver names
an ABI which is unfortunate :-/
This is one of the reasons to why we insist on device tree: OS neutral
hardware description.
Yours,
Linus Walleij
Am 03.06.2014 13:18, schrieb Linus Walleij:
> On Mon, Jun 2, 2014 at 4:29 PM, Michael Lawnick <[email protected]> wrote:
>> Am 02.06.2014 14:16, schrieb Linus Walleij:
>
>>> Is this really so useful on embedded systems?
>>>
>>> I was under the impression that this method was something used
>>> on say PC desktops with temperature monitors and EEPROMs
>>> on some I2C link on the PCB, usage entirely optional and fun
>>> for userspace hacks.
>>>
>> We use it for dynamic instantiating whole subsystems with multiplexers,
>> sensors, controllers in an embedded system. The device list is taken from an
>> I2C eeprom which gets read on hotplug.
>
> Does this mean that you have stored the names (strings) that are used
> by the Linux kernel for identifying the devices into your EEPROM?
>
> That means that you have made the kernel-internal device driver names
> an ABI which is unfortunate :-/
>
> This is one of the reasons to why we insist on device tree: OS neutral
> hardware description.
The eeprom contains a device tree that is dynamically merged.
KR
Michael
On Wed, Jun 4, 2014 at 8:09 AM, Michael Lawnick <[email protected]> wrote:
> Am 03.06.2014 13:18, schrieb Linus Walleij:
>> On Mon, Jun 2, 2014 at 4:29 PM, Michael Lawnick <[email protected]> wrote:
>>>
>>> Am 02.06.2014 14:16, schrieb Linus Walleij:
>>
>>
>>>> Is this really so useful on embedded systems?
>>>>
>>>> I was under the impression that this method was something used
>>>> on say PC desktops with temperature monitors and EEPROMs
>>>> on some I2C link on the PCB, usage entirely optional and fun
>>>> for userspace hacks.
>>>>
>>> We use it for dynamic instantiating whole subsystems with multiplexers,
>>> sensors, controllers in an embedded system. The device list is taken from
>>> an
>>> I2C eeprom which gets read on hotplug.
>>
>>
>> Does this mean that you have stored the names (strings) that are used
>> by the Linux kernel for identifying the devices into your EEPROM?
>>
>> That means that you have made the kernel-internal device driver names
>> an ABI which is unfortunate :-/
>>
>> This is one of the reasons to why we insist on device tree: OS neutral
>> hardware description.
>
> The eeprom contains a device tree that is dynamically merged.
That is a kind of way of saying "yes we made the kernel-internal
driver named an ABI" I guess?
Yours,
Linus Walleij
Am 12.06.2014 09:55, schrieb Linus Walleij:
> On Wed, Jun 4, 2014 at 8:09 AM, Michael Lawnick <[email protected]> wrote:
>> Am 03.06.2014 13:18, schrieb Linus Walleij:
>>> On Mon, Jun 2, 2014 at 4:29 PM, Michael Lawnick <[email protected]> wrote:
>>>>
>>>> Am 02.06.2014 14:16, schrieb Linus Walleij:
>>>
>>>
>>>>> Is this really so useful on embedded systems?
>>>>>
>>>>> I was under the impression that this method was something used
>>>>> on say PC desktops with temperature monitors and EEPROMs
>>>>> on some I2C link on the PCB, usage entirely optional and fun
>>>>> for userspace hacks.
>>>>>
>>>> We use it for dynamic instantiating whole subsystems with multiplexers,
>>>> sensors, controllers in an embedded system. The device list is taken from
>>>> an
>>>> I2C eeprom which gets read on hotplug.
>>>
>>>
>>> Does this mean that you have stored the names (strings) that are used
>>> by the Linux kernel for identifying the devices into your EEPROM?
>>>
>>> That means that you have made the kernel-internal device driver names
>>> an ABI which is unfortunate :-/
>>>
>>> This is one of the reasons to why we insist on device tree: OS neutral
>>> hardware description.
>>
>> The eeprom contains a device tree that is dynamically merged.
>
> That is a kind of way of saying "yes we made the kernel-internal
> driver named an ABI" I guess?
Sorry, I fear I don't get you. Could you please rephrase?
Of course it might be that I'm missing some fundamental idea of device
tree. The mechanism we use started with K2.6 where device tree usage on
MIPS wasn't that intensive. Anyway the original idea of removing
i2c_table now moved towards non-mandatory usage.
--
KR
Michael