All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: "Pallala, Ramakrishna" <ramakrishna.pallala@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	Sebastian Reichel <sre@kernel.org>,
	"Tc, Jenny" <jenny.tc@intel.com>,
	Andreas Dannenberg <dannenberg@ti.com>
Subject: Re: [PATCH 2/2] power: Add support for TI BQ24261 charger
Date: Tue, 19 Jan 2016 09:02:32 +0200	[thread overview]
Message-ID: <CAHp75VcBAHg3trt45xVr6m9ppDyv+TSZEEVsWra3QVRWGKfC1g@mail.gmail.com> (raw)
In-Reply-To: <D854C92F57B1B347B57E531E78D05EAD57A22F3D@BGSMSX104.gar.corp.intel.com>

On Tue, Jan 19, 2016 at 3:26 AM, Pallala, Ramakrishna
<ramakrishna.pallala@intel.com> wrote:
>> On Thu, Oct 29, 2015 at 6:34 PM, Ramakrishna Pallala
>> <ramakrishna.pallala@intel.com> wrote:
>> > Add new charger driver support for TI BQ24261 charger IC.
>> >
>> > TI BQ24261 charger driver relies on extcon notifications to get the
>> > charger cable type and based on that it will set the charging parameters.

>> > +/* BQ24261 registers */
>> > +#define BQ24261_STAT_CTRL0_ADDR                0x00
>> > +#define BQ24261_CTRL_ADDR              0x01
>> > +#define BQ24261_BATT_VOL_CTRL_ADDR     0x02
>> > +#define BQ24261_VENDOR_REV_ADDR                0x03
>> > +#define BQ24261_TERM_FCC_ADDR          0x04
>> > +#define BQ24261_VINDPM_STAT_ADDR       0x05
>> > +#define BQ24261_ST_NTC_MON_ADDR                0x06
>> > +
>> > +#define BQ24261_RESET_ENABLE           BIT(7)
>> > +
>>
>> Might be a good idea to put comment line preceded each group to refer which
>> register it covers.
> Ok.
>
>>
>> > +#define BQ24261_FAULT_MASK             GENMASK(2, 0)
>>
>> Either use GENMASK in each case, or put plain number.
>>
> Ok.

Looking to your definitions again I can say that GENMASK is more
readable. Regarding to BIT() macro you have to do smart choice in each
case separately.

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2016-01-19  7:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29 16:34 [PATCH 0/2] power: Add support for TI BQ24261 charger Ramakrishna Pallala
2015-10-29 16:34 ` [PATCH 1/2] dt: " Ramakrishna Pallala
2015-10-29 16:34 ` [PATCH 2/2] " Ramakrishna Pallala
2015-10-30  9:17   ` Andy Shevchenko
2016-01-19  1:26     ` Pallala, Ramakrishna
2016-01-19  7:02       ` Andy Shevchenko [this message]
2016-01-19 18:27         ` Pallala, Ramakrishna
2015-10-29 16:37 [PATCH 0/2] " Ramakrishna Pallala
2015-10-29 16:37 ` [PATCH 2/2] " Ramakrishna Pallala
2015-11-18 23:49   ` Andreas Dannenberg
2015-11-18 23:49     ` Andreas Dannenberg
2016-01-19  3:04     ` Pallala, Ramakrishna
2016-01-19  3:04       ` Pallala, Ramakrishna

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=CAHp75VcBAHg3trt45xVr6m9ppDyv+TSZEEVsWra3QVRWGKfC1g@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=dannenberg@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jenny.tc@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=ramakrishna.pallala@intel.com \
    --cc=sre@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.