* Re: [PATCH RFT 2/5] iio: mxs-lradc: move TS config into suitable function
[not found] ` <570FF737.4050606@denx.de>
@ 2016-04-17 10:13 ` Jonathan Cameron
2016-04-17 12:19 ` Torokhov
[not found] ` <571361DD.1090001-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
0 siblings, 2 replies; 6+ messages in thread
From: Jonathan Cameron @ 2016-04-17 10:13 UTC (permalink / raw)
To: Marek Vasut, Stefan Wahren, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler
Cc: Ksenija Stanojevic, Fabio Estevam, Juergen Borleis,
Alexandre Belloni, linux-iio, linux-arm-kernel, Torokhov,
linux-input@vger.kernel.org
On 14/04/16 21:01, Marek Vasut wrote:
> On 04/14/2016 05:48 PM, Stefan Wahren wrote:
>> This patch moves the touchscreen type configuration into
>> a more suitable function. Btw this simplifies PM ops later.
>>
>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>
> Looks OK
>
> Reviewed-by: Marek Vasut <marex@denx.de>
Please do CC Dmitry and linux-input on any patches 'touching' the
touchscreen parts of the driver. I'm happy this one is simple
enough to apply anyway, but best to make sure everyone is in the
loop.
Something a little odd happened when applying the patch. Automerging
failed so I did it by hand. Not sure what had changed!
Anyhow, please sanity check I haven't messed it up.
Applied to the togreg branch of iio.git - initially pushed out as
testing for the autobuilders to play with it.
Thanks,
Jonathan
>
>> ---
>> drivers/iio/adc/mxs-lradc.c | 21 +++++++++++----------
>> 1 file changed, 11 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/iio/adc/mxs-lradc.c b/drivers/iio/adc/mxs-lradc.c
>> index 0576953..7118fca 100644
>> --- a/drivers/iio/adc/mxs-lradc.c
>> +++ b/drivers/iio/adc/mxs-lradc.c
>> @@ -686,6 +686,17 @@ static void mxs_lradc_prepare_pressure(struct mxs_lradc *lradc)
>>
>> static void mxs_lradc_enable_touch_detection(struct mxs_lradc *lradc)
>> {
>> + /* Configure the touchscreen type */
>> + if (lradc->soc == IMX28_LRADC) {
>> + mxs_lradc_reg_clear(lradc, LRADC_CTRL0_MX28_TOUCH_SCREEN_TYPE,
>> + LRADC_CTRL0);
>> +
>> + if (lradc->use_touchscreen == MXS_LRADC_TOUCHSCREEN_5WIRE)
>> + mxs_lradc_reg_set(lradc,
>> + LRADC_CTRL0_MX28_TOUCH_SCREEN_TYPE,
>> + LRADC_CTRL0);
>> + }
>> +
>> mxs_lradc_setup_touch_detection(lradc);
>>
>> lradc->cur_plate = LRADC_TOUCH;
>> @@ -1491,16 +1502,6 @@ static int mxs_lradc_hw_init(struct mxs_lradc *lradc)
>> mxs_lradc_reg_wrt(lradc, 0, LRADC_DELAY(2));
>> mxs_lradc_reg_wrt(lradc, 0, LRADC_DELAY(3));
>>
>> - /* Configure the touchscreen type */
>> - if (lradc->soc == IMX28_LRADC) {
>> - mxs_lradc_reg_clear(lradc, LRADC_CTRL0_MX28_TOUCH_SCREEN_TYPE,
>> - LRADC_CTRL0);
>> -
>> - if (lradc->use_touchscreen == MXS_LRADC_TOUCHSCREEN_5WIRE)
>> - mxs_lradc_reg_set(lradc, LRADC_CTRL0_MX28_TOUCH_SCREEN_TYPE,
>> - LRADC_CTRL0);
>> - }
>> -
>> /* Start internal temperature sensing. */
>> mxs_lradc_reg_wrt(lradc, 0, LRADC_CTRL2);
>>
>>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RFT 2/5] iio: mxs-lradc: move TS config into suitable function
2016-04-17 10:13 ` [PATCH RFT 2/5] iio: mxs-lradc: move TS config into suitable function Jonathan Cameron
@ 2016-04-17 12:19 ` Torokhov
[not found] ` <571361DD.1090001-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
1 sibling, 0 replies; 6+ messages in thread
From: Torokhov @ 2016-04-17 12:19 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Marek Vasut, Stefan Wahren, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Ksenija Stanojevic, Fabio Estevam,
Juergen Borleis, Alexandre Belloni, linux-iio, linux-arm-kernel,
linux-input@vger.kernel.org
On Sun, Apr 17, 2016 at 11:13:49AM +0100, Jonathan Cameron wrote:
> On 14/04/16 21:01, Marek Vasut wrote:
> > On 04/14/2016 05:48 PM, Stefan Wahren wrote:
> >> This patch moves the touchscreen type configuration into
> >> a more suitable function. Btw this simplifies PM ops later.
> >>
> >> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> >
> > Looks OK
> >
> > Reviewed-by: Marek Vasut <marex@denx.de>
> Please do CC Dmitry and linux-input on any patches 'touching' the
> touchscreen parts of the driver. I'm happy this one is simple
> enough to apply anyway, but best to make sure everyone is in the
> loop.
FWIW:
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>
> Something a little odd happened when applying the patch. Automerging
> failed so I did it by hand. Not sure what had changed!
>
> Anyhow, please sanity check I haven't messed it up.
>
> Applied to the togreg branch of iio.git - initially pushed out as
> testing for the autobuilders to play with it.
>
> Thanks,
>
>
> Jonathan
> >
> >> ---
> >> drivers/iio/adc/mxs-lradc.c | 21 +++++++++++----------
> >> 1 file changed, 11 insertions(+), 10 deletions(-)
> >>
> >> diff --git a/drivers/iio/adc/mxs-lradc.c b/drivers/iio/adc/mxs-lradc.c
> >> index 0576953..7118fca 100644
> >> --- a/drivers/iio/adc/mxs-lradc.c
> >> +++ b/drivers/iio/adc/mxs-lradc.c
> >> @@ -686,6 +686,17 @@ static void mxs_lradc_prepare_pressure(struct mxs_lradc *lradc)
> >>
> >> static void mxs_lradc_enable_touch_detection(struct mxs_lradc *lradc)
> >> {
> >> + /* Configure the touchscreen type */
> >> + if (lradc->soc == IMX28_LRADC) {
> >> + mxs_lradc_reg_clear(lradc, LRADC_CTRL0_MX28_TOUCH_SCREEN_TYPE,
> >> + LRADC_CTRL0);
> >> +
> >> + if (lradc->use_touchscreen == MXS_LRADC_TOUCHSCREEN_5WIRE)
> >> + mxs_lradc_reg_set(lradc,
> >> + LRADC_CTRL0_MX28_TOUCH_SCREEN_TYPE,
> >> + LRADC_CTRL0);
> >> + }
> >> +
> >> mxs_lradc_setup_touch_detection(lradc);
> >>
> >> lradc->cur_plate = LRADC_TOUCH;
> >> @@ -1491,16 +1502,6 @@ static int mxs_lradc_hw_init(struct mxs_lradc *lradc)
> >> mxs_lradc_reg_wrt(lradc, 0, LRADC_DELAY(2));
> >> mxs_lradc_reg_wrt(lradc, 0, LRADC_DELAY(3));
> >>
> >> - /* Configure the touchscreen type */
> >> - if (lradc->soc == IMX28_LRADC) {
> >> - mxs_lradc_reg_clear(lradc, LRADC_CTRL0_MX28_TOUCH_SCREEN_TYPE,
> >> - LRADC_CTRL0);
> >> -
> >> - if (lradc->use_touchscreen == MXS_LRADC_TOUCHSCREEN_5WIRE)
> >> - mxs_lradc_reg_set(lradc, LRADC_CTRL0_MX28_TOUCH_SCREEN_TYPE,
> >> - LRADC_CTRL0);
> >> - }
> >> -
> >> /* Start internal temperature sensing. */
> >> mxs_lradc_reg_wrt(lradc, 0, LRADC_CTRL2);
> >>
> >>
> >
> >
>
--
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RFT 0/5] iio: mxs-lradc: fix leak and implement PM ops
[not found] ` <570FF5AF.7010801@denx.de>
@ 2016-04-18 6:17 ` Stefan Wahren
[not found] ` <57147BEF.4070606-eS4NqCHxEME@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Wahren @ 2016-04-18 6:17 UTC (permalink / raw)
To: Marek Vasut, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler
Cc: Ksenija Stanojevic, linux-iio, Alexandre Belloni, Fabio Estevam,
linux-arm-kernel, linux-input, dmitry.torokhov
Am 14.04.2016 um 21:55 schrieb Marek Vasut:
> On 04/14/2016 05:48 PM, Stefan Wahren wrote:
>> This patch series fix a memory leak and implements suspend/resume
>> support for mxs-lradc.
>>
>> Patch 1: fix the memory leak
>> Patch 2-4: refactor mxs-lradc in order to prepare PM implementation
>> Patch 5: implement suspend/resume support
>>
>> These patches has been tested with i.MX23 and i.MX28 but without
>> a touchscreen. I added only a bogus touchscreen in devicetree.
>>
>> It would be nice if someone with a real touchscreen could test it.
>>
>> Stefan Wahren (5):
>> iio: mxs-lradc: fix memory leak
>> iio: mxs-lradc: move TS config into suitable function
>> iio: mxs-lradc: move STMP reset out of ADC init
>> iio: mxs-lradc: disable only mapped channels in mxs_lradc_hw_stop
>> iio: mxs-lradc: implement suspend/resume support
>>
>> drivers/iio/adc/mxs-lradc.c | 116 ++++++++++++++++++++++++++++++-------------
>> 1 file changed, 82 insertions(+), 34 deletions(-)
>>
> On M28EVK:
>
> Tested-by: Marek Vasut <marex@denx.de>
>
Thanks. Only one question, does it imply a test with a touchscreen?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RFT 2/5] iio: mxs-lradc: move TS config into suitable function
[not found] ` <571361DD.1090001-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2016-04-18 6:26 ` Stefan Wahren
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Wahren @ 2016-04-18 6:26 UTC (permalink / raw)
To: Jonathan Cameron, Marek Vasut, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler
Cc: Ksenija Stanojevic, linux-iio-u79uwXL29TY76Z2rM5mHXA, Torokhov,
Alexandre Belloni,
linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Fabio Estevam, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Am 17.04.2016 um 12:13 schrieb Jonathan Cameron:
> On 14/04/16 21:01, Marek Vasut wrote:
>> On 04/14/2016 05:48 PM, Stefan Wahren wrote:
>>> This patch moves the touchscreen type configuration into
>>> a more suitable function. Btw this simplifies PM ops later.
>>>
>>> Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
>> Looks OK
>>
>> Reviewed-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
> Please do CC Dmitry and linux-input on any patches 'touching' the
> touchscreen parts of the driver. I'm happy this one is simple
> enough to apply anyway, but best to make sure everyone is in the
> loop.
>
> Something a little odd happened when applying the patch. Automerging
> failed so I did it by hand. Not sure what had changed!
>
> Anyhow, please sanity check I haven't messed it up.
Everything is fine. There was a indention conflict between Ksenija's and
my patch.
>
> Applied to the togreg branch of iio.git - initially pushed out as
> testing for the autobuilders to play with it.
>
> Thanks,
>
>
> Jonathan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RFT 4/5] iio: mxs-lradc: disable only mapped channels in mxs_lradc_hw_stop
[not found] ` <571369AA.8060106-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2016-04-18 6:36 ` Stefan Wahren
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Wahren @ 2016-04-18 6:36 UTC (permalink / raw)
To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Marek Vasut
Cc: Ksenija Stanojevic, linux-iio-u79uwXL29TY76Z2rM5mHXA,
Alexandre Belloni, Fabio Estevam,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Torokhov,
linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hi Jonathan,
Am 17.04.2016 um 12:47 schrieb Jonathan Cameron:
> On 14/04/16 16:48, Stefan Wahren wrote:
>> Disabling of the touchscreen IRQs is already done in
>> mxs_lradc_disable_ts. There is no need to disable them in
>> mxs_lradc_hw_stop again.
> We could do with a little more documentation in the driver on
> which bits in this register are doing what.
>
> The disable_ts deals with bits 22-24...
> The only other bit I think is ever used by the driver currently is
> 16 (channel 0).
>
> So whilst this change probably works, I'm not sure of the logic behind it.
> As far as I can tell your new clear is fine but in reality you could
> just clear (0x3f << 16) and get the same result (which would be clearer
> to my mind).
>
> The key think here is that we don't support the higher bits on i.mx28
> yet... Which are for button detection and threshold detection.
>
> Have I understood this correctly?
Yes, you are. I've have looked to long in the reference manual instead
of the code.
I've missed the point that virtual channel 6 and 7 are used in case of a
connected touchscreen.
I should use the member buffer_vchans for masking the enable IRQs.
Regards
Stefan
>
> Jonathan
> So we only need to care of the
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RFT 0/5] iio: mxs-lradc: fix leak and implement PM ops
[not found] ` <57147BEF.4070606-eS4NqCHxEME@public.gmane.org>
@ 2016-04-18 10:44 ` Marek Vasut
0 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2016-04-18 10:44 UTC (permalink / raw)
To: Stefan Wahren, Jonathan Cameron, Hartmut Knaack,
Lars-Peter Clausen, Peter Meerwald-Stadler
Cc: Ksenija Stanojevic, linux-iio-u79uwXL29TY76Z2rM5mHXA,
Alexandre Belloni, Fabio Estevam,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-input-u79uwXL29TY76Z2rM5mHXA,
dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w
On 04/18/2016 08:17 AM, Stefan Wahren wrote:
> Am 14.04.2016 um 21:55 schrieb Marek Vasut:
>> On 04/14/2016 05:48 PM, Stefan Wahren wrote:
>>> This patch series fix a memory leak and implements suspend/resume
>>> support for mxs-lradc.
>>>
>>> Patch 1: fix the memory leak
>>> Patch 2-4: refactor mxs-lradc in order to prepare PM implementation
>>> Patch 5: implement suspend/resume support
>>>
>>> These patches has been tested with i.MX23 and i.MX28 but without
>>> a touchscreen. I added only a bogus touchscreen in devicetree.
>>>
>>> It would be nice if someone with a real touchscreen could test it.
>>>
>>> Stefan Wahren (5):
>>> iio: mxs-lradc: fix memory leak
>>> iio: mxs-lradc: move TS config into suitable function
>>> iio: mxs-lradc: move STMP reset out of ADC init
>>> iio: mxs-lradc: disable only mapped channels in mxs_lradc_hw_stop
>>> iio: mxs-lradc: implement suspend/resume support
>>>
>>> drivers/iio/adc/mxs-lradc.c | 116 ++++++++++++++++++++++++++++++-------------
>>> 1 file changed, 82 insertions(+), 34 deletions(-)
>>>
>> On M28EVK:
>>
>> Tested-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
>>
>
>
> Thanks. Only one question, does it imply a test with a touchscreen?
>
Yes, this one [1]. It's an Ampire 800480 display and resistive touch
on top of it.
[1] http://www.denx-cs.de/?q=MxxDK
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-18 10:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1460648909-2657-1-git-send-email-stefan.wahren@i2se.com>
[not found] ` <1460648909-2657-3-git-send-email-stefan.wahren@i2se.com>
[not found] ` <570FF737.4050606@denx.de>
2016-04-17 10:13 ` [PATCH RFT 2/5] iio: mxs-lradc: move TS config into suitable function Jonathan Cameron
2016-04-17 12:19 ` Torokhov
[not found] ` <571361DD.1090001-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-04-18 6:26 ` Stefan Wahren
[not found] ` <570FF5AF.7010801@denx.de>
2016-04-18 6:17 ` [PATCH RFT 0/5] iio: mxs-lradc: fix leak and implement PM ops Stefan Wahren
[not found] ` <57147BEF.4070606-eS4NqCHxEME@public.gmane.org>
2016-04-18 10:44 ` Marek Vasut
[not found] ` <1460648909-2657-5-git-send-email-stefan.wahren@i2se.com>
[not found] ` <571369AA.8060106@kernel.org>
[not found] ` <571369AA.8060106-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-04-18 6:36 ` [PATCH RFT 4/5] iio: mxs-lradc: disable only mapped channels in mxs_lradc_hw_stop Stefan Wahren
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).