From: Lars-Peter Clausen <lars@metafoo.de>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Anton Vorontsov <cbouatmailru@gmail.com>,
Grazvydas Ignotas <notasas@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: Fwd: [PATCH] bq27x00_battery: Add new properties
Date: Mon, 31 Jan 2011 20:19:30 +0100 [thread overview]
Message-ID: <4D470B42.7050301@metafoo.de> (raw)
In-Reply-To: <AANLkTikr3LL-+4LObBaCTo7JGTFTRdVbpbbUH4nfJ28X@mail.gmail.com>
On 01/31/2011 07:07 PM, Pali Rohár wrote:
> 2011/1/31 Anton Vorontsov <cbouatmailru@gmail.com>:
>> On Mon, Jan 31, 2011 at 04:43:56PM +0100, Rodolfo Giometti wrote:
>>> On Mon, Jan 31, 2011 at 04:51:47PM +0300, Anton Vorontsov wrote:
>> [...]
>>> Why not using:
>>>
>>> !!(gpio & 0x40)
>>>
>>> or
>>>
>>> (gpio & 0x40) ? 1 : 0
>>>
>>> ? I think it could be more readable... :)
>>>
>>> However, I don't understand why you fix gpio=0... it's your machine
>>> depending settings? In these case you should use the platform_data
>>> mechanism to properly setup the GPIO.
>>
>> I agree. It looks like a machine-specific configuration, and
>> exporting this GPIO as 'ONLINE' property may break other users.
>>
>> Instead, I would suggest adding gpiolib support into this driver,
>> and passing 'int online_gpio' via platform data. That way you can
>> pass any GPIOs to this driver, not only bq's.
>>
>> Pali, you can just split GPIO and 'ONLINE' property additions
>> into a separate patch for now, so we can apply the rest of the
>> changes, and hold on the GPIO stuff.
>
> Ok, I delete GPIO and ONLINE additions from this patch.
>
>>
>> [...]
>>>> +static int bq27x00_battery_nac(struct bq27x00_device_info *di)
>>>
>>> Let me suggest using bq27x00_battery_nac_uAh as function name...
>>
>> Regarding these suffixes. I'm not sure. This seems a bit too
>> verbose. So I'd prefer to not introduce these.
>>
>> Though, whatever you guys like... I'm fine either way.
>
> It think it is not needed to rename functions. In
> Documentation/power/power_supply_class.txt is written that default
> units are µA, µV, µAh, ... and functions in my patch return values in
> these correct units.
>
>>
>> [...]
>>>> MODULE_AUTHOR("Rodolfo Giometti <giometti@linux.it>");
>>>> MODULE_DESCRIPTION("BQ27x00 battery monitor driver");
>>>> +MODULE_ALIAS("i2c:bq27000");
>>>> +MODULE_ALIAS("i2c:bq27200");
>>>> +MODULE_ALIAS("i2c:bq27500");
>>
>> Btw, this is actually another bugfix. Pali, you might want to separate
>> it into yet another patch.
>
> Ok, I separate aliases to new patch.
>
The bq27000 is not an I2C device.
- Lars
>>
>> Thanks!
>>
>> --
>> Anton Vorontsov
>> Email: cbouatmailru@gmail.com
>>
>
>
>
next prev parent reply other threads:[~2011-01-31 19:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-31 13:51 Fwd: [PATCH] bq27x00_battery: Add new properties Anton Vorontsov
2011-01-31 15:43 ` Rodolfo Giometti
2011-01-31 16:03 ` Anton Vorontsov
2011-01-31 18:07 ` Pali Rohár
2011-01-31 19:19 ` Lars-Peter Clausen [this message]
2011-01-31 19:22 ` Mark Brown
2011-01-31 19:35 ` Pali Rohár
2011-01-31 19:38 ` Mark Brown
2011-01-31 20:03 ` Pali Rohár
2011-01-31 20:04 ` Pali Rohár
2011-01-31 20:15 ` Anton Vorontsov
2011-01-31 20:51 ` Lars-Peter Clausen
2011-01-31 19:43 ` Pali Rohár
2011-01-31 22:28 ` Lars-Peter Clausen
2011-01-31 22:39 ` Pali Rohár
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=4D470B42.7050301@metafoo.de \
--to=lars@metafoo.de \
--cc=cbouatmailru@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=notasas@gmail.com \
--cc=pali.rohar@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