lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 Jun 2010 14:42:10 +0200
From:	Luotao Fu <l.fu@...gutronix.de>
To:	Rabin VINCENT <rabin.vincent@...ricsson.com>
Cc:	Luotao Fu <l.fu@...gutronix.de>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Linus WALLEIJ <linus.walleij@...ricsson.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	STEricsson_nomadik_linux <STEricsson_nomadik_linux@...t.st.com>
Subject: Re: [PATCH 6/6 V4] input: STMPE touch controller support

Hi Rabin,

On Thu, Jun 24, 2010 at 06:01:53PM +0530, Rabin VINCENT wrote:
> On Thu, Jun 24, 2010 at 13:13:41 +0200, Luotao Fu wrote:
> > +       adc_ctrl1 = SAMPLE_TIME(ts->sample_time) | MOD_12B(ts->mod_12b) |
> > +               REF_SEL(ts->ref_sel);
> > +       ret = stmpe_set_bits(stmpe, STMPE_REG_ADC_CTRL1,
> > +                       adc_ctrl1, adc_ctrl1);
> > +       if (ret) {
> > +               dev_err(&pdev->dev, "Could not setup ADC\n");
> > +               goto err_free_irq;
> > +       }
> > +
> > +       ret = stmpe_set_bits(stmpe, STMPE_REG_ADC_CTRL2,
> > +                       ADC_FREQ(ts->adc_freq), ADC_FREQ(ts->adc_freq));
> > +       if (ret) {
> > +               dev_err(&pdev->dev, "Could not setup ADC\n");
> > +               goto err_free_irq;
> > +       }
> > +
> > +       tsc_cfg = AVE_CTRL(ts->ave_ctrl) | DET_DELAY(ts->touch_det_delay) |
> > +                       SETTLING(ts->settling);
> > +       ret = stmpe_set_bits(stmpe, STMPE_REG_TSC_CFG, tsc_cfg, tsc_cfg);
> > +       if (ret) {
> > +               dev_err(&pdev->dev, "Could not config touch\n");
> > +               goto err_free_irq;
> > +       }
> > +
> > +       ret = stmpe_set_bits(stmpe, STMPE_REG_TSC_FRACTION_Z,
> > +                       FRACTION_Z(ts->fraction_z),
> > +                       FRACTION_Z(ts->fraction_z));
> 
> I think your earlier revisions had this same behaviour, but this only
> writes the bits you are trying to set, and it may be a problem if there
> are other bits already set in this field.  I don't know if this is a
> concern with this block, but if it is, you can do something like the
> following to clear out the field before writing:
> 

This is done intentionally to leave the bits alone which I don't want.
Most of the registers here are used exclusively for the touchscreen.
Some others are shared with the ADC. The ADC however doesn't have any
own configuration and has to go with the configuration of the touch
screen. Hence it's OK, even probably better not to touch the bits we
don't need.

cheers
Luotao Fu
-- 
Pengutronix e.K.                           | Dipl.-Ing. Luotao Fu        |
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 |

Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ