Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1202265

Re: [PATCH 07/13] twl4030_charger: distinguish between USB current and 'AC' current

From Tony Lindgren <tony@atomide.com>
Newsgroups linux.kernel
Subject Re: [PATCH 07/13] twl4030_charger: distinguish between USB current and 'AC' current
Date 2015-08-07 05:20 +0200
Message-ID <pUGml-3IK-5@gated-at.bofh.it> (permalink)
References <pRJTr-7hl-3@gated-at.bofh.it> <pRJTt-7hl-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* NeilBrown <neil@brown.name> [150729 17:28]:
> --- a/drivers/power/twl4030_charger.c
> +++ b/drivers/power/twl4030_charger.c
>  static int twl4030_charger_update_current(struct twl4030_bci *bci)
>  {
>  	int status;
> +	int cur;
>  	unsigned reg, cur_reg;
>  	u8 bcictl1, oldreg, fullreg;
>  	bool cgain = false;
>  	u8 boot_bci;
>  
> +	/*
> +	 * If AC (Accessory Charger) voltage exceeds 4.5V (MADC 11)
> +	 * and AC is enabled, set current for 'ac'
> +	 */
> +	if (twl4030_get_madc_conversion(11) > 4500) {
> +		cur = bci->ac_cur;
> +		bci->ac_is_active = true;
> +	} else {
> +		cur = bci->usb_cur;
> +		bci->ac_is_active = false;
> +	}
> +
>  	/* First, check thresholds and see if cgain is needed */
>  	if (bci->ichg_eoc >= 200000)
>  		cgain = true;

Neil, you need a stub or something for twl4030_get_madc_conversion
if madc is not selected. Now at least omap2plus_defconfig and
ARM allmodconfig fails in Linux next.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH 07/13] twl4030_charger: distinguish between USB current  and 'AC' current Tony Lindgren <tony@atomide.com> - 2015-08-07 05:20 +0200
  Re: [PATCH 07/13] twl4030_charger: distinguish between USB current  and 'AC' current NeilBrown <neil@brown.name> - 2015-08-07 05:50 +0200
    Re: [PATCH 07/13] twl4030_charger: distinguish between USB current  and 'AC' current Tony Lindgren <tony@atomide.com> - 2015-08-07 06:30 +0200
    Re: [PATCH 07/13] twl4030_charger: distinguish between USB current  and 'AC' current Sebastian Reichel <sre@kernel.org> - 2015-08-07 07:20 +0200
      Re: [PATCH 07/13] twl4030_charger: distinguish between USB current  and 'AC' current NeilBrown <neil@brown.name> - 2015-08-07 07:30 +0200

csiph-web