Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1311965 > unrolled thread
| Started by | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| First post | 2016-01-19 08:10 +0100 |
| Last post | 2016-01-19 19:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 2/2] power: Add support for TI BQ24261 charger Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-01-19 08:10 +0100
RE: [PATCH 2/2] power: Add support for TI BQ24261 charger "Pallala, Ramakrishna" <ramakrishna.pallala@intel.com> - 2016-01-19 19:30 +0100
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2016-01-19 08:10 +0100 |
| Subject | Re: [PATCH 2/2] power: Add support for TI BQ24261 charger |
| Message-ID | <qSyAq-4pu-13@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | "Pallala, Ramakrishna" <ramakrishna.pallala@intel.com> |
|---|---|
| Date | 2016-01-19 19:30 +0100 |
| Message-ID | <qSJcv-3ak-35@gated-at.bofh.it> |
| In reply to | #1311965 |
> 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. I don’t feel comfortable to mix GENMASK and normal bit settings. I will just stick to old fashioned way :-) Thanks, Ram
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web