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]
Message-ID: <20150103162241.GA26680@amd>
Date:	Sat, 3 Jan 2015 17:22:42 +0100
From:	Pavel Machek <pavel@....cz>
To:	Eduardo Valentin <edubezval@...il.com>
Cc:	pali.rohar@...il.com, sre@...ian.org, sre@...g0.de,
	kernel list <linux-kernel@...r.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
	linux-omap@...r.kernel.org, tony@...mide.com, khilman@...nel.org,
	aaro.koskinen@....fi, ivo.g.dimitrov.75@...il.com,
	rui.zhang@...el.com, linux-pm@...r.kernel.org
Subject: Re: [PATCH] ti-soc-thermal: implement eocz bit to make driver useful
 on omap3

Hi!

> > When periodic mode is not enabled, it is neccessary to force reads.
> > 
> > Signed-off-by: Pavel Machek <pavel@....cz>
> > 

> > --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> > +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> > @@ -43,6 +43,8 @@
> >  
> >  #include "ti-bandgap.h"
> >  
> > +static int ti_bandgap_force_single_read(struct ti_bandgap *bgp, int id);
> > +
> >  /***   Helper functions to access registers and their bitfields   ***/
> >  
> >  /**
> > @@ -852,14 +831,20 @@ int ti_bandgap_read_temperature(struct ti_bandgap *bgp, int id,
> >  	if (ret)
> >  		return ret;
> >  
> > +	if (!TI_BANDGAP_HAS(bgp, MODE_CONFIG)) {
> > +		ret = ti_bandgap_force_single_read(bgp, id);
> 
> not sure MODE_CONFIG is sufficient condition for single read on all OMAP
> versions.

Ok, what do you suggest? AFAICT, without MODE_CONFIG, continuous ADC
mode is not available, so we have to force it periodically, so this
should be correct.

> > +		if (ret)
> > +			return ret;
> > +	}
> > +
> >  	spin_lock(&bgp->lock);
> >  	temp = ti_bandgap_read_temp(bgp, id);
> >  	spin_unlock(&bgp->lock);
> >  
> > -	ret |= ti_bandgap_adc_to_mcelsius(bgp, temp, &temp);
> > +	ret = ti_bandgap_adc_to_mcelsius(bgp, temp, &temp);
> 
> this one should be part of your clean up patch

Ok, can you apply the cleanup patch and I'll prepare one on the top of
it?

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ