From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756203AbdLVO6Q (ORCPT ); Fri, 22 Dec 2017 09:58:16 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37816 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753954AbdLVO6N (ORCPT ); Fri, 22 Dec 2017 09:58:13 -0500 Date: Fri, 22 Dec 2017 15:58:13 +0100 From: Greg Kroah-Hartman To: "H. Nikolaus Schaller" Cc: Johan Hovold , Rob Herring , Mark Rutland , =?iso-8859-1?Q?Beno=EEt?= Cousson , Tony Lindgren , Russell King , Arnd Bergmann , Kevin Hilman , Andreas =?iso-8859-1?Q?F=E4rber?= , Thierry Reding , Jonathan Cameron , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, letux-kernel@openphoenux.org, kernel@pyra-handheld.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v5 5/5] misc serdev: w2sg0004: add debugging code and Kconfig Message-ID: <20171222145813.GA28720@kroah.com> References: <5816bfb9e7cab68591c133e20696d6188ebe70de.1512114577.git.hns@goldelico.com> <20171222125150.GJ3374@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 22, 2017 at 03:41:24PM +0100, H. Nikolaus Schaller wrote: > > > Am 22.12.2017 um 13:51 schrieb Johan Hovold : > > > > On Fri, Dec 01, 2017 at 08:49:38AM +0100, H. Nikolaus Schaller wrote: > >> This allows to set CONFIG_W2SG0004_DEBUG which will > >> make the driver report more activities and it will turn on the > >> GPS module during boot while the driver assumes that it > >> is off. This can be used to debug the correct functioning of > >> the hardware. Therefore we add it as an option to the driver > >> because we think it is of general use (and a little tricky to > >> add by system testers). > >> > >> Normally it should be off. > >> > >> Signed-off-by: H. Nikolaus Schaller > >> --- > >> drivers/misc/Kconfig | 8 ++++++++ > >> drivers/misc/w2sg0004.c | 37 +++++++++++++++++++++++++++++++++++++ > >> 2 files changed, 45 insertions(+) > > > > I'd say say this does not belong in the kernel at all. > > There are other examples of such DEBUG options for drivers. > E.g. CONFIG_LIBERTAS_DEBUG. And that is wrong and should be removed. > It helps the hardware developer to test things and should of course > be disabled in a production kernel. dev_dbg() should be used instead. And you can always hard-code #define DEBUG at the top of your file when doing bringup. thanks, greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [PATCH v5 5/5] misc serdev: w2sg0004: add debugging code and Kconfig Date: Fri, 22 Dec 2017 15:58:13 +0100 Message-ID: <20171222145813.GA28720@kroah.com> References: <5816bfb9e7cab68591c133e20696d6188ebe70de.1512114577.git.hns@goldelico.com> <20171222125150.GJ3374@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: "H. Nikolaus Schaller" Cc: Johan Hovold , Rob Herring , Mark Rutland , =?iso-8859-1?Q?Beno=EEt?= Cousson , Tony Lindgren , Russell King , Arnd Bergmann , Kevin Hilman , Andreas =?iso-8859-1?Q?F=E4rber?= , Thierry Reding , Jonathan Cameron , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, letux-kernel-S0jZdbWzriLCfDggNXIi3w@public.gmane.org, kernel-Jl6IXVxNIMRxAtABVqVhTwC/G2K4zDHf@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org On Fri, Dec 22, 2017 at 03:41:24PM +0100, H. Nikolaus Schaller wrote: > > > Am 22.12.2017 um 13:51 schrieb Johan Hovold : > > > > On Fri, Dec 01, 2017 at 08:49:38AM +0100, H. Nikolaus Schaller wrote: > >> This allows to set CONFIG_W2SG0004_DEBUG which will > >> make the driver report more activities and it will turn on the > >> GPS module during boot while the driver assumes that it > >> is off. This can be used to debug the correct functioning of > >> the hardware. Therefore we add it as an option to the driver > >> because we think it is of general use (and a little tricky to > >> add by system testers). > >> > >> Normally it should be off. > >> > >> Signed-off-by: H. Nikolaus Schaller > >> --- > >> drivers/misc/Kconfig | 8 ++++++++ > >> drivers/misc/w2sg0004.c | 37 +++++++++++++++++++++++++++++++++++++ > >> 2 files changed, 45 insertions(+) > > > > I'd say say this does not belong in the kernel at all. > > There are other examples of such DEBUG options for drivers. > E.g. CONFIG_LIBERTAS_DEBUG. And that is wrong and should be removed. > It helps the hardware developer to test things and should of course > be disabled in a production kernel. dev_dbg() should be used instead. And you can always hard-code #define DEBUG at the top of your file when doing bringup. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: gregkh@linuxfoundation.org (Greg Kroah-Hartman) Date: Fri, 22 Dec 2017 15:58:13 +0100 Subject: [PATCH v5 5/5] misc serdev: w2sg0004: add debugging code and Kconfig In-Reply-To: References: <5816bfb9e7cab68591c133e20696d6188ebe70de.1512114577.git.hns@goldelico.com> <20171222125150.GJ3374@localhost> Message-ID: <20171222145813.GA28720@kroah.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Dec 22, 2017 at 03:41:24PM +0100, H. Nikolaus Schaller wrote: > > > Am 22.12.2017 um 13:51 schrieb Johan Hovold : > > > > On Fri, Dec 01, 2017 at 08:49:38AM +0100, H. Nikolaus Schaller wrote: > >> This allows to set CONFIG_W2SG0004_DEBUG which will > >> make the driver report more activities and it will turn on the > >> GPS module during boot while the driver assumes that it > >> is off. This can be used to debug the correct functioning of > >> the hardware. Therefore we add it as an option to the driver > >> because we think it is of general use (and a little tricky to > >> add by system testers). > >> > >> Normally it should be off. > >> > >> Signed-off-by: H. Nikolaus Schaller > >> --- > >> drivers/misc/Kconfig | 8 ++++++++ > >> drivers/misc/w2sg0004.c | 37 +++++++++++++++++++++++++++++++++++++ > >> 2 files changed, 45 insertions(+) > > > > I'd say say this does not belong in the kernel at all. > > There are other examples of such DEBUG options for drivers. > E.g. CONFIG_LIBERTAS_DEBUG. And that is wrong and should be removed. > It helps the hardware developer to test things and should of course > be disabled in a production kernel. dev_dbg() should be used instead. And you can always hard-code #define DEBUG at the top of your file when doing bringup. thanks, greg k-h