Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: Sebastian Reichel <sre@debian.org>,
	Felipe Contreras <felipe.contreras@nokia.com>,
	linux-main <linux-kernel@vger.kernel.org>,
	linux-omap <linux-omap@vger.kernel.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Aliaksei Katovich <aliaksei.katovich@nokia.com>,
	Vladimir Zapolskiy <vz@mleia.com>
Subject: Re: [PATCH] mfd: add bq2415x charger driver
Date: Tue, 06 Dec 2011 14:34:59 +0100	[thread overview]
Message-ID: <1432607.e4Z4IWXQZY@pali-elitebook> (raw)
In-Reply-To: <CAMP44s3JF9QM00x=aUq3tHGfeuTRnKMbT2WrMseZXZTJg1qUyQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2209 bytes --]

Hi,

On Tuesday 06 December 2011 04:49:37 you wrote:
> Hi,
> 
> 2011/12/6 Sebastian Reichel <sre@debian.org>:
> > Good to hear somebody is working on this :) I planned to do this
> > myself, but didn't find any time for it. Here are some comments
> :
> > from me:
> :)
> :
> > [...]
> > 
> >> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> > 
> > I would expect the driver in drivers/power. But maybe MFD is
> > better, since the chip can also be used to power USB host?

Yes, chip support usb host mode and is working on rx51.

> 
> Perhaps, at least I haven't tried that.
> 
> > [...]
> > 
> >> +#define BQ2415X_VOLTAGE_SCALE 20000
> > 
> > If I remember correctly (I read the specs some time ago), this can
> > be configured via external resistor. So this is board specific?
> 
> Not really. There are 6 bits: 640, 320, 160, 80, 40, 20. So values
> from 0 to 1260mV can be represented, at steps of 20mV. A value of 0
> means 3.5V.
> 
> > [...]
> > 
> >> +     bq2415x_i2c_write(cli, BQ2415X_CHG_CTL, 0x42);
> >> +     bq2415x_set_voltage(cli, 0, 4200000);
> >> +     bq2415x_set_current_limit(cli, 1800000, 1800000);
> > 
> > So it always charges with 1.8A? Shouldn't this be dependent on the
> > input source (e.g. 500mA from USB)? Also what's if no charger is
> > connected at all?
> 
> No. I'm hard-coding those values, but I wrote the functions
> (set_voltate, set_current_limit) so all values are supported.

These hardcoded values should go to board specified section.

> 
> What is missing is the code to connect this driver to the charger
> detector driver (isp1704), so those values are determined dynamically.
> 
> > Apart from this I think those values should be exposed to sysfs
> > via /sys/class/power_supply.
> 
> Perhaps. Although I don't see much of the power supply interface that
> could be useful here, but if so, I guess this should be indeed in
> 'drivers/power'.

Power supply interface has pending patches for chargers. Patches will add 
interface for periodic calling functions - which is usefull for watchdog reset 
and charging (+ errors handling).

> 
> Cheers.

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2011-12-06 13:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-05 22:35 [PATCH] mfd: add bq2415x charger driver Felipe Contreras
2011-12-05 22:51 ` Felipe Contreras
2011-12-05 23:05 ` Pali Rohár
2011-12-06  0:12   ` Felipe Contreras
2011-12-06  7:25     ` Pali Rohár
2011-12-06 10:58       ` Felipe Contreras
2011-12-06 13:27         ` Pali Rohár
2011-12-06 14:11           ` Felipe Contreras
2011-12-06 15:19             ` Pali Rohár
2011-12-06 11:25       ` Mark Brown
2011-12-06  2:17 ` Sebastian Reichel
2011-12-06  2:49   ` Felipe Contreras
2011-12-06 13:21     ` Sebastian Reichel
2011-12-06 13:50       ` Felipe Contreras
2011-12-06 13:34     ` Pali Rohár [this message]
2011-12-06 11:31 ` Mark Brown
2011-12-06 11:43   ` Felipe Contreras
2011-12-06 11:46     ` Mark Brown
2011-12-07 21:03 ` RFC: bq2415x_charger driver Pali Rohár
2011-12-07 21:25   ` Vladimir Zapolskiy
2011-12-07 21:40     ` Pali Rohár
2012-01-27  2:40   ` RFC 2: " Pali Rohár
2012-01-27 16:24     ` Mark Brown
2012-01-27 18:33       ` Pali Rohár
2012-01-27 19:22         ` Mark Brown
2012-01-27 20:40     ` Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432607.e4Z4IWXQZY@pali-elitebook \
    --to=pali.rohar@gmail.com \
    --cc=aliaksei.katovich@nokia.com \
    --cc=felipe.contreras@gmail.com \
    --cc=felipe.contreras@nokia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=sre@debian.org \
    --cc=vz@mleia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox