All of lore.kernel.org
 help / color / mirror / Atom feed
From: Courtney Cavin <courtney.cavin@sonymobile.com>
To: linux-input@vger.kernel.org
Cc: dmitry.torokhov@gmail.com, cheiny@synaptics.com
Subject: [PATCH 07/15] Input: synaptics-rmi4 - remove remaining debugfs code
Date: Thu, 23 Jan 2014 16:00:15 -0800	[thread overview]
Message-ID: <1390521623-6491-8-git-send-email-courtney.cavin@sonymobile.com> (raw)
In-Reply-To: <1390521623-6491-7-git-send-email-courtney.cavin@sonymobile.com>

As most of this code was already removed, the remainder does nothing.
Remove it.

Cc: Christopher Heiny <cheiny@synaptics.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Courtney Cavin <courtney.cavin@sonymobile.com>
---
 drivers/input/rmi4/Kconfig      |   1 -
 drivers/input/rmi4/rmi_bus.c    | 103 ----------------------------------------
 drivers/input/rmi4/rmi_bus.h    |  12 -----
 drivers/input/rmi4/rmi_driver.c |   3 --
 drivers/input/rmi4/rmi_driver.h |  12 -----
 drivers/input/rmi4/rmi_f11.c    |   2 +-
 include/linux/rmi.h             |   7 ++-
 7 files changed, 4 insertions(+), 136 deletions(-)

diff --git a/drivers/input/rmi4/Kconfig b/drivers/input/rmi4/Kconfig
index d0c7b6e..22d5599 100644
--- a/drivers/input/rmi4/Kconfig
+++ b/drivers/input/rmi4/Kconfig
@@ -14,7 +14,6 @@ config RMI4_CORE
 config RMI4_DEBUG
 	bool "RMI4 Debugging"
 	depends on RMI4_CORE
-	select DEBUG_FS
 	help
 	  Say Y here to enable debug feature in the RMI4 driver.
 
diff --git a/drivers/input/rmi4/rmi_bus.c b/drivers/input/rmi4/rmi_bus.c
index fd14acb..a51e6b4 100644
--- a/drivers/input/rmi4/rmi_bus.c
+++ b/drivers/input/rmi4/rmi_bus.c
@@ -15,14 +15,9 @@
 #include <linux/rmi.h>
 #include <linux/slab.h>
 #include <linux/types.h>
-#include <linux/debugfs.h>
 #include "rmi_bus.h"
 #include "rmi_driver.h"
 
-#ifdef CONFIG_RMI4_DEBUG
-static struct dentry *rmi_debugfs_root;
-#endif
-
 /*
  * RMI Physical devices
  *
@@ -47,34 +42,6 @@ bool rmi_is_physical_device(struct device *dev)
 	return dev->type == &rmi_device_type;
 }
 
-#ifdef CONFIG_RMI4_DEBUG
-
-static void rmi_physical_setup_debugfs(struct rmi_device *rmi_dev)
-{
-	rmi_dev->debugfs_root = debugfs_create_dir(dev_name(&rmi_dev->dev),
-						   rmi_debugfs_root);
-	if (!rmi_dev->debugfs_root)
-		dev_warn(&rmi_dev->dev, "Failed to create debugfs root.\n");
-}
-
-static void rmi_physical_teardown_debugfs(struct rmi_device *rmi_dev)
-{
-	if (rmi_dev->debugfs_root)
-		debugfs_remove_recursive(rmi_dev->debugfs_root);
-}
-
-#else
-
-static void rmi_physical_setup_debugfs(struct rmi_device *rmi_dev)
-{
-}
-
-static void rmi_physical_teardown_debugfs(struct rmi_device *rmi_dev)
-{
-}
-
-#endif
-
 /**
  * rmi_register_transport_device - register a transport device connection
  * on the RMI bus.  Transport drivers provide communication from the devices
@@ -108,8 +75,6 @@ int rmi_register_transport_device(struct rmi_transport_dev *xport)
 
 	xport->rmi_dev = rmi_dev;
 
-	rmi_physical_setup_debugfs(rmi_dev);
-
 	error = device_register(&rmi_dev->dev);
 	if (error) {
 		put_device(&rmi_dev->dev);
@@ -132,7 +97,6 @@ void rmi_unregister_transport_device(struct rmi_transport_dev *xport)
 {
 	struct rmi_device *rmi_dev = xport->rmi_dev;
 
-	rmi_physical_teardown_debugfs(rmi_dev);
 	device_unregister(&rmi_dev->dev);
 }
 EXPORT_SYMBOL(rmi_unregister_transport_device);
@@ -156,37 +120,6 @@ bool rmi_is_function_device(struct device *dev)
 	return dev->type == &rmi_function_type;
 }
 
-#ifdef CONFIG_RMI4_DEBUG
-
-static void rmi_function_setup_debugfs(struct rmi_function *fn)
-{
-	char dirname[12];
-
-	snprintf(dirname, sizeof(dirname), "F%02X", fn->fd.function_number);
-	fn->debugfs_root = debugfs_create_dir(dirname,
-					      fn->rmi_dev->debugfs_root);
-	if (!fn->debugfs_root)
-		dev_warn(&fn->dev, "Failed to create debugfs dir.\n");
-}
-
-static void rmi_function_teardown_debugfs(struct rmi_function *fn)
-{
-	if (fn->debugfs_root)
-		debugfs_remove_recursive(fn->debugfs_root);
-}
-
-#else
-
-static void rmi_function_setup_debugfs(struct rmi_function *fn)
-{
-}
-
-static void rmi_function_teardown_debugfs(struct rmi_function *fn)
-{
-}
-
-#endif
-
 static int rmi_function_match(struct device *dev, struct device_driver *drv)
 {
 	struct rmi_function_handler *handler = to_rmi_function_handler(drv);
@@ -234,8 +167,6 @@ int rmi_register_function(struct rmi_function *fn)
 	fn->dev.type = &rmi_function_type;
 	fn->dev.bus = &rmi_bus_type;
 
-	rmi_function_setup_debugfs(fn);
-
 	error = device_register(&fn->dev);
 	if (error) {
 		dev_err(&rmi_dev->dev,
@@ -250,13 +181,11 @@ int rmi_register_function(struct rmi_function *fn)
 	return 0;
 
 error_exit:
-	rmi_function_teardown_debugfs(fn);
 	return error;
 }
 
 void rmi_unregister_function(struct rmi_function *fn)
 {
-	rmi_function_teardown_debugfs(fn);
 	device_unregister(&fn->dev);
 }
 
@@ -325,34 +254,6 @@ struct bus_type rmi_bus_type = {
 	.name		= "rmi",
 };
 
-#ifdef CONFIG_RMI4_DEBUG
-
-static void rmi_bus_setup_debugfs(void)
-{
-	rmi_debugfs_root = debugfs_create_dir(rmi_bus_type.name, NULL);
-	if (!rmi_debugfs_root)
-		pr_err("%s: Failed to create debugfs root\n",
-		       __func__);
-}
-
-static void rmi_bus_teardown_debugfs(void)
-{
-	if (rmi_debugfs_root)
-		debugfs_remove_recursive(rmi_debugfs_root);
-}
-
-#else
-
-static void rmi_bus_setup_debugfs(void)
-{
-}
-
-static void rmi_bus_teardown_debugfs(void)
-{
-}
-
-#endif
-
 static int __init rmi_bus_init(void)
 {
 	int error;
@@ -364,8 +265,6 @@ static int __init rmi_bus_init(void)
 		return error;
 	}
 
-	rmi_bus_setup_debugfs();
-
 	error = rmi_register_f01_handler();
 	if (error) {
 		pr_err("%s: error registering the RMI F01 handler: %d\n",
@@ -385,7 +284,6 @@ static int __init rmi_bus_init(void)
 err_unregister_f01:
 	rmi_unregister_f01_handler();
 err_unregister_bus:
-	rmi_bus_teardown_debugfs();
 	bus_unregister(&rmi_bus_type);
 	return error;
 }
@@ -400,7 +298,6 @@ static void __exit rmi_bus_exit(void)
 
 	rmi_unregister_physical_driver();
 	rmi_unregister_f01_handler();
-	rmi_bus_teardown_debugfs();
 	bus_unregister(&rmi_bus_type);
 }
 module_exit(rmi_bus_exit);
diff --git a/drivers/input/rmi4/rmi_bus.h b/drivers/input/rmi4/rmi_bus.h
index 2bad2ed..62fd544 100644
--- a/drivers/input/rmi4/rmi_bus.h
+++ b/drivers/input/rmi4/rmi_bus.h
@@ -19,7 +19,6 @@
 #include <linux/stat.h>
 #include <linux/types.h>
 #include <linux/wait.h>
-#include <linux/debugfs.h>
 #include <linux/rmi.h>
 
 struct rmi_device;
@@ -39,7 +38,6 @@ struct rmi_device;
  * @data: Private data pointer
  *
  * @node: entry in device's list of functions
- * @debugfs_root: used during debugging
  */
 struct rmi_function {
 	struct rmi_function_descriptor fd;
@@ -50,10 +48,6 @@ struct rmi_function {
 	unsigned long *irq_mask;
 	void *data;
 	struct list_head node;
-
-#ifdef CONFIG_RMI4_DEBUG
-	struct dentry *debugfs_root;
-#endif
 };
 
 #define to_rmi_function(d)	container_of(d, struct rmi_function, dev)
@@ -208,8 +202,6 @@ struct rmi_transport_ops {
  * @number: Unique number for the device on the bus.
  * @driver: Pointer to associated driver
  * @xport: Pointer to the transport interface
- * @debugfs_root: base for this particular sensor device.
- *
  */
 struct rmi_device {
 	struct device dev;
@@ -217,10 +209,6 @@ struct rmi_device {
 
 	struct rmi_driver *driver;
 	struct rmi_transport_dev *xport;
-
-#ifdef CONFIG_RMI4_DEBUG
-	struct dentry *debugfs_root;
-#endif
 };
 
 #define to_rmi_device(d) container_of(d, struct rmi_device, dev)
diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
index 691b6fb..e44eff7 100644
--- a/drivers/input/rmi4/rmi_driver.c
+++ b/drivers/input/rmi4/rmi_driver.c
@@ -16,7 +16,6 @@
 
 #include <linux/kernel.h>
 #include <linux/bitmap.h>
-#include <linux/debugfs.h>
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/fs.h>
@@ -42,8 +41,6 @@
 
 #define DEFAULT_POLL_INTERVAL_MS	13
 
-#define IRQ_DEBUG(data) (IS_ENABLED(CONFIG_RMI4_DEBUG) && data->irq_debug)
-
 static irqreturn_t rmi_irq_thread(int irq, void *p)
 {
 	struct rmi_transport_dev *xport = p;
diff --git a/drivers/input/rmi4/rmi_driver.h b/drivers/input/rmi4/rmi_driver.h
index f28166f..eafbdb3 100644
--- a/drivers/input/rmi4/rmi_driver.h
+++ b/drivers/input/rmi4/rmi_driver.h
@@ -38,7 +38,6 @@ struct rmi_driver_data {
 	bool f01_bootloader_mode;
 
 	u32 attn_count;
-	u32 irq_debug;	/* Should be bool, but debugfs wants u32 */
 	int irq;
 	int num_of_irq_regs;
 	int irq_count;
@@ -54,17 +53,6 @@ struct rmi_driver_data {
 
 	bool enabled;
 
-#ifdef CONFIG_RMI4_DEBUG
-	struct dentry *debugfs_delay;
-	struct dentry *debugfs_xport;
-	struct dentry *debugfs_reg_ctl;
-	struct dentry *debugfs_reg;
-	struct dentry *debugfs_irq;
-	struct dentry *debugfs_attn_count;
-	u16 reg_debug_addr;
-	u8 reg_debug_size;
-#endif
-
 	void *data;
 };
 
diff --git a/drivers/input/rmi4/rmi_f11.c b/drivers/input/rmi4/rmi_f11.c
index 553afd8..87d85ab 100644
--- a/drivers/input/rmi4/rmi_f11.c
+++ b/drivers/input/rmi4/rmi_f11.c
@@ -515,7 +515,7 @@ struct f11_2d_sensor {
 	u8 *data_pkt;
 	int pkt_size;
 	u8 sensor_index;
-	u32 type_a;	/* boolean but debugfs API requires u32 */
+	bool type_a;
 	enum rmi_f11_sensor_type sensor_type;
 	struct input_dev *input;
 	struct input_dev *mouse_input;
diff --git a/include/linux/rmi.h b/include/linux/rmi.h
index 41c2c04..f3775eb 100644
--- a/include/linux/rmi.h
+++ b/include/linux/rmi.h
@@ -21,7 +21,6 @@
 #include <linux/stat.h>
 #include <linux/types.h>
 #include <linux/wait.h>
-#include <linux/debugfs.h>
 
 /**
  * struct rmi_f11_axis_alignment - target axis alignment
@@ -42,9 +41,9 @@
  *               automatically enabled for this sensor.
  */
 struct rmi_f11_2d_axis_alignment {
-	u32 swap_axes;	/* boolean, but u32 is needed by debugfs API */
-	u32 flip_x;	/* boolean */
-	u32 flip_y;	/* boolean */
+	bool swap_axes;
+	bool flip_x;
+	bool flip_y;
 	u16 clip_x_low;
 	u16 clip_y_low;
 	u16 clip_x_high;
-- 
1.8.1.5


  reply	other threads:[~2014-01-23 23:59 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-24  0:00 [PATCH 00/15] Input: synaptics-rmi4 - cleanup and add DT support Courtney Cavin
2014-01-24  0:00 ` [PATCH 01/15] Input: synaptics-rmi4 - fix checkpatch.pl, sparse and GCC warnings Courtney Cavin
2014-01-24  0:00   ` [PATCH 02/15] Input: synaptics-rmi4 - don't kfree devm_ alloced memory Courtney Cavin
2014-01-24  0:00     ` [PATCH 03/15] Input: synaptics-rmi4 - don't free devices directly Courtney Cavin
2014-01-24  0:00       ` [PATCH 04/15] Input: synaptics-rmi4 - remove sensor name from platform data Courtney Cavin
2014-01-24  0:00         ` [PATCH 05/15] Input: synaptics-rmi4 - remove gpio handling and polling Courtney Cavin
2014-01-24  0:00           ` [PATCH 06/15] Input: synaptics-rmi4 - remove platform suspend callbacks Courtney Cavin
2014-01-24  0:00             ` Courtney Cavin [this message]
2014-01-24  0:00               ` [PATCH 08/15] Input: synaptics-rmi4 - cleanup platform data Courtney Cavin
2014-01-24  0:00                 ` [PATCH 09/15] Input: synaptics-rmi4 - remove unused defines and variables Courtney Cavin
2014-01-24  0:00                   ` [PATCH 10/15] Input: synaptics-rmi4 - add devicetree support Courtney Cavin
2014-01-24  0:00                     ` [PATCH 11/15] Input: synaptics-rmi4 - add regulator support Courtney Cavin
2014-01-24  0:00                       ` [PATCH 12/15] Input: synaptics-rmi4 - don't immediately set page on probe Courtney Cavin
2014-01-24  0:00                         ` [PATCH 13/15] Input: synaptics-rmi4 - properly set F01 container on PDT scan Courtney Cavin
2014-01-24  0:00                           ` [PATCH 14/15] Input: synaptics-rmi4 - ensure we have IRQs before reading status Courtney Cavin
2014-01-24  0:00                             ` [PATCH 15/15] Input: synaptics-rmi4 - correct RMI4 spec url Courtney Cavin
2014-02-04 23:10                               ` Christopher Heiny
2014-02-06  1:14                                 ` Dmitry Torokhov
2014-02-04 23:10                             ` [PATCH 14/15] Input: synaptics-rmi4 - ensure we have IRQs before reading status Christopher Heiny
2014-02-05  2:40                               ` Courtney Cavin
2014-02-04 23:10                           ` [PATCH 13/15] Input: synaptics-rmi4 - properly set F01 container on PDT scan Christopher Heiny
2014-02-05  2:39                             ` Courtney Cavin
2014-02-04 23:10                       ` [PATCH 11/15] Input: synaptics-rmi4 - add regulator support Christopher Heiny
2014-02-05  2:38                         ` Courtney Cavin
2014-02-04 23:10                     ` [PATCH 10/15] Input: synaptics-rmi4 - add devicetree support Christopher Heiny
2014-02-05  2:37                       ` Courtney Cavin
2014-02-04 23:10                   ` [PATCH 09/15] Input: synaptics-rmi4 - remove unused defines and variables Christopher Heiny
2014-02-05  2:35                     ` Courtney Cavin
2014-02-04 23:10                 ` [PATCH 08/15] Input: synaptics-rmi4 - cleanup platform data Christopher Heiny
2014-02-05  2:34                   ` Courtney Cavin
2014-02-04 23:09               ` [PATCH 07/15] Input: synaptics-rmi4 - remove remaining debugfs code Christopher Heiny
2014-02-05  2:33                 ` Courtney Cavin
2014-02-04 23:09             ` [PATCH 06/15] Input: synaptics-rmi4 - remove platform suspend callbacks Christopher Heiny
2014-02-05  2:32               ` Courtney Cavin
2014-02-04 23:08           ` [PATCH 05/15] Input: synaptics-rmi4 - remove gpio handling and polling Christopher Heiny
2014-02-05  2:31             ` Courtney Cavin
2014-02-06  9:28               ` Linus Walleij
2014-02-06 20:05                 ` Christopher Heiny
2014-02-07  1:45                   ` Courtney Cavin
2014-02-06 20:05               ` Christopher Heiny
2014-02-07  1:47                 ` Courtney Cavin
2014-02-04 23:08         ` [PATCH 04/15] Input: synaptics-rmi4 - remove sensor name from platform data Christopher Heiny
2014-02-05  2:30           ` Courtney Cavin
2014-02-04 23:08       ` [PATCH 03/15] Input: synaptics-rmi4 - don't free devices directly Christopher Heiny
2014-02-05  2:28         ` Courtney Cavin
2014-02-04 23:08     ` [PATCH 02/15] Input: synaptics-rmi4 - don't kfree devm_ alloced memory Christopher Heiny
2014-02-05  2:27       ` Courtney Cavin
2014-02-04 23:08   ` [PATCH 01/15] Input: synaptics-rmi4 - fix checkpatch.pl, sparse and GCC warnings Christopher Heiny
2014-02-05  2:26     ` Courtney Cavin
2014-02-06  1:09     ` Dmitry Torokhov
2014-02-06  1:36       ` Christopher Heiny
2014-02-13  6:36         ` Dmitry Torokhov
2014-02-13 18:56           ` Christopher Heiny
2014-02-13 19:10             ` Dmitry Torokhov
2014-02-13 19:12               ` Dmitry Torokhov
2014-02-13 19:25                 ` Christopher Heiny
2014-01-24  0:06 ` [PATCH 00/15] Input: synaptics-rmi4 - cleanup and add DT support Courtney Cavin
2014-01-24 23:24 ` Christopher Heiny
2014-01-25  1:08   ` Courtney Cavin

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=1390521623-6491-8-git-send-email-courtney.cavin@sonymobile.com \
    --to=courtney.cavin@sonymobile.com \
    --cc=cheiny@synaptics.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@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.