All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Millbrandt <emillbrandt@dekaresearch.com>
To: Liam Girdwood <lrg@slimlogic.co.uk>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-input@vger.kernel.org,
	Eric Millbrandt <emillbrandt@dekaresearch.com>
Subject: [RFC] Input: wm97xx-core - Remove save state from wm97xx_read_aux_adc()
Date: Wed, 1 Sep 2010 10:52:10 -0400	[thread overview]
Message-ID: <1283352730-15509-1-git-send-email-emillbrandt@dekaresearch.com> (raw)

Saving the state of the digitizers seems unnecessary since the next
sample will rewrite those registers.  It also causes an unnecessary
sample to occur if the previous state was a sample.  This will cause
the wrong sample to be returned on the next call to wm97xx_read_aux_adc().
---
 drivers/input/touchscreen/wm97xx-core.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
index cbfef1e..b4bcb2c 100644
--- a/drivers/input/touchscreen/wm97xx-core.c
+++ b/drivers/input/touchscreen/wm97xx-core.c
@@ -138,9 +138,6 @@ int wm97xx_read_aux_adc(struct wm97xx *wm, u16 adcsel)
                wm97xx_reg_write(wm, AC97_EXTENDED_MID, power & 0x7fff);
        }

-       /* Prepare the codec for AUX reading */
-       wm->codec->aux_prepare(wm);
-
        /* Turn polling mode on to read AUX ADC */
        wm->pen_probably_down = 1;
        wm->codec->poll_sample(wm, adcsel, &auxval);
@@ -148,8 +145,6 @@ int wm97xx_read_aux_adc(struct wm97xx *wm, u16 adcsel)
        if (power_adc)
                wm97xx_reg_write(wm, AC97_EXTENDED_MID, power | 0x8000);

-       wm->codec->dig_restore(wm);
-
        wm->pen_probably_down = 0;

        mutex_unlock(&wm->codec_mutex);
--
1.6.3.1

-DISCLAIMER: an automatically appended disclaimer may follow. By posting-
-to a public e-mail mailing list I hereby grant permission to distribute-
-and copy this message.-

This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.

             reply	other threads:[~2010-09-01 15:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-01 14:52 Eric Millbrandt [this message]
2010-09-01 17:19 ` [RFC] Input: wm97xx-core - Remove save state from wm97xx_read_aux_adc() Mark Brown
2010-09-01 18:46   ` Eric Millbrandt
2010-09-01 18:46     ` Mark Brown
2010-09-01 19:17       ` Eric Millbrandt
2010-09-02 14:40         ` Mark Brown
2010-09-02 15:32           ` Eric Millbrandt
2010-09-02 16:16             ` Mark Brown

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=1283352730-15509-1-git-send-email-emillbrandt@dekaresearch.com \
    --to=emillbrandt@dekaresearch.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-input@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    /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.