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: <4FF3EA70.307@nvidia.com>
Date:	Wed, 4 Jul 2012 12:32:08 +0530
From:	Laxman Dewangan <ldewangan@...dia.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC:	"lrg@...com" <lrg@...com>,
	"grant.likely@...retlab.ca" <grant.likely@...retlab.ca>,
	"rob.herring@...xeda.com" <rob.herring@...xeda.com>,
	"rob@...dley.net" <rob@...dley.net>,
	"devicetree-discuss@...ts.ozlabs.org" 
	<devicetree-discuss@...ts.ozlabs.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] regulator: fixed: dt: support for input supply

On Wednesday 04 July 2012 12:47 AM, Mark Brown wrote:
> * PGP Signed by an unknown key
>
> On Mon, Jul 02, 2012 at 03:37:25PM +0530, Laxman Dewangan wrote:
>
>> +	if (vin_supply)
>> +		drvdata->desc.supply_name = "vin";
>> +
> This isn't great both in terms of it being conditional and the fact that
> it's only usable on DT systems as there's no non-DT way to do this.  In
> general unless we're working around some device tree issue (which should
> be *very* rare) we shouldn't be adding any DT only stuff to generic
> code, we need to be able to run Linux on non-DT systems.
>

In non-DT, the input supply is passed with the regulator_init_data 
through the fixed voltage config and it is filled in board files.
In one of discussion on input supply in my old patch, I understand that  
we should not provide the supply_regulator through the init_data as it 
is legacy and should provide with desc->supply_name.

so matching with this I have this change and put th supply regulator in 
desc->supply_name.

If we want to keep the same as DT and non-DT and not the extra care for 
this new policy then we can put the parsing code in 
of_get_fixed_voltage_config() and just fill the 
config->init_data->supply_regulator in this function.
The property checking for vin-supply can be done in this function only 
and set the config->init_data->supply_regulator = "vin" accordingly.

In this way there is no code for DT/Non-DT case.

Let me know your opinion.
--
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