[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdX3QqXGt4=31ECZ7vryjsSA7NufuvA_XVLjS91_1q=uqw@mail.gmail.com>
Date: Tue, 6 Aug 2019 09:30:10 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Javier Martinez Canillas <javierm@...hat.com>
Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>,
Wolfram Sang <wsa@...-dreams.de>,
Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
Michal Marek <michal.lkml@...kovi.net>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
Lee Jones <lee.jones@...aro.org>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH RFC] modpost: Support I2C Aliases from OF tables
On Tue, Aug 6, 2019 at 12:48 AM Javier Martinez Canillas
<javierm@...hat.com> wrote:
> On 8/1/19 4:17 AM, Masahiro Yamada wrote:
> So I think that we should either:
>
> a) take Kieran's patch or b) remove the i2c_of_match_device_sysfs() fallback
> for OF and require an I2C device table for sysfs instantiation and matching.
>
> > If a driver supports DT and devices are instantiated via DT,
> > in which situation is this useful?
>
> Is useful if you don't have all the I2C devices described in the DT. For example
> a daughterboard with an I2C device is connected to a board through an expansion
> slot or an I2C device connected directly to I2C pins exposed in a machine.
>
> In these cases your I2C devices won't be static so users might want to use the
> sysfs user-space interface to instantiate the I2C devices, i.e:
>
> # echo eeprom 0x50 > /sys/bus/i2c/devices/i2c-3/new_device
>
> as explained in https://github.com/torvalds/linux/blob/master/Documentation/i2c/instantiating-devices#L207
Does this actually work with DT names, too? E.g.
# echo atmel,24c02 > /sys/bus/i2c/devices/i2c-3/new_device
Still leaves us with legacy names for backwards compatibility.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists