Hi!

> diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
> index e6f92b4..6700191 100644
> --- a/drivers/power/Kconfig
> +++ b/drivers/power/Kconfig
> @@ -309,6 +309,7 @@ config CHARGER_MANAGER
>       bool "Battery charger manager for multiple chargers"
>       depends on REGULATOR && RTC_CLASS
>       select EXTCON
> +     select IIO
>       help
>            Say Y to enable charger-manager support, which allows multiple
>            chargers attached to a battery and multiple batteries attached to a

Umm. Are there charger-manager users that don't have temperature sensor on IIO?

> +     if (desc->channel) {
> +             temp = iio_read_channel_raw(desc->channel, last_temp_mC);
> +
> +             /*
> +              * The charger-manager use IIO subsystem to read ADC raw data
> +              * from IIO ADC device drvier. The each device driver has
> +              * own non-standard ADC table. If user of charger-manager
> +              * would like to get correct temperature value, have to convert
> +              * 'last_temp_mC' variable according to proper calculation
> +              * method and own ADC table.
> +              */
> +
> +             if (*last_temp_mC >= desc->iio_adc_overheat)
> +                     temp = CM_TEMP_NORMAL;  /* Overheat */
> +             else if (*last_temp_mC <= desc->iio_adc_cold)
> +                     temp = CM_TEMP_COLD;    /* Cold */
> +             else
> +                     temp = CM_TEMP_NORMAL;  /* Normal */

Something is definitely wrong here.
                                                                        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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to