Re: [PATCH 07/15] twl4030_charger: allow fine control of charger current.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> +	/* ichg values in uA. If any are 'large', we set CGAIN to
> +	 * '1' which doubles the range for half the precision.
> +	 */
> +	int			ichg_eoc, ichg_lo, ichg_hi, cur;

We should really get uA_t.

[Plus, this is not kernel comment style, but...]

> +	/* For ichg_eoc, reg value must be 100XXXX000, we only
> +	 * set the XXXX in high nibble.
> +	 */

Confused. High nibble is 0xf0, right?

> +	/* And finally, set the current.  This is stored in
> +	 * two registers. */
> +	reg = ua2regval(bci->cur, cgain);
> +	/* we have only 10 bit */

bits

> @@ -562,6 +698,14 @@ static int __init twl4030_bci_probe(struct platform_device *pdev)
>  	if (!pdata)
>  		pdata = twl4030_bci_parse_dt(&pdev->dev);
>  
> +	bci->ichg_eoc = 80100; /* Stop charging when current drops to here */
> +	bci->ichg_lo = 241000; /* low threshold */

Low

> +	bci->ichg_hi = 500000; /* High threshold */

Acked-by: Pavel Machek <pavel@xxxxxx>

-- 
(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-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux