On Tue, 2012-02-07 at 17:52 +0530, Ashish Jangam wrote:
> Can you consider adding yourself or David as maintainer ? Not a must,
> but no one else would really be able to support the driver.
Thank for this, you can add my name. 
> > +Supported chips:
> > +  * Dialog Semiconductors DA9052-BC and DA9053-AA/Bx PMICs
> > +    Prefix: 'da9052'
> > +    Datasheet: Kindly visit www.dialog-semiconductor.com and request for 
> > the
> > +               official datasheet.
> > +
> Maybe, but that doesn't seem to be straightforward. The web site has no
> search field, and I am not sure who to contact in the contact list. And
> since there does not seem to be support in the US, I am not sure if one
> is expected to contact someone in Europe or Taiwan or some other place. 
> 
> Maybe you can let me know how exactly to get the datasheets - I like to
> keep those around for chips we are supporting.
You need to request for DA9052/53 datasheet from
www.dialog-semiconductor.com/DA9053.php
> 
> > +static ssize_t da9052_read_tjunc(struct device *dev,
> > +                                struct device_attribute *devattr, char 
> > *buf)
> > +{
> > +       struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
> > +       int tjunc, toffset, result;
> > +
> > +       tjunc = da9052_reg_read(hwmon->da9052, DA9052_TJUNC_RES_REG);
> > +       if (tjunc < 0)
> > +               return tjunc;
> > +
> > +       toffset = da9052_reg_read(hwmon->da9052, DA9052_T_OFFSET_REG);
> > +       if (toffset < 0)
> > +               return toffset;
> > +
> > +       if ((tjunc - toffset) == 0)
> > +               result = 0;
> > +       else
> > +               /* Degrees celsius = 1.708 * (TJUNC_RES - T_OFFSET) - 108.8 
> > */
> > +               result = 1708 * (tjunc - toffset) - 108800;
> > +
> 
> Hmm.
>       tjunc = 1, toffset = 2:
>               return 1708 * (-1) - 108800 = -108800 - 1708 = -110508
>       tjunc = 2, toffset = 2:
>               return 0
>       tjunc = 3, toffset = 2:
>               return 1780 * 1 - 108800 = -108800 + 1708 = -107092
> 
> I am not saying this is wrong, not having access to the data sheet, but
> it is a bit odd. Why is the 0-difference case handled differently, and
> why does it return 0 and not, say, -108800 ? 
> 
> If tjunc - toffset < 0 is invalid (no idea if it is, of course), it
> might make sense to detect that condition.
toffset is the trim value used for improving the calculated temperature
accuracy so considering this tjunc - toffset <=0 seems to be not
applicable cases. I will correct this along with your other comments and
will re-submit the patch.



_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to