Message ID | 20150118202447.GA29014@amd (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sun, Jan 18, 2015 at 09:24:47PM +0100, Pavel Machek wrote: > > When periodic mode is not enabled, it is neccessary to force reads. > > Signed-off-by: Pavel Machek <pavel@ucw.cz> This is a malformed patch. here is patch output (or git am) patching file drivers/thermal/ti-soc-thermal/ti-bandgap.c patch: **** malformed patch at line 68: (english) http://www.livejournal.com/~pavelmachek I would really recommend you to use git to send your patches to avoid such problems. Can you please resend this patch in its proper format? > > diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c > index 634b6ce..2fde78c 100644 > --- 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,21 @@ 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); > + if (ret) > + return ret; > + } > + > spin_lock(&bgp->lock); > temp = ti_bandgap_read_temp(bgp, id); > > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Tue 2015-03-24 12:30:34, Eduardo Valentin wrote: > On Sun, Jan 18, 2015 at 09:24:47PM +0100, Pavel Machek wrote: > > > > When periodic mode is not enabled, it is neccessary to force reads. > > > > Signed-off-by: Pavel Machek <pavel@ucw.cz> > > This is a malformed patch. here is patch output (or git am) > patching file drivers/thermal/ti-soc-thermal/ti-bandgap.c > patch: **** malformed patch at line 68: (english) > http://www.livejournal.com/~pavelmachek Sorry about that. You should have fixed [PATCHv3] in your inbox now. > I would really recommend you to use git to send your patches to avoid > such problems. Can you please resend this patch in its proper > format? Done. I verified that the other 2 patches are ok, by applying them in following order: Subject: [PATCHv3] ti-soc-thermal: request temperature periodically if hw can't do that itself Date: Sun, 18 Jan 2015 21:20:51 +0100 From: Pavel Machek <pavel@ucw.cz> Subject: [PATCHv2] ti-soc-thermal: implement eocz bit to make driver useful on omap3 Date: Sun, 18 Jan 2015 21:17:10 +0100 From: Pavel Machek <pavel@ucw.cz> Subject: [PATCHv2] cleanup ti-soc-thermal Best regards and thanks for patience, Pavel
diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c index 634b6ce..2fde78c 100644 --- 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,21 @@ 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); + if (ret) + return ret; + } + spin_lock(&bgp->lock); temp = ti_bandgap_read_temp(bgp, id); -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
When periodic mode is not enabled, it is neccessary to force reads. Signed-off-by: Pavel Machek <pavel@ucw.cz>