From: Javier Martinez Canillas <javier@osg.samsung.com>
To: Mark Brown <broonie@kernel.org>,
Brian Norris <computersforpeace@gmail.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
linux-mtd@lists.infradead.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org
Subject: Re: spi: OF module autoloading is still broken
Date: Mon, 16 Nov 2015 14:26:49 -0300 [thread overview]
Message-ID: <564A11D9.80109@osg.samsung.com> (raw)
In-Reply-To: <20151116135342.GD31303@sirena.org.uk>
Hello Mark,
On 11/16/2015 10:53 AM, Mark Brown wrote:
> On Fri, Nov 13, 2015 at 03:48:57PM -0800, Brian Norris wrote:
>
>> I suspect we'll have to fully support both spi_device_id tables (fully
>> supported already; if nothing else, to keep wildcard matching) and
>> of_match_tables (not fully supported for module loading), and in some
>> cases, the two will have to stay partially in sync.
>
> What I don't really understand here is why we've decided to push all
> this stuff into the subsystems, it seems like if we're managing to do
> the matching based on the compatible we really ought to be able to have
> the core figure out the uevents for us too. I need to go have a look at
> that...
>
There is already a set of generic OF uevents that are reported by the core
but IIUC those are not used by udev. Please take a look to of_device_uevent()
in drivers/of/device.c and dev_uevent() that calls it in drivers/base/core.c.
Now, if the different struct bus_type .uevent handlers could be factored out
to have a common helper or be deleted completely and handled by the core
instead, that is a very good question.
To be honest I haven't looked at this possibility and I'm not that familiar
with the device model. But in any case I believe that modifying spi_uevent()
to behave as other subsystems and properly report an OF based modalias is
a step in the right direction. We can later identify the common logic and
move all the bus_type modalias reporting to the core as a follow up IMHO.
But of course if up to you to decide :)
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
WARNING: multiple messages have this Message-ID (diff)
From: Javier Martinez Canillas <javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Brian Norris
<computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Heiner Kallweit
<hkallweit1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Dmitry Torokhov
<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: spi: OF module autoloading is still broken
Date: Mon, 16 Nov 2015 14:26:49 -0300 [thread overview]
Message-ID: <564A11D9.80109@osg.samsung.com> (raw)
In-Reply-To: <20151116135342.GD31303-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
Hello Mark,
On 11/16/2015 10:53 AM, Mark Brown wrote:
> On Fri, Nov 13, 2015 at 03:48:57PM -0800, Brian Norris wrote:
>
>> I suspect we'll have to fully support both spi_device_id tables (fully
>> supported already; if nothing else, to keep wildcard matching) and
>> of_match_tables (not fully supported for module loading), and in some
>> cases, the two will have to stay partially in sync.
>
> What I don't really understand here is why we've decided to push all
> this stuff into the subsystems, it seems like if we're managing to do
> the matching based on the compatible we really ought to be able to have
> the core figure out the uevents for us too. I need to go have a look at
> that...
>
There is already a set of generic OF uevents that are reported by the core
but IIUC those are not used by udev. Please take a look to of_device_uevent()
in drivers/of/device.c and dev_uevent() that calls it in drivers/base/core.c.
Now, if the different struct bus_type .uevent handlers could be factored out
to have a common helper or be deleted completely and handled by the core
instead, that is a very good question.
To be honest I haven't looked at this possibility and I'm not that familiar
with the device model. But in any case I believe that modifying spi_uevent()
to behave as other subsystems and properly report an OF based modalias is
a step in the right direction. We can later identify the common logic and
move all the bus_type modalias reporting to the core as a follow up IMHO.
But of course if up to you to decide :)
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-11-16 17:27 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-03 21:54 m25p80: Commit "allow arbitrary OF matching for "jedec,spi-nor"" breaks module autoloading Heiner Kallweit
2015-11-12 18:59 ` m25p80: Commit "allow arbitrary OF matching for "jedec, spi-nor"" " Brian Norris
2015-11-12 18:59 ` m25p80: Commit "allow arbitrary OF matching for "jedec,spi-nor"" " Brian Norris
2015-11-12 18:59 ` Brian Norris
2015-11-13 19:40 ` spi: OF module autoloading is still broken (was: Re: m25p80: Commit "allow arbitrary OF matching for "jedec,spi-nor"" breaks module autoloading) Brian Norris
2015-11-13 19:40 ` Brian Norris
2015-11-13 22:12 ` Mark Brown
2015-11-13 22:12 ` Mark Brown
2015-11-13 22:51 ` Brian Norris
2015-11-13 23:14 ` Mark Brown
2015-11-13 23:14 ` Mark Brown
2015-11-13 23:48 ` Brian Norris
2015-11-13 23:48 ` Brian Norris
2015-11-16 13:53 ` Mark Brown
2015-11-16 13:53 ` Mark Brown
2015-11-16 17:26 ` Javier Martinez Canillas [this message]
2015-11-16 17:26 ` spi: OF module autoloading is still broken Javier Martinez Canillas
2015-11-16 17:51 ` Mark Brown
2015-11-16 17:51 ` Mark Brown
2015-11-16 18:00 ` Javier Martinez Canillas
2015-11-16 18:00 ` Javier Martinez Canillas
2015-11-16 17:19 ` Javier Martinez Canillas
2015-11-16 17:19 ` Javier Martinez Canillas
2015-11-16 17:49 ` Mark Brown
2015-11-16 17:49 ` Mark Brown
2015-11-16 17:57 ` Javier Martinez Canillas
2015-11-16 17:57 ` Javier Martinez Canillas
2015-11-16 19:24 ` Brian Norris
2015-11-16 19:24 ` Brian Norris
2015-11-16 20:00 ` Javier Martinez Canillas
2015-11-16 20:00 ` Javier Martinez Canillas
2015-11-16 20:47 ` Brian Norris
2015-11-16 20:47 ` Brian Norris
2015-11-16 21:32 ` Javier Martinez Canillas
2015-11-16 21:51 ` Brian Norris
2015-11-16 21:51 ` Brian Norris
2015-11-17 13:14 ` Javier Martinez Canillas
2015-11-17 13:14 ` Javier Martinez Canillas
2015-11-17 13:19 ` Mark Brown
2015-11-17 13:19 ` Mark Brown
2015-11-17 13:36 ` Javier Martinez Canillas
2015-11-18 20:07 ` Javier Martinez Canillas
2015-11-18 20:07 ` Javier Martinez Canillas
2015-11-19 12:47 ` Javier Martinez Canillas
2015-11-17 13:34 ` Mark Brown
2015-11-17 13:34 ` Mark Brown
2015-11-17 13:38 ` Javier Martinez Canillas
2015-11-17 13:38 ` Javier Martinez Canillas
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=564A11D9.80109@osg.samsung.com \
--to=javier@osg.samsung.com \
--cc=broonie@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.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 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.