lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <D854C92F57B1B347B57E531E78D05EAD5782256C@BGSMSX104.gar.corp.intel.com>
Date:	Tue, 28 Apr 2015 13:18:50 +0000
From:	"Pallala, Ramakrishna" <ramakrishna.pallala@...el.com>
To:	"cw00.choi@...sung.com" <cw00.choi@...sung.com>
CC:	Lee Jones <lee.jones@...aro.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	"Jacob Pan" <jacob.jun.pan@...ux.intel.com>
Subject: RE: [PATCH v5] extcon-axp288: Add axp288 extcon driver support

> On Tue, Apr 28, 2015 at 9:17 PM, Pallala, Ramakrishna
> <ramakrishna.pallala@...el.com> wrote:
> > Hi Choi,
> >
> >> On Tue, Apr 28, 2015 at 8:20 PM, Pallala, Ramakrishna
> >> >> > > > diff --git a/include/linux/mfd/axp20x.h
> >> >> > > > b/include/linux/mfd/axp20x.h index dfabd6d..81152e2 100644
> >> >> > > > --- a/include/linux/mfd/axp20x.h
> >> >> > > > +++ b/include/linux/mfd/axp20x.h
> >> >> > > > @@ -275,4 +275,13 @@ struct axp20x_fg_pdata {
> >> >> > > >         int thermistor_curve[MAX_THERM_CURVE_SIZE][2];
> >> >> > > >  };
> >> >> > > >
> >> >> > > > +#define AXP288_EXTCON_CABLE_SDP                "SLOW-CHARGER"
> >> >> > > > +#define AXP288_EXTCON_CABLE_CDP                "CHARGE-
> >> >> > > DOWNSTREAM"
> >> >> > > > +#define AXP288_EXTCON_CABLE_DCP                "FAST-CHARGER"
> >> >> > >
> >> >> > > #defines are meant to make things *easier* for humans to read.
> >> >> > > It is my opinion that these negatively impact the readability of the
> code.
> >> >> > These macros will be used in extcon and charger drivers. How can
> >> >> > I make it
> >> >> more readable?
> >> >>
> >> >> If the things you're defining are more readable than the defines
> >> >> themselves you're doing the opposite of what I'd expect.
> >> >>
> >> >> How about:
> >> >>
> >> >>   AXP288_EXTCON_SLOW_CHARGER_CABLE
> >> >>   AXP288_EXTCON_FAST_CHARGER_CABLE
> >> >>   AXP288_EXTCON_CHARGE_DOWNSTREAM_CABLE
> >> >
> >> > Ok I will change the names similar to the above ones.
> >>
> >> This cable names are used in only extcon driver.
> >> I think that you don't need to define them on header file.
> >> You better to move this definition to extcon driver.
> >>
> >> Also, I'll review your patch on other mail.
> >
> > Based on the these cable types I will be setting the charging parameters.
> > How will I know which charger cable is connected in extcon consumer driver?
> 
> I'm working to implement the unique id for all external connectors instead of
> string name when registering the external connectors [1]. But It is not
> completed and ongoing.
> [1]
> https://git.kernel.org/cgit/linux/kernel/git/chanwoo/extcon.git/commit/?h=v4.
> 2/extcon-next&id=52d1f16a650cc3b20ab5d5e281b874cfc5f659bc
> 
> Also, extcon consumer driver can use the unique id (enum extcon) when
> executing extcon_register_interest() function.
> After implementing patch[1], all extcon provider/consumer driver would not
> pass the string of external connector directly.

Sounds good. Can you review the patch v6 and let me know if you have
any other comments else I can submit the patch with these changes.

Thanks,
Ram

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ