* [PATCH 0/3] Add touchscreen support for TBS A711 Tablet @ 2019-10-29 0:58 Ondrej Jirman 2019-10-29 0:58 ` [PATCH 1/3] input: edt-ft5x06: Add support for regulator Ondrej Jirman ` (3 more replies) 0 siblings, 4 replies; 13+ messages in thread From: Ondrej Jirman @ 2019-10-29 0:58 UTC (permalink / raw) To: linux-sunxi, Dmitry Torokhov, Rob Herring, Mark Rutland, Maxime Ripard, Chen-Yu Tsai, Marco Felsch, Ondrej Jirman, Andy Shevchenko, Greg Kroah-Hartman, Mylène Josserand Cc: linux-input, devicetree, linux-kernel, linux-arm-kernel This is a resurrection of https://lkml.org/lkml/2018/7/25/143 Compared to v4 of Mylène's series I've dropped all attempts to power off the chip during suspend. This patch just enables the regulator during probe and disables it on driver rmmod. I've tested the driver with suspend/resume and touching the panel resumes my soc. Please take a look. thank you and regards, Ondrej Jirman Changes since v4 of Mylène's series: - slight whitespace improvements - drop all modifications of suspend/resume hooks - drop useless header include - split the dt-bindings into a separate patch Mylène Josserand (2): input: edt-ft5x06: Add support for regulator arm: dts: sun8i: a83t: a711: Add touchscreen node Ondrej Jirman (1): dt-bindings: input: edt-ft5x06: Add regulator support .../bindings/input/touchscreen/edt-ft5x06.txt | 1 + arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 16 ++++++++++ drivers/input/touchscreen/edt-ft5x06.c | 30 +++++++++++++++++++ 3 files changed, 47 insertions(+) -- 2.23.0 ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/3] input: edt-ft5x06: Add support for regulator 2019-10-29 0:58 [PATCH 0/3] Add touchscreen support for TBS A711 Tablet Ondrej Jirman @ 2019-10-29 0:58 ` Ondrej Jirman 2019-10-29 4:12 ` Dmitry Torokhov 2019-10-29 0:58 ` [PATCH 2/3] dt-bindings: input: edt-ft5x06: Add regulator support Ondrej Jirman ` (2 subsequent siblings) 3 siblings, 1 reply; 13+ messages in thread From: Ondrej Jirman @ 2019-10-29 0:58 UTC (permalink / raw) To: linux-sunxi, Dmitry Torokhov, Rob Herring, Mark Rutland, Maxime Ripard, Chen-Yu Tsai, Marco Felsch, Ondrej Jirman, Andy Shevchenko, Greg Kroah-Hartman, Mylène Josserand Cc: linux-input, devicetree, linux-kernel, linux-arm-kernel From: Mylène Josserand <mylene.josserand@bootlin.com> Add the support for enabling optional regulator that may be used as VCC source. Signed-off-by: Ondrej Jirman <megous@megous.com> Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> --- drivers/input/touchscreen/edt-ft5x06.c | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 5525f1fb1526..d61731c0037d 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -28,6 +28,7 @@ #include <linux/input/mt.h> #include <linux/input/touchscreen.h> #include <asm/unaligned.h> +#include <linux/regulator/consumer.h> #define WORK_REGISTER_THRESHOLD 0x00 #define WORK_REGISTER_REPORT_RATE 0x08 @@ -88,6 +89,7 @@ struct edt_ft5x06_ts_data { struct touchscreen_properties prop; u16 num_x; u16 num_y; + struct regulator *vcc; struct gpio_desc *reset_gpio; struct gpio_desc *wake_gpio; @@ -1036,6 +1038,13 @@ edt_ft5x06_ts_set_regs(struct edt_ft5x06_ts_data *tsdata) } } +static void edt_ft5x06_disable_regulator(void *arg) +{ + struct edt_ft5x06_ts_data *data = arg; + + regulator_disable(data->vcc); +} + static int edt_ft5x06_ts_probe(struct i2c_client *client, const struct i2c_device_id *id) { @@ -1064,6 +1073,27 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, tsdata->max_support_points = chip_data->max_support_points; + tsdata->vcc = devm_regulator_get(&client->dev, "vcc"); + if (IS_ERR(tsdata->vcc)) { + error = PTR_ERR(tsdata->vcc); + if (error != -EPROBE_DEFER) + dev_err(&client->dev, + "failed to request regulator: %d\n", error); + return error; + } + + error = regulator_enable(tsdata->vcc); + if (error < 0) { + dev_err(&client->dev, "failed to enable vcc: %d\n", error); + return error; + } + + error = devm_add_action_or_reset(&client->dev, + edt_ft5x06_disable_regulator, + tsdata); + if (error) + return error; + tsdata->reset_gpio = devm_gpiod_get_optional(&client->dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(tsdata->reset_gpio)) { -- 2.23.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 1/3] input: edt-ft5x06: Add support for regulator 2019-10-29 0:58 ` [PATCH 1/3] input: edt-ft5x06: Add support for regulator Ondrej Jirman @ 2019-10-29 4:12 ` Dmitry Torokhov 2019-10-29 8:55 ` Marco Felsch 0 siblings, 1 reply; 13+ messages in thread From: Dmitry Torokhov @ 2019-10-29 4:12 UTC (permalink / raw) To: Ondrej Jirman Cc: linux-sunxi, Rob Herring, Mark Rutland, Maxime Ripard, Chen-Yu Tsai, Marco Felsch, Andy Shevchenko, Greg Kroah-Hartman, Mylène Josserand, linux-input, devicetree, linux-kernel, linux-arm-kernel On Tue, Oct 29, 2019 at 01:58:04AM +0100, Ondrej Jirman wrote: > From: Mylène Josserand <mylene.josserand@bootlin.com> > > Add the support for enabling optional regulator that may be used as VCC > source. > > Signed-off-by: Ondrej Jirman <megous@megous.com> > Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> Applied, thank you. > --- > drivers/input/touchscreen/edt-ft5x06.c | 30 ++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c > index 5525f1fb1526..d61731c0037d 100644 > --- a/drivers/input/touchscreen/edt-ft5x06.c > +++ b/drivers/input/touchscreen/edt-ft5x06.c > @@ -28,6 +28,7 @@ > #include <linux/input/mt.h> > #include <linux/input/touchscreen.h> > #include <asm/unaligned.h> > +#include <linux/regulator/consumer.h> > > #define WORK_REGISTER_THRESHOLD 0x00 > #define WORK_REGISTER_REPORT_RATE 0x08 > @@ -88,6 +89,7 @@ struct edt_ft5x06_ts_data { > struct touchscreen_properties prop; > u16 num_x; > u16 num_y; > + struct regulator *vcc; > > struct gpio_desc *reset_gpio; > struct gpio_desc *wake_gpio; > @@ -1036,6 +1038,13 @@ edt_ft5x06_ts_set_regs(struct edt_ft5x06_ts_data *tsdata) > } > } > > +static void edt_ft5x06_disable_regulator(void *arg) > +{ > + struct edt_ft5x06_ts_data *data = arg; > + > + regulator_disable(data->vcc); > +} > + > static int edt_ft5x06_ts_probe(struct i2c_client *client, > const struct i2c_device_id *id) > { > @@ -1064,6 +1073,27 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, > > tsdata->max_support_points = chip_data->max_support_points; > > + tsdata->vcc = devm_regulator_get(&client->dev, "vcc"); > + if (IS_ERR(tsdata->vcc)) { > + error = PTR_ERR(tsdata->vcc); > + if (error != -EPROBE_DEFER) > + dev_err(&client->dev, > + "failed to request regulator: %d\n", error); > + return error; > + } > + > + error = regulator_enable(tsdata->vcc); > + if (error < 0) { > + dev_err(&client->dev, "failed to enable vcc: %d\n", error); > + return error; > + } > + > + error = devm_add_action_or_reset(&client->dev, > + edt_ft5x06_disable_regulator, > + tsdata); > + if (error) > + return error; > + > tsdata->reset_gpio = devm_gpiod_get_optional(&client->dev, > "reset", GPIOD_OUT_HIGH); > if (IS_ERR(tsdata->reset_gpio)) { > -- > 2.23.0 > -- Dmitry ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/3] input: edt-ft5x06: Add support for regulator 2019-10-29 4:12 ` Dmitry Torokhov @ 2019-10-29 8:55 ` Marco Felsch 2019-10-29 11:21 ` Ondřej Jirman 0 siblings, 1 reply; 13+ messages in thread From: Marco Felsch @ 2019-10-29 8:55 UTC (permalink / raw) To: Dmitry Torokhov Cc: Ondrej Jirman, linux-sunxi, Rob Herring, Mark Rutland, Maxime Ripard, Chen-Yu Tsai, Andy Shevchenko, Greg Kroah-Hartman, Mylène Josserand, linux-input, devicetree, linux-kernel, linux-arm-kernel Hi Dmitry, On 19-10-28 21:12, Dmitry Torokhov wrote: > On Tue, Oct 29, 2019 at 01:58:04AM +0100, Ondrej Jirman wrote: > > From: Mylène Josserand <mylene.josserand@bootlin.com> > > > > Add the support for enabling optional regulator that may be used as VCC > > source. > > > > Signed-off-by: Ondrej Jirman <megous@megous.com> > > Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> > > Applied, thank you. What happens with my vdd patches? Regards, Marco > > > --- > > drivers/input/touchscreen/edt-ft5x06.c | 30 ++++++++++++++++++++++++++ > > 1 file changed, 30 insertions(+) > > > > diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c > > index 5525f1fb1526..d61731c0037d 100644 > > --- a/drivers/input/touchscreen/edt-ft5x06.c > > +++ b/drivers/input/touchscreen/edt-ft5x06.c > > @@ -28,6 +28,7 @@ > > #include <linux/input/mt.h> > > #include <linux/input/touchscreen.h> > > #include <asm/unaligned.h> > > +#include <linux/regulator/consumer.h> > > > > #define WORK_REGISTER_THRESHOLD 0x00 > > #define WORK_REGISTER_REPORT_RATE 0x08 > > @@ -88,6 +89,7 @@ struct edt_ft5x06_ts_data { > > struct touchscreen_properties prop; > > u16 num_x; > > u16 num_y; > > + struct regulator *vcc; > > > > struct gpio_desc *reset_gpio; > > struct gpio_desc *wake_gpio; > > @@ -1036,6 +1038,13 @@ edt_ft5x06_ts_set_regs(struct edt_ft5x06_ts_data *tsdata) > > } > > } > > > > +static void edt_ft5x06_disable_regulator(void *arg) > > +{ > > + struct edt_ft5x06_ts_data *data = arg; > > + > > + regulator_disable(data->vcc); > > +} > > + > > static int edt_ft5x06_ts_probe(struct i2c_client *client, > > const struct i2c_device_id *id) > > { > > @@ -1064,6 +1073,27 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, > > > > tsdata->max_support_points = chip_data->max_support_points; > > > > + tsdata->vcc = devm_regulator_get(&client->dev, "vcc"); > > + if (IS_ERR(tsdata->vcc)) { > > + error = PTR_ERR(tsdata->vcc); > > + if (error != -EPROBE_DEFER) > > + dev_err(&client->dev, > > + "failed to request regulator: %d\n", error); > > + return error; > > + } > > + > > + error = regulator_enable(tsdata->vcc); > > + if (error < 0) { > > + dev_err(&client->dev, "failed to enable vcc: %d\n", error); > > + return error; > > + } > > + > > + error = devm_add_action_or_reset(&client->dev, > > + edt_ft5x06_disable_regulator, > > + tsdata); > > + if (error) > > + return error; > > + > > tsdata->reset_gpio = devm_gpiod_get_optional(&client->dev, > > "reset", GPIOD_OUT_HIGH); > > if (IS_ERR(tsdata->reset_gpio)) { > > -- > > 2.23.0 > > > > -- > Dmitry > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/3] input: edt-ft5x06: Add support for regulator 2019-10-29 8:55 ` Marco Felsch @ 2019-10-29 11:21 ` Ondřej Jirman 2019-10-29 11:29 ` Marco Felsch 0 siblings, 1 reply; 13+ messages in thread From: Ondřej Jirman @ 2019-10-29 11:21 UTC (permalink / raw) To: Marco Felsch Cc: Dmitry Torokhov, linux-sunxi, Rob Herring, Mark Rutland, Maxime Ripard, Chen-Yu Tsai, Andy Shevchenko, Greg Kroah-Hartman, Mylène Josserand, linux-input, devicetree, linux-kernel, linux-arm-kernel Hi Marco, On Tue, Oct 29, 2019 at 09:55:45AM +0100, Marco Felsch wrote: > Hi Dmitry, > > On 19-10-28 21:12, Dmitry Torokhov wrote: > > On Tue, Oct 29, 2019 at 01:58:04AM +0100, Ondrej Jirman wrote: > > > From: Mylène Josserand <mylene.josserand@bootlin.com> > > > > > > Add the support for enabling optional regulator that may be used as VCC > > > source. > > > > > > Signed-off-by: Ondrej Jirman <megous@megous.com> > > > Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> > > > > Applied, thank you. > > What happens with my vdd patches? Sorry for not noticing your patches, I was only aware of Mylène's older series. It looks like you can just skip regulator enable support from your series, and re-send the deep-sleep mechanism and wakeup source patches only. I'll test it with my board, and give you a tested-by. thank you and regards, o. > Regards, > Marco > > > > > > --- > > > drivers/input/touchscreen/edt-ft5x06.c | 30 ++++++++++++++++++++++++++ > > > 1 file changed, 30 insertions(+) > > > > > > diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c > > > index 5525f1fb1526..d61731c0037d 100644 > > > --- a/drivers/input/touchscreen/edt-ft5x06.c > > > +++ b/drivers/input/touchscreen/edt-ft5x06.c > > > @@ -28,6 +28,7 @@ > > > #include <linux/input/mt.h> > > > #include <linux/input/touchscreen.h> > > > #include <asm/unaligned.h> > > > +#include <linux/regulator/consumer.h> > > > > > > #define WORK_REGISTER_THRESHOLD 0x00 > > > #define WORK_REGISTER_REPORT_RATE 0x08 > > > @@ -88,6 +89,7 @@ struct edt_ft5x06_ts_data { > > > struct touchscreen_properties prop; > > > u16 num_x; > > > u16 num_y; > > > + struct regulator *vcc; > > > > > > struct gpio_desc *reset_gpio; > > > struct gpio_desc *wake_gpio; > > > @@ -1036,6 +1038,13 @@ edt_ft5x06_ts_set_regs(struct edt_ft5x06_ts_data *tsdata) > > > } > > > } > > > > > > +static void edt_ft5x06_disable_regulator(void *arg) > > > +{ > > > + struct edt_ft5x06_ts_data *data = arg; > > > + > > > + regulator_disable(data->vcc); > > > +} > > > + > > > static int edt_ft5x06_ts_probe(struct i2c_client *client, > > > const struct i2c_device_id *id) > > > { > > > @@ -1064,6 +1073,27 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, > > > > > > tsdata->max_support_points = chip_data->max_support_points; > > > > > > + tsdata->vcc = devm_regulator_get(&client->dev, "vcc"); > > > + if (IS_ERR(tsdata->vcc)) { > > > + error = PTR_ERR(tsdata->vcc); > > > + if (error != -EPROBE_DEFER) > > > + dev_err(&client->dev, > > > + "failed to request regulator: %d\n", error); > > > + return error; > > > + } > > > + > > > + error = regulator_enable(tsdata->vcc); > > > + if (error < 0) { > > > + dev_err(&client->dev, "failed to enable vcc: %d\n", error); > > > + return error; > > > + } > > > + > > > + error = devm_add_action_or_reset(&client->dev, > > > + edt_ft5x06_disable_regulator, > > > + tsdata); > > > + if (error) > > > + return error; > > > + > > > tsdata->reset_gpio = devm_gpiod_get_optional(&client->dev, > > > "reset", GPIOD_OUT_HIGH); > > > if (IS_ERR(tsdata->reset_gpio)) { > > > -- > > > 2.23.0 > > > > > > > -- > > Dmitry > > > > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/3] input: edt-ft5x06: Add support for regulator 2019-10-29 11:21 ` Ondřej Jirman @ 2019-10-29 11:29 ` Marco Felsch 0 siblings, 0 replies; 13+ messages in thread From: Marco Felsch @ 2019-10-29 11:29 UTC (permalink / raw) To: Dmitry Torokhov, linux-sunxi, Rob Herring, Mark Rutland, Maxime Ripard, Chen-Yu Tsai, Andy Shevchenko, Greg Kroah-Hartman, Mylène Josserand, linux-input, devicetree, linux-kernel, linux-arm-kernel Hi Ondřej, On 19-10-29 12:21, Ondřej Jirman wrote: > Hi Marco, > > On Tue, Oct 29, 2019 at 09:55:45AM +0100, Marco Felsch wrote: > > Hi Dmitry, > > > > On 19-10-28 21:12, Dmitry Torokhov wrote: > > > On Tue, Oct 29, 2019 at 01:58:04AM +0100, Ondrej Jirman wrote: > > > > From: Mylène Josserand <mylene.josserand@bootlin.com> > > > > > > > > Add the support for enabling optional regulator that may be used as VCC > > > > source. > > > > > > > > Signed-off-by: Ondrej Jirman <megous@megous.com> > > > > Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> > > > > > > Applied, thank you. > > > > What happens with my vdd patches? > > Sorry for not noticing your patches, I was only aware of Mylène's older series. > It looks like you can just skip regulator enable support from your series, and > re-send the deep-sleep mechanism and wakeup source patches only. No problems just wondered myself. Now I need to adapt the patches ^^ > I'll test it with my board, and give you a tested-by. Thanks. Regards, Marco > thank you and regards, > o. > > > Regards, > > Marco > > > > > > > > > --- > > > > drivers/input/touchscreen/edt-ft5x06.c | 30 ++++++++++++++++++++++++++ > > > > 1 file changed, 30 insertions(+) > > > > > > > > diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c > > > > index 5525f1fb1526..d61731c0037d 100644 > > > > --- a/drivers/input/touchscreen/edt-ft5x06.c > > > > +++ b/drivers/input/touchscreen/edt-ft5x06.c > > > > @@ -28,6 +28,7 @@ > > > > #include <linux/input/mt.h> > > > > #include <linux/input/touchscreen.h> > > > > #include <asm/unaligned.h> > > > > +#include <linux/regulator/consumer.h> > > > > > > > > #define WORK_REGISTER_THRESHOLD 0x00 > > > > #define WORK_REGISTER_REPORT_RATE 0x08 > > > > @@ -88,6 +89,7 @@ struct edt_ft5x06_ts_data { > > > > struct touchscreen_properties prop; > > > > u16 num_x; > > > > u16 num_y; > > > > + struct regulator *vcc; > > > > > > > > struct gpio_desc *reset_gpio; > > > > struct gpio_desc *wake_gpio; > > > > @@ -1036,6 +1038,13 @@ edt_ft5x06_ts_set_regs(struct edt_ft5x06_ts_data *tsdata) > > > > } > > > > } > > > > > > > > +static void edt_ft5x06_disable_regulator(void *arg) > > > > +{ > > > > + struct edt_ft5x06_ts_data *data = arg; > > > > + > > > > + regulator_disable(data->vcc); > > > > +} > > > > + > > > > static int edt_ft5x06_ts_probe(struct i2c_client *client, > > > > const struct i2c_device_id *id) > > > > { > > > > @@ -1064,6 +1073,27 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, > > > > > > > > tsdata->max_support_points = chip_data->max_support_points; > > > > > > > > + tsdata->vcc = devm_regulator_get(&client->dev, "vcc"); > > > > + if (IS_ERR(tsdata->vcc)) { > > > > + error = PTR_ERR(tsdata->vcc); > > > > + if (error != -EPROBE_DEFER) > > > > + dev_err(&client->dev, > > > > + "failed to request regulator: %d\n", error); > > > > + return error; > > > > + } > > > > + > > > > + error = regulator_enable(tsdata->vcc); > > > > + if (error < 0) { > > > > + dev_err(&client->dev, "failed to enable vcc: %d\n", error); > > > > + return error; > > > > + } > > > > + > > > > + error = devm_add_action_or_reset(&client->dev, > > > > + edt_ft5x06_disable_regulator, > > > > + tsdata); > > > > + if (error) > > > > + return error; > > > > + > > > > tsdata->reset_gpio = devm_gpiod_get_optional(&client->dev, > > > > "reset", GPIOD_OUT_HIGH); > > > > if (IS_ERR(tsdata->reset_gpio)) { > > > > -- > > > > 2.23.0 > > > > > > > > > > -- > > > Dmitry > > > > > > > -- > > Pengutronix e.K. | | > > Industrial Linux Solutions | http://www.pengutronix.de/ | > > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/3] dt-bindings: input: edt-ft5x06: Add regulator support 2019-10-29 0:58 [PATCH 0/3] Add touchscreen support for TBS A711 Tablet Ondrej Jirman 2019-10-29 0:58 ` [PATCH 1/3] input: edt-ft5x06: Add support for regulator Ondrej Jirman @ 2019-10-29 0:58 ` Ondrej Jirman 2019-10-29 0:58 ` [PATCH 3/3] arm: dts: sun8i: a83t: a711: Add touchscreen node Ondrej Jirman 2019-10-29 4:15 ` [PATCH 0/3] Add touchscreen support for TBS A711 Tablet Dmitry Torokhov 3 siblings, 0 replies; 13+ messages in thread From: Ondrej Jirman @ 2019-10-29 0:58 UTC (permalink / raw) To: linux-sunxi, Dmitry Torokhov, Rob Herring, Mark Rutland, Maxime Ripard, Chen-Yu Tsai, Marco Felsch, Ondrej Jirman, Andy Shevchenko, Greg Kroah-Hartman, Mylène Josserand Cc: linux-input, devicetree, linux-kernel, linux-arm-kernel, Rob Herring Touch controller may have an optional regulator. Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Ondrej Jirman <megous@megous.com> --- .../devicetree/bindings/input/touchscreen/edt-ft5x06.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt index 870b8c5cce9b..0f6950073d6f 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt @@ -30,6 +30,7 @@ Required properties: Optional properties: - reset-gpios: GPIO specification for the RESET input - wake-gpios: GPIO specification for the WAKE input + - vcc-supply: Regulator that supplies the touchscreen - pinctrl-names: should be "default" - pinctrl-0: a phandle pointing to the pin settings for the -- 2.23.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/3] arm: dts: sun8i: a83t: a711: Add touchscreen node 2019-10-29 0:58 [PATCH 0/3] Add touchscreen support for TBS A711 Tablet Ondrej Jirman 2019-10-29 0:58 ` [PATCH 1/3] input: edt-ft5x06: Add support for regulator Ondrej Jirman 2019-10-29 0:58 ` [PATCH 2/3] dt-bindings: input: edt-ft5x06: Add regulator support Ondrej Jirman @ 2019-10-29 0:58 ` Ondrej Jirman 2019-10-29 8:30 ` Maxime Ripard 2019-10-29 9:08 ` Marco Felsch 2019-10-29 4:15 ` [PATCH 0/3] Add touchscreen support for TBS A711 Tablet Dmitry Torokhov 3 siblings, 2 replies; 13+ messages in thread From: Ondrej Jirman @ 2019-10-29 0:58 UTC (permalink / raw) To: linux-sunxi, Dmitry Torokhov, Rob Herring, Mark Rutland, Maxime Ripard, Chen-Yu Tsai, Marco Felsch, Ondrej Jirman, Andy Shevchenko, Greg Kroah-Hartman, Mylène Josserand Cc: linux-input, devicetree, linux-kernel, linux-arm-kernel From: Mylène Josserand <mylene.josserand@bootlin.com> Enable a FocalTech EDT-FT5x06 Polytouch touchscreen. Signed-off-by: Ondrej Jirman <megous@megous.com> Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> --- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts index 568b90ece342..19f520252dc5 100644 --- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts @@ -164,6 +164,22 @@ status = "okay"; }; +&i2c0 { + clock-frequency = <400000>; + status = "okay"; + + touchscreen@38 { + compatible = "edt,edt-ft5x06"; + reg = <0x38>; + interrupt-parent = <&r_pio>; + interrupts = <0 7 IRQ_TYPE_EDGE_FALLING>; /* PL7 */ + reset-gpios = <&pio 3 5 GPIO_ACTIVE_LOW>; /* PD5 */ + vcc-supply = <®_ldo_io0>; + touchscreen-size-x = <1024>; + touchscreen-size-y = <600>; + }; +}; + &i2c1 { clock-frequency = <400000>; status = "okay"; -- 2.23.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 3/3] arm: dts: sun8i: a83t: a711: Add touchscreen node 2019-10-29 0:58 ` [PATCH 3/3] arm: dts: sun8i: a83t: a711: Add touchscreen node Ondrej Jirman @ 2019-10-29 8:30 ` Maxime Ripard 2019-10-29 9:08 ` Marco Felsch 1 sibling, 0 replies; 13+ messages in thread From: Maxime Ripard @ 2019-10-29 8:30 UTC (permalink / raw) To: Ondrej Jirman Cc: linux-sunxi, Dmitry Torokhov, Rob Herring, Mark Rutland, Chen-Yu Tsai, Marco Felsch, Andy Shevchenko, Greg Kroah-Hartman, Mylène Josserand, linux-input, devicetree, linux-kernel, linux-arm-kernel [-- Attachment #1: Type: text/plain, Size: 320 bytes --] On Tue, Oct 29, 2019 at 01:58:06AM +0100, Ondrej Jirman wrote: > From: Mylène Josserand <mylene.josserand@bootlin.com> > > Enable a FocalTech EDT-FT5x06 Polytouch touchscreen. > > Signed-off-by: Ondrej Jirman <megous@megous.com> > Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> Applied, thanks [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/3] arm: dts: sun8i: a83t: a711: Add touchscreen node 2019-10-29 0:58 ` [PATCH 3/3] arm: dts: sun8i: a83t: a711: Add touchscreen node Ondrej Jirman 2019-10-29 8:30 ` Maxime Ripard @ 2019-10-29 9:08 ` Marco Felsch 2019-10-29 11:13 ` Ondřej Jirman 1 sibling, 1 reply; 13+ messages in thread From: Marco Felsch @ 2019-10-29 9:08 UTC (permalink / raw) To: Ondrej Jirman Cc: linux-sunxi, Dmitry Torokhov, Rob Herring, Mark Rutland, Maxime Ripard, Chen-Yu Tsai, Andy Shevchenko, Greg Kroah-Hartman, Mylène Josserand, linux-input, devicetree, linux-kernel, linux-arm-kernel Hi, On 19-10-29 01:58, Ondrej Jirman wrote: > From: Mylène Josserand <mylene.josserand@bootlin.com> > > Enable a FocalTech EDT-FT5x06 Polytouch touchscreen. > > Signed-off-by: Ondrej Jirman <megous@megous.com> > Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> > --- > arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts > index 568b90ece342..19f520252dc5 100644 > --- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts > +++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts > @@ -164,6 +164,22 @@ > status = "okay"; > }; > > +&i2c0 { > + clock-frequency = <400000>; > + status = "okay"; > + > + touchscreen@38 { > + compatible = "edt,edt-ft5x06"; > + reg = <0x38>; > + interrupt-parent = <&r_pio>; > + interrupts = <0 7 IRQ_TYPE_EDGE_FALLING>; /* PL7 */ > + reset-gpios = <&pio 3 5 GPIO_ACTIVE_LOW>; /* PD5 */ > + vcc-supply = <®_ldo_io0>; > + touchscreen-size-x = <1024>; > + touchscreen-size-y = <600>; Do you want this touchscreen as wakeup-src? If so please add the property here. I've send patches converting the driver from the default behaviour: https://patchwork.kernel.org/cover/11149039/ and all agreed to break backward compatibility. Regards, Marco > + }; > +}; > + > &i2c1 { > clock-frequency = <400000>; > status = "okay"; > -- > 2.23.0 > > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/3] arm: dts: sun8i: a83t: a711: Add touchscreen node 2019-10-29 9:08 ` Marco Felsch @ 2019-10-29 11:13 ` Ondřej Jirman 0 siblings, 0 replies; 13+ messages in thread From: Ondřej Jirman @ 2019-10-29 11:13 UTC (permalink / raw) To: Marco Felsch Cc: linux-sunxi, Dmitry Torokhov, Rob Herring, Mark Rutland, Maxime Ripard, Chen-Yu Tsai, Andy Shevchenko, Greg Kroah-Hartman, Mylène Josserand, linux-input, devicetree, linux-kernel, linux-arm-kernel Hello Marco, On Tue, Oct 29, 2019 at 10:08:01AM +0100, Marco Felsch wrote: > Hi, > > On 19-10-29 01:58, Ondrej Jirman wrote: > > From: Mylène Josserand <mylene.josserand@bootlin.com> > > > > Enable a FocalTech EDT-FT5x06 Polytouch touchscreen. > > > > Signed-off-by: Ondrej Jirman <megous@megous.com> > > Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> > > --- > > arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 16 ++++++++++++++++ > > 1 file changed, 16 insertions(+) > > > > diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts > > index 568b90ece342..19f520252dc5 100644 > > --- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts > > +++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts > > @@ -164,6 +164,22 @@ > > status = "okay"; > > }; > > > > +&i2c0 { > > + clock-frequency = <400000>; > > + status = "okay"; > > + > > + touchscreen@38 { > > + compatible = "edt,edt-ft5x06"; > > + reg = <0x38>; > > + interrupt-parent = <&r_pio>; > > + interrupts = <0 7 IRQ_TYPE_EDGE_FALLING>; /* PL7 */ > > + reset-gpios = <&pio 3 5 GPIO_ACTIVE_LOW>; /* PD5 */ > > + vcc-supply = <®_ldo_io0>; > > + touchscreen-size-x = <1024>; > > + touchscreen-size-y = <600>; > > Do you want this touchscreen as wakeup-src? If so please add the > property here. I've send patches converting the driver from the default > behaviour: https://patchwork.kernel.org/cover/11149039/ and all agreed > to break backward compatibility. Not at this moment, thank you. regards, o. > Regards, > Marco > > > + }; > > +}; > > + > > &i2c1 { > > clock-frequency = <400000>; > > status = "okay"; > > -- > > 2.23.0 > > > > > > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/3] Add touchscreen support for TBS A711 Tablet 2019-10-29 0:58 [PATCH 0/3] Add touchscreen support for TBS A711 Tablet Ondrej Jirman ` (2 preceding siblings ...) 2019-10-29 0:58 ` [PATCH 3/3] arm: dts: sun8i: a83t: a711: Add touchscreen node Ondrej Jirman @ 2019-10-29 4:15 ` Dmitry Torokhov 2019-10-29 9:04 ` Marco Felsch 3 siblings, 1 reply; 13+ messages in thread From: Dmitry Torokhov @ 2019-10-29 4:15 UTC (permalink / raw) To: Ondrej Jirman Cc: linux-sunxi, Rob Herring, Mark Rutland, Maxime Ripard, Chen-Yu Tsai, Marco Felsch, Andy Shevchenko, Greg Kroah-Hartman, Mylène Josserand, linux-input, devicetree, linux-kernel, linux-arm-kernel On Tue, Oct 29, 2019 at 01:58:03AM +0100, Ondrej Jirman wrote: > This is a resurrection of https://lkml.org/lkml/2018/7/25/143 > > Compared to v4 of Mylène's series I've dropped all attempts to > power off the chip during suspend. This patch just enables the > regulator during probe and disables it on driver rmmod. > > I've tested the driver with suspend/resume and touching the > panel resumes my soc. OK, I guess we can revisit when someone really needs power savings in suspend... I folded bindings into the driver change and applied, dts changes should go through respective tree. Thanks. -- Dmitry ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/3] Add touchscreen support for TBS A711 Tablet 2019-10-29 4:15 ` [PATCH 0/3] Add touchscreen support for TBS A711 Tablet Dmitry Torokhov @ 2019-10-29 9:04 ` Marco Felsch 0 siblings, 0 replies; 13+ messages in thread From: Marco Felsch @ 2019-10-29 9:04 UTC (permalink / raw) To: Dmitry Torokhov Cc: Ondrej Jirman, linux-sunxi, Rob Herring, Mark Rutland, Maxime Ripard, Chen-Yu Tsai, Andy Shevchenko, Greg Kroah-Hartman, Mylène Josserand, linux-input, devicetree, linux-kernel, linux-arm-kernel Hi, On 19-10-28 21:15, Dmitry Torokhov wrote: > On Tue, Oct 29, 2019 at 01:58:03AM +0100, Ondrej Jirman wrote: > > This is a resurrection of https://lkml.org/lkml/2018/7/25/143 > > > > Compared to v4 of Mylène's series I've dropped all attempts to > > power off the chip during suspend. This patch just enables the > > regulator during probe and disables it on driver rmmod. > > > > I've tested the driver with suspend/resume and touching the > > panel resumes my soc. > > OK, I guess we can revisit when someone really needs power savings in > suspend... Please have a look on https://patchwork.kernel.org/cover/11149039/. I've already send patches for it. Regards, Marco > I folded bindings into the driver change and applied, dts changes should > go through respective tree. > > Thanks. > > -- > Dmitry > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2019-10-29 11:30 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-10-29 0:58 [PATCH 0/3] Add touchscreen support for TBS A711 Tablet Ondrej Jirman 2019-10-29 0:58 ` [PATCH 1/3] input: edt-ft5x06: Add support for regulator Ondrej Jirman 2019-10-29 4:12 ` Dmitry Torokhov 2019-10-29 8:55 ` Marco Felsch 2019-10-29 11:21 ` Ondřej Jirman 2019-10-29 11:29 ` Marco Felsch 2019-10-29 0:58 ` [PATCH 2/3] dt-bindings: input: edt-ft5x06: Add regulator support Ondrej Jirman 2019-10-29 0:58 ` [PATCH 3/3] arm: dts: sun8i: a83t: a711: Add touchscreen node Ondrej Jirman 2019-10-29 8:30 ` Maxime Ripard 2019-10-29 9:08 ` Marco Felsch 2019-10-29 11:13 ` Ondřej Jirman 2019-10-29 4:15 ` [PATCH 0/3] Add touchscreen support for TBS A711 Tablet Dmitry Torokhov 2019-10-29 9:04 ` Marco Felsch
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).