From: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
To: Michal Suchanek <hramrach-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
Kees Cook <keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
Dan Williams
<dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Paul E. McKenney"
<paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
Davidlohr Bueso <dave-h16yJtLeMjHk1uMJSBkQmQ@public.gmane.org>,
Andrey Ryabinin
<aryabinin-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org>,
Nikolay Aleksandrov
<nikolay-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>,
Dmitry Vyukov <dvyukov-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
Adrien Schildknecht
<adrien+dev-Yk6CzqVXkG6lnMjI0IkVqw@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 3/3] drivers core: allow id match override when manually binding driver
Date: Sun, 26 Jun 2016 11:28:12 -0700 [thread overview]
Message-ID: <20160626182811.GA20461@kroah.com> (raw)
In-Reply-To: <5e0397742f887f656d67bb0d61c8e10782c0e5af.1466696079.git.hramrach-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Thu, Jun 23, 2016 at 05:41:20PM -0000, Michal Suchanek wrote:
> This allows binding spidev on any slave device by hand using sysfs
> without adding superfluous compatibles or any other needless
> complication.
>
> Note that any slave driver that requires configuration will fail to
> probe anyway. Only a driver that binds to anything can be bound
> successfully.
>
> Signed-off-by: Michal Suchanek <hramrach-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/base/Kconfig.debug | 14 +++++++++
> drivers/base/bus.c | 72 +++++++++++++++++++++++++++++++++++++++++++++-
> lib/Kconfig.debug | 2 ++
> 3 files changed, 87 insertions(+), 1 deletion(-)
> create mode 100644 drivers/base/Kconfig.debug
>
> diff --git a/drivers/base/Kconfig.debug b/drivers/base/Kconfig.debug
> new file mode 100644
> index 0000000..e21d3cc
> --- /dev/null
> +++ b/drivers/base/Kconfig.debug
> @@ -0,0 +1,14 @@
> +menuconfig DRIVER_MATCH_OVERRIDE
> + bool "Allow manual driver binding to override id match (DANGEROUS)"
> + default n
> + help
> + When binding a driver manually bypass the check of driver id table
> + against device id in driver core. This can be useful for development
> + or on buses that don't provide reliable device identification.
Ick, no no no. Why would you ever want to let this happen? If you
really want to override the check, just write things to the 'bind' file
in sysfs, that will skip the driver id check entirely, right?
> +
> +config DRIVER_MATCH_OVERRIDE_BUSES
> + string "Specify buses for which id matching will be overridden"
> + default "spi"
> + depends on DRIVER_MATCH_OVERRIDE
> + help
> + space separated bus names
Gotta love parsers of config items :(
Again, please no.
greg k-h
--
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
WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Michal Suchanek <hramrach@gmail.com>
Cc: Mark Brown <broonie@kernel.org>, Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Kees Cook <keescook@chromium.org>,
Thomas Gleixner <tglx@linutronix.de>,
Dan Williams <dan.j.williams@intel.com>,
Tejun Heo <tj@kernel.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
Nikolay Aleksandrov <nikolay@cumulusnetworks.com>,
Dmitry Vyukov <dvyukov@google.com>,
Adrien Schildknecht <adrien+dev@schischi.me>,
linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org
Subject: Re: [PATCH 3/3] drivers core: allow id match override when manually binding driver
Date: Sun, 26 Jun 2016 11:28:12 -0700 [thread overview]
Message-ID: <20160626182811.GA20461@kroah.com> (raw)
In-Reply-To: <5e0397742f887f656d67bb0d61c8e10782c0e5af.1466696079.git.hramrach@gmail.com>
On Thu, Jun 23, 2016 at 05:41:20PM -0000, Michal Suchanek wrote:
> This allows binding spidev on any slave device by hand using sysfs
> without adding superfluous compatibles or any other needless
> complication.
>
> Note that any slave driver that requires configuration will fail to
> probe anyway. Only a driver that binds to anything can be bound
> successfully.
>
> Signed-off-by: Michal Suchanek <hramrach@gmail.com>
> ---
> drivers/base/Kconfig.debug | 14 +++++++++
> drivers/base/bus.c | 72 +++++++++++++++++++++++++++++++++++++++++++++-
> lib/Kconfig.debug | 2 ++
> 3 files changed, 87 insertions(+), 1 deletion(-)
> create mode 100644 drivers/base/Kconfig.debug
>
> diff --git a/drivers/base/Kconfig.debug b/drivers/base/Kconfig.debug
> new file mode 100644
> index 0000000..e21d3cc
> --- /dev/null
> +++ b/drivers/base/Kconfig.debug
> @@ -0,0 +1,14 @@
> +menuconfig DRIVER_MATCH_OVERRIDE
> + bool "Allow manual driver binding to override id match (DANGEROUS)"
> + default n
> + help
> + When binding a driver manually bypass the check of driver id table
> + against device id in driver core. This can be useful for development
> + or on buses that don't provide reliable device identification.
Ick, no no no. Why would you ever want to let this happen? If you
really want to override the check, just write things to the 'bind' file
in sysfs, that will skip the driver id check entirely, right?
> +
> +config DRIVER_MATCH_OVERRIDE_BUSES
> + string "Specify buses for which id matching will be overridden"
> + default "spi"
> + depends on DRIVER_MATCH_OVERRIDE
> + help
> + space separated bus names
Gotta love parsers of config items :(
Again, please no.
greg k-h
next prev parent reply other threads:[~2016-06-26 18:28 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-24 14:20 [PATCH 0/3] Another stab at making spidev usable with devicetree Michal Suchanek
2016-06-24 14:20 ` Michal Suchanek
2016-06-24 14:20 ` [PATCH 1/3] spi: spidev: fix the check for spidev in dt Michal Suchanek
2016-06-26 1:09 ` Mark Brown
[not found] ` <20160626010909.GD28202-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-06-26 1:56 ` Michal Suchanek
2016-06-26 1:56 ` Michal Suchanek
[not found] ` <8b66102e44829c5dc445c17f7bfad1050840b9f0.1466696079.git.hramrach-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-26 1:13 ` Mark Brown
2016-06-26 1:13 ` Mark Brown
[not found] ` <20160626011315.GE28202-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-06-26 2:12 ` Michal Suchanek
2016-06-26 2:12 ` Michal Suchanek
[not found] ` <CAOMqctR3MDijTSr0=7tiHK+exygrGLbLQQ=GF_KAH-Y2xvb1Nw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-26 11:05 ` Mark Brown
2016-06-26 11:05 ` Mark Brown
2016-06-24 14:20 ` [PATCH 2/3] spi: of: allow instantiating slaves without a driver Michal Suchanek
[not found] ` <ebe2a48124441819adab773b28cd12425ba5bda4.1466696079.git.hramrach-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-26 1:15 ` Mark Brown
2016-06-26 1:15 ` Mark Brown
[not found] ` <20160626011500.GF28202-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-06-26 2:23 ` Michal Suchanek
2016-06-26 2:23 ` Michal Suchanek
[not found] ` <CAOMqctSA0G+fBKNgAizqWvEUfJLr9Fh0SsN0Pn-cQv=zeu7iFg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-26 11:21 ` Mark Brown
2016-06-26 11:21 ` Mark Brown
2016-06-26 11:35 ` Michal Suchanek
2016-06-26 11:58 ` Mark Brown
[not found] ` <20160626115815.GN28202-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-06-26 12:39 ` Michal Suchanek
2016-06-26 12:39 ` Michal Suchanek
[not found] ` <CAOMqctTf16DDs1j+pL47xBJt2BVdCdHPFUEwaZ6ak_vFtrKBOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-26 12:45 ` Mark Brown
2016-06-26 12:45 ` Mark Brown
2016-06-26 12:53 ` Michal Suchanek
[not found] ` <CAOMqctRrz7KZ0RFFnE4kW=Kst9ha6QAj2ZVkirSjuDXpZHqSDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-26 12:57 ` Mark Brown
2016-06-26 12:57 ` Mark Brown
[not found] ` <20160626125717.GQ28202-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-06-26 15:19 ` Michal Suchanek
2016-06-26 15:19 ` Michal Suchanek
[not found] ` <CAOMqctQpr4A6_bS_+G9DQdcxcYkPHxntX_vUPBCoZN8FxHOxzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-26 17:25 ` Mark Brown
2016-06-26 17:25 ` Mark Brown
2016-06-24 14:20 ` [PATCH 3/3] drivers core: allow id match override when manually binding driver Michal Suchanek
[not found] ` <5e0397742f887f656d67bb0d61c8e10782c0e5af.1466696079.git.hramrach-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-26 1:17 ` Mark Brown
2016-06-26 1:17 ` Mark Brown
2016-06-26 18:28 ` Greg Kroah-Hartman [this message]
2016-06-26 18:28 ` Greg Kroah-Hartman
[not found] ` <20160626182811.GA20461-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2016-06-26 19:07 ` Michal Suchanek
2016-06-26 19:07 ` Michal Suchanek
[not found] ` <CAOMqctSJjvyknkTjHZbfbt8nh0Eo_oc9LTonjZGUmwP5b8gWDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-27 19:09 ` Greg Kroah-Hartman
2016-06-27 19:09 ` Greg Kroah-Hartman
2016-06-26 4:14 ` Dan Williams
[not found] ` <CAPcyv4jxU2oBTk-MzH7fepu0zXnTZsAdLbY8eOvpOvZOq_QaRw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-26 6:44 ` Michal Suchanek
2016-06-26 6:44 ` Michal Suchanek
[not found] ` <CAOMqctRZ41f3Oiz0uvkyyxsaaM5cs8jdNGS0j5WEwoWaesHnTw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-26 9:26 ` Geert Uytterhoeven
2016-06-26 9:26 ` Geert Uytterhoeven
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=20160626182811.GA20461@kroah.com \
--to=gregkh-hqyy1w1ycw8ekmwlsbkhg0b+6bgklq7r@public.gmane.org \
--cc=adrien+dev-Yk6CzqVXkG6lnMjI0IkVqw@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=aryabinin-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=dave-h16yJtLeMjHk1uMJSBkQmQ@public.gmane.org \
--cc=dvyukov-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=hramrach-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=nikolay-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org \
--cc=paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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.