From: "Pali Rohár" <pali.rohar@gmail.com>
To: Anton Vorontsov <cbouatmailru@gmail.com>,
linux-kernel@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>,
syed rafiuddin <rafiuddin.sayed@gmail.com>,
Rodolfo Giometti <giometti@linux.it>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH 8/9] bq27x00: Add miscdevice for each battery with ioctl for reading registers
Date: Fri, 25 Nov 2011 21:30:28 +0100 [thread overview]
Message-ID: <7780165.E3DXgdWAv1@pali-elitebook> (raw)
In-Reply-To: <20111125201011.GA14217@oksana.dev.rtsoft.ru>
[-- Attachment #1: Type: text/plain, Size: 2568 bytes --]
On Saturday 26 November 2011 00:10:11 you wrote:
> Hello Pali,
Hello,
>
> On Tue, Nov 01, 2011 at 01:53:26PM +0100, Pali Rohár wrote:
> [...]
>
> > >> Also on Nokia N900 is needed proprietary pogram BME for
> > >> battery charging which need to access to bq27200 registers. A
> > >> simple
> > >> LD_PRELOAD library which wrap i2c-dev access to this device
> > >> provided
> > >> by this patch is here:
> > >> https://code.launchpad.net/~pali/+junk/maemo_libbqioctl
> > >
> > > Yes, but that really is a hack to work around the closed source
> > > nature of the BME program. I don't think we should put such hacks
> > > into the kernel.>
> > Not only BME. All programs (and shell scripts and all which use
> > i2cget) need this interface, bacuse loading bq module will block
> > ic2-dev.
>
> A million thanks for your work! Though, on this particular patch I
> agree with Lars-Peter here. The raw abi interface ought to exist only
> because proprietary nature of BME, which is not good.
This interface is not only for BME. Also some popular bq27200.sh script which
print bq registers in human readable form needs this interface (with
LD_PRELOAD library).
Link for that shell script http://enivax.net/jk/n900/bq.tar
>
> IIRC, there is some shell script that makes it possible to charge
> N900 without BME?
bq27200 chip is for retrieving informations about battery. Chip bq24150 is
responsible for charging battery. And yes, there is shell script which use
this chip and can charge N900 battery (when BME is stopped).
Link: http://enivax.net/jk/n900/charge21.sh.txt
Problem is that this charge script need access to bq27200 registers too and
the only way is again rmmod bq27x00_battery driver or using that my interface.
> Is it possible to convert it to some "n900 charger driver"?
And two hours ago I started writing kernel driver for chip bq2415x which will
support charging battery. So I think yes!
So I think, one day I will delete BME from my Nokia N900.
>
> I applied all patches from this series, except this one.
>
> Thanks,
Ok, thanks!
I need some interface from userspace which can access to bq27200 registers.
Problem is that if driver bq27x00_battery is loaded it is not possible to
access to registers via i2c-tools. If this patch is not acceptable to
upstream, what is solution to this problem? I think that it is not good idea
to rmmod bq27x00_batery driver before executing scripts and then modprobing it
again...
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2011-11-25 20:30 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-20 15:18 [PATCH 1/7] bq27x00: Do not cache current_now value for bq27000 batery Pali Rohár
2011-09-20 15:18 ` [PATCH 2/7] bq27x00: Add support for property POWER_SUPPLY_PROP_CAPACITY_LEVEL Pali Rohár
2011-09-20 15:18 ` [PATCH 3/7] bq27x00: Report -ENODATA if bq27000 battery was not calibrated Pali Rohár
2011-09-20 15:18 ` [PATCH 4/7] bq27x00: Cache energy property Pali Rohár
2011-09-20 15:18 ` [PATCH 5/7] bq27x00: Cache temperature value in converted unit Pali Rohár
2011-09-20 15:18 ` [PATCH 6/7] bq27x00: Fix reporting status value for bq27500 battery Pali Rohár
2011-09-20 15:18 ` [PATCH 7/7] bq27x00: Fix reporting error messages Pali Rohár
2011-11-01 0:43 ` [PATCH 1/9] bq27x00: Do not cache current_now value for bq27000 batery Pali Rohár
2011-11-01 0:43 ` [PATCH 2/9] bq27x00: Add support for property POWER_SUPPLY_PROP_CAPACITY_LEVEL Pali Rohár
2011-11-01 0:43 ` [PATCH 3/9] bq27x00: Report -ENODATA if bq27000 battery was not calibrated Pali Rohár
2011-11-01 0:43 ` [PATCH 4/9] bq27x00: Cache energy property Pali Rohár
2011-11-01 0:43 ` [PATCH 5/9] bq27x00: Cache temperature value in converted unit Pali Rohár
2011-11-01 0:43 ` [PATCH 6/9] bq27x00: Fix reporting status value for bq27500 battery Pali Rohár
2011-11-01 0:43 ` [PATCH 7/9] bq27x00: Fix reporting error messages Pali Rohár
2011-11-01 0:43 ` [PATCH 8/9] bq27x00: Add miscdevice for each battery with ioctl for reading registers Pali Rohár
2011-11-01 12:09 ` Lars-Peter Clausen
2011-11-01 12:23 ` Pali Rohár
2011-11-01 12:46 ` Lars-Peter Clausen
2011-11-01 12:53 ` Pali Rohár
2011-11-25 20:10 ` Anton Vorontsov
2011-11-25 20:30 ` Pali Rohár [this message]
2011-11-25 20:46 ` Anton Vorontsov
2011-11-25 20:54 ` Pali Rohár
2011-11-25 22:04 ` Anton Vorontsov
2011-11-25 22:48 ` Pali Rohár
2011-11-27 11:54 ` Mark Brown
2011-12-05 19:37 ` Pali Rohár
2011-12-05 19:40 ` Mark Brown
2011-11-01 0:43 ` [PATCH 9/9] bq27x00: Fix OOPS caused by unregistring bq27x00 driver Pali Rohár
2011-11-13 20:54 ` Pali Rohár
2011-11-25 22:53 ` [PATCH] rx51: add bq27200 i2c board info Pali Rohár
2011-11-25 23:03 ` Anton Vorontsov
2011-12-05 19:24 ` Felipe Contreras
2011-12-06 15:49 ` Pali Rohár
2011-12-07 20:25 ` Tony Lindgren
2011-12-17 9:55 ` Pali Rohár
2012-01-06 1:41 ` Anton Vorontsov
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=7780165.E3DXgdWAv1@pali-elitebook \
--to=pali.rohar@gmail.com \
--cc=cbouatmailru@gmail.com \
--cc=dwmw2@infradead.org \
--cc=giometti@linux.it \
--cc=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rafiuddin.sayed@gmail.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