linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] Input: resistive-adc-touch - describe parameters in kernel doc
@ 2021-05-28 15:11 Andy Shevchenko
  2021-05-28 15:11 ` [PATCH v2 2/2] Input: resistive-adc-touch - replace OF headers with proper ones Andy Shevchenko
  2021-06-01  5:53 ` [PATCH v2 1/2] Input: resistive-adc-touch - describe parameters in kernel doc Dmitry Torokhov
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Shevchenko @ 2021-05-28 15:11 UTC (permalink / raw)
  To: Oleksij Rempel, linux-input, linux-kernel
  Cc: Eugen Hristev, Dmitry Torokhov, Andy Shevchenko

Validation script is not happy:

 resistive-adc-touch.c:53: warning: Function parameter or member 'x_plate_ohms' not described in 'grts_state'
 resistive-adc-touch.c:53: warning: Function parameter or member 'ch' not described in 'grts_state'

Describe parameters in kernel doc to make it happy.

Fixes: fb082cd59afa ("Input: resistive-adc-touch - add support for z1 and z2 channels")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/input/touchscreen/resistive-adc-touch.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/resistive-adc-touch.c b/drivers/input/touchscreen/resistive-adc-touch.c
index 0939c0e97efb..0353400c559a 100644
--- a/drivers/input/touchscreen/resistive-adc-touch.c
+++ b/drivers/input/touchscreen/resistive-adc-touch.c
@@ -35,16 +35,18 @@ enum grts_ch_type {
 
 /**
  * struct grts_state - generic resistive touch screen information struct
+ * @x_plate_ohms:	resistance of the X plate
  * @pressure_min:	number representing the minimum for the pressure
  * @pressure:		are we getting pressure info or not
  * @iio_chans:		list of channels acquired
  * @iio_cb:		iio_callback buffer for the data
  * @input:		the input device structure that we register
  * @prop:		touchscreen properties struct
+ * @ch:			channels that are defined for the touchscreen
  */
 struct grts_state {
-	u32				pressure_min;
 	u32				x_plate_ohms;
+	u32				pressure_min;
 	bool				pressure;
 	struct iio_channel		*iio_chans;
 	struct iio_cb_buffer		*iio_cb;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 2/2] Input: resistive-adc-touch - replace OF headers with proper ones
  2021-05-28 15:11 [PATCH v2 1/2] Input: resistive-adc-touch - describe parameters in kernel doc Andy Shevchenko
@ 2021-05-28 15:11 ` Andy Shevchenko
  2021-06-01  5:53   ` Dmitry Torokhov
  2021-06-01  5:53 ` [PATCH v2 1/2] Input: resistive-adc-touch - describe parameters in kernel doc Dmitry Torokhov
  1 sibling, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2021-05-28 15:11 UTC (permalink / raw)
  To: Oleksij Rempel, linux-input, linux-kernel
  Cc: Eugen Hristev, Dmitry Torokhov, Andy Shevchenko

The driver is actually OF independent and doesn't need anything from OF (*).
Replace OF headers with mod_devicetable.h and property.h.

*) use of of_match_ptr() is actually wrong here, since it may provoke
   a compiler to warn about unused variable.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/input/touchscreen/resistive-adc-touch.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/input/touchscreen/resistive-adc-touch.c b/drivers/input/touchscreen/resistive-adc-touch.c
index 0353400c559a..ea1884fb49a1 100644
--- a/drivers/input/touchscreen/resistive-adc-touch.c
+++ b/drivers/input/touchscreen/resistive-adc-touch.c
@@ -13,10 +13,10 @@
 #include <linux/input/touchscreen.h>
 #include <linux/iio/consumer.h>
 #include <linux/iio/iio.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
-#include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 
 #define DRIVER_NAME					"resistive-adc-touch"
 #define GRTS_DEFAULT_PRESSURE_MIN			50000
@@ -307,7 +307,7 @@ static struct platform_driver grts_driver = {
 	.probe = grts_probe,
 	.driver = {
 		.name = DRIVER_NAME,
-		.of_match_table = of_match_ptr(grts_of_match),
+		.of_match_table = grts_of_match,
 	},
 };
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/2] Input: resistive-adc-touch - describe parameters in kernel doc
  2021-05-28 15:11 [PATCH v2 1/2] Input: resistive-adc-touch - describe parameters in kernel doc Andy Shevchenko
  2021-05-28 15:11 ` [PATCH v2 2/2] Input: resistive-adc-touch - replace OF headers with proper ones Andy Shevchenko
@ 2021-06-01  5:53 ` Dmitry Torokhov
  1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2021-06-01  5:53 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Oleksij Rempel, linux-input, linux-kernel, Eugen Hristev

On Fri, May 28, 2021 at 06:11:12PM +0300, Andy Shevchenko wrote:
> Validation script is not happy:
> 
>  resistive-adc-touch.c:53: warning: Function parameter or member 'x_plate_ohms' not described in 'grts_state'
>  resistive-adc-touch.c:53: warning: Function parameter or member 'ch' not described in 'grts_state'
> 
> Describe parameters in kernel doc to make it happy.
> 
> Fixes: fb082cd59afa ("Input: resistive-adc-touch - add support for z1 and z2 channels")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Applied, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 2/2] Input: resistive-adc-touch - replace OF headers with proper ones
  2021-05-28 15:11 ` [PATCH v2 2/2] Input: resistive-adc-touch - replace OF headers with proper ones Andy Shevchenko
@ 2021-06-01  5:53   ` Dmitry Torokhov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2021-06-01  5:53 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Oleksij Rempel, linux-input, linux-kernel, Eugen Hristev

On Fri, May 28, 2021 at 06:11:13PM +0300, Andy Shevchenko wrote:
> The driver is actually OF independent and doesn't need anything from OF (*).
> Replace OF headers with mod_devicetable.h and property.h.
> 
> *) use of of_match_ptr() is actually wrong here, since it may provoke
>    a compiler to warn about unused variable.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Applied, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-01  5:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-28 15:11 [PATCH v2 1/2] Input: resistive-adc-touch - describe parameters in kernel doc Andy Shevchenko
2021-05-28 15:11 ` [PATCH v2 2/2] Input: resistive-adc-touch - replace OF headers with proper ones Andy Shevchenko
2021-06-01  5:53   ` Dmitry Torokhov
2021-06-01  5:53 ` [PATCH v2 1/2] Input: resistive-adc-touch - describe parameters in kernel doc Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).