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] [thread-next>] [day] [month] [year] [list]
Message-ID: <51DD09B7.50604@nvidia.com>
Date:	Wed, 10 Jul 2013 12:43:59 +0530
From:	Laxman Dewangan <ldewangan@...dia.com>
To:	Chanwoo Choi <cw00.choi@...sung.com>
CC:	"myungjoo.ham@...sung.com" <myungjoo.ham@...sung.com>,
	"devicetree-discuss@...ts.ozlabs.org" 
	<devicetree-discuss@...ts.ozlabs.org>,
	"rob@...dley.net" <rob@...dley.net>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"kishon@...com" <kishon@...com>,
	"gg@...mlogic.co.uk" <gg@...mlogic.co.uk>
Subject: Re: [PATCH V2 4/4] extcon: palmas: Option to disable ID/VBUS detection
 based on platform

On Wednesday 10 July 2013 12:25 PM, Chanwoo Choi wrote:
> Hi Laxman,
>
> On 07/10/2013 03:15 PM, Laxman Dewangan wrote:
>> Should you define duplicate meaning variables in each other structure?
>> - disable_vbus_detection - enable_vbus_detection
>> - disable_id_detection - enable_id_detection
>>
>> I think that it isn' efficient code. I'd like you to simplify this patch
>> by using only one variable instead of duplicate meaning variables.

Originally this patch came form TI and not sure that they are using the 
both cable detection or only single type.
For Nvidia Tegra platform, on some design, we are using only ID 
detection and hence this option get added.

I did not like to break the TI design/code and hence added the option 
such that if there is no initialisation of this member or dts entry then 
assume it as the cable detection is enabled. Hence it need explicitly 
entry for disable the cable type detction. This is what for platform 
data structure.

On other structure, I use as other way to use in rest of code to make 
logic as

if (palmas_usb->enable_id_detction)
    xxx.

rathar than

if (!palmas_usb->disable_id_detction)
    xxx.


On rest of code, do now wan to use the pdata.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ