From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752190AbcF0TJU (ORCPT ); Mon, 27 Jun 2016 15:09:20 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49785 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751936AbcF0TJQ (ORCPT ); Mon, 27 Jun 2016 15:09:16 -0400 Date: Mon, 27 Jun 2016 12:09:15 -0700 From: Greg Kroah-Hartman To: Michal Suchanek Cc: Mark Brown , Ingo Molnar , Andrew Morton , Kees Cook , Thomas Gleixner , Dan Williams , Tejun Heo , "Paul E. McKenney" , Davidlohr Bueso , Andrey Ryabinin , Nikolay Aleksandrov , Dmitry Vyukov , Adrien Schildknecht , Linux Kernel Mailing List , linux-spi Subject: Re: [PATCH 3/3] drivers core: allow id match override when manually binding driver Message-ID: <20160627190915.GA5111@kroah.com> References: <5e0397742f887f656d67bb0d61c8e10782c0e5af.1466696079.git.hramrach@gmail.com> <20160626182811.GA20461@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 26, 2016 at 09:07:08PM +0200, Michal Suchanek wrote: > On 26 June 2016 at 20:28, Greg Kroah-Hartman wrote: > > 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 > >> --- > >> 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? > > Well, it does not. Hence this patch which enables skipping the check. > It's the whole point of it. Then write the id you wish to use for that driver to the new_id file for that driver. Doesn't that work? thanks, greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [PATCH 3/3] drivers core: allow id match override when manually binding driver Date: Mon, 27 Jun 2016 12:09:15 -0700 Message-ID: <20160627190915.GA5111@kroah.com> References: <5e0397742f887f656d67bb0d61c8e10782c0e5af.1466696079.git.hramrach@gmail.com> <20160626182811.GA20461@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Mark Brown , Ingo Molnar , Andrew Morton , Kees Cook , Thomas Gleixner , Dan Williams , Tejun Heo , "Paul E. McKenney" , Davidlohr Bueso , Andrey Ryabinin , Nikolay Aleksandrov , Dmitry Vyukov , Adrien Schildknecht , Linux Kernel Mailing List , linux-spi To: Michal Suchanek Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-spi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: On Sun, Jun 26, 2016 at 09:07:08PM +0200, Michal Suchanek wrote: > On 26 June 2016 at 20:28, Greg Kroah-Hartman wrote: > > 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 > >> --- > >> 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? > > Well, it does not. Hence this patch which enables skipping the check. > It's the whole point of it. Then write the id you wish to use for that driver to the new_id file for that driver. Doesn't that work? thanks, 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