* [PATCH 0/4] Input: ad7879 RFC/RFT follow-up
@ 2017-02-22 16:14 michael.hennerich
2017-02-22 16:14 ` [PATCH 1/4] input:touchscreen:ad7879-spi.c: Fix regmap flag_masks michael.hennerich
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: michael.hennerich @ 2017-02-22 16:14 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, linux-kernel, Michael Hennerich
From: Michael Hennerich <michael.hennerich@analog.com>
Hi Dmitry,
I reviewed and tested your patch series (posted February 18th).
[RFC/RFT PATCH 1/3] Input: ad7879 - convert to use regmap
[RFC/RFT PATCH 2/3] Input: ad7879 - use more devm interfaces
[RFC/RFT PATCH 3/3] Input: ad7879 - allow exporting AUX/VBAT/GPIO pin via device property
Looks great only one issue fixed.
This little series goes on top of that.
Again thanks for these patches!
Regards,
Michael
Michael Hennerich (4):
input:touchscreen:ad7879-spi.c: Fix regmap flag_masks
input:touchscreen:ad7879-spi.c: Remove bits_per_word = 16 enforcement
Documentation: Add SPI example
input:touchscreen:ad7879: Update MODULE_AUTHOR email address
.../devicetree/bindings/input/touchscreen/ad7879.txt | 18 ++++++++++++++++++
drivers/input/touchscreen/ad7879-i2c.c | 2 +-
drivers/input/touchscreen/ad7879-spi.c | 13 +++----------
drivers/input/touchscreen/ad7879.c | 2 +-
4 files changed, 23 insertions(+), 12 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] input:touchscreen:ad7879-spi.c: Fix regmap flag_masks
2017-02-22 16:14 [PATCH 0/4] Input: ad7879 RFC/RFT follow-up michael.hennerich
@ 2017-02-22 16:14 ` michael.hennerich
2017-02-23 8:43 ` Dmitry Torokhov
2017-02-22 16:14 ` [PATCH 2/4] input:touchscreen:ad7879-spi.c: Remove bits_per_word = 16 enforcement michael.hennerich
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: michael.hennerich @ 2017-02-22 16:14 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, linux-kernel, Michael Hennerich
From: Michael Hennerich <michael.hennerich@analog.com>
Mask only applied to the top byte of the register
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
---
drivers/input/touchscreen/ad7879-spi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/ad7879-spi.c b/drivers/input/touchscreen/ad7879-spi.c
index f2c06b5..b995891 100644
--- a/drivers/input/touchscreen/ad7879-spi.c
+++ b/drivers/input/touchscreen/ad7879-spi.c
@@ -19,8 +19,8 @@
#define MAX_SPI_FREQ_HZ 5000000
-#define AD7879_CMD_MAGIC 0xE000
-#define AD7879_CMD_READ BIT(10)
+#define AD7879_CMD_MAGIC 0xE0
+#define AD7879_CMD_READ BIT(2)
static const struct regmap_config ad7879_spi_regmap_config = {
.reg_bits = 16,
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] input:touchscreen:ad7879-spi.c: Remove bits_per_word = 16 enforcement
2017-02-22 16:14 [PATCH 0/4] Input: ad7879 RFC/RFT follow-up michael.hennerich
2017-02-22 16:14 ` [PATCH 1/4] input:touchscreen:ad7879-spi.c: Fix regmap flag_masks michael.hennerich
@ 2017-02-22 16:14 ` michael.hennerich
2017-02-23 8:41 ` Dmitry Torokhov
2017-02-22 16:14 ` [PATCH 3/4] Documentation: Add SPI example michael.hennerich
2017-02-22 16:14 ` [PATCH 4/4] input:touchscreen:ad7879: Update MODULE_AUTHOR email address michael.hennerich
3 siblings, 1 reply; 9+ messages in thread
From: michael.hennerich @ 2017-02-22 16:14 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, linux-kernel, Michael Hennerich
From: Michael Hennerich <michael.hennerich@analog.com>
Using regmap this is no longer required.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
---
drivers/input/touchscreen/ad7879-spi.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/input/touchscreen/ad7879-spi.c b/drivers/input/touchscreen/ad7879-spi.c
index b995891..904a2c2 100644
--- a/drivers/input/touchscreen/ad7879-spi.c
+++ b/drivers/input/touchscreen/ad7879-spi.c
@@ -42,13 +42,6 @@ static int ad7879_spi_probe(struct spi_device *spi)
return -EINVAL;
}
- spi->bits_per_word = 16;
- err = spi_setup(spi);
- if (err) {
- dev_dbg(&spi->dev, "spi master doesn't support 16 bits/word\n");
- return err;
- }
-
regmap = devm_regmap_init_spi(spi, &ad7879_spi_regmap_config);
if (IS_ERR(regmap))
return PTR_ERR(regmap);
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] Documentation: Add SPI example
2017-02-22 16:14 [PATCH 0/4] Input: ad7879 RFC/RFT follow-up michael.hennerich
2017-02-22 16:14 ` [PATCH 1/4] input:touchscreen:ad7879-spi.c: Fix regmap flag_masks michael.hennerich
2017-02-22 16:14 ` [PATCH 2/4] input:touchscreen:ad7879-spi.c: Remove bits_per_word = 16 enforcement michael.hennerich
@ 2017-02-22 16:14 ` michael.hennerich
2017-02-23 8:42 ` Dmitry Torokhov
2017-02-22 16:14 ` [PATCH 4/4] input:touchscreen:ad7879: Update MODULE_AUTHOR email address michael.hennerich
3 siblings, 1 reply; 9+ messages in thread
From: michael.hennerich @ 2017-02-22 16:14 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, linux-kernel, Michael Hennerich
From: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
---
.../devicetree/bindings/input/touchscreen/ad7879.txt | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Documentation/devicetree/bindings/input/touchscreen/ad7879.txt b/Documentation/devicetree/bindings/input/touchscreen/ad7879.txt
index 323b609..3c8614c 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/ad7879.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/ad7879.txt
@@ -52,3 +52,21 @@ Example:
adi,averaging = /bits/ 8 <1>;
adi,conversion-interval = /bits/ 8 <255>;
};
+
+ ad7879@1 {
+ compatible = "adi,ad7879";
+ spi-max-frequency = <5000000>;
+ reg = <1>;
+ spi-cpol;
+ spi-cpha;
+ gpio-controller;
+ interrupt-parent = <&gpio1>;
+ interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
+ touchscreen-max-pressure = <4096>;
+ adi,resistance-plate-x = <120>;
+ adi,first-conversion-delay = /bits/ 8 <3>;
+ adi,acquisition-time = /bits/ 8 <1>;
+ adi,median-filter-size = /bits/ 8 <2>;
+ adi,averaging = /bits/ 8 <1>;
+ adi,conversion-interval = /bits/ 8 <255>;
+ };
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] input:touchscreen:ad7879: Update MODULE_AUTHOR email address
2017-02-22 16:14 [PATCH 0/4] Input: ad7879 RFC/RFT follow-up michael.hennerich
` (2 preceding siblings ...)
2017-02-22 16:14 ` [PATCH 3/4] Documentation: Add SPI example michael.hennerich
@ 2017-02-22 16:14 ` michael.hennerich
2017-02-23 8:42 ` Dmitry Torokhov
3 siblings, 1 reply; 9+ messages in thread
From: michael.hennerich @ 2017-02-22 16:14 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, linux-kernel, Michael Hennerich
From: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
---
drivers/input/touchscreen/ad7879-i2c.c | 2 +-
drivers/input/touchscreen/ad7879-spi.c | 2 +-
drivers/input/touchscreen/ad7879.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/input/touchscreen/ad7879-i2c.c b/drivers/input/touchscreen/ad7879-i2c.c
index 23e04e9..a282d1c 100644
--- a/drivers/input/touchscreen/ad7879-i2c.c
+++ b/drivers/input/touchscreen/ad7879-i2c.c
@@ -75,6 +75,6 @@ static struct i2c_driver ad7879_i2c_driver = {
module_i2c_driver(ad7879_i2c_driver);
-MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
+MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
MODULE_DESCRIPTION("AD7879(-1) touchscreen I2C bus driver");
MODULE_LICENSE("GPL");
diff --git a/drivers/input/touchscreen/ad7879-spi.c b/drivers/input/touchscreen/ad7879-spi.c
index 904a2c2..ac94cff 100644
--- a/drivers/input/touchscreen/ad7879-spi.c
+++ b/drivers/input/touchscreen/ad7879-spi.c
@@ -74,7 +74,7 @@ static struct spi_driver ad7879_spi_driver = {
module_spi_driver(ad7879_spi_driver);
-MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
+MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
MODULE_DESCRIPTION("AD7879(-1) touchscreen SPI bus driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("spi:ad7879");
diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c
index b6da5ce..53ab689 100644
--- a/drivers/input/touchscreen/ad7879.c
+++ b/drivers/input/touchscreen/ad7879.c
@@ -683,6 +683,6 @@ struct ad7879 *ad7879_probe(struct device *dev, struct regmap *regmap,
}
EXPORT_SYMBOL(ad7879_probe);
-MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
+MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
MODULE_DESCRIPTION("AD7879(-1) touchscreen Driver");
MODULE_LICENSE("GPL");
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/4] input:touchscreen:ad7879-spi.c: Remove bits_per_word = 16 enforcement
2017-02-22 16:14 ` [PATCH 2/4] input:touchscreen:ad7879-spi.c: Remove bits_per_word = 16 enforcement michael.hennerich
@ 2017-02-23 8:41 ` Dmitry Torokhov
0 siblings, 0 replies; 9+ messages in thread
From: Dmitry Torokhov @ 2017-02-23 8:41 UTC (permalink / raw)
To: michael.hennerich; +Cc: linux-input, linux-kernel
On Wed, Feb 22, 2017 at 05:14:36PM +0100, michael.hennerich@analog.com wrote:
> From: Michael Hennerich <michael.hennerich@analog.com>
>
> Using regmap this is no longer required.
>
> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
This gave me warnings about unused "err" variable, I removed it and
applied, thank you.
> ---
> drivers/input/touchscreen/ad7879-spi.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/drivers/input/touchscreen/ad7879-spi.c b/drivers/input/touchscreen/ad7879-spi.c
> index b995891..904a2c2 100644
> --- a/drivers/input/touchscreen/ad7879-spi.c
> +++ b/drivers/input/touchscreen/ad7879-spi.c
> @@ -42,13 +42,6 @@ static int ad7879_spi_probe(struct spi_device *spi)
> return -EINVAL;
> }
>
> - spi->bits_per_word = 16;
> - err = spi_setup(spi);
> - if (err) {
> - dev_dbg(&spi->dev, "spi master doesn't support 16 bits/word\n");
> - return err;
> - }
> -
> regmap = devm_regmap_init_spi(spi, &ad7879_spi_regmap_config);
> if (IS_ERR(regmap))
> return PTR_ERR(regmap);
> --
> 2.7.4
>
--
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/4] Documentation: Add SPI example
2017-02-22 16:14 ` [PATCH 3/4] Documentation: Add SPI example michael.hennerich
@ 2017-02-23 8:42 ` Dmitry Torokhov
0 siblings, 0 replies; 9+ messages in thread
From: Dmitry Torokhov @ 2017-02-23 8:42 UTC (permalink / raw)
To: michael.hennerich; +Cc: linux-input, linux-kernel
On Wed, Feb 22, 2017 at 05:14:37PM +0100, michael.hennerich@analog.com wrote:
> From: Michael Hennerich <michael.hennerich@analog.com>
>
> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Applied, thank you.
> ---
> .../devicetree/bindings/input/touchscreen/ad7879.txt | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/ad7879.txt b/Documentation/devicetree/bindings/input/touchscreen/ad7879.txt
> index 323b609..3c8614c 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/ad7879.txt
> +++ b/Documentation/devicetree/bindings/input/touchscreen/ad7879.txt
> @@ -52,3 +52,21 @@ Example:
> adi,averaging = /bits/ 8 <1>;
> adi,conversion-interval = /bits/ 8 <255>;
> };
> +
> + ad7879@1 {
> + compatible = "adi,ad7879";
> + spi-max-frequency = <5000000>;
> + reg = <1>;
> + spi-cpol;
> + spi-cpha;
> + gpio-controller;
> + interrupt-parent = <&gpio1>;
> + interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
> + touchscreen-max-pressure = <4096>;
> + adi,resistance-plate-x = <120>;
> + adi,first-conversion-delay = /bits/ 8 <3>;
> + adi,acquisition-time = /bits/ 8 <1>;
> + adi,median-filter-size = /bits/ 8 <2>;
> + adi,averaging = /bits/ 8 <1>;
> + adi,conversion-interval = /bits/ 8 <255>;
> + };
> --
> 2.7.4
>
--
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/4] input:touchscreen:ad7879: Update MODULE_AUTHOR email address
2017-02-22 16:14 ` [PATCH 4/4] input:touchscreen:ad7879: Update MODULE_AUTHOR email address michael.hennerich
@ 2017-02-23 8:42 ` Dmitry Torokhov
0 siblings, 0 replies; 9+ messages in thread
From: Dmitry Torokhov @ 2017-02-23 8:42 UTC (permalink / raw)
To: michael.hennerich; +Cc: linux-input, linux-kernel
On Wed, Feb 22, 2017 at 05:14:38PM +0100, michael.hennerich@analog.com wrote:
> From: Michael Hennerich <michael.hennerich@analog.com>
>
> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Applied, thank you.
> ---
> drivers/input/touchscreen/ad7879-i2c.c | 2 +-
> drivers/input/touchscreen/ad7879-spi.c | 2 +-
> drivers/input/touchscreen/ad7879.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/touchscreen/ad7879-i2c.c b/drivers/input/touchscreen/ad7879-i2c.c
> index 23e04e9..a282d1c 100644
> --- a/drivers/input/touchscreen/ad7879-i2c.c
> +++ b/drivers/input/touchscreen/ad7879-i2c.c
> @@ -75,6 +75,6 @@ static struct i2c_driver ad7879_i2c_driver = {
>
> module_i2c_driver(ad7879_i2c_driver);
>
> -MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
> +MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
> MODULE_DESCRIPTION("AD7879(-1) touchscreen I2C bus driver");
> MODULE_LICENSE("GPL");
> diff --git a/drivers/input/touchscreen/ad7879-spi.c b/drivers/input/touchscreen/ad7879-spi.c
> index 904a2c2..ac94cff 100644
> --- a/drivers/input/touchscreen/ad7879-spi.c
> +++ b/drivers/input/touchscreen/ad7879-spi.c
> @@ -74,7 +74,7 @@ static struct spi_driver ad7879_spi_driver = {
>
> module_spi_driver(ad7879_spi_driver);
>
> -MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
> +MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
> MODULE_DESCRIPTION("AD7879(-1) touchscreen SPI bus driver");
> MODULE_LICENSE("GPL");
> MODULE_ALIAS("spi:ad7879");
> diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c
> index b6da5ce..53ab689 100644
> --- a/drivers/input/touchscreen/ad7879.c
> +++ b/drivers/input/touchscreen/ad7879.c
> @@ -683,6 +683,6 @@ struct ad7879 *ad7879_probe(struct device *dev, struct regmap *regmap,
> }
> EXPORT_SYMBOL(ad7879_probe);
>
> -MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
> +MODULE_AUTHOR("Michael Hennerich <michael.hennerich@analog.com>");
> MODULE_DESCRIPTION("AD7879(-1) touchscreen Driver");
> MODULE_LICENSE("GPL");
> --
> 2.7.4
>
--
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/4] input:touchscreen:ad7879-spi.c: Fix regmap flag_masks
2017-02-22 16:14 ` [PATCH 1/4] input:touchscreen:ad7879-spi.c: Fix regmap flag_masks michael.hennerich
@ 2017-02-23 8:43 ` Dmitry Torokhov
0 siblings, 0 replies; 9+ messages in thread
From: Dmitry Torokhov @ 2017-02-23 8:43 UTC (permalink / raw)
To: michael.hennerich; +Cc: linux-input, linux-kernel
On Wed, Feb 22, 2017 at 05:14:35PM +0100, michael.hennerich@analog.com wrote:
> From: Michael Hennerich <michael.hennerich@analog.com>
>
> Mask only applied to the top byte of the register
>
> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Thank you Michael, I folded it with the patch introducing regmaps.
> ---
> drivers/input/touchscreen/ad7879-spi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/touchscreen/ad7879-spi.c b/drivers/input/touchscreen/ad7879-spi.c
> index f2c06b5..b995891 100644
> --- a/drivers/input/touchscreen/ad7879-spi.c
> +++ b/drivers/input/touchscreen/ad7879-spi.c
> @@ -19,8 +19,8 @@
>
> #define MAX_SPI_FREQ_HZ 5000000
>
> -#define AD7879_CMD_MAGIC 0xE000
> -#define AD7879_CMD_READ BIT(10)
> +#define AD7879_CMD_MAGIC 0xE0
> +#define AD7879_CMD_READ BIT(2)
>
> static const struct regmap_config ad7879_spi_regmap_config = {
> .reg_bits = 16,
> --
> 2.7.4
>
--
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-02-23 8:43 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-22 16:14 [PATCH 0/4] Input: ad7879 RFC/RFT follow-up michael.hennerich
2017-02-22 16:14 ` [PATCH 1/4] input:touchscreen:ad7879-spi.c: Fix regmap flag_masks michael.hennerich
2017-02-23 8:43 ` Dmitry Torokhov
2017-02-22 16:14 ` [PATCH 2/4] input:touchscreen:ad7879-spi.c: Remove bits_per_word = 16 enforcement michael.hennerich
2017-02-23 8:41 ` Dmitry Torokhov
2017-02-22 16:14 ` [PATCH 3/4] Documentation: Add SPI example michael.hennerich
2017-02-23 8:42 ` Dmitry Torokhov
2017-02-22 16:14 ` [PATCH 4/4] input:touchscreen:ad7879: Update MODULE_AUTHOR email address michael.hennerich
2017-02-23 8:42 ` 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).